:root {
  --ink: #17272b;
  --muted: #67777a;
  --paper: #fffdf8;
  --surface: #f3f5f3;
  --line: #dce3df;
  --brand: #173b42;
  --brand-soft: #dcebea;
  --coral: #d66c45;
  --amber: #dfaa43;
  --sage: #6e8f7a;
  --shadow: 0 18px 50px rgba(24, 49, 54, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 8% 0%, #e6efeb 0, transparent 28%), var(--surface); }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(214, 108, 69, .35); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.environment-banner { height: 26px; background: #a71d2a; color: white; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .18em; line-height: 26px; }
.topbar { height: 76px; display: grid; grid-template-columns: 260px minmax(240px, 660px) 1fr; align-items: center; gap: 24px; padding: 0 24px; background: rgba(255,253,248,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { border-radius: 11px; box-shadow: 0 7px 16px rgba(23,59,66,.18); }
.brand span { display: grid; }
.brand strong { letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; }
.search input { width: 100%; border: 1px solid transparent; border-radius: 12px; background: #e9efec; padding: 12px 16px; color: var(--ink); transition: .18s ease; }
.search input:focus { background: white; border-color: var(--sage); box-shadow: 0 6px 20px rgba(23,59,66,.08); }
.top-actions { justify-self: end; display: flex; gap: 12px; align-items: center; }
.icon-button { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.avatar { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--brand); color: white; font-weight: 700; }
.workspace { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 250px minmax(330px, 430px) minmax(420px, 1fr); }
.non-production .workspace { min-height: calc(100vh - 102px); }
.rail { padding: 22px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.compose { width: 100%; border: 0; border-radius: 14px; padding: 13px 16px; text-align: left; color: white; background: var(--brand); box-shadow: 0 8px 22px rgba(23,59,66,.20); opacity: .72; }
.compose span { font-size: 20px; margin-right: 8px; }
.view-switcher, .rail-section { display: grid; gap: 5px; }
.nav-item, .filter-item { border: 0; background: transparent; border-radius: 10px; padding: 10px 12px; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.nav-item span { width: 20px; color: var(--muted); }
.nav-item b { margin-left: auto; background: var(--coral); color: white; min-width: 23px; border-radius: 12px; text-align: center; font-size: 11px; padding: 3px 6px; }
.nav-item.active, .filter-item.active, .nav-item:hover, .filter-item:hover { background: var(--brand-soft); color: var(--brand); }
.eyebrow { margin: 0 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 10px; }
.rail-section .eyebrow { padding: 8px 12px 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.coral { background: var(--coral); }.dot.amber { background: var(--amber); }.dot.sage { background: var(--sage); }
.integration { display: grid; grid-template-columns: 25px 1fr 10px; align-items: center; gap: 8px; padding: 7px 12px; font-size: 13px; }
.status { width: 8px; height: 8px; border-radius: 50%; background: #b6c0bc; }
.status.available { background: var(--sage); }.status.planned { background: var(--amber); }.status.decision, .status.review { background: #b6c0bc; }
.channel-mark { width: 27px; height: 27px; border-radius: 9px; display: inline-grid; place-items: center; flex: 0 0 auto; font-size: 11px; font-style: normal; font-weight: 850; }
.channel-mark.email { background: #dcebea; color: #174b57; }.channel-mark.whatsapp { background: #dceee2; color: #226c41; }.channel-mark.sms { background: #fae8cd; color: #8c5c16; }.channel-mark.signal { background: #e4e3f6; color: #554c9b; }
.safe-mode { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 10px 4px; display: flex; gap: 9px; color: var(--sage); }
.safe-mode div { display: grid; }.safe-mode strong { font-size: 12px; }.safe-mode small { color: var(--muted); font-size: 10px; }
.message-column { background: rgba(255,255,255,.64); border-right: 1px solid var(--line); min-width: 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 25px 22px 14px; }
.section-header h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 500; letter-spacing: -.035em; }
.channel-pills { display: flex; gap: 7px; padding: 0 18px 16px; overflow-x: auto; }
.pill { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; background: var(--paper); font-size: 12px; cursor: pointer; }
.pill.active { background: var(--brand); border-color: var(--brand); color: white; }
.message-list { border-top: 1px solid var(--line); }
.group-heading { display: flex; justify-content: space-between; padding: 13px 20px 8px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.group-heading b { font-size: 10px; }
.message-card { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 17px 18px; display: flex; gap: 12px; text-align: left; cursor: pointer; transition: .14s ease; }
.message-card:hover { background: rgba(255,255,255,.82); }.message-card.selected { background: var(--paper); box-shadow: inset 3px 0 var(--coral); }
.message-content { min-width: 0; flex: 1; display: grid; gap: 5px; }
.message-line { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.message-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }.message-line time { flex: none; font-size: 10px; color: var(--muted); }
.message-card:not(.unread) .message-line strong { font-weight: 550; }.message-card.unread .message-line strong::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); margin-left: 7px; vertical-align: 2px; }
.subject { font-size: 13px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.preview { color: var(--muted); font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.message-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 3px; }.message-meta em, .message-meta small { font-style: normal; border-radius: 6px; padding: 3px 6px; background: #edf1ef; color: var(--muted); font-size: 9px; }.message-meta em { color: var(--brand); background: var(--brand-soft); }
.reading-pane { background: var(--paper); min-width: 0; overflow: auto; }
.reading-empty { min-height: 70vh; display: grid; place-content: center; text-align: center; color: var(--muted); padding: 40px; }.reading-empty h2 { color: var(--ink); font-family: Georgia, serif; font-weight: 500; margin-bottom: 4px; }.reading-empty p { margin: 0; }.empty-mark { font-size: 35px; color: var(--coral); }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; border-bottom: 1px solid var(--line); }.toolbar-actions { display: flex; gap: 8px; }.toolbar-actions button, .ai-actions button { border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: white; }.toolbar-actions button:disabled { color: #98a4a2; }.read-only-tag { padding: 5px 8px; border-radius: 6px; background: #edf1ef; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.message-header { padding: 32px 7vw 20px; }.message-kicker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }.message-header h2 { max-width: 760px; margin: 15px 0 22px; font-family: Georgia, serif; font-size: clamp(27px, 3vw, 42px); line-height: 1.1; font-weight: 500; letter-spacing: -.035em; }.sender { display: flex; align-items: center; gap: 11px; }.sender-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 750; }.sender div { display: grid; }.sender small { color: var(--muted); }.sender time { margin-left: auto; color: var(--muted); font-size: 12px; }
.message-body { max-width: 780px; padding: 22px 7vw 36px; line-height: 1.75; font-family: Georgia, serif; font-size: 17px; }
.ai-card { margin: 0 7vw 50px; max-width: 780px; border: 1px solid #cbdcd7; border-radius: 16px; padding: 20px; background: linear-gradient(135deg, #f1f7f4, #fffdf8); box-shadow: var(--shadow); }.ai-title { display: flex; align-items: center; gap: 10px; }.ai-title > span { color: var(--coral); font-size: 22px; }.ai-title div { display: grid; }.ai-title small { color: var(--muted); }.ai-card p { line-height: 1.55; }.suggestion { border-left: 3px solid var(--coral); padding: 10px 12px; background: rgba(255,255,255,.72); }.suggestion span { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 850; margin-bottom: 4px; }.ai-actions { display: flex; gap: 8px; margin-top: 15px; }.ai-actions button { cursor: pointer; }.ai-actions button:first-child { background: var(--brand); border-color: var(--brand); color: white; }.draft { margin-top: 14px; padding: 14px; border-radius: 10px; background: white; border: 1px solid var(--line); }.draft p { font-family: Georgia, serif; }.draft small { color: var(--coral); }
.reply-label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.draft textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 12px; line-height: 1.5; }.reply-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }.reply-actions button { border: 0; border-radius: 9px; padding: 9px 12px; background: var(--brand); color: white; cursor: pointer; }.reply-actions small { color: var(--muted); }
.empty-state, .load-error { padding: 50px 20px; text-align: center; color: var(--muted); display: grid; gap: 5px; }
@media (max-width: 1120px) { .workspace { grid-template-columns: 210px 360px minmax(360px, 1fr); }.topbar { grid-template-columns: 210px minmax(220px, 1fr) auto; }.integration-section { display: none; } }
@media (max-width: 900px) { .topbar { grid-template-columns: auto 1fr auto; padding: 0 14px; gap: 12px; }.brand small { display: none; }.workspace { grid-template-columns: 84px minmax(270px, 1fr); }.rail { padding: 16px 10px; }.compose { text-align: center; padding: 11px 5px; font-size: 0; }.compose span { margin: 0; font-size: 21px; }.nav-item { justify-content: center; font-size: 0; }.nav-item span { width: auto; font-size: 20px; }.nav-item b { position: absolute; margin: -24px 0 0 25px; font-size: 9px; }.rail-section, .safe-mode { display: none; }.reading-pane { grid-column: 2; min-height: 75vh; border-top: 8px solid var(--surface); } }
@media (max-width: 620px) { .topbar { height: auto; min-height: 70px; grid-template-columns: 1fr auto; padding: 11px 12px; }.search { grid-column: 1 / -1; grid-row: 2; padding-bottom: 4px; }.workspace { min-height: calc(100vh - 128px); display: block; }.non-production .workspace { min-height: calc(100vh - 154px); }.rail { display: flex; flex-direction: row; position: sticky; top: 0; z-index: 5; padding: 8px; background: var(--paper); border: 0; border-bottom: 1px solid var(--line); }.compose { width: 45px; }.view-switcher { display: flex; flex: 1; justify-content: space-around; }.nav-item { padding: 8px 10px; }.message-column { border-right: 0; }.reading-pane { min-height: 90vh; }.reader-toolbar { padding: 12px 16px; overflow-x: auto; }.message-header { padding: 25px 20px 16px; }.message-body { padding: 18px 20px 30px; }.ai-card { margin: 0 20px 35px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

