/* Shared palette and surfaces for the team's daily workspace. */
:root {
  --ground: #f5f4ef;
  --surface: #fffefa;
  --ink: #203b34;
  --ink-2: #5c6b64;
  --ink-3: #738078;
  --line: #e5e5dc;
  --line-strong: #cdd4c9;
  --accent: #275c4c;
  --accent-tint: #edf3ed;
  --support: #27755b;
  --ok: #27755b;
  --admin: #5c6384;
  --signal: #b34448;
  --signal-tint: #fcf0ee;
  --other: #986b27;
  --gold: #bfa166;
  --shadow: 0 4px 18px #263b2f04, 0 1px 2px #263b2f04;
}
:focus-visible { outline-color: #b09359; }
* { scrollbar-color: #cbd2c7 transparent; }
.btn { border-radius: 8px; box-shadow: 0 2px 3px #234b3510; transition: background .15s, border-color .15s; }
.btn:hover { background: #1c473a; border-color: #1c473a; }
.btn-quiet { background: var(--surface); box-shadow: none; }
.btn-quiet:hover { background: #edf1e9; color: var(--ink); border-color: #aebcab; }
.btn-danger:hover { color: var(--signal); background: var(--signal-tint); border-color: #dca8a3; }
.btn-danger-solid:hover { background: #95383e; border-color: #95383e; }
input, textarea, select { background: var(--surface); border-radius: 8px; }
input:hover, textarea:hover, select:hover { border-color: #aebcab; }
.tabs { background: #eeefe8; }
.tabs button[aria-selected="true"], .tabs button[aria-pressed="true"] { background: var(--surface); }
.sidebar { background: #183c32; color: #d8e1d6; border-right: 1px solid #2d4e43; }
.brand { font-size: 16px; letter-spacing: -.045em; }
.brand-mark { color: #183c32; background: #dcc794; border: 1px solid #e6d6af; border-radius: 10px; }
.brand small { color: #c9c8af; letter-spacing: .19em; }
.nav-caption { color: #aabdae; letter-spacing: .2em; }
.nav a { color: #c4d2c6; border-radius: 8px; }
.nav a:hover { background: #22483c; color: #fffdf4; }
.nav a[aria-current="page"] { background: #2d5345; border-color: #466654; color: #fffbeb; box-shadow: none; }
.nav a[aria-current="page"] > [data-icon] { color: #e1ca91; }
.nav a[aria-current="page"]::before { background: #d7bd7e; }
.sidebar-footer { border-top: 1px solid #43625377; margin-top: auto; padding-top: 20px; color: #a9bcae; }
.sidebar-footer b { color: #d7dfce; }
.sidebar-footer > [data-icon] { color: #cfb982; }
.top { background: #fffefa; border-bottom-color: #dedfd4; }
.connection-status { padding: 6px 9px; border: 1px solid var(--line); border-radius: 20px; background: #f7f8f2; }
.me-avatar { color: #365b44; background: #e7ecdF; }
.presence .avatar { background: #e5eddf; color: #345441; }
.view { background: var(--ground); }
.page-head { padding-bottom: 22px; border-bottom: 1px solid #dedfd4; margin-bottom: 24px; }
.page-heading .eyebrow { color: #8d743f; letter-spacing: .2em; }
.page-heading h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 34px; font-weight: 500; letter-spacing: -.04em; }
.page-description { line-height: 1.7; }
.tile, .table-card, .chart, .settings-card { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); border-radius: 12px; }
.tile { border-top: 2px solid #d5c399; padding: 21px; }
.tile-value { font-size: 34px; font-weight: 600; }
.tile-icon { border-radius: 50%; }
.tile:not(.tone-rose):not(.tone-amber):not(.tone-blue):not(.tone-teal) { --tone: #426343; --tint: #eaf0e4; }
.table thead, .table th { background: #f3f4ec; }
.table tbody tr:hover { background: #f2f5ed; }
.table-heading { border-bottom-color: var(--line); }
.trend-area { fill: #396a4710; }
.trend-line.series-0, .trend-point.series-0 { stroke: #36694e; }
.trend-point.series-0 { fill: #fffefa; }
.trend-line.series-1, .trend-point.series-1 { stroke: #b3904e; }
.empty-icon, .settings-icon, .login-symbol { color: #627448; background: #ecf0e2; border-color: #dde4cf; }
.empty-state > strong { color: var(--ink); }
.inbox { border-color: var(--line); }
.rail { background: #eff1e9; border-color: var(--line); }
.rail-item:hover { background: #e8ece0; }
.rail-item[aria-pressed="true"] { background: #e2eadc; border-color: #c9d4bc; color: #284a35; }
.rail-title { color: #435944; }
.list-pane, .list-head { background: var(--surface); }
.convs .section { background: #f4f5ee; color: #657560; letter-spacing: .02em; }
.conv:hover { background: #f4f6ef; }
.conv[aria-selected="true"] { background: #ecf1e5; border-left-color: #8c9e66; }
.conv[aria-selected="true"]::before { background: #8c9e66; }
.count-badge { background: #eaf0e2; color: #466341; }
.thread-pane { background: #f6f5ef; }
.thread-head { background: var(--surface); padding-block: 19px; }
.thread-where { font-size: 11px; color: #677760; }
.msgs { background: #f6f5ef; }
.bubble { border-color: #e1e3d8; background: var(--surface); border-radius: 13px 13px 13px 4px; box-shadow: 0 2px 4px #1f3b2304; }
.bubble.agent { color: #294735; border-color: #d5dec7; background: #eaf0df; border-radius: 13px 13px 4px 13px; }
.bubble.agent .bubble-meta { color: #5c7252; }
.bubble-meta { font-size: 10px; }
.bubble.failed { background: var(--signal-tint); border-color: #e6bab6; }
.thread-context, .sys.reopening { background: #f6f1e4; border-color: #e4d8b9; }
.thread-context strong, .reopening-label { color: #795d2b; }
.message-quote { border-left-color: #b99a5c; background: #5f6c4609; }
.message-quote strong { color: #526343; }
.composer, .composer-note, .composer-error, .composer-reply { background: var(--surface); }
.composer textarea { background: #f8f9f2; }
.reply-target-text { border-left-color: #b49b63; }
.reopen-dialog { background: var(--surface); }
.reopen-dialog::backdrop { background: #142c246b; backdrop-filter: blur(3px); }
.a-composer, .a-preview, .a-detail, .a-stop-confirmation { border-radius: 12px; }
.a-composer { border-top-color: #bba16a; }
.a-preview { border-color: #c9bc95; background: #fcfaf1; }
.a-kicker { color: #8a6b35; }
.a-message { background: #f7f7f0; border-radius: 8px; }
.a-result-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.a-result-tools > * { flex: 1 1 160px; width: 100%; }
.a-delivery-summary { margin-top: 7px; min-width: 110px; }
.a-attention { padding: 12px; background: #faf1db; border: 1px solid #ecdeb9; border-radius: 8px; font-size: 12px; color: #7c5a25; }
.a-run-history { border-top: 1px solid var(--line); padding-top: 12px; }
.a-run-history summary { cursor: pointer; color: var(--ink-2); font-size: 12px; font-weight: 600; padding-bottom: 10px; }
.cash .cash-schedule { display: block; padding: 13px 16px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; background: var(--surface); }
.cash-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.cash-summary-card { display: grid; gap: 9px; padding: 20px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.cash-summary-card > span { color: var(--ink-2); font-size: 12px; }
.cash-summary-card > strong { font-size: 32px; line-height: 1.1; font-weight: 600; }
.cash-summary-card > small { color: var(--ink-3); font-size: 11px; }
.cash-summary-card[data-state="fresh"] > strong { color: #32714d; }
.cash-summary-card[data-state="stale"] > strong { color: #946a2d; }
.cash-summary-card[aria-pressed="true"] { border-color: #879b6d; background: #f1f5e9; }
.cash-summary-card:hover { border-color: #b7c5a7; }
.cash .cash-table-scroll { border-radius: 12px; margin-top: 9px; }
.cash .cash-table { font-size: 13px; }
.cash .cash-table caption { padding: 17px 18px; border-bottom: 1px solid var(--line); }
.cash .cash-table th, .cash .cash-table td { padding: 15px 18px; border-right: 0; }
.cash .cash-table th { background: #f1f3e9; }
.cash .cash-table tbody tr:nth-child(even) { background: #fafaf4; }
.cash .cash-table td.cash-amount { font-size: 16px; font-weight: 600; letter-spacing: -.025em; }
.cash .cash-table th:nth-child(3) { text-align: right; }
.cash .cash-badge { margin-top: 5px; padding: 3px 7px; font-size: 11px; border-radius: 5px; }
.cash .cash-check { flex-direction: row; }
.cash .cash-group-history { font: inherit; color: var(--ink); display: inline; text-align: left; padding: 0; border: 0; min-height: 32px; background: transparent; box-shadow: none; white-space: normal; overflow-wrap: anywhere; }
.cash .cash-group-history:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.cash-history { padding: 22px; border: 1px solid #d9dfce; border-radius: 12px; background: var(--surface); margin-top: 20px; scroll-margin-top: 20px; }
.cash-history-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; }
.cash-history-list { max-height: 400px; overflow-y: auto; margin: 12px 0; }
.cash-history-list article { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.cash-history-list article > div { display: grid; gap: 5px; min-width: 0; }
.cash-history-list article strong { overflow-wrap: anywhere; }
.cash-history-list time, .cash-history-list small { color: var(--ink-2); font-size: 12px; }
.cash-history-amount { flex: none; font-size: 16px; font-variant-numeric: tabular-nums; }
.login-story { background: #183c32; }
.login-story::before { background: radial-gradient(ellipse at 100% 0%, #78956022, transparent 60%); }
.login-intro > .eyebrow { color: #cbb780; }
.login-intro h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(40px, 4.3vw, 65px); font-weight: 400; letter-spacing: -.045em; }
.login-intro h1 em { color: #dbc797; }
.login-intro > p, .illustration-card div > span { color: #b8c9b8; }
.illustration-card { border-color: #57735c55; border-radius: 9px; }
.illustration-icon { color: #d4be87; background: #d4be8710; }
.illustration-dot { background: #d4be87; }
.login-signature { color: #aec0aa; }
.login-form-side { background: #f7f6f0; }
.login-card h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; font-size: 34px; }
.login-card input { border-color: #cfd8c6; }
@media (max-width: 800px) {
  .top { background: #fffefa; }
  .nav a[aria-current="page"] { color: #fffbeb; background: #2d5345; border-color: #466654; }
  .page-heading h2 { font-size: 30px; }
  .cash-summary { gap: 8px; }
  .cash-summary-card { padding: 14px; }
  .cash-summary-card > strong { font-size: 26px; }
}
@media (max-width: 550px) {
  .cash-summary { grid-template-columns: 1fr; gap: 8px; }
  .cash-summary-card { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 15px; }
  .cash-summary-card > strong { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .cash-history { padding: 16px; }
  .cash-history-head { align-items: flex-start; flex-direction: column; }
  .thread-head { padding-block: 12px; }
  .cash .cash-table th, .cash .cash-table td { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
.a-compose-column:has(.a-composer[hidden]) { grid-template-columns: minmax(0, 1fr); }
