/* Sahulat ERP — brand stylesheet. No build step, no CDN. */
:root{
--green:#065F46; --green-dk:#04402F; --green-mid:#0E7C5A; --green-tint:#E4F0EA;
--accent:#FF9F00; --accent-ink:#3B2500; --amber-tint:#FFF4DF; --amber-ink:#6B4A00;
--red:#8F1D16; --red-tint:#FDE8E7; --blue:#4A6FB0;
--ink:#0C1F1A; --muted:#5B6660; --line:#DEE6E1; --line-2:#EDF1EE;
--bg:#F4F6F4; --card:#FFFFFF; --radius:16px;
--font:"Plus Jakarta Sans",ui-sans-serif,system-ui,"Segoe UI",sans-serif;
--urdu:"Noto Nastaliq Urdu","Noto Sans Arabic",serif;
}
*{box-sizing:border-box}
/* An element with the hidden attribute must actually be hidden. Several
components are laid out with an inline display (flex, inline-flex), and an
inline style beats the browser's own [hidden]{display:none} -- so the
install strip stayed on screen after it was dismissed, and a badge that was
meant to appear only when it had something to say was always visible. */
[hidden]{display:none!important}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;font-size:15px;line-height:1.5}
a{color:var(--green);text-decoration:none}
a:hover{color:var(--green-dk)}
h1,h2,h3{margin:0;letter-spacing:-.4px}
h1{font-size:26px;font-weight:800}
h2{font-size:16px;font-weight:800}
h3{font-size:14px;font-weight:800}
.ur{font-family:var(--urdu)}
.muted{color:var(--muted)}
.small{font-size:12.5px}
.tiny{font-size:11.5px;font-weight:800;letter-spacing:.6px}
.bold{font-weight:800}
.right{text-align:right}
.ph{background:var(--green-tint);border-bottom:1.5px dashed var(--green-mid);border-radius:3px;padding:0 3px}

/* layout */
.topbar{background:var(--green);color:#fff;padding:14px 24px;display:flex;flex-wrap:wrap;align-items:center;gap:16px}
.topbar a{color:#fff}
.brand{display:flex;align-items:center;gap:11px;font-size:17px;font-weight:800}
.wrap{padding:20px 24px 40px;display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start}
.side{flex:1 1 212px;min-width:0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:10px}
.main{flex:999 1 560px;min-width:0;display:flex;flex-direction:column;gap:20px}
.row{display:flex;flex-wrap:wrap;gap:14px}
.spread{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.grow{flex-grow:1}
.stack{display:flex;flex-direction:column;gap:16px}

/* cards */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.card.dark{background:var(--green-dk);color:#fff;border-color:var(--green-dk)}
.card.dark .muted{color:#CFE6DB}
.kpi{flex:1 1 212px;min-width:0}
.kpi .val{font-size:30px;font-weight:800;letter-spacing:-.8px;margin-top:7px}
.bar{height:9px;background:#E9EEEB;border-radius:999px;margin-top:12px;overflow:hidden}
.bar>span{display:block;height:100%;background:var(--green-mid);border-radius:999px}

/* nav */
.nav a{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:10px;font-size:13.5px;font-weight:600;color:#3E4A45}
.nav a.on{background:var(--green-tint);color:var(--green-dk);font-weight:800}
.nav a .dot{width:7px;height:7px;border-radius:2px;background:#C3CDC7;flex-shrink:0}
.nav a.on .dot{background:var(--green-mid)}

/* pills */
.pill{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:800;padding:4px 9px;border-radius:7px;background:var(--green-tint);color:var(--green-dk)}
.pill.warn{background:var(--amber-tint);color:var(--amber-ink)}
.pill.bad{background:var(--red-tint);color:var(--red)}
.pill.mute{background:#EEF2F0;color:var(--muted)}

/* table */
table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:11px;font-weight:800;color:var(--muted);letter-spacing:.6px;padding:0 12px 10px 0;border-bottom:1px solid var(--line)}
td{padding:13px 12px 13px 0;border-bottom:1px solid var(--line-2);font-size:13.5px}
.scroll-x{overflow-x:auto}

/* forms */
label{font-size:12.5px;font-weight:700;display:block;margin-bottom:6px}
input[type=text],input[type=password],input[type=number],input[type=date],input[type=search],select,textarea{
width:100%;font-family:inherit;font-size:14px;padding:12px 14px;border:1.5px solid #CBD6D0;border-radius:11px;
background:#fff;color:var(--ink);min-height:44px}
input:focus,select:focus,textarea:focus{outline:2px solid var(--green-mid);outline-offset:1px;border-color:var(--green-mid)}
.field{margin-bottom:16px}
.field.half{flex:1 1 220px;min-width:0}
.err{color:var(--red);font-size:12.5px;font-weight:700;margin-top:5px}
.note{background:var(--amber-tint);color:var(--amber-ink);border-radius:11px;padding:12px;font-size:12.5px}
.flash{background:var(--green-tint);color:var(--green-dk);border-radius:11px;padding:12px 14px;font-size:13.5px;font-weight:700}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border-radius:12px;
border:none;background:var(--green-mid);color:#fff;font-family:inherit;font-size:14px;font-weight:800;cursor:pointer}
.btn:hover{background:var(--green-dk);color:#fff}
.btn.ghost{background:#fff;color:var(--ink);border:1.5px solid #CBD6D0}
.btn.accent{background:var(--accent);color:var(--accent-ink)}
.btn.danger{background:#fff;color:var(--red);border:1.5px solid #E0B3B0}
.btn.block{width:100%}
.btn.lg{min-height:62px;font-size:17px;border-radius:18px}

/* avatar */
.av{width:40px;height:40px;border-radius:11px;background:var(--green-tint);color:var(--green-dk);
display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;flex-shrink:0}
.av.lg{width:46px;height:46px;border-radius:14px;font-size:17px}

/* mobile shell */
.m-shell{max-width:480px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;background:var(--bg)}
.m-head{background:var(--green);color:#fff;padding:16px}
.m-body{flex-grow:1;padding:14px 16px 90px;display:flex;flex-direction:column;gap:14px}
/* One row, however many items the nav ends up with. A fixed column count
wrapped the bar onto two lines the moment a sixth screen was added, and a
nav that moves under the officer's thumb is worse than a cramped one. */
.m-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;
display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);background:#fff;border-top:1px solid var(--line);padding:8px 2px 12px}
.m-nav a{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:44px;justify-content:center;color:var(--muted);font-size:9.5px;font-weight:700;text-align:center;line-height:1.2;padding:0 2px;overflow:hidden}
.m-nav a.on{color:var(--green-mid);font-weight:800}
.client-card{display:flex;align-items:center;gap:12px;width:100%;background:#fff;border:2px solid var(--line);
border-radius:16px;padding:12px;text-align:left}
.client-card.late{border-color:#E7BDBA}
@media print{.topbar,.side,.m-nav,.btn{display:none}}

/* ==========================================================================
   Batch UI-2 — Topbar buttons (theme toggle, Download App) and iPhone tip
   ========================================================================== */
.topbar .sx-top-btn,.m-head .sx-top-btn{min-height:40px;padding:0 12px;font-size:13px;background:rgba(255,255,255,.1);color:#fff;border:1.5px solid rgba(255,255,255,.28)}
.topbar .sx-top-btn:hover,.m-head .sx-top-btn:hover{background:rgba(255,255,255,.2);color:#fff}
.sx-theme-btn .sx-sun{display:none}
[data-theme=dark] .sx-theme-btn .sx-sun{display:block}
[data-theme=dark] .sx-theme-btn .sx-moon{display:none}
.sx-ios-tip{margin:12px 24px 0;background:var(--amber-tint);color:var(--amber-ink);border-radius:11px;padding:10px 40px 10px 14px;font-size:13px;position:relative}
.sx-ios-tip button{position:absolute;right:8px;top:6px;border:0;background:transparent;font-size:20px;line-height:1;color:inherit;cursor:pointer}
@media (max-width:640px){.topbar .sx-top-btn span{display:none}}

/* ==========================================================================
   Batch UI-2 — Premium Dark Mode
   Every screen reads its colours from the variables above, so dark mode is
   one set of overrides here. The few hard-coded light colours get their own
   line underneath. Contrast is kept at WCAG AA for body text.
   ========================================================================== */
[data-theme=dark]{
--green-dk:#BDEBD6; --green-mid:#22A67A; --green-tint:#143B2F;
--accent:#FFB02E; --amber-tint:#3A2C0F; --amber-ink:#FFD58A;
--red:#FF8A80; --red-tint:#3D1715; --blue:#8FB0EE;
--ink:#E4ECE8; --muted:#94A39C; --line:#25352F; --line-2:#1C2A25;
--bg:#0A1311; --card:#111C19;
color-scheme:dark;
}
[data-theme=dark] body{background:var(--bg)}
[data-theme=dark] .topbar,[data-theme=dark] .m-head{background:#0B241D;border-bottom:1px solid var(--line)}
[data-theme=dark] .card{box-shadow:0 1px 0 rgba(255,255,255,.02) inset,0 10px 30px -18px rgba(0,0,0,.8)}
[data-theme=dark] .card.dark{background:#0F3328;border-color:#1D4A3C;color:#E9F5EF}
[data-theme=dark] .bar{background:#1E2D28}
[data-theme=dark] .nav a{color:#B4C2BB}
[data-theme=dark] .nav a:hover{background:#16241F}
[data-theme=dark] .nav a .dot{background:#3A4B45}
[data-theme=dark] .pill.mute{background:#1E2B27}
[data-theme=dark] input[type=text],[data-theme=dark] input[type=password],[data-theme=dark] input[type=number],
[data-theme=dark] input[type=date],[data-theme=dark] input[type=search],[data-theme=dark] select,[data-theme=dark] textarea{
background:#0D1714;border-color:#2C3E37;color:var(--ink)}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#6C7C75}
[data-theme=dark] .btn{color:#06130F}
[data-theme=dark] .btn:hover{background:#2FC08E;color:#06130F}
[data-theme=dark] .btn.ghost{background:#13201C;color:var(--ink);border-color:#2C3E37}
[data-theme=dark] .btn.ghost:hover{background:#1A2A25;color:var(--ink)}
[data-theme=dark] .btn.danger{background:#13201C;border-color:#5A2622}
[data-theme=dark] .topbar .sx-top-btn,[data-theme=dark] .m-head .sx-top-btn{background:rgba(255,255,255,.06);color:#fff;border-color:rgba(255,255,255,.18)}
[data-theme=dark] .m-shell{background:var(--bg)}
[data-theme=dark] .m-nav{background:#0E1916}
[data-theme=dark] .client-card{background:var(--card)}
[data-theme=dark] .client-card.late{border-color:#5A2622}
[data-theme=dark] a{color:#5FD3A6}
[data-theme=dark] a:hover{color:#8BE5C3}
[data-theme=dark] .topbar a,[data-theme=dark] .m-head a.btn{color:#fff}
[data-theme=dark] .nav a.on{color:var(--green-dk)}
[data-theme=dark] table tbody tr:hover{background:#15221E}
/* Dashboard pieces from Batch UI-1 */
[data-theme=dark] .sd{--sd-soft:#1A2824;--sd-line:#25352F}
[data-theme=dark] .sd-tip,[data-theme=dark] .ow-tip{background:#E4ECE8;color:#0A1311}
@media print{[data-theme=dark] body,[data-theme=dark] .card{background:#fff!important;color:#000!important}}
