/* Zainab Group Trading ERP — --acc is the colour of the company selected in the switcher */
:root {
  --acc: #1d3b6e; --acc-l: color-mix(in srgb, var(--acc) 10%, #fff); --acc-m: color-mix(in srgb, var(--acc) 22%, #fff);
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --bg: #f1f5f9; --card: #fff; --line: #e2e8f0; --line-2: #f1f5f9;
  --ok: #059669; --ok-l: #d1fae5; --bad: #dc2626; --bad-l: #fee2e2; --warn: #d97706; --warn-l: #fef3c7; --info: #2563eb; --info-l: #dbeafe;
  --side: #0b1324; --r: 12px; --sh: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .06);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--acc); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }
code { background: var(--line-2); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .row.nowrap { flex-wrap: nowrap; } .sp { flex: 1; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: .12s; }
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: #fff; } .btn.pri:hover { filter: brightness(1.1); }
.btn.green { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.gold { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); border-color: #fecaca; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 11px; }
.btn.block { width: 100%; }
.input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; background: #fff; color: var(--ink); outline: none; min-width: 0; }
.input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-m); }
.input.sm { padding: 6px 8px; font-size: 13px; border-radius: 7px; }
.input:disabled, .input[readonly] { background: var(--line-2); }
textarea.input { resize: vertical; }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.g2 .f, .grid.g3 .f, .grid.g4 .f, .grid.g5 .f { margin-bottom: 0; }
form .grid { margin-bottom: 12px; }
.g-dash { grid-template-columns: 1.6fr 1fr; } .g-co { grid-template-columns: 1fr 1.1fr; align-items: start; }

/* layout */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.side .brand b { color: #fff; display: block; font-size: 14.5px; line-height: 1.2; } .side .brand small { color: #94a3b8; font-size: 11px; }
.logo { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; background: var(--acc); letter-spacing: .02em; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15) inset; }
.nav { padding: 8px 10px; flex: 1; }
.nav-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #64748b; padding: 14px 10px 6px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #cbd5e1; font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: var(--acc); color: #fff; }
.nav .ic { width: 22px; text-align: center; } .nav .t { flex: 1; }
.pill { background: var(--bad); color: #fff; border-radius: 20px; font-size: 11px; font-weight: 700; padding: 1px 7px; min-width: 20px; text-align: center; }
.side-foot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13px; }
.side-foot b { color: #fff; } .side-foot small { color: #94a3b8; } .side-foot .btn { color: #cbd5e1; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 22px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.top h1 { font-size: 18px; }
.menu-btn { display: none; }
.clock { color: var(--muted); font-size: 12.5px; }
.net { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 20px; background: var(--ok-l); color: var(--ok); white-space: nowrap; }
.net.off { background: var(--bad-l); color: var(--bad); } .net.warn { background: var(--warn-l); color: var(--warn); }
.bell { position: relative; } .bell i { position: absolute; top: -6px; right: -6px; background: var(--bad); color: #fff; font-style: normal; font-size: 10.5px; border-radius: 20px; padding: 1px 6px; font-weight: 700; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.co-switch { display: flex; align-items: center; gap: 6px; border: 2px solid var(--acc); border-radius: 10px; padding: 0 4px 0 10px; background: var(--acc-l); }
.co-switch .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.co-switch select { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink); padding: 7px 4px; outline: none; cursor: pointer; max-width: 240px; }
.page { padding: 20px 22px 40px; max-width: 1500px; width: 100%; }

/* cards, kpis, tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; } .card-h h3 { font-size: 15px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); border-top: 3px solid var(--acc); }
.kpi span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; } .kpi b { display: block; font-size: 21px; margin-top: 4px; font-variant-numeric: tabular-nums; } .kpi small { color: var(--muted); font-size: 11.5px; }
.kpis.sm .kpi { padding: 10px 14px; } .kpis.sm .kpi b { font-size: 17px; }
.kpi.warn { border-top-color: var(--warn); } .kpi.bad { border-top-color: var(--bad); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover { background: #f8fafc; } .tbl tr.click { cursor: pointer; }
.tbl tfoot td { font-weight: 700; background: var(--acc-l); border-top: 2px solid var(--acc-m); }
.tbl th.num { text-align: right; }
.card > div > .tbl-wrap { border-radius: var(--r); }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px 12px; color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; padding: 28px 10px; color: var(--muted); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.t-ok { background: var(--ok-l); color: #047857; } .t-bad { background: var(--bad-l); color: #b91c1c; } .t-warn { background: var(--warn-l); color: #b45309; } .t-info { background: var(--info-l); color: #1d4ed8; } .t-dark { background: #e2e8f0; color: #334155; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px; }
.toolbar .input { width: auto; min-width: 140px; } .toolbar #iq, .toolbar #cq, .toolbar #sq { min-width: 260px; flex: 1; max-width: 380px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; } .seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink-2); } .seg button.on { background: #fff; color: var(--acc); box-shadow: var(--sh); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; } .tabs button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; } .tabs button.on { background: var(--acc); color: #fff; border-color: var(--acc); }
.rep-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; } .rep-tabs button { border: 1px solid var(--line); background: #fff; padding: 8px 12px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; font-size: 13px; } .rep-tabs button.on { background: var(--acc); color: #fff; border-color: var(--acc); }
.info-box { background: var(--info-l); color: #1e3a8a; border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.kv-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); } .kv-row.grand { font-size: 18px; border-bottom: 0; padding-top: 12px; color: var(--acc); }
.mini-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); } .mini-list small { display: block; color: var(--muted); font-size: 11.5px; }
.prog { height: 8px; background: var(--line-2); border-radius: 10px; overflow: hidden; min-width: 80px; flex: 1; } .prog i { display: block; height: 100%; background: var(--acc); border-radius: 10px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 100px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; } .bar-row b { text-align: right; }

/* dashboard */
.hello { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--r); margin-bottom: 14px; color: #fff; background: linear-gradient(120deg, var(--acc), color-mix(in srgb, var(--acc) 60%, #000)); }
.hello p { margin: 4px 0 0; opacity: .85; font-size: 13px; } .hello .btn:not(.pri) { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .3); } .hello .btn.pri { background: #fff; color: var(--acc); }
.co-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.co-box { text-align: left; border: 1px solid var(--line); border-left: 5px solid var(--acc); background: #fff; border-radius: 10px; padding: 12px 14px; cursor: pointer; font: inherit; } .co-box b { display: block; } .co-box span { display: block; font-size: 18px; font-weight: 700; margin: 4px 0; color: var(--acc); } .co-box small { color: var(--muted); } .co-box.on { background: var(--acc-l); }

/* new bill */
.nb-top { grid-template-columns: 2.2fr .7fr 1fr 1.6fr .9fr 1fr; } .nb-top .f { margin: 0; }
.nb-bottom { grid-template-columns: 1.6fr 1fr; align-items: start; }
.tbl.lines td { padding: 6px 6px; } .tbl.lines select.input { min-width: 120px; } .tbl.lines td:nth-child(2) select { min-width: 230px; } .tbl.lines input[type=month] { width: 140px; }
.totals { position: sticky; top: 76px; } .totals .words { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 4px; }
.plan-box h4 { margin: 4px 0 10px; } .plan-box { margin-bottom: 8px; } .plan-box:empty { display: none; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; } .plan-chips span { background: var(--acc-l); border: 1px solid var(--acc-m); border-radius: 8px; padding: 5px 9px; font-size: 12.5px; }
details.recv { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfdfe; } details.recv summary { cursor: pointer; font-weight: 600; } details.recv[open] summary { margin-bottom: 12px; }
.pm-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; } .pm-pick input { display: none; } .pm-pick span { display: inline-block; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; cursor: pointer; font-weight: 600; font-size: 13px; background: #fff; } .pm-pick input:checked + span { background: var(--acc); color: #fff; border-color: var(--acc); }

/* payment approval cards */
.pay-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--acc); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--sh); }
.pc-l { display: flex; flex-direction: column; gap: 4px; min-width: 130px; } .pc-l .amt { font-size: 19px; }
.co-tag { font-size: 10.5px; font-weight: 800; background: var(--acc); color: #fff; border-radius: 5px; padding: 2px 6px; align-self: flex-start; }
.pc-m { flex: 1; min-width: 0; } .pc-m small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pc-r { display: flex; gap: 6px; }
.cust-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .cust-head > div:nth-child(2) { min-width: 240px; } .cust-head .kpis { flex: 1 1 520px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } .cust-head p { margin: 4px 0 0; }
.user-card { text-align: center; } .user-card .avatar { margin: 0 auto 10px; } .user-card p { margin: 6px 0 10px; }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 14px; width: min(620px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.modal.sm { width: min(420px, 100%); } .modal.lg { width: min(900px, 100%); } .modal.xl { width: min(1180px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); } .modal-h h3 { font-size: 16px; }
.modal-h .x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-b { padding: 16px 18px; overflow-y: auto; } .modal-f { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #0f172a; color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--sh); font-weight: 500; max-width: 380px; animation: fade .2s; } .toast.err { background: var(--bad); }

/* login */
.login-wrap { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-art { background: radial-gradient(circle at 15% 15%, #1e3a8a 0, transparent 45%), radial-gradient(circle at 85% 90%, #0f766e 0, transparent 45%), #0b1324; color: #e2e8f0; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 26px; }
.brand.big { display: flex; gap: 14px; align-items: center; font-size: 22px; font-weight: 800; color: #fff; } .brand.big small { display: block; font-size: 12.5px; font-weight: 500; color: #94a3b8; } .brand.big .logo { width: 54px; height: 54px; font-size: 18px; background: linear-gradient(135deg, #1d3b6e, #0f766e); }
.login-art h1 { font-size: 38px; line-height: 1.15; color: #fff; max-width: 620px; } .login-art h1 em { font-style: normal; color: #5eead4; } .login-art p { color: #94a3b8; line-height: 1.6; max-width: 600px; font-size: 15px; }
.co-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 560px; } .co-list div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); padding: 10px 12px; border-radius: 10px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .co-list .dot { width: 10px; height: 10px; border-radius: 50%; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: 13.5px; color: #cbd5e1; max-width: 600px; }
.login-box { display: grid; place-items: center; padding: 30px; background: #f8fafc; }
.login-card { width: min(440px, 100%); } .login-card h2 { font-size: 26px; }
.user-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.u-card { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; transition: .15s; }
.u-card:hover { border-color: #1d3b6e; transform: translateY(-2px); box-shadow: var(--sh); } .u-card .avatar { margin-bottom: 4px; background: linear-gradient(135deg, #1d3b6e, #0f766e); } .u-card b { font-size: 15px; } .u-card small { color: var(--muted); font-size: 11px; text-align: center; line-height: 1.3; min-height: 28px; }

/* ===================== A4 BILLS ===================== */
.inv-prev { background: #e2e8f0; padding: 16px; border-radius: 10px; overflow: auto; } .inv-prev .inv { margin: 0 auto; box-shadow: 0 6px 24px rgba(0, 0, 0, .15); }
.inv-prev.small .inv { transform: scale(.62); transform-origin: top center; margin-bottom: -400px; }
.inv { --acc: #1d3b6e; width: 210mm; min-height: 297mm; background: #fff; color: #111; padding: 12mm 12mm 10mm; font-family: Arial, Helvetica, sans-serif; font-size: 11.5px; display: flex; flex-direction: column; }
.inv b { font-weight: 700; }
.i-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin: 6mm 0; }
.ib { border: 1px solid #333; } .ib-h { text-align: center; font-weight: 700; padding: 4px; border-bottom: 1px solid #333; font-size: 11px; letter-spacing: .03em; } .ib-b { padding: 8px 10px; line-height: 1.5; } .ib-b > b { font-size: 12.5px; }
.ib .meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.i-tbl { width: 100%; border-collapse: collapse; font-size: 11px; } .i-tbl th, .i-tbl td { border: 1px solid #333; padding: 5px 6px; vertical-align: top; } .i-tbl th { font-size: 10.5px; text-align: center; line-height: 1.2; }
.i-tbl td.c { text-align: center; } .i-tbl td.r { text-align: right; white-space: nowrap; } .i-tbl th:nth-child(2) { width: 42%; }
.i-tbl tr.gt td { font-weight: 800; font-size: 13px; } .i-tbl tr.st td { font-weight: 600; } .i-tbl tfoot td:first-child { text-align: left; }
.i-words { margin-top: 8px; } .i-bal { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 6px; } .i-bal .bank { margin-left: auto; color: #444; }
.i-sched { margin-top: 8px; } .i-sched table { width: 100%; border-collapse: collapse; margin-top: 4px; } .i-sched td { border: 1px solid #999; text-align: center; padding: 3px; font-size: 10px; }
.i-notes { margin-top: 6px; }
.i-war { margin-top: 12px; } .i-war > b { font-size: 13px; } .i-war p { margin: 4px 0 0; font-size: 10px; line-height: 1.45; }
.i-sign { margin-top: auto; padding-top: 18mm; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10mm; } .i-sign div { border-top: 1px solid #555; padding-top: 4px; text-align: center; font-size: 10.5px; }
.i-foot { text-align: center; color: #666; font-size: 9.5px; margin-top: 6mm; }
/* 1) classic — like the original Zainab Enterprises bill */
.t-classic .i-top { border: 1.5px solid #222; padding: 9px; text-align: center; } .t-classic .i-name { font-size: 26px; font-weight: 800; letter-spacing: .02em; }
.t-classic .i-title { text-align: center; font-size: 18px; font-weight: 800; text-decoration: underline; margin-top: 7mm; }
/* 2) modern — colour band */
.t-modern { padding-top: 0; } .t-modern .i-top { background: var(--acc); color: #fff; margin: 0 -12mm; padding: 9mm 12mm 7mm; display: flex; justify-content: space-between; align-items: flex-end; }
.t-modern .i-name { font-size: 25px; font-weight: 800; } .t-modern .i-tag { opacity: .85; font-size: 11.5px; margin-top: 3px; } .t-modern .i-title { font-size: 19px; font-weight: 800; text-align: right; } .t-modern .i-title small { display: block; font-size: 11px; font-weight: 500; opacity: .9; }
.t-modern .ib, .t-modern .ib-h { border: 0; } .t-modern .ib { background: var(--acc-l); border-radius: 6px; } .t-modern .ib-h { color: var(--acc); text-align: left; padding: 7px 10px 0; }
.t-modern .i-tbl th { background: var(--acc); color: #fff; border-color: var(--acc); } .t-modern .i-tbl td { border-color: #d5dbe3; border-width: 0 0 1px; } .t-modern .i-tbl tbody tr:nth-child(even) td { background: #f7f9fb; } .t-modern .i-tbl tr.gt td { background: var(--acc-l); color: var(--acc); }
/* 3) corporate — side stripe and logo block */
.t-corporate { border-left: 6mm solid var(--acc); } .t-corporate .i-top { display: flex; gap: 12px; align-items: center; padding-bottom: 6px; border-bottom: 2px solid var(--acc); }
.t-corporate .i-logo { width: 16mm; height: 16mm; border-radius: 3mm; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.t-corporate .i-name { font-size: 23px; font-weight: 800; color: var(--acc); } .t-corporate .i-tag { color: #555; font-size: 10.5px; } .t-corporate .i-title { background: var(--acc-l); color: var(--acc); padding: 10px 14px; font-weight: 800; font-size: 14px; border-radius: 2mm; }
.t-corporate .ib { border-color: var(--acc-m); border-radius: 2mm; } .t-corporate .ib-h { background: var(--acc); color: #fff; border: 0; }
.t-corporate .i-tbl th { background: var(--acc-l); color: var(--acc); border-color: var(--acc-m); } .t-corporate .i-tbl td { border-color: #cfd8e3; } .t-corporate .i-tbl tr.gt td { background: var(--acc); color: #fff; }
/* 4) elegant — serif, centred, double rule */
.t-elegant { font-family: Georgia, "Times New Roman", serif; } .t-elegant .i-top { text-align: center; } .t-elegant .i-name { font-size: 30px; color: var(--acc); font-weight: 700; letter-spacing: .03em; } .t-elegant .i-tag { font-style: italic; color: #555; }
.t-elegant .i-rule { border-top: 2px solid var(--acc); border-bottom: 1px solid var(--acc); height: 4px; margin: 8px 0; } .t-elegant .i-title { font-size: 16px; letter-spacing: .22em; font-weight: 700; }
.t-elegant .ib { border: 0; border-top: 2px solid var(--acc); } .t-elegant .ib-h { border: 0; color: var(--acc); letter-spacing: .1em; text-align: left; padding-left: 0; } .t-elegant .ib-b { padding-left: 0; }
.t-elegant .i-tbl th { border: 0; border-bottom: 2px solid var(--acc); color: var(--acc); } .t-elegant .i-tbl td { border: 0; border-bottom: 1px solid #ddd; } .t-elegant .i-tbl tr.gt td { border-top: 2px solid var(--acc); border-bottom: 3px double var(--acc); color: var(--acc); }
.challan .i-tbl th:nth-child(2) { width: 60%; }
.rcpt-a5 { min-height: auto; } .rcpt-a5 .i-sign { padding-top: 20mm; }

/* report print */
.rep-print { font-family: Arial, sans-serif; font-size: 11px; color: #111; } .rep-print .rp-h { border-bottom: 3px solid var(--acc); padding-bottom: 6px; } .rep-print h2 { color: var(--acc); margin: 0; } .rep-print h3 { margin: 12px 0 4px; }
.rep-print .rp-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .rep-print .rp-sum div { border: 1px solid #ccc; padding: 4px 8px; border-radius: 4px; }
.rep-print table { width: 100%; border-collapse: collapse; } .rep-print th { background: var(--acc); color: #fff; } .rep-print th, .rep-print td { border: 1px solid #bbb; padding: 4px 6px; text-align: left; }

#print-area { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body * { visibility: hidden; } body { background: #fff; }
  #print-area, #print-area * { visibility: visible; } #print-area { display: block; position: absolute; inset: 0 auto auto 0; width: 210mm; }
  #print-area.report { padding: 12mm; }
  #print-area .inv { box-shadow: none; width: 210mm; min-height: 296mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rep-print { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .app, .login-wrap, .modal-bg, #toasts { display: none !important; }
}

/* responsive */
@media (max-width: 1200px) { .nb-top { grid-template-columns: 1fr 1fr 1fr; } .nb-top .cust-f { grid-column: 1 / -1; } .co-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; } .side { position: fixed; left: 0; top: 0; z-index: 50; width: 260px; transform: translateX(-100%); transition: .2s; } .side.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .menu-btn { display: inline-flex; } .g-dash, .g-co, .nb-bottom, .g3 { grid-template-columns: 1fr; } .totals { position: static; }
  .login-wrap { grid-template-columns: 1fr; } .login-art { padding: 28px 22px; } .login-art h1 { font-size: 26px; } .hide-m { display: none !important; }
}
@media (max-width: 640px) { .page { padding: 14px 12px 30px; } .top { padding: 10px 12px; } .g2, .g4, .g5, .nb-top { grid-template-columns: 1fr; } .co-grid, .feats, .co-list { grid-template-columns: 1fr; } .pay-card { flex-wrap: wrap; } .user-pick { grid-template-columns: repeat(3, 1fr); gap: 6px; } .co-switch select { max-width: 150px; } }
