:root {
  --ink: #172126;
  --muted: #68757c;
  --line: #dfe7e5;
  --canvas: #f3f7f6;
  --surface: #ffffff;
  --navy: #173943;
  --teal: #147c76;
  --teal-soft: #e2f3f0;
  --red: #c84343;
  --red-soft: #fce9e8;
  --amber: #b66a13;
  --amber-soft: #fff1d8;
  --shadow: 0 18px 48px rgba(21, 57, 67, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; color: #eaf4f2; background: linear-gradient(180deg, #173b43 0%, #102f36 100%); display: flex; flex-direction: column; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; margin: 0 8px 38px; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #12353d; background: #8fddd2; box-shadow: inset 0 0 0 5px rgba(255,255,255,.22); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { color: #9ec1bd; margin-top: 2px; font-size: 11px; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 11px 13px; color: #b9ceca; border-radius: 11px; text-decoration: none; font-size: 13px; font-weight: 600; }
.sidebar nav a span { width: 20px; text-align: center; font-size: 15px; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.privacy-note { margin-top: auto; padding: 15px; display: flex; gap: 10px; border: 1px solid rgba(157,220,211,.19); border-radius: 13px; background: rgba(7, 32, 38, .3); }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note strong { font-size: 11px; color: #d9ebe8; }
.privacy-note small { margin-top: 4px; color: #90ada9; font-size: 10px; line-height: 1.45; }
.privacy-icon { color: #70d5c8; }
.sidebar-foot { padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.environment { display: flex; align-items: center; gap: 8px; }
.environment i { width: 8px; height: 8px; background: #68d4ae; border-radius: 50%; box-shadow: 0 0 0 4px rgba(104,212,174,.12); }
.environment small, .environment strong { display: block; }
.environment small { color: #759b96; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.environment strong { font-size: 10px; color: #d3e4e1; margin-top: 2px; }
.ghost-button { color: #9fb9b5; border: 0; background: transparent; font-size: 11px; cursor: pointer; }
.topbar { min-height: 110px; padding: 27px 34px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.7); backdrop-filter: blur(12px); }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.topbar h1 { margin: 8px 0 0; font-family: Georgia, serif; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.status-pills { display: flex; align-items: center; gap: 10px; }
.status-pill { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #9ba9a7; }
.status-pill.ok i { background: #24a57e; }.status-pill.warning i { background: #e29932; }
.user-pill { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--navy); border-radius: 50%; font-weight: 800; font-size: 12px; }
.user-name { color: var(--muted); font-size: 10px; font-weight: 700; }
.page-content { padding: 26px 34px 40px; max-width: 1700px; margin: 0 auto; }
.page-alert { margin-bottom: 12px; padding: 11px 14px; border-radius: 10px; font-size: 11px; font-weight: 700; }.page-alert.success { color: #23684f; background: #e4f5eb; }.page-alert.error { color: #913535; background: var(--red-soft); }
.mailbox-strip { margin-bottom: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mailbox-heading strong, .mailbox-heading small { display: block; }.mailbox-heading strong { margin-top: 4px; font-size: 12px; }.mailbox-heading small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.mailbox-cards { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }.mailbox-card, .connect-card { min-height: 48px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fafcfc; text-decoration: none; }.mailbox-card strong, .mailbox-card small, .mailbox-card em { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.mailbox-card strong, .connect-card strong { font-size: 9px; }.mailbox-card small { margin-top: 2px; color: var(--muted); font-size: 8px; }.mailbox-card em { margin-top: 2px; color: var(--red); font-size: 7px; font-style: normal; }.mailbox-card.inactive, .connect-card.disabled { opacity: .55; }.connect-card:not(.disabled):hover { border-color: #72bcb3; background: var(--teal-soft); }.provider-logo { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: white; font-size: 10px; font-weight: 900; }.provider-logo.google { background: #d94b3d; }.provider-logo.microsoft { background: #2877c7; }.disconnect-button { margin-left: 4px; padding: 4px 6px; border: 0; border-radius: 7px; color: #8c4a4a; background: var(--red-soft); font-size: 7px; cursor: pointer; }
.account-setup { margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }.setup-intro strong, .setup-intro small { display: block; }.setup-intro strong { margin-top: 4px; font-size: 12px; }.setup-intro small { margin-top: 3px; color: var(--muted); font-size: 9px; }.setup-providers { margin-top: 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.provider-setup { border: 1px solid var(--line); border-radius: 12px; background: #fafcfc; overflow: hidden; }.provider-setup summary { padding: 11px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; align-items: center; cursor: pointer; list-style: none; }.provider-setup summary::-webkit-details-marker { display: none; }.provider-setup summary strong, .provider-setup summary small { display: block; }.provider-setup summary strong { font-size: 10px; }.provider-setup summary small { margin-top: 2px; color: var(--muted); font-size: 8px; }.provider-setup summary b { color: var(--teal); font-size: 8px; text-transform: uppercase; }.setup-body { padding: 0 13px 13px; border-top: 1px solid var(--line); }.setup-body ol { margin: 12px 0; padding-left: 18px; color: #526160; font-size: 9px; line-height: 1.55; }.setup-body li + li { margin-top: 5px; }.setup-body a { color: var(--teal); }.setup-body code { display: block; margin-top: 4px; padding: 7px; overflow-wrap: anywhere; color: #274a50; background: #eaf3f1; border-radius: 6px; font-size: 8px; }.oauth-form { display: grid; gap: 8px; }.oauth-form label { color: #526160; font-size: 9px; font-weight: 700; }.oauth-form input { width: 100%; height: 36px; margin-top: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 9px; }.oauth-form .primary-button { margin-top: 2px; font-size: 9px; }
.provider-warning { margin: 12px 0 0; padding: 9px 10px; color: #8b5314; background: var(--amber-soft); border-radius: 8px; font-size: 9px; line-height: 1.45; }
.hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { padding: 18px 20px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 18px rgba(18,57,67,.035); }
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #8bb9b3; }
.metric-card.critical::before { background: var(--red); }.metric-card.high::before { background: var(--amber); }
.metric-card span, .metric-card small { display: block; }.metric-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { display: block; margin: 8px 0 4px; font-family: Georgia, serif; font-size: 31px; font-weight: 600; }
.metric-card small { color: #94a09f; font-size: 10px; }
.topic-strip { margin: 14px 0; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f9fbfa; }
.topic-strip > div > strong { display: block; margin-top: 4px; font-size: 12px; }
.topic-chips { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.topic-chip { padding: 7px 10px; color: #4d6063; background: #eef4f2; border-radius: 18px; text-decoration: none; font-size: 10px; font-weight: 700; }
.topic-chip span { padding-left: 5px; color: var(--teal); }.topic-chip.selected { color: white; background: var(--teal); }.topic-chip.selected span { color: white; }
.workspace-grid { display: grid; grid-template-columns: minmax(540px, 1.12fr) minmax(410px, .88fr); gap: 14px; align-items: start; }
.inbox-panel, .reader-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel-header { padding: 19px 20px 13px; display: flex; align-items: center; justify-content: space-between; }
.panel-header h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 20px; font-weight: 600; }
.secondary-button, .filter-button, .primary-button { border: 0; border-radius: 9px; cursor: pointer; font-weight: 800; }
.secondary-button { padding: 9px 12px; color: var(--teal); background: var(--teal-soft); font-size: 10px; }
button:disabled { opacity: .55; cursor: wait; }
.filters { padding: 0 20px 14px; display: grid; grid-template-columns: minmax(125px, 1fr) minmax(90px, .6fr) minmax(86px, .55fr) minmax(95px, .65fr) auto auto; gap: 7px; }
.filters input, .filters select { min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 9px; color: #4d5d60; background: #fbfcfc; font-size: 10px; outline: none; }
.filters select { padding: 0 9px; }.search-field { position: relative; }.search-field span { position: absolute; left: 11px; top: 8px; color: #82908f; }.search-field input { width: 100%; padding: 0 10px 0 29px; }
.filters input:focus, .filters select:focus, textarea:focus, .reply-box input:focus { border-color: #4ea69d; box-shadow: 0 0 0 3px rgba(78,166,157,.12); }
.filter-button { padding: 0 12px; color: white; background: var(--navy); font-size: 10px; }.clear-filter { align-self: center; color: var(--muted); font-size: 10px; }
.email-list { border-top: 1px solid var(--line); }
.email-row { width: 100%; min-height: 119px; padding: 15px 16px 14px 18px; position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 14px; gap: 12px; text-align: left; border: 0; border-bottom: 1px solid #edf1f0; background: white; cursor: pointer; }
.email-row:hover, .email-row.active { background: #f5faf8; }.email-row.active { box-shadow: inset 3px 0 var(--teal); }
.priority-rail { position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 4px 4px 0; background: #92aaa7; }.priority-rail.critical { background: var(--red); }.priority-rail.high { background: var(--amber); }.priority-rail.low { background: #a8b7b5; }
.sender-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--teal); background: var(--teal-soft); font-weight: 800; font-size: 12px; }
.email-main { min-width: 0; }.email-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.email-meta strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.email-meta time { color: #8b9998; font-size: 9px; white-space: nowrap; }
.email-subject { margin-top: 4px; display: block; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.unread-dot { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--teal); }
.email-preview { margin-top: 4px; display: block; color: var(--muted); font-size: 10px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-tags { margin-top: 8px; display: flex; gap: 5px; }.tag { padding: 4px 7px; display: inline-block; color: #667572; background: #eff3f2; border-radius: 12px; font-style: normal; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }.tag.critical { color: var(--red); background: var(--red-soft); }.tag.high { color: var(--amber); background: var(--amber-soft); }.tag.medium { color: var(--teal); background: var(--teal-soft); }.tag.topic { color: #56658d; background: #edf0fa; }.tag.replied { color: #3c7d61; background: #e6f5ec; }.row-arrow { align-self: center; color: #9aa7a5; font-size: 22px; }
.tag.provider { color: #3a648c; background: #e8f1fa; }
.empty-state, .reader-empty { min-height: 380px; display: grid; align-content: center; justify-items: center; padding: 40px; text-align: center; color: var(--muted); }.empty-state > span, .reader-empty > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--teal); background: var(--teal-soft); font-size: 22px; }.empty-state h3, .reader-empty h2 { margin: 15px 0 5px; color: var(--ink); font-family: Georgia, serif; }.empty-state p, .reader-empty p { max-width: 300px; margin: 0; font-size: 11px; line-height: 1.6; }
.reader-panel { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto; }
.reader-content { padding: 22px; }.reader-head { display: flex; justify-content: space-between; }.reader-labels { display: flex; gap: 6px; }.icon-close { width: 28px; height: 28px; border: 0; border-radius: 50%; color: #788583; background: #f0f4f3; cursor: pointer; }
.reader-content > h2 { margin: 13px 0 15px; font-family: Georgia, serif; font-size: 21px; line-height: 1.25; }
.sender-card { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; }.sender-card strong, .sender-card small { display: block; }.sender-card strong { font-size: 11px; }.sender-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }.sender-card time { color: #8b9998; font-size: 9px; }
.priority-explanation { margin: 15px 0; padding: 10px 12px; border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0; background: #f3f8f7; }.priority-explanation strong, .priority-explanation span { display: block; }.priority-explanation strong { color: var(--teal); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }.priority-explanation span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.message-body { max-height: 260px; padding: 15px 4px; overflow-y: auto; color: #3f4b4d; font-family: Georgia, serif; font-size: 12px; line-height: 1.75; white-space: pre-wrap; border-top: 1px solid #edf1f0; border-bottom: 1px solid #edf1f0; }
.reply-box { margin-top: 18px; padding: 16px; border: 1px solid #cce4df; border-radius: 13px; background: linear-gradient(145deg, #f4fbf9, #eef8f5); }.reply-title { display: flex; justify-content: space-between; align-items: center; }.reply-title strong { font-size: 11px; }.sparkle { margin-right: 6px; color: var(--teal); }.local-badge { padding: 4px 7px; color: var(--teal); background: white; border-radius: 9px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.reply-box label { margin-top: 12px; display: block; color: #526160; font-size: 9px; font-weight: 700; }.reply-box label small { color: #91a09e; font-weight: 400; }.reply-box input[type="text"], .reply-box input:not([type]), .reply-box textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #cbdedb; border-radius: 9px; outline: none; color: var(--ink); background: white; font-size: 10px; }.reply-box textarea { resize: vertical; line-height: 1.55; }
.ai-button, .send-button { width: 100%; margin-top: 10px; padding: 10px; border: 0; border-radius: 9px; color: white; background: var(--teal); font-size: 10px; font-weight: 800; cursor: pointer; }.send-button { background: var(--navy); }.confirm-row { display: flex !important; align-items: center; gap: 7px; line-height: 1.35; }.confirm-row input { width: auto; margin: 0; }.send-guard { margin: 8px 0 0; color: #82918f; text-align: center; font-size: 8px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: 420px; padding: 13px 16px; color: white; background: var(--navy); border-radius: 10px; box-shadow: var(--shadow); font-size: 11px; }.toast.error { background: #9f3030; }.toast.success { background: #247b62; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #dff1ed, transparent 35%), #f2f6f5; }.login-card { width: min(410px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }.login-mark { margin-bottom: 22px; }.login-card h1 { margin: 8px 0; font-family: Georgia, serif; font-size: 29px; }.login-card > p { margin: 0 0 24px; color: var(--muted); font-size: 12px; }.login-card label { margin-top: 13px; display: block; font-size: 10px; font-weight: 700; }.login-card input { width: 100%; height: 42px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; }.primary-button { padding: 12px; color: white; background: var(--navy); }.full { width: 100%; margin-top: 18px; }.form-error { padding: 10px; color: #983232; background: var(--red-soft); border-radius: 8px; font-size: 10px; }.login-foot { margin-top: 22px; display: block; color: #8a9997; text-align: center; font-size: 9px; }
@media (max-width: 1120px) { .workspace-grid { grid-template-columns: 1fr; }.reader-panel { position: static; max-height: none; }.filters { grid-template-columns: minmax(180px,1fr) 130px 120px 150px auto; }.clear-filter { grid-column: 1 / -1; }.hero-grid { grid-template-columns: repeat(2,1fr); }.mailbox-strip { align-items: flex-start; flex-direction: column; }.mailbox-cards { justify-content: flex-start; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { position: static; width: 100%; height: auto; padding: 18px; }.brand { margin: 0 0 16px; }.sidebar nav { grid-template-columns: repeat(4,1fr); }.sidebar nav a { padding: 9px 5px; justify-content: center; font-size: 0; }.sidebar nav a span { font-size: 15px; }.privacy-note { display: none; }.sidebar-foot { display: none; }.topbar { min-height: 86px; padding: 20px; }.topbar h1 { font-size: 20px; }.status-pill, .user-name { display: none; }.page-content { padding: 16px; }.hero-grid { gap: 8px; }.metric-card { padding: 14px; }.metric-card strong { font-size: 25px; }.topic-strip { align-items: flex-start; flex-direction: column; }.topic-chips { justify-content: flex-start; }.mailbox-cards { width: 100%; display: grid; grid-template-columns: 1fr; }.mailbox-card, .connect-card { width: 100%; }.setup-providers { grid-template-columns: 1fr; }.filters { grid-template-columns: 1fr 1fr; }.search-field { grid-column: 1 / -1; }.filter-button { min-height: 36px; }.clear-filter { align-self: center; }.workspace-grid { display: block; }.reader-panel { margin-top: 14px; }.email-row { grid-template-columns: 34px minmax(0,1fr) 10px; gap: 9px; }.sender-avatar { width: 34px; height: 34px; }.panel-header { padding: 16px; }.sender-card { grid-template-columns: 34px 1fr; }.sender-card time { grid-column: 2; }.reader-content { padding: 17px; } }
