:root{
  --bg:#f3f6fb;--surface:#fff;--surface2:#f8fafc;--text:#182238;--muted:#6c7689;--line:#e3e8f1;
  --nav:#15233f;--nav2:#1f3560;--brand:#315fd6;--brand2:#21469e;--soft:#eef3ff;
  --success:#157347;--success-bg:#eaf8f0;--danger:#b42318;--danger-bg:#fff0ef;--warning:#8a5a00;--warning-bg:#fff7df;
  --shadow:0 8px 24px rgba(30,50,90,.07);--radius:16px;
}
*{box-sizing:border-box}html{font-size:15px}body{margin:0;font-family:"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}.shell{display:grid;grid-template-columns:268px minmax(0,1fr);min-height:100vh}
.sidebar{background:linear-gradient(180deg,var(--nav),#0f1a30);color:#fff;padding:20px 14px;position:sticky;top:0;height:100vh;overflow:auto}
.brandbox{padding:4px 8px 18px;border-bottom:1px solid rgba(255,255,255,.09);margin-bottom:12px}.brand{font-size:22px;font-weight:800;letter-spacing:.1px}.subbrand{font-size:12px;color:#b8c3db;margin-top:5px;line-height:1.45}
.nav .cap{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#8fa0c2;margin:19px 11px 7px}.nav a{display:flex;align-items:center;gap:9px;padding:10px 11px;border-radius:10px;margin:3px 0;color:#e8edf9;font-size:13.5px}.nav a:hover{background:rgba(255,255,255,.09);transform:translateX(1px)}.nav .dot{width:7px;height:7px;border-radius:50%;background:#7587ad;flex:none}
.content-wrap{min-width:0}.topbar{height:66px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:10;backdrop-filter:blur(8px)}.top-company{display:flex;align-items:center;gap:10px}.top-company:before{content:"";width:10px;height:10px;border-radius:50%;background:#31b36b;box-shadow:0 0 0 4px #e9f8ef}.userchip{background:var(--surface2);border:1px solid var(--line);padding:7px 10px;border-radius:999px;font-size:12px}
.main{padding:24px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:17px}.page-title{font-size:25px;line-height:1.15;font-weight:800;margin:0}.page-subtitle{color:var(--muted);font-size:13px;margin-top:6px}.toolbar{display:flex;gap:8px;flex-wrap:wrap}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:19px;box-shadow:var(--shadow);margin-bottom:18px}.card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px}.card-title{font-size:16px;font-weight:750;margin:0}.mode-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:var(--soft);color:var(--brand2);font-size:11px;font-weight:700}
.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}.col-12{grid-column:span 12}.col-8{grid-column:span 8}.col-6{grid-column:span 6}.col-4{grid-column:span 4}.col-3{grid-column:span 3}.col-2{grid-column:span 2}
.field label{display:block;font-size:11.5px;font-weight:700;color:#4e5b70;margin:0 0 6px}.input,select,textarea{width:100%;min-height:41px;border:1px solid #ccd5e3;border-radius:9px;padding:8px 10px;background:#fff;color:var(--text);outline:none;transition:.15s}.input:focus,select:focus,textarea:focus{border-color:#7898eb;box-shadow:0 0 0 3px #eef3ff}.input[disabled],select[disabled],textarea[disabled]{background:#f2f4f8;color:#6b7280}.checkline{display:flex;align-items:center;min-height:41px;padding-top:5px}.form-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:9px;padding:9px 14px;font-weight:700;font-size:12.5px;cursor:pointer;transition:.15s}.btn:hover{filter:brightness(.98);transform:translateY(-1px)}.btn-primary{background:linear-gradient(180deg,#3c69dc,#2d58c3);color:#fff;box-shadow:0 5px 12px rgba(49,95,214,.18)}.btn-muted{background:#f0f3f8;border-color:#dfe5ef;color:#34425d}.btn-danger{background:#fff1f0;border-color:#ffd2ce;color:#b42318}.btn-success{background:#eaf8f0;border-color:#c8efd7;color:#157347}.btn-sm{padding:6px 9px;font-size:11.5px;border-radius:8px}.action-row{display:flex;gap:5px;white-space:nowrap}
.msg{display:block;padding:10px 12px;border-radius:9px;margin:0 0 14px;font-size:13px;font-weight:600}.msg:empty{display:none}.msg-ok{background:var(--success-bg);border:1px solid #cdeedb;color:var(--success)}.msg-err{background:var(--danger-bg);border:1px solid #ffd1cd;color:var(--danger)}.msg-warn{background:var(--warning-bg);border:1px solid #f7df9b;color:var(--warning)}
.table-wrap{overflow:auto;padding:0}.table-title{padding:17px 18px 12px;font-size:15px;font-weight:750}.table{width:100%;border-collapse:separate;border-spacing:0;min-width:760px}.table th,.table td{padding:11px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:12.5px;vertical-align:middle}.table th{background:#f7f9fc;color:#526077;font-size:11px;text-transform:uppercase;letter-spacing:.025em;position:sticky;top:0}.table tr:hover td{background:#fbfcff}.table tr:last-child td{border-bottom:0}.muted{color:var(--muted)}.badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#edf2ff;color:#3154a2;font-size:11px;font-weight:700}.badge-success{background:#eaf8f0;color:#157347}.badge-danger{background:#fff0ef;color:#b42318}
.kpi-card{background:linear-gradient(145deg,#fff,#f9fbff);position:relative;overflow:hidden}.kpi-card:after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;right:-35px;top:-35px;background:#eef3ff}.kpi{font-size:29px;font-weight:800;line-height:1}.kpi-label{font-size:12px;color:var(--muted);margin-top:7px}.section-title{font-size:15px;margin:20px 0 12px;border-top:1px solid var(--line);padding-top:16px}.hint{font-size:11.5px;color:var(--muted);margin-top:5px}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at 15% 20%,#dce7ff,transparent 35%),linear-gradient(135deg,#eef3ff,#f8fafc 55%,#eef7f3)}.login-card{width:100%;max-width:430px;background:#fff;border:1px solid var(--line);border-radius:22px;padding:30px;box-shadow:0 24px 70px rgba(29,55,100,.14)}.login-logo{width:52px;height:52px;border-radius:15px;background:linear-gradient(145deg,#315fd6,#183f9b);display:grid;place-items:center;color:#fff;font-size:25px;font-weight:800;margin-bottom:16px}
.empty{padding:28px;text-align:center;color:var(--muted)}
@media(max-width:980px){.shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.nav .cap{grid-column:1/-1}.topbar{position:relative}.grid{grid-template-columns:repeat(6,minmax(0,1fr))}.col-12{grid-column:span 6}.col-8,.col-6{grid-column:span 6}.col-4,.col-3{grid-column:span 3}.col-2{grid-column:span 2}}
@media(max-width:650px){.main{padding:14px}.topbar{height:auto;min-height:58px;padding:10px 14px;gap:8px}.nav{grid-template-columns:repeat(2,minmax(0,1fr))}.page-head{flex-direction:column}.page-title{font-size:21px}.card{padding:14px;border-radius:13px}.grid{grid-template-columns:1fr}.col-12,.col-8,.col-6,.col-4,.col-3,.col-2{grid-column:span 1}.table-wrap{padding:0}.userchip{max-width:55vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
/* ===== Step 3: School Management ===== */
.school-hero,.dashboard-banner{background:linear-gradient(120deg,#172b55,#315fd6 58%,#5b7fe3);color:#fff;border-radius:20px;padding:24px 26px;margin-bottom:18px;display:flex;justify-content:space-between;align-items:center;gap:20px;box-shadow:0 14px 34px rgba(35,66,132,.18);position:relative;overflow:hidden}
.school-hero:after,.dashboard-banner:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;right:-70px;top:-105px;background:rgba(255,255,255,.08)}
.hero-kicker{font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;opacity:.78;margin-bottom:7px}.hero-title{font-size:22px;font-weight:800;line-height:1.25}.hero-copy{font-size:12.5px;line-height:1.55;opacity:.82;margin-top:7px;max-width:720px}.hero-badge{min-width:118px;height:104px;border:1px solid rgba(255,255,255,.22);border-radius:18px;background:rgba(255,255,255,.12);display:flex;flex-direction:column;justify-content:center;align-items:center;backdrop-filter:blur(6px);z-index:1}.hero-badge>span:first-child,.hero-badge span[id]{font-size:28px;font-weight:800}.hero-badge>span:last-child{font-size:10.5px;opacity:.82;margin-top:4px}.dashboard-banner .btn{z-index:2;background:#fff;color:#234aa8;border:0}
.filter-card{background:linear-gradient(180deg,#fff,#fbfcff);border-color:#dce4f2}.sticky-filter{position:relative;z-index:4}.selection-box,.readout{min-height:41px;border-radius:9px;border:1px dashed #cbd5e4;background:#f7f9fd;padding:10px 11px;color:#334158;font-size:12.5px;font-weight:650}.readout{font-size:16px;font-weight:800}.readout.accent{background:#eef4ff;border-color:#c9d7fb;color:#244ca9}
.quick-box{margin-top:16px;border:1px solid #d8e5dc;background:#f2fbf5;border-radius:12px;padding:13px}.quick-box .btn{margin-top:10px;width:100%}.list-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px}.search-inline{display:flex;gap:7px;align-items:center}.search-inline .input{min-width:280px}.btn-block{width:100%;min-height:41px}.context-banner{background:linear-gradient(115deg,#f0f5ff,#fff 60%);border:1px solid #d9e3f7;border-radius:17px;padding:17px 19px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;gap:14px}.context-title{font-size:19px;font-weight:800}.context-sub{font-size:11.5px;color:var(--muted);margin-top:4px}.status-live{font-size:11px;font-weight:750;color:#157347;background:#eaf8f0;border:1px solid #cdeedb;border-radius:999px;padding:7px 10px;white-space:nowrap}.status-live span{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2bb26d;margin-right:5px;box-shadow:0 0 0 3px rgba(43,178,109,.12)}
.stat-row{margin-bottom:2px}.mini-stat{padding:15px 16px;margin-bottom:14px}.mini-num{font-size:22px;font-weight:850;line-height:1.1}.mini-label{font-size:10.5px;color:var(--muted);margin-top:5px;text-transform:uppercase;letter-spacing:.05em}.copy-card{background:linear-gradient(160deg,#fff,#f8fbff)}.copy-section{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}.copy-section label{display:block;font-size:11.5px;font-weight:750;color:#4e5b70;margin-bottom:6px}.copy-section .btn{margin-top:8px}.copy-note{margin-top:14px;background:#fff8e5;color:#765200;border:1px solid #f4dfa1;border-radius:10px;padding:10px;font-size:11px;line-height:1.45}.product-name{font-weight:750;color:#27344c}.product-meta{font-size:10.5px;color:#7b8495;margin-top:3px}.product-list-table{min-width:1020px}
@media(max-width:980px){.school-hero,.dashboard-banner{padding:19px}.search-inline .input{min-width:200px}.context-banner{align-items:flex-start}.status-live{white-space:normal}}
@media(max-width:650px){.school-hero,.dashboard-banner{flex-direction:column;align-items:flex-start;border-radius:15px}.hero-title{font-size:18px}.hero-badge{width:100%;height:auto;min-height:75px}.dashboard-banner .btn{width:100%}.list-toolbar{align-items:stretch;flex-direction:column}.search-inline{width:100%;flex-direction:column}.search-inline .input,.search-inline .btn{width:100%;min-width:0}.context-banner{flex-direction:column}.status-live{width:100%;text-align:center}}

/* ===== Step 4: Sales Executive CRM ===== */
.crm-hero{background:linear-gradient(120deg,#102a43,#1f5f82 54%,#2e86ab);color:#fff;border-radius:20px;padding:24px 26px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 38px rgba(16,42,67,.17);position:relative;overflow:hidden}
.crm-hero:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-90px;top:-130px;background:rgba(255,255,255,.08)}
.crm-date{z-index:1;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.12);border-radius:14px;padding:12px 16px;font-size:13px;font-weight:800;white-space:nowrap}
.crm-kpis .card{margin-bottom:14px}.crm-kpis .kpi-card:nth-child(2){background:linear-gradient(145deg,#fff,#fffaf0)}.crm-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#fff4f2)}.crm-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f4fbff)}
.big-money{font-size:31px;font-weight:850;margin:16px 0 2px;color:#244ca9}.crm-mini-list{display:grid;gap:8px;margin:17px 0}.crm-mini-list>div{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);background:#f8fafc;border-radius:10px;padding:10px 11px}.crm-mini-list b{font-size:17px}.crm-mini-list span{font-size:11px;color:var(--muted)}
.sample-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}.sample-strip>div{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px 14px;box-shadow:var(--shadow)}.sample-strip b{display:block;font-size:12px;color:#254777}.sample-strip span{display:block;font-size:10.5px;color:var(--muted);margin-top:4px}.stock-note{margin-top:14px;background:#eef6ff;border:1px solid #cfe3f8;color:#28577c;border-radius:10px;padding:10px 12px;font-size:11.5px}
@media(max-width:980px){.sample-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-hero{padding:19px}}
@media(max-width:650px){.crm-hero{flex-direction:column;align-items:flex-start;border-radius:15px}.crm-date{width:100%;text-align:center}.sample-strip{grid-template-columns:1fr}.crm-kpis .col-3{grid-column:span 1}}

/* ===== Step 5: Purchase + GRN + Stock In ===== */
.purchase-hero{background:linear-gradient(120deg,#2c1e4a,#5b3f91 52%,#7661b6);color:#fff;border-radius:20px;padding:25px 27px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 38px rgba(59,39,99,.18);position:relative;overflow:hidden}.purchase-hero:after{content:"";position:absolute;width:280px;height:280px;border-radius:50%;right:-105px;top:-145px;background:rgba(255,255,255,.08)}.purchase-hero-value{z-index:1;min-width:175px;padding:15px 18px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.11);border-radius:16px;text-align:right;backdrop-filter:blur(5px)}.purchase-hero-value>span{font-size:18px;opacity:.75}.purchase-hero-value>span+span,.purchase-hero-value span[id]{font-size:29px;font-weight:850}.purchase-hero-value small{display:block;margin-top:4px;font-size:10px;opacity:.78}.purchase-kpis .kpi-card:nth-child(1){background:linear-gradient(145deg,#fff,#faf6ff)}.purchase-kpis .kpi-card:nth-child(2){background:linear-gradient(145deg,#fff,#f4f7ff)}.purchase-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#fff9ec)}.purchase-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f1fbf6)}
.purchase-actions{display:grid;gap:9px;margin-top:15px}.purchase-actions a{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:11px 12px;background:#fbfcff;transition:.15s}.purchase-actions a:hover{border-color:#c7d2ea;background:#f5f8ff;transform:translateX(2px)}.purchase-actions b{width:33px;height:33px;border-radius:10px;display:grid;place-items:center;background:#eee9fb;color:#5b3f91;font-size:11px}.purchase-actions span{display:flex;flex-direction:column;gap:2px}.purchase-actions strong{font-size:12.5px}.purchase-actions small{font-size:10.5px;color:var(--muted)}
.purchase-line-card{background:linear-gradient(180deg,#fff,#fdfcff)}.field-action{display:flex;align-items:flex-end;gap:8px;padding-top:19px}.qty-input{min-width:85px;max-width:115px;padding:7px 8px}.purchase-table{min-width:1080px}.po-total{display:flex;justify-content:flex-end;gap:10px;padding:15px 17px;background:#fafbfe;border-top:1px solid var(--line);flex-wrap:wrap}.po-total>div{min-width:125px;border:1px solid var(--line);background:#fff;border-radius:11px;padding:10px 12px;text-align:right}.po-total span{display:block;font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.po-total b{display:block;font-size:16px;margin-top:3px}.po-total .grand{background:#f0edfb;border-color:#d8cff2}.po-total .grand b{color:#563c90;font-size:18px}.purchase-save{justify-content:flex-end;margin:12px 0 18px}.purchase-save .btn{min-width:150px}
@media(max-width:980px){.purchase-hero{padding:20px}.purchase-hero-value{min-width:150px}.field-action{padding-top:0}.po-total{justify-content:stretch}.po-total>div{flex:1;min-width:120px}}
@media(max-width:650px){.purchase-hero{flex-direction:column;align-items:flex-start;border-radius:15px}.purchase-hero-value{width:100%;text-align:left}.purchase-save{flex-direction:column}.purchase-save .btn{width:100%}.po-total{display:grid;grid-template-columns:1fr 1fr}.po-total>div{min-width:0}.field-action{flex-direction:column;align-items:stretch}.field-action .btn{width:100%}}


/* ===== Step 6: Multi-Store Inventory + School Stall ===== */
.inventory-hero{background:linear-gradient(120deg,#123b3b,#176b66 52%,#2a9187);color:#fff;border-radius:20px;padding:25px 27px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 38px rgba(18,59,59,.18);position:relative;overflow:hidden}.inventory-hero:after{content:"";position:absolute;width:285px;height:285px;border-radius:50%;right:-110px;top:-150px;background:rgba(255,255,255,.08)}.inventory-hero-value{z-index:1;min-width:175px;padding:15px 18px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.11);border-radius:16px;text-align:right}.inventory-hero-value span{font-size:29px;font-weight:850}.inventory-hero-value small{display:block;margin-top:4px;font-size:10px;opacity:.8}.inventory-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px}.inventory-actions a{display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:12px;padding:11px 12px;background:#fbfefd;transition:.15s}.inventory-actions a:hover{border-color:#bcded9;background:#f2fbf9;transform:translateX(2px)}.inventory-actions b{width:33px;height:33px;border-radius:10px;display:grid;place-items:center;background:#e5f5f2;color:#176b66;font-size:11px}.inventory-actions span{display:flex;flex-direction:column;gap:2px}.inventory-actions strong{font-size:12.5px}.inventory-actions small{font-size:10.5px;color:var(--muted)}.inventory-kpis .kpi-card:nth-child(1){background:linear-gradient(145deg,#fff,#f2fbf9)}.inventory-kpis .kpi-card:nth-child(2){background:linear-gradient(145deg,#fff,#fff8e9)}.inventory-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#f3f6ff)}.inventory-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f8f2ff)}.stock-negative td{background:#fff0ef!important;color:#a9271c}.stock-low td{background:#fff9e8!important}.inner-table{margin-top:14px;border-radius:12px;border:1px solid var(--line);box-shadow:none}.transfer-table{min-width:1180px}.ledger-table{min-width:1150px}.physical-table{min-width:720px}.stall-table{min-width:1120px}.stall-note{background:#eef8f6;border:1px solid #cbe8e3;color:#205e59;border-radius:12px;padding:12px 14px;margin-bottom:16px;font-size:12px;line-height:1.55}
@media(max-width:980px){.inventory-hero{padding:20px}.inventory-actions{grid-template-columns:1fr}.inventory-hero-value{min-width:150px}}
@media(max-width:650px){.inventory-hero{flex-direction:column;align-items:flex-start;border-radius:15px}.inventory-hero-value{width:100%;text-align:left}.inventory-actions{grid-template-columns:1fr}}

/* ===== Step 7: Sales / Billing ===== */
.sales-hero{background:linear-gradient(120deg,#20334d,#315f88 52%,#3d82a6);color:#fff;border-radius:20px;padding:25px 27px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 38px rgba(28,65,95,.18);position:relative;overflow:hidden}.sales-hero:after{content:"";position:absolute;width:285px;height:285px;border-radius:50%;right:-110px;top:-150px;background:rgba(255,255,255,.08)}.sales-hero-value{z-index:1;min-width:190px;padding:15px 18px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.11);border-radius:16px;text-align:right}.sales-hero-value span{font-size:28px;font-weight:850}.sales-hero-value small{display:block;margin-top:4px;font-size:10px;opacity:.82}.sales-kpis .kpi-card:nth-child(1){background:linear-gradient(145deg,#fff,#f4f8ff)}.sales-kpis .kpi-card:nth-child(2){background:linear-gradient(145deg,#fff,#f0faf6)}.sales-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#fff8ed)}.sales-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f6f1ff)}
.sales-actions{display:grid;gap:9px;margin-top:15px}.sales-actions a{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fbfdff;transition:.15s}.sales-actions a:hover{border-color:#bfd0e1;background:#f2f8fc;transform:translateX(2px)}.sales-actions b{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#e9f2f8;color:#315f88;font-size:11px}.sales-actions span{display:flex;flex-direction:column;gap:2px}.sales-actions strong{font-size:12.5px}.sales-actions small{font-size:10.5px;color:var(--muted)}
.billing-context{background:linear-gradient(145deg,#fff,#f8fbfe)}.billing-loader{border-color:#d7e5f0}.billing-table{min-width:1100px}.billing-lines{overflow:auto}.bill-total-strip{display:flex;justify-content:flex-end;gap:10px;padding:15px 17px;background:#fafcff;border-top:1px solid var(--line);flex-wrap:wrap}.bill-total-strip>div{min-width:145px;border:1px solid var(--line);background:#fff;border-radius:11px;padding:10px 12px;text-align:right}.bill-total-strip span{display:block;font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.bill-total-strip b{display:block;font-size:16px;margin-top:3px}.bill-total-strip .grand{background:#eef6fb;border-color:#cfe1ed}.bill-total-strip .grand b{color:#245b7d;font-size:19px}.billing-save{justify-content:flex-end}.billing-save .btn-primary{min-width:210px}.sales-register{min-width:1200px}
.invoice-paper{max-width:980px;margin:0 auto 20px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:28px;box-shadow:var(--shadow)}.invoice-brand{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;border-bottom:2px solid #273b55;padding-bottom:18px}.invoice-company{font-size:23px;font-weight:850}.invoice-address{font-size:11.5px;color:var(--muted);max-width:570px;margin-top:6px;line-height:1.55}.invoice-title{font-size:19px;font-weight:900;letter-spacing:.08em;color:#315f88}.invoice-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:17px 0}.invoice-meta>div{border:1px solid var(--line);border-radius:10px;padding:9px 10px;background:#fbfcfe}.invoice-meta span,.invoice-party span{display:block;font-size:9.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:4px}.invoice-meta b{font-size:12px}.invoice-party{display:grid;grid-template-columns:1.4fr 1fr;gap:12px;margin-bottom:16px}.invoice-party>div{border-left:3px solid #315f88;background:#f7faff;border-radius:8px;padding:11px 13px}.invoice-party strong{display:block;font-size:15px}.invoice-party small{display:block;margin-top:5px;color:var(--muted);font-size:11px;line-height:1.45}.invoice-lines{border:1px solid var(--line);border-radius:12px}.invoice-lines .table{min-width:780px}.invoice-bottom{display:grid;grid-template-columns:1fr 360px;gap:24px;margin-top:18px}.invoice-notes{font-size:11.5px;line-height:1.6;padding-top:6px}.invoice-totals{display:grid;gap:5px}.invoice-totals>div{display:flex;justify-content:space-between;gap:15px;padding:7px 9px;border-bottom:1px solid var(--line);font-size:12px}.invoice-totals .net{background:#eef6fb;border-radius:8px;border:0;padding:10px}.invoice-totals .net b{font-size:16px;color:#245b7d}.invoice-footer{text-align:center;color:var(--muted);font-size:10.5px;border-top:1px dashed var(--line);margin-top:24px;padding-top:13px}.cancel-card{max-width:980px;margin-left:auto;margin-right:auto}
@media(max-width:980px){.sales-hero{padding:20px}.sales-hero-value{min-width:155px}.invoice-bottom{grid-template-columns:1fr}.invoice-meta{grid-template-columns:1fr 1fr}.invoice-paper{padding:20px}.bill-total-strip{justify-content:stretch}.bill-total-strip>div{flex:1}}
@media(max-width:650px){.sales-hero{flex-direction:column;align-items:flex-start;border-radius:15px}.sales-hero-value{width:100%;text-align:left}.billing-save{flex-direction:column}.billing-save .btn{width:100%}.bill-total-strip{display:grid;grid-template-columns:1fr 1fr}.bill-total-strip>div{min-width:0}.invoice-brand{flex-direction:column}.invoice-meta,.invoice-party{grid-template-columns:1fr}.invoice-paper{padding:15px;border-radius:12px}.invoice-title{font-size:15px}.invoice-company{font-size:20px}}

/* ===== Step 8: Returns + Accounts ===== */
.accounts-hero{background:linear-gradient(120deg,#3a274e,#6a3d7c 52%,#9a5f8d);color:#fff;border-radius:20px;padding:25px 27px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 38px rgba(67,39,79,.18);position:relative;overflow:hidden}.accounts-hero:after{content:"";position:absolute;width:285px;height:285px;border-radius:50%;right:-110px;top:-150px;background:rgba(255,255,255,.08)}.accounts-hero-value{z-index:1;min-width:190px;padding:15px 18px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.11);border-radius:16px;text-align:right}.accounts-hero-value span{font-size:27px;font-weight:850}.accounts-hero-value small{display:block;margin-top:4px;font-size:10px;opacity:.82}.accounts-kpis .kpi-card:nth-child(1){background:linear-gradient(145deg,#fff,#f5f1fa)}.accounts-kpis .kpi-card:nth-child(2){background:linear-gradient(145deg,#fff,#fff7ed)}.accounts-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#eff9f4)}.accounts-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f1f7fc)}
.accounts-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px}.accounts-actions a{display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:12px;padding:11px 12px;background:#fdfbff;transition:.15s}.accounts-actions a:hover{border-color:#dacbe5;background:#faf5fc;transform:translateX(2px)}.accounts-actions b{width:35px;height:35px;border-radius:10px;display:grid;place-items:center;background:#f0e7f5;color:#6a3d7c;font-size:11px}.accounts-actions span{display:flex;flex-direction:column;gap:2px}.accounts-actions strong{font-size:12.5px}.accounts-actions small{font-size:10.5px;color:var(--muted)}
.return-entry{background:linear-gradient(145deg,#fff,#fffcf8)}.return-context{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin:14px 0;padding:12px 14px;border:1px solid #eadfcd;background:#fffaf2;border-radius:12px;font-size:12px}.return-context b{font-size:14px;color:#5d4121}.return-context span{color:var(--muted)}.return-lines{min-width:1000px}.return-register{min-width:1100px}.outstanding-table{min-width:1000px}.ledger-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:4px 2px 15px;border-bottom:1px solid var(--line);margin-bottom:10px}.ledger-head strong{font-size:17px;display:block}.ledger-head small{display:block;color:var(--muted);margin-top:4px}.ledger-head>div:last-child{text-align:right}.ledger-head span{display:block;font-size:10px;text-transform:uppercase;color:var(--muted)}.ledger-head b{font-size:22px;color:#6a3d7c}.btn-danger{background:#fff0ef!important;color:#a8271d!important;border-color:#f0c7c3!important}.btn-danger:hover{background:#fde3e0!important}
@media(max-width:980px){.accounts-hero{padding:20px}.accounts-actions{grid-template-columns:1fr}.accounts-hero-value{min-width:155px}.ledger-head{align-items:flex-start}}
@media(max-width:650px){.accounts-hero{flex-direction:column;align-items:flex-start;border-radius:15px}.accounts-hero-value{width:100%;text-align:left}.accounts-actions{grid-template-columns:1fr}.return-context{align-items:flex-start;flex-direction:column;gap:6px}.ledger-head{flex-direction:column}.ledger-head>div:last-child{text-align:left}}

/* ===== Step 9: Reports & Business Intelligence ===== */
.reports-hero{background:linear-gradient(120deg,#14263d,#244e72 48%,#2d7b77);color:#fff;border-radius:20px;padding:26px 28px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 38px rgba(20,55,80,.18);position:relative;overflow:hidden}.reports-hero:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;right:-100px;top:-165px;background:rgba(255,255,255,.08)}.reports-period{z-index:1;min-width:205px;padding:15px 18px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.1);border-radius:17px;text-align:right}.reports-period span,.reports-period small{display:block;font-size:10px;opacity:.82;text-transform:uppercase;letter-spacing:.05em}.reports-period b{display:block;font-size:27px;margin:5px 0 3px}.reports-kpis .kpi{font-size:25px}.reports-kpis .kpi-card:nth-child(1){background:linear-gradient(145deg,#fff,#f1f7ff)}.reports-kpis .kpi-card:nth-child(2){background:linear-gradient(145deg,#fff,#f1fbf7)}.reports-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#fff8ec)}.reports-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f7f1fb)}
.profit-highlight{display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:20px;background:linear-gradient(120deg,#f7f3ff,#fff 50%,#eef8f4);border-color:#ded4ee}.profit-highlight span{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;color:#73598d}.profit-highlight strong{display:block;font-size:28px;line-height:1.15;margin:5px 0}.profit-highlight small{display:block;color:var(--muted);font-size:10.5px}.metric-list{display:grid;gap:0}.metric-list>div{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:11px 0;border-bottom:1px solid var(--line)}.metric-list>div:last-child{border-bottom:0}.metric-list span{font-size:12px;color:#556278}.metric-list b{font-size:15px;color:#253957;text-align:right}.report-shortcuts{display:grid;gap:8px;margin-top:14px}.report-shortcuts a{display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:11px;padding:10px 11px;background:#fbfcfe;transition:.15s}.report-shortcuts a:hover{background:#f2f7fb;border-color:#cddbe8;transform:translateX(2px)}.report-shortcuts>a>b{width:33px;height:33px;border-radius:9px;background:#eaf2f7;color:#315f78;display:grid;place-items:center;font-size:10px}.report-shortcuts span{display:flex;flex-direction:column;font-size:12px;font-weight:750}.report-shortcuts small{font-size:10px;font-weight:400;color:var(--muted);margin-top:2px}.mini-report{min-width:520px}.compact-table{min-width:480px}.compact-table th,.compact-table td{padding:8px;font-size:11.5px}
.report-filter{background:linear-gradient(180deg,#fff,#f9fbfd);border-color:#d9e2ec}.report-table{min-width:900px}.stock-report-table{min-width:1300px}.report-note{font-size:11.5px;color:#5f6d80;background:#f7f9fc;border:1px solid var(--line);border-radius:11px;padding:11px 13px;margin-top:-8px;margin-bottom:18px;line-height:1.55}.owner-lock-note{font-size:12px;background:#fff8e8;border:1px solid #efd99d;color:#71561c;border-radius:12px;padding:11px 14px;margin-bottom:16px}.profit-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#eefaef)}.profit-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f3effb)}
@media(max-width:980px){.reports-hero{padding:20px}.reports-period{min-width:165px}.profit-highlight{grid-template-columns:1fr 1fr}.profit-highlight .btn{grid-column:1/-1}.reports-kpis .kpi{font-size:22px}}
@media(max-width:650px){.reports-hero{flex-direction:column;align-items:flex-start;border-radius:15px}.reports-period{width:100%;text-align:left}.profit-highlight{grid-template-columns:1fr}.profit-highlight .btn{grid-column:auto}.report-filter .btn-block{width:100%}}
@media print{.sidebar,.topbar,.toolbar,.btn,.report-filter{display:none!important}.shell{display:block}.main{padding:0}.content-wrap{width:100%}.card{box-shadow:none;break-inside:avoid}.reports-hero{color:#111;background:#fff;border:1px solid #ccc;box-shadow:none}.reports-hero:after{display:none}.table th{position:static}.page-head{margin-top:0}.report-table,.stock-report-table{min-width:0;font-size:9px}.table th,.table td{padding:5px 4px;font-size:9px}}

/* ===== Step 10: Final Security + Responsive UI Polish ===== */
.brandbox{display:flex;align-items:center;gap:11px}.brandmark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#4777ec,#21469e);box-shadow:0 8px 18px rgba(0,0,0,.18);font-size:13px;font-weight:900;letter-spacing:.06em;flex:none}.sidebar{display:flex;flex-direction:column}.nav{flex:1}.sidebar-foot{margin-top:18px;padding:13px 10px 2px;border-top:1px solid rgba(255,255,255,.09);display:flex;justify-content:space-between;align-items:center;color:#8fa0c2;font-size:10.5px}.sidebar-foot small{background:rgba(255,255,255,.07);padding:4px 7px;border-radius:999px}.nav a.active{background:linear-gradient(90deg,rgba(82,126,232,.3),rgba(255,255,255,.08));box-shadow:inset 3px 0 0 #83a4ff;color:#fff}.nav a.active .dot{background:#9bb5ff;box-shadow:0 0 0 3px rgba(143,173,255,.14)}
.top-left{display:flex;align-items:center;gap:11px}.top-company{display:flex;flex-direction:column;gap:2px}.top-company:before{display:none}.top-company small{font-size:9.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.menu-toggle{display:none;border:1px solid var(--line);background:#fff;width:38px;height:38px;border-radius:10px;font-size:19px;cursor:pointer;color:#2b3b56}.userchip{display:flex;align-items:center;gap:8px;padding:5px 7px 5px 5px}.user-avatar{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#dfe8ff,#c8d7fb);color:#244ca9;font-weight:850}.user-meta{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logout-link{padding:5px 7px;border-left:1px solid var(--line);color:#9e2d25;font-weight:700}.app-footer{display:flex;justify-content:space-between;gap:15px;padding:15px 24px 22px;color:#8893a5;font-size:10.5px}.sidebar-overlay{display:none}
.security-hero{background:linear-gradient(120deg,#17243e,#293f69 52%,#445f8f);color:#fff;border-radius:20px;padding:25px 27px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 38px rgba(20,40,75,.17);position:relative;overflow:hidden}.security-hero:after{content:"";position:absolute;width:250px;height:250px;border-radius:50%;right:-80px;top:-140px;background:rgba(255,255,255,.08)}.permission-table{min-width:820px}.permission-table td:first-child{font-weight:750;color:#334765}.permission-table td:last-child,.permission-table th:last-child{text-align:center;width:90px}.audit-table{min-width:1250px}.audit-table td:nth-child(3){font-weight:800;color:#405b82}.system-value{font-size:19px;font-weight:850;margin-top:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.system-kpis .kpi-card:nth-child(1){background:linear-gradient(145deg,#fff,#f1f7ff)}.system-kpis .kpi-card:nth-child(2){background:linear-gradient(145deg,#fff,#f2f9f7)}.system-kpis .kpi-card:nth-child(3){background:linear-gradient(145deg,#fff,#fff8ec)}.system-kpis .kpi-card:nth-child(4){background:linear-gradient(145deg,#fff,#f6f1fb)}.deploy-list{display:grid;gap:9px;margin-top:14px}.deploy-list>div{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fbfcfe;font-size:12px;line-height:1.5}.access-card h1{font-size:24px;margin:6px 0 10px}.user-table{min-width:1200px}.btn-block{width:100%}
@media(max-width:980px){
 body.menu-open{overflow:hidden}.shell{display:block}.sidebar{position:fixed!important;top:0;left:-292px;width:280px;height:100vh!important;z-index:60;transition:left .22s ease;box-shadow:12px 0 35px rgba(10,25,50,.2)}body.menu-open .sidebar{left:0}.sidebar-overlay{display:block;position:fixed;inset:0;background:rgba(12,24,45,.45);z-index:55;opacity:0;pointer-events:none;transition:.2s}body.menu-open .sidebar-overlay{opacity:1;pointer-events:auto}.nav{display:block!important}.nav .cap{display:block;margin-top:19px}.menu-toggle{display:grid;place-items:center}.topbar{position:sticky!important;top:0}.content-wrap{width:100%}.system-value{font-size:16px}
}
@media(max-width:650px){.top-company small{display:none}.user-meta{display:none}.userchip{max-width:none}.app-footer{padding:12px 14px 18px;flex-direction:column;gap:4px}.security-hero{flex-direction:column;align-items:flex-start;border-radius:15px}.security-hero .hero-badge{width:100%;height:auto;min-height:74px}.system-value{font-size:15px}.topbar{min-height:60px}.main{padding-bottom:8px}}
@media print{.app-footer,.menu-toggle,.sidebar-overlay{display:none!important}}
