:root {
  color-scheme: dark;
  --ink: #f4f7f6;
  --muted: #94a3ad;
  --faint: #60717d;
  --line: rgba(148, 163, 173, 0.15);
  --line-strong: rgba(148, 163, 173, 0.28);
  --panel: #101b29;
  --panel-deep: #0c1623;
  --canvas: #08101b;
  --mint: #74e7c2;
  --mint-deep: #1d685a;
  --amber: #f3c780;
  --danger: #f19c9c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 15px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: radial-gradient(circle at 10% 0%, rgba(70, 133, 132, .18), transparent 30%), var(--canvas); }
.auth-card { display: flex; flex-direction: column; justify-content: center; width: min(420px, calc(100% - 48px)); margin: auto; padding: 48px 0; }
.brand-mark, .mini-mark { display: grid; place-items: center; background: var(--mint); color: var(--canvas); font-weight: 900; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 25px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 12px; color: var(--mint); letter-spacing: .16em; font-size: 11px; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(34px, 4vw, 58px); line-height: 1.02; letter-spacing: -.055em; margin-bottom: 18px; }
.auth-copy, .subheading { color: var(--muted); line-height: 1.65; max-width: 560px; }
.stack-form { display: grid; gap: 18px; margin-top: 30px; }
label { display: grid; gap: 8px; color: #dbe5e3; font-size: 13px; font-weight: 700; }
.label-note { color: var(--faint); font-size: 10px; font-weight: 600; letter-spacing: .03em; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 16, 27, .75); color: var(--ink); padding: 12px 13px; outline: none; transition: border .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #556773; }
input:focus, textarea:focus, select:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(116, 231, 194, .12); }
.primary-button, .secondary-button, .ghost-button, .inline-action, .icon-button { border: 0; border-radius: 9px; transition: transform .15s, background .15s, color .15s; }
.primary-button { background: var(--mint); color: #07151a; padding: 13px 18px; font-weight: 800; }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover, .inline-action:hover { transform: translateY(-1px); }
.primary-button.compact { padding: 11px 15px; }
.secondary-button { padding: 11px 15px; color: var(--ink); background: #172636; border: 1px solid var(--line); }
.danger-button { margin-right: auto; padding: 11px 15px; color: var(--danger); background: rgba(241,156,156,.08); border: 1px solid rgba(241,156,156,.35); border-radius: 9px; font-weight: 800; }
.danger-button:hover { color: #ffd3d3; background: rgba(241,156,156,.16); }
.ghost-button { background: transparent; color: var(--muted); padding: 9px 11px; }
.ghost-button:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.danger-text { color: var(--danger); }
.form-status { min-height: 18px; margin: 0; color: var(--amber); font-size: 12px; line-height: 1.4; }
.auth-help { color: var(--faint); font-size: 11px; line-height: 1.5; margin: 5px 0 0; }
.auth-footnote, .security-note { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; }
.auth-footnote { margin-top: 30px; }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(116,231,194,.09); }
.auth-aside { position: relative; overflow: hidden; min-height: 100vh; border-left: 1px solid var(--line); background: linear-gradient(140deg, rgba(20,40,52,.45), rgba(9,17,30,.1)), #0b1722; }
.aside-grid { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(116,231,194,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(116,231,194,.35) 1px, transparent 1px); background-size: 44px 44px; transform: perspective(500px) rotateX(62deg) scale(1.5) translateY(20%); transform-origin: center bottom; }
.aside-orbit { position: absolute; border: 1px solid rgba(116,231,194,.23); border-radius: 50%; }
.orbit-one { width: 620px; height: 620px; left: 4%; top: 10%; transform: rotate(18deg) skewX(-12deg); }
.orbit-two { width: 420px; height: 420px; left: 19%; top: 23%; transform: rotate(-25deg) skewX(-8deg); border-color: rgba(243,199,128,.2); }
.aside-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; max-width: 480px; margin: auto; padding: 48px; }
.aside-content h2 { font-size: clamp(34px, 4vw, 54px); line-height: 1.03; letter-spacing: -.055em; max-width: 440px; }
.feature-list { display: grid; gap: 22px; margin-top: 35px; }
.feature-list > div { display: grid; grid-template-columns: 40px 1fr; gap: 3px 14px; padding-top: 17px; border-top: 1px solid var(--line); }
.feature-list span { grid-row: span 2; color: var(--mint); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.feature-list strong { font-size: 15px; }
.feature-list small { color: var(--muted); line-height: 1.5; }

.app-shell { min-height: 100vh; background: radial-gradient(circle at 50% -10%, rgba(70,133,132,.12), transparent 33%), var(--canvas); }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid var(--line); background: rgba(8,16,27,.75); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 5; }
.topbar-brand, .topbar-actions, .page-heading, .dialog-header, .dialog-actions { display: flex; align-items: center; }
.topbar-brand { gap: 11px; }
.mini-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 18px; }
.brand-name, .brand-sub { display: block; }
.brand-name { letter-spacing: .16em; font-size: 11px; font-weight: 900; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.topbar-actions { gap: 6px; }
.live-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); background: rgba(116,231,194,.08); border: 1px solid rgba(116,231,194,.17); border-radius: 99px; padding: 7px 10px; font-size: 11px; font-weight: 800; margin-right: 4px; }
.content-wrap { width: min(1800px, calc(100% - 8vw)); margin: 0 auto; padding: 48px 0; }
@media (min-width: 1641px) {
  .content-wrap { width: min(2300px, calc(100% - 6vw)); }
}
.page-heading { align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.page-heading h1 { font-size: clamp(34px, 4vw, 52px); margin-bottom: 8px; }
.page-heading .subheading { margin-bottom: 0; }
.view-tabs { display: flex; gap: 6px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.view-tab { border: 1px solid transparent; border-bottom: 2px solid transparent; border-radius: 9px 9px 0 0; padding: 10px 18px; color: var(--muted); background: transparent; font-weight: 800; }
.view-tab:hover { color: var(--ink); background: rgba(116,231,194,.05); }
.view-tab.active { color: var(--mint); border-color: var(--line); border-bottom-color: var(--mint); background: rgba(116,231,194,.08); }
.proxy-section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.proxy-section-heading h2 { margin-bottom: 7px; font-size: 28px; letter-spacing: -.04em; }
.proxy-section-heading .subheading { margin-bottom: 0; }
.proxy-count { color: var(--muted); font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { min-height: 126px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); background: rgba(16,27,41,.72); padding: 17px; border-radius: 12px; }
.stat-card span, .stat-card small { color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 31px; letter-spacing: -.05em; }
.accent-card { background: linear-gradient(145deg, rgba(41,95,86,.5), rgba(16,27,41,.75)); }
.accent-card strong { color: var(--mint); font-size: 20px; }
.table-panel { border: 1px solid var(--line); background: rgba(16,27,41,.72); border-radius: 14px; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); }
.search-wrap { position: relative; flex: 1; }
.search-wrap input { padding-left: 36px; background: #0d1927; }
.search-icon { position: absolute; left: 13px; top: 8px; color: var(--faint); font-size: 23px; z-index: 1; }
.filter-group { display: flex; gap: 8px; }
.filter-group select { min-width: 145px; padding: 11px 12px; }
.proxy-filter-group input { width: 120px; padding: 11px 12px; }
.table-scroll { overflow-x: hidden; }
table { width: 100%; min-width: 1450px; border-collapse: collapse; }
.proxy-table { min-width: 1500px; }
th { text-align: left; color: #728591; letter-spacing: .09em; text-transform: uppercase; font-size: 10px; font-weight: 800; padding: 15px 14px 11px; white-space: nowrap; }
td { padding: 14px; border-top: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
tbody tr:hover { background: rgba(116,231,194,.035); }
.account-cell { display: grid; gap: 4px; min-width: 180px; }
.account-email { color: var(--ink); font-weight: 750; }
.account-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.tag-chip { color: var(--mint); font-size: 10px; border-radius: 99px; background: rgba(116,231,194,.08); padding: 3px 6px; }
.status-badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-active { color: var(--mint); background: rgba(116,231,194,.1); }
.status-wasted { color: var(--danger); background: rgba(241,156,156,.1); }
.status-needs-update { color: var(--amber); background: rgba(243,199,128,.1); }
.status-locked { color: #c7b7ff; background: rgba(199,183,255,.1); }
.status-suspended { color: #ffb07d; background: rgba(255,176,125,.1); }
.status-review-required { color: #f3c780; background: rgba(243,199,128,.12); }
.status-select { min-width: 126px; padding: 7px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; cursor: pointer; }
.status-select option { color: var(--ink); background: var(--panel-deep); }
.folder-label { color: var(--muted); font-size: 11px; }
.secret-cell { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.totp-stack { display: grid; gap: 5px; min-width: 185px; }
.eye-icon { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }
.secret-value { letter-spacing: .08em; }
.plain-value { letter-spacing: normal; }
.cell-button { border: 0; background: transparent; color: var(--faint); padding: 4px; border-radius: 6px; }
.cell-button:hover { color: var(--mint); background: rgba(116,231,194,.1); }
.proxy-copy-wrap { position: relative; display: inline-flex; }
.proxy-copy-menu { position: fixed; z-index: 30; display: grid; gap: 2px; width: 176px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 9px; background: #142231; box-shadow: 0 12px 32px rgba(0,0,0,.48); }
.proxy-copy-menu[hidden] { display: none; }
.proxy-copy-menu button { width: 100%; border: 0; border-radius: 6px; padding: 9px 10px; color: var(--ink); background: transparent; text-align: left; font-size: 12px; }
.proxy-copy-menu button:hover, .proxy-copy-menu button:focus-visible { color: var(--mint); background: rgba(116,231,194,.1); outline: none; }
.code-badge { color: var(--mint); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.note-preview { max-width: 160px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.note-cell { display: inline-flex; align-items: center; gap: 5px; }
.proxy-preview { max-width: 160px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.proxy-component { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.proxy-index { color: var(--faint); font-size: 11px; }
.updated-cell { color: var(--muted); font-size: 11px; }
.row-actions { display: inline-flex; gap: 2px; }
.empty-state { padding: 72px 20px; text-align: center; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 16px; border-radius: 16px; color: var(--mint); font-size: 30px; background: rgba(116,231,194,.08); }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.empty-state p { margin-bottom: 19px; }
.security-note { justify-content: center; margin: 17px 0 0; }

.account-dialog { width: min(720px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; color: var(--ink); background: #101b29; box-shadow: 0 26px 100px rgba(0,0,0,.55); }
.account-dialog::backdrop { background: rgba(3,8,14,.8); backdrop-filter: blur(5px); }
.account-dialog form { padding: 24px; }
.dialog-header { justify-content: space-between; margin-bottom: 24px; }
.dialog-header h2 { font-size: 24px; letter-spacing: -.04em; margin-bottom: 0; }
.assignment-target { color: var(--muted); margin: -8px 0 20px; }
.assignment-target strong { color: var(--ink); }
.proxy-dialog { width: min(560px, calc(100% - 28px)); }
.import-preview-dialog { width: min(1120px, calc(100% - 28px)); }
.audit-dialog { width: min(700px, calc(100% - 28px)); }
.prompt-dialog { width: min(480px, calc(100% - 28px)); }
.prompt-dialog form, .prompt-dialog-content { padding: 24px; }
.prompt-dialog .dialog-header { margin-bottom: 14px; }
.confirm-dialog-message { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.prompt-dialog .dialog-actions { margin-top: 22px; }
.prompt-dialog .danger-button { margin-right: 0; }
.audit-list { display: grid; gap: 9px; max-height: min(58vh, 560px); overflow-y: auto; padding-right: 3px; }
.audit-entry { border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: rgba(8,16,27,.45); }
.audit-entry-top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.audit-entry-top strong { color: var(--ink); font-size: 13px; }
.audit-entry-top time { color: var(--faint); font-size: 11px; white-space: nowrap; }
.audit-entry-record { margin-top: 5px; color: var(--muted); font-size: 12px; }
.audit-entry-fields { margin-top: 7px; color: var(--mint); font-size: 11px; }
.audit-empty { padding: 34px 14px; text-align: center; color: var(--muted); }
.audit-empty .empty-icon { margin-bottom: 11px; }
.audit-empty h3 { margin-bottom: 6px; color: var(--ink); }
.audit-empty p { margin-bottom: 0; }
.import-preview-summary { margin-bottom: 14px; }
.import-preview-scroll { max-height: min(54vh, 540px); }
.import-preview-table { min-width: 1040px; }
.import-preview-table td { white-space: nowrap; }
.import-mapping-select { min-width: 190px; max-width: 230px; padding: 8px 9px; color: var(--ink); background: #0d1927; font-size: 11px; }
.import-status-cell { display: grid; gap: 5px; min-width: 150px; }
.import-status { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; font-size: 11px; font-weight: 800; }
.import-status-reason { color: var(--muted); font-size: 10px; line-height: 1.35; white-space: normal; max-width: 210px; }
.import-status.ok { color: var(--mint); background: rgba(116, 231, 194, .1); }
.import-status.warning { color: var(--amber); background: rgba(243, 199, 128, .1); }
.import-status.error { color: var(--danger); background: rgba(241, 156, 156, .1); }
.icon-button { width: 32px; height: 32px; color: var(--muted); background: transparent; font-size: 25px; }
.icon-button:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-two { grid-column: span 2; }
.input-action { display: flex; align-items: stretch; gap: 6px; }
.input-action input { min-width: 0; }
.inline-action { padding: 0 10px; background: #193a3c; color: var(--mint); font-size: 11px; font-weight: 800; }
.field-hint { color: var(--faint); font-size: 11px; font-weight: 500; line-height: 1.4; }
.import-hint { margin: 12px 0 0; }
.import-hint code { color: var(--mint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dialog-actions { justify-content: flex-end; gap: 9px; margin-top: 22px; }
.dialog-actions .primary-button { min-width: 125px; }
.toast { position: fixed; top: 84px; right: 24px; z-index: 20; display: flex; align-items: center; gap: 14px; pointer-events: none; opacity: 0; transform: translateY(-8px); color: var(--ink); background: #1b3040; border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 14px; box-shadow: 0 12px 35px rgba(0,0,0,.35); transition: opacity .2s, transform .2s; font-size: 13px; }
.toast[hidden] { display: none; }
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast-action { border: 0; border-radius: 7px; padding: 5px 9px; color: var(--mint); background: rgba(116,231,194,.12); font-size: 12px; font-weight: 800; }
.toast-action:hover { background: rgba(116,231,194,.2); }
.undo-toast { top: 140px; z-index: 21; }
.undo-toast-action:disabled { opacity: .65; cursor: wait; }

@media (max-width: 1640px) {
  #gmail-view .table-scroll, #proxies-view .table-scroll { overflow: visible; }
  #gmail-view table, #proxies-view table { display: block; width: 100%; min-width: 0; }
  #gmail-view thead, #proxies-view thead { display: none; }
  #gmail-view tbody, #proxies-view tbody { display: grid; gap: 12px; padding: 12px; }
  #gmail-view tbody tr, #proxies-view tbody tr { display: block; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(8,16,27,.48); }
  #gmail-view tbody tr:hover, #proxies-view tbody tr:hover { background: rgba(8,16,27,.7); }
  #gmail-view td, #proxies-view td { position: static !important; z-index: auto !important; display: grid; grid-template-columns: minmax(120px, 22%) minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; padding: 10px 14px; border-top: 1px solid var(--line); white-space: normal; background: transparent !important; box-shadow: none !important; }
  #gmail-view td::before, #proxies-view td::before { content: attr(data-label); color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
  #gmail-view td[data-label="Account"] { display: block; padding: 14px; background: rgba(116,231,194,.045) !important; }
  #gmail-view td[data-label="Account"]::before { display: none; }
  .account-cell { min-width: 0; }
  .account-email { overflow-wrap: anywhere; }
  .secret-cell, .note-cell { min-width: 0; max-width: 100%; flex-wrap: wrap; gap: 4px; }
  .secret-value, .proxy-preview, .note-preview { max-width: 100%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
  .totp-stack { min-width: 0; }
  .status-select { width: auto; max-width: 100%; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { min-height: 100vh; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .topbar { padding: 0 16px; }
  .topbar-actions .live-chip, .topbar-actions #export-button { display: none; }
  .content-wrap { width: calc(100% - 28px); padding: 28px 0; }
  .page-heading { align-items: flex-start; gap: 18px; flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .proxy-section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stat-grid { gap: 8px; }
  .stat-card { min-height: 106px; padding: 13px; }
  .stat-card strong { font-size: 24px; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .filter-group select { flex: 1; min-width: 0; }
  #gmail-view td, #proxies-view td { grid-template-columns: minmax(92px, 28%) minmax(0, 1fr); padding: 10px 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: span 1; }
  .account-dialog form { padding: 18px; }
  .prompt-dialog-content, .prompt-dialog form { padding: 18px; }
  .toast { right: 12px; left: 12px; justify-content: space-between; max-width: calc(100% - 24px); }
}

/* Warm editorial theme inspired by the Aged Account Manager workspace. */
:root {
  color-scheme: light;
  --ink: #171512;
  --muted: #6f685e;
  --faint: #958b7d;
  --line: rgba(72, 61, 48, .14);
  --line-strong: rgba(72, 61, 48, .25);
  --panel: #fbf8f2;
  --panel-deep: #f2ede4;
  --canvas: #eee9e0;
  --mint: #98784f;
  --mint-deep: #73593b;
  --amber: #a96f2f;
  --danger: #a64338;
}

body { background: var(--canvas); color: var(--ink); }
.auth-shell { grid-template-columns: 1.12fr .88fr; gap: 28px; padding: 40px 24px 40px 16px; background: #f2eee6; }
.auth-card { grid-column: 2; grid-row: 1; align-self: stretch; width: auto; margin: 0; padding: clamp(46px, 7vw, 92px) clamp(34px, 5vw, 70px); border: 1px solid rgba(72,61,48,.08); border-radius: 34px; background: #fbf8f2; box-shadow: 0 18px 55px rgba(72,61,48,.07); }
.auth-aside { grid-column: 1; grid-row: 1; min-height: calc(100vh - 80px); border: 0; border-radius: 34px; background: linear-gradient(140deg, #ded6c8, #d3c9b8); box-shadow: inset 0 1px rgba(255,255,255,.45); }
.auth-aside::after { content: "PRIVATE / ENCRYPTED / SELF-HOSTED"; position: absolute; left: 48px; bottom: 35px; color: rgba(23,21,18,.55); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.aside-grid, .aside-orbit { display: none; }
.aside-content { justify-content: flex-start; max-width: 720px; margin: 0; padding: clamp(52px, 7vw, 96px) clamp(42px, 6vw, 72px); }
.aside-content h2 { max-width: 650px; font-size: clamp(48px, 6vw, 84px); line-height: .98; }
.feature-list { grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: auto; padding-top: 90px; }
.feature-list > div { display: block; padding-top: 18px; border-color: rgba(23,21,18,.15); }
.feature-list span, .feature-list strong, .feature-list small { display: block; }
.feature-list span { margin-bottom: 12px; color: var(--ink); }
.feature-list strong { margin-bottom: 7px; }
.brand-mark, .mini-mark { background: #a3845c; color: #fffaf2; box-shadow: 0 8px 22px rgba(115,89,59,.2); }
.eyebrow { color: #806342; }
label { color: #4e473f; text-transform: uppercase; letter-spacing: .11em; font-size: 10px; }
input, textarea, select { border-color: rgba(72,61,48,.17); background: #fffdfa; color: var(--ink); box-shadow: inset 0 1px 2px rgba(72,61,48,.03); }
input::placeholder, textarea::placeholder { color: #aaa093; }
input:focus, textarea:focus, select:focus { border-color: #a3845c; box-shadow: 0 0 0 3px rgba(152,120,79,.13); }
.primary-button { background: #9a7a52; color: #fffaf2; box-shadow: 0 9px 24px rgba(115,89,59,.16); }
.primary-button:hover { background: #856743; }
.secondary-button { color: var(--ink); background: #f6f1e8; border-color: rgba(72,61,48,.16); }
.ghost-button:hover, .icon-button:hover { background: rgba(72,61,48,.07); }
.auth-footnote, .security-note { color: #756d62; }
.status-dot { background: #9a7a52; box-shadow: 0 0 0 4px rgba(152,120,79,.12); }

.app-shell { background: var(--canvas); }
.topbar { background: rgba(251,248,242,.92); border-color: var(--line); box-shadow: 0 5px 24px rgba(72,61,48,.05); }
.live-chip { color: #73593b; background: rgba(152,120,79,.1); border-color: rgba(152,120,79,.2); }
.content-wrap { padding-top: 42px; }
.page-heading h1 { font-size: clamp(42px, 5vw, 66px); }
.view-tab:hover { background: rgba(152,120,79,.07); }
.view-tab.active { color: #73593b; border-color: var(--line); border-bottom-color: #9a7a52; background: rgba(152,120,79,.09); }
.stat-card { border-color: var(--line); background: #fbf8f2; box-shadow: 0 10px 26px rgba(72,61,48,.04); }
.accent-card { background: linear-gradient(145deg, #ddd2c1, #eee7dc); }
.accent-card strong { color: #73593b; }
.table-panel { border-color: var(--line); background: #fbf8f2; box-shadow: 0 14px 34px rgba(72,61,48,.05); }
.search-wrap input, .import-mapping-select { background: #fffdfa; }
th { color: #81786c; background: #f4efe7; }
tbody tr:hover { background: rgba(152,120,79,.055); }
.tag-chip, .status-active { color: #73593b; background: rgba(152,120,79,.12); }
.status-select option { color: var(--ink); background: #fffdfa; }
.cell-button:hover, .proxy-copy-menu button:hover, .proxy-copy-menu button:focus-visible { color: #73593b; background: rgba(152,120,79,.1); }
.proxy-copy-menu, .account-dialog { color: var(--ink); background: #fbf8f2; border-color: var(--line-strong); box-shadow: 0 26px 80px rgba(72,61,48,.24); }
.account-dialog::backdrop { background: rgba(52,45,37,.42); backdrop-filter: blur(5px); }
.audit-entry { background: #f6f1e8; }
.inline-action { background: #e4dacb; color: #73593b; }
.toast { color: var(--ink); background: #fbf8f2; box-shadow: 0 12px 35px rgba(72,61,48,.18); }
.toast-action { color: #73593b; background: rgba(152,120,79,.12); }
.toast-action:hover { background: rgba(152,120,79,.2); }

@media (max-width: 1640px) {
  #gmail-view tbody tr, #proxies-view tbody tr { background: #fffdfa; }
  #gmail-view tbody tr:hover, #proxies-view tbody tr:hover { background: #f7f1e8; }
  #gmail-view td[data-label="Account"] { background: rgba(152,120,79,.07) !important; }
}

@media (max-width: 900px) {
  .auth-shell { display: block; padding: 16px; }
  .auth-card { min-height: calc(100vh - 32px); padding: 42px 28px; border-radius: 26px; }
  .auth-aside { display: none; }
}

/* Status colors stay visible on the native selector and update immediately. */
.status-select { border-width: 1px; border-style: solid; transition: color .18s, background .18s, border-color .18s, box-shadow .18s; }
.status-select.status-active, .status-badge.status-active { color: #236b45; background: #e6f3ea; border-color: #acd6bb; }
.status-select.status-wasted, .status-badge.status-wasted { color: #a33d36; background: #f8e5e2; border-color: #e5b7b1; }
.status-select.status-needs-update, .status-badge.status-needs-update { color: #896516; background: #fbf1cd; border-color: #e4cf89; }
.status-select.status-locked, .status-badge.status-locked { color: #67499c; background: #eee8f7; border-color: #cdbfe4; }
.status-select.status-suspended, .status-badge.status-suspended { color: #a55320; background: #fae8d8; border-color: #e9be9d; }
.status-select.status-review-required, .status-badge.status-review-required { color: #875b17; background: #f5ead3; border-color: #dfc48d; }
.status-select:focus { box-shadow: 0 0 0 3px rgba(152,120,79,.13); }
.status-select option { color: var(--ink); background: #fffdfa; }


/* Trusted-device PIN unlock */
.device-pin-unlock { margin-top: 22px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.compact-stack { margin-top: 16px; gap: 12px; }
.forget-device-button { width: 100%; margin-top: 4px; font-size: 11px; }
#device-pin-dialog label + label { margin-top: 14px; }
