:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-alt: #f8f9fa;
  --border: #e4e6ea;
  --border-light: #f1f3f4;
  --text: #1c1e21;
  --text-sec: #65676b;
  --text-dim: #8a8d91;
  --accent: #0a66c2;
  --accent-hover: #004182;
  --accent-light: #e8f0fe;
  --danger: #dc3545;
  --danger-light: #fce8e6;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT SHELL ===== */
.shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 280px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-header {
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
}
.sidebar-header h1 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.sidebar-header h1 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.sidebar-header p { font-size: 12px; color: var(--text-sec); margin-top: 4px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px; }
.sidebar-section { margin-bottom: 16px; }
.sidebar-section-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-dim); padding: 8px 12px 4px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; color: var(--text-sec); transition: all 0.12s;
}
.sidebar-item:hover { background: var(--surface-alt); color: var(--text); }
.sidebar-item.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.sidebar-item svg { flex-shrink: 0; }
.sidebar-item .badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px;
}

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.sidebar-footer .countdown-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--surface-alt); border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.countdown-label { font-size: 12px; color: var(--text-sec); }
.countdown-value { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.countdown-value.urgent { color: var(--danger); }
.smtp-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; font-size: 12px; color: var(--text-dim);
}
.smtp-bar { height: 3px; background: var(--border); border-radius: 2px; margin: 4px 12px 0; overflow: hidden; }
.smtp-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s; }
.smtp-bar-fill.warn { background: var(--warning); }
.smtp-bar-fill.full { background: var(--danger); }

.sidebar-footer-btns { display: flex; gap: 6px; margin-top: 8px; }

/* ===== MAIN CONTENT ===== */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.main-header {
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.main-header h2 { font-size: 18px; font-weight: 600; }
.main-content { flex: 1; overflow-y: auto; }

/* ===== AUTH PAGE ===== */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}
.auth-card {
  background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 440px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo h1 { font-size: 32px; font-weight: 700; }
.auth-logo p { font-size: 14px; color: var(--text-sec); margin-top: 4px; }

.auth-legal {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 24px;
}
.check-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px;
  line-height: 1.5; color: var(--text-sec);
}
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 1px; flex-shrink: 0; }

.auth-btns { display: flex; flex-direction: column; gap: 10px; }
.auth-btns.disabled { opacity: 0.35; pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.12s;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c82333; }
.btn-ghost { background: transparent; color: var(--text-sec); padding: 8px 12px; }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  background: transparent; color: var(--text-sec); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background 0.12s;
}
.btn-icon:hover { background: var(--surface-alt); }

/* TTL Selector */
.ttl-section { margin-top: 20px; }
.ttl-label { font-size: 13px; font-weight: 500; color: var(--text-sec); margin-bottom: 8px; display: block; }
.ttl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ttl-chip {
  padding: 10px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-sec); font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: center; transition: all 0.12s;
}
.ttl-chip:hover { border-color: var(--accent); color: var(--accent); }
.ttl-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ttl-hint { font-size: 11px; color: var(--text-dim); margin-top: 6px; }

/* Restore area */
.restore-area { margin-top: 16px; }
.restore-area textarea {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 13px; resize: vertical; outline: none;
}
.restore-area textarea:focus { border-color: var(--accent); }
.restore-row { display: flex; gap: 8px; margin-top: 8px; }

/* ===== MESSAGE LIST ===== */
.msg-list { padding: 0; }
.msg-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background 0.08s;
}
.msg-item:hover { background: var(--surface-alt); }
.msg-item.unread { background: var(--accent-light); }
.msg-item.unread:hover { background: #d2e3fc; }
.msg-item.unread .msg-from { font-weight: 600; color: var(--text); }
.msg-from { font-size: 14px; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-subject { font-size: 14px; color: var(--text-sec); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-preview { font-size: 13px; color: var(--text-dim); margin-left: auto; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-date { font-size: 12px; color: var(--text-dim); white-space: nowrap; margin-left: 12px; }
.msg-attach-icon { color: var(--text-dim); flex-shrink: 0; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; color: var(--text-dim); text-align: center;
}
.empty-state svg { margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; color: var(--text-sec); margin-bottom: 4px; }
.empty-state p { font-size: 13px; }

/* ===== MESSAGE VIEW ===== */
.msg-view { display: flex; flex-direction: column; height: 100%; }
.msg-view-header {
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
}
.msg-view-meta { flex: 1; }
.msg-view-from { font-size: 16px; font-weight: 600; }
.msg-view-email { font-size: 12px; color: var(--text-dim); }
.msg-view-date { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.msg-view-actions { display: flex; gap: 4px; flex-shrink: 0; }
.msg-view-subject { font-size: 20px; font-weight: 600; padding: 20px 24px 0; }
.msg-view-body {
  flex: 1; overflow-y: auto; padding: 16px 24px 24px;
  font-size: 14px; line-height: 1.7;
}
.msg-view-body pre { white-space: pre-wrap; font-family: var(--font); }
.msg-view-body iframe { width: 100%; border: none; min-height: 400px; }

.attach-section { padding: 0 24px 20px; }
.attach-title { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.attach-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; max-width: 280px;
  cursor: pointer; transition: border-color 0.12s;
}
.attach-card:hover { border-color: var(--accent); }
.attach-icon {
  width: 36px; height: 36px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; text-transform: uppercase;
}
.attach-info { overflow: hidden; }
.attach-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.attach-size { font-size: 11px; color: var(--text-dim); }

/* ===== COMPOSE ===== */
.compose-page { display: flex; flex-direction: column; height: 100%; }
.compose-fields { padding: 0 24px; border-bottom: 1px solid var(--border-light); }
.compose-field {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.compose-field:last-child { border-bottom: none; }
.compose-field label { font-size: 13px; color: var(--text-dim); min-width: 60px; }
.compose-field input {
  flex: 1; border: none; outline: none; font-size: 14px; font-family: var(--font);
}
.compose-to-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; align-items: center; }
.to-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; background: var(--accent-light); color: var(--accent);
  border-radius: 4px; font-size: 13px;
}
.to-tag button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 14px; line-height: 1; }
.compose-to-input { flex: 1; min-width: 120px; border: none !important; outline: none; font-size: 14px; font-family: var(--font); padding: 4px 0; }

.compose-body-area {
  flex: 1; padding: 16px 24px; overflow-y: auto;
}
.compose-body-area textarea {
  width: 100%; min-height: 200px; border: none; outline: none;
  font-size: 14px; font-family: var(--font); line-height: 1.6; resize: none;
}

.compose-attachments { padding: 0 24px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.compose-attach-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 16px; font-size: 12px;
}
.compose-attach-chip button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; }

.compose-footer {
  padding: 12px 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.compose-footer-left { display: flex; align-items: center; gap: 8px; }
.compose-attach-label {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-sec); cursor: pointer; transition: all 0.12s;
}
.compose-attach-label:hover { border-color: var(--accent); color: var(--accent); }

/* ===== LEGAL PAGE ===== */
.legal-page { max-width: 720px; margin: 0 auto; padding: 40px 24px; }
.legal-page h1 { font-size: 28px; margin-bottom: 8px; }
.legal-page .legal-updated { font-size: 13px; color: var(--text-dim); margin-bottom: 24px; }
.legal-page h2 { font-size: 18px; margin: 24px 0 8px; color: var(--text); }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.7; color: var(--text-sec); margin-bottom: 10px; }
.legal-page ul { padding-left: 20px; margin-bottom: 12px; }
.legal-page strong { color: var(--text); }

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: slideIn 0.2s ease;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
.toast.info { background: var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface); border-radius: 16px; width: 100%;
  max-width: 520px; box-shadow: var(--shadow-lg); max-height: 80vh; overflow-y: auto;
  padding: 28px;
}
.modal h3 { font-size: 18px; margin-bottom: 12px; }
.modal p { font-size: 13px; color: var(--text-sec); line-height: 1.5; margin-bottom: 12px; }

/* Phrase words */
.phrase-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 16px 0; }
.phrase-word {
  padding: 8px 4px; background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-xs); text-align: center;
}
.phrase-word .num { font-size: 10px; color: var(--text-dim); display: block; }
.phrase-word .word { font-family: var(--mono); font-size: 12px; font-weight: 500; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-sec); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; outline: none; transition: border-color 0.12s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px;
  text-align: center; cursor: pointer; transition: all 0.15s; color: var(--text-dim);
}
.upload-zone:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.upload-zone p { margin-top: 8px; font-size: 13px; }
.upload-browse { color: var(--accent); font-weight: 500; text-decoration: underline; }
.upload-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ===== ABUSE PAGE ===== */
.abuse-page { max-width: 600px; margin: 0 auto; padding: 40px 20px; }
.abuse-page h1 { font-size: 24px; margin-bottom: 4px; }
.abuse-page .subtitle { font-size: 14px; color: var(--text-sec); margin-bottom: 24px; }
.abuse-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.abuse-success {
  background: var(--success-light); border: 1px solid var(--success); border-radius: var(--radius);
  padding: 20px; text-align: center; color: var(--success);
}
.abuse-success h3 { margin-bottom: 8px; }

/* ===== ADMIN PANEL ===== */
.admin-page { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.admin-page h1 { font-size: 24px; margin-bottom: 20px; }
.admin-login { max-width: 400px; margin: 0 auto; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--accent); }
.stat-card .stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.admin-table {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.admin-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: var(--surface-alt); padding: 10px 12px; text-align: left; font-weight: 600; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); }
.admin-table tr:last-child td { border-bottom: none; }
.badge-active { background: var(--success-light); color: var(--success); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-expired { background: var(--danger-light); color: var(--danger); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }

/* ===== PUBLIC PAGES (auth-page style) ===== */
.public-page {
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 20px;
}
.public-card {
  background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow-lg); width: 100%; max-width: 720px;
}
.public-card-header {
  padding: 24px 32px; border-bottom: 1px solid var(--border);
}
.public-card-header h1 { font-size: 22px; }
.public-card-header p { font-size: 13px; color: var(--text-sec); margin-top: 4px; }
.public-card-body { padding: 24px 32px; }
.public-card-footer {
  padding: 16px 32px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
}
/* ===== RICH TEXT EDITOR ===== */
.compose-editor-toggle {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
}
.editor-mode-label {
  font-size: 11px; color: var(--text-dim); font-style: italic;
}
.compose-editor-toolbar {
  display: flex; align-items: center; gap: 2px; padding: 6px 8px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap;
}
.toolbar-group { display: flex; align-items: center; gap: 2px; }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.toolbar-btn {
  background: none; border: 1px solid transparent; color: var(--text); cursor: pointer;
  width: 28px; height: 28px; border-radius: 4px; display: flex; align-items: center;
  justify-content: center; font-size: 13px; transition: all 0.1s;
}
.toolbar-btn:hover { background: var(--accent-light); border-color: var(--border); color: var(--accent); }
.toolbar-select {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 4px; font-size: 11px; padding: 2px 4px; height: 28px; cursor: pointer;
}
.toolbar-color {
  width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 4px;
  cursor: pointer; padding: 0; background: none;
}
.compose-richtext {
  border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px; min-height: 200px; max-height: 50vh; overflow-y: auto;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  outline: none; word-wrap: break-word;
}
.compose-richtext:focus { border-color: var(--accent); }
.compose-richtext blockquote {
  border-left: 3px solid var(--accent); margin: 8px 0; padding: 4px 12px;
  color: var(--text-sec); background: var(--bg-secondary); border-radius: 0 4px 4px 0;
}

/* ===== ADMIN IMPROVED ===== */
.admin-search {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.admin-search input {
  flex: 1; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 13px; font-family: var(--mono);
}
.admin-msg-view {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-top: 12px;
}
.admin-msg-view h4 { font-size: 14px; margin-bottom: 8px; }
.admin-msg-view pre {
  white-space: pre-wrap; word-break: break-word; font-size: 12px;
  color: var(--text-sec); max-height: 300px; overflow-y: auto;
}

.back-link { font-size: 13px; display: inline-block; margin-bottom: 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .shell { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar { width: 100%; height: auto; max-height: 50vh; border-right: none; border-bottom: 1px solid var(--border); overflow-y: auto; }
  .main { overflow: visible; }
  .main-content { overflow-y: visible; }
  .msg-view { height: auto; min-height: 60vh; }
  .compose-page { height: auto; min-height: 60vh; }
  .msg-from { min-width: 100px; }
  .msg-preview { display: none; }
  .phrase-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-table { overflow-x: auto; }
  .public-card-body { padding: 16px; }
  .public-card-header { padding: 16px; }
  .public-page { padding: 20px 16px; min-height: auto; }
  .auth-page { padding: 20px 16px; }
  body { min-height: auto; }
}

/* Landing page */
.landing-page { min-height:100vh; background:var(--bg); }
.landing-nav { display:flex; justify-content:space-between; align-items:center; padding:16px 24px; max-width:1200px; margin:0 auto; }
.landing-hero { text-align:center; padding:80px 24px 60px; max-width:800px; margin:0 auto; }
.landing-hero h1 { font-size:clamp(32px,6vw,56px); font-weight:800; line-height:1.1; margin:0 0 16px; background:linear-gradient(135deg,var(--accent),#a78bfa); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.landing-hero p { font-size:18px; color:var(--text-sec); max-width:600px; margin:0 auto 32px; line-height:1.6; }
.landing-cta { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.landing-cta .btn { padding:14px 32px; font-size:16px; border-radius:var(--radius); font-weight:600; }
.landing-section { max-width:1000px; margin:0 auto; padding:60px 24px; }
.landing-section-title { font-size:28px; font-weight:700; text-align:center; margin-bottom:40px; }
.how-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:24px; }
.how-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px; text-align:center; }
.how-card .how-icon { font-size:40px; margin-bottom:16px; display:block; }
.how-card h3 { margin:0 0 8px; font-size:20px; }
.how-card p { color:var(--text-sec); font-size:14px; line-height:1.6; margin:0; }
.features-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.feature-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:24px; display:flex; gap:12px; align-items:flex-start; }
.feature-card .feat-icon { font-size:24px; flex-shrink:0; }
.feature-card h4 { margin:0 0 4px; font-size:15px; }
.feature-card p { margin:0; color:var(--text-sec); font-size:13px; line-height:1.5; }
.discord-banner { background:linear-gradient(135deg,#5865F2,#7289DA); border-radius:var(--radius-lg); padding:48px 40px; text-align:center; color:#fff; max-width:800px; margin:0 auto; }
.discord-banner h2 { margin:0 0 12px; font-size:28px; }
.discord-banner p { margin:0 0 24px; opacity:0.9; font-size:16px; }
.discord-banner .btn { background:#fff; color:#5865F2; font-weight:700; padding:14px 32px; border-radius:var(--radius); font-size:16px; }
.discord-banner .btn:hover { opacity:0.9; }
.landing-footer { border-top:1px solid var(--border); padding:32px 24px; text-align:center; }
.landing-footer-links { display:flex; gap:24px; justify-content:center; flex-wrap:wrap; margin-bottom:16px; }
.landing-footer-links a { color:var(--text-sec); text-decoration:none; font-size:14px; }
.landing-footer-links a:hover { color:var(--accent); }
.landing-footer .tagline { color:var(--text-dim); font-size:13px; margin:0; }

/* Gmail-like message view */
.msg-view { padding:24px; height:100%; display:flex; flex-direction:column; }
.msg-view-topbar { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.msg-view-subject-line { font-size:22px; font-weight:700; flex:1; }
.msg-view-header { display:flex; gap:12px; align-items:flex-start; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.msg-avatar { width:44px; height:44px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:18px; flex-shrink:0; }
.msg-header-meta { flex:1; }
.msg-header-from { font-weight:600; font-size:15px; margin-bottom:2px; }
.msg-header-details { font-size:13px; color:var(--text-dim); }
.msg-header-details span { margin-right:8px; }
.msg-view-body-content { flex:1; padding:16px 0; min-height:200px; }
.msg-view-body-content iframe { width:100%; border:none; min-height:300px; }
.msg-view-body-content pre { white-space:pre-wrap; word-wrap:break-word; font-size:14px; line-height:1.7; color:var(--text); }
.msg-view-attachments { padding:16px 0; border-top:1px solid var(--border); }
.msg-view-attachments-title { font-size:13px; color:var(--text-dim); margin-bottom:8px; font-weight:500; }
.attach-chip { display:inline-flex; align-items:center; gap:6px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:8px 14px; margin:4px; cursor:pointer; font-size:13px; transition:border-color 0.15s; }
.attach-chip:hover { border-color:var(--accent); }
.attach-chip svg { flex-shrink:0; }
.attach-chip-info { display:flex; flex-direction:column; }
.attach-chip-name { font-weight:500; }
.attach-chip-size { font-size:11px; color:var(--text-dim); }
.msg-view-actions { display:flex; gap:8px; padding-top:16px; border-top:1px solid var(--border); }

/* Contact page */
.contact-page { padding:32px; max-width:700px; margin:0 auto; }
.contact-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px; margin-bottom:20px; display:flex; gap:16px; align-items:flex-start; }
.contact-card-icon { width:48px; height:48px; border-radius:var(--radius); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:24px; }
.contact-card-icon.discord { background:#5865F2; color:#fff; }
.contact-card-icon.email { background:var(--accent); color:#fff; }
.contact-card-icon.report { background:var(--danger); color:#fff; }
.contact-card-content h3 { margin:0 0 6px; font-size:18px; }
.contact-card-content p { margin:0 0 12px; color:var(--text-sec); font-size:14px; line-height:1.5; }

/* Language toggle */
.lang-toggle { background:none; border:1px solid var(--border); border-radius:var(--radius); padding:4px 10px; color:var(--text-sec); cursor:pointer; font-size:12px; font-weight:600; transition:all 0.15s; }
.lang-toggle:hover { border-color:var(--accent); color:var(--accent); }
.sidebar-lang { padding:0 16px 12px; display:flex; justify-content:flex-end; }
.auth-lang { position:absolute; top:16px; right:16px; }

/* Auth page positioning */
.auth-page { position:relative; }
