/* Elaris shared visual system — presentation only. Loaded last so page workflows stay untouched. */
:root{
  --elaris-card-radius:12px;
  --elaris-panel-radius:12px;
  --elaris-soft-shadow:0 1px 2px rgba(16,43,69,.035),0 8px 24px rgba(16,43,69,.035);
  --elaris-blue:#397ae8;
  --elaris-green:#16a16d;
  --elaris-orange:#ef9039;
  --elaris-red:#e55757;
  --elaris-purple:#7957dc;
  --elaris-blue-soft:#edf4ff;
  --elaris-green-soft:#eaf8f2;
  --elaris-orange-soft:#fff4e8;
  --elaris-red-soft:#fff0f0;
  --elaris-purple-soft:#f2edff;
}

/* Page shell */
.content{padding:32px 34px 42px;max-width:1540px}
.page-heading{align-items:center;margin-bottom:20px}
.page-heading h1{font-size:27px;line-height:1.08;letter-spacing:-.025em;margin:3px 0 5px}
.page-heading>div>p:not(.eyebrow){font-size:12px;line-height:1.5;max-width:760px}
.eyebrow{font-size:8.5px!important;letter-spacing:.13em}
.heading-actions{align-items:center;gap:9px}
.heading-actions .secondary,.heading-actions select,.people-primary{min-height:39px;border-radius:8px;font-size:10px;font-weight:800;padding:0 14px}
.people-primary{border:1px solid #1688ac;background:var(--accent);color:#fff;box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 18%,transparent);cursor:pointer}
.people-primary:hover{filter:brightness(.97)}
.secondary{box-shadow:none}

/* Sidebar and top bar — same finish everywhere */
.sidebar{box-shadow:8px 0 24px rgba(9,38,52,.055)}
.org-module,.org-subnav button,.nav-item,.org-item{transition:background .15s ease,color .15s ease}
.org-module.active,.org-subnav button.active{background:#3a6675}
.topbar{box-shadow:0 1px 8px rgba(16,43,69,.025)}
.command-input{border-radius:8px}

/* Shared surfaces */
.panel,.workspace-summary-widget,.bookkeeping-widget,.billable-panel,.invoice-register,.expense-panel,.receipt-panel,.credit-accounts-list,.credit-account-card,.credit-activity-panel,.budget-panel,.banking-panel,.cash-register-panel,.cash-bottom-actions,.booking-panel{
  border-color:#dce6ee;
  border-radius:var(--elaris-panel-radius);
  box-shadow:var(--elaris-soft-shadow);
}

/* Shared summary cards */
.stat-card,
.billable-summary-cards>div,
.invoice-summary-cards>div,
.expense-summary-cards>div,
.receipt-summary-cards>div,
.credit-summary-cards>div,
.budget-summary-cards>div,
.banking-summary-cards>div,
.booking-stat,
.booking-widget-stats>div{
  position:relative;
  overflow:hidden;
  min-height:112px;
  padding:15px 52px 14px 16px;
  border:1px solid #dce6ee;
  border-top:1px solid #dce6ee;
  border-radius:var(--elaris-card-radius);
  background:#fff;
  box-shadow:0 1px 2px rgba(16,43,69,.025);
}

.billable-summary-cards small,.invoice-summary-cards small,.expense-summary-cards small,.receipt-summary-cards small,.credit-summary-cards small,.budget-summary-cards small,.banking-summary-cards small,.booking-widget-stats small{
  font-size:8px;font-weight:850;letter-spacing:.055em;color:#63798b
}
.billable-summary-cards strong,.invoice-summary-cards strong,.expense-summary-cards strong,.receipt-summary-cards strong,.credit-summary-cards strong,.budget-summary-cards strong,.banking-summary-cards strong{
  font-size:20px;line-height:1.1;margin:8px 0 4px;color:var(--ink)
}
.billable-summary-cards span,.invoice-summary-cards span,.expense-summary-cards span,.receipt-summary-cards span,.credit-summary-cards span,.budget-summary-cards span,.banking-summary-cards span{
  font-size:8.5px;line-height:1.4;color:var(--muted)
}

/* Small visual icon badge on the summary cards — semantic, not historical data */
.billable-summary-cards>div::after,.invoice-summary-cards>div::after,.expense-summary-cards>div::after,.receipt-summary-cards>div::after,.credit-summary-cards>div::after,.budget-summary-cards>div::after,.banking-summary-cards>div::after,.booking-widget-stats>div::after{
  position:absolute;right:14px;top:14px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:900;background:#eef3f6;color:#657b8c
}

/* Billables */
.billable-summary-cards>div:nth-child(1){border-top-color:#dce6ee}.billable-summary-cards>div:nth-child(1)::after{content:'▤';background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.billable-summary-cards>div:nth-child(2){border-top-color:#dce6ee}.billable-summary-cards>div:nth-child(2)::after{content:'◷';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.billable-summary-cards>div:nth-child(3){border-top-color:#dce6ee}.billable-summary-cards>div:nth-child(3)::after{content:'◴';background:var(--elaris-purple-soft);color:var(--elaris-purple)}
.billable-summary-cards>div:nth-child(4){border-top-color:#dce6ee}.billable-summary-cards>div:nth-child(4)::after{content:'▧';background:var(--elaris-green-soft);color:var(--elaris-green)}

/* Invoices */
.invoice-summary-cards>div:nth-child(1){border-top-color:#dce6ee}.invoice-summary-cards>div:nth-child(1)::after{content:'▣';background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.invoice-summary-cards>div:nth-child(2){border-top-color:#dce6ee}.invoice-summary-cards>div:nth-child(2)::after{content:'⌛';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.invoice-summary-cards>div:nth-child(3){border-top-color:#dce6ee}.invoice-summary-cards>div:nth-child(3)::after{content:'!';background:var(--elaris-red-soft);color:var(--elaris-red)}
.invoice-summary-cards>div:nth-child(4){border-top-color:#dce6ee}.invoice-summary-cards>div:nth-child(4)::after{content:'✓';background:var(--elaris-green-soft);color:var(--elaris-green)}
.invoice-summary-cards>div.clear{background:#fff;border-color:#dce6ee;border-top-color:#dce6ee}

/* Expenses */
.expense-summary-cards>div:nth-child(1){border-top-color:#dce6ee}.expense-summary-cards>div:nth-child(1)::after{content:'◷';background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.expense-summary-cards>div:nth-child(2){border-top-color:#dce6ee}.expense-summary-cards>div:nth-child(2)::after{content:'◷';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.expense-summary-cards>div:nth-child(3){border-top-color:#dce6ee}.expense-summary-cards>div:nth-child(3)::after{content:'!';background:var(--elaris-red-soft);color:var(--elaris-red)}
.expense-summary-cards>div:nth-child(4){border-top-color:#dce6ee}.expense-summary-cards>div:nth-child(4)::after{content:'✓';background:var(--elaris-green-soft);color:var(--elaris-green)}
.expense-summary-cards .warning{background:#fff;border-color:#dce6ee}

/* Receipts */
.receipt-summary-cards>div:nth-child(1){border-top-color:#dce6ee}.receipt-summary-cards>div:nth-child(1)::after{content:'▧';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.receipt-summary-cards>div:nth-child(2){border-top-color:#dce6ee}.receipt-summary-cards>div:nth-child(2)::after{content:'⌛';background:var(--elaris-purple-soft);color:var(--elaris-purple)}
.receipt-summary-cards>div:nth-child(3){border-top-color:#dce6ee}.receipt-summary-cards>div:nth-child(3)::after{content:'✓';background:var(--elaris-green-soft);color:var(--elaris-green)}
.receipt-summary-cards>div:nth-child(4){border-top-color:#dce6ee}.receipt-summary-cards>div:nth-child(4)::after{content:'▣';background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.receipt-summary-cards .warning{background:#fff;border-color:#dce6ee}

/* Credit Accounts */
.credit-summary-cards>div:nth-child(1){border-top-color:#dce6ee}.credit-summary-cards>div:nth-child(1)::after{content:'$';background:var(--elaris-green-soft);color:var(--elaris-green)}
.credit-summary-cards>div:nth-child(2){border-top-color:#dce6ee}.credit-summary-cards>div:nth-child(2)::after{content:'▣';background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.credit-summary-cards>div:nth-child(3){border-top-color:#dce6ee}.credit-summary-cards>div:nth-child(3)::after{content:'▦';background:var(--elaris-purple-soft);color:var(--elaris-purple)}
.credit-summary-cards>div:nth-child(4){border-top-color:#dce6ee}.credit-summary-cards>div:nth-child(4)::after{content:'!';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.credit-summary-cards .warning{background:#fff;border-color:#dce6ee}

/* Budget */
.budget-summary-cards>div:nth-child(1){border-top-color:#dce6ee}.budget-summary-cards>div:nth-child(1)::after{content:'▣';background:var(--elaris-green-soft);color:var(--elaris-green)}
.budget-summary-cards>div:nth-child(2){border-top-color:#dce6ee}.budget-summary-cards>div:nth-child(2)::after{content:'▤';background:var(--elaris-purple-soft);color:var(--elaris-purple)}
.budget-summary-cards>div:nth-child(3){border-top-color:#dce6ee}.budget-summary-cards>div:nth-child(3)::after{content:'◷';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.budget-summary-cards>div:nth-child(4){border-top-color:#dce6ee}.budget-summary-cards>div:nth-child(4)::after{content:'◷';background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.budget-summary-cards .warning{background:#fff;border-color:#dce6ee}

/* Banking */
.banking-summary-cards>div:nth-child(1){border-top-color:#dce6ee}.banking-summary-cards>div:nth-child(1)::after{content:'$';background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.banking-summary-cards>div:nth-child(2){border-top-color:#dce6ee}.banking-summary-cards>div:nth-child(2)::after{content:'↻';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.banking-summary-cards>div:nth-child(3){border-top-color:#dce6ee}.banking-summary-cards>div:nth-child(3)::after{content:'↓';background:var(--elaris-green-soft);color:var(--elaris-green)}
.banking-summary-cards>div:nth-child(4){border-top-color:#dce6ee}.banking-summary-cards>div:nth-child(4)::after{content:'↑';background:var(--elaris-red-soft);color:var(--elaris-red)}

/* Workspace booking summary */
.booking-widget-stats>div:nth-child(1)::after{content:'▤';background:var(--elaris-red-soft);color:var(--elaris-red)}
.booking-widget-stats>div:nth-child(2)::after{content:'☎';background:var(--elaris-orange-soft);color:var(--elaris-orange)}
.booking-widget-stats>div:nth-child(3)::after{content:'✓';background:var(--elaris-green-soft);color:var(--elaris-green)}
.booking-widget-stats>div:nth-child(4)::after{content:'♙';background:var(--elaris-purple-soft);color:var(--elaris-purple)}
.booking-widget-stats strong{font-size:20px;margin-bottom:3px}.booking-widget-stats span{font-size:8.5px}

/* Command Centre / Bookkeeping Summary */
.stat-grid,.bookkeeping-widget-grid{gap:12px}
.stat-card{padding-right:48px}
.stat-card>i{width:32px;height:32px;right:14px;top:14px}
.stat-card strong{font-size:21px;margin-top:8px}
.stat-card span{font-size:8.5px;line-height:1.4}
.bookkeeping-widget{min-height:126px;padding:15px;border-radius:12px;box-shadow:0 1px 2px rgba(16,43,69,.025)}
.bookkeeping-widget>div i{width:30px;height:30px;border-radius:50%}
.bookkeeping-widget>strong{font-size:19px;margin:12px 0 4px}
.bookkeeping-widget>small{font-size:8.5px}
.dashboard-grid{gap:14px}.panel{border-radius:12px}

/* Clean alerts — use colour as a signal, not a large coloured block */
.expense-alert,.credit-alert,.bookkeeping-alert,.budget-rule,.credit-account-strip{
  border-radius:9px;box-shadow:none
}
.expense-alert,.credit-alert{background:#fffaf1;border-left:3px solid var(--elaris-orange)}
.bookkeeping-alert{background:#fff8f7;border-left:3px solid var(--elaris-red)}
.budget-rule,.credit-account-strip{background:#f7fbfd;border-left:3px solid var(--accent)}

/* Search / filter rows */
.billable-search,.invoice-search,.expense-search,.receipt-search,.credit-activity-search,.budget-search,.banking-search{
  background:#fff
}
.billable-search input,.invoice-search input,.expense-search input,.receipt-search input,.credit-activity-search input,.budget-search input,.banking-search input,.banking-toolbar input,.bank-account-select select{
  border-color:#d5e0e8!important;border-radius:8px!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)
}
.billable-search input:focus,.invoice-search input:focus,.expense-search input:focus,.receipt-search input:focus,.credit-activity-search input:focus,.budget-search input:focus,.banking-search input:focus,.banking-toolbar input:focus,.bank-account-select select:focus{
  outline:2px solid color-mix(in srgb,var(--accent) 18%,transparent);border-color:var(--accent)!important
}

/* Tables — same header, row rhythm and hover everywhere */
.billable-section-head,.invoice-group-head{background:#f5f9fb;border-radius:7px 7px 0 0}
.expense-head,.receipt-head,.credit-activity-head,.budget-head,.banking-head,.invoice-head,.billable-head{background:#f6f9fb!important;color:#607487!important}
.expense-row[data-expense-row],.receipt-row[data-receipt-row],.credit-activity-row[data-credit-activity],.budget-row[data-budget-row],.banking-row:not(.banking-head),.invoice-row:not(.invoice-head),.billable-row:not(.billable-head){transition:background .12s ease}
.expense-row[data-expense-row]:hover,.receipt-row[data-receipt-row]:hover,.credit-activity-row[data-credit-activity]:hover,.budget-row[data-budget-row]:hover,.banking-row:not(.banking-head):hover,.invoice-row:not(.invoice-head):hover,.billable-row:not(.billable-head):hover{background:#f8fbfd}
.expense-section-head h2,.receipt-section-head h2,.banking-section-head h2,.invoice-group-head h2,.billable-section-head h2,.credit-list-head h2{font-size:13px;font-weight:800}

/* Consistent status pills */
.invoice-row em,.billable-row em,.banking-row>em,.receipt-link,.credit-account-card-head em,.credit-account-strip em,.booking-status,.cash-status-pill{
  border-radius:999px;font-weight:800;line-height:1.1
}
.invoice-row em.paid,.billable-row em.ready,.banking-row>em.reconciled,.receipt-link.completed{background:var(--elaris-green-soft);color:#187b55}
.invoice-row em.awaiting{background:var(--elaris-orange-soft);color:#a85e16}
.billable-row em.invoiced{background:var(--elaris-blue-soft);color:#356b9b}
.receipt-link.missing,.credit-account-card-head em,.credit-account-strip em{background:var(--elaris-orange-soft);color:#99601c}
.receipt-link.unmatched{background:var(--elaris-purple-soft);color:#6d50a2}

/* Credit account cards/details */
.credit-account-card{padding:18px}.credit-account-card:hover{box-shadow:0 8px 22px rgba(16,43,69,.055)}
.credit-account-card-head h2{font-size:17px}
.credit-account-values{margin:17px 0 11px}
.credit-limit-bar{height:6px}

/* Workspace */
.workspace-summary-grid{gap:16px}.workspace-summary-widget{padding:18px}
.workspace-widget-head i{width:38px;height:38px;border-radius:50%;background:var(--elaris-blue-soft);color:var(--elaris-blue)}
.workspace-widget-head h2{font-size:16px}
.booking-widget-week{border-radius:8px;overflow:auto}
.booking-widget-week>div{background:#fff}
.booking-widget-week button{background:#edf5ff;border-left-color:var(--elaris-blue)}

/* Booking full screen */
.booking-stat{padding-right:50px}.booking-stats{gap:12px}.booking-layout{gap:16px}

/* Cash Position — leave all calculations/status logic intact, just match the surface language */
.cash-position-cards .stat-card{border-radius:12px;box-shadow:0 1px 2px rgba(16,43,69,.025)}
.cash-register-panel.cash-visual-summary{border-radius:12px;box-shadow:var(--elaris-soft-shadow)}
.cash-bottom-actions{border-radius:12px}

/* Modals/forms */
.detail-modal{border-radius:14px;box-shadow:0 24px 70px rgba(11,33,49,.22)}
.detail-head{background:#fff}.detail-actions{background:#f8fafc}
.settings-field input,.settings-field select,.settings-field textarea,.expense-line input,.bank-match-header input,.bank-match-row>label input{
  border-color:#d6e1e8!important;border-radius:7px!important
}

@media(max-width:1100px){
  .content{padding:26px 24px 36px}
}
@media(max-width:760px){
  .content{padding:20px 14px 30px}
  .page-heading h1{font-size:24px}
  .heading-actions{width:100%;flex-wrap:wrap}
  .heading-actions .secondary,.heading-actions .people-primary{flex:1}
  .billable-summary-cards>div,.invoice-summary-cards>div,.expense-summary-cards>div,.receipt-summary-cards>div,.credit-summary-cards>div,.budget-summary-cards>div,.banking-summary-cards>div{padding-right:48px}
}
