
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; }

/* Login */
.login-body { display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-container { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 2px 20px rgba(0,0,0,0.1); width: 380px; }
.login-container h1 { margin-bottom: 24px; font-size: 24px; text-align: center; }

/* App Layout */
.app-container { display: flex; height: 100vh; }
.sidebar { width: 280px; background: #1a1a2e; color: white; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h2 { font-size: 18px; margin-bottom: 8px; }
.user-info { font-size: 12px; color: #889; margin-bottom: 4px; }
.logout-link { font-size: 12px; color: #e74c3c; text-decoration: none; }
.sidebar-actions { padding: 12px 16px; display: flex; gap: 8px; }
.mailbox-list { flex: 1; overflow-y: auto; }
.mailbox-item { padding: 10px 20px; cursor: pointer; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mailbox-item:hover { background: rgba(255,255,255,0.1); }
.mailbox-item.active { background: rgba(255,255,255,0.15); }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.toolbar { padding: 16px 24px; background: white; border-bottom: 1px solid #e0e0e0; }
.toolbar h3 { font-size: 18px; }

/* Message List */
.message-list { flex: 1; overflow-y: auto; padding: 8px 16px; }
.msg-row { background: white; padding: 12px 16px; margin-bottom: 6px; border-radius: 8px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.msg-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.msg-meta { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 4px; }
.msg-subject { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.msg-sender { font-size: 13px; color: #666; }
.msg-code { font-size: 12px; color: #e67e22; font-weight: bold; margin-top: 4px; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: white; padding: 24px; border-radius: 12px; width: 480px; max-height: 80vh; overflow-y: auto; }
.msg-detail { width: 700px; }
.close { float: right; font-size: 24px; cursor: pointer; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; color: #666; }
.form-group input { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-primary { background: #3498db; color: white; }
.btn-sm { font-size: 13px; padding: 6px 12px; }
.btn-add { background: #27ae60; color: white; }
.btn-sync { background: #2c3e50; color: white; }

/* Message Detail */
.msg-detail-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.msg-detail-header h4 { margin-bottom: 8px; font-size: 18px; }
.msg-detail-body { font-size: 14px; line-height: 1.6; }
.msg-detail-body pre { white-space: pre-wrap; word-wrap: break-word; font-family: inherit; }
.msg-code-large { background: #fff3cd; padding: 8px 12px; border-radius: 6px; margin-top: 8px; font-size: 16px; }
.msg-code-large strong { color: #e67e22; font-size: 20px; }

.loading, .empty { text-align: center; padding: 40px; color: #999; }
.error { color: #e74c3c; font-size: 14px; margin-top: 8px; }
.success { color: #27ae60; font-size: 14px; }

