/* ============================================================================
   Umano AI — clean periwinkle skin  v6
   Professional SaaS layout: a full-width white header welded to the top edge
   (NOT a floating pill), content in a wide centered container below (NOT a
   shrunk box). Periwinkle accent, Fraunces serif headings. No warm/peach.
   This file MUST load last in <head> so it overrides app-nav.css / app-layout.css.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;500;600;700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --surface:#f3f3fb!important; --soft:#eceCf6!important; --bg:#f3f3fb!important;
  --ink:#23252f!important; --muted:#787a8a!important; --line:#e8e8f2!important;
  --card:#ffffff!important; --paper:#ffffff!important;
  --ok:#2f855a!important; --danger:#c0492f!important;
  --ui-accent:#5f68d6!important; --ui-accent-hover:#4d56c4!important;
  --ui-accent-soft:#ececfb!important; --ui-accent-softer:#f5f5fd!important;
  --ui-on-accent:#ffffff!important; --ui-blue:#5f68d6!important; --blue:#5f68d6!important; --blue-hover:#4d56c4!important;
  --ui-nav-active:#23252f!important; --ui-on-nav-active:#ffffff!important;
  --ui-focus-ring:rgba(95,104,214,.20)!important;
  --ops-line:#e8e8f2!important; --ops-paper:#ffffff!important; --ops-surface:#f3f3fb!important;
  --ops-muted:#787a8a!important; --ops-ink:#23252f!important; --ops-soft:#f1f1f8!important;
}

html{overflow-x:hidden!important}

/* bottom tab bar is mobile-only — hidden by default, shown inside the phone
   media query below (see .has-mobile-tabbar .mobile-tabbar) */
.mobile-tabbar{display:none!important}

/* Bottom "More" sheet — hidden until opened from the More tab (mobile only,
   but the hidden state is unconditional so it never shows on desktop). */
.mobile-sheet-backdrop{position:fixed!important;inset:0!important;z-index:998!important;
  background:rgba(20,22,40,.42)!important;opacity:0!important;visibility:hidden!important;
  transition:opacity .2s ease,visibility .2s ease!important;-webkit-tap-highlight-color:transparent!important}
.mobile-sheet-backdrop.open{opacity:1!important;visibility:visible!important}
.mobile-sheet{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:999!important;
  background:#ffffff!important;border-radius:22px 22px 0 0!important;
  padding:8px 16px calc(20px + env(safe-area-inset-bottom,0px))!important;
  box-shadow:0 -12px 44px rgba(20,22,40,.26)!important;max-height:86vh!important;overflow-y:auto!important;
  transform:translateY(100%)!important;transition:transform .26s cubic-bezier(.2,.8,.2,1)!important}
.mobile-sheet.open{transform:translateY(0)!important}
.mobile-sheet-handle{width:42px!important;height:4px!important;border-radius:999px!important;background:#d6d6e2!important;margin:8px auto 12px!important}
.mobile-sheet-title{font-family:'Fraunces',Georgia,serif!important;font-size:22px!important;font-weight:600!important;color:#23252f!important;margin:0 4px 14px!important}
.mobile-sheet-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
.mobile-sheet-tile{display:flex!important;flex-direction:column!important;gap:10px!important;
  padding:16px 14px!important;min-height:88px!important;justify-content:center!important;
  border:1px solid #e8e8f2!important;border-radius:15px!important;background:#ffffff!important;
  text-decoration:none!important;color:#23252f!important;-webkit-tap-highlight-color:transparent!important}
.mobile-sheet-tile svg{width:24px!important;height:24px!important;color:#5f68d6!important;stroke:#5f68d6!important;display:block!important;max-width:none!important}
.mobile-sheet-tile span{font-size:14px!important;font-weight:600!important;line-height:1.2!important;color:#23252f!important}
.mobile-sheet-tile:active{background:#f4f4fb!important}
.mobile-sheet-tile.is-active{border-color:#c9ccf5!important;background:#f5f5fd!important}
.mobile-sheet-signout{width:100%!important;margin-top:12px!important;min-height:50px!important;
  border:1px solid #f0d5cf!important;border-radius:12px!important;background:#ffffff!important;
  color:#c0492f!important;font:inherit!important;font-weight:700!important;font-size:15px!important;cursor:pointer!important}
html.mobile-sheet-open,html.mobile-sheet-open body{overflow:hidden!important}

/* Hide the floating "Finish setup" pill whenever ANY menu / dropdown / sheet
   is open, so it never hovers over or under an open menu. */
html:has(.floating-exp-menu, .status-change-menu, .record-menu.open, .customer-menu.open, .nav-more-menu:not([hidden]), .floating-menu, .operations-menu.open, .operations-menu.active) .ko-guide,
html.mobile-sheet-open .ko-guide{display:none!important}

/* removed: Website colors / button-color picker (kept in DOM hidden so JS won't break) */
.settings-nav-item[data-target="colors"]{display:none!important}
.section[data-panel="colors"]{display:none!important}
/* pin Danger zone apart at the bottom of settings nav */
.settings-nav-danger{margin-top:10px!important;padding-top:12px!important;border-top:1px solid #ececf4!important}

/* ===== Invoice preview: fused into Customize invoice as a button + modal ===== */
.branding-preview-cta{margin-top:18px}
.preview-theme-card{display:none!important}
.inv-preview-overlay{position:fixed!important;inset:0!important;z-index:900!important;background:rgba(20,22,40,.34)!important;backdrop-filter:blur(6px)!important;display:none!important;align-items:flex-start!important;justify-content:center!important;padding:38px 16px!important;overflow:auto!important}
.inv-preview-overlay.open{display:flex!important}
.inv-preview-dialog{background:#fff!important;border:1px solid #e8e8f2!important;border-radius:16px!important;max-width:780px!important;width:100%!important;box-shadow:0 30px 80px rgba(20,22,40,.3)!important;overflow:hidden!important}
.inv-preview-head{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:15px 22px!important;border-bottom:1px solid #ececf4!important}
.inv-preview-head h2{margin:0!important;font-family:'Fraunces',Georgia,serif!important;font-size:20px!important}
.inv-preview-body{padding:22px!important;max-height:80vh!important;overflow:auto!important}
/* sample invoice mockup */
.si-box{border:1px solid #e6e6f0;border-radius:12px;padding:26px;background:#fff;color:#23252f;font-size:14px}
.si-box.si-spacious{padding:34px}.si-box.si-compact{padding:18px}
.si-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}
.si-box.si-centered .si-top{flex-direction:column;align-items:center;text-align:center}
.si-brand{display:flex;gap:14px;align-items:center;min-width:0}
.si-box.si-centered .si-brand{flex-direction:column}
.si-logo{max-height:56px;width:auto;object-fit:contain}
.si-logo-small{max-height:40px}.si-logo-large{max-height:78px}
.si-co{font-weight:800;font-size:17px}
.si-contact{color:#787a8a;font-size:12.5px;margin-top:3px;white-space:pre-line}
.si-title{text-align:right;flex-shrink:0}.si-box.si-centered .si-title{text-align:center}
.si-title strong{font-size:20px;letter-spacing:1px}
.si-title div{color:#787a8a;font-size:12.5px}
.si-billto{margin-bottom:16px}
.si-billto span{display:block;color:#787a8a;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.si-table{width:100%;border-collapse:collapse;margin-bottom:16px}
.si-table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#787a8a;padding:8px;border-bottom:2px solid #23252f}
.si-table td{padding:9px 8px;border-bottom:1px solid #eef0f6}
.si-box.si-boxed .si-table th,.si-box.si-boxed .si-table td{border:1px solid #e6e6f0}
.si-totals{margin-left:auto;width:260px}
.si-totals>div{display:flex;justify-content:space-between;padding:6px 0}
.si-total{border-top:2px solid #23252f;margin-top:4px;font-weight:800;font-size:16px}
.si-notes{margin-top:16px}
.si-notes span{display:block;color:#787a8a;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:4px}
.si-notes p{margin:0;color:#55555c;white-space:pre-wrap}
.si-pay{margin-top:18px}
.si-pay-btn{display:inline-block;background:#1c1d24;color:#fff;padding:11px 20px;border-radius:9px;font-weight:700}

/* primary / filled buttons -> black (periwinkle stays for links & accents) */
/* body-prefixed so it always beats the theme style tag regardless of load order */
body .btn-primary,body .btn-dark,body .pay-link,body #confirm-invoice,body .confirm-actions .btn-primary,body .theme-button-preview,
body #toolbar-add-customer,body #open-price-editor,body #open-payment-entry-choice,body #record-payment,body #save-settings,
body #save-customer,body #save-edit-customer,body #save-price,body #create-draft,body #use-draft,body #apply-payment-ai-draft,body .summary-action .btn,
body .quick-primary,body .cust-add-btn,body .pay-add-btn,body .inv-add-btn,body .dash-actions-primary .btn-primary,
body .integration-connect-btn,body .btn-dark,body .record-payment{
  background:#1c1d24!important;background-color:#1c1d24!important;border-color:#1c1d24!important;color:#fff!important}
body .btn-primary:hover,body .btn-dark:hover,body .pay-link:hover,body #confirm-invoice:hover,body .summary-action .btn:hover,
body .quick-primary:hover,body .cust-add-btn:hover,body .pay-add-btn:hover,body .inv-add-btn:hover,body .dash-actions-primary .btn-primary:hover{
  background:#000000!important;border-color:#000000!important}
/* remaining solid-periwinkle buttons / action bars -> black */
body .wizard-step-btn.active,body .bulk-bar{background:#1c1d24!important;background-color:#1c1d24!important;border-color:#1c1d24!important;color:#fff!important}
html,body{background:#f3f3fb!important;color:#23252f;margin:0!important;
  font-family:'Hanken Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased}

/* editorial serif headings */
h1,h2,h3,.card-head h2,.card-head h3,.ops-head h2,.panel h2,.brand h1,.ops-brand h1,
#welcome-title,.cust-empty-title,.inv-empty-title,.greet,.hub-title{
  font-family:'Fraunces',Georgia,'Times New Roman',serif!important;font-weight:600!important;letter-spacing:-.3px}

/* ============ wide content container (NOT a shrunk card) ============ */
.page,.ops-page{
  max-width:min(1640px, calc(100vw - 40px))!important;width:auto!important;min-height:100vh!important;
  margin:0 auto!important;
  background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  overflow:visible!important;
  padding:18px 28px 56px!important}

/* operations: hide the 4 metric cards above Estimates/Jobs/Schedule (kept in DOM for JS) */
.ops-stats{display:none!important}

/* ====== header sits directly ON TOP of the content, split by a black line ====== */
/* kills app-nav.css's floating pill (no radius/shadow/margin/blur); attached, no gap */
.topbar,.ops-topbar{
  min-height:0!important;
  width:auto!important;
  margin:0!important;
  padding:14px 22px!important;
  background:#ffffff!important;background-color:#ffffff!important;
  border:0!important;border-bottom:2px solid #1c1d24!important;border-radius:0!important;
  box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  position:relative!important;z-index:400!important}
/* the very next block (welcome / workspace) attaches straight under the line */
.topbar + *,.ops-topbar + *{margin-top:0!important}
.welcome{margin-top:0!important}

/* clean header: logo only — drop the kicker + page title next to the logo (all pages) */
.topbar .brand>div,.ops-topbar .ops-brand>div,.ops-brand>div{display:none!important}
.topbar .brand span,.topbar .brand h1,.ops-brand span,.ops-brand h1{display:none!important}

/* active nav tab: bold + underline instead of a pill */
.topbar .actions a.nav-active,.topbar .actions a[aria-current="page"],
.ops-topbar .actions a.nav-active,.ops-topbar .actions a[aria-current="page"],
.topbar .top-actions a.nav-active,.topbar .top-actions a[aria-current="page"]{
  background:transparent!important;background-color:transparent!important;
  color:#23252f!important;border-color:transparent!important;box-shadow:none!important;
  border-radius:0!important;font-weight:800!important;
  text-decoration:underline!important;text-underline-offset:6px!important;
  text-decoration-thickness:2px!important;text-decoration-color:#5f68d6!important}
.topbar .actions a.nav-active:hover,.topbar .actions a[aria-current="page"]:hover,
.ops-topbar .actions a.nav-active:hover,.ops-topbar .actions a[aria-current="page"]:hover{
  background:transparent!important;color:#23252f!important}

/* white content cards on the soft page */
.card,.stat,.panel,.ops-panel,.customer-card,.mini-card,.est-builder-shell,
.hub-card,.settings-nav,.operations-sidebar,.confirm-dialog,.edit-panel,
.needs-action-list,.audit-summary,.chart-card,.insights .card{
  background:#ffffff!important;border:1px solid #e8e8f2!important;box-shadow:none!important}
.card,.panel,.ops-panel,.stat,.est-builder-shell,.confirm-dialog,.chart-card{border-radius:15px!important}
.btn,.hub-card{border-radius:11px!important}

/* menus/modals float with a soft shadow */
.menu-list,.record-menu-list,.nav-more-menu,.kp-modal,.mem-modal,.ai-float-panel{
  background:#ffffff!important;border:1px solid #e7e7f1!important;box-shadow:0 14px 40px rgba(30,32,60,.16)!important}

/* inputs */
input,select,textarea{border-radius:11px!important;border:1px solid #e7e7f1!important;background:#ffffff!important;color:#23252f!important}
input:focus,select:focus,textarea:focus{border-color:#5f68d6!important;box-shadow:0 0 0 3px rgba(95,104,214,.16)!important}

/* secondary / soft buttons -> clean outline */
.btn-soft,.row-actions button,.table-actions button,.customer-actions button,
.record-actions .btn,.est-step{background:#ffffff!important;border:1px solid #e7e7f1!important;color:#23252f!important}
.btn-soft:hover,.row-actions button:hover,.table-actions button:hover{background:#f4f4fb!important}

/* links & accents */
a:not(.btn),.customer-name-link,.price-name{color:#5f68d6!important}

/* tables */
.invoice-table th,.customer-table th{color:#787a8a!important;background:#f7f7fc!important;border-color:#ececf4!important}
.invoice-table td,.customer-table td{border-color:#f0f0f6!important}
.invoice-table tbody tr:nth-child(even){background:#fbfbff!important}
.customer-table tbody tr:hover,.record-row:hover{background:#f6f6fd!important}

/* loader */
.app-loader{background:#f3f3fb!important}
.app-loader-ring{border-color:rgba(35,37,47,.14)!important;border-top-color:#5f68d6!important}

/* muted / labels */
label,.stat span,.mini-card span,.brand span,.ops-brand span,.card-head p,.ops-head p,.chart-subtitle{color:#787a8a!important}

/* ===== Umano bot icon = the app logo (floating tab, chat header, chat avatars) ===== */
.ai-side-tab .ai-tab-icon img{width:24px!important;height:24px!important;display:block!important;object-fit:contain!important;border-radius:6px!important}
#ai-side-title{display:flex!important;align-items:center!important;gap:8px!important}
#ai-side-title img.ai-title-mark{width:22px!important;height:22px!important;object-fit:contain!important;border-radius:5px!important;flex-shrink:0!important}
.ai-avatar-logo{background:transparent!important;box-shadow:none!important;overflow:hidden!important;padding:0!important}
.message.ai .msg-avatar.ai-avatar-logo{background:transparent!important;box-shadow:none!important}
.ai-avatar-logo img{width:100%!important;height:100%!important;object-fit:contain!important;display:block!important;border-radius:7px!important}

/* welcome panels: natural height (no forced empty box) */
.welcome{align-items:start!important}
.welcome .panel{display:flex!important;flex-direction:column!important}

/* "Needs your attention" moved under the greeting — clean divider block */
.welcome-attention{margin-top:22px!important;padding-top:20px!important;border-top:1px solid #ececf4!important}
.welcome-attention-head{display:flex!important;align-items:center!important;justify-content:space-between!important;margin-bottom:12px!important}
.welcome-attention-head h3{font-size:16px!important;margin:0!important;font-family:'Fraunces',Georgia,serif!important}
.welcome-attention-head span{font-size:13px!important;color:#787a8a!important;font-family:'Hanken Grotesk',sans-serif!important}
.welcome-attention .needs-action-list{display:grid!important;gap:10px!important}
.attention-empty{display:flex!important;align-items:center!important;gap:11px!important;padding:14px 2px 4px!important;color:#787a8a!important;font-size:14px!important;line-height:1.5!important}
.attention-empty-check{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:26px!important;height:26px!important;border-radius:50%!important;background:#e6f4ec!important;color:#2f855a!important;font-weight:700!important;font-size:14px!important;flex-shrink:0!important}

/* ================= Focused dashboard ================= */
/* header: greeting left, primary + "New" menu right (no button wall) */
.welcome.dash-header{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:20px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin-bottom:22px!important}
.dash-greet{min-width:0!important}
.dash-greet h2{margin:0 0 4px!important}
.dash-greet p{margin:0!important;color:#787a8a!important}
.dash-actions{display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:12px!important;flex-shrink:0!important}
.dash-actions-primary{display:flex!important;align-items:center!important;gap:10px!important}
.dash-actions-primary .btn{min-height:42px!important}
.dash-vittor{display:inline-flex!important;align-items:center!important;gap:8px!important;background:#fff!important;border:1px solid #e0def7!important;color:#23252f!important}
.dash-vittor:hover{background:#faf9ff!important;border-color:#c8c3f5!important}
.dash-vittor svg{width:16px!important;height:16px!important;flex-shrink:0!important}
.dash-actions-links{display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;gap:6px 16px!important;max-width:380px!important}
.dash-actions-links a,.dash-actions-links button{background:transparent!important;border:0!important;padding:0!important;font:inherit!important;font-weight:600!important;font-size:13px!important;color:#23252f!important;cursor:pointer!important;text-decoration:none!important;white-space:nowrap!important}
.dash-actions-links a:hover,.dash-actions-links button:hover{text-decoration:underline!important;text-decoration-color:#1c1d24!important}

/* Today panel */
.today-card{margin-bottom:22px!important}
.today-list{display:grid!important;gap:8px!important}
.today-item{display:grid!important;grid-template-columns:88px 1fr auto!important;align-items:center!important;gap:14px!important;padding:12px 14px!important;border:1px solid #ececf4!important;border-radius:12px!important;text-decoration:none!important;color:inherit!important;background:#fff!important}
.today-item:hover{background:#f6f6fd!important}
.today-time{font-weight:700!important;color:#5f68d6!important;font-size:14px!important}
.today-main{display:flex!important;flex-direction:column!important;min-width:0!important}
.today-main strong{font-size:14.5px!important}
.today-main span{color:#787a8a!important;font-size:13px!important}
.today-status{font-size:12px!important;font-weight:600!important;color:#787a8a!important;background:#f1f1f8!important;padding:4px 10px!important;border-radius:999px!important;white-space:nowrap!important}
.today-empty{display:flex!important;align-items:center!important;gap:11px!important;padding:6px 2px!important;color:#787a8a!important;font-size:14px!important}
.today-empty a{color:#5f68d6!important}
.today-empty-check{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:26px!important;height:26px!important;border-radius:50%!important;background:#e6f4ec!important;color:#2f855a!important;font-weight:700!important;flex-shrink:0!important}

/* dashboard home: only 3 KPIs (scoped so it never hits the Invoices page) */
.dash-stats .stat-link:nth-child(4),.dash-stats .stat-link:nth-child(5){display:none!important}

/* ===== compact KPI strip: one light bar with dividers (not chunky cards) ===== */
.stats{display:flex!important;flex-wrap:wrap!important;gap:0!important;
  background:#ffffff!important;border:1px solid #e8e8f2!important;border-radius:14px!important;
  box-shadow:none!important;overflow:hidden!important;margin-bottom:20px!important;
  grid-template-columns:none!important}
.stats>*{flex:1 1 0!important;min-width:150px!important;border-left:1px solid #eef0f6!important}
.stats>*:first-child{border-left:0!important}
.stats .stat{background:transparent!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;padding:14px 20px!important;height:100%!important}
.stats .stat-link{text-decoration:none!important;color:inherit!important}
.stats .stat span{font-size:12px!important;letter-spacing:.03em!important}
.stats .stat strong{font-size:22px!important;margin-top:3px!important}
.stats .stat small{margin-top:2px!important}

/* ===== consistent list-page header (Invoices layout on every page) ===== */
/* title on the left, action buttons grouped on the right */
.card-head,.feed-head,.activity-head{
  display:flex!important;align-items:flex-start!important;justify-content:space-between!important;
  gap:16px!important;flex-wrap:wrap!important}
.invoice-head-actions,.feed-head-actions,.activity-head-actions,.cust-head-actions{
  display:flex!important;align-items:center!important;gap:8px!important;flex-shrink:0!important;flex-wrap:wrap!important}
/* settings: give the panel real breathing room below the nav (was jammed/clipped) */
.page>.settings-shell,.settings-shell{margin-top:26px!important}
.settings-content .card{overflow:visible!important}
/* make the main panel container a proper padded card (matches Invoice preview / Export) */
.settings-content .grid>main.card{background:#ffffff!important;border:1px solid #e8e8f2!important;border-radius:15px!important;box-shadow:none!important}
.settings-content .grid>main.card>.card-body{padding:24px 26px!important}
/* hide that main card entirely when its panel isn't the active one (kills the stray empty "stripe" on preview/export/danger tabs) */
.settings-content .grid>main.card:not(:has(.panel-active)){display:none!important}
.settings-content .section[data-panel].panel-active{margin-top:0!important;padding-top:0!important;border-top:0!important}
/* keep the generic main card-head hidden (each panel shows its own h3) */
.settings-content .grid>main.card>.card-head{display:none!important}
/* standalone settings cards (preview / export / danger) keep a stacked header */
.card[data-panel="preview"]>.card-head,.card[data-panel="export"]>.card-head,.card[data-panel="danger"]>.card-head{display:block!important}
.card[data-panel="preview"]>.card-head p,.card[data-panel="export"]>.card-head p,.card[data-panel="danger"]>.card-head p{margin-top:5px!important;max-width:680px!important}
/* search + filters sit on their own row beneath the header */
.expenses-toolbar{display:flex!important;margin-top:14px!important}
.expenses-toolbar-left{display:flex!important;gap:10px!important;flex:1 1 auto!important;min-width:0!important}
.activity-panel>.filters,.feed .expenses-toolbar{margin-top:14px!important}

/* ===== Operations overview: slim, scannable cards (one big number + status + button) ===== */
.operations-feature .ops-panel-body{display:flex!important;flex-direction:column!important;gap:10px!important;min-height:0!important}
/* first metric = the single big number, stacked (number on top, label below) */
.operations-feature .operations-metric:first-of-type{order:0!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:1px!important;border:0!important;padding:0!important;margin:0!important}
.operations-feature .operations-metric:first-of-type strong{order:0!important;font-family:'Hanken Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif!important;font-weight:700!important;font-size:34px!important;line-height:1.05!important;color:#23252f!important;letter-spacing:-.01em!important}
.operations-feature .operations-metric:first-of-type span{order:1!important;color:#787a8a!important;font-size:12.5px!important;font-weight:600!important;text-transform:none!important}
/* hide the second metric — it's already in Pipeline health */
.operations-feature .operations-metric ~ .operations-metric{display:none!important}
/* short muted status line */
.operations-feature .feature-live-copy{order:1!important;color:#787a8a!important;font-size:13.5px!important;line-height:1.45!important;margin:0!important;font-weight:500!important}
.operations-feature .feature-live-copy span{display:block!important;font-size:12.5px!important;margin-top:1px!important;color:#9a9aa8!important}
/* one button, pinned to the bottom-left */
.operations-feature .btn{order:2!important;margin-top:4px!important;align-self:flex-start!important}

/* one hero chart; move mix/audit/at-a-glance off the home screen */
.insights{grid-template-columns:1fr!important}
.insights>.card:nth-child(2){display:none!important}
.audit-summary{display:none!important}
.layout>aside{display:none!important}

/* ============ tables fit the screen — no horizontal cutoff ============ */
.customer-table,.invoice-table,.payment-table{
  min-width:0!important;width:100%!important;table-layout:auto!important}
.customer-table th,.customer-table td,
.invoice-table th,.invoice-table td{width:auto!important}
/* let long emails/addresses wrap instead of forcing the table wider */
.customer-table .customer-cell,.customer-name-link{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  overflow-wrap:anywhere!important;max-width:none!important}
.customer-cell.address{overflow-wrap:anywhere!important;max-width:none!important}
/* keep money on one line */
.balance-amount,.customer-table td .balance-amount{white-space:nowrap!important}
/* the wrapper no longer needs to scroll horizontally */
.customer-table-wrap,.customers-shell .customer-table-wrap,.table-wrap{overflow-x:visible!important}
/* a touch more density (less "zoomed") */
.customer-table td{height:auto!important;padding-top:12px!important;padding-bottom:12px!important}
.customer-table th{padding-top:10px!important;padding-bottom:10px!important}

/* ============================================================
   MOBILE (<=760px) — this file has no media queries and loads
   AFTER mobile.css, so its unconditional !important layouts win
   on phones. Re-stack + right-size everything here so the phone
   view is clean and organized, not sparse or oversized.
   ============================================================ */
/* Phones in BOTH orientations: portrait matches max-width; landscape phones
   are wider than 760px but very short, so max-height catches them (keeps the
   bottom tab bar + mobile shell from vanishing on rotate). */
@media (max-width:760px), (max-height:500px){
  /* Container: tighter side padding + real room at the bottom for
     the docked button and setup pill. (umano's .page rule above
     otherwise forces 28px sides and only 56px bottom on phones.) */
  .page,.ops-page{padding:12px 14px calc(94px + env(safe-area-inset-bottom,0px))!important;max-width:none!important}

  /* ===== Sticky app-bar header — same treatment as the invoice flow.
     Welds the white header to the top edge, bleeds it past the page's
     side padding so it spans the full screen width, and pins it while
     scrolling so navigation is always one tap away. Applies to every
     page (both the .page and .ops-page shells share this .topbar). */
  .topbar,.ops-topbar{
    position:sticky!important;top:0!important;z-index:500!important;
    margin:-12px -14px 14px!important;
    padding:10px 14px!important;
    min-height:56px!important;
    background:rgba(255,255,255,.9)!important;background-color:rgba(255,255,255,.9)!important;
    -webkit-backdrop-filter:saturate(180%) blur(16px)!important;
    backdrop-filter:saturate(180%) blur(16px)!important;
    border:0!important;border-bottom:1px solid rgba(28,29,36,.12)!important;border-radius:0!important;
    box-shadow:0 4px 16px rgba(28,29,36,.06)!important}
  /* the expanded hamburger menu keeps a solid backdrop (not glass) so
     the links behind it never bleed through when it's open */
  .topbar.nav-open,.ops-topbar.nav-open{background:#ffffff!important;background-color:#ffffff!important}

  /* =====================================================================
     Mobile nav = ONE hamburger that opens a single popup list.
     No tabs are ever shown inline on a phone; every destination lives in
     the dropdown so the header stays uncluttered. Lives here (last-loaded)
     so it beats mobile.css's 2-column grid + app-nav.css's inline row.
     ===================================================================== */

  /* the toggle app-mobile.js injects becomes an icon-only hamburger */
  .mobile-nav-toggle{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    width:46px!important;min-width:46px!important;max-width:46px!important;
    height:44px!important;min-height:44px!important;padding:0!important;gap:0!important;
    border:1px solid #e0e0ea!important;border-radius:12px!important;
    background:#ffffff!important;color:#23252f!important;font:inherit!important;box-shadow:none!important}
  .mobile-nav-toggle span,.mobile-nav-toggle strong{
    position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
    overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
  .mobile-nav-toggle::before{content:"\2630"!important;font-size:23px!important;line-height:1!important;color:#23252f!important}
  .topbar.nav-open .mobile-nav-toggle::before,.ops-topbar.nav-open .mobile-nav-toggle::before{content:"\2715"!important;font-size:19px!important}

  /* The tab row becomes a floating popup, hidden until the hamburger is tapped.
     Every selector below is prefixed with `.topbar ` — the ops header carries
     BOTH `topbar` and `ops-topbar`, so this one prefix covers every page AND
     adds a class of specificity so these rules beat app-nav.css (.actions .btn),
     app-operations.css (.ops-topbar .actions) and the runtime-injected theme
     <style> (.actions .nav-active) that all fight over the nav. */
  .topbar .actions,.topbar .top-actions{
    display:none!important;
    position:absolute!important;top:calc(100% + 8px)!important;right:8px!important;left:auto!important;
    width:min(280px,calc(100vw - 24px))!important;
    grid-template-columns:none!important;flex-direction:column!important;
    flex-wrap:nowrap!important;gap:2px!important;align-items:stretch!important;
    padding:8px!important;margin:0!important;
    background:#ffffff!important;border:1px solid #e8e8f2!important;border-radius:14px!important;
    box-shadow:0 20px 48px rgba(30,32,60,.20)!important;
    z-index:600!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;
    max-height:calc(100vh - 84px)!important}
  .topbar.nav-open .actions,.topbar.nav-open .top-actions{display:flex!important}

  /* every destination = one flat full-width row (no pills, no borders, no gaps) */
  .topbar .actions>.btn,.topbar .actions>a,.topbar .top-actions>.btn,.topbar .top-actions>a{
    width:100%!important;min-height:46px!important;grid-column:auto!important;margin:0!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    padding:12px!important;border:0!important;border-radius:10px!important;
    background:transparent!important;color:#23252f!important;
    font-size:15px!important;font-weight:600!important;text-align:left!important;letter-spacing:0!important;
    white-space:nowrap!important;text-decoration:none!important;box-shadow:none!important}
  .topbar .actions>.btn:hover,.topbar .actions>a:hover,.topbar .top-actions>.btn:hover,.topbar .top-actions>a:hover{background:#f4f4fb!important}
  /* current page = subtle periwinkle highlight, still a flat row (3 classes,
     so it beats the injected theme's dark-fill .actions .nav-active rule) */
  .topbar .actions .nav-active,.topbar .actions [aria-current="page"],
  .topbar .top-actions .nav-active,.topbar .top-actions [aria-current="page"]{
    background:#ececfb!important;color:#5f68d6!important;border:0!important;border-radius:10px!important;
    font-weight:700!important;text-decoration:none!important;box-shadow:none!important}

  /* flatten the "More" (…) submenu into the same list — no menu-in-menu */
  .topbar .nav-more{width:100%!important;position:static!important;display:flex!important;flex-direction:column!important;order:9!important}
  .topbar .nav-more-btn{display:none!important}
  .topbar .nav-more-menu,.topbar .nav-more-menu[hidden]{
    display:flex!important;flex-direction:column!important;gap:2px!important;
    position:static!important;width:100%!important;margin:4px 0 0!important;padding:6px 0 0!important;
    border:0!important;border-top:1px solid #eef0f6!important;border-radius:0!important;box-shadow:none!important;
    background:transparent!important;max-height:none!important}
  .topbar .nav-more-menu a,.topbar .nav-more-menu button{
    width:100%!important;min-height:46px!important;margin:0!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    padding:12px!important;border:0!important;border-radius:10px!important;background:transparent!important;
    color:#23252f!important;font:inherit!important;font-size:15px!important;font-weight:600!important;
    text-align:left!important;text-decoration:none!important;cursor:pointer!important}
  .topbar .nav-more-menu a:hover,.topbar .nav-more-menu button:hover{background:#f4f4fb!important}
  .topbar .nav-more-menu [data-sign-out]{color:#c0492f!important}

  /* the builder step chips are not navigation — keep them out of the popup */
  .topbar .actions .stepper,.topbar .top-actions .stepper{display:none!important}

  /* Operations sub-dropdown (ops pages) flows inline inside the popup */
  .topbar .operations-menu{width:100%!important;order:5!important}
  .topbar .operations-trigger{width:100%!important}
  .topbar .operations-panel{position:static!important;width:100%!important;transform:none!important;box-shadow:none!important;
    margin:2px 0 0!important;padding:0!important;border:0!important;display:none!important;
    opacity:1!important;visibility:visible!important;pointer-events:auto!important}
  .topbar .operations-menu.open .operations-panel,.topbar .operations-menu.active .operations-panel{display:flex!important;flex-direction:column!important;transform:none!important}
  .topbar .operations-panel a{min-height:44px!important;border:0!important;background:transparent!important}

  /* ===================================================================
     Persistent bottom tab bar — Stripe/Square-style thumb navigation.
     Injected by app-mobile.js on hub pages (skipped on focused builder
     flows, which keep their own bottom action bar). Gated on the
     .has-mobile-tabbar root class so it only exists where injected. */
  html.has-mobile-tabbar .mobile-tabbar{
    display:flex!important;align-items:stretch!important;
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:130!important;
    padding:0 2px env(safe-area-inset-bottom,0px)!important;margin:0!important;
    background:#ffffff!important;background-image:none!important;
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
    filter:none!important;border:0!important;border-top:0!important;box-shadow:none!important}
  .mobile-tabbar .mobile-tab{
    flex:1 1 0!important;min-width:0!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    gap:3px!important;padding:8px 2px 6px!important;min-height:54px!important;
    background:transparent!important;border:0!important;text-decoration:none!important;cursor:pointer!important;
    color:#8a8a99!important;font-family:'Hanken Grotesk',-apple-system,sans-serif!important}
  .mobile-tabbar .mobile-tab svg{width:23px!important;height:23px!important;display:block!important;flex:0 0 auto!important;max-width:none!important}
  .mobile-tabbar .mobile-tab span{
    font-size:10px!important;font-weight:600!important;line-height:1!important;letter-spacing:0!important;text-transform:none!important;
    max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:inherit!important}
  .mobile-tabbar .mobile-tab.is-active{color:#5f68d6!important}
  .mobile-tabbar .mobile-tab.is-active svg{stroke-width:2.2!important}
  /* reserve room so page content clears the bar */
  html.has-mobile-tabbar .page,html.has-mobile-tabbar .ops-page{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important}
  /* a page's primary action dock rides ABOVE the tab bar */
  html.has-mobile-tabbar .mobile-action-dock{bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
  html.has-mobile-tabbar.has-action-dock .page,html.has-mobile-tabbar.has-action-dock .ops-page{padding-bottom:calc(140px + env(safe-area-inset-bottom,0px))!important}
  /* floating widgets sit above the tab bar too (both AI-button variants) */
  html.has-mobile-tabbar .ai-side-tab,
  html.has-mobile-tabbar .ai-float-btn{bottom:calc(74px + env(safe-area-inset-bottom,0px))!important}
  html.has-mobile-tabbar .ko-guide{bottom:calc(72px + env(safe-area-inset-bottom,0px))!important}
  /* while the More sheet is open, hide the floating setup pill so it doesn't
     hover over the More button / on top of the sheet */
  html.mobile-sheet-open .ko-guide{display:none!important}
  /* with a complete bottom nav (4 tabs + More sheet), the header hamburger is
     redundant on hub pages — drop it so the header is just the logo. Focused
     flows (no tab bar) keep the ☰ since that's their only nav. */
  html.has-mobile-tabbar .mobile-nav-toggle{display:none!important}

  /* ===== Expenses list → clean stacked cards showing EVERY field =====
     The expenses page hides the date + category and single-lines the row on
     small screens. Restore all fields in a readable card:
       [category]                     [⋮]
       Vendor
       Description (wraps) / Invoice tag
       Date                       Amount   */
  #exp-feed{display:grid!important;gap:10px!important;padding:12px 0 2px!important}
  .exp-row{
    grid-template-columns:1fr auto!important;
    grid-template-areas:"cat menu" "info info" "date amount"!important;
    gap:6px 12px!important;align-items:start!important;
    padding:14px!important;margin:0!important;
    border:1px solid #e8e8f2!important;border-radius:14px!important;
    background:#ffffff!important;box-shadow:0 1px 2px rgba(30,32,60,.045)!important}
  .exp-row>div:nth-child(2){grid-area:cat!important;justify-self:start!important;align-self:center!important}
  .exp-row .cat-badge{display:inline-flex!important}
  .exp-row .row-menu-wrap{grid-area:menu!important;justify-self:end!important;align-self:start!important}
  .exp-row .exp-info{grid-area:info!important;min-width:0!important}
  .exp-row .exp-vendor{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:15px!important;line-height:1.3!important}
  .exp-row .exp-desc{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:13px!important;line-height:1.35!important;margin-top:3px!important}
  .exp-row .exp-inv-tag{white-space:normal!important;margin-top:5px!important}
  .exp-row .exp-date{grid-area:date!important;display:block!important;justify-self:start!important;align-self:center!important;
    white-space:nowrap!important;font-size:13px!important;margin-top:4px!important}
  .exp-row .exp-amount{grid-area:amount!important;justify-self:end!important;align-self:center!important;
    text-align:right!important;font-size:16px!important;margin-top:4px!important;white-space:nowrap!important}

  /* Expenses accordion cards — tap a card to reveal all fields + action
     buttons (same pattern as the customer cards). Rendered by
     renderMobileExpenses() on phones. */
  .mobile-exp-list{display:grid!important;gap:10px!important;padding:12px 0 2px!important}
  .mobile-exp-card{background:#fff!important;border:1px solid #e8e8f2!important;border-radius:14px!important;
    box-shadow:0 1px 2px rgba(30,32,60,.045)!important;overflow:hidden!important}
  .mobile-exp-card>summary{list-style:none!important;cursor:pointer!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto 16px!important;align-items:center!important;gap:12px!important;padding:14px!important}
  .mobile-exp-card>summary::-webkit-details-marker{display:none!important}
  .mobile-exp-card .mx-line{display:grid!important;gap:2px!important;min-width:0!important}
  .mobile-exp-card .mx-line strong{font-size:15px!important;line-height:1.25!important;color:#23252f!important;font-weight:700!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .mobile-exp-card .mx-line small{font-size:12.5px!important;color:#787a8a!important}
  .mobile-exp-card .mx-amt{font-size:16px!important;font-weight:700!important;color:#c0492f!important;white-space:nowrap!important}
  .mobile-exp-card>summary b{width:9px!important;height:9px!important;border-right:2.5px solid #9a9aa8!important;border-bottom:2.5px solid #9a9aa8!important;
    transform:rotate(45deg)!important;transition:transform .18s ease!important;justify-self:center!important}
  .mobile-exp-card[open]>summary b{transform:rotate(-135deg)!important}
  .mobile-exp-details{display:grid!important;gap:11px!important;padding:2px 14px 14px!important;border-top:1px solid #f0f0f6!important}
  .mobile-exp-details>div:not(.mobile-exp-actions){display:grid!important;gap:3px!important}
  .mobile-exp-details>div>span{color:#787a8a!important;font-size:12px!important;font-weight:600!important}
  .mobile-exp-details>div>strong{color:#23252f!important;font-size:14px!important;line-height:1.3!important;font-weight:600!important;overflow-wrap:anywhere!important}
  .mobile-exp-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding-top:4px!important}
  .mobile-exp-actions button{min-height:44px!important;border:1px solid #d9d9e6!important;border-radius:10px!important;
    background:#fff!important;color:#23252f!important;font:inherit!important;font-size:14px!important;font-weight:700!important;cursor:pointer!important}
  .mobile-exp-actions button:first-child{background:#1c1d24!important;border-color:#1c1d24!important;color:#fff!important}
  .mobile-exp-actions button.danger{background:#fff!important;border-color:#f0d5cf!important;color:#c0492f!important}

  /* Headings: cap the Fraunces serif titles so they stop wrapping
     into two or three oversized lines. Page titles > card titles. */
  h1,h2{font-size:22px!important;line-height:1.16!important}
  h3{font-size:17px!important;line-height:1.25!important}
  .card-head h2,.feed-head h2,.activity-head h2,.panel h2,.ops-head h2{font-size:19px!important;line-height:1.2!important}

  /* Dashboard header: greeting on top, actions full-width below */
  .welcome.dash-header{flex-direction:column!important;align-items:stretch!important;gap:14px!important;margin-bottom:18px!important}
  .dash-actions{align-items:stretch!important;width:100%!important}
  .dash-actions-primary{width:100%!important}
  .dash-actions-primary .btn{flex:1 1 0!important}
  .dash-actions-links{justify-content:flex-start!important;max-width:none!important;gap:10px 16px!important}

  /* KPI strip -> compact 2-column grid of mini-cards (was one tall,
     sparse column). Each cell is self-contained so long text like
     price names wraps cleanly without squeezing its neighbour. */
  .stats{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;
    background:transparent!important;border:0!important;border-radius:0!important;
    box-shadow:none!important;overflow:visible!important;padding:0!important}
  .stats>*{flex:none!important;min-width:0!important;border:1px solid #e8e8f2!important;
    border-radius:12px!important;background:#fff!important}
  .stats .stat{padding:12px 14px!important;height:auto!important}
  .stats .stat span{overflow-wrap:anywhere!important}
  .stats .stat strong{font-size:20px!important;overflow-wrap:anywhere!important}

  /* "Today" rows: time + title on one row, status pill wraps below */
  .today-item{grid-template-columns:auto 1fr!important;gap:4px 12px!important;padding:12px!important}
  .today-status{grid-column:1/-1!important;justify-self:start!important;margin-top:2px!important}

  /* List/section headers: title stacked above the action buttons */
  .card-head,.feed-head,.activity-head{flex-direction:column!important;align-items:stretch!important;gap:12px!important}
  .invoice-head-actions,.feed-head-actions,.activity-head-actions,.cust-head-actions{flex-wrap:wrap!important}

  /* Search/filter toolbars stack instead of sitting in a tight row */
  .expenses-toolbar{flex-direction:column!important;gap:10px!important}
  .expenses-toolbar-left{flex-direction:column!important;gap:10px!important}

  /* Setup-guide pill: lift it above the docked action button so it
     stops covering primary CTAs (Record payment / Create estimate).
     Its base position isn't !important, so this wins regardless of
     stylesheet order. */
  .ko-guide{right:12px!important;left:auto!important;width:auto!important;
    bottom:calc(88px + env(safe-area-inset-bottom,0px))!important}
  .ko-card{width:calc(100vw - 24px)!important;max-width:340px!important}

  /* ---- Page-unique multi-column grids that stacking is always
     correct for on a phone (modal/drawer forms, AI-capture flows,
     dashboard mini-grids, builder line-item rows). Safe to force
     since a two-column form never belongs on a ~360px screen. ---- */
  .mini-grid,.dash-form-row,.compact-row,.edit-form,
  .customer-modal-body,.pay-customer-modal-body,.pay-quick-modal-body,
  .pay-drawer-mode-options,.ai-capture-layout,.ai-record-actions,
  .ai-review-grid,.voice-actions,.inv-grid,.job-line-item{
    grid-template-columns:1fr!important}

  /* Secondary KPI rows: 2-up instead of cramming 3-5 across */
  .mini-stats{grid-template-columns:1fr 1fr!important}

  /* Any element that still tries to be wider than the screen gets
     clipped rather than forcing the whole page to scroll sideways. */
  img,canvas,svg,video,iframe{max-width:100%!important;height:auto!important}

  /* ================= SITE-WIDE polish — every page ================= */
  /* 16px inputs so iOS Safari never zooms the page in on field focus */
  input,select,textarea{font-size:16px!important}

  /* Primary action groups: thumb-friendly, full-width buttons */
  .tool-actions,.record-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important}
  .tool-actions .btn,.record-actions .btn,.form-actions .btn,
  .confirm-actions .btn,.edit-actions .btn{flex:1 1 100%!important;min-height:48px!important}

  /* "How do you want to create this?" choice screens (every builder)
     become full-screen, top-aligned sheets instead of a floating card. */
  #mode-screen,.mode-screen,.invoice-mode-screen{
    padding:0!important;place-items:stretch!important;align-content:start!important}
  #mode-screen .mode-card,.mode-screen .mode-card,.invoice-mode-screen .mode-card{
    width:100%!important;max-width:none!important;min-height:100dvh!important;
    align-content:start!important;
    border-radius:0!important;border-left:0!important;border-right:0!important;
    box-shadow:none!important;padding:20px 16px 28px!important}
  /* Never let the little pill badge stretch to fill a tall grid row
     (that turned it into a giant circle). */
  .mode-option b,.ai-entry-button b{align-self:start!important;justify-self:start!important;width:auto!important;height:auto!important}
  .mode-option{align-content:start!important}

  /* Full-screen form overlays (invoice / payment / job / price builders)
     become edge-to-edge sheets; small confirm dialogs are left centered. */
  .panel[style*="fixed"]>div:first-child,.panel[style*="fixed"]>.form-grid,
  .est-builder-shell{border-radius:0!important;border-left:0!important;border-right:0!important}
}

/* ============================================================
   UI REFRESH (2026-07-27) — align app with landing/demo look.
   Pure visual layer: fonts (Plus Jakarta Sans + Inter) + indigo
   accent + button/card polish. No markup/nav/behavior changes.
   Loaded last in this file so it overrides the rules above.
   To revert: delete this block (and the second @import at top).
   ============================================================ */
:root{
  --ui-accent:#4f46e5!important; --ui-accent-hover:#4338ca!important;
  --ui-accent-soft:#eef0fe!important; --ui-accent-softer:#f5f6ff!important;
  --ui-blue:#4f46e5!important; --blue:#4f46e5!important; --blue-hover:#4338ca!important;
  --accent:#4f46e5!important; --accent-hover:#4338ca!important; --accent-soft:#eef0fe!important;
}
html,body,input,select,textarea,button,.btn,table,.card,.panel{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif!important}
h1,h2,h3,h4,.card-head h2,.card-head h3,.ops-head h2,.panel h2,.brand h1,.ops-brand h1,
#welcome-title,.cust-empty-title,.inv-empty-title,.greet,.hub-title,.stat strong,.stat b{
  font-family:'Plus Jakarta Sans','Inter',sans-serif!important;
  font-weight:800!important;letter-spacing:-.02em!important}
body .btn-primary,body .btn-dark,body .pay-link,body #confirm-invoice,body .summary-action .btn,
body .quick-primary,body .cust-add-btn,body .pay-add-btn,body .inv-add-btn,body .dash-actions-primary .btn-primary{
  background:var(--ui-accent)!important;border-color:var(--ui-accent)!important;color:#fff!important}
body .btn-primary:hover,body .btn-dark:hover,body .pay-link:hover,body #confirm-invoice:hover,body .summary-action .btn:hover,
body .quick-primary:hover,body .cust-add-btn:hover,body .pay-add-btn:hover,body .inv-add-btn:hover,body .dash-actions-primary .btn-primary:hover{
  background:var(--ui-accent-hover)!important;border-color:var(--ui-accent-hover)!important}
.card,.panel,.stat,.today-card,.audit-summary,.mini-card{border-radius:14px!important}
.stat span{letter-spacing:.03em!important}

/* ============================================================
   LEFT SIDEBAR NAV (2026-07-27) — restyle the existing .topbar
   into a fixed left rail to match the demo. Desktop only
   (min-width:900px) so the mobile tab bar/layout is untouched.
   Pure CSS: nav markup + app-nav.js logic unchanged.
   To revert: delete this block.
   ============================================================ */
@media(min-width:900px){
  body{padding-left:234px!important}
  .topbar{position:fixed!important;top:0!important;left:0!important;bottom:0!important;width:234px!important;height:100vh!important;
    flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:5px!important;
    padding:20px 14px!important;margin:0!important;border-right:1px solid var(--line,#e8e8f2)!important;border-bottom:0!important;
    border-radius:0!important;background:#fff!important;overflow-y:auto!important;z-index:60!important;box-shadow:none!important}
  .topbar .brand{margin:0 0 14px!important;padding:2px 8px!important;flex:0 0 auto!important}
  .topbar .brand>div{display:none!important}          /* hide the "Operations / <PageTitle>" text; keep the logo */
  .topbar .brand img{height:26px!important;width:auto!important}
  .topbar .actions,.topbar .top-actions{flex-direction:column!important;align-items:stretch!important;width:100%!important;gap:3px!important;margin:0!important;flex-wrap:nowrap!important;
    flex:0 0 auto!important;justify-content:flex-start!important}   /* top-align the rail (base rule grows + bottom-aligns it) */
  .topbar .actions .btn,.topbar .top-actions .btn{justify-content:flex-start!important;width:100%!important;text-align:left!important;
    border:0!important;background:transparent!important;color:var(--muted,#5b6577)!important;font-weight:650!important;
    padding:10px 12px!important;border-radius:9px!important;box-shadow:none!important;min-height:0!important}
  .topbar .actions .btn:hover,.topbar .top-actions .btn:hover{background:var(--soft,#f4f4fb)!important;color:var(--ink,#23252f)!important}
  .topbar .actions a.nav-active,.topbar .actions a[aria-current="page"],
  .topbar .top-actions a.nav-active,.topbar .top-actions a[aria-current="page"]{
    background:var(--ui-accent,#4f46e5)!important;color:#fff!important;border:0!important}
  .topbar .actions a.nav-active::after,.topbar .actions a[aria-current="page"]::after{display:none!important}
  /* "More" hamburger -> show all its items inline as sidebar links (like the demo) */
  .topbar .nav-more{width:100%!important;position:static!important;display:flex!important;flex-direction:column!important;gap:3px!important}
  .topbar .nav-more-btn{display:none!important}
  .topbar .nav-more-menu,.topbar .nav-more-menu[hidden]{display:flex!important;flex-direction:column!important;position:static!important;
    box-shadow:none!important;border:0!important;background:transparent!important;padding:0!important;margin:0!important;min-width:0!important;gap:3px!important;visibility:visible!important;opacity:1!important;transform:none!important}
  .topbar .nav-more-menu a,.topbar .nav-more-menu button{display:block!important;width:100%!important;text-align:left!important;
    padding:10px 12px!important;color:var(--muted,#5b6577)!important;border-radius:9px!important;font-weight:650!important;font-size:15px!important;background:transparent!important;border:0!important}
  .topbar .nav-more-menu a:hover,.topbar .nav-more-menu button:hover{background:var(--soft,#f4f4fb)!important;color:var(--ink,#23252f)!important}
  .topbar .nav-more-menu [data-sign-out]{margin-top:6px!important;color:#c0492f!important}
  /* keep the wide content container, just inside the rail */
  .page,.ops-page{margin-left:auto!important;margin-right:auto!important}
}

/* sidebar fixes: active item -> indigo (match demo); move AI drawer tab to the
   right edge so it doesn't overlap the left rail. */
@media(min-width:900px){
  body .topbar .actions a.nav-active,body .topbar .actions a[aria-current="page"],
  body .topbar .top-actions a.nav-active,body .topbar .top-actions a[aria-current="page"]{
    background:var(--ui-accent,#4f46e5)!important;background-color:var(--ui-accent,#4f46e5)!important;color:#fff!important}
  .ai-side-tab{left:auto!important;right:0!important;border-radius:14px 0 0 14px!important}
  /* NOTE: .ai-tab-tip (the first-visit tooltip) deliberately has no override here anymore — it
     used to mirror this same left/right flip with an !important rule, but that meant two files
     had to agree on the exact breakpoint, and any drift between them ran the tooltip off-screen.
     ai-drawer.js now measures the tab's actual rendered position at show-time and sets left/right
     directly, which is correct regardless of what triggers the tab to be on either edge. */
}

/* sidebar: force the rail to top-align (base .actions uses flex:1 1 auto +
   justify-content:flex-end which was bottom-clustering the nav). High specificity
   + explicit longhands so nothing overrides it. */
@media(min-width:900px){
  body .topbar{justify-content:flex-start!important;align-content:flex-start!important}
  body .topbar .actions,body .topbar .top-actions,body .topbar [id^="app-nav-actions"]{
    flex:0 0 auto!important;flex-grow:0!important;flex-shrink:0!important;
    justify-content:flex-start!important;align-self:flex-start!important;align-content:flex-start!important}
}

/* breathing room at the top of the content (was flush against the viewport edge
   once the header moved to the left rail). */
@media(min-width:900px){
  .page,.ops-page{padding-top:34px!important}
}

/* Dashboard KPI tiles -> demo-style separate rounded cards (was a divided band).
   Scoped to .dash-stats so the invoices-page tiles are unaffected. */
@media(min-width:900px){
  .dash-stats{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:14px!important;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important}
  .dash-stats>*{flex:none!important;min-width:0!important;border-left:0!important;background:#fff!important;border:1px solid var(--line,#e8e8f2)!important;border-radius:14px!important;box-shadow:0 6px 18px rgba(16,24,40,.05)!important}
  .dash-stats .stat{padding:16px 18px!important;height:100%!important}
  .dash-stats .stat span{text-transform:uppercase!important;font-size:11px!important;letter-spacing:.04em!important;font-weight:700!important;color:var(--muted,#787a8a)!important}
  .dash-stats .stat strong{font-family:'Plus Jakarta Sans',sans-serif!important;font-size:26px!important;font-weight:800!important;display:block!important;margin-top:8px!important;color:var(--ink,#23252f)!important}
  .dash-stats .stat small{display:block!important;margin-top:4px!important;font-size:12px!important}
}
@media(min-width:900px) and (max-width:1200px){.dash-stats{grid-template-columns:repeat(2,1fr)!important}}
