/* SmartScale Portal - ortak stiller */
:root{
  color-scheme:light;
  --bg:#f3f6f8;--surface:#ffffff;--surface-2:#f7f9fb;--surface-3:#eef3f6;
  --ink:#13293d;--ink-2:#4b6274;--muted:#7a8c9b;
  --line:#e1e8ee;--line-2:#cfd9e1;
  --brand:#146b79;--brand-hover:#0f5965;--brand-soft:#e3f1f2;--brand-ink:#0f5560;
  --ok:#227a4e;--ok-soft:#e6f4ec;--warn:#9a5b06;--warn-soft:#fdf1dc;--err:#b42318;--err-soft:#fdecea;
  --neutral-soft:#edf1f4;
  --radius:10px;--radius-lg:14px;
  --shadow:0 1px 2px rgba(16,40,60,.05),0 6px 18px rgba(16,40,60,.05);
  --shadow-lg:0 20px 50px rgba(16,40,60,.18);
  --font:"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
}
@media (prefers-color-scheme:dark){
  :root{
    color-scheme:dark;
    --bg:#0f171e;--surface:#16212a;--surface-2:#1a2731;--surface-3:#21303b;
    --ink:#e6eef3;--ink-2:#aebdc8;--muted:#7f919e;
    --line:#26343f;--line-2:#33444f;
    --brand:#2aa3a6;--brand-hover:#35b6b9;--brand-soft:#173a40;--brand-ink:#8fd8d6;
    --ok:#6fd19c;--ok-soft:#173528;--warn:#f2bb63;--warn-soft:#3a2c12;--err:#ff8a7e;--err-soft:#3d1c1a;
    --neutral-soft:#22303a;
    --shadow:0 1px 2px rgba(0,0,0,.3);
    --shadow-lg:0 20px 50px rgba(0,0,0,.5);
  }
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font:14px/1.5 var(--font);-webkit-font-smoothing:antialiased}
a{color:var(--brand)}
h1,h2,h3{margin:0;color:var(--ink);letter-spacing:-.01em}
h1{font-size:22px;font-weight:650}
h2{font-size:17px;font-weight:650}
.muted{color:var(--muted)}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Form elemanları */
button,input,select{font:inherit;color:inherit}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;padding:0 14px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-weight:550;cursor:pointer;white-space:nowrap;text-decoration:none;transition:background .15s,border-color .15s,color .15s}
.btn:hover{background:var(--surface-2);border-color:var(--muted)}
.btn:focus-visible,.input:focus-visible,.seg button:focus-visible,.nav a:focus-visible,tr.clickable:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.btn:disabled{opacity:.6;cursor:progress}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn.primary:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--ink-2)}
.btn.ghost:hover{background:var(--surface-3);color:var(--ink)}
.btn.danger{color:var(--err)}
.btn.sm{height:32px;padding:0 10px;font-size:13px}
.btn.icon-only{width:38px;padding:0}
.input{height:38px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface);color:var(--ink);min-width:0}
.input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 20%,transparent)}
.input[readonly]{background:var(--surface-2);color:var(--ink-2)}
.field{display:grid;gap:6px}
.field label{font-size:13px;font-weight:600;color:var(--ink-2)}
.field .hint{font-size:12px;color:var(--muted)}
.search{position:relative;display:flex;align-items:center}
.search .icon{position:absolute;left:11px;color:var(--muted);pointer-events:none}
.search .input{padding-left:36px;width:100%}

/* Rozet ve etiketler */
.badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.badge.ok{background:var(--ok-soft);color:var(--ok)}
.badge.warn{background:var(--warn-soft);color:var(--warn)}
.badge.neutral{background:var(--neutral-soft);color:var(--ink-2)}
.badge.brand{background:var(--brand-soft);color:var(--brand-ink)}
.chips{display:flex;flex-wrap:wrap;gap:5px}
.chip{display:inline-block;padding:2px 9px;border-radius:999px;background:var(--neutral-soft);color:var(--ink-2);font-size:12px;white-space:nowrap}

/* Marka */
.brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:.04em;color:var(--ink);text-decoration:none}
.brand .mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--brand);color:#fff;font-size:13px;letter-spacing:0}
.brand small{display:block;font-size:11px;font-weight:600;letter-spacing:.12em;color:var(--muted)}

/* Kart ve tablo */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow)}
.table-wrap{overflow:auto}
.table-wrap.is-empty{overflow-x:hidden}
.table-wrap.is-empty table.data{width:100%;table-layout:fixed}
.table-wrap.is-empty table.data td.empty-state{width:100%;min-width:0;white-space:normal}
.table-wrap:has(td.empty-state){overflow-x:hidden}
.table-wrap:has(td.empty-state) table.data{width:100%;table-layout:fixed}
.table-wrap:has(td.empty-state) table.data td.empty-state{width:100%;min-width:0;white-space:normal}
table.data{width:100%;border-collapse:collapse}
table.data th,table.data td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
table.data th{position:sticky;top:0;z-index:1;background:var(--surface-2);color:var(--ink-2);font-size:12px;font-weight:650;letter-spacing:.02em}
table.data tbody tr:last-child td{border-bottom:0}
table.data td.num,table.data th.num{text-align:right;font-variant-numeric:tabular-nums}
table.data td.strong{font-weight:650}
table.data td.wrap{white-space:normal}
table.data tr.clickable{cursor:pointer}
table.data tbody tr:hover{background:var(--surface-2)}
table.data tr.selected,table.data tr.selected:hover{background:var(--brand-soft)}
.empty-state{padding:48px 20px;text-align:center;color:var(--muted)}
.empty-state strong{display:block;color:var(--ink);font-size:15px;margin-bottom:4px}
.empty-state .btn{margin-top:14px}

/* Segment seçici */
.seg{display:inline-flex;padding:3px;gap:2px;background:var(--surface-3);border-radius:var(--radius)}
.seg button{border:0;background:transparent;color:var(--ink-2);padding:6px 12px;border-radius:8px;font-weight:600;font-size:13px;cursor:pointer;white-space:nowrap}
.seg button:hover{color:var(--ink)}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(16,40,60,.12)}

/* Diyalog */
dialog{border:0;padding:0;border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-lg);width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 40px)}
dialog::backdrop{background:rgba(10,22,32,.45)}
.dlg-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:18px 20px 0}
.dlg-body{padding:16px 20px;display:grid;gap:14px}
.dlg-foot{display:flex;justify-content:flex-end;gap:8px;padding:0 20px 18px}
.checklist{display:grid;gap:4px;max-height:280px;overflow:auto;border:1px solid var(--line);border-radius:var(--radius);padding:6px}
.checklist label{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;cursor:pointer}
.checklist label:hover{background:var(--surface-2)}
.checklist label[hidden]{display:none}
.checklist input{width:17px;height:17px;accent-color:var(--brand);margin:0}
.checklist .code{margin-left:auto;color:var(--muted);font-size:12px}
.key-box{display:flex;gap:8px;align-items:center;padding:10px 12px;background:var(--surface-2);border:1px dashed var(--line-2);border-radius:var(--radius);font-family:Consolas,"Cascadia Mono",monospace;font-size:13px;word-break:break-all}
.key-box code{flex:1}
.key-box .btn{font-family:var(--font)}
.note{padding:10px 12px;border-radius:var(--radius);font-size:13px}
.note.warn{background:var(--warn-soft);color:var(--warn)}
.note.info{background:var(--brand-soft);color:var(--brand-ink)}
.note.err{background:var(--err-soft);color:var(--err)}

/* Bildirim */
.toasts{position:fixed;right:20px;bottom:20px;z-index:100;display:grid;gap:8px;max-width:min(380px,calc(100vw - 40px))}
.toast{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;background:var(--ink);color:var(--bg);box-shadow:var(--shadow-lg);font-size:13.5px;animation:toast-in .18s ease-out}
.toast.error{background:var(--err);color:#fff}
.toast.ok{background:var(--ok);color:#fff}
@media (prefers-color-scheme:dark){.toast.error,.toast.ok{color:#0f171e}}
@keyframes toast-in{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}

/* Kimlik doğrulama ekranları */
.auth{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.auth-side{background:var(--brand);color:#e9f6f6;padding:48px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.auth-side .brand{color:#fff}.auth-side .brand .mark{background:rgba(255,255,255,.16)}.auth-side .brand small{color:rgba(255,255,255,.7)}
.auth-side h2{color:#fff;font-size:28px;line-height:1.25;max-width:420px;margin-bottom:12px}
.auth-side p{max-width:420px;margin:0;color:rgba(255,255,255,.8);font-size:15px}
.auth-side ul{list-style:none;padding:0;margin:28px 0 0;display:grid;gap:12px;max-width:420px}
.auth-side li{display:flex;gap:10px;align-items:center;color:rgba(255,255,255,.9)}
.auth-side li .icon{color:#9fe3dc}
.auth-side .foot{font-size:12px;color:rgba(255,255,255,.6)}
.auth-main{display:grid;place-items:center;padding:32px 20px}
.auth-form{width:min(380px,100%);display:grid;gap:16px}
.auth-form h1{font-size:26px}
.auth-form .btn{height:44px}
.auth-form .input{height:44px}
.auth-mobile-brand{display:none}
@media (max-width:860px){
  .auth{grid-template-columns:1fr}
  .auth-side{display:none}
  .auth-mobile-brand{display:flex;margin-bottom:8px}
}

/* SmartScale Portal — approved industrial operations design */
:root{
  color-scheme:light;
  --bg:#f8f8f6;--surface:#fff;--surface-2:#f3f5f6;--surface-3:#eef1f3;
  --ink:#10243b;--ink-2:#4f6071;--muted:#778493;
  --line:#dfe5e9;--line-2:#c7d0d8;
  --brand:#078a80;--brand-hover:#06766f;--brand-soft:#e4f2f0;--brand-ink:#07665f;
  --ok:#19764e;--ok-soft:#e5f3ea;--warn:#a95c00;--warn-soft:#fff3e4;--err:#b42318;--err-soft:#fdecea;
  --neutral-soft:#edf1f4;--radius:9px;--radius-lg:12px;
  --shadow:0 1px 2px rgba(16,36,59,.035);--shadow-lg:0 22px 60px rgba(11,29,48,.24);
  --font:"Segoe UI",Inter,system-ui,-apple-system,Roboto,Arial,sans-serif;
}
@media(prefers-color-scheme:dark){:root{color-scheme:light}}
body{background:var(--bg);color:var(--ink);font-size:14px;line-height:1.5}
h1{font-size:28px;font-weight:700;letter-spacing:-.035em;line-height:1.2}
h2{font-size:19px;font-weight:650;letter-spacing:-.025em}
button,input,select{font:inherit;color:inherit}
.btn{height:40px;padding:0 15px;border-radius:8px;font-size:13px;font-weight:600;transition:background-color .16s,border-color .16s,transform .16s}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--brand);border-color:var(--brand)}
.btn.primary:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
.btn.icon-only{width:40px}
.input{height:42px;border-radius:8px;border-color:var(--line-2);font-size:13px}
.input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(7,138,128,.13)}
.field{gap:7px}.field label{font-size:13px;color:var(--ink);font-weight:600}
.card{border-color:var(--line);border-radius:12px;box-shadow:none}
table.data th,table.data td{padding:12px 13px}
table.data th{background:#f4f6f7;color:#516171;font-size:11px;font-weight:700;letter-spacing:.035em;text-transform:uppercase}
.sort-button{display:flex;align-items:center;justify-content:flex-start;gap:6px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;text-align:inherit;text-transform:inherit;cursor:pointer}
table.data th.num .sort-button{justify-content:flex-end}
.sort-button:hover{color:var(--brand-ink)}
.sort-indicator{color:var(--brand);font-size:10px;line-height:1}
.account-group th{position:static;background:#eef4f5;color:var(--ink);font-size:12px;text-transform:none;letter-spacing:0}
.account-group th span{float:right;color:var(--muted);font-weight:500}
table.data tbody tr:hover{background:#f8faf9}
.badge{padding:4px 9px;font-size:11px}
.seg{background:#edf0f2;border-radius:9px;padding:3px;gap:1px}
.seg button{height:42px;padding:0 14px;border-radius:7px;font-size:13px;font-weight:600}
.seg button[aria-pressed="true"]{background:#fff;color:var(--brand-ink);box-shadow:0 1px 3px rgba(16,36,59,.12)}
.empty-state{padding:60px 20px;text-align:center;color:var(--muted)}
.data td.empty-state{text-align:center}
.empty-state strong{font-size:19px;letter-spacing:-.02em;margin-bottom:8px}
.empty-state .empty-illustration{display:grid;place-items:center;width:112px;height:100px;margin:0 auto 14px;color:#77848c}
.empty-state .empty-illustration .icon{width:82px;height:82px;stroke-width:1.45}
.empty-state .btn{margin-top:16px}
.dlg-head{padding:22px 24px 0}.dlg-body{padding:18px 24px;gap:16px}.dlg-foot{padding:0 24px 22px}
dialog{border-radius:14px}
.checklist{border-color:var(--line);padding:7px}
.checklist label{padding:9px;border-bottom:1px solid var(--line);border-radius:5px}
.checklist label:last-child{border-bottom:0}
.note{border-radius:8px}

/* Login and first-run setup */
.auth{min-height:100vh;grid-template-columns:minmax(390px,42%) minmax(0,58%);background:#fff}
.auth-side{background:#0d2239;color:#f7f9fc;padding:clamp(34px,5vw,78px);gap:0}
.auth-side .brand{color:#fff;font-size:21px;letter-spacing:-.02em;gap:13px}
.auth-side .brand .mark{width:42px;height:42px;border-radius:11px;background:var(--brand);font-size:14px}
.auth-side .brand small{margin-top:1px;color:#aab8c5;font-size:11px;letter-spacing:.09em}
.auth-copy{margin:auto 0 18px;max-width:500px}
.auth-side h2{margin:0 0 14px;color:#fff;font-size:clamp(34px,3.3vw,48px);line-height:1.11;font-weight:700;letter-spacing:-.04em}
.auth-side p{max-width:480px;color:#c2ccd6;font-size:17px;line-height:1.6}
.auth-art{display:block;width:145%;max-width:none;height:auto;max-height:250px;object-fit:contain;object-position:left center;margin:40px 0 20px -15%}
.auth-side .foot{position:absolute;left:clamp(34px,5vw,78px);bottom:40px;font-size:12px;color:#8fa0b1;letter-spacing:.03em}
.auth-main{padding:48px clamp(30px,8vw,130px);place-items:center;background:#fff}
.auth-main>.auth-form,.auth-main>div.auth-form{width:min(660px,100%);gap:24px}
.auth-form h1{font-size:42px;letter-spacing:-.04em}
.auth-form .muted{font-size:14px}
.auth-form .input{height:58px;border-radius:8px;padding:0 15px;font-size:15px}
.auth-form .btn{height:58px;border-radius:8px;font-size:15px}
.auth-kicker{display:block;margin-bottom:14px;color:var(--brand);font-size:12px;font-weight:750;letter-spacing:.12em}
.password-control{position:relative;display:flex}
.password-control .input{width:100%;padding-right:52px}
.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:7px;background:transparent;color:#637181;cursor:pointer}
.password-toggle:hover{background:#f0f3f4;color:var(--ink)}
.password-toggle .icon{width:19px;height:19px}
.auth-form-foot{display:flex;align-items:center;gap:14px;margin-top:18px;color:#697582;font-size:13px;white-space:nowrap}
.auth-form-foot span{height:1px;flex:1;background:var(--line)}
.auth-main .auth-form form.auth-form{gap:18px}
#done{gap:14px}
@media(max-width:900px){
  .auth{grid-template-columns:minmax(280px,36%) minmax(0,64%)}
  .auth-side{padding:32px}.auth-side h2{font-size:34px}.auth-art{margin:24px 0;max-height:190px}.auth-side .foot{left:32px;bottom:25px}
  .auth-main{padding:36px}
}
@media(max-width:680px){
  .auth{display:block;min-height:100dvh;background:var(--bg)}
  .auth-side{display:flex;min-height:172px;padding:22px 24px 24px;gap:15px}
  .auth-side .brand{font-size:18px}.auth-side .brand .mark{width:36px;height:36px}
  .auth-side .auth-copy{display:none}.auth-side .auth-art{position:absolute;width:148px;height:auto;right:14px;bottom:12px;margin:0;opacity:.82}
  .auth-side .foot{position:static;margin-top:auto}
  .auth-main{min-height:calc(100dvh - 172px);padding:34px 24px 40px;align-items:start}
  .auth-main>.auth-form,.auth-main>div.auth-form{width:min(480px,100%);gap:22px}
  .auth-form h1{font-size:30px}
  h1{font-size:25px}
}

/* Weighing dashboard */
.app-shell{min-height:100vh;display:grid;grid-template-columns:256px minmax(0,1fr)}
.app-sidebar{position:sticky;top:0;display:flex;flex-direction:column;gap:34px;height:100vh;padding:27px 14px 18px;background:#0d2239;color:#f3f6f9}
.app-sidebar .brand{padding:0 9px;color:#fff;font-size:19px;font-weight:700;letter-spacing:-.025em;gap:11px}
.app-sidebar .brand .mark{width:36px;height:36px;border-radius:10px;background:var(--brand);font-size:12px}
.app-sidebar .brand small{color:#9cacba;font-size:10px;letter-spacing:.13em}
.app-nav{display:grid;align-content:start;gap:5px}
.app-nav>a,.admin-links>a{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 13px;border-radius:8px;color:#d4dce4;text-decoration:none;font-size:14px;font-weight:550;transition:background-color .16s,color .16s}
.app-nav>a:hover,.admin-links>a:hover{background:rgba(255,255,255,.07);color:#fff}
.app-nav>a[aria-current="page"]{background:var(--brand);color:#fff;font-weight:650}
.app-nav .icon{width:20px;height:20px;stroke-width:1.8}
.admin-links{display:grid;gap:5px;margin-top:12px}
.side-label{padding:15px 13px 5px;color:#8294a5;font-size:10px;font-weight:750;letter-spacing:.14em}
.sidebar-foot{margin-top:auto;padding:14px 11px 0;border-top:1px solid rgba(255,255,255,.12)}
.sidebar-caption{color:#8da0b1;font-size:11px}
.app-content{min-width:0}
.topbar{position:sticky;top:0;z-index:20;min-height:72px;display:flex;align-items:center;gap:16px;padding:12px clamp(20px,3vw,48px);background:#fff;border-bottom:1px solid var(--line)}
.topbar .company{display:flex;align-items:center;gap:10px;min-width:0}
.topbar .company>.icon{color:#637181;width:18px;height:18px}
.topbar .company select{width:min(340px,38vw);height:42px;font-size:14px}
.topbar .company-name{font-size:14px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar .spacer{flex:1}
.topbar .who{color:#5d6a77;font-size:13px;white-space:nowrap}
.topbar .btn{height:40px}
.impersonate{display:flex;align-items:center;gap:10px;justify-content:center;flex-wrap:wrap;padding:10px 20px;background:#fff3e4;color:#925300;font-size:13px;font-weight:550;border-bottom:1px solid #f0dfc8}
.impersonate a{color:inherit;font-weight:700}
.page{max-width:1600px;margin:0 auto;padding:34px clamp(20px,3vw,48px) 48px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:56px}
.page-head h1{font-size:38px}
.page-head p{margin:7px 0 0;font-size:14px;color:var(--ink-2)}
.page-head .actions{display:flex;gap:9px}
.page-head .actions .btn{height:42px}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:28px}
.kpi{display:flex;align-items:center;gap:17px;padding:18px 21px;min-height:112px;background:#fff;border:1px solid var(--line);border-radius:11px}
.kpi-icon{display:grid!important;place-items:center;width:58px;height:58px;flex:none;border-radius:9px;background:#e8f3f1;color:var(--brand)}
.kpi-icon .icon{width:28px;height:28px;stroke-width:1.9}
.kpi>div>span{display:block;font-size:14px;color:#5e6d7c;font-weight:500}
.kpi strong{display:block;margin-top:7px;color:var(--ink);font-size:31px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.025em}
.kpi.warn{background:#fffaf4;border-color:#f1dfca}.kpi.warn strong{color:#aa650d}
.kpi.warn .kpi-icon{background:#fff0df;color:#c47614}
.dashboard-recent{overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:11px}
.dashboard-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:19px 21px;border-bottom:1px solid var(--line)}
.dashboard-section-head h2{font-size:17px}
.dashboard-section-head p{margin:3px 0 0;font-size:13px}
.dashboard-recent .table-wrap{max-height:none}
.dashboard-recent .table-foot{justify-content:flex-end}
.dashboard-no-company{display:grid;justify-items:center;gap:10px;padding:48px 24px;text-align:center}
.dashboard-no-company .empty-illustration .icon{width:50px;height:50px;color:var(--muted)}
.dashboard-no-company strong{font-size:18px}
.dashboard-no-company>span:last-child{color:var(--muted)}
#dashboardScreen .page-head{margin-bottom:30px}
#weighingsScreen .page-head{margin-bottom:24px}
.weighing-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 20px}
.summary-card{display:flex;align-items:center;gap:13px;min-width:0;min-height:86px;padding:14px 17px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.summary-icon{display:grid!important;place-items:center;flex:none;width:42px;height:42px;border-radius:9px;background:var(--brand-soft);color:var(--brand)}
.summary-icon .icon{width:21px;height:21px;stroke-width:1.8}
.summary-card>div{min-width:0}
.summary-card>div>span{display:block;color:var(--muted);font-size:12px;font-weight:550}
.summary-card strong{display:block;margin-top:5px;color:var(--ink);font-size:23px;font-weight:700;line-height:1.15;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.summary-card strong small{font-size:12px;font-weight:650;letter-spacing:0}
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:11px;padding:16px 17px;border-bottom:1px solid var(--line)}
.weighings-toolbar{padding:0;margin:0 0 30px;border:0}
.toolbar .grow{flex:1}
.toolbar .search{width:min(300px,100%)}
.toolbar .search .input{height:40px}
.toolbar-tools{display:flex;align-items:center;gap:10px;margin-left:auto;min-width:0}
.account-picker{position:relative;flex:0 1 230px;width:230px;min-width:190px;z-index:5}
.account-picker>.icon{position:absolute;left:12px;top:50%;z-index:1;width:17px;height:17px;transform:translateY(-50%);color:var(--brand-ink);pointer-events:none}
.account-picker #accountFilter{width:100%;height:40px;padding-left:36px}
.account-options{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:30;display:flex;flex-direction:column;max-height:280px;overflow:auto;padding:5px;border:1px solid var(--line);border-radius:9px;background:var(--surface);box-shadow:var(--shadow-lg)}
.account-options[hidden]{display:none}
.account-option{display:block;width:100%;padding:9px 10px;border:0;border-radius:6px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.account-option:hover,.account-option:focus-visible{background:var(--brand-soft);outline:0}
.account-option[aria-selected="true"]{color:var(--brand-ink);font-weight:700}
.account-no-results{padding:10px;color:var(--muted);font-size:12px}
.custom-dates{display:flex;align-items:center;gap:7px}
.custom-dates .input{width:145px;height:40px}
.split{display:grid;grid-template-columns:minmax(0,1fr)}
.split.has-detail{grid-template-columns:minmax(0,1fr) 370px}
.split .table-wrap{max-height:calc(100vh - 390px);min-height:280px}
.detail{border-left:1px solid var(--line);background:var(--surface);padding:18px;overflow:auto;max-height:calc(100vh - 390px);min-height:280px}
.detail-head{position:sticky;top:-18px;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:-2px -2px 15px;padding:2px 2px 12px;background:var(--surface)}
.detail-actions{display:flex;align-items:center;gap:6px;flex:none}.detail-actions .btn.primary{height:36px;padding:0 11px;font-size:12px}
.row-print-heading{width:48px}.row-print-action{width:48px;text-align:center}.row-print-action .print-row{width:34px;height:34px;color:var(--brand-ink);background:transparent;border-color:transparent}.row-print-action .print-row:hover{background:var(--brand-soft);border-color:var(--line)}.row-print-action .icon{width:17px;height:17px;stroke-width:1.8}
.detail-head h2{margin:5px 0 0;font-size:23px;line-height:1.15;letter-spacing:-.025em;color:var(--ink)}
.detail-record{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px}
.detail-record .badge{font-size:10px}
.detail-net{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border:1px solid color-mix(in srgb,var(--brand) 12%,var(--line));border-radius:11px;background:var(--brand-soft);color:var(--brand-ink)}
.detail-net>span{font-size:13px;font-weight:600}
.detail-net strong{font-size:25px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
.detail-net small,.detail-weight small{font-size:.58em;font-weight:650}
.detail-section{margin-top:21px}
.detail-section h3{margin:0 0 10px;color:var(--ink-2);font-size:11px;font-weight:750;letter-spacing:.075em;text-transform:uppercase}
.detail-weights{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.detail-weight{display:flex;min-width:0;flex-direction:column;gap:7px;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.detail-weight>span,.detail-weight time{color:var(--muted);font-size:11px}
.detail-weight strong{font-size:17px;line-height:1.15;font-variant-numeric:tabular-nums;white-space:nowrap}
.detail-weight time{font-variant-numeric:tabular-nums;white-space:nowrap}
.detail-fields{display:grid;gap:0;margin:0}
.detail-fields>div{display:grid;grid-template-columns:minmax(80px,.75fr) minmax(0,1.25fr);align-items:start;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.detail-fields>div:last-child{border-bottom:0}
.detail-fields dt{color:var(--muted);font-size:12px}
.detail-fields dd{margin:0;color:var(--ink);font-size:12px;font-weight:600;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.table-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:12px 16px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.table-foot .limit{color:var(--warn);font-weight:600}
.loading td{color:var(--muted)}
@media(max-width:1200px){.split.has-detail{grid-template-columns:minmax(0,1fr)}.detail{position:fixed;left:0;right:0;bottom:0;z-index:40;max-height:78vh;border:1px solid var(--line);border-radius:16px 16px 0 0;box-shadow:var(--shadow-lg)}}
@media(max-width:1000px){.app-shell{grid-template-columns:216px minmax(0,1fr)}.app-sidebar{padding-left:11px;padding-right:11px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.page-head{align-items:flex-start}.toolbar .seg#periodSeg{order:4}.toolbar-tools{flex:1 1 100%;justify-content:flex-end}.toolbar-tools .search{flex:0 1 300px}.weighings-toolbar{margin-bottom:28px}}
@media(max-width:1100px){.table-wrap:has(td.empty-state) table.data thead{display:none}}
@media(max-width:720px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .app-shell{width:100vw;max-width:100vw;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;overflow-x:hidden}
  .app-content{width:100vw;max-width:100vw;min-width:0;overflow-x:hidden}
  .app-sidebar{position:sticky;top:0;z-index:30;height:auto;min-height:0;gap:12px;padding:12px 14px 0}
  .app-sidebar .brand{padding:0 4px}.app-nav{display:flex;gap:5px;overflow:auto;scrollbar-width:none}.app-nav>a,.admin-links>a{min-height:42px;white-space:nowrap;padding:0 11px;font-size:13px}.app-nav>.admin-links{display:flex;margin:0}.app-nav .side-label,.sidebar-foot{display:none}
  .topbar{position:relative;width:100%;min-width:0;min-height:60px;padding:10px 15px;gap:8px;flex-wrap:wrap}
  .topbar .company{order:1;flex:1 1 auto;max-width:calc(100% - 112px);min-width:0}.topbar .company select{width:100%;max-width:none}.topbar .company-name{max-width:40vw}.topbar .spacer{display:none}.topbar .who{display:none}.topbar #logout{order:2;margin-left:auto;flex:none}
  .page{width:100vw;max-width:100vw;min-width:0;margin:0;padding:22px 15px 34px}.page-head{flex-direction:column;align-items:stretch;margin-bottom:18px}.page-head h1{font-size:27px}.page-head p{overflow-wrap:anywhere}.page-head .actions{justify-content:flex-end}
  #dashboardScreen .page-head,#weighingsScreen .page-head{margin-bottom:18px}
  .dashboard-section-head{align-items:flex-start;flex-direction:column;padding:15px}.dashboard-section-head .btn{align-self:flex-end}
  .kpis,.weighings-toolbar,.table-panel{width:100%;max-width:100%;min-width:0}.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:13px}.kpi{width:100%;max-width:100%;min-width:0;min-height:84px;padding:10px;gap:8px}.kpi-icon{width:36px;height:36px}.kpi-icon .icon{width:19px;height:19px}.kpi>div{min-width:0;overflow:hidden}.kpi>div>span{font-size:10px;line-height:1.25;overflow-wrap:anywhere}.kpi strong{font-size:20px}
  .weighing-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:14px}.summary-card{min-height:84px;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;padding:9px}.summary-icon{width:26px;height:26px;border-radius:6px}.summary-icon .icon{width:15px;height:15px}.summary-card>div>span{font-size:9px;line-height:1.2}.summary-card strong{margin-top:3px;font-size:17px}.summary-card strong small{font-size:10px}
  .toolbar{padding:12px;gap:9px}.weighings-toolbar{padding:0;margin-bottom:17px}.toolbar .seg#viewSeg{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar .seg#viewSeg button{padding:0 5px;font-size:11px}.toolbar .seg#periodSeg{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));order:initial}.toolbar .seg#periodSeg button{padding:0 5px;font-size:11px}.custom-dates{width:100%}.custom-dates .input{flex:1;width:auto}.toolbar-tools{display:grid;grid-template-columns:1fr;width:100%;gap:9px}.toolbar-tools>#groupAccount,.toolbar-tools>.account-picker,.toolbar-tools>.search{width:100%;min-width:0;max-width:none}.toolbar-tools>#groupAccount{justify-self:stretch}.toolbar-tools .search{flex-basis:auto}
  .split .table-wrap{max-height:none;min-height:0}.table-foot{padding:11px 13px}
  table.data thead{display:none}table.data,table.data tbody,table.data tr,table.data td{display:block}table.data tr{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px;padding:13px 15px;border-bottom:1px solid var(--line)}table.data tr.account-group{display:block;padding:0;border:0}table.data tr.account-group th{display:block;padding:10px 14px}table.data td{padding:0;border:0;white-space:normal;font-size:12px}table.data td::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:10px;color:var(--muted);font-weight:650}table.data td.num{text-align:left}table.data td.full{grid-column:1/-1}table.data td.empty-state{grid-column:1/-1}table.data td.empty-state::before,table.data tr.loading td::before,table.data td.row-print-action::before{content:none}table.data td.row-print-action{grid-column:1/-1;display:flex;justify-content:flex-end}
}
