/* Corporate financial identity. Shared semantic tokens; loaded after component styles. */
:root {
 --brand-primary:#101F3A; --brand-secondary:#7B263D; --brand-secondary-hover:#642033;
 --brand-accent:#C5A46D; --bg-app:#F5F6F8; --bg-surface:#FFFFFF;
 --text-primary:#101F3A; --text-secondary:#64748B; --border-default:#E2E8F0;
 --status-success:#047857; --status-warning:#B45309; --status-error:#B91C1C;
 --radius-card:12px; --radius-button:8px; --shadow-card:0 2px 10px rgba(16,31,58,0.06);
 --text-readable:#56657A; --text-on-dark:#FFFFFF; --text-on-dark-muted:#CBD5E1;
 --surface-selected:#F7EDF0; --surface-success:#ECFDF5; --surface-warning:#FFFBEB; --surface-error:#FEF2F2;
 --chart-primary:var(--brand-primary); --chart-secondary:var(--brand-secondary); --chart-highlight:var(--brand-accent);
 --green:var(--brand-secondary); --muted:var(--text-readable); --border:var(--border-default);
 color:var(--text-primary); background:var(--bg-app);
}
body{color:var(--text-primary);background:var(--bg-app)}
h1,h2,h3,.stat strong,#overview-results .stat strong,.workspace-amount,.money-metric>strong,.ji-metric strong,.ji-facts strong,.ji-outcomes strong{color:var(--text-primary)}
p,small,.muted,label,.stat-top,.stat small,.report-note,.workday-item p,.workday-freshness,.workday-card p,.ji-metric span,.ji-metric small{color:var(--text-readable)}
.card,.stat,.workspace-section,.workday-card,.workday-item,.cash-chart-panel,.auth-card{background:var(--bg-surface);border-color:var(--border-default);border-radius:var(--radius-card);box-shadow:var(--shadow-card)}
.button{color:var(--brand-primary);border-color:var(--border-default);border-radius:var(--radius-button);background:var(--bg-surface)}
.button.primary,.workday-item-actions .button.primary{background:var(--brand-secondary);border-color:var(--brand-secondary);color:var(--text-on-dark)}
.button.primary:hover{background:var(--brand-secondary-hover);border-color:var(--brand-secondary-hover);filter:none}
.button:not(.primary):hover{background:var(--bg-app);filter:none;border-color:var(--brand-primary)}
.button.danger,.button.destructive,.remove-line{color:var(--status-error);background:var(--surface-error);border-color:var(--status-error)}
.link-button,.contact-profile-link,.period-controls>summary,.workboard-options>summary,.report-hub-links a,.workday-explain-link,.money-event summary,.money-coverage summary{color:var(--brand-secondary)}
a:focus-visible,button:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--brand-secondary);outline-offset:3px}
input,select,textarea{color:var(--text-primary);background:var(--bg-surface);border-color:var(--border-default)}
input:focus,select:focus,textarea:focus{border-color:var(--brand-primary);outline:2px solid var(--brand-primary);outline-offset:1px;box-shadow:none}
input::placeholder,textarea::placeholder{color:var(--text-readable);opacity:1}
input:disabled,select:disabled,textarea:disabled{background:var(--bg-app);color:var(--text-readable);opacity:1}
input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border-color:var(--status-error)}
.error{color:var(--status-error)}
#sidebar,.shell>header{background:var(--brand-primary);color:var(--text-on-dark)}
.shell>header{border-bottom:1px solid var(--brand-primary)}
.shell>header .breadcrumb,.shell>header .breadcrumb b,.shell>header .local-badge,.shell>header .pin-page,#menu{color:var(--text-on-dark-muted)}
.shell>header .breadcrumb span{color:var(--brand-accent)}
.shell>header .search-launch{color:var(--text-on-dark);border-color:var(--text-readable);background:transparent}
.shell>header .search-launch:hover,.account-menu>summary:hover{background:color-mix(in srgb,var(--bg-surface) 10%,transparent)}
.search-launch kbd{background:var(--bg-app);color:var(--text-primary)}
.account-menu-items{color:var(--text-primary);background:var(--bg-surface)}
.shell>header .pin-page[aria-pressed=true]{background:var(--brand-secondary);color:var(--text-on-dark)}
.brand-icon{background:var(--brand-accent);color:var(--brand-primary)!important}
.brand small,#sidebar small,#sidebar .workspace #branch-switcher{color:var(--text-on-dark-muted)}
#sidebar .workspace,#navigation-search{background:color-mix(in srgb,var(--bg-surface) 7%,var(--brand-primary));border-color:var(--text-readable)}
#navigation-search::placeholder{color:var(--text-on-dark-muted)}
#sidebar nav a{color:var(--text-on-dark-muted)}
#sidebar nav a:hover,#sidebar .nav-section>summary:hover,#sidebar .nav-favourite{background:color-mix(in srgb,var(--bg-surface) 10%,var(--brand-primary))}
#sidebar nav a.active{background:var(--brand-secondary);color:var(--text-on-dark)}
#sidebar .nav-section>summary{color:var(--text-on-dark)}
#sidebar .nav-section>div,#sidebar .nav-utility,#nav-favourites:not(:empty),.sidebar-bottom{border-color:var(--text-readable)}
#sidebar :focus-visible,.shell>header :focus-visible{outline-color:var(--brand-accent)}
.workspace-dot{background:var(--brand-accent)}
.avatar,.stat-icon,.setting-card .setting-icon,.quick span{background:var(--bg-app);color:var(--brand-primary)}
#sidebar .avatar{background:var(--brand-accent);color:var(--brand-primary)}
.register-tabs [aria-pressed=true],.record-tabs [aria-current=page],.money-stage.selected{background:var(--surface-selected);border-color:var(--brand-secondary);color:var(--brand-secondary)}
.register-tabs .button:hover,.discovery-result:hover{background:var(--surface-selected)}
th{color:var(--text-primary);background:var(--bg-app)}
tbody tr:nth-child(even){background:color-mix(in srgb,var(--bg-app) 55%,var(--bg-surface))}
tbody tr:hover{background:var(--surface-selected)}
td{border-color:var(--border-default)}
.right,.mono,.stat strong,.workspace-amount,.money-metric strong,.ji-metric strong{font-variant-numeric:tabular-nums}
.status{color:var(--text-readable);background:var(--bg-app)}
.status.draft{color:var(--brand-primary);background:var(--bg-app)}
.status.paid,.priority-routine{color:var(--status-success);background:var(--surface-success)}
.status.posted,.priority-important,.money-warnings,.workday-task-done{color:var(--status-warning);background:var(--surface-warning)}
.status.reversed,.priority-high{color:var(--status-error);background:var(--surface-error)}
.stat small em{color:var(--status-success)}
.gold-setup,.notice,.doc-total,.report-total,.totals-row td,.money-metric,.ji-metric,.ji-scenario,.ji-facts,.ji-outcomes>div,.balance-equation,.workday-next,.workday-outlook{background:var(--bg-app);border-color:var(--border-default);color:var(--text-primary)}
.workday-next{border-left-color:var(--brand-accent)}
.workday-hero,.money-hero,.job-intelligence .ji-hero,.workday-loading{background:var(--brand-primary);color:var(--text-on-dark)}
.workday-hero:before{display:none}
.workday-hero h2,.money-hero h2,.ji-hero h2{color:var(--text-on-dark)}
.workday-hero p,.money-hero p,.ji-hero p,.ji-hero .ji-hero-foot,.gold-next-action>span{color:var(--text-on-dark-muted)}
.money-hero .workday-eyebrow,.ji-hero .workday-eyebrow{color:var(--brand-accent)}
.gold-next-action .button{color:var(--brand-primary);background:var(--bg-surface);border-color:var(--bg-surface)}
.workday-bar i,.bar-row i{background:var(--brand-primary)}
.money-event-marker{background:var(--brand-accent)}.lane-cash .money-event-marker{background:var(--status-success)}.lane-bank .money-event-marker{background:var(--brand-primary)}
.ji-forecast{background:var(--bg-surface);color:var(--text-primary);border:1px solid var(--border-default)}
.ji-section-heading h3,.ji-comparison strong{color:var(--text-primary)}
.ji-section-heading .workday-eyebrow,.ji-legend,.ji-legend span:first-child{color:var(--text-readable)}
.ji-chart text{fill:var(--text-readable)}.ji-zero{stroke:var(--border-default)}
.ji-line-base{stroke:var(--chart-primary)}.ji-line-scenario{stroke:var(--chart-secondary)}
.chart-legend span{border-left-color:var(--chart-primary)}.chart-legend span:last-child{border-left-color:var(--chart-secondary)}
#auth-panel{background:var(--bg-app)}.auth-brand{color:var(--brand-primary)}.auth-brand p,.auth-card small{color:var(--text-readable)}
#toast{background:var(--brand-primary);color:var(--text-on-dark)}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{body,.document-preview,dialog{background:var(--bg-surface);color:var(--text-primary)}.document-preview h2{color:var(--brand-primary)}.document-preview th{color:var(--brand-primary);background:var(--bg-app)}.report-total,.totals-row td{background:var(--bg-app);color:var(--text-primary)}*{box-shadow:none!important}}

.company-add{background:var(--brand-secondary);color:var(--text-on-dark)}
.workday-count,.branch-scope{color:var(--text-primary)}
.button[data-action^="cancel:"],.link-button[data-action^="undo-payment:"],button[data-remove-opening]{color:var(--status-error);border-color:var(--status-error);background:var(--surface-error)}

.stat strong.financial-negative,#overview-results .stat strong.financial-negative{color:var(--status-error)}

.stat strong.financial-positive,#overview-results .stat strong.financial-positive{color:var(--status-success)}

.ji-metric strong.financial-negative,.money-metric>strong.financial-negative{color:var(--status-error)}

[data-remove-user],[data-revoke-invite],[data-remove-expense-line],[data-ji-cancel],[data-cash^="cancel:"],[data-close^="cancel:"],[data-maintenance^="cancel:"],[data-software^="cancel:"],[data-job^="unlink:"],#reopen-all{color:var(--status-error);border-color:var(--status-error);background:var(--surface-error)}
th.financial-column,
table:has(th.financial-column:nth-child(1)) td:nth-child(1),
table:has(th.financial-column:nth-child(2)) td:nth-child(2),
table:has(th.financial-column:nth-child(3)) td:nth-child(3),
table:has(th.financial-column:nth-child(4)) td:nth-child(4),
table:has(th.financial-column:nth-child(5)) td:nth-child(5),
table:has(th.financial-column:nth-child(6)) td:nth-child(6),
table:has(th.financial-column:nth-child(7)) td:nth-child(7),
table:has(th.financial-column:nth-child(8)) td:nth-child(8),
table:has(th.financial-column:nth-child(9)) td:nth-child(9),
table:has(th.financial-column:nth-child(10)) td:nth-child(10),
table:has(th.financial-column:nth-child(11)) td:nth-child(11),
table:has(th.financial-column:nth-child(12)) td:nth-child(12),
table:has(th.financial-column:nth-child(13)) td:nth-child(13),
table:has(th.financial-column:nth-child(14)) td:nth-child(14){text-align:right;font-variant-numeric:tabular-nums}
