/* SalesTracker polish layer. Loaded last; visual only (no behaviour). Builds on the tokens in theme.css. */
:root{
  --c-bg:#F3F6F5;
  --c-line:#E4EBE9;
  --r-lg:14px;
  --sh-1:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.04);
  --sh-2:0 6px 16px rgba(16,24,40,.08);
  --ring:0 0 0 3px rgba(9,148,125,.18);
}
body.st-app{-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
body.st-app .phone .screen,body.st-app #phoneScreens .content{background:var(--c-bg)!important}

/* ---------- top app bar ---------- */
body.st-app .appbar{padding:calc(10px + env(safe-area-inset-top,0px)) 16px 12px!important;position:relative;z-index:5}
body.st-app .phone .appbar{padding-top:calc(12px + env(safe-area-inset-top,0px))!important}
body.st-app .appbar .eyebrow{font-size:10.5px!important;letter-spacing:.08em!important;margin-bottom:3px!important}
body.st-app .appbar .greet{font-size:21px!important;line-height:1.2!important}
body.st-app .appbar .sub{font-size:12.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%}
body.st-app .appbar-left>div{min-width:0}
body.st-app .appbar .avatar{width:36px!important;height:36px!important;font-size:13px!important;font-weight:700!important}

/* ---------- bottom tab bar: solid, above the scrolling content ---------- */
#stTabBar{background:#fff!important;z-index:60!important;border-top:0!important;box-shadow:0 -1px 0 var(--c-line),0 -8px 24px rgba(16,24,40,.06)!important}
#stTabBar button{position:relative;isolation:isolate;gap:4px!important;font-size:11px!important;letter-spacing:.01em;transition:color .15s}
#stTabBar button i{font-size:22px!important}
#stTabBar button.on::before{content:"";position:absolute;top:7px;left:50%;width:52px;height:30px;margin-left:-26px;border-radius:15px;background:var(--c-primary-soft);z-index:-1}
#stTabBar button.on i{transform:none!important}
#stTabBar button:active{background:none!important}
#stTabBar button:active i{transform:scale(.9)!important}

/* ---------- content rhythm ---------- */
body.st-app #phoneScreens .content{padding-left:14px!important;padding-right:14px!important;padding-top:14px!important}
body.st-app h2.section{font-size:15px!important;font-weight:700!important;letter-spacing:-.01em!important;margin:22px 2px 10px!important;color:var(--c-text)!important}
body.st-app h2.section .count{font-size:11.5px!important;padding:2px 8px!important;border-radius:999px!important;background:var(--c-sunken)!important;color:var(--c-text-2)!important;font-weight:600!important;vertical-align:2px}

/* ---------- cards & lists ---------- */
body.st-app .card{border:1px solid var(--c-line)!important;border-radius:var(--r-lg)!important;box-shadow:var(--sh-1)!important;padding:14px 16px!important;margin-bottom:10px!important;background:var(--c-surface)!important}
body.st-app .card .name{font-size:15.5px!important;font-weight:650!important;letter-spacing:-.01em!important;line-height:1.3!important;color:var(--c-text)!important}
body.st-app .card .meta{font-size:13px!important;line-height:1.5!important;color:var(--c-muted)!important;margin-top:4px!important}
body.st-app .card-row{gap:12px!important;align-items:flex-start!important}
body.st-app .card-row>div:first-child{min-width:0}
body.st-app .card.clickable,body.st-app .st-hit,body.st-app .list-row.clickable{cursor:pointer;transition:transform .12s,box-shadow .12s,background .12s}
body.st-app .card.clickable:active,body.st-app .st-hit:active{transform:scale(.985);box-shadow:none!important}
body.st-app .list-row{padding:12px 2px!important;border-bottom:1px solid var(--c-line)!important;gap:12px}
body.st-app .list-row:last-child{border-bottom:0!important}
body.st-app .list-row .title{font-size:14.5px!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;margin-top:2px}

/* badges & chips */
body.st-app .badge{font-size:11.5px!important;font-weight:600!important;padding:4px 10px!important;border-radius:999px!important;white-space:nowrap!important;line-height:1.3!important;flex-shrink:0}
body.st-app .chip{border-radius:999px!important;font-size:12.5px!important;font-weight:500!important;padding:6px 12px!important}

/* stat tiles */
body.st-app .stat{border:1px solid var(--c-line)!important;border-radius:var(--r-lg)!important;box-shadow:var(--sh-1)!important;padding:14px!important}
body.st-app .stat .n{font-size:22px!important;font-weight:700!important;letter-spacing:-.02em!important;line-height:1.15!important}
body.st-app .stat .l{font-size:12.5px!important;color:var(--c-muted)!important;margin-top:4px!important;font-weight:500!important}
body.st-app .info-box{border:1px solid var(--c-line)!important;border-radius:12px!important;background:var(--c-bg)!important;padding:10px 12px!important}
body.st-app .info-box .k{font-size:10.5px!important;letter-spacing:.06em!important;text-transform:uppercase;color:var(--c-muted)!important;font-weight:600!important}
body.st-app .info-box .v{font-size:14.5px!important;font-weight:600!important;color:var(--c-text)!important;margin-top:3px!important}

/* quick actions */
body.st-app .action-btn{border:1px solid var(--c-line)!important;border-radius:14px!important;background:var(--c-surface)!important;font-size:12px!important;font-weight:600!important;color:var(--c-text-2)!important;box-shadow:var(--sh-1)!important;line-height:1.25!important;transition:transform .12s,background .12s}
body.st-app .action-btn i{color:var(--c-primary)!important;font-size:22px!important}
body.st-app .action-btn:active{transform:scale(.96);background:var(--c-primary-soft)!important}

/* ---------- buttons ---------- */
body.st-app .btn-primary{min-height:50px!important;border-radius:12px!important;font-size:15px!important;font-weight:650!important;letter-spacing:.01em!important;box-shadow:0 1px 2px rgba(9,148,125,.25),0 4px 12px rgba(9,148,125,.18)!important;transition:transform .12s,filter .12s}
body.st-app .btn-primary:active{transform:scale(.985);filter:brightness(.95)}
body.st-app .btn-primary:disabled{opacity:.6;box-shadow:none!important}
body.st-app .btn-outline{min-height:46px!important;border-radius:12px!important;font-weight:600!important}
body.st-app .small-btn{min-height:36px!important;border-radius:10px!important;font-size:13px!important;font-weight:600!important;padding:0 12px!important;display:inline-flex!important;align-items:center;gap:6px;transition:background .12s,transform .12s}
body.st-app .small-btn:active{transform:scale(.97)}
body.st-app .small-btn.primary{box-shadow:0 1px 2px rgba(9,148,125,.25)!important}
body.st-app .inline-actions{gap:8px!important}

/* ---------- forms ---------- */
body.st-app label.f{font-size:12.5px!important;font-weight:600!important;color:var(--c-text-2)!important;margin:14px 2px 6px!important;letter-spacing:.005em}
body.st-app .field{min-height:48px!important;border-radius:12px!important;border:1px solid var(--c-line-strong)!important;font-size:15px!important;background:#fff!important;transition:border-color .15s,box-shadow .15s}
body.st-app textarea.field{min-height:92px!important;padding-top:12px!important;line-height:1.45}
body.st-app .field:focus,body.st-app .field:focus-within{border-color:var(--c-primary)!important;box-shadow:var(--ring)!important;outline:none!important}
body.st-app .field::placeholder{color:#98A4A1!important}
body.st-app .field[readonly],body.st-app .field:disabled{background:var(--c-bg)!important;color:var(--c-text-2)!important}
body.st-app .form-grid{gap:10px!important}
body.st-app .req{color:var(--c-red)!important}
body.st-app .err-msg{border-radius:10px!important;font-size:13px!important}

/* ---------- sheets (pop-up panels) ---------- */
body.st-app .sheet-overlay{background:rgba(16,24,22,.42)!important;backdrop-filter:blur(2px)}
body.st-app .sheet{border-radius:22px 22px 0 0!important;box-shadow:0 -10px 40px rgba(16,24,40,.18)!important;padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))!important}
body.st-app .sheet .handle{width:40px!important;height:4px!important;border-radius:4px!important;background:#D3DDDA!important;margin:0 auto 14px!important}
body.st-app .s-eyebrow{font-size:10.5px!important;letter-spacing:.08em!important;font-weight:700!important;color:var(--c-primary)!important}
body.st-app .s-title{font-size:20px!important;font-weight:700!important;letter-spacing:-.02em!important;line-height:1.25!important;margin-bottom:6px!important}
body.st-app .sheet-section{border-top:1px solid var(--c-line)!important;padding-top:14px!important;margin-top:16px!important}

/* ---------- menu (drawer) ---------- */
body.st-app .drawer-overlay{background:rgba(16,24,22,.42)!important;backdrop-filter:blur(2px)}
body.st-app .phone .drawer-nav .dnav{min-height:44px!important;padding:9px 10px!important;margin:1px 0!important;font-size:14.5px!important}
body.st-app .dnav i{font-size:19px!important}
body.st-app .st-dsec{font:700 10.5px var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--c-muted);padding:16px 10px 6px}
body.st-app .st-dsec:first-child{padding-top:6px}
body.st-app .drawer-logout{border-top:1px solid var(--c-line)!important;border-radius:0!important;font-weight:600!important}

/* ---------- login ---------- */
body.st-app .login-screen{display:flex!important;flex-direction:column;justify-content:center;padding:calc(24px + env(safe-area-inset-top,0px)) 24px calc(24px + env(safe-area-inset-bottom,0px))!important;background:radial-gradient(120% 60% at 50% 0%,#E3F3EF 0%,var(--c-bg) 60%)!important}
body.st-app .login-screen.hidden{display:none!important}
body.st-app .login-mark{width:64px!important;height:64px!important;border-radius:18px!important;box-shadow:0 8px 24px rgba(9,148,125,.28)!important;margin:0 auto 14px!important}
body.st-app .login-title{font-size:26px!important;letter-spacing:-.02em!important;text-align:center}
body.st-app .login-sub{text-align:center;font-size:14px!important;color:var(--c-muted)!important;margin-bottom:6px!important}
body.st-app .login-screen .btn-primary{margin-top:22px!important;width:100%}
body.st-app .login-links{margin-top:14px!important;font-size:14px!important}
body.st-app .st-pw{position:relative}
body.st-app .st-pw .field{padding-right:52px!important;width:100%}
body.st-app .st-pw-btn{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;background:none;color:var(--c-muted);font-size:20px;cursor:pointer;border-radius:10px;display:flex;align-items:center;justify-content:center}
body.st-app .st-pw-btn:active{background:var(--c-sunken)}
body.st-app .st-login-foot{text-align:center;font-size:11.5px;color:var(--c-muted);margin-top:28px}

/* ---------- reports: collapsible filters ---------- */
body.st-app .st-filt-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;padding:0 14px;border:1px solid var(--c-line);border-radius:12px;background:#fff;font:600 14px var(--sans);color:var(--c-text);cursor:pointer;box-shadow:var(--sh-1)}
body.st-app .st-filt-toggle small{font-weight:500;color:var(--c-muted);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
body.st-app .st-filt-toggle i{color:var(--c-primary);font-size:18px;transition:transform .2s}
body.st-app .st-filt-toggle[aria-expanded="true"] i.ti-chevron-down{transform:rotate(180deg)}
body.st-app .st-filt-body[hidden]{display:none!important}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion:reduce){body.st-app *{transition:none!important;animation:none!important}}
body.st-app .st-pw{display:block;width:100%}
body.st-app .login-screen .st-pw .field{width:100%!important;max-width:none!important;margin:0!important}
body.st-app .st-filt-toggle>span{white-space:nowrap;flex-shrink:0}
body.st-app .st-filt-toggle small{flex:1;min-width:0}

/* ---------- orders screen ---------- */
body.st-app .st-o-stats .stat .n{font-size:18px!important}
body.st-app .st-o-chips{display:flex;gap:8px;margin:16px 0 4px;overflow-x:auto;scrollbar-width:none}
body.st-app .st-o-chips::-webkit-scrollbar{display:none}
body.st-app .st-o-chips .chip{border:1px solid var(--c-line-strong)!important;background:#fff!important;color:var(--c-text-2)!important;font-weight:600!important;white-space:nowrap;cursor:pointer;min-height:36px}
body.st-app .st-o-chips .chip.on{background:var(--c-primary)!important;border-color:var(--c-primary)!important;color:#fff!important}
body.st-app .st-order .st-o-top{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
body.st-app .st-order .st-o-top .name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.st-app .st-o-amt{font:700 16px var(--head);letter-spacing:-.01em;color:var(--c-text);white-space:nowrap}
body.st-app .st-o-mid{font-size:12.5px;color:var(--c-muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.st-app .st-o-bar{height:5px;border-radius:5px;background:var(--c-sunken);margin:12px 0 10px;overflow:hidden}
body.st-app .st-o-bar span{display:block;height:100%;border-radius:5px;background:var(--c-primary)}
body.st-app .st-o-bot{display:flex;justify-content:space-between;align-items:center;gap:10px}
body.st-app .st-o-due{font-size:12.5px;color:var(--c-text-2);font-weight:500;text-align:right}

/* ---------- phone app feel ---------- */
body.st-app .card,body.st-app .dnav,body.st-app #stTabBar,body.st-app .action-btn,body.st-app .small-btn,body.st-app .btn-primary,body.st-app .btn-outline,body.st-app .badge,body.st-app .chip,body.st-app .appbar,body.st-app .drawer-user,body.st-app .st-dsec{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body.st-app input,body.st-app textarea,body.st-app select,body.st-app .report-table{-webkit-user-select:text;user-select:text}
body.st-app #phoneScreens .content{overscroll-behavior-y:contain}
#stPull{position:absolute;top:0;left:50%;z-index:70;width:40px;height:40px;margin-top:calc(env(safe-area-inset-top,0px) + 70px);border-radius:50%;background:#fff;box-shadow:0 4px 14px rgba(16,24,40,.18);display:flex;align-items:center;justify-content:center;color:var(--c-muted);font-size:20px;opacity:0;transform:translate(-50%,-40px);pointer-events:none;transition:opacity .15s}
#stPull.ready{color:var(--c-primary)}
#stPull.spin i{animation:stSpin .8s linear infinite}
@keyframes stSpin{to{transform:rotate(360deg)}}
