/* ============================================================
   CLEENA Manufacturing ERP — Design System v3
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --p:    #2563eb; --p-lt: #dbeafe; --p-dk: #1d4ed8;
  --g:    #059669; --g-lt: #d1fae5; --g-dk: #047857;
  --a:    #d97706; --a-lt: #fef3c7; --a-dk: #b45309;
  --r:    #dc2626; --r-lt: #fee2e2; --r-dk: #b91c1c;
  --v:    #7c3aed; --v-lt: #ede9fe; --v-dk: #6d28d9;
  --c:    #0891b2; --c-lt: #cffafe; --c-dk: #0e7490;
  --rose: #e11d48; --rose-lt: #ffe4e6;
  --navy: #0f172a; --navy2: #1e293b;
  --bg:   #ffffff;
  --sur:  #ffffff;
  --bdr:  #e2e8f0;
  --muted:#64748b;
  --text: #1e293b;
  --nav-h: 62px;
  --sh1: 0 1px 3px rgba(0,0,0,.07),0 1px 2px rgba(0,0,0,.04);
  --sh2: 0 4px 16px rgba(0,0,0,.08),0 2px 6px rgba(0,0,0,.04);
  --sh3: 0 12px 36px rgba(0,0,0,.12),0 4px 12px rgba(0,0,0,.06);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:'Inter','Segoe UI',sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;overflow-x:hidden}

/* ── ANIMATIONS ─────────────────────────────── */
@keyframes fadeUp   {from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@keyframes fadeIn   {from{opacity:0}to{opacity:1}}
@keyframes scaleIn  {from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
@keyframes shimmer  {0%{background-position:-200% 0}100%{background-position:200% 0}}
@keyframes pulse-ring{0%{box-shadow:0 0 0 0 rgba(37,99,235,.3)}70%{box-shadow:0 0 0 8px rgba(37,99,235,0)}100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}}
@keyframes bar-fill {from{width:0}to{width:var(--w)}}
@keyframes float-card{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes count-tick{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes spin-in  {from{opacity:0;transform:rotate(-15deg) scale(.8)}to{opacity:1;transform:none}}

.anim-fade-up  {animation:fadeUp .45s cubic-bezier(.22,.68,0,1.2) both}
.anim-fade-in  {animation:fadeIn .35s ease both}
.anim-scale-in {animation:scaleIn .35s cubic-bezier(.22,.68,0,1.2) both}

/* staggered delays */
.d1{animation-delay:.05s}.d2{animation-delay:.10s}.d3{animation-delay:.15s}
.d4{animation-delay:.20s}.d5{animation-delay:.25s}.d6{animation-delay:.30s}
.d7{animation-delay:.35s}.d8{animation-delay:.40s}.d9{animation-delay:.45s}

/* ── NAVBAR ─────────────────────────────────── */
.c-nav{
  position:sticky;top:0;z-index:999;height:70px;
  background:#ffffff;
  border-bottom:3px solid #2563eb;
  box-shadow:0 2px 16px rgba(37,99,235,.12),0 1px 0 #e2e8f0
}
.c-nav-inner{display:flex;align-items:center;width:100%;padding:0 24px;gap:6px;height:100%}

/* Brand */
.c-brand{display:flex;align-items:center;gap:11px;text-decoration:none;flex-shrink:0;margin-right:16px;padding-right:20px;border-right:1.5px solid #e2e8f0}
.c-logo{
  width:42px;height:42px;border-radius:12px;
  background:linear-gradient(135deg,#2563eb,#38bdf8);
  display:flex;align-items:center;justify-content:center;
  font-size:22px;font-weight:900;color:#fff;
  box-shadow:0 4px 14px rgba(37,99,235,.4)
}
.c-brand-name{font-size:19px;font-weight:900;color:#0f172a;letter-spacing:-.5px}
.c-brand-tag{font-size:9px;color:#64748b;font-weight:600;letter-spacing:1px;text-transform:uppercase;margin-top:1px}

/* Nav links */
.c-nav-links{display:flex;align-items:center;gap:2px}
.c-nav-link{
  display:flex;align-items:center;gap:7px;padding:8px 15px;border-radius:9px;
  color:#1e293b;font-size:13px;font-weight:700;text-decoration:none;
  transition:all .18s;white-space:nowrap;border:1.5px solid transparent;
  letter-spacing:-.1px
}
.c-nav-link i{font-size:13px;color:#2563eb}
.c-nav-link:hover{
  color:#2563eb;background:#eff6ff;
  border-color:#bfdbfe
}
.c-nav-link.active{
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  border-color:#3b82f6;font-weight:800;
  box-shadow:0 3px 14px rgba(37,99,235,.4);
}
.c-nav-link.active i{color:#fff}

/* Final Report button */
.c-nav-final{
  color:#fff !important;
  background:linear-gradient(135deg,#e11d48,#be123c) !important;
  border-color:#f43f5e !important;
  box-shadow:0 3px 14px rgba(225,29,72,.4) !important;
  font-weight:700 !important;margin-left:4px
}
.c-nav-final:hover{
  background:linear-gradient(135deg,#be123c,#9f1239) !important;
  box-shadow:0 5px 20px rgba(225,29,72,.5) !important;
  transform:translateY(-1px)
}
.c-nav-final i{opacity:1 !important;color:#fff !important}

/* Right side */
.c-nav-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.c-user{
  display:flex;align-items:center;gap:9px;
  background:#f1f5f9;
  border:1.5px solid #e2e8f0;
  border-radius:100px;padding:5px 16px 5px 6px;
  transition:all .15s
}
.c-user:hover{background:#e2e8f0;border-color:#cbd5e1}
.c-avatar{
  width:32px;height:32px;border-radius:50%;
  background:linear-gradient(135deg,#2563eb,#38bdf8);
  display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:800;color:#fff;
  box-shadow:0 2px 8px rgba(37,99,235,.4)
}
.c-uname{font-size:13px;font-weight:700;color:#0f172a;letter-spacing:-.2px}
.c-logout{
  display:flex;align-items:center;gap:7px;padding:7px 15px;border-radius:9px;
  background:#fee2e2;border:1.5px solid #fca5a5;
  color:#dc2626;font-size:13px;font-weight:700;text-decoration:none;transition:all .15s
}
.c-logout:hover{background:#dc2626;border-color:#b91c1c;color:#fff;transform:translateY(-1px)}

/* ── PAGE ───────────────────────────────────── */
.page{padding:28px;min-height:calc(100vh - var(--nav-h))}
.p-hdr{margin-bottom:24px}
.p-hdr h4{font-size:22px;font-weight:900;color:#0f172a;margin:0 0 5px;display:flex;align-items:center;gap:10px}
.p-hdr p{font-size:13.5px;color:#475569;font-weight:500;margin:0}

/* ── LOGIN ───────────────────────────────────── */
.l-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--navy);position:relative;overflow:hidden}
.l-bg{position:absolute;inset:0;background:radial-gradient(ellipse 60% 50% at 20% 30%,rgba(37,99,235,.2) 0%,transparent 70%),radial-gradient(ellipse 50% 60% at 80% 70%,rgba(56,189,248,.12) 0%,transparent 70%)}
.l-card{display:grid;grid-template-columns:1fr 1fr;width:100%;max-width:880px;background:var(--sur);border-radius:20px;overflow:hidden;box-shadow:0 40px 100px rgba(0,0,0,.5);position:relative;z-index:1;animation:scaleIn .5s cubic-bezier(.22,.68,0,1.2) both}
.l-left{background:linear-gradient(145deg,#0f172a,#1e3a5f);padding:52px 44px;display:flex;flex-direction:column;justify-content:center;position:relative;overflow:hidden}
.l-left::before{content:'';position:absolute;bottom:-80px;right:-80px;width:260px;height:260px;border-radius:50%;background:rgba(37,99,235,.08);pointer-events:none}
.l-logo{width:72px;height:72px;border-radius:18px;background:linear-gradient(135deg,var(--p),#38bdf8);display:flex;align-items:center;justify-content:center;font-size:38px;font-weight:900;color:#fff;margin-bottom:28px;box-shadow:0 10px 30px rgba(37,99,235,.5)}
.l-left h1{font-size:38px;font-weight:900;color:#fff;margin:0 0 8px;letter-spacing:-1px}
.l-left h1 span{color:#38bdf8}
.l-left p{color:rgba(255,255,255,.4);font-size:13.5px;line-height:1.7;margin:0}
.l-feats{margin-top:36px;display:flex;flex-direction:column;gap:14px}
.l-feat{display:flex;align-items:center;gap:12px}
.l-feat i{width:34px;height:34px;border-radius:9px;background:rgba(37,99,235,.18);display:flex;align-items:center;justify-content:center;color:#93c5fd;font-size:14px;flex-shrink:0}
.l-feat span{font-size:13px;color:rgba(255,255,255,.5)}
.l-right{padding:52px 44px;display:flex;flex-direction:column;justify-content:center}
.l-right h2{font-size:24px;font-weight:800;color:var(--navy);margin:0 0 6px}
.l-right p{color:var(--muted);font-size:13px;margin:0 0 30px}
.l-label{font-size:12.5px;font-weight:600;color:var(--text);margin-bottom:6px;display:block}
.l-input{width:100%;padding:11px 14px;border:1.5px solid var(--bdr);border-radius:9px;font-size:14px;color:var(--text);background:#f8fafc;transition:all .15s;outline:none;font-family:inherit}
.l-input:focus{border-color:var(--p);background:#fff;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.l-input-wrap{position:relative}
.l-input-wrap .l-input{padding-right:42px}
.l-eye{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--muted);padding:4px}
.l-eye:hover{color:var(--p)}
.l-btn{width:100%;padding:13px;border:none;border-radius:9px;background:linear-gradient(135deg,var(--p),var(--p-dk));color:#fff;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 4px 16px rgba(37,99,235,.35);transition:all .15s;font-family:inherit}
.l-btn:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(37,99,235,.45)}
.l-btn:active{transform:none}
.l-hint{margin-top:24px;padding:14px 16px;background:#f8fafc;border-radius:9px;border:1px solid var(--bdr);font-size:12.5px;color:var(--muted)}
.l-hint strong{display:block;margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px;font-size:11px}
.l-hint code{background:var(--bdr);padding:2px 7px;border-radius:5px;font-size:12px;color:var(--text)}
.l-alert{display:flex;align-items:center;gap:9px;padding:11px 14px;border-radius:8px;background:var(--r-lt);border:1px solid #fecaca;color:var(--r);font-size:13px;margin-bottom:20px}
@media(max-width:680px){.l-card{grid-template-columns:1fr}.l-left{display:none}.l-right{padding:36px 24px}}

/* ── STAT CARDS — Premium KPI style ─────────── */
.stat-grid{display:grid;gap:16px}
.s4{grid-template-columns:repeat(4,1fr)}
.s3{grid-template-columns:repeat(3,1fr)}
.s2{grid-template-columns:repeat(2,1fr)}

.sc{
  background:#fff;border:1.5px solid #e2e8f0;border-radius:16px;
  padding:22px 24px 20px;box-shadow:0 2px 12px rgba(0,0,0,.06);
  position:relative;overflow:hidden;
  display:flex;flex-direction:column;
  transition:transform .22s ease,box-shadow .22s ease;
  animation:fadeUp .45s cubic-bezier(.22,.68,0,1.2) both;
}
.sc:hover{transform:translateY(-4px)}

/* Bold left accent bar */
.sc::after{content:'';position:absolute;top:0;left:0;width:5px;height:100%;border-radius:16px 0 0 16px}
.sc-blue::after   {background:linear-gradient(180deg,#2563eb,#38bdf8)}
.sc-green::after  {background:linear-gradient(180deg,#059669,#34d399)}
.sc-amber::after  {background:linear-gradient(180deg,#d97706,#fbbf24)}
.sc-red::after    {background:linear-gradient(180deg,#dc2626,#f87171)}
.sc-purple::after {background:linear-gradient(180deg,#7c3aed,#a78bfa)}
.sc-cyan::after   {background:linear-gradient(180deg,#0891b2,#22d3ee)}
.sc-rose::after   {background:linear-gradient(180deg,#e11d48,#fb7185)}

/* hover glow */
.sc-blue:hover  {box-shadow:0 8px 32px rgba(37,99,235,.18),0 2px 8px rgba(37,99,235,.08);border-color:#bfdbfe}
.sc-green:hover {box-shadow:0 8px 32px rgba(5,150,105,.18),0 2px 8px rgba(5,150,105,.08);border-color:#86efac}
.sc-amber:hover {box-shadow:0 8px 32px rgba(217,119,6,.18),0 2px 8px rgba(217,119,6,.08);border-color:#fcd34d}
.sc-red:hover   {box-shadow:0 8px 32px rgba(220,38,38,.18),0 2px 8px rgba(220,38,38,.08);border-color:#fca5a5}
.sc-purple:hover{box-shadow:0 8px 32px rgba(124,58,237,.18),0 2px 8px rgba(124,58,237,.08);border-color:#c4b5fd}
.sc-cyan:hover  {box-shadow:0 8px 32px rgba(8,145,178,.18),0 2px 8px rgba(8,145,178,.08);border-color:#67e8f9}
.sc-rose:hover  {box-shadow:0 8px 32px rgba(225,29,72,.18),0 2px 8px rgba(225,29,72,.08);border-color:#fda4af}

/* Card layout: top row has icon + label, then big value */
.sc-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
.sc-icon{width:52px;height:52px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.sc-blue   .sc-icon{background:linear-gradient(135deg,#dbeafe,#bfdbfe);color:#1d4ed8;box-shadow:0 4px 10px rgba(37,99,235,.2)}
.sc-green  .sc-icon{background:linear-gradient(135deg,#d1fae5,#a7f3d0);color:#047857;box-shadow:0 4px 10px rgba(5,150,105,.2)}
.sc-amber  .sc-icon{background:linear-gradient(135deg,#fef3c7,#fde68a);color:#b45309;box-shadow:0 4px 10px rgba(217,119,6,.2)}
.sc-red    .sc-icon{background:linear-gradient(135deg,#fee2e2,#fecaca);color:#b91c1c;box-shadow:0 4px 10px rgba(220,38,38,.2)}
.sc-purple .sc-icon{background:linear-gradient(135deg,#ede9fe,#ddd6fe);color:#6d28d9;box-shadow:0 4px 10px rgba(124,58,237,.2)}
.sc-cyan   .sc-icon{background:linear-gradient(135deg,#cffafe,#a5f3fc);color:#0e7490;box-shadow:0 4px 10px rgba(8,145,178,.2)}
.sc-rose   .sc-icon{background:linear-gradient(135deg,#ffe4e6,#fecdd3);color:#be123c;box-shadow:0 4px 10px rgba(225,29,72,.2)}

.sc-lbl{font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.7px;color:#0f172a;margin-bottom:0;flex:1;padding-left:12px;line-height:1.3;display:flex;align-items:center}
.sc-val{font-size:38px;font-weight:900;line-height:1;letter-spacing:-1.5px;animation:count-tick .4s ease both}
.sc-blue   .sc-val{color:#1d4ed8}
.sc-green  .sc-val{color:#047857}
.sc-amber  .sc-val{color:#b45309}
.sc-red    .sc-val{color:#b91c1c}
.sc-purple .sc-val{color:#6d28d9}
.sc-cyan   .sc-val{color:#0e7490}
.sc-rose   .sc-val{color:#be123c}
.sc-sub{font-size:13px;color:#1e293b;font-weight:700;margin-top:8px;padding-left:1px;display:flex;align-items:center;gap:5px}
.sc-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:100px;font-size:11px;font-weight:600}
.sc-badge.up{background:var(--g-lt);color:var(--g)}
.sc-badge.dn{background:var(--r-lt);color:var(--r)}

/* ── CHART CARD ─────────────────────────────── */
.cc{background:#fff;border:2px solid #1e293b;border-radius:14px;box-shadow:0 4px 16px rgba(0,0,0,.08);overflow:hidden;animation:fadeUp .45s cubic-bezier(.22,.68,0,1.2) both;transition:box-shadow .2s,transform .2s}
.cc:hover{box-shadow:0 8px 28px rgba(0,0,0,.14);transform:translateY(-2px)}
.cc-hdr{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:2px solid #1e293b;font-size:13.5px;font-weight:800;color:#0f172a;background:linear-gradient(to right,#f1f5f9,#f8fafc)}
.cc-hdr .sub{font-size:12px;font-weight:400;color:var(--muted);margin-left:6px}
.cc-body{padding:20px}
.ch-wrap{position:relative}

/* ── FILTER BAR ─────────────────────────────── */
.f-bar{
  background:#fff;border:2px solid #e2e8f0;border-radius:14px;
  padding:18px 22px;margin-bottom:20px;
  box-shadow:0 2px 12px rgba(0,0,0,.06);
  display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px
}
.f-grp{display:flex;flex-direction:column;gap:6px}
.f-lbl{
  font-size:11.5px;font-weight:800;text-transform:uppercase;
  letter-spacing:.7px;color:#0f172a;display:flex;align-items:center;gap:5px
}
.f-in,.f-sel{
  padding:10px 14px;border:2px solid #cbd5e1;border-radius:9px;
  font-size:13.5px;font-weight:700;color:#0f172a;
  background:#fff;outline:none;transition:all .15s;font-family:inherit
}
.f-in::placeholder{color:#94a3b8;font-weight:400}
.f-in:focus,.f-sel:focus{
  border-color:#2563eb;background:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);color:#0f172a
}
.f-in:hover,.f-sel:hover{border-color:#94a3b8}
.f-sel{
  padding-right:36px;appearance:none;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230f172a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center
}
.f-sel option{color:#0f172a;font-weight:600}

/* ── BUTTONS ─────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none;transition:all .15s;text-decoration:none;font-family:inherit;white-space:nowrap}
.btn-p{background:var(--p);color:#fff;box-shadow:0 2px 8px rgba(37,99,235,.25)}
.btn-p:hover{background:var(--p-dk);color:#fff;box-shadow:0 4px 14px rgba(37,99,235,.35);transform:translateY(-1px)}
.btn-g{background:var(--g);color:#fff}
.btn-g:hover{background:var(--g-dk);color:#fff;transform:translateY(-1px)}
.btn-ghost{background:transparent;color:var(--muted);border:1.5px solid var(--bdr)}
.btn-ghost:hover{background:#f1f5f9;color:var(--text);border-color:#cbd5e1}

/* ── VIEW TOGGLE ─────────────────────────────── */
.vtabs{display:flex;gap:0;background:#f1f5f9;padding:4px;border-radius:11px;border:1.5px solid #e2e8f0}
.vtab{
  padding:8px 18px;border-radius:8px;font-size:13px;font-weight:700;
  text-decoration:none;color:#475569;transition:all .18s;
  display:flex;align-items:center;gap:7px;white-space:nowrap
}
.vtab i{font-size:13px}
.vtab:hover{color:#1d4ed8;background:#eff6ff}
.vtab.on{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;font-weight:800;
  box-shadow:0 3px 12px rgba(37,99,235,.35);
}
.vtab.on i{color:#fff}

/* ── DATA TABLE — Excel Style ───────────────── */
.tbl-wrap{overflow-x:auto;border-radius:0 0 12px 12px;border:2px solid #475569}
table.dt{width:100%;border-collapse:collapse;border-spacing:0;font-size:13px}

/* Header — dark navy */
table.dt thead tr{background:linear-gradient(135deg,#0f172a,#1e3a5f)}
table.dt thead th{
  padding:13px 14px;text-align:left;font-size:11px;font-weight:800;
  text-transform:uppercase;letter-spacing:.7px;color:#e2e8f0;
  border-right:1.5px solid rgba(255,255,255,.12);border-bottom:none;
  white-space:nowrap;position:sticky;top:0;z-index:2;
  background:transparent;
  text-shadow:0 1px 2px rgba(0,0,0,.3)
}
table.dt thead th:first-child{border-radius:0}
table.dt thead th:last-child{border-right:none}
table.dt thead th.tr{text-align:right}
table.dt thead th.tc{text-align:center}
/* sorting arrows — same white on dark bg regardless of sort state */
table.dt thead th.sorting_asc{color:#e2e8f0 !important}
table.dt thead th.sorting_desc{color:#e2e8f0 !important}
table.dt thead th.sorting::after,
table.dt thead th.sorting_asc::after,
table.dt thead th.sorting_desc::after{opacity:.7}

/* Body rows */
table.dt tbody tr{border-bottom:2px solid #1e293b;transition:background .1s}
table.dt tbody tr:nth-child(even) td{background:#f8fafc}
table.dt tbody tr:nth-child(odd)  td{background:#ffffff}
table.dt tbody tr:hover td{background:#eff6ff !important;transition:background .05s}
table.dt tbody td{
  padding:9px 13px;font-size:13px;vertical-align:middle;
  border-right:2px solid #1e293b;
  border-bottom:2px solid #1e293b;
  color:#0f172a;font-weight:600;
}
table.dt tbody td:last-child{border-right:2px solid #1e293b}
table.dt tbody tr:last-child td{border-bottom:2px solid #1e293b}

/* Row number col */
table.dt tbody td:first-child{color:#475569;font-size:11.5px;font-weight:700;background:#f1f5f9 !important;border-right:2px solid #1e293b;min-width:36px;text-align:center}
table.dt thead th:first-child{background:transparent;border-right:2px solid rgba(255,255,255,.15)}

.tr{text-align:right}
.tc{text-align:center}
.tn{font-variant-numeric:tabular-nums;font-weight:800;font-size:13.5px;letter-spacing:-.3px}
table.dt td.tn{font-size:13.5px}
.iname{font-weight:700;color:var(--navy);font-size:13px;max-width:260px}

/* Chips / badges */
.chip{display:inline-flex;align-items:center;padding:2px 9px;border-radius:5px;font-size:11.5px;font-weight:700;letter-spacing:.2px}
.chip-b{background:#dbeafe;color:#1d4ed8}
.chip-g{background:#d1fae5;color:#065f46}
.chip-a{background:#fef3c7;color:#92400e}
.chip-r{background:#fee2e2;color:#991b1b}
.chip-v{background:#ede9fe;color:#5b21b6}
.chip-c{background:#cffafe;color:#155e75}
.chip-x{background:#f1f5f9;color:#475569}

/* Code cells */
.code-c{font-family:'JetBrains Mono','Fira Code','Consolas',monospace;font-size:11.5px;background:#f1f5f9;padding:3px 8px;border-radius:5px;color:#1e40af;font-weight:700;border:1px solid #e0e7ff;letter-spacing:.3px}

/* ── COLUMN FILTER ROW ──────────────────────── */
tr.col-filter-row{background:#e8f0fe !important}
tr.col-filter-row td{
  padding:6px 8px !important;border-right:1px solid #c7d8f8 !important;
  border-bottom:3px solid #2563eb !important;background:#e8f0fe !important
}
tr.col-filter-row td:first-child{background:#dbeafe !important;border-right:2px solid #bfdbfe !important}

.col-filter-sel{
  width:100%;padding:5px 28px 5px 9px;font-size:11.5px;font-weight:600;
  border:1.5px solid #93c5fd;border-radius:6px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%232563eb' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  color:#1e40af;appearance:none;cursor:pointer;outline:none;
  transition:all .15s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.col-filter-sel:hover{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.1)}
.col-filter-sel:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15);color:#1e3a8a}
.col-filter-sel.active-filter{
  border-color:#2563eb;background-color:#eff6ff;color:#1d4ed8;font-weight:700
}
.col-filter-sel option{background:#fff;color:#0f172a}

/* numeric accent colors — stronger in Excel mode */
table.dt .num-blue  {color:#1d4ed8;font-weight:800}
table.dt .num-green {color:#065f46;font-weight:800}
table.dt .num-amber {color:#92400e;font-weight:800}
table.dt .num-red   {color:#991b1b;font-weight:800}

/* ── PROGRESS BAR ───────────────────────────── */
.pbar-wrap{min-width:90px}
.pbar{height:7px;border-radius:4px;background:#e2e8f0;overflow:hidden}
.pbar-fill{height:100%;border-radius:4px;transition:width .8s cubic-bezier(.22,.68,0,1.2)}
.pbar-lbl{font-size:11.5px;font-weight:700;margin-top:3px}

/* ── ITEM CARDS (animated) ──────────────────── */
.ic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.ic{background:#fff;border:2px solid #e2e8f0;border-radius:16px;overflow:hidden;box-shadow:0 3px 14px rgba(0,0,0,.07);transition:all .22s;animation:fadeUp .45s cubic-bezier(.22,.68,0,1.2) both}
.ic:hover{transform:translateY(-5px);box-shadow:0 14px 36px rgba(0,0,0,.13);border-color:#bfdbfe}

/* Status header band */
.ic-top{padding:14px 16px;display:flex;justify-content:space-between;gap:8px;background:linear-gradient(135deg,#1d4ed8,#2563eb)}
.ic-top.fg{background:linear-gradient(135deg,#047857,#059669)}
.ic-top.pnd{background:linear-gradient(135deg,#b45309,#d97706)}
.ic-top.dis{background:linear-gradient(135deg,#0e7490,#0891b2)}

.ic-code{font-family:monospace;font-size:11px;color:rgba(255,255,255,.75);margin-bottom:5px;font-weight:700;letter-spacing:.5px}
.ic-name{font-size:13px;font-weight:800;color:#fff;line-height:1.35}
.ic-tags{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex-shrink:0}

/* Stats grid */
.ic-body{display:grid;grid-template-columns:1fr 1fr;background:#fff}
.ic-s{padding:13px 16px;border-top:1.5px solid #e2e8f0}
.ic-s:nth-child(even){border-left:1.5px solid #e2e8f0}
.ic-sl{font-size:10px;text-transform:uppercase;letter-spacing:.6px;font-weight:800;color:#374151;margin-bottom:4px}
.ic-sv{font-size:18px;font-weight:900;letter-spacing:-.5px;line-height:1}
.ic-ss{font-size:11.5px;color:#1e293b;margin-top:3px;font-weight:700}

/* Footer progress */
.ic-foot{padding:12px 16px;background:#f8fafc;border-top:2px solid #e2e8f0}
.ic-foot-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.ic-foot-lbl{font-size:11px;font-weight:700;color:#374151;text-transform:uppercase;letter-spacing:.4px}
.ic-foot-pct{font-size:13px;font-weight:900}
.ic-spark{height:40px;margin-bottom:8px}

/* ── STATUS BADGES ───────────────────────────── */
.status-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:100px;font-size:12px;font-weight:700;letter-spacing:.3px}
.sb-green {background:var(--g-lt);color:var(--g);border:1px solid #6ee7b740}
.sb-amber {background:var(--a-lt);color:var(--a);border:1px solid #fde68a}
.sb-blue  {background:var(--p-lt);color:var(--p);border:1px solid #93c5fd40}
.sb-cyan  {background:var(--c-lt);color:var(--c);border:1px solid #67e8f940}
.sb-red   {background:var(--r-lt);color:var(--r);border:1px solid #fca5a540}
.sb-gray  {background:#f1f5f9;color:var(--muted);border:1px solid #e2e8f0}
.sb-pulse{animation:pulse-ring 1.8s infinite}

/* ── PRODUCT STATUS BOARD ───────────────────── */
.status-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.status-col{background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:16px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.sc-col-hdr{
  padding:16px 18px;font-size:13.5px;font-weight:800;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:2px solid #e2e8f0
}
.sc-col-body{padding:12px;display:flex;flex-direction:column;gap:10px;max-height:620px;overflow-y:auto}
.status-item{
  background:#fff;border:1.5px solid #e2e8f0;border-radius:12px;
  padding:14px 16px;transition:all .15s;cursor:default;
  animation:fadeUp .3s ease both;box-shadow:0 1px 4px rgba(0,0,0,.04)
}
.status-item:hover{border-color:#93c5fd;box-shadow:0 4px 16px rgba(37,99,235,.1);transform:translateY(-2px)}
.si-code{
  font-family:'JetBrains Mono','Consolas',monospace;font-size:11px;
  font-weight:700;color:#1e40af;background:#eff6ff;
  display:inline-block;padding:2px 8px;border-radius:5px;
  border:1px solid #bfdbfe;margin-bottom:6px;letter-spacing:.3px
}
.si-name{font-size:13.5px;font-weight:800;color:#0f172a;margin:0 0 8px;line-height:1.3}
.si-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.si-lbl{font-size:12px;font-weight:700;color:#374151}
.si-val{font-size:13px;font-weight:800;color:#0f172a}
.si-date{font-size:11.5px;font-weight:600;color:#374151;background:#f1f5f9;padding:2px 8px;border-radius:5px}
.si-pbar{height:10px;border-radius:6px;background:#e2e8f0;margin-top:10px;overflow:hidden;box-shadow:inset 0 1px 3px rgba(0,0,0,.08)}
.si-pbar-fill{height:100%;border-radius:6px;box-shadow:0 2px 4px rgba(0,0,0,.15)}
.si-pbar-lbl{display:flex;justify-content:space-between;margin-top:5px}
.si-pbar-txt{font-size:11.5px;font-weight:700;color:#374151}
.si-pbar-pct{font-size:13px;font-weight:900;letter-spacing:-.3px}

/* ── MONTHLY TIMELINE ───────────────────────── */
.timeline-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #f1f5f9}
.timeline-row:last-child{border-bottom:none}
.tl-date{font-size:11.5px;font-weight:600;color:var(--muted);width:80px;flex-shrink:0}
.tl-bar{flex:1;height:22px;border-radius:5px;display:flex;align-items:center;justify-content:flex-end;padding:0 8px;min-width:4px;transition:width .8s cubic-bezier(.22,.68,0,1.2)}
.tl-lbl{font-size:11px;font-weight:700;color:#fff;white-space:nowrap}
.tl-wt{font-size:11.5px;font-weight:600;width:90px;text-align:right;color:var(--navy);flex-shrink:0}

/* ── HERO (analysis page) ───────────────────── */
.a-hero{background:linear-gradient(135deg,#0f172a,#1e3a5f);border-radius:16px;padding:28px 32px;color:#fff;margin-bottom:20px;animation:fadeUp .4s ease both}
.h-code{font-family:monospace;font-size:12px;color:rgba(255,255,255,.35);background:rgba(255,255,255,.06);padding:3px 10px;border-radius:5px;display:inline-block;margin-bottom:10px}
.h-name{font-size:24px;font-weight:800;margin-bottom:12px}
.h-tags{display:flex;gap:9px;flex-wrap:wrap}
.h-tag{padding:5px 14px;border-radius:100px;font-size:12px;font-weight:600}
.ht-b{background:rgba(37,99,235,.2);color:#93c5fd;border:1px solid rgba(37,99,235,.25)}
.ht-g{background:rgba(5,150,105,.2);color:#6ee7b7;border:1px solid rgba(5,150,105,.25)}
.ht-x{background:rgba(255,255,255,.06);color:rgba(255,255,255,.4);border:1px solid rgba(255,255,255,.08)}

/* ── FLOW CARDS ─────────────────────────────── */
.flow-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:20px}
.fc{border-radius:12px;padding:18px 16px;border:1px solid;text-align:center;transition:transform .2s;animation:fadeUp .4s ease both}
.fc:hover{transform:translateY(-3px)}
.fc-0{background:linear-gradient(135deg,#eff6ff,#dbeafe);border-color:#bfdbfe}
.fc-1{background:linear-gradient(135deg,#fffbeb,#fef3c7);border-color:#fde68a}
.fc-2{background:linear-gradient(135deg,#f0fdf4,#dcfce7);border-color:#bbf7d0}
.fc-3{background:linear-gradient(135deg,#f5f3ff,#ede9fe);border-color:#ddd6fe}
.fc-4{background:linear-gradient(135deg,#fff1f2,#ffe4e6);border-color:#fecdd3}
.fc-icon{font-size:22px;margin-bottom:8px}
.fc-0 .fc-icon{color:var(--p)}.fc-1 .fc-icon{color:var(--a)}.fc-2 .fc-icon{color:var(--g)}.fc-3 .fc-icon{color:var(--v)}.fc-4 .fc-icon{color:var(--r)}
.fc-lbl{font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;font-weight:600;color:var(--muted);margin-bottom:5px}
.fc-val{font-size:18px;font-weight:900;color:var(--navy)}
.fc-sub{font-size:11px;color:var(--muted);margin-top:3px}

/* ── PIPELINE ───────────────────────────────── */
.pipeline{background:var(--sur);border:1px solid var(--bdr);border-radius:12px;padding:20px 24px;margin-bottom:20px}
.pipe-title{font-size:13px;font-weight:700;color:var(--navy);margin-bottom:14px;display:flex;align-items:center;gap:8px}
.pipe-track{display:flex;height:34px;border-radius:9px;overflow:hidden;gap:2px}
.pt{display:flex;align-items:center;justify-content:center;min-width:0;transition:all .6s ease}
.pt span{font-size:11.5px;font-weight:700;color:#fff;white-space:nowrap;padding:0 10px;overflow:hidden;text-overflow:ellipsis}
.pt-d{background:linear-gradient(90deg,var(--g),var(--g-dk))}
.pt-p{background:linear-gradient(90deg,var(--a),var(--a-dk))}
.pt-r{background:#e2e8f0}
.pt-r span{color:var(--muted)}
.pipe-leg{display:flex;gap:18px;margin-top:12px;flex-wrap:wrap}
.pl-i{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}
.pl-dot{width:10px;height:10px;border-radius:3px;flex-shrink:0}

/* ── EMPTY STATE ─────────────────────────────── */
.empty-box{padding:80px 20px;text-align:center;background:var(--sur);border:2px dashed var(--bdr);border-radius:14px;display:flex;flex-direction:column;align-items:center}
.empty-box i{font-size:42px;color:#cbd5e1;margin-bottom:16px}
.empty-box h5{font-size:16px;font-weight:700;color:var(--muted);margin-bottom:6px}
.empty-box p{font-size:13px;color:#94a3b8;margin:0}

/* ── QUICK LINKS ─────────────────────────────── */
.q-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:24px}
.q-card{background:var(--sur);border:1px solid var(--bdr);border-radius:12px;padding:22px 18px;text-align:center;text-decoration:none;color:var(--text);display:flex;flex-direction:column;align-items:center;gap:10px;transition:all .2s;box-shadow:var(--sh1);animation:fadeUp .5s ease both}
.q-card:hover{transform:translateY(-4px);box-shadow:var(--sh3);border-color:var(--p);color:var(--text)}
.q-icon{width:50px;height:50px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:21px;transition:transform .2s}
.q-card:hover .q-icon{transform:scale(1.1)}
.q-card h6{font-size:13.5px;font-weight:700;margin:0;color:var(--navy)}
.q-card small{font-size:12px;color:var(--muted)}

/* ── DATATABLES CHROME ───────────────────────── */
.dataTables_wrapper{padding:0}
.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_length{
  padding:14px 18px;display:flex;align-items:center;gap:8px;
  background:#ffffff;border-bottom:1px solid #e2e8f0;font-size:13px;font-weight:500;color:#475569
}
.dataTables_wrapper .dataTables_filter{justify-content:flex-end}
.dataTables_wrapper .dataTables_filter input{
  border:1.5px solid #cbd5e1;border-radius:8px;padding:7px 12px 7px 36px;font-size:13px;
  outline:none;margin-left:4px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.868-3.834zm-5.242 1.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 10px center;
  width:220px;transition:all .15s
}
.dataTables_wrapper .dataTables_filter input:focus{border-color:var(--p);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.dataTables_wrapper .dataTables_length select{
  border:1.5px solid #cbd5e1;border-radius:7px;padding:5px 28px 5px 10px;font-size:13px;
  appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  cursor:pointer;outline:none
}

/* Footer row */
.dataTables_info,.dataTables_paginate{
  padding:12px 18px !important;font-size:12.5px;
  background:#fafbfc;border-top:1px solid var(--bdr)
}
.dataTables_info{color:var(--muted)}
.dataTables_paginate .paginate_button{
  border-radius:6px !important;padding:5px 12px !important;font-size:12.5px !important;font-weight:600 !important;
  margin:0 2px !important;transition:all .12s !important
}
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover{
  background:var(--p) !important;border-color:var(--p) !important;color:#fff !important;
  box-shadow:0 2px 8px rgba(37,99,235,.3) !important
}
.dataTables_paginate .paginate_button:not(.current):hover{
  background:#f1f5f9 !important;border-color:var(--bdr) !important;color:var(--text) !important
}
.dataTables_paginate .paginate_button.disabled{opacity:.4 !important}

/* Sorting arrows */
table.dt thead th.sorting::after,
table.dt thead th.sorting_asc::after,
table.dt thead th.sorting_desc::after{
  opacity:.6;font-size:10px
}
table.dt thead th.sorting_asc{color:#e2e8f0 !important}
table.dt thead th.sorting_desc{color:#e2e8f0 !important}

/* Scrollbar */
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:#f1f5f9}
::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:#94a3b8}

@media(max-width:1280px){.s4,.q-grid{grid-template-columns:repeat(2,1fr)}.status-cols,.flow-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:768px){.s4,.s3,.status-cols,.flow-grid,.q-grid{grid-template-columns:1fr 1fr}.s2{grid-template-columns:1fr}}
