:root{
  --bg:#f4f7fb;
  --card:#fff;
  --ink:#17202f;
  --muted:#718096;
  --line:#e4e9f0;
  --primary:#1f6feb;
  --primary2:#174ea6;
  --good:#16854a;
  --warn:#b26a00;
  --bad:#c93c3c;
  --shadow:0 10px 30px rgba(30,55,90,.08);
}
*{box-sizing:border-box}
body{margin:0;font-family:"Segoe UI",Tahoma,Arial,sans-serif;background:var(--bg);color:var(--ink)}
button,input,select,textarea{font:inherit}
button{cursor:pointer;border:0}
.hidden{display:none!important}
.muted{color:var(--muted)}
.toast{
  position:fixed;left:22px;bottom:22px;z-index:100;display:none;
  background:#182333;color:#fff;padding:12px 16px;border-radius:12px;
  box-shadow:var(--shadow)
}

.login-page{
  min-height:100vh;display:grid;place-items:center;padding:24px;
  background:linear-gradient(135deg,#edf4ff,#f8fbff)
}
.login-card{
  width:min(430px,100%);background:var(--card);border:1px solid var(--line);
  box-shadow:var(--shadow);border-radius:24px;padding:34px
}
.brand-mark{
  width:58px;height:58px;border-radius:16px;background:#eaf2ff;color:var(--primary);
  display:grid;place-items:center;font-size:32px;margin:auto auto 16px
}
.login-card h1{text-align:center;margin:0 0 7px;font-size:25px}
.login-card p{text-align:center;color:var(--muted);margin:0 0 26px}
.login-card label,.form-grid label{
  display:grid;gap:7px;margin-bottom:13px;font-weight:600;font-size:14px
}
.login-card input,.form-grid input,.form-grid select,.modal-card textarea,.modal-card input,.modal-card select{
  width:100%;border:1px solid #d7dee8;border-radius:12px;padding:12px 13px;
  outline:none;background:#fff
}
.login-card input:focus,.form-grid input:focus,.form-grid select:focus,
.modal-card textarea:focus,.modal-card input:focus,.modal-card select:focus{
  border-color:var(--primary);box-shadow:0 0 0 3px rgba(31,111,235,.1)
}
.primary{background:var(--primary);color:#fff;padding:10px 16px;border-radius:11px;font-weight:700}
.primary:hover{background:var(--primary2)}
.big{width:100%;padding:13px;margin-top:6px}
.demo{
  font-size:12px;color:var(--muted);margin-top:16px;text-align:center;line-height:1.7
}

.app{display:grid;grid-template-columns:250px 1fr;min-height:100vh}
.sidebar{
  position:sticky;top:0;height:100vh;background:#101827;color:#eaf0f7;padding:20px 16px;
  display:flex;flex-direction:column
}
.side-brand{
  display:flex;align-items:center;gap:11px;padding:10px 8px 24px;
  border-bottom:1px solid rgba(255,255,255,.08)
}
.side-brand>span{font-size:30px}
.side-brand b{display:block}
.side-brand small{color:#93a0b6}
.sidebar nav{display:grid;gap:7px;padding-top:18px}
.nav-btn,.nav{
  background:transparent;color:#cbd5e1;text-align:right;padding:12px 13px;border-radius:11px
}
.nav-btn:hover,.nav-btn.active,.nav:hover,.nav.active{background:#1c2b43;color:#fff}
.side-bottom{margin-top:auto}
.user-card{display:flex;gap:10px;align-items:center;padding:10px 6px 12px}
.user-card b{display:block}
.user-card small{display:block;color:#93a0b6;margin-top:3px}
.avatar{
  width:36px;height:36px;border-radius:10px;background:#203553;display:grid;
  place-items:center;font-weight:800
}
.ghost{
  width:100%;background:transparent;color:#aeb9c9;border:1px solid rgba(255,255,255,.1);
  padding:9px 12px;border-radius:10px
}

.content{padding:24px 28px}
.topbar{
  display:flex;justify-content:space-between;align-items:flex-start;
  margin-bottom:22px;gap:14px
}
.topbar h2{margin:0 0 4px;font-size:26px}
.topbar span{color:var(--muted);font-size:13px}
.top-actions{display:flex;align-items:center;gap:10px}
.outline{background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 13px}
.page h2{margin:0 0 18px}
.page-head{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  margin-bottom:14px;flex-wrap:wrap
}
.page-head h2{margin:0}
.page-head .muted{font-size:13px}

.cards,.kpi-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px
}
.card{
  background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow);
  border-radius:16px;padding:18px;margin-bottom:16px
}
.metric-label{color:var(--muted)}
.metric{font-size:30px;font-weight:800;margin-top:9px}
.grid2,.grid-2{display:grid;grid-template-columns:1.25fr .75fr;gap:16px}
.table-card{
  background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow);
  border-radius:16px;padding:18px;margin-bottom:16px;overflow:auto
}
.table{width:100%;border-collapse:collapse;min-width:650px}
.table th,.table td{
  padding:11px 10px;border-bottom:1px solid var(--line);
  text-align:right;vertical-align:middle;font-size:13px
}
.table th{color:#58677d;font-weight:700;background:#fafbfd}
.badge{
  display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;
  font-size:12px;font-weight:700
}
.badge.new{background:#fff4d9;color:#9a6300}
.badge.approved{background:#e8f4ff;color:#1c67a4}
.badge.preparing{background:#eee9ff;color:#6540af}
.badge.ready{background:#e8f4ff;color:#1c67a4}
.badge.issued,.badge.finalized{background:#e7f7ee;color:var(--good)}
.badge.cancelled{background:#fdeaea;color:var(--bad)}
.badge.draft{background:#fff4d9;color:#9a6300}
.low-row{background:#fff8ef}
.ok{color:var(--good);font-weight:800}
.warn{color:var(--warn);font-weight:800}
.danger-text{color:var(--bad);font-weight:800}

.form-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px
}
.form-grid .full{grid-column:1/-1}
.form-grid button{grid-column:1/-1}

.toolbar{
  display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:14px
}
.toolbar label{min-width:160px}

.actions{display:flex;flex-wrap:wrap;gap:7px}
.secondary,.danger,.small-btn{
  padding:8px 11px;border-radius:10px;font-weight:700
}
.secondary{background:#edf3fb;color:#204a7a}
.danger{background:#fff0f0;color:var(--bad)}
.small-btn{background:#f2f4f8;color:#374151}
.table-actions{display:flex;gap:6px;align-items:center;justify-content:flex-start;flex-wrap:wrap}
.link-btn{background:transparent;color:var(--primary);font-weight:700}

.section{margin-top:18px}
.stats-note{
  padding:10px 12px;border-radius:10px;background:#f8fafc;color:#475569
}
.hint{font-size:12px;color:var(--muted)}
.empty{padding:28px;text-align:center;color:var(--muted)}
.search{max-width:280px}

.modal{
  position:fixed;inset:0;background:rgba(12,19,31,.52);
  display:grid;place-items:center;padding:18px;z-index:50
}
.modal-card{
  width:min(800px,100%);max-height:90vh;overflow:auto;background:#fff;
  border-radius:18px;padding:22px;box-shadow:0 30px 80px rgba(0,0,0,.18);position:relative
}
.modal-close{
  position:absolute;left:12px;top:8px;background:#f2f4f8;width:34px;height:34px;
  border-radius:10px;font-size:22px;color:#6b7280
}
.modal-card h3{margin:0 0 15px}
.modal-footer{
  display:flex;justify-content:flex-start;gap:8px;margin-top:18px;flex-wrap:wrap
}

.order-lines{display:grid;gap:10px}
.line{
  display:grid;grid-template-columns:1.4fr .6fr auto;gap:8px;align-items:center
}
.count-lines .line{grid-template-columns:1.4fr .6fr auto}
.line input,.line select{
  border:1px solid #d7dee8;border-radius:10px;padding:10px 12px;background:#fff
}

code{
  background:#f3f4f6;padding:2px 6px;border-radius:6px
}

@media(max-width:1000px){
  .app{grid-template-columns:1fr}
  .sidebar{position:static;height:auto}
  .sidebar nav{grid-template-columns:repeat(5,1fr)}
  .side-bottom{display:flex;gap:10px;align-items:center}
  .user-card{padding-bottom:0}
  .ghost{width:auto}
  .cards,.kpi-grid{grid-template-columns:repeat(2,1fr)}
  .grid2,.grid-2{grid-template-columns:1fr}
  .content{padding:18px}
  .nav-btn,.nav{text-align:center;font-size:12px}
  .side-brand{border-bottom:0}
}
@media(max-width:620px){
  .sidebar nav{grid-template-columns:repeat(2,1fr)}
  .cards,.kpi-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .form-grid .full{grid-column:auto}
  .topbar{align-items:stretch;flex-direction:column}
  .top-actions{justify-content:space-between}
  .line,.count-lines .line{grid-template-columns:1fr}
}

.mono{direction:ltr;text-align:left;font-family:Consolas,monospace;word-break:break-all}.linkbox{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:10px;margin-top:10px}.linkbox a{color:var(--primary);text-decoration:none}.linkbox a:hover{text-decoration:underline}

.notify-wrap{position:relative}
.notify-btn{position:relative;border:1px solid var(--line);background:#fff;border-radius:11px;width:42px;height:38px;cursor:pointer;font-size:18px}
.notify-btn:hover{box-shadow:0 4px 16px rgba(15,23,42,.08)}
.notify-badge{position:absolute;top:-6px;right:-6px;min-width:19px;height:19px;border-radius:999px;padding:0 5px;background:#dc2626;color:#fff;font-size:11px;line-height:19px;font-weight:800;border:2px solid #fff}
.notify-panel{position:absolute;top:47px;right:0;width:340px;max-width:calc(100vw - 30px);background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 45px rgba(15,23,42,.16);z-index:80;overflow:hidden}
.notify-panel-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line)}
.link-btn{border:0;background:none;color:var(--primary);cursor:pointer;font-size:12px}
.notify-list{max-height:360px;overflow:auto}
.notify-item{padding:12px 14px;border-bottom:1px solid #eef2f7;cursor:pointer;background:#fff}
.notify-item.unread{background:#fff8ed}
.notify-item:hover{background:#f8fafc}
.notify-item b{display:block;margin-bottom:4px}
.notify-item small{display:block;color:var(--muted);margin-top:5px}
.alert-banner{position:fixed;top:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;min-width:320px;max-width:min(680px,calc(100vw - 30px));padding:13px 15px;background:#fff;border:1px solid #f59e0b;box-shadow:0 18px 45px rgba(15,23,42,.2);border-radius:14px;z-index:120;animation:alertIn .25s ease-out}
.alert-banner .alert-icon{font-size:24px}
.alert-banner b{display:block;margin-bottom:3px;color:#92400e}
.alert-banner #alertMessage{color:#334155;font-size:13px}
.alert-close{margin-inline-start:auto;border:0;background:none;font-size:22px;cursor:pointer;color:#64748b}
@keyframes alertIn{from{opacity:0;transform:translate(-50%,-12px)}to{opacity:1;transform:translate(-50%,0)}}

.login-rights,.app-rights{font-size:11px;color:var(--muted);text-align:center;line-height:1.7}.login-rights{margin-top:18px}.app-rights{padding:14px 0 3px}.license-box{margin:0 0 18px;padding:13px;border:1px dashed #d6dee9;border-radius:14px;background:#fbfdff}.license-box h4{margin:0 0 7px}.license-box .device-id{direction:ltr;text-align:left;font-family:Consolas,monospace;font-size:11px;word-break:break-all;background:#f3f6fa;padding:9px;border-radius:9px;margin:8px 0}.license-box input{margin-top:7px}.license-box .license-actions{display:flex;gap:8px;align-items:center;margin-top:9px}.license-ok{padding:9px 11px;border-radius:10px;background:#edf9f1;color:#17683d;font-size:12px;font-weight:700}.license-warn{padding:9px 11px;border-radius:10px;background:#fff6df;color:#875700;font-size:12px}.import-drop{padding:16px;border:2px dashed #d4ddea;border-radius:15px;text-align:center;background:#fbfcfe}.import-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.import-stat{background:#f8fafc;border:1px solid var(--line);border-radius:11px;padding:10px}.import-stat b{display:block;font-size:20px;margin-top:3px}.mapping-table{width:100%;border-collapse:collapse;margin-top:10px}.mapping-table td,.mapping-table th{padding:8px;border-bottom:1px solid var(--line);font-size:12px;text-align:right}.warn-list{max-height:150px;overflow:auto;background:#fffaf0;border-radius:10px;padding:10px;font-size:12px}.import-preview{max-height:280px;overflow:auto}.import-preview .table{min-width:850px}
@media(max-width:900px){.import-summary{grid-template-columns:repeat(2,1fr)}}
.badge.receipt-pending{background:#fff4d9;color:#9a6300}
.badge.receipt-ok{background:#e7f7ee;color:var(--good)}
.badge.receipt-diff{background:#fff0e6;color:#c2410c}
.receipt-panel,.receipt-report{margin-top:18px;border:1px solid var(--line);background:#f8fafc;border-radius:14px;padding:16px}
.receipt-panel h4,.receipt-report h4{margin:0 0 8px}
.receipt-panel input{width:120px}

.search-mini{margin-top:16px}.search-mini .card{margin-bottom:0}


/* طلب النواقص: جدول شبكي شبيه بصفحات Excel */
.modal.order-sheet-modal{padding:8px;place-items:center}
.modal.order-sheet-modal .modal-card{width:min(1450px,98vw);max-width:98vw;max-height:96vh;padding:18px 20px;overflow:auto;border-radius:14px}
.order-sheet{display:flex;flex-direction:column;gap:13px;min-width:0}
.order-sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;border-bottom:1px solid #d6dfeb;padding:0 0 10px}
.order-sheet-head h3{margin:0 0 5px;font-size:21px}
.order-sheet-head p{margin:0;line-height:1.6}
.sheet-tag{flex-shrink:0;display:inline-flex;align-items:center;background:#e9f2ff;color:#1f4d86;padding:7px 11px;border-radius:7px;font-size:12px;font-weight:800}
.order-sheet-tools{display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap}
.order-sheet-tools label{display:grid;gap:5px;min-width:min(340px,100%);font-size:13px;font-weight:700}
.order-sheet-tools input{border:1px solid #b9c6d7;border-radius:5px;padding:9px 11px;min-width:260px;outline:none}
.order-sheet-tools input:focus,.order-catalog-qty:focus,.selected-order-qty:focus{border-color:#2b66b1;box-shadow:0 0 0 2px #2b66b122}
.sheet-count{font-size:12px;color:#58677d;padding-bottom:7px}
.sheet-count b{color:#152943;font-size:15px}
.order-catalog-wrap,.selected-table-wrap{border:1px solid #aebed1;border-radius:5px;overflow:auto;max-height:36vh;background:#fff}
.order-catalog,.selected-order-table{width:100%;min-width:720px;border-collapse:collapse;margin:0}
.order-catalog th,.order-catalog td,.selected-order-table th,.selected-order-table td{border:1px solid #c4d0df;padding:6px 9px;font-size:12px;white-space:nowrap;vertical-align:middle}
.order-catalog thead th,.selected-order-table thead th{position:sticky;top:0;z-index:2;background:#e6edf6;color:#213c5a;font-weight:800;text-align:center;border-color:#aebed1}
.order-catalog tbody tr:nth-child(even),.selected-order-table tbody tr:nth-child(even){background:#f7faff}
.order-catalog tbody tr:hover,.selected-order-table tbody tr:hover{background:#eef5ff}
.order-catalog td:first-child,.order-catalog td:nth-child(2),.order-catalog td:nth-child(4),.order-catalog td:nth-child(5),.order-catalog td:nth-child(6),.selected-order-table td{text-align:center}
.order-catalog .sheet-product-name{text-align:right;min-width:220px;font-weight:700;color:#243449}
.sheet-code{font-variant-numeric:tabular-nums;color:#52667e;font-weight:700}
.order-catalog-qty,.selected-order-qty{width:125px;max-width:100%;border:1px solid #bdc9d8;border-radius:4px;background:#fff;padding:7px 8px;text-align:center;font-size:13px}
.add-sheet-product{min-width:66px;padding:7px 12px!important;border-radius:5px!important;font-size:12px}
.add-sheet-product.added{background:#e6f5ec;color:#177245}
.filtered-out{display:none!important}
.invalid-cell{border-color:#dc2626!important;background:#fff1f2!important;box-shadow:0 0 0 1px #dc262633}
.order-selected-block{display:flex;flex-direction:column;gap:7px;min-width:0}
.order-selected-block .page-head{margin:0;align-items:baseline}
.order-selected-block h4{margin:0;font-size:15px}
.selected-counter{display:inline-flex;min-width:23px;height:23px;align-items:center;justify-content:center;border-radius:6px;background:#e7f1ff;color:#204c83;font-size:12px;margin-inline-start:4px}
.selected-table-wrap{max-height:18vh}
.selected-order-table .selected-order-qty{width:110px}
.sheet-empty{padding:14px;border:1px dashed #bdc9d8;border-radius:5px;font-size:12px}
.order-note-label{display:grid;gap:5px;font-size:13px;font-weight:700}
.order-note-label textarea{width:100%;min-height:55px;resize:vertical;border:1px solid #bdc9d8;border-radius:5px;padding:9px 10px;font:inherit;font-weight:400}
.order-sheet-footer{position:sticky;bottom:-18px;background:#fff;padding:10px 0 2px;margin-top:0;border-top:1px solid #e4eaf2;align-items:center}
.order-sheet-footer .hint{margin-inline-end:auto}
.order-sheet-footer button{border-radius:6px}
@media(max-width:700px){
  .modal.order-sheet-modal{padding:3px}
  .modal.order-sheet-modal .modal-card{width:100%;max-width:100%;max-height:98vh;padding:12px 9px;border-radius:9px}
  .order-sheet-head{flex-direction:column}
  .sheet-tag{display:none}
  .order-sheet-tools label{min-width:100%;width:100%}
  .order-sheet-tools input{min-width:0;width:100%}
  .order-catalog-wrap{max-height:39vh}
  .selected-table-wrap{max-height:20vh}
  .order-sheet-footer{bottom:-12px;gap:6px}
  .order-sheet-footer .hint{width:100%;margin:0}
}

/* توحيد صفحة الجرد مع أسلوب الجداول الشبكية في صفحة طلبات النواقص */
.count-toolbar{align-items:end}
.count-toolbar select{min-width:150px}
.count-list-table th,.count-list-table td{white-space:nowrap}
.count-list-table tbody tr:nth-child(even){background:#fbfdff}
.count-list-table tbody tr:hover{background:#f2f7ff}
.count-sheet-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.count-sheet-meta label{display:grid;gap:5px;font-size:13px;font-weight:700;min-width:0}
.count-sheet-meta input,.count-sheet-meta select{width:100%;min-width:0;border:1px solid #b9c6d7;border-radius:5px;padding:9px 10px;background:#fff;font:inherit;font-weight:400}
.count-sheet-meta input:focus,.count-sheet-meta select:focus{outline:none;border-color:#2b66b1;box-shadow:0 0 0 2px #2b66b122}
.count-catalog{min-width:760px}
.count-catalog th,.count-catalog td{text-align:center}
.count-catalog .sheet-product-name{text-align:right}
@media(max-width:700px){.count-sheet-meta{grid-template-columns:1fr}.count-toolbar label{width:100%}.count-catalog-wrap{max-height:39vh}}


/* ===== Warehouse visual refresh (presentation only; no application logic changed) ===== */
:root{
  --bg:#edf2f8;
  --card:rgba(255,255,255,.96);
  --ink:#172b45;
  --muted:#64758b;
  --line:#dce5ef;
  --primary:#1768c5;
  --primary2:#104e9a;
  --good:#168451;
  --warn:#a96806;
  --bad:#c33c45;
  --shadow:0 12px 32px rgba(23,54,91,.10);
}
body{
  background:
    linear-gradient(115deg,rgba(244,248,253,.84),rgba(239,245,251,.83)),
    url('assets/warehouse-background.jpg') center center / cover fixed;
  color:var(--ink);
}
.login-page{
  background:
    linear-gradient(130deg,rgba(233,242,253,.76),rgba(248,251,255,.79)),
    url('assets/warehouse-background.jpg') center center / cover fixed;
}
.login-card{
  background:rgba(255,255,255,.94);
  border:1px solid rgba(255,255,255,.82);
  box-shadow:0 24px 65px rgba(16,45,82,.20);
  backdrop-filter:blur(12px);
}
.brand-mark{
  background:linear-gradient(145deg,#eaf3ff,#d9e9fb);
  color:#155ba9;
  box-shadow:inset 0 1px 0 #fff,0 7px 18px rgba(20,91,169,.10);
}
.app{background:transparent}
.sidebar{
  background:linear-gradient(165deg,#102946 0%,#102238 55%,#0b1a2d 100%);
  border-inline-start:1px solid rgba(255,255,255,.08);
  box-shadow:8px 0 28px rgba(15,38,66,.12);
}
.side-brand{border-bottom-color:rgba(255,255,255,.13)}
.side-brand>span{
  display:grid;place-items:center;width:43px;height:43px;border-radius:14px;
  color:#ffcb68;background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.04));
  border:1px solid rgba(255,205,107,.28);font-size:25px;
}
.side-brand b{font-size:15px;letter-spacing:.1px}
.side-brand small{color:#a9bdd4}
.sidebar nav{gap:8px}
.nav-btn,.nav{
  position:relative;min-height:43px;border:1px solid transparent;
  transition:background .18s ease,border-color .18s ease,transform .18s ease,color .18s ease;
}
.nav-btn:hover,.nav:hover{
  background:rgba(255,255,255,.09);color:#fff;border-color:rgba(255,255,255,.08);
  transform:translateX(-2px);
}
.nav-btn.active,.nav.active{
  color:#fff;background:linear-gradient(100deg,rgba(35,117,201,.34),rgba(255,255,255,.09));
  border-color:rgba(129,190,244,.25);box-shadow:inset -3px 0 #f2bd59,0 7px 18px rgba(0,0,0,.10);
}
.avatar{background:linear-gradient(145deg,#f2c46e,#d9942c);color:#18304d;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.user-card small{color:#b5c5d8}
.content{padding:25px 30px;min-width:0}
.topbar{
  align-items:center;padding:16px 19px;margin:-2px 0 22px;
  border:1px solid rgba(255,255,255,.8);border-radius:18px;
  background:rgba(255,255,255,.78);box-shadow:0 8px 24px rgba(28,58,91,.07);
  backdrop-filter:blur(9px);
}
.topbar h2{color:#15385d;letter-spacing:-.25px}
.topbar span{color:#657a92}
.page h2{color:#183b60;letter-spacing:-.2px}
.card,.table-card{
  background:rgba(255,255,255,.95);
  border:1px solid rgba(213,225,239,.95);
  box-shadow:0 10px 28px rgba(28,61,98,.075);
  border-radius:17px;
  backdrop-filter:blur(5px);
}
.card{position:relative;overflow:hidden}
.cards>.card,.kpi-grid>.card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.cards>.card:hover,.kpi-grid>.card:hover{
  transform:translateY(-3px);box-shadow:0 16px 34px rgba(28,61,98,.12);border-color:#c6d9ed;
}
.metric-label{font-weight:700;color:#667d95}
.metric{color:#153e68;font-variant-numeric:tabular-nums}
.table-card{padding:19px}
.table th{background:linear-gradient(180deg,#edf4fb,#e6eef8);color:#294968;border-bottom-color:#d7e3ef}
.table td{color:#293d53}
.table tbody tr:nth-child(even){background:rgba(242,247,252,.72)}
.table tbody tr:hover{background:#edf5fd}
.toolbar,.page-head{gap:12px}
.stats-note{background:linear-gradient(110deg,#f0f6fc,#f8fbff);border:1px solid #e0eaf4;color:#48617c}
.form-grid input,.form-grid select,.modal-card input,.modal-card select,.modal-card textarea,.line input,.line select{
  border-color:#d3dfec;border-radius:11px;transition:border-color .16s ease,box-shadow .16s ease;
}
.form-grid input:focus,.form-grid select:focus,.modal-card input:focus,.modal-card select:focus,.modal-card textarea:focus,.line input:focus,.line select:focus{
  border-color:#5a9bda;box-shadow:0 0 0 3px rgba(36,117,194,.13);
}
button,.small-btn{
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease,border-color .16s ease;
}
button:focus-visible,.small-btn:focus-visible{outline:3px solid rgba(40,125,202,.30);outline-offset:2px}
button:active,.small-btn:active{transform:translateY(1px) scale(.985)}
button:disabled{opacity:.58;cursor:not-allowed;filter:saturate(.55)}
.primary{
  color:#fff;background:linear-gradient(135deg,#2783dc 0%,#1765bd 55%,#14539e 100%);
  border:1px solid rgba(10,72,137,.26);border-radius:12px;padding:10px 17px;
  font-weight:800;letter-spacing:.05px;box-shadow:0 6px 15px rgba(24,101,188,.20),inset 0 1px 0 rgba(255,255,255,.24);
}
.primary:hover{background:linear-gradient(135deg,#3694eb,#1d70c8 55%,#155da9);box-shadow:0 9px 20px rgba(24,101,188,.27);filter:brightness(1.02)}
.primary.big{border-radius:14px;padding:14px 18px}
.secondary{
  color:#174c7a;background:linear-gradient(135deg,#f2f8ff,#e1eefb);
  border:1px solid #cbdced;box-shadow:0 3px 9px rgba(26,75,119,.07);
}
.secondary:hover{background:linear-gradient(135deg,#e7f3ff,#d5e8fa);box-shadow:0 6px 14px rgba(26,75,119,.12)}
.danger{
  color:#a62f3b;background:linear-gradient(135deg,#fff5f5,#ffe5e7);
  border:1px solid #f0c9ce;box-shadow:0 3px 9px rgba(170,49,61,.07);
}
.danger:hover{background:linear-gradient(135deg,#ffe9eb,#ffd8dc);box-shadow:0 6px 14px rgba(170,49,61,.13)}
.small-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  color:#35516f;background:linear-gradient(135deg,#fff,#edf3f9);
  border:1px solid #d8e2ed;border-radius:9px;padding:8px 12px;font-weight:750;
  box-shadow:0 2px 7px rgba(31,60,92,.055);text-decoration:none;
}
.small-btn:hover{background:linear-gradient(135deg,#f4f9ff,#e6f0fb);border-color:#bfd3e8;box-shadow:0 5px 12px rgba(31,73,117,.11)}
.danger.small-btn{color:#a62f3b;background:linear-gradient(135deg,#fff5f5,#ffe5e7);border-color:#f0c9ce}
.danger.small-btn:hover{background:linear-gradient(135deg,#ffe9eb,#ffd8dc)}
.outline{
  color:#20527f;background:rgba(255,255,255,.9);border:1px solid #cbd9e8;
  border-radius:11px;padding:9px 15px;font-weight:750;box-shadow:0 3px 9px rgba(31,60,92,.05);
}
.outline:hover{background:#eef6ff;border-color:#b2cbe4;box-shadow:0 5px 13px rgba(31,73,117,.10)}
.ghost{border-radius:11px;border-color:rgba(255,255,255,.18);color:#d6e3f1}
.ghost:hover{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.30);color:#fff}
.link-btn{border-radius:8px;padding:5px 8px}
.link-btn:hover{background:#edf5ff;color:#114f91}
.notify-btn{background:linear-gradient(145deg,#fff,#edf4fb);border-color:#d5e1ed;border-radius:12px;box-shadow:0 4px 12px rgba(31,60,92,.07)}
.notify-btn:hover{box-shadow:0 7px 16px rgba(31,60,92,.13);transform:translateY(-1px)}
.modal-card{
  background:rgba(255,255,255,.985);border:1px solid #dce6f0;
  box-shadow:0 30px 85px rgba(11,34,60,.25);border-radius:20px;
}
.modal-close{background:#edf3f9;color:#48627e;border:1px solid #e0e8f0}
.modal-close:hover{background:#e2edf8;color:#193e65}
.badge{border:1px solid rgba(58,89,122,.08)}
.toast{background:linear-gradient(135deg,#173b60,#10283f);border:1px solid rgba(255,255,255,.14);border-radius:13px}
.app-rights{color:#637891}
.login-rights{color:#647b94}
.order-sheet .primary,.order-sheet .secondary,.order-sheet .danger,.order-sheet .small-btn{box-shadow:none}
.order-sheet-footer{background:#fff}
@media(max-width:1000px){
  .content{padding:17px}
  .topbar{margin:0 0 18px;padding:14px;border-radius:15px}
}
@media(max-width:620px){
  .content{padding:12px}
  .topbar{padding:13px}
  .primary,.secondary,.danger,.small-btn,.outline{min-height:36px}
}

/* ===== Premium warehouse UI refresh 2.4.6 ===== */
:root{
  --navy:#0b2948;
  --navy-2:#123c65;
  --gold:#f2b544;
  --accent:#1b72c8;
  --surface:rgba(255,255,255,.94);
  --surface-line:rgba(208,222,238,.92);
}
html{scroll-behavior:smooth}
body{
  min-height:100vh;
  background-color:#e8eff6;
  background-image:linear-gradient(120deg,rgba(235,242,250,.88),rgba(242,246,250,.82)),url('assets/warehouse-background.jpg');
  background-position:center center;
  background-size:cover;
  background-attachment:fixed;
}
button{font-family:inherit}
.app{min-height:100vh;grid-template-columns:264px minmax(0,1fr)}
.sidebar{
  z-index:5;
  background:linear-gradient(160deg,#0a2745 0%,#103858 52%,#071d34 100%);
  padding:22px 17px 18px;
  border-inline-start:1px solid rgba(255,255,255,.12);
  box-shadow:12px 0 36px rgba(5,29,54,.18);
}
.side-brand{padding:10px 7px 23px;gap:13px}
.side-brand>span{
  width:49px;height:49px;border-radius:16px;font-size:28px;
  color:#fff;background:linear-gradient(145deg,#f7c45d,#e18b1d);
  border:1px solid rgba(255,255,255,.4);
  box-shadow:0 8px 22px rgba(233,157,44,.23),inset 0 1px 0 rgba(255,255,255,.55);
}
.side-brand b{font-size:15px;letter-spacing:.2px;color:#fff}
.side-brand small{margin-top:4px;font-size:10px;letter-spacing:1.3px;color:#9fb8d2}
.sidebar nav{gap:8px;padding-top:20px}
.nav-btn,.nav{
  display:flex;align-items:center;justify-content:flex-start;gap:11px;
  min-height:46px;padding:10px 13px;border-radius:13px;
  color:#d3e0ed;font-size:13px;font-weight:650;text-align:right;
}
.nav-btn::before{
  content:'•';display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;
  border-radius:9px;background:rgba(255,255,255,.09);color:#f6c361;font-size:17px;
}
.nav-btn[data-page="dashboard"]::before{content:'⌂'}
.nav-btn[data-page="orders"]::before{content:'🛒';font-size:15px}
.nav-btn[data-page="inventory"]::before{content:'▤'}
.nav-btn[data-page="counts"]::before{content:'✓'}
.nav-btn[data-page="lowstock"]::before{content:'!'}
.nav-btn[data-page="products"]::before{content:'▦'}
.nav-btn[data-page="branches"]::before{content:'⌂'}
.nav-btn[data-page="users"]::before{content:'♙'}
.nav-btn[data-page="settings"]::before{content:'⚙'}
.nav-btn[data-page="network"]::before{content:'⌁'}
.nav-btn[data-page="productSearch"]::before{content:'⌕'}
.nav-btn:hover,.nav:hover{
  transform:translateX(-2px);color:#fff;background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.10)
}
.nav-btn.active,.nav.active{
  background:linear-gradient(105deg,rgba(44,128,205,.42),rgba(255,255,255,.10));
  border-color:rgba(164,205,243,.23);
  box-shadow:inset -4px 0 var(--gold),0 8px 22px rgba(0,0,0,.13);
}
.nav-btn.active::before{background:rgba(244,185,75,.20);color:#ffd77e}
.user-card{padding:13px 7px 14px;border-top:1px solid rgba(255,255,255,.13)}
.avatar{width:40px;height:40px;border-radius:13px;font-size:17px}
.user-card b{font-size:13px;color:#fff}
.user-card small{font-size:11px;color:#aac0d6}
.ghost{min-height:40px;background:rgba(255,255,255,.055)}
.content{padding:24px 30px 17px;min-width:0}
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  margin:0 0 23px;padding:14px 18px;
  border-radius:18px;border:1px solid rgba(255,255,255,.86);
  background:linear-gradient(110deg,rgba(255,255,255,.92),rgba(247,250,253,.79));
  box-shadow:0 12px 30px rgba(23,55,89,.09);backdrop-filter:blur(14px);
}
.topbar-heading{display:flex;align-items:center;gap:12px;min-width:0}
.brand-emblem{
  flex:0 0 45px;width:45px;height:45px;display:grid;place-items:center;
  border-radius:14px;color:#fff;font-size:26px;font-weight:900;
  background:linear-gradient(145deg,#f6c35d,#df8d1d);
  box-shadow:0 7px 18px rgba(202,132,32,.23),inset 0 1px 0 rgba(255,255,255,.5)
}
.brand-copy{display:grid;gap:2px;min-width:0}
.brand-copy strong{font-size:18px;line-height:1;color:#153c65;letter-spacing:0;font-family:Tahoma,"Segoe UI",Arial,sans-serif}
.brand-copy small{font-size:9px;color:#71879f;letter-spacing:.7px;white-space:nowrap}
.topbar-divider{height:37px;width:1px;background:#d9e3ed;margin:0 3px}
.page-title-group{min-width:0}
.page-title-group h2{font-size:19px!important;margin:0 0 3px!important;color:#153b62!important}
.page-title-group span{font-size:11px!important;color:#71859c!important}
.top-actions{flex-wrap:wrap;justify-content:flex-start}
#clock{font-weight:700;color:#496580;font-variant-numeric:tabular-nums}
.notify-btn{width:42px;height:42px}
.page{min-width:0}
.page h2{font-size:22px;color:#173c61}
.page-head{padding:3px 1px 13px;border-bottom:1px solid rgba(255,255,255,.48)}
.page-head h2{font-size:22px}
.cards,.kpi-grid{gap:14px}
.card,.table-card{
  border:1px solid rgba(212,225,239,.94);border-radius:17px;
  background:rgba(255,255,255,.95);
  box-shadow:0 12px 30px rgba(24,57,92,.085);
  backdrop-filter:blur(9px);
}
.table-card{padding:19px}
.table{border-collapse:separate;border-spacing:0;overflow:hidden;border-radius:11px}
.table th{background:linear-gradient(180deg,#edf4fb,#e4edf7);font-size:12px;padding:12px;color:#264866}
.table td{padding:11px 10px;font-size:12px}
.table tbody tr:last-child td{border-bottom:0}
.table tbody tr:hover{background:#eef6fd}
.metric{font-size:29px;font-weight:850;color:#173f68;letter-spacing:-.4px}
.primary,.secondary,.danger,.small-btn,.outline{
  min-height:38px;border-radius:11px;font-weight:750;letter-spacing:.05px;
}
.primary{background:linear-gradient(135deg,#2787dd,#1765b8 58%,#104c8b);box-shadow:0 6px 15px rgba(23,100,181,.20),inset 0 1px 0 rgba(255,255,255,.25)}
.primary:hover{filter:brightness(1.07);transform:translateY(-1px);box-shadow:0 9px 19px rgba(23,100,181,.27)}
.secondary{background:linear-gradient(140deg,#f6faff,#e6f0fa);color:#1c507f;border:1px solid #ccdeef;box-shadow:0 4px 10px rgba(20,63,104,.07)}
.danger{background:linear-gradient(140deg,#fff8f8,#ffe8e9);color:#ad3540;border:1px solid #f2cdd1;box-shadow:0 4px 10px rgba(143,36,47,.06)}
.small-btn{background:linear-gradient(140deg,#fff,#edf3f9);border:1px solid #d5e1ed;color:#315472}
.outline{background:rgba(255,255,255,.92);border:1px solid #ccdae8;color:#24527c}
.modal-card{border-radius:21px;border:1px solid rgba(255,255,255,.8)}
.toast{box-shadow:0 14px 32px rgba(5,25,48,.22)}
.app-rights{padding:18px 0 2px;color:#6f8499}

/* Main dashboard inspired by the warehouse reference artwork. */
.warehouse-hero{
  position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;
  justify-content:space-between;gap:20px;min-height:218px;padding:29px 34px;margin:0 0 21px;
  border-radius:22px;border:1px solid rgba(255,255,255,.52);
  background:linear-gradient(100deg,rgba(7,34,61,.96) 0%,rgba(12,54,91,.88) 46%,rgba(13,57,90,.38) 100%),url('assets/warehouse-background.jpg') center 48% / cover;
  box-shadow:0 17px 38px rgba(11,42,72,.23);color:#fff;
}
.warehouse-hero::after{
  content:'';position:absolute;z-index:-1;inset:0;
  background:radial-gradient(circle at 85% 20%,rgba(243,181,68,.28),transparent 32%),linear-gradient(0deg,rgba(4,23,42,.16),transparent 55%);
}
.warehouse-hero-copy{max-width:690px}
.hero-eyebrow{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid rgba(255,255,255,.23);border-radius:999px;background:rgba(255,255,255,.09);color:#f8d58c;font-size:11px;font-weight:800;letter-spacing:.2px}
.hero-eyebrow i{width:7px;height:7px;border-radius:50%;background:#66df9a;box-shadow:0 0 0 4px rgba(102,223,154,.15)}
.warehouse-hero h2{margin:13px 0 7px!important;color:#fff!important;font-size:clamp(25px,3vw,36px)!important;line-height:1.25;letter-spacing:-.5px}
.warehouse-hero p{max-width:560px;margin:0;color:#d7e5f2;font-size:14px;line-height:1.9}
.hero-meta{display:flex;gap:17px;flex-wrap:wrap;margin-top:19px;color:#f6d28c;font-size:11px;font-weight:700}
.hero-stamp{display:grid;place-items:center;align-content:center;flex:0 0 150px;width:150px;height:150px;border:1px solid rgba(255,255,255,.28);border-radius:28px;background:linear-gradient(145deg,rgba(255,255,255,.18),rgba(255,255,255,.055));box-shadow:inset 0 1px 0 rgba(255,255,255,.18);backdrop-filter:blur(8px);transform:rotate(-3deg)}
.hero-box-icon{font-size:52px;color:#f5c15e;text-shadow:0 8px 22px rgba(0,0,0,.25);line-height:1.2}
.hero-stamp b{margin-top:4px;font-size:20px;letter-spacing:2px;color:#fff}
.hero-stamp small{font-size:8px;letter-spacing:1.6px;color:#f5d58f}
.dashboard-section-title{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:20px 2px 11px}
.dashboard-section-title h3,.panel-heading h3{margin:2px 0 0;font-size:17px;color:#183d62}
.panel-kicker{font-size:10px;font-weight:850;letter-spacing:.75px;color:#9a7130;text-transform:uppercase}
.live-indicator{display:inline-flex;align-items:center;gap:7px;color:#47735f;font-size:10px;font-weight:750;padding:6px 10px;border:1px solid #d5eadc;border-radius:999px;background:rgba(239,250,243,.9)}
.live-indicator::before{content:'';width:6px;height:6px;border-radius:50%;background:#23a663;box-shadow:0 0 0 3px rgba(35,166,99,.12)}
.dashboard-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px}
.metric-card{position:relative;min-width:0;overflow:hidden;padding:16px 17px 15px;border:1px solid rgba(212,225,239,.95);border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 9px 23px rgba(23,57,92,.07);transition:transform .18s ease,box-shadow .18s ease}
.metric-card::after{content:'';position:absolute;top:0;right:0;left:0;height:3px;background:var(--metric-accent,#317ac1)}
.metric-card:hover{transform:translateY(-3px);box-shadow:0 14px 28px rgba(23,57,92,.12)}
.metric-card-top{display:flex;align-items:center;gap:10px}
.metric-icon{display:grid;place-items:center;flex:0 0 35px;width:35px;height:35px;border-radius:11px;background:var(--metric-tint,#eaf3fc);color:var(--metric-accent,#317ac1);font-size:20px;font-weight:900}
.metric-card .metric-label{font-size:11px;font-weight:800;color:#61768d}
.metric-card .metric{font-size:28px;margin-top:11px;color:#183d62}
.metric-card>small{display:block;margin-top:4px;color:#8697a9;font-size:10px}
.metric-card.blue{--metric-accent:#2378c8;--metric-tint:#e8f2fc}
.metric-card.green{--metric-accent:#159568;--metric-tint:#e7f7f0}
.metric-card.orange{--metric-accent:#db851b;--metric-tint:#fff2df}
.metric-card.purple{--metric-accent:#8056bd;--metric-tint:#f1ebfb}
.metric-card.red{--metric-accent:#c84d53;--metric-tint:#fff0f0}
.dashboard-shortcuts{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:12px}
.shortcut-card{display:flex;align-items:center;gap:12px;min-width:0;padding:14px 15px;border:1px solid rgba(255,255,255,.78);border-radius:16px;text-align:right;box-shadow:0 9px 22px rgba(23,57,92,.09);transition:transform .18s ease,box-shadow .18s ease;}
.shortcut-card:hover{transform:translateY(-3px);box-shadow:0 14px 28px rgba(23,57,92,.16)}
.shortcut-icon{display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border:1px solid rgba(255,255,255,.32);border-radius:13px;background:rgba(255,255,255,.16);color:#fff;font-size:25px;font-weight:900}
.shortcut-copy{display:grid;gap:4px;flex:1;min-width:0}
.shortcut-copy b{font-size:13px;color:#fff}
.shortcut-copy small{font-size:10px;color:rgba(255,255,255,.78)}
.shortcut-arrow{font-size:18px;color:rgba(255,255,255,.9)}
.shortcut-card.blue{background:linear-gradient(135deg,#2484d9,#145ba8)}
.shortcut-card.orange{background:linear-gradient(135deg,#f4a12d,#d96c12)}
.shortcut-card.green{background:linear-gradient(135deg,#20a977,#08734f)}
.shortcut-card.purple{background:linear-gradient(135deg,#8e62cc,#56399b)}
.shortcut-card.navy{background:linear-gradient(135deg,#315d84,#173b60)}
.dashboard-panels{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:14px;margin-top:16px;align-items:start}
.dashboard-panel{margin:0;min-width:0}
.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.panel-heading .link-btn{white-space:nowrap}
.dashboard-panel .table{min-width:470px}
.dashboard-panel .empty{padding:25px 10px}
@media(max-width:1100px){
  .app{grid-template-columns:225px minmax(0,1fr)}
  .content{padding:19px}
  .dashboard-panels{grid-template-columns:1fr}
}
@media(max-width:900px){
  .app{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto;padding:13px 14px}
  .sidebar nav{grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:6px;padding-top:12px}
  .side-brand{padding:5px 5px 12px}
  .side-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
  .content{padding:15px}
  .topbar{flex-wrap:wrap}
}
@media(max-width:620px){
  body{background-attachment:scroll}
  .content{padding:10px}
  .topbar{padding:11px;border-radius:14px}
  .topbar-heading{gap:8px;flex-wrap:wrap}
  .brand-emblem{width:38px;height:38px;flex-basis:38px;border-radius:12px;font-size:22px}
  .brand-copy strong{font-size:15px}
  .brand-copy small{font-size:8px}
  .topbar-divider{height:28px;margin:0 1px}
  .page-title-group h2{font-size:15px!important}
  .page-title-group span{font-size:9px!important}
  .top-actions{width:100%;justify-content:space-between}
  .warehouse-hero{min-height:unset;padding:22px 18px;border-radius:17px}
  .warehouse-hero h2{font-size:23px!important}
  .warehouse-hero p{font-size:12px}
  .hero-stamp{flex-basis:82px;width:82px;height:92px;border-radius:17px}
  .hero-box-icon{font-size:29px}
  .hero-stamp b{font-size:13px}
  .hero-stamp small{font-size:6px}
  .hero-meta{gap:8px;font-size:9px}
  .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .metric-card{padding:12px}
  .metric-card .metric{font-size:23px}
  .dashboard-shortcuts{grid-template-columns:1fr 1fr;gap:8px}
  .shortcut-card{padding:11px;gap:8px}
  .shortcut-icon{flex-basis:34px;width:34px;height:34px;font-size:19px}
  .shortcut-copy b{font-size:11px}
  .shortcut-copy small{font-size:9px}
  .dashboard-section-title h3{font-size:15px}
  .live-indicator{font-size:9px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}

/* Bulk warehouse outgoing: searchable, all-products quantity grid */
.bulk-issue-toolbar{
  display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin:10px 0 12px;padding:11px 13px;border:1px solid #dbe6f1;border-radius:13px;
  background:linear-gradient(110deg,rgba(239,246,253,.96),rgba(250,252,255,.98));
}
.bulk-issue-search{display:grid;gap:6px;min-width:min(340px,100%);font-size:13px;font-weight:800;color:#294968;flex:1}
.bulk-issue-search input{width:100%;max-width:none;border:1px solid #cbd9e8;border-radius:10px;padding:10px 12px;background:#fff}
.bulk-issue-count{font-size:12px;font-weight:800;color:#426488;padding:9px 11px;border-radius:9px;background:#e4effa;white-space:nowrap}
.bulk-issue-table-wrap{max-height:46vh;overflow:auto;border:1px solid #d6e2ee;border-radius:13px;background:rgba(255,255,255,.98)}
.bulk-issue-table{width:100%;min-width:720px;border-collapse:separate;border-spacing:0}
.bulk-issue-table thead th{position:sticky;top:0;z-index:3;background:linear-gradient(180deg,#e8f1fa,#dce9f6);color:#1e4266;border-bottom:1px solid #cbd9e8;white-space:nowrap}
.bulk-issue-table td{vertical-align:middle;white-space:nowrap}
.bulk-issue-table .stock-cell{font-weight:800;color:#1f5e8b;font-variant-numeric:tabular-nums}
.bulk-qty-input{width:145px;max-width:100%;text-align:center;font-weight:800;font-variant-numeric:tabular-nums;border:1px solid #cbd9e8!important;border-radius:9px!important;background:#fff!important;padding:9px 8px!important}
.bulk-qty-input::placeholder{font-size:11px;font-weight:500;color:#8798aa}
.bulk-qty-input:focus{border-color:#3985c8!important;box-shadow:0 0 0 3px rgba(44,125,194,.12)!important}
#woWarn,#woiWarn{padding:9px 12px;border-radius:10px;background:#fff1f2;border:1px solid #fecdd3;line-height:1.7}
@media(max-width:700px){
  .bulk-issue-toolbar{align-items:stretch}
  .bulk-issue-search{min-width:100%}
  .bulk-issue-count{align-self:flex-start}
  .bulk-issue-table-wrap{max-height:42vh}
  .bulk-qty-input{width:112px}
}

/* Product catalog search */
.products-searchbar{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin:0 0 14px;padding:12px 15px;border:1px solid #dce7f2;
  border-radius:14px;background:linear-gradient(115deg,rgba(244,249,255,.97),rgba(255,255,255,.96));
  box-shadow:0 5px 16px rgba(25,66,108,.055)
}
.products-searchbar label{font-size:13px;font-weight:800;color:#294968;white-space:nowrap}
.products-searchbar input{
  flex:1;min-width:220px;width:100%;padding:11px 14px;border:1px solid #cbd9e8;
  border-radius:10px;background:#fff;color:#20364d;outline:none;
  transition:border-color .16s ease,box-shadow .16s ease
}
.products-searchbar input:focus{border-color:#4d91cf;box-shadow:0 0 0 3px rgba(36,117,194,.13)}
.products-search-count{font-size:12px;font-weight:800;color:#35648f;white-space:nowrap}
.products-searchbar select{min-width:145px;max-width:190px;padding:10px 12px;border:1px solid #cbd9e8;border-radius:10px;background:#fff;color:#20364d;font-weight:700}
.archive-reason{margin-top:4px;max-width:360px;white-space:normal;font-size:11px;line-height:1.5;color:#8a5a18}
#bulkDeleteProducts:disabled{opacity:.52;cursor:not-allowed;filter:grayscale(.15)}
.products-table-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px;color:#35536f;font-size:12px;font-weight:700}
.products-table-meta b{color:#145da7;font-size:14px}
@media(max-width:650px){
  .products-searchbar{align-items:stretch;gap:8px}
  .products-searchbar label,.products-searchbar input{width:100%;min-width:0}
  .products-search-count{white-space:normal}
}

/* Scrollable history/audit tables on small screens */
.table-scroll{width:100%;overflow:auto;overscroll-behavior-x:contain}
.table-scroll>.table{min-width:900px}
.table-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}


/* v2.4.9: grouped stock-out documents in movement ledger */
.grouped-movement-row td{background:rgba(238,246,255,.76);vertical-align:middle}
.grouped-movement-row td:nth-child(3){min-width:230px;line-height:1.8}
.grouped-movement-row .hint{display:block;white-space:normal;line-height:1.7;margin-top:3px;max-width:420px}
.grouped-movement-row .table-actions{min-width:280px}

/* v2.4.14 — safe factory reset panel */
.factory-reset-card{border:1px solid rgba(185,55,55,.26);background:linear-gradient(135deg,rgba(185,55,55,.055),rgba(255,255,255,.94));}
.factory-reset-card h3{color:#a83232;}
.factory-reset-card .hint{line-height:1.9;}
.factory-reset-confirm{display:grid;gap:12px;}
.factory-reset-confirm .warn{padding:12px 14px;border:1px solid rgba(185,55,55,.28);border-radius:12px;background:rgba(185,55,55,.07);line-height:1.85;}
.factory-reset-confirm label{display:grid;gap:7px;font-weight:700;}
.factory-reset-confirm input{width:100%;min-width:0;}

/* ERP extension — inherits the existing visual language and RTL layout. */
.nav-section-label{padding:16px 14px 5px;color:#90a1b9;font-size:11px;font-weight:800;letter-spacing:.2px}
.erp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:14px 0}
.erp-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
.erp-form-grid label,.erp-report-filters label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted,#64748b)}
.erp-form-grid input,.erp-form-grid select,.erp-form-grid textarea,.erp-report-filters input,.erp-report-filters select,.erp-invoice-line input,.erp-invoice-line select,.erp-bom-line input,.erp-bom-line select,.erp-journal-line input,.erp-journal-line select{width:100%;min-width:0;border:1px solid var(--border,#dbe3ef);border-radius:9px;padding:10px 11px;background:var(--surface,#fff);color:var(--text,#172033);font:inherit}
.erp-form-grid .wide,.erp-form-grid label.wide{grid-column:1/-1}
.erp-invoice-line,.erp-bom-line,.erp-journal-line{display:grid;grid-template-columns:minmax(170px,2fr) repeat(2,minmax(90px,1fr)) auto;gap:8px;margin:8px 0;align-items:center}
.erp-journal-line{grid-template-columns:minmax(160px,2fr) repeat(2,minmax(100px,1fr)) minmax(120px,1fr) auto}
.erp-report-filters{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr)) auto;gap:12px;align-items:end}
.erp-totals{padding:13px 15px;margin:14px 0;background:var(--surface-2,#f3f6fb);border-radius:10px;font-weight:800}
.erp-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}
.erp-summary-grid .metric-card{padding:16px;display:flex;flex-direction:column;gap:8px}
.erp-summary-grid .metric-card b{font-size:20px}
.table-scroll{width:100%;overflow:auto}
@media(max-width:900px){.erp-grid{grid-template-columns:1fr}.erp-report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.erp-form-grid,.erp-report-filters{grid-template-columns:1fr}.erp-invoice-line,.erp-bom-line{grid-template-columns:1fr 1fr}.erp-invoice-line select,.erp-bom-line select{grid-column:1/-1}.erp-journal-line{grid-template-columns:1fr 1fr}.erp-journal-line select,.erp-journal-line .erp-journal-memo{grid-column:1/-1}.erp-summary-grid{grid-template-columns:1fr}}

/* v2.5.1 — keep activation status visible until the central server is licensed. */
.license-box{display:block;line-height:1.75}
.license-box .license-actions{flex-wrap:wrap}
.license-box .license-actions button{min-height:38px}
.license-box #licenseFeedback{display:block;color:#9b2c2c;margin-top:8px}
.license-box input{direction:ltr;text-align:left}

/* v2.5.2 — high-contrast, fully readable sidebar navigation */
:root{
  --sidebar-ink:#f4f8ff;
  --sidebar-muted:#bdcce0;
  --sidebar-line:rgba(205,225,246,.16);
  --sidebar-hover:rgba(118,177,231,.16);
  --sidebar-active:#176eae;
  --sidebar-gold:#ffd477;
}
.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  height:100dvh;
  min-height:540px;
  overflow:hidden;
  background:
    radial-gradient(ellipse at 12% 4%,rgba(46,126,184,.26),transparent 34%),
    linear-gradient(165deg,#0d2d4c 0%,#102a45 48%,#081d33 100%);
  border-inline-start:1px solid rgba(255,255,255,.14);
  box-shadow:10px 0 34px rgba(5,25,47,.2);
}
.side-brand{
  flex:0 0 auto;
  min-height:77px;
  margin-bottom:2px;
  padding:8px 7px 17px;
  border-bottom:1px solid var(--sidebar-line);
}
.side-brand>span{
  flex:0 0 48px;
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  color:#173654;
  background:linear-gradient(145deg,#ffe6a8 0%,#f2b94f 62%,#e99a30 100%);
  border:1px solid rgba(255,255,255,.66);
  box-shadow:0 8px 20px rgba(235,166,58,.22),inset 0 1px 0 rgba(255,255,255,.76);
}
.side-brand b{
  color:#fff;
  font-size:15px;
  font-weight:850;
  line-height:1.5;
}
.side-brand small{
  display:block;
  margin-top:3px;
  color:#c0d4e9;
  font-size:10px;
  letter-spacing:.5px;
}
.sidebar nav{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  width:100%;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(187,214,239,.48) rgba(255,255,255,.045);
  padding:14px 4px 15px 6px;
  margin:0 -3px;
}
.sidebar nav::-webkit-scrollbar{width:7px}
.sidebar nav::-webkit-scrollbar-track{background:rgba(255,255,255,.045);border-radius:20px}
.sidebar nav::-webkit-scrollbar-thumb{background:rgba(187,214,239,.42);border:1px solid rgba(255,255,255,.12);border-radius:20px}
.sidebar nav::-webkit-scrollbar-thumb:hover{background:rgba(210,231,250,.68)}
.nav-btn,.nav{
  position:relative;
  display:flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:flex-start;
  gap:11px;
  width:100%;
  min-width:0;
  min-height:46px;
  padding:8px 11px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:var(--sidebar-ink);
  font-family:inherit;
  font-size:13px;
  font-weight:750;
  line-height:1.55;
  text-align:right;
  white-space:normal;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease,transform .18s ease;
}
.nav-btn::before{
  content:'•';
  display:grid;
  place-items:center;
  flex:0 0 31px;
  width:31px;
  height:31px;
  margin-inline-start:0;
  border:1px solid rgba(219,235,250,.13);
  border-radius:10px;
  background:rgba(216,234,251,.11);
  color:#ffda8e;
  font-family:"Segoe UI Symbol",Tahoma,sans-serif;
  font-size:17px;
  font-weight:800;
  line-height:1;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
.nav-btn[data-page="dashboard"]::before{content:'⌂'}
.nav-btn[data-page="orders"]::before{content:'▣'}
.nav-btn[data-page="inventory"]::before{content:'▤'}
.nav-btn[data-page="transactions"]::before{content:'⇄'}
.nav-btn[data-page="counts"]::before{content:'✓'}
.nav-btn[data-page="lowstock"]::before{content:'!'}
.nav-btn[data-page="products"]::before{content:'▦'}
.nav-btn[data-page="branches"]::before{content:'⌂'}
.nav-btn[data-page="users"]::before{content:'♙'}
.nav-btn[data-page="sessions"]::before{content:'◉'}
.nav-btn[data-page="settings"]::before{content:'⚙'}
.nav-btn[data-page="network"]::before{content:'⌁'}
.nav-btn[data-page="productSearch"]::before{content:'⌕'}
.nav-btn[data-page="erpPartners"]::before{content:'♧'}
.nav-btn[data-page="erpInvoices"]::before{content:'▧'}
.nav-btn[data-page="erpManufacturing"]::before{content:'⚒'}
.nav-btn[data-page="erpReports"]::before{content:'▥'}
.nav-btn:hover,.nav:hover{
  color:#fff;
  background:var(--sidebar-hover);
  border-color:rgba(183,215,244,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
  transform:translateX(-2px);
}
.nav-btn:focus-visible,.nav:focus-visible,.ghost:focus-visible{
  outline:3px solid #ffd477;
  outline-offset:2px;
}
.nav-btn.active,.nav.active{
  color:#fff;
  background:linear-gradient(105deg,rgba(34,132,202,.82),rgba(25,93,151,.76));
  border-color:rgba(187,224,255,.43);
  box-shadow:inset -4px 0 var(--sidebar-gold),0 7px 17px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.13);
}
.nav-btn.active::before,.nav.active::before{
  color:#ffe3a2;
  background:rgba(255,222,153,.18);
  border-color:rgba(255,225,167,.32);
}
.nav-section-label{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:9px;
  margin:9px 1px 3px;
  padding:13px 10px 8px;
  border-top:1px solid var(--sidebar-line);
  color:#ffdc99;
  font-size:11px;
  font-weight:900;
  letter-spacing:.15px;
  line-height:1.6;
}
.nav-section-label::before{
  content:'';
  flex:0 0 7px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#f6bf58;
  box-shadow:0 0 0 4px rgba(246,191,88,.13);
}
.side-bottom{
  flex:0 0 auto;
  margin-top:0;
  padding:10px 2px 0;
  border-top:1px solid var(--sidebar-line);
  background:linear-gradient(180deg,rgba(7,25,44,.16),rgba(7,25,44,.36));
}
.user-card{
  align-items:center;
  min-width:0;
  padding:3px 5px 11px;
  border:0;
}
.user-card>div:last-child{min-width:0}
.user-card b{
  display:block;
  overflow:hidden;
  color:#fff;
  font-size:12px;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.user-card small{
  color:#c2d3e5;
  font-size:10px;
  line-height:1.5;
}
.avatar{
  flex:0 0 39px;
  width:39px;
  height:39px;
  border:1px solid rgba(255,255,255,.58);
  background:linear-gradient(145deg,#ffe5a4,#e9a53b);
  color:#153653;
  box-shadow:0 5px 14px rgba(0,0,0,.18);
}
.ghost{
  min-height:40px;
  width:100%;
  border:1px solid rgba(255,202,202,.27);
  border-radius:11px;
  background:linear-gradient(105deg,rgba(169,55,67,.20),rgba(255,255,255,.055));
  color:#ffe5e5;
  font-size:12px;
  font-weight:800;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.ghost:hover{
  background:rgba(190,63,72,.3);
  border-color:rgba(255,202,202,.48);
  transform:translateY(-1px);
}

@media(max-width:900px){
  .sidebar{
    position:relative;
    top:auto;
    height:auto;
    min-height:0;
    max-height:none;
    overflow:visible;
    padding:14px 15px 12px;
    border-radius:0 0 18px 18px;
  }
  .side-brand{min-height:0;padding:4px 5px 13px}
  .sidebar nav{
    display:grid;
    flex:0 0 auto;
    grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
    align-items:stretch;
    gap:8px;
    overflow:visible;
    padding:12px 2px 10px;
    margin:0;
  }
  .nav-btn,.nav{
    min-height:47px;
    padding:8px 10px;
    font-size:12px;
  }
  .nav-section-label{
    grid-column:1/-1;
    margin:6px 0 0;
    padding:10px 7px 6px;
  }
  .side-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:5px;
    padding:9px 2px 0;
  }
  .user-card{flex:1;padding:0;min-width:0}
  .ghost{width:auto;min-width:140px;padding-inline:15px}
}
@media(max-width:620px){
  .sidebar{padding:11px 10px 10px;border-radius:0 0 15px 15px}
  .side-brand>span{width:43px;height:43px;flex-basis:43px}
  .side-brand b{font-size:14px}
  .sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding-top:10px}
  .nav-btn,.nav{gap:8px;min-height:45px;padding:7px 8px;font-size:11px}
  .nav-btn::before{flex-basis:27px;width:27px;height:27px;border-radius:8px;font-size:15px}
  .side-bottom{align-items:center;gap:8px}
  .user-card{gap:8px}
  .avatar{flex-basis:34px;width:34px;height:34px}
  .user-card b{font-size:11px}
  .user-card small{font-size:9px}
  .ghost{min-width:112px;min-height:37px;padding:7px 9px;font-size:10px}
}


/* User role and granular permission editor */
.user-permission-modal{max-height:78vh;overflow-y:auto;padding-inline:2px}
.user-permission-modal>h3{margin-top:0;color:var(--text,#172033)}
.permission-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0 12px;padding:14px 16px;border:1px solid rgba(59,130,246,.20);border-radius:14px;background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(14,165,233,.045))}
.permission-header h4{margin:0 0 4px;color:var(--text,#172033)}
.permission-header .hint{margin:0;font-size:12px}
.permission-tools{display:flex;gap:7px;flex-wrap:wrap}
.permission-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.permission-group{min-width:0;padding:13px;border:1px solid var(--line,#dbe3ed);border-radius:13px;background:var(--card,#fff)}
.permission-group h4{margin:0 0 10px;padding-bottom:8px;border-bottom:1px solid var(--line,#dbe3ed);color:var(--primary,#1d4ed8);font-size:14px}
.permission-grid{display:grid;gap:8px}
.permission-item{display:flex;align-items:flex-start;gap:9px;padding:7px 8px;border-radius:9px;background:rgba(148,163,184,.07);font-size:12px;line-height:1.55;cursor:pointer}
.permission-item:hover{background:rgba(59,130,246,.09)}
.permission-item input{width:16px;height:16px;flex:0 0 16px;margin:2px 0 0;accent-color:#2563eb}
.permission-item input:disabled{opacity:.65;cursor:not-allowed}
.permission-item:has(input:checked){background:rgba(37,99,235,.10);color:#1746a2;font-weight:600}
@media(max-width:760px){.permission-groups{grid-template-columns:1fr}.permission-header{align-items:flex-start}.permission-tools{width:100%}.permission-tools button{flex:1}}

/* الإصدار 2.5.6 — تقسيم القائمة إلى إدارات رئيسية وقوائم فرعية */
.sidebar nav{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  padding:12px 4px 14px 6px;
}
.nav-department{
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  min-width:0;
  padding:6px;
  border:1px solid rgba(182,213,241,.13);
  border-radius:15px;
  background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(4,22,41,.18));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 5px 14px rgba(0,0,0,.07);
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.nav-department:hover{border-color:rgba(202,226,247,.26)}
.nav-department.active-department{
  border-color:rgba(255,211,128,.42);
  background:linear-gradient(145deg,rgba(35,117,172,.18),rgba(6,30,52,.24));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 7px 18px rgba(0,0,0,.10);
}
.nav-group-toggle{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 20px;
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  min-height:56px;
  padding:7px 8px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:#f7fbff;
  text-align:right;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease;
}
.nav-group-toggle:hover,.nav-group-toggle:focus-visible{
  background:rgba(180,216,246,.10);
  border-color:rgba(196,223,246,.20);
}
.nav-group-toggle:focus-visible{outline:3px solid #ffd477;outline-offset:2px}
.nav-group-toggle:disabled{opacity:.45;cursor:not-allowed}
.nav-group-symbol{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border:1px solid rgba(255,218,151,.34);
  border-radius:11px;
  background:linear-gradient(145deg,rgba(255,221,157,.22),rgba(226,157,54,.11));
  color:#ffdf9c;
  font-size:19px;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.nav-group-copy{display:grid;gap:2px;min-width:0}
.nav-group-copy b{color:#fff;font-size:12px;font-weight:900;line-height:1.55}
.nav-group-copy small{overflow:hidden;color:#adc5dc;font-size:9px;font-weight:600;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}
.nav-group-chevron{
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:7px;
  color:#ffd98d;
  font-size:17px;
  transition:transform .18s ease,background .18s ease;
}
.nav-group-toggle[aria-expanded="true"] .nav-group-chevron{
  transform:rotate(180deg);
  background:rgba(255,218,151,.12);
}
.nav-submenu{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:5px;
  min-width:0;
  padding:5px 2px 3px 0;
  border-top:1px solid rgba(188,216,240,.105);
}
.nav-submenu.collapsed{display:none}
.nav-submenu .nav-btn{
  width:calc(100% - 10px);
  min-height:41px;
  margin-inline-start:10px;
  padding:6px 9px;
  border-radius:10px;
  color:#d8e7f4;
  font-size:11px;
  font-weight:720;
}
.nav-submenu .nav-btn::before{
  flex-basis:27px;
  width:27px;
  height:27px;
  border-radius:8px;
  font-size:14px;
}
.nav-submenu .nav-btn:hover{
  background:rgba(110,174,221,.15);
  border-color:rgba(179,215,243,.22);
}
.nav-submenu .nav-btn.active{
  background:linear-gradient(105deg,rgba(36,137,207,.82),rgba(24,91,149,.78));
  border-color:rgba(196,226,249,.40);
  color:#fff;
}
.nav-submenu .nav-btn.active::before{
  background:rgba(255,221,157,.20);
  border-color:rgba(255,221,157,.37);
  color:#ffe6b0;
}

@media(max-width:900px){
  .sidebar nav{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    overflow:visible;
  }
  .nav-department{width:100%}
  .nav-submenu{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .nav-submenu .nav-btn{width:100%;margin:0;min-height:44px}
}
@media(max-width:620px){
  .sidebar nav{display:flex;flex-direction:column;gap:7px}
  .nav-department{padding:5px;border-radius:13px}
  .nav-group-toggle{grid-template-columns:35px minmax(0,1fr) 18px;min-height:51px;gap:8px;padding:6px}
  .nav-group-symbol{width:33px;height:33px;border-radius:9px;font-size:17px}
  .nav-group-copy b{font-size:11px}
  .nav-group-copy small{font-size:9px}
  .nav-submenu{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding-top:5px}
  .nav-submenu .nav-btn{min-height:43px;padding:6px 7px;gap:6px;font-size:10px}
  .nav-submenu .nav-btn::before{flex-basis:25px;width:25px;height:25px}
}

/* Archived products remain visible for audit/history, but are visually distinct. */
.archived-product-row { background: #f3f5f8 !important; color: #667085; }
.archived-product-row td { opacity: .88; }

/* ALANAS organization identity and invoice branding settings */
.company-logo-editor{display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,260px);gap:18px;align-items:center;margin:18px 0;padding:16px;border:1px solid var(--border,#d9e2ec);border-radius:14px;background:rgba(245,249,253,.72)}
.company-logo-preview{min-height:145px;border:1px dashed #9db0c4;border-radius:12px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;text-align:center}
.company-logo-preview img{max-width:100%;max-height:120px;object-fit:contain}.company-logo-preview small{color:#66788a;font-size:11px}
.company-watermark-settings{display:grid;grid-template-columns:1fr minmax(200px,320px);gap:16px;align-items:center;padding:14px 0}
.company-watermark-settings .checkbox-row{display:flex;align-items:center;gap:9px}.company-watermark-settings input[type=range]{width:100%}
@media(max-width:650px){.company-logo-editor,.company-watermark-settings{grid-template-columns:1fr}.company-logo-preview{min-height:110px}}


.cash-dashboard-metrics{grid-template-columns:repeat(auto-fit,minmax(185px,1fr))}
.cash-metric .cash-value{font-size:clamp(17px,1.7vw,24px);line-height:1.45;direction:rtl;unicode-bidi:plaintext;white-space:nowrap;letter-spacing:-.25px}
.cash-summary-date{margin:-2px 2px 16px;color:#74879b;font-size:11px;font-weight:700;text-align:left}
.cash-summary-restricted{margin:0 0 16px;padding:15px 18px;border:1px dashed #d9e2ec;border-radius:14px;background:rgba(255,255,255,.75);color:#718096;font-size:13px;font-weight:700}
@media(max-width:600px){.cash-dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.cash-metric .cash-value{font-size:17px}.cash-summary-date{text-align:right}}

.remember-login{display:flex!important;flex-direction:row!important;align-items:center;gap:9px;margin:2px 0 12px;color:var(--muted,#64748b);font-size:13px;cursor:pointer}.remember-login input{width:17px;height:17px;accent-color:var(--primary,#1d70b7);margin:0}.remember-login span{user-select:none}


/* v2.5.26 — financial reports and screenshot-aligned warehouse ledgers. */
.report-actions{display:flex;gap:8px;flex-wrap:wrap}
.financial-report-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 4px;border-bottom:2px solid var(--primary,#1d70b7);margin:12px 0}
.financial-report-heading h3{margin:0;color:var(--text,#172033)}
.financial-report-heading p{margin:5px 0 0;color:var(--muted,#64748b);font-size:12px}
.report-company-caption{font-size:12px;color:var(--muted,#64748b);font-weight:700}
.financial-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.financial-kpis .metric-card{border:1px solid var(--border,#dbe3ef);background:var(--surface,#fff);border-radius:12px}
.positive-value{color:#16834a!important}
.negative-value{color:#bf3030!important}
.report-section-row th{background:#e7eef7;color:#173d61;text-align:right;padding:10px}
.report-subtotal th,.report-subtotal td{background:#f4f7fb;font-weight:800}
.report-total-row th,.report-total-row td{background:#e7edf4;font-weight:900}
.report-grand-total th,.report-grand-total td{background:#d9f3e5;color:#145b35;font-weight:900;font-size:15px}
.muted-cell{text-align:center;color:var(--muted,#64748b);padding:15px}
.report-warning{margin:10px 0;padding:12px;border:1px solid #e9b34b;background:#fff8e8;color:#784b09;border-radius:10px;line-height:1.8}
.report-balance-status{margin-top:12px;padding:11px 14px;border-radius:10px;font-weight:800}
.report-balance-status.balanced{background:#e3f7eb;color:#17643a}
.report-balance-status.unbalanced{background:#fde9e9;color:#9f2727}
.financial-capital-section{margin-top:18px;padding-top:12px;border-top:1px dashed var(--border,#dbe3ef)}
.financial-capital-section h4{margin:0 0 10px}
.trial-balance-report th,.trial-balance-report td{text-align:center;white-space:nowrap}
.income-statement-report th:first-child,.income-statement-report td:first-child{text-align:right}
.income-statement-report td:last-child{text-align:left;direction:ltr;font-variant-numeric:tabular-nums}
@media(max-width:900px){.financial-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.financial-report-heading{flex-direction:column}}
@media(max-width:600px){.financial-kpis{grid-template-columns:1fr}.report-actions{display:grid;grid-template-columns:1fr 1fr}.trial-balance-report{min-width:900px}}


/* v2.5.32 — opening balances and cost-center movement tracking */
:root{--sidebar-color:#102a45;--sidebar-active:#176eae}
.sidebar{background:radial-gradient(ellipse at 12% 4%,color-mix(in srgb,var(--sidebar-color) 78%,#65a9d8),transparent 38%),linear-gradient(165deg,var(--sidebar-color),color-mix(in srgb,var(--sidebar-color) 82%,#000) 100%)}
.nav-btn:hover,.nav:hover{background:color-mix(in srgb,var(--sidebar-active) 28%,transparent);}
.nav-btn.active,.nav.active,.nav-submenu .nav-btn.active{background:linear-gradient(105deg,color-mix(in srgb,var(--sidebar-active) 94%,#fff 6%),color-mix(in srgb,var(--sidebar-active) 78%,#000 22%));border-color:color-mix(in srgb,var(--sidebar-active) 55%,#fff 45%)}
.primary{background:linear-gradient(135deg,var(--primary),var(--primary2));border-color:var(--primary)}
.primary:hover{background:linear-gradient(135deg,var(--primary2),color-mix(in srgb,var(--primary2) 82%,#000));}
.brand-mark{color:var(--primary)}
.account-tree-toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:8px 0 13px}
.account-tree-search{display:grid;gap:6px;min-width:min(360px,100%);font-weight:700;font-size:13px;color:var(--ink)}
.account-tree-search input{border:1px solid var(--line);border-radius:10px;padding:10px 12px;min-width:240px;background:#fff;color:var(--ink)}
.account-tree-scroll{max-height:calc(100vh - 360px);min-height:240px;border:1px solid var(--line);border-radius:12px}
.account-tree-table{min-width:850px}
.account-tree-table thead th{position:sticky;top:0;z-index:1;background:#edf3fa;color:#25415d;white-space:nowrap}
.account-tree-table tbody tr:nth-child(even){background:#f8fbfe}
.account-tree-table tbody tr:hover{background:#edf5fd}
.account-tree-name{display:flex;align-items:center;gap:7px;min-width:190px;font-weight:650}
.tree-toggle{flex:0 0 22px;width:22px;height:22px;padding:0;border:1px solid #c7d6e6;border-radius:6px;background:#edf4fb;color:#24557d;font-weight:800;line-height:1}
.tree-spacer{flex:0 0 22px;width:22px}
.account-tree-table .amount-cell{font-variant-numeric:tabular-nums;white-space:nowrap}
.account-tree-legend{font-size:12px;color:var(--muted);margin-top:9px}
.theme-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:14px;align-items:end}
.theme-settings-grid>label{display:grid;gap:7px;font-weight:700;font-size:13px}
.theme-settings-grid input[type=color]{width:100%;height:48px;border:1px solid var(--line);border-radius:10px;padding:4px;background:#fff;cursor:pointer}
.theme-preview{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px;border-radius:13px;background:linear-gradient(120deg,color-mix(in srgb,var(--preview-sidebar) 90%,#000),var(--preview-sidebar));color:#fff}
.theme-preview .primary{background:var(--preview-primary);border-color:var(--preview-primary)}
.warehouse-master-note{margin-bottom:12px}
@media(max-width:650px){.theme-settings-grid{grid-template-columns:1fr}.theme-preview{grid-column:1;flex-wrap:wrap}.account-tree-scroll{max-height:none}.account-tree-toolbar>.actions{width:100%;flex-wrap:wrap}}
