:root, [data-theme="light"] {
  --bg: #EEF1F6;
  --sidebar: #F8F9FB;
  --surface: #FFFFFF;
  --subtle: #F3F4F7;
  --hover: #F5F7FB;
  --border: #EAECF2;
  --text: #111827;
  --text-secondary: #4B5563;
  --muted: #8C95A6;
  --blue: #0B63F6;
  --blue-hover: #0952CC;
  --blue-tint: #F2F7FF;
  --blue-chip: #EBF3FF;
  --blue-glow: rgba(11, 99, 246, 0.16);
  --unread-red: #FF4D50;
  --star-gold: #F59E0B;
  --green: #22C55E;
  --purple: #A855F7;
  --danger: #EF4444;
  --card-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] {
  --bg: #090D14;
  --sidebar: #0D1117;
  --surface: #121824;
  --subtle: #1A2232;
  --hover: #172030;
  --border: #212C40;
  --text: #F3F4F6;
  --text-secondary: #CBD5E1;
  --muted: #7F8EA6;
  --blue: #2F7BFF;
  --blue-hover: #1E66E8;
  --blue-tint: rgba(47, 123, 255, 0.14);
  --blue-chip: rgba(47, 123, 255, 0.16);
  --blue-glow: rgba(47, 123, 255, 0.22);
  --unread-red: #FF4D50;
  --star-gold: #FBBF24;
  --green: #22C55E;
  --purple: #C084FC;
  --danger: #F87171;
  --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--surface);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

.hidden { display: none !important; }
.muted-xs { color: var(--muted); font-size: 12px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ==================== LOGO BADGE ==================== */
.nexa-logo-badge {
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.nexa-logo-badge.sm { width: 40px; height: 40px; padding: 7px; }
.nexa-logo-badge.lg { width: 58px; height: 58px; padding: 10px; }
.nexa-logo-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ==================== BUTTONS & THEME PILL ==================== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; color: #FFFFFF;
  background: var(--blue);
  box-shadow: 0 6px 18px var(--blue-glow);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  background: var(--subtle); border: 1px solid var(--border); color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.btn-full { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; color: var(--muted);
  transition: background 0.14s ease, color 0.14s ease;
}
.icon-btn:hover { background: var(--subtle); color: var(--text); }
.danger-icon:hover { color: var(--danger); }

.theme-pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--subtle); border: 1px solid var(--border); color: var(--text-secondary);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-pill-btn:hover { border-color: var(--blue); color: var(--blue); }

.status-dot-green {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

/* ==================== LOGIN VIEW ==================== */
.login-shell {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg); overflow: hidden;
}
.login-glow {
  position: absolute; width: 540px; height: 540px; border-radius: 50%;
  background: radial-gradient(circle, var(--blue-glow), transparent 68%);
  top: -140px; left: 50%; transform: translateX(-50%); pointer-events: none;
}
.login-theme-btn { position: fixed; top: 18px; right: 20px; z-index: 10; }

.login-card {
  position: relative; width: 100%; max-width: 460px; padding: 32px 30px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
.login-logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.brand-badge {
  display: inline-block; padding: 4px 10px; border-radius: 99px;
  background: var(--blue-chip); color: var(--blue);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; margin-bottom: 5px;
}
.login-title { font-size: 25px; font-weight: 800; letter-spacing: -0.025em; }
.login-sub { font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 20px; }

.quick-accounts { margin-bottom: 18px; }
.quick-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 500;
  background: var(--subtle); border: 1px solid var(--border); color: var(--text-secondary);
}
.chip:hover, .chip.active { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.field-group input {
  padding: 11px 13px; border-radius: 10px; background: var(--subtle);
  border: 1px solid var(--border); font-size: 14px; outline: none;
}
.field-group input:focus { border-color: var(--blue); background: var(--surface); }

.alert-error {
  padding: 10px 12px; border-radius: 9px; font-size: 13px;
  background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.35); color: var(--danger);
}

.login-divider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 14px;
  font-size: 11.5px; color: var(--muted);
}
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.login-footer {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 11.5px; color: var(--muted); flex-wrap: wrap;
}

/* ==================== 3-PANE WORKSPACE ==================== */
.workspace { height: 100vh; overflow: hidden; background: var(--surface); }
.pane-grid {
  height: 100%; display: grid;
  grid-template-columns: 256px 380px minmax(0, 1fr);
}

/* 1. Left Navigation Sidebar */
.nav-rail {
  display: flex; flex-direction: column; gap: 16px; padding: 20px 14px;
  background: var(--sidebar); border-right: 1px solid var(--border); overflow-y: auto;
}
.profile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.profile-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-text { min-width: 0; }
.profile-name-row { display: flex; align-items: center; gap: 6px; }
.profile-name { font-size: 14px; font-weight: 700; white-space: nowrap; }
.profile-email { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mode-pill {
  padding: 1px 6px; border-radius: 99px; font-size: 9.5px; font-weight: 700;
  background: rgba(34, 197, 94, 0.14); color: var(--green);
}
.mode-pill.demo { background: var(--blue-chip); color: var(--blue); }

.profile-menu-wrap { position: relative; }
.popover-menu {
  position: absolute; right: 0; top: 36px; width: 156px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12); z-index: 30;
  display: flex; flex-direction: column; gap: 2px;
}
.popover-item {
  width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500;
}
.popover-item:hover { background: var(--subtle); }
.popover-item.danger { color: var(--danger); }

.btn-new-msg {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: #FFFFFF; background: var(--blue); box-shadow: 0 6px 18px var(--blue-glow);
  transition: background 0.15s ease;
}
.btn-new-msg:hover { background: var(--blue-hover); }

.folder-list { display: flex; flex-direction: column; gap: 3px; }
.folder-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary); transition: background 0.12s ease, color 0.12s ease;
}
.folder-item:hover { background: var(--hover); color: var(--text); }
.folder-item.active {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: var(--card-shadow);
}
.folder-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.folder-left svg { color: var(--muted); flex-shrink: 0; }
.folder-item.active .folder-left svg { color: var(--text); }
.unread-pill {
  padding: 2px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 700;
  background: var(--unread-red); color: #FFFFFF;
}
.folder-total { font-size: 12px; font-weight: 600; color: var(--muted); }

/* Labels Section */
.labels-section { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.labels-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted);
}
.labels-body { display: flex; flex-direction: column; gap: 2px; }
.label-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.label-row:hover { background: var(--hover); color: var(--text); }
.label-row.active { background: var(--surface); color: var(--blue); font-weight: 600; box-shadow: var(--card-shadow); }
.label-left { display: flex; align-items: center; gap: 10px; }
.label-ring { width: 11px; height: 11px; border-radius: 50%; border: 2.2px solid var(--blue); flex-shrink: 0; }
.label-ring.green { border-color: var(--green); }
.label-ring.blue { border-color: var(--blue); }
.label-ring.purple { border-color: var(--purple); }

.add-label-btn {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  font-size: 12.5px; font-weight: 500; color: var(--muted); border-radius: 8px;
}
.add-label-btn:hover { color: var(--blue); background: var(--hover); }
.add-label-form { display: flex; gap: 6px; padding: 4px 6px; }
.add-label-form input {
  flex: 1; min-width: 0; padding: 6px 8px; border-radius: 7px; font-size: 12px;
  background: var(--surface); border: 1px solid var(--border); outline: none;
}
.btn-xs-blue {
  padding: 6px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  background: var(--blue); color: #FFFFFF;
}

/* 2. Middle Message List Column */
.list-pane {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--border);
}
.list-header { padding: 20px 18px 12px; border-bottom: 1px solid var(--border); }
.list-header-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.folder-heading { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.folder-stats { font-size: 12px; color: var(--muted); margin-top: 2px; }

.search-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.search-box { position: relative; flex: 1; display: flex; align-items: center; }
.search-icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-box input {
  width: 100%; height: 38px; padding: 0 30px 0 36px; border-radius: 10px;
  background: var(--subtle); border: 1px solid transparent; font-size: 13px; outline: none;
}
.search-box input:focus { border-color: var(--blue); background: var(--surface); }
.search-clear { position: absolute; right: 9px; font-size: 11px; color: var(--muted); padding: 4px; }
.square-add-btn {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--subtle); color: var(--text-secondary);
}
.square-add-btn:hover { background: var(--blue-chip); color: var(--blue); }

.filter-bar { display: flex; align-items: center; justify-content: space-between; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: var(--subtle); color: var(--text-secondary);
}
.filter-pill:hover, .filter-pill.unread-active { background: var(--blue-chip); color: var(--blue); }

.message-list { flex: 1; overflow-y: auto; }
.msg-card {
  position: relative; padding: 15px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.12s ease;
}
.msg-card:hover { background: var(--hover); }
.msg-card.active {
  background: var(--blue-tint);
  box-shadow: inset 3px 0 0 var(--blue);
}

.msg-row-1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.msg-title-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.unread-dot.read { background: transparent; }
.msg-subject {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-card.unread .msg-subject { font-weight: 700; }
.msg-date { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }

.msg-row-2 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-left: 14px; margin-bottom: 4px;
}
.msg-sender { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.msg-replied-icon { color: var(--muted); flex-shrink: 0; }

.msg-snippet {
  padding-left: 14px; font-size: 12px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-attachments {
  display: flex; flex-wrap: wrap; gap: 6px; padding-left: 14px; margin-top: 8px;
}
.card-attach-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  border-radius: 6px; font-size: 11px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary);
}

.empty-list { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* 3. Right Reading Pane */
.reader-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.reader-topbar {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; border-bottom: 1px solid var(--border);
}
.reader-pager { display: flex; align-items: center; gap: 8px; }
.pager-text { font-size: 12.5px; font-weight: 500; color: var(--muted); min-width: 48px; text-align: center; }
.reader-top-right { display: flex; align-items: center; gap: 8px; }

.reader-empty {
  margin: auto; text-align: center; max-width: 340px; padding: 24px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.reader-empty h2 { font-size: 17px; color: var(--text); }
.reader-empty p { font-size: 13px; line-height: 1.6; }

.reader-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.reader-scroll { flex: 1; overflow-y: auto; padding: 22px 28px; }

.sender-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.sender-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar-lg {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #FFFFFF;
  background: linear-gradient(135deg, var(--blue), #4F94FF);
}
.sender-name { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.sender-sub { font-size: 12.5px; color: var(--muted); }
.sender-right { text-align: right; }
.reader-date { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sender-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.star-action { font-size: 17px; }
.star-action.starred { color: var(--star-gold); }

.reader-subject {
  font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35;
  margin-bottom: 16px; color: var(--text);
}

.email-body-wrap { margin-bottom: 20px; }
.email-frame { width: 100%; min-height: 220px; border: none; background: transparent; }
.email-plain {
  white-space: pre-wrap; font-family: 'Inter', sans-serif; font-size: 14px;
  line-height: 1.7; color: var(--text-secondary);
}

.attachments-section {
  padding-top: 16px; border-top: 1px solid var(--border); margin-bottom: 22px;
}
.attachments-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.attachments-title { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.download-all-link { font-size: 12.5px; font-weight: 600; color: var(--blue); }
.download-all-link:hover { text-decoration: underline; }

.attachments-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.attach-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 12px; background: var(--subtle); border: 1px solid var(--border);
  text-decoration: none; transition: border-color 0.15s ease;
}
.attach-card:hover { border-color: var(--blue); }
.attach-icon-circle {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted);
}
.attach-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.attach-meta { display: block; font-size: 11px; color: var(--muted); }

/* Thread Replies */
.thread-replies { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.reply-block {
  padding-top: 18px; border-top: 1px solid var(--border);
}
.reply-body { margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap; }

.quick-reply {
  padding: 12px 26px 16px; border-top: 1px solid var(--border); background: var(--sidebar);
}
.quick-reply textarea {
  width: 100%; resize: vertical; padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; outline: none;
}
.quick-reply textarea:focus { border-color: var(--blue); }
.quick-reply-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ==================== COMPOSE MODAL ==================== */
.compose-modal {
  position: fixed; right: 24px; bottom: 0; width: min(560px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--border); border-bottom: none;
  border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.18); z-index: 50;
}
.compose-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--blue); color: #FFFFFF;
  border-radius: 16px 16px 0 0; font-weight: 700; font-size: 14px;
}
.compose-header .icon-btn { color: #FFFFFF; }
.compose-header .icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.compose-body { display: flex; flex-direction: column; }
.compose-body input {
  padding: 10px 16px; background: transparent; border: none; border-bottom: 1px solid var(--border);
  font-size: 13.5px; outline: none;
}
.compose-body input:focus { border-bottom-color: var(--blue); }
.editor-toolbar {
  display: flex; gap: 6px; padding: 7px 14px; border-bottom: 1px solid var(--border); background: var(--sidebar);
}
.fmt-btn {
  padding: 4px 9px; border-radius: 6px; font-size: 12px; color: var(--text-secondary);
  background: var(--surface); border: 1px solid var(--border);
}
.fmt-btn:hover { border-color: var(--blue); color: var(--blue); }
.compose-editor {
  min-height: 200px; max-height: 310px; overflow-y: auto; padding: 14px 16px;
  font-size: 14px; line-height: 1.6; outline: none;
}
.compose-editor:empty::before { content: attr(data-placeholder); color: var(--muted); }
.compose-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-top: 1px solid var(--border); background: var(--sidebar);
}

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--text); color: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25); z-index: 80;
}

.mobile-only { display: none; }

@media (max-width: 980px) {
  .mobile-only { display: inline-flex; }
  .pane-grid { grid-template-columns: 1fr; position: relative; }
  .nav-rail {
    position: fixed; top: 0; left: 0; bottom: 0; width: 256px; z-index: 40;
    transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 8px 0 30px rgba(0,0,0,0.15);
  }
  .nav-rail.open { transform: translateX(0); }
  .workspace.reading-open .list-pane { display: none; }
  .workspace:not(.reading-open) .reader-pane { display: none; }
}

/* ==================== MULTI-ACCOUNT SWITCHER & MODAL ==================== */
.accounts-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
}
.accounts-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.btn-add-acc {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--blue);
  padding: 2px 7px;
  border-radius: 6px;
}
.btn-add-acc:hover { background: var(--blue-chip); }

.accounts-strip { display: flex; flex-direction: column; gap: 4px; }
.acc-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.acc-pill:hover { background: var(--hover); color: var(--text); }
.acc-pill.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--card-shadow);
}
.acc-pill-left { display: flex; align-items: center; gap: 7px; min-width: 0; }
.acc-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--border);
}
.acc-pill.active .acc-dot { background: var(--blue); box-shadow: 0 0 6px var(--blue-glow); }
.acc-email-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-remove {
  opacity: 0; font-size: 11px; color: var(--muted); padding: 2px 4px; border-radius: 5px; flex-shrink: 0;
}
.acc-pill:hover .acc-remove { opacity: 1; }
.acc-remove:hover { color: var(--danger); background: rgba(239, 68, 68, 0.1); }

.compose-from-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar);
}
.compose-from-row label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.compose-from-row select {
  flex: 1;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.compose-from-row select option { background: var(--surface); color: var(--text); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-card {
  width: 100%; max-width: 430px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-head h3 { font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 14px; }
