/* =====================================================================
   SalesTracker design system (v2)
   One layer on top of the original styles: type, colour, spacing,
   components and the bottom navigation. Loaded last.
   ===================================================================== */
/* Fonts as on fiscalsales.com: Montserrat for headings, Roboto for text (bundled, no web requests) */
@font-face{font-family:'Montserrat';font-style:normal;font-weight:100 900;font-display:swap;src:url(../fonts/montserrat-latin.woff2) format('woff2')}
@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:local('Roboto'),url(../fonts/roboto-latin-400.woff2) format('woff2')}
@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:local('Roboto Medium'),url(../fonts/roboto-latin-500.woff2) format('woff2')}
@font-face{font-family:'Roboto';font-style:normal;font-weight:600 700;font-display:swap;src:local('Roboto Bold'),url(../fonts/roboto-latin-700.woff2) format('woff2')}

/* FiscalSales palette: light green accent, dark green headings, very light green-grey background */
:root{
  --sans:'Roboto',system-ui,-apple-system,'Segoe UI',sans-serif;--head:'Montserrat','Roboto',system-ui,sans-serif;--serif:var(--sans);
  --c-bg:#F7FBFA;--c-surface:#FFFFFF;--c-sunken:#EEF5F3;--c-line:#E3ECE9;--c-line-strong:#CFDCD8;
  --c-text:#172624;--c-text-2:#3D4B48;--c-muted:#66736F;
  --c-primary:#09947D;--c-primary-hover:#07806C;--c-primary-press:#066B5B;--c-primary-soft:#E6F4F1;--c-primary-strong:#075E50;
  --c-amber-bg:#FEF4E2;--c-amber:#93600F;--c-red-bg:#FDECEA;--c-red:#B42318;--c-navy-bg:#EEF3F2;--c-navy:#3D4B48;
  --r-sm:8px;--r-md:10px;--r-lg:12px;--r-xl:18px;
  --sh-1:0 1px 2px rgba(23,38,36,.05);--sh-2:0 4px 12px rgba(23,38,36,.07);--sh-pop:0 18px 44px rgba(23,38,36,.16);
  --nav-h:64px;--safe-b:env(safe-area-inset-bottom,0px);
  --red:var(--c-red);
}
/* headings in Montserrat */
body.st-app .appbar .greet,body.st-app h2.section,body.st-app .s-title,body.st-app .login-title,body.st-app .card .name,body.st-app .stat .n,body.st-app .st-kpi-n,body.st-app .drawer-name,body.st-app .st-month b{font-family:var(--head)!important}
body.st-app .stat .n,body.st-app .st-kpi-n{letter-spacing:-.01em!important}

/* ---------- base ---------- */
body.st-app,body.st-app button,body.st-app input,body.st-app select,body.st-app textarea{font-family:var(--sans)!important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body.st-app{background:var(--c-bg)!important;color:var(--c-text);font-feature-settings:normal}
body.st-app .phone .screen{background:var(--c-bg)!important}
body.st-app .content{padding:16px 16px calc(var(--nav-h) + 28px + var(--safe-b))!important;animation:none!important}
body.st-app *{-webkit-tap-highlight-color:transparent}
body.st-app .n,body.st-app .report-table td,body.st-app .s-row span:last-child{font-variant-numeric:tabular-nums}
@media (prefers-reduced-motion:reduce){body.st-app *{transition:none!important;animation:none!important}}

/* ---------- header ---------- */
body.st-app .appbar{background:var(--c-surface)!important;color:var(--c-text)!important;padding:calc(12px + env(safe-area-inset-top,0px)) 16px 14px!important;border-bottom:1px solid var(--c-line)!important;box-shadow:none!important}
body.st-app .appbar:after,body.st-app .appbar:before{display:none!important}
body.st-app .appbar-left{gap:12px!important;align-items:center!important;min-width:0}
body.st-app .appbar .eyebrow{font-size:11px!important;font-weight:600!important;letter-spacing:.06em!important;color:var(--c-primary)!important;margin:0 0 2px!important}
body.st-app .appbar .greet{font-size:20px!important;font-weight:700!important;letter-spacing:-.02em!important;line-height:1.2!important;color:var(--c-text)!important}
body.st-app .appbar .sub{font-size:13px!important;font-weight:500!important;color:var(--c-muted)!important;margin-top:2px!important}
body.st-app .hamburger{width:40px!important;height:40px!important;min-width:40px;border-radius:var(--r-md)!important;background:var(--c-sunken)!important;border:0!important;box-shadow:none!important}
body.st-app .hamburger .st-menu-bar{background:var(--c-text)!important;width:18px!important;height:2px!important;border-radius:2px}
body.st-app .avatar{background:var(--c-primary-soft)!important;color:var(--c-primary-strong)!important;border:0!important;font-weight:700!important;font-size:13px!important;box-shadow:none!important}
body.st-app .appbar .avatar{width:38px!important;height:38px!important}

/* ---------- section headings ---------- */
body.st-app h2.section{font-size:15px!important;font-weight:650!important;letter-spacing:-.01em!important;color:var(--c-text)!important;margin:24px 0 10px!important}
body.st-app h2.section:first-child{margin-top:4px!important}
body.st-app h2.section .count{background:var(--c-sunken)!important;color:var(--c-text-2)!important;font-weight:600!important;font-size:11.5px!important;padding:1px 8px!important}

/* ---------- summary tiles ---------- */
body.st-app .stat-grid{gap:10px!important}
body.st-app .stat{background:var(--c-surface)!important;border:1px solid var(--c-line)!important;border-radius:var(--r-lg)!important;padding:14px!important;box-shadow:var(--sh-1)!important}
body.st-app .stat:before,body.st-app .stat:after{display:none!important}
body.st-app .stat .n{font-size:22px!important;font-weight:700!important;letter-spacing:-.02em!important;color:var(--c-text)!important;line-height:1.15!important}
body.st-app .stat .l{font-size:12.5px!important;font-weight:500!important;color:var(--c-muted)!important;margin-top:4px!important}
body.st-app .stat:last-child{background:var(--c-primary-soft)!important;border-color:#C4E6DF!important}
body.st-app .stat:last-child .n{color:var(--c-primary-strong)!important}

/* ---------- cards & lists ---------- */
body.st-app .card{background:var(--c-surface)!important;border:1px solid var(--c-line)!important;border-radius:var(--r-lg)!important;padding:14px 16px!important;margin-bottom:10px!important;box-shadow:var(--sh-1)!important}
body.st-app .card:before,body.st-app .card:after{display:none!important}
body.st-app .card.clickable{cursor:pointer;transition:background-color .15s ease,border-color .15s ease}
body.st-app .card.clickable:active{background:#FAFBFC!important;border-color:var(--c-line-strong)!important}
body.st-app .card .name{font-size:15px!important;font-weight:600!important;letter-spacing:-.01em!important;color:var(--c-text)!important}
body.st-app .card .meta,body.st-app .meta{font-size:13px!important;font-weight:400!important;color:var(--c-muted)!important;line-height:1.5!important}
body.st-app .muted{color:var(--c-muted)!important}
body.st-app .list-row{border-color:var(--c-line)!important;padding:12px 0!important}
body.st-app .list-row .title{font-size:14px!important;font-weight:600!important;color:var(--c-text)!important}
body.st-app .list-row .sub{font-size:12.5px!important;color:var(--c-muted)!important}
body.st-app .info-box{background:var(--c-bg)!important;border:1px solid var(--c-line)!important;border-radius:var(--r-md)!important;box-shadow:none!important}
body.st-app .info-box .k{font-size:11px!important;font-weight:600!important;letter-spacing:.04em!important;color:var(--c-muted)!important}
body.st-app .info-box .v{font-size:14px!important;font-weight:500!important;color:var(--c-text)!important}
body.st-app .st-av{background:var(--c-primary-soft)!important;color:var(--c-primary-strong)!important;font-weight:700!important}

/* ---------- badges ---------- */
body.st-app .badge{font-size:11.5px!important;font-weight:600!important;padding:3px 9px 3px 8px!important;letter-spacing:0!important;border:0!important}
body.st-app .badge.green{background:#E6F4F1!important;color:#07806C!important}
body.st-app .badge.amber{background:var(--c-amber-bg)!important;color:var(--c-amber)!important}
body.st-app .badge.red{background:var(--c-red-bg)!important;color:var(--c-red)!important}
body.st-app .badge.navy{background:var(--c-navy-bg)!important;color:var(--c-navy)!important}

/* ---------- buttons ---------- */
body.st-app .btn-primary,body.st-app .small-btn.primary,body.st-app .add-btn,body.st-app .sheet .s-btn.primary{background:var(--c-primary)!important;background-image:none!important;color:#fff!important;border:1px solid var(--c-primary)!important;box-shadow:var(--sh-1)!important;font-weight:600!important;letter-spacing:0!important;transform:none!important}
body.st-app .btn-primary{min-height:48px!important;border-radius:var(--r-md)!important;font-size:15px!important;padding:12px 16px!important}
body.st-app .btn-primary:active,body.st-app .small-btn.primary:active,body.st-app .add-btn:active{background:var(--c-primary-press)!important}
body.st-app .btn-primary:focus-visible,body.st-app .small-btn:focus-visible,body.st-app .action-btn:focus-visible{outline:3px solid rgba(9,148,125,.32);outline-offset:2px}
body.st-app .small-btn{min-height:36px!important;padding:7px 12px!important;border-radius:var(--r-sm)!important;font:600 13px var(--sans)!important;color:var(--c-text-2);border:1px solid var(--c-line-strong)!important;background:var(--c-surface)!important;box-shadow:var(--sh-1)!important;display:inline-flex;align-items:center;gap:6px}
body.st-app .small-btn:active{background:var(--c-sunken)!important}
body.st-app .btn-outline{min-height:46px;border-radius:var(--r-md)!important;border:1px solid var(--c-line-strong)!important;background:var(--c-surface)!important;color:var(--c-text)!important;font:600 14px var(--sans)!important}
body.st-app .inline-actions{gap:8px!important}
body.st-app .action-grid{gap:10px!important}
body.st-app .action-btn{border:1px solid var(--c-line)!important;border-radius:var(--r-lg)!important;background:var(--c-surface)!important;box-shadow:var(--sh-1)!important;font:600 13px var(--sans)!important;color:var(--c-text)!important;min-height:76px!important}
body.st-app .action-btn i{color:var(--c-primary)!important;font-size:22px!important}
body.st-app .action-btn:active{background:var(--c-primary-soft)!important}
body.st-app .chip{border-color:var(--c-line-strong)!important;color:var(--c-text-2)!important;font-weight:500!important;font-size:13px!important}
body.st-app .chip.on{background:var(--c-primary-soft)!important;border-color:#B3DED5!important;color:var(--c-primary-strong)!important}

/* ---------- forms ---------- */
body.st-app label.f{font-size:13px!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;color:var(--c-text-2)!important;margin:14px 0 6px!important}
body.st-app .req{color:var(--c-red)!important}
body.st-app .field,body.st-app select.field,body.st-app textarea.field{min-height:46px;border:1px solid var(--c-line-strong)!important;border-radius:var(--r-sm)!important;background:var(--c-surface)!important;font-size:15px!important;font-weight:400!important;color:var(--c-text)!important;padding:11px 13px!important;box-shadow:var(--sh-1)!important}
body.st-app textarea.field{min-height:92px}
body.st-app .field::placeholder{color:#98A2B3!important}
body.st-app .field:focus,body.st-app select.field:focus,body.st-app textarea.field:focus{border-color:var(--c-primary)!important;box-shadow:0 0 0 4px rgba(9,148,125,.14)!important;outline:none!important}
body.st-app .field[readonly]{background:var(--c-bg)!important;color:var(--c-text-2)!important}
body.st-app .err-msg,body.st-app .field-error{color:var(--c-red)!important;font-size:12.5px!important;font-weight:500!important}
body.st-app .choice-card{border-radius:var(--r-md)!important;border-color:var(--c-line)!important;font-size:14px!important}

/* ---------- sheets ---------- */
body.st-app .sheet-overlay{background:rgba(16,24,40,.45)!important;backdrop-filter:none!important}
body.st-app .sheet{border-radius:var(--r-xl) var(--r-xl) 0 0!important;padding:16px 20px calc(24px + var(--safe-b))!important;box-shadow:var(--sh-pop)!important;max-height:92dvh!important;background:var(--c-surface)!important}
body.st-app .sheet .handle{width:40px!important;height:4px!important;background:var(--c-line-strong)!important;border-radius:4px!important;margin:0 auto 14px!important}
body.st-app .s-eyebrow{font-size:11.5px!important;font-weight:600!important;letter-spacing:.06em!important;color:var(--c-primary)!important}
body.st-app .s-title{font-size:20px!important;font-weight:700!important;letter-spacing:-.02em!important;color:var(--c-text)!important;line-height:1.25!important;margin:4px 0 12px!important}
body.st-app .s-row{font-size:14px!important;border-color:var(--c-line)!important}
body.st-app .s-row span:first-child{color:var(--c-muted)!important}
body.st-app .s-row span:last-child{font-weight:600!important;color:var(--c-text)!important}
body.st-app .st-modal-back{border:1px solid var(--c-line)!important;background:var(--c-surface)!important;color:var(--c-text-2)!important;border-radius:var(--r-sm)!important;font:600 13px var(--sans)!important;box-shadow:none!important}
body.st-app .sheet-section{border-color:var(--c-line)!important}

/* ---------- drawer (More) ---------- */
body.st-app .drawer{background:var(--c-surface)!important;box-shadow:var(--sh-pop)!important;border-radius:var(--r-xl)!important}
body.st-app .drawer-user{border-bottom:1px solid var(--c-line)!important;padding-bottom:14px!important}
body.st-app .drawer-name{color:var(--c-text)!important;font-size:15px!important;font-weight:650!important}
body.st-app .drawer-role{color:var(--c-muted)!important;font-size:12.5px!important}
body.st-app .dnav{color:var(--c-text-2)!important;font-size:15px!important;font-weight:500!important;border-radius:var(--r-md)!important;min-height:46px;display:flex!important;align-items:center;gap:12px}
body.st-app .dnav i{font-size:20px!important;color:var(--c-muted)!important}
body.st-app .dnav.active{background:var(--c-primary-soft)!important;color:var(--c-primary-strong)!important;font-weight:600!important}
body.st-app .dnav.active i{color:var(--c-primary)!important}

/* ---------- sign-in ---------- */
body.st-app .login-screen{background:var(--c-bg)!important}
body.st-app .login-mark{background:var(--c-primary)!important;color:#fff!important;border:0!important;box-shadow:var(--sh-2)!important;border-radius:18px!important}
body.st-app .login-mark i{color:#fff!important}
body.st-app .login-title{font-size:26px!important;font-weight:700!important;letter-spacing:-.025em!important;color:var(--c-text)!important}
body.st-app .login-sub{font-size:15px!important;color:var(--c-muted)!important}
body.st-app .login-links a{color:var(--c-primary)!important;font-weight:600!important;font-size:14px!important}
body.st-app .login-hint{color:var(--c-muted)!important;font-size:13px!important}
body.st-app .login-hint a{color:var(--c-primary)!important}

/* ---------- feedback ---------- */
body.st-app .toast{background:var(--c-text)!important;border-radius:var(--r-md)!important;font:500 14px var(--sans)!important;box-shadow:var(--sh-pop)!important;bottom:calc(var(--nav-h) + 20px + var(--safe-b))!important}
body.st-app .toast i{color:#6CE9A6!important}
body.st-app #stNetBar{bottom:calc(var(--nav-h) + 10px + var(--safe-b))!important;background:var(--c-text)!important;border-radius:var(--r-md)!important;font:500 13px var(--sans)!important}
body.st-app #stNetBar.off{background:#93600F!important}

/* ---------- tables (reports) ---------- */
body.st-app .report-table th{font-size:12px!important;font-weight:600!important;color:var(--c-muted)!important;background:var(--c-bg)!important}
body.st-app .report-table td{font-size:13px!important;color:var(--c-text)!important;border-color:var(--c-line)!important}

/* ---------- bottom navigation ---------- */
#stTabBar{position:absolute;left:0;right:0;bottom:0;z-index:30;height:calc(var(--nav-h) + var(--safe-b));padding-bottom:var(--safe-b);background:rgba(255,255,255,.97);border-top:1px solid var(--c-line);display:flex;box-shadow:0 -4px 16px rgba(16,24,40,.04)}
#stTabBar[hidden]{display:none}
#stTabBar button{flex:1;border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:600 11px var(--sans);color:var(--c-muted);cursor:pointer;min-width:0;padding:6px 2px}
#stTabBar button i{font-size:23px;line-height:1}
#stTabBar button.on{color:var(--c-primary)}
#stTabBar button.on i{transform:translateY(-1px)}
#stTabBar button:active{background:var(--c-bg)}
@media (min-width:700px){#stTabBar{justify-content:center}#stTabBar button{flex:0 0 110px}}
/* The bottom bar replaces the header menu button */
body.st-app.st-tabs .appbar .hamburger{display:none!important}
body.st-app.st-tabs #phoneScreens .content{padding-bottom:calc(var(--nav-h) + 28px + var(--safe-b))!important}
body.st-app.st-tabs #phoneScreens .appbar-left > button.hamburger.st-three-lines{display:none!important}

/* ---------- v2 features ---------- */
body.st-app .st-docs{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
body.st-app .st-docs .small-btn i{font-size:16px}
body.st-app .st-pro-empty{color:var(--c-muted);font-size:13.5px;text-align:center;padding:18px 10px}
body.st-app .st-search-btn{width:38px;height:38px;border-radius:var(--r-md);border:0;background:var(--c-sunken);color:var(--c-text);display:inline-flex;align-items:center;justify-content:center;margin-right:8px;cursor:pointer}
body.st-app .st-search-btn i{font-size:20px}
body.st-app .appbar-row{gap:8px}
body.st-app .appbar-row > .avatar{flex-shrink:0}
/* KPI card + chart */
body.st-app .st-kpi-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:10px}
body.st-app .st-kpi-l{font-size:12.5px;color:var(--c-muted);font-weight:500}
body.st-app .st-kpi-n{font-size:19px;font-weight:700;letter-spacing:-.02em;color:var(--c-text);font-variant-numeric:tabular-nums;margin-top:2px}
body.st-app .st-kpi-c{font-size:12px;margin-top:2px;color:var(--c-muted)}
body.st-app .st-up{color:#067647;font-weight:600}
body.st-app .st-down{color:var(--c-red);font-weight:600}
body.st-app .st-chart{width:100%;height:150px;display:block}
body.st-app .st-legend{display:grid;gap:6px;margin-top:12px}
body.st-app .st-legend > div{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--c-text-2)}
body.st-app .st-legend i{width:10px;height:10px;border-radius:3px;flex-shrink:0}
body.st-app .st-legend b{margin-left:auto;font-weight:600;font-variant-numeric:tabular-nums;color:var(--c-text)}
body.st-app .st-legend-inline{display:flex;gap:16px;margin-top:6px}
body.st-app .st-aging-bar{display:flex;height:12px;border-radius:6px;overflow:hidden;gap:2px;background:var(--c-sunken)}
/* progress */
body.st-app .st-progress-top{display:flex;justify-content:space-between;font-size:14px;font-weight:600;color:var(--c-text)}
body.st-app .st-progress-track{height:8px;background:var(--c-sunken);border-radius:4px;overflow:hidden;margin:8px 0 6px}
body.st-app .st-progress-track span{display:block;height:100%;border-radius:4px;transition:width .3s ease}
body.st-app .st-progress-sub{font-size:12.5px;color:var(--c-muted);font-variant-numeric:tabular-nums}
body.st-app .st-month{display:flex;align-items:center;justify-content:space-between;background:var(--c-surface);border:1px solid var(--c-line);border-radius:var(--r-lg);padding:8px;margin-bottom:6px}
body.st-app .st-month b{font-size:15px}
/* alert + tasks */
body.st-app .st-alert{display:flex;align-items:center;gap:12px;background:#FFFAEB!important;border-color:#FEDF89!important}
body.st-app .st-alert > i:first-child{font-size:22px;color:#B54708}
body.st-app .st-alert > i:last-child{margin-left:auto;color:var(--c-muted)}
body.st-app .st-task{display:flex!important;align-items:flex-start;gap:10px}
body.st-app .st-task.done .name{text-decoration:line-through;color:var(--c-muted)!important}
body.st-app .st-check,body.st-app .st-more{border:0;background:none;padding:2px;cursor:pointer;color:var(--c-muted);min-width:32px;min-height:32px}
body.st-app .st-check i{font-size:24px}
body.st-app .st-task.done .st-check i{color:var(--c-primary)}
body.st-app .st-more i{font-size:18px}
/* settings */
body.st-app .st-logo-row{display:flex;gap:14px;align-items:center}
body.st-app .st-logo{width:64px;height:64px;border-radius:var(--r-lg);background:var(--c-sunken);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;border:1px solid var(--c-line)}
body.st-app .st-logo img{width:100%;height:100%;object-fit:contain;background:#fff}
body.st-app .st-logo i{font-size:28px;color:var(--c-muted)}
body.st-app label.small-btn{cursor:pointer}
/* search + check-ins */
body.st-app .st-hit{cursor:pointer;align-items:center}
body.st-app .st-hit i{color:var(--c-muted)}
body.st-app .st-thumb{width:52px;height:52px;border-radius:var(--r-sm);object-fit:cover;border:1px solid var(--c-line);flex-shrink:0}
body.st-app .list-row a{color:var(--c-primary);font-weight:600}
/* client role: documents stay visible */
body.role-client #sheetBody .st-docs{display:flex!important}
