/* File and destination colors share one semantic palette. */
:root {
  --color-view: #1967d2;
  --color-work: #7045a0;
  --color-spreadsheet: #137333;
  --color-view-soft: #edf3fe;
  --color-work-soft: #f2eafa;
  --color-spreadsheet-soft: #e6f4ea;
}
/* Shared application chrome; document and chart colors remain content-owned. */
#app { --section-accent: var(--color-view); --section-soft: #e8f0fe; }
#app:has(.topnav button.is-active[data-work-tab]) { --section-accent: #956000; --section-soft: #fef3d8; --nav-ink: #805200; --nav-selected: #fcebc3; }
#app:has(.topnav button.is-active[data-page="work"]) { --section-accent: var(--color-work); --section-soft: var(--color-work-soft); --nav-ink: #60378d; --nav-selected: #ece0f7; }
#app:has(.topnav button.is-active[data-dashboards]) { --section-accent: var(--color-view); --section-soft: var(--color-view-soft); --nav-ink: #185abc; --nav-selected: #dce8fc; }
#app:has(.topnav button.is-active[data-page="allies-chat"]) { --section-accent: #00796f; --section-soft: #e8f5f1; --nav-ink: #00665e; --nav-selected: #d2ede5; }
#app:has(.topnav button.is-active[data-page="allies"]) { --section-accent: var(--color-spreadsheet); --section-soft: #edf7ee; --nav-ink: #176236; --nav-selected: #ddefdf; }
.topbar { border-bottom-color: transparent; }
.topnav button::before { border-radius: 18px; }
.topnav button.is-active::before { background: var(--section-soft); }
.topnav button.is-active::after { display: none; }
.topnav button[data-home] { --section-accent: var(--color-view); --section-soft: var(--color-view-soft); }
.topnav button[data-work-tab] { --section-accent: #956000; --section-soft: #fef3d8; }
.topnav button[data-page="work"] { --section-accent: var(--color-work); --section-soft: var(--color-work-soft); }
.topnav button[data-dashboards] { --section-accent: var(--color-view); --section-soft: var(--color-view-soft); }
.topnav button[data-page="allies-chat"] { --section-accent: #00796f; --section-soft: #e8f5f1; }
.topnav button[data-page="allies"] { --section-accent: var(--color-spreadsheet); --section-soft: #edf7ee; }
.topnav button > svg, .topnav button.is-active { color: var(--section-accent); }
.topnav .inbox-count { background: var(--primary); }
.account-chip i, .account-card i { background: #fce8d5; color: #8c4b19; }
.account-chip:hover, .account-chip.is-open { background: var(--nav-hover); border-color: var(--line); }
.account-menu button:hover { background: var(--section-soft); }
.account-menu button.session-value:hover { background: var(--primary-soft); color: var(--primary); }
button, input, textarea, select, progress, meter { accent-color: var(--primary); }

/* Section colors guide selection; the surrounding surfaces stay warm white. */
:is(.work-sidebar, .dashboards-sidebar) { scrollbar-color: var(--line-strong) transparent; }
:is(.work-sidebar, .dashboards-sidebar) :is(nav, .views-toggle) button:is([aria-current="page"], [aria-selected="true"]) { background: var(--nav-selected); color: var(--nav-ink); }
.work-library-nav button:hover { background: var(--nav-hover); }
:is(.work-sidebar, .dashboards-sidebar) :is(.views-new, .work-library-main) { background: var(--section-soft); color: var(--section-accent); }
:is(.work-sidebar, .dashboards-sidebar) :is(.views-new, .work-library-main):hover { background: var(--nav-selected); }
:is(.work-sidebar, .dashboards-sidebar) .library-folder-heading > button:first-child > svg { color: #a15c00; }
.views-file-icon[data-view-kind="workbook"] { color: var(--color-spreadsheet); }
.views-file-icon[data-view-kind="dashboard"] { color: var(--color-view); }
.views-file-icon[data-view-kind="work"] { color: var(--color-work); }
:is(.work-sidebar, .dashboards-sidebar) .views-file-icon svg { color: inherit; }
.sidebar-tutorial summary > svg:first-child { color: var(--primary); }

/* Keep color on controls and details instead of washing the working canvas. */
:is(.dashboard-start-composer, .data-chat-composer) { border-color: var(--line-strong); background: var(--paper); box-shadow: 0 4px 16px #29282407; }
:is(.dashboard-start-composer, .data-chat-composer):focus-within { border-color: var(--section-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--section-accent) 10%, transparent); }
:is(.dashboard-start-composer, .data-chat-composer) textarea::placeholder { color: #817b73; }
.dashboard-start-composer button, .data-chat-composer button[type="submit"] { background: var(--primary); color: white; }
.dashboard-start-composer button:hover, .data-chat-composer button[type="submit"]:hover { background: var(--primary-hover); }
.dashboard-start-suggestions button:nth-child(3n+1), .data-chat-suggestions button:nth-child(3n+1) { color: #0842a0; background: #e8f0fe; border-color: #d3e3fd; }
.dashboard-start-suggestions button:nth-child(3n+2), .data-chat-suggestions button:nth-child(3n+2) { color: var(--color-spreadsheet); background: var(--color-spreadsheet-soft); border-color: #c4e5ce; }
.dashboard-start-suggestions button:nth-child(3n), .data-chat-suggestions button:nth-child(3n) { color: #7627bb; background: #f1e8fd; border-color: #e1cff9; }
.dashboard-start-suggestions button:hover, .data-chat-suggestions button:hover { filter: brightness(.97); }
.data-chat-message.user { background: var(--section-soft); color: var(--ink); }
.data-chat-composer button:hover { background: var(--nav-hover); }
.assistant-button:not(.is-open) { background: var(--primary); border-color: var(--primary); box-shadow: 0 8px 24px #0b57d02b; }
.assistant-avatar i { background: var(--primary); }
.assistant-sidebar { background: var(--shell-surface); }
:is(.pill-button.primary, .detail-modal footer button.primary, .composed-view-header button.primary, .dashboards-workspace .primary, .studio-button.primary, .workflow-toolbar .primary, .workflow-library > .primary, .reusable-view .primary, .data-chat-review .primary, .data-secret-form .primary, .getting-started-footer button) { background: var(--primary); border-color: var(--primary); color: white; }
:is(.pill-button.primary, .detail-modal footer button.primary, .composed-view-header button.primary, .dashboards-workspace .primary, .studio-button.primary, .workflow-toolbar .primary, .workflow-library > .primary, .reusable-view .primary, .data-chat-review .primary, .data-secret-form .primary, .getting-started-footer button):hover { background: var(--primary-hover); border-color: var(--primary-hover); }

/* Home and Tasks use color to distinguish content and attention. */
.company-home, .getting-started { background: var(--canvas); }
.home-admin-banner { background: var(--butter-soft); border-color: #efdfb1; }
.home-admin-banner button { color: #875000; border-color: #efdfb1; }
.home-pin { border-color: var(--line-strong); border-radius: 14px; }
.home-pin > header { padding: 12px 14px; margin: -20px -20px 18px; border-radius: 14px 14px 0 0; background: var(--color-work-soft); }
.home-pin[data-view-kind="workbook"] > header { background: var(--color-spreadsheet-soft); }
.home-pin[data-view-kind="dashboard"] > header { background: var(--color-view-soft); }
.home-pin footer button, .home-saved-views > header > button { color: var(--primary); }
.home-pin footer button { font-weight: 500; }
.work-mail.is-unread { background: #fffcf4; }
.work-mail-dot { background: var(--primary); }
.work-mail-kind.is-question { background: var(--butter-soft); color: #875000; }
.work-mail-kind.is-done { background: var(--teal-soft); color: var(--teal); }
.getting-started-card:nth-child(1) i { background: var(--primary-soft); color: var(--primary); }
.getting-started-card:nth-child(2) i { background: var(--lavender-soft); color: var(--lavender); }
.getting-started-card:nth-child(3) i { background: var(--butter-soft); color: #875000; }
.getting-started-card:nth-child(4) i { background: var(--teal-soft); color: var(--teal); }

/* Allies adds teal and amber details to its white conversation surface. */
.al-shortcuts button.is-active, .al-channel.is-active { background: var(--nav-selected); color: var(--nav-ink); }
.al-shortcuts b, .al-channel b { color: var(--primary); }
.al-sidebar-scroll h2, .al-hash { color: var(--muted); }
.al-tabs button[aria-selected="true"] { color: var(--section-accent); }
.al-tabs button[aria-selected="true"]::after { background: var(--section-accent); }
.al-composer { border-color: var(--line-strong); background: var(--paper); }
.al-composer:focus-within { border-color: var(--section-accent); box-shadow: 0 0 0 3px #00796f10; }
.al-composer footer button:not(:disabled) { background: var(--primary); }
.al-attachment-icon { color: #a15c00; background: var(--butter-soft); }
.al-attachment-icon.view { color: var(--color-view); background: var(--color-view-soft); }
.al-pinned { color: #875000; background: var(--butter-soft) !important; border-bottom-color: #f5e6b6 !important; }
.al-pinned strong { color: #875000; }
.al-message:hover { background: #fcfaf8; }
.al-huddle-button { color: var(--section-accent); background: var(--section-soft) !important; border-color: #bcddd3 !important; }
.al-huddle-button:hover { background: var(--nav-selected) !important; }
