:root{
  --ink:#0f172a;
  --graphite:#0f172a;
  --graphite-2:#1e293b;
  --paper:#f1f5f9;
  --paper-2:#e2e8f0;
  --line:#cbd5e1;
  --amber:#f59e0b;
  --amber-bright:#fbbf24;
  --amber-dim:#b45309;
  --teal:#0d9488;
  --teal-bright:#14b8a6;
  --teal-dim:#ccfbf1;
  --rust:#e11d48;
  --rust-dim:#ffe4e6;
  --indigo:#6366f1;
  --violet:#8b5cf6;
  --sky:#0ea5e9;
  --emerald:#10b981;
  --text:#0f172a;
  --text-dim:#64748b;
  --card:#ffffff;
  --shadow:0 4px 24px rgba(15,23,42,.08);
  --shadow-lg:0 12px 40px rgba(15,23,42,.12);
  --radius:14px;
  --radius-sm:10px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #ec4899 100%);
  --grad-amber: linear-gradient(135deg, #f59e0b, #f97316);
  --grad-teal: linear-gradient(135deg, #0d9488, #06b6d4);
  --grad-sky: linear-gradient(135deg, #0ea5e9, #6366f1);
  --grad-sidebar: linear-gradient(180deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
}
*{box-sizing:border-box;}
html,body{margin:0;height:100%;}
body{
  font-family:var(--sans);background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,.12), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(236,72,153,.08), transparent 45%),
    radial-gradient(800px 400px at 50% 100%, rgba(14,165,233,.08), transparent 40%),
    var(--paper);
  color:var(--text);overflow:hidden;height:100vh;
}
.app{display:flex;height:100vh;max-height:100vh;overflow:hidden;}

/* ---------- Sidebar ---------- */
.sidebar{
  width:248px;flex-shrink:0;
  background:var(--grad-sidebar);
  color:#e2e8f0;
  display:flex;flex-direction:column;padding:16px 12px;
  border-right:none;
  box-shadow:8px 0 32px rgba(15,23,42,.25);
  height:100vh;max-height:100vh;overflow:hidden;
  position:relative;
}
.sidebar::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 20% 0%, rgba(139,92,246,.35), transparent 45%);
}
.brand{display:flex;align-items:center;gap:12px;padding:6px 8px 20px;position:relative;z-index:1;}
.brand-mark{
  width:40px;height:40px;
  background:var(--grad-brand);
  color:#fff;
  border-radius:12px;display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:18px;
  box-shadow:0 8px 20px rgba(99,102,241,.45);
  transform:none;
}
.brand-name{font-weight:800;font-size:16px;letter-spacing:-.02em;background:linear-gradient(90deg,#fff,#c4b5fd);-webkit-background-clip:text;background-clip:text;color:transparent;}
.brand-sub{font-size:10px;color:#a5b4fc;letter-spacing:1.2px;text-transform:uppercase;font-weight:600;}

#nav{display:flex;flex-direction:column;gap:3px;flex:1;margin-top:4px;overflow-y:auto;min-height:0;position:relative;z-index:1;}
#nav::-webkit-scrollbar{width:4px;}
#nav::-webkit-scrollbar-thumb{background:rgba(165,180,252,.35);border-radius:4px;}

.nav-group-title{
  font-size:10px;text-transform:uppercase;letter-spacing:1.2px;
  color:#818cf8;padding:14px 12px 6px;font-weight:700;opacity:.95;
}
.nav-item{
  display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:11px;
  color:#c7d2fe;font-size:13px;cursor:pointer;border:1px solid transparent;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease, transform .15s ease;
  position:relative;margin:3px 0;isolation:isolate;
}
.nav-item:hover{background:rgba(255,255,255,.08);color:#fff;}
.nav-icon{width:18px;text-align:center;font-size:14px;flex-shrink:0;}

.reconcile-btn{
  margin:10px 0 8px;width:100%;
  background:linear-gradient(135deg, rgba(16,185,129,.2), rgba(14,165,233,.2));
  border:1px solid rgba(45,212,191,.35);
  color:#a7f3d0;border-radius:10px;padding:11px;font-size:12px;cursor:pointer;
  font-weight:600;position:relative;z-index:1;
}
.reconcile-btn:hover{background:var(--grad-teal);color:#fff;border-color:transparent;}

.user-bar{
  margin-top:auto;padding-top:14px;border-top:1px solid rgba(165,180,252,.2);
  display:flex;flex-direction:column;gap:8px;position:relative;z-index:1;
}
.user-name{font-size:12px;color:#a5b4fc;padding:0 6px;font-weight:500;}

.sidebar-action-btn{
  width:100%;text-align:center;
  background:rgba(255,255,255,.08);color:#f1f5f9;
  border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:10px 12px;
  font-size:13px;font-weight:600;cursor:pointer;transition:all .15s;
}
.sidebar-action-btn:hover{background:rgba(255,255,255,.16);}

/* ---------- Main ---------- */
.main{
  flex:1;display:flex;flex-direction:column;min-width:0;
  height:100vh;overflow:hidden;background:transparent;
}
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 18px;background:rgba(255,255,255,.75);
  backdrop-filter:blur(12px);border-bottom:1px solid rgba(203,213,225,.7);
  flex-shrink:0;box-shadow:0 1px 0 rgba(255,255,255,.8);
  min-height:52px;
}
.topbar-right{
  display:flex!important;flex-direction:row!important;align-items:center!important;
  gap:8px!important;margin-left:auto;flex-shrink:0;
}
#pageTitle{flex:1;text-align:center;min-width:0;}
.page-title{
  font-size:22px;font-weight:800;letter-spacing:-.03em;
  background:linear-gradient(90deg,#0f172a 0%, #4f46e5 60%, #db2777 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.content{
  flex:1;overflow:auto;padding:20px 24px 32px;
  scroll-behavior:smooth;
}
.content::-webkit-scrollbar{width:8px;height:8px;}
.content::-webkit-scrollbar-thumb{background:#c4b5fd;border-radius:8px;}
.content::-webkit-scrollbar-track{background:transparent;}

/* ---------- Panels / cards ---------- */
.panel{
  background:var(--card);
  border:1px solid rgba(226,232,240,.9);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  margin-bottom:18px;
  overflow:hidden;
  position:relative;
}
.panel::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:var(--grad-brand);border-radius:4px 0 0 4px;
}
.panel-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 18px;background:linear-gradient(90deg, #eef2ff 0%, #fdf4ff 50%, #fff 100%);
  border-bottom:1px solid #e2e8f0;flex-wrap:wrap;
}
.panel-title{
  font-weight:800;font-size:14px;letter-spacing:.02em;
  color:#312e81;text-transform:uppercase;
}
.panel-body{padding:0;}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:8px 14px;border-radius:10px;font-size:13px;font-weight:600;
  cursor:pointer;border:1px solid transparent;transition:all .15s ease;
  font-family:inherit;line-height:1.3;
}
.btn.amber,.btn.primary{
  background:var(--grad-amber);color:#fff;
  box-shadow:0 4px 14px rgba(245,158,11,.35);
}
.btn.amber:hover,.btn.primary:hover{filter:brightness(1.05);transform:translateY(-1px);}
.btn.ghost{
  background:#fff;border:1px solid var(--line);color:var(--text);
}
.btn.ghost:hover{border-color:var(--indigo);color:var(--indigo);background:#eef2ff;}
.btn.small{padding:5px 10px;font-size:12px;border-radius:8px;}
.btn.danger,.btn[style*="rust"]{
  background:linear-gradient(135deg,#e11d48,#f43f5e)!important;
  color:#fff!important;border:none!important;
}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none!important;}

/* ---------- Forms ---------- */
.field{
  display:flex;flex-direction:column;gap:6px;margin-bottom:0;
  min-width:0; /* prevent grid blowout */
}
.field label{
  font-size:12px;font-weight:600;color:#475569;line-height:1.3;
}
.field input,.field select,.field textarea,
input.input,select.input,textarea.input,
.form-grid input,.form-grid select,.form-grid textarea,
.modal input,.modal select,.modal textarea{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:10px 12px;
  border:1.5px solid #e2e8f0;
  border-radius:10px;
  font-size:13.5px;
  font-family:inherit;
  background:#fff;
  color:var(--text);
  transition:border-color .15s, box-shadow .15s;
  min-width:0;
}
.field select,.form-grid select,.modal select{
  appearance:auto;
  cursor:pointer;
}
.field textarea,.form-grid textarea,.modal textarea{
  min-height:72px;resize:vertical;
}
.field input:focus,.field select:focus,.field textarea:focus,
input.input:focus,select.input:focus,
.form-grid input:focus,.form-grid select:focus,
.modal input:focus,.modal select:focus,.modal textarea:focus{
  outline:none;border-color:#818cf8;
  box-shadow:0 0 0 3px rgba(99,102,241,.2);
}
.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px 16px;
  width:100%;
  box-sizing:border-box;
}
.form-grid .site-form-full,
.field.site-form-full,
.form-grid .full,
.field.full{grid-column:1 / -1;}
.form-actions{
  display:flex;gap:10px;margin-top:20px;flex-wrap:wrap;
  align-items:center;
  padding-top:4px;
}

.site-form-help{
  background:linear-gradient(135deg, #eef2ff, #faf5ff);
  border:1px solid #c7d2fe;border-radius:12px;padding:12px 16px;
  font-size:13px;color:#4338ca;margin-bottom:16px;line-height:1.5;
}

/* ---------- Tables ---------- */
table.data, table{
  width:100%;border-collapse:separate;border-spacing:0;font-size:13px;
}
table.data thead th, table thead th{
  background:linear-gradient(180deg, #f8fafc, #eef2ff);
  color:#3730a3;font-weight:700;font-size:11px;text-transform:uppercase;
  letter-spacing:.04em;padding:12px 14px;text-align:left;
  border-bottom:2px solid #c7d2fe;white-space:nowrap;
}
table.data tbody td, table tbody td{
  padding:11px 14px;border-bottom:1px solid #f1f5f9;
  vertical-align:middle;
}
table.data tbody tr:hover, table tbody tr:hover{
  background:linear-gradient(90deg, #eef2ff 0%, #fdf4ff 100%);
}
table.data tbody tr:nth-child(even), table tbody tr:nth-child(even){
  background:rgba(248,250,252,.7);
}
table.data tbody tr:nth-child(even):hover, table tbody tr:nth-child(even):hover{
  background:linear-gradient(90deg, #eef2ff 0%, #fdf4ff 100%);
}
td.r, th.r, .num{text-align:right;font-variant-numeric:tabular-nums;}

/* ---------- KPI / dashboard ---------- */
.kpi-row, .dash-kpis{
  display:flex;flex-wrap:wrap;gap:14px;margin-bottom:18px;
}
.kpi, .kpi-card{
  flex:1 1 150px;min-width:150px;max-width:100%;
  background:var(--card);
  border-radius:var(--radius);
  padding:14px 16px;
  border:1px solid #e2e8f0;
  box-shadow:var(--shadow);
  position:relative;overflow:hidden;
}
.kpi::after, .kpi-card::after{
  content:"";position:absolute;right:-20px;top:-20px;width:80px;height:80px;
  border-radius:50%;opacity:.15;
  background:var(--grad-brand);
}
.kpi:nth-child(1)::after{background:var(--grad-sky);}
.kpi:nth-child(2)::after{background:var(--grad-teal);}
.kpi:nth-child(3)::after{background:var(--grad-amber);}
.kpi:nth-child(4)::after{background:linear-gradient(135deg,#ec4899,#8b5cf6);}
.kpi:nth-child(5)::after{background:linear-gradient(135deg,#10b981,#0ea5e9);}
.kpi .label, .kpi-label{font-size:10px;font-weight:700;color:var(--text-dim);text-transform:uppercase;letter-spacing:.04em;line-height:1.2;}
.kpi .value, .kpi-value{
  font-size:clamp(11px, 1.1vw, 16px);font-weight:800;margin-top:6px;letter-spacing:-.03em;color:#1e1b4b;
  line-height:1.3;white-space:normal;overflow:visible;text-overflow:unset;
  font-variant-numeric:tabular-nums;word-break:break-word;
}
.kpi-click{min-width:0;overflow:hidden;}
.kpi-link{font-size:10px;font-weight:700;color:#6366f1;margin-top:6px;}

.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px;}
.chart-row{display:flex;flex-direction:column;gap:10px;padding:16px 18px;}
.chart-bar-row{display:grid;grid-template-columns:120px 1fr 80px;gap:10px;align-items:center;font-size:12px;}
.chart-bar-track{height:12px;background:#e0e7ff;border-radius:8px;overflow:hidden;}
.chart-bar-fill{
  height:100%;border-radius:8px;
  background:var(--grad-brand);
}

/* ---------- Status stamps ---------- */
.stamp{
  display:inline-block;padding:4px 10px;border-radius:999px;font-size:11px;
  font-weight:700;border:none;
}
.stamp.running,.stamp.open,.stamp.pending{
  color:#b45309;background:linear-gradient(135deg,#fef3c7,#fde68a);
}
.stamp.completed,.stamp.won,.stamp.paid{
  color:#047857;background:linear-gradient(135deg,#d1fae5,#a7f3d0);
}
.stamp.lost,.stamp.dropped,.stamp.cancelled{
  color:#be123c;background:linear-gradient(135deg,#ffe4e6,#fecdd3);
}
.stamp.submitted,.stamp.working{
  color:#1d4ed8;background:linear-gradient(135deg,#dbeafe,#bfdbfe);
}

.bar-track{display:inline-block;width:70px;height:8px;background:#e0e7ff;border-radius:6px;margin-right:6px;vertical-align:middle;overflow:hidden;}
.bar-fill{display:block;height:100%;background:var(--grad-amber);border-radius:6px;}

.empty{
  padding:36px;text-align:center;color:var(--text-dim);font-size:14px;
  background:linear-gradient(180deg, #f8fafc, #eef2ff);border-radius:12px;margin:12px;
}

/* ---------- Filters / period ---------- */
.period-bar, .filter-bar, .adv-filter{
  background:rgba(255,255,255,.9);
  border:1px solid #e2e8f0;border-radius:12px;
  padding:12px 16px;margin-bottom:14px;
  box-shadow:var(--shadow);
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;
}

/* ---------- Modal (clean, no horizontal mess) ---------- */
.modal-overlay{
  position:fixed;inset:0;background:rgba(15,23,42,.55);
  backdrop-filter:blur(6px);
  display:flex;align-items:center;justify-content:center;
  z-index:200;padding:16px;
  box-sizing:border-box;
  overflow:auto;
}
.modal{
  background:#fff;
  border-radius:18px;
  padding:22px 24px 20px;
  width:min(640px, 100%);
  max-width:100%;
  max-height:min(90vh, 920px);
  overflow-x:hidden;
  overflow-y:auto;
  box-sizing:border-box;
  box-shadow:0 24px 64px rgba(15,23,42,.35);
  border:1px solid rgba(255,255,255,.8);
}
.modal h3{
  margin:0 0 16px;
  font-size:18px;
  font-weight:800;
  background:var(--grad-brand);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  line-height:1.3;
}
.modal .form-grid{
  width:100%;
}
.modal-lg{width:min(820px, 100%);}
.modal-sm{width:min(420px, 100%);}

/* Tables: horizontal scroll + sticky Action column (visible when zoomed) */
.table-wrap, .panel .table-scroll, .table-scroll{
  width:100%;
  overflow-x:auto;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  border-radius:0 0 12px 12px;
  /* subtle hint that more columns exist */
  background:
    linear-gradient(90deg, #fff 30%, transparent),
    linear-gradient(90deg, transparent, #fff 70%) 100% 0,
    linear-gradient(90deg, rgba(15,23,42,.06), transparent),
    linear-gradient(90deg, transparent, rgba(15,23,42,.08)) 100% 0;
  background-repeat:no-repeat;
  background-size:40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment:local, local, scroll, scroll;
}
table.data, .table-scroll > table, table{
  min-width:max-content;
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.content, .panel, .panel-body{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
/* Pin Action column to the right so it never disappears on zoom */
th.sticky-action, td.sticky-action{
  position:sticky;
  right:0;
  z-index:3;
  background:#fff;
  box-shadow:-8px 0 16px -8px rgba(15,23,42,.18);
  min-width:118px;
  max-width:160px;
  white-space:normal;
  vertical-align:middle;
}
thead th.sticky-action{
  background:#f1f5f9;
  z-index:4;
}
tbody tr:nth-child(even) td.sticky-action{background:#f8fafc;}
tbody tr:hover td.sticky-action{background:#eef2ff;}
.action-stack{
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:stretch;
  padding:2px 0;
}
.action-stack .act-btn, .action-stack .btn{
  width:100%;
  margin:0 !important;
  padding:5px 8px !important;
  font-size:11px !important;
  white-space:nowrap;
  border-radius:8px;
  text-align:center;
}
.action-stack .act-del{color:#be123c !important;border-color:#fecdd3 !important;}
.action-stack .act-del:hover{background:#fff1f2 !important;}

/* ---------- Stage buttons ---------- */
.stage-btn{
  padding:10px 14px;border-radius:10px;border:1.5px solid #e2e8f0;
  background:#fff;cursor:pointer;font-size:13px;font-weight:600;
  transition:all .15s;
}
.stage-btn.current{
  background:var(--grad-brand);color:#fff;border-color:transparent;
  box-shadow:0 4px 14px rgba(99,102,241,.35);
}
.stage-btn.done{opacity:.5;cursor:not-allowed;background:#f1f5f9;}
.stage-btn.next:hover{border-color:#818cf8;background:#eef2ff;color:#4338ca;}
.stage-btn:disabled{opacity:.4;cursor:not-allowed;}

/* ---------- Login (creative) ---------- */
.login-screen{
  position:fixed;inset:0;overflow:hidden;
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(99,102,241,.55), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 90%, rgba(236,72,153,.4), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 20%, rgba(14,165,233,.25), transparent 45%),
    linear-gradient(160deg, #0b1026 0%, #1e1b4b 42%, #4c1d95 100%);
  display:flex;align-items:center;justify-content:center;z-index:100;padding:16px;
}
.login-bg-orb{
  position:absolute;border-radius:50%;filter:blur(40px);pointer-events:none;
  animation:loginFloat 12s ease-in-out infinite;
}
.login-orb-1{width:280px;height:280px;background:rgba(99,102,241,.35);top:-40px;left:-60px;}
.login-orb-2{width:220px;height:220px;background:rgba(236,72,153,.3);bottom:-30px;right:-40px;animation-delay:-4s;}
.login-orb-3{width:160px;height:160px;background:rgba(56,189,248,.25);top:40%;left:55%;animation-delay:-7s;}
@keyframes loginFloat{
  0%,100%{transform:translate(0,0) scale(1);}
  50%{transform:translate(18px,-22px) scale(1.06);}
}
.login-card{
  position:relative;z-index:2;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  border-radius:24px;padding:36px 40px 28px;width:400px;max-width:100%;
  box-shadow:
    0 4px 6px rgba(0,0,0,.06),
    0 24px 64px rgba(15,23,42,.45),
    0 0 0 1px rgba(255,255,255,.7) inset;
  border:1px solid rgba(255,255,255,.55);
  animation:loginCardIn .55s cubic-bezier(.22,1,.36,1) both;
  overflow:hidden;
}
@keyframes loginCardIn{
  from{opacity:0;transform:translateY(18px) scale(.97);}
  to{opacity:1;transform:translateY(0) scale(1);}
}
.login-card-accent{
  position:absolute;top:0;left:0;right:0;height:4px;
  background:linear-gradient(90deg,#6366f1,#8b5cf6,#ec4899,#f59e0b);
  background-size:200% 100%;
  animation:loginShimmer 4s linear infinite;
}
@keyframes loginShimmer{
  0%{background-position:0% 50%;}
  100%{background-position:200% 50%;}
}
.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:8px;}
.login-mark{
  width:56px;height:56px;border-radius:16px;font-size:24px;font-weight:800;
  display:inline-flex;align-items:center;justify-content:center;color:#fff;
  background:linear-gradient(135deg,#6366f1 0%,#8b5cf6 50%,#ec4899 100%);
  box-shadow:0 10px 28px rgba(99,102,241,.45);
  animation:loginPulse 3s ease-in-out infinite;
}
@keyframes loginPulse{
  0%,100%{box-shadow:0 10px 28px rgba(99,102,241,.4);}
  50%{box-shadow:0 12px 32px rgba(236,72,153,.45);}
}
.login-brand-text{display:flex;flex-direction:column;gap:3px;}
.login-company{
  font-size:24px;font-weight:800;letter-spacing:-0.03em;line-height:1.1;
  background:linear-gradient(105deg,#1e1b4b 0%,#4c1d95 40%,#7c3aed 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  -webkit-text-fill-color:transparent;
}
.login-tagline{
  font-size:11px;font-weight:700;color:#64748b;letter-spacing:.06em;
  text-transform:uppercase;
}
.login-welcome{
  font-size:13px;font-weight:600;color:#94a3b8;margin:0 0 18px;
  padding-bottom:14px;border-bottom:1px solid #f1f5f9;
}
.login-card .field{margin-bottom:14px;}
.login-card .field label{font-size:12px;font-weight:700;color:#475569;margin-bottom:6px;display:block;}
.login-card .field input{
  border-radius:12px;border:1.5px solid #e2e8f0;padding:12px 14px;
  font-size:14px;transition:border-color .15s, box-shadow .15s;background:#f8fafc;
}
.login-card .field input:focus{
  outline:none;border-color:#818cf8;background:#fff;
  box-shadow:0 0 0 4px rgba(99,102,241,.15);
}
.login-submit{
  width:100%;margin-top:6px;padding:13px 16px;border:none;border-radius:12px;
  font-size:15px;font-weight:700;color:#fff;cursor:pointer;
  background:linear-gradient(135deg,#f59e0b 0%,#f97316 50%,#ea580c 100%);
  box-shadow:0 8px 20px rgba(249,115,22,.35);
  transition:transform .15s, box-shadow .15s;
}
.login-submit:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(249,115,22,.45);}
.login-submit:active{transform:translateY(0);}
.login-install{
  width:100%;margin-top:10px;padding:11px 16px;border:none;border-radius:12px;
  font-size:13px;font-weight:700;color:#fff;cursor:pointer;
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
  box-shadow:0 6px 16px rgba(99,102,241,.3);
}
.login-hint{
  font-size:11px;color:#94a3b8;margin:12px 0 0;text-align:center;line-height:1.5;
}
.login-forgot{
  width:100%;margin-top:12px;padding:10px;border-radius:12px;font-size:12px;font-weight:600;
  background:#fff;border:1.5px solid #e2e8f0;color:#64748b;cursor:pointer;
  transition:border-color .15s, color .15s, background .15s;
}
.login-forgot:hover{border-color:#c7d2fe;color:#4338ca;background:#eef2ff;}
.login-error{
  color:#be123c;background:linear-gradient(135deg,#ffe4e6,#fecdd3);
  padding:10px 14px;border-radius:10px;font-size:13px;margin-bottom:12px;font-weight:600;
}
.password-wrap{position:relative;display:flex;align-items:center;}
.password-wrap input{width:100%;padding-right:42px;}
.eye-btn{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  background:transparent;border:none;cursor:pointer;font-size:16px;opacity:.7;
}
.eye-btn:hover{opacity:1;}

/* ---------- Bell / misc ---------- */
.notif-bell, .bell-btn{
  width:40px;height:40px;border-radius:12px;border:1px solid #e2e8f0;
  background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow);font-size:16px;
}
.notif-bell:hover{background:#eef2ff;border-color:#c7d2fe;}

.menu-toggle{display:none;}
.sidebar-backdrop{display:none;}

/* ---------- Mobile ---------- */
@media (max-width: 900px){
  .sidebar{
    position:fixed;left:0;top:0;bottom:0;z-index:80;
    transform:translateX(-105%);transition:transform .25s ease;
  }
  .sidebar.open{transform:translateX(0);}
  .menu-toggle{
    display:inline-flex;align-items:center;justify-content:center;
    width:40px;height:40px;border-radius:10px;border:1px solid #e2e8f0;
    background:#fff;cursor:pointer;margin-right:8px;
  }
  .sidebar-backdrop.open{
    display:block;position:fixed;inset:0;background:rgba(15,23,42,.45);
    z-index:70;
  }
  .dash-grid{grid-template-columns:1fr;}
  .form-grid{grid-template-columns:1fr;}
  .modal{width:100%;padding:18px 16px;max-height:92vh;}
  .content{padding:14px;}
  .page-title{font-size:18px;}
}

/* Desktop force */
@media (min-width: 901px){
  .menu-toggle{display:none!important;}
  .sidebar-backdrop{display:none!important;}
  .sidebar{transform:none!important;}
}

/* ---------- Creative nav groups (no overlap) ---------- */
#nav{
  display:flex;flex-direction:column;gap:6px;
  flex:1;margin-top:6px;overflow-y:auto;overflow-x:hidden;min-height:0;
  position:relative;z-index:1;padding-right:2px;
}
.nav-group{
  margin:0;border-radius:14px;
  position:relative;z-index:1;
  background:rgba(15,23,42,.25);
  border:1px solid rgba(255,255,255,.08);
  overflow:visible;
}
.nav-group-head{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;cursor:pointer;user-select:none;
  border-radius:14px;
  background:transparent;
  border:none;
  transition:background .18s ease;
  position:relative;
  min-height:44px;
}
.nav-group-head::before{display:none;}
.nav-group-head:hover{
  background:rgba(255,255,255,.06);
  transform:none;
}
.nav-group.open{
  background:rgba(15,23,42,.4);
  border-color:color-mix(in srgb, var(--nav-accent, #818cf8) 40%, transparent);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--nav-accent, #818cf8) 25%, transparent),
             0 8px 24px rgba(0,0,0,.2);
}
.nav-group.open .nav-group-head{
  background:linear-gradient(90deg,
    color-mix(in srgb, var(--nav-accent, #818cf8) 22%, transparent),
    transparent 70%);
  border-radius:14px 14px 0 0;
  box-shadow:none;
}
.nav-group-icon{
  width:30px;height:30px;border-radius:10px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  font-size:15px;
  background:color-mix(in srgb, var(--nav-accent, #a5b4fc) 35%, #0f172a);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--nav-accent, #a5b4fc) 50%, transparent),
             0 4px 10px color-mix(in srgb, var(--nav-accent, #a5b4fc) 30%, transparent);
}
.nav-group-label{
  flex:1;font-size:12.5px;font-weight:700;letter-spacing:.01em;
  color:#f1f5f9;line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.nav-group-toggle{
  width:24px;height:24px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  font-size:10px;font-weight:800;color:#0f172a;
  background:var(--nav-accent, #a5b4fc);
  box-shadow:0 2px 8px color-mix(in srgb, var(--nav-accent, #a5b4fc) 40%, transparent);
  transition:transform .2s ease;
}
.nav-group.open .nav-group-toggle{transform:rotate(0deg);}
.nav-group:not(.open) .nav-group-toggle{opacity:.85;}

.nav-group-body{
  padding:4px 8px 10px 8px;
  border-left:none;margin:0;
  display:flex;flex-direction:column;gap:2px;
}
.nav-group-body .nav-item{
  margin:0;padding:8px 10px 8px 12px;border-radius:10px;
  font-size:12.5px;
}

/* Selection — creative active state */
.nav-item.active{
  background:linear-gradient(105deg,
    color-mix(in srgb, var(--nav-accent, #8b5cf6) 85%, #6366f1),
    color-mix(in srgb, var(--nav-accent, #6366f1) 70%, #ec4899)) !important;
  color:#fff !important;
  font-weight:700;
  border:1px solid rgba(255,255,255,.25) !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--nav-accent, #8b5cf6) 35%, transparent),
    0 8px 22px color-mix(in srgb, var(--nav-accent, #8b5cf6) 45%, transparent),
    inset 0 1px 0 rgba(255,255,255,.25);
  transform:translateX(2px);
}
.nav-item.active::after{
  content:"";position:absolute;right:10px;top:50%;transform:translateY(-50%);
  width:7px;height:7px;border-radius:50%;
  background:#fff;box-shadow:0 0 10px #fff;
}
.nav-item:not(.active):hover{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.06);
}

.nav-icon-badge{
  width:26px;height:26px;border-radius:8px;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:12px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
}
.nav-item.active .nav-icon-badge{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.35);
  box-shadow:0 0 12px rgba(255,255,255,.2);
}
.nav-item .nav-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:14px;}

.nav-item-solo{
  margin:0 0 2px !important;
  min-height:44px;
  background:rgba(15,23,42,.25) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:14px !important;
  padding:10px 12px !important;
}
.nav-item-solo.active{
  transform:none;
}

/* Pass group accent to children for selection colour */
.nav-group{--nav-accent: #818cf8;}
.nav-group-body .nav-item{--nav-accent: inherit;}


/* ---------- Pop-out tab animations ---------- */
@keyframes navPopIn {
  0%   { opacity: 0; transform: translateX(-12px) scale(0.92); }
  60%  { opacity: 1; transform: translateX(3px) scale(1.03); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes navPopActive {
  0%   { transform: translateX(0) scale(1); }
  40%  { transform: translateX(6px) scale(1.06); }
  70%  { transform: translateX(2px) scale(1.02); }
  100% { transform: translateX(2px) scale(1); }
}
@keyframes navBodySlide {
  0%   { opacity: 0; transform: translateY(-8px); max-height: 0; }
  100% { opacity: 1; transform: translateY(0); max-height: 480px; }
}
@keyframes pagePop {
  0%   { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--nav-accent, #8b5cf6) 35%, transparent),
                         0 8px 22px color-mix(in srgb, var(--nav-accent, #8b5cf6) 45%, transparent); }
  50%      { box-shadow: 0 0 0 4px color-mix(in srgb, var(--nav-accent, #8b5cf6) 50%, transparent),
                         0 12px 28px color-mix(in srgb, var(--nav-accent, #8b5cf6) 55%, transparent); }
}

.nav-group-body{
  overflow: hidden;
  transform-origin: top center;
}
.nav-group.open .nav-group-body{
  animation: navBodySlide 0.28s ease-out both;
}
.nav-group-body .nav-item{
  animation: navPopIn 0.32s ease-out both;
}
.nav-group-body .nav-item:nth-child(1){ animation-delay: 0.02s; }
.nav-group-body .nav-item:nth-child(2){ animation-delay: 0.05s; }
.nav-group-body .nav-item:nth-child(3){ animation-delay: 0.08s; }
.nav-group-body .nav-item:nth-child(4){ animation-delay: 0.11s; }
.nav-group-body .nav-item:nth-child(5){ animation-delay: 0.14s; }
.nav-group-body .nav-item:nth-child(6){ animation-delay: 0.17s; }
.nav-group-body .nav-item:nth-child(7){ animation-delay: 0.20s; }
.nav-group-body .nav-item:nth-child(8){ animation-delay: 0.23s; }

.nav-item.active{
  animation: navPopActive 0.35s cubic-bezier(.34,1.4,.64,1) both, pulseGlow 1.8s ease-in-out 0.35s infinite;
  z-index: 2;
}
.nav-item-solo.active{
  animation: navPopActive 0.35s cubic-bezier(.34,1.4,.64,1) both, pulseGlow 1.8s ease-in-out 0.35s infinite;
}

.nav-group-head{
  transition: background .2s ease, transform .2s cubic-bezier(.34,1.3,.64,1);
}
.nav-group.open .nav-group-head{
  transform: scale(1.01);
}
.nav-group-toggle{
  transition: transform .25s cubic-bezier(.34,1.4,.64,1), background .2s;
}
.nav-group.open .nav-group-toggle{
  transform: rotate(90deg) scale(1.08);
}

/* Main content pop when page changes */
.content.page-anim{
  animation: pagePop 0.32s cubic-bezier(.22,1,.36,1) both;
}
#pageTitle.page-anim{
  animation: pagePop 0.28s ease-out both;
}


/* ---------- Dashboard polish ---------- */
.dash-kpi-row{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;}
.kpi-click{cursor:pointer;transition:transform .18s ease, box-shadow .18s ease;min-width:0;overflow:hidden;}
.kpi-click:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(99,102,241,.2);}
.kpi-click:hover .kpi-link{opacity:1;}
.dash-hint{font-size:12px;color:var(--text-dim);margin:-6px 0 14px;padding-left:2px;}
.chart-bar-click{cursor:pointer;padding:4px 2px;border-radius:8px;}
.chart-bar-click:hover{background:rgba(99,102,241,.08);}
.chart-bar-name{font-weight:600;font-size:12px;color:#334155;}
.pie-layout{display:flex;align-items:center;gap:20px;padding:16px;flex-wrap:wrap;}
.pie-wrap{flex:0 0 auto;}
.pie-svg{width:140px;height:140px;filter:drop-shadow(0 4px 12px rgba(15,23,42,.12));}
.pie-legend{flex:1;min-width:140px;display:flex;flex-direction:column;gap:8px;}
.pie-leg-item{display:flex;align-items:center;gap:8px;font-size:13px;padding:6px 10px;border-radius:8px;background:#f8fafc;}
.pie-leg-item:hover{background:#eef2ff;}
.pie-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;}
.pie-pct{margin-left:auto;color:var(--text-dim);font-size:12px;}
.zone-map{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px;}
.zone-cell{border-radius:14px;padding:16px;color:#fff;min-height:100px;display:flex;flex-direction:column;justify-content:center;
  box-shadow:0 8px 20px rgba(15,23,42,.15);transition:transform .18s;}
.zone-click{cursor:pointer;}
.zone-click:hover{transform:scale(1.03);}
.zone-name{font-weight:800;font-size:15px;}
.zone-count{font-size:12px;opacity:.9;margin-top:4px;}
.zone-val{font-size:16px;font-weight:700;margin-top:6px;}
.zone-go{font-size:11px;font-weight:700;margin-top:8px;opacity:.85;}
@media (max-width:700px){
  .zone-map{grid-template-columns:1fr;}
  .pie-layout{flex-direction:column;}
}

/* KPI single-line amounts */
.dash-kpi-row{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(118px,1fr));
  gap:10px;
}
.kpi-click{
  min-width:0;overflow:hidden;padding:14px 12px!important;
}
.kpi-click .kpi-label{
  font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.kpi-click .kpi-value{
  font-size:15px!important;
  font-weight:800;
  white-space:nowrap!important;
  overflow:hidden;
  text-overflow:ellipsis;
  word-break:normal!important;
  overflow-wrap:normal!important;
  line-height:1.3!important;
  margin-top:8px!important;
}
.kpi-link,.zone-go{display:none!important;}

/* India map */
.india-map-layout{
  display:grid;grid-template-columns:1.1fr 1fr;gap:16px;padding:16px;align-items:start;
}
.india-map-svg-wrap{background:linear-gradient(160deg,#eff6ff,#eef2ff);border-radius:16px;padding:8px;}
.india-svg{width:100%;height:auto;max-height:340px;display:block;}
.india-map-side{display:flex;flex-direction:column;gap:6px;max-height:340px;overflow:auto;}
.india-map-side-title{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#6366f1;margin-bottom:4px;}
.india-loc-row{
  display:grid;grid-template-columns:12px 1fr auto auto;gap:8px;align-items:center;
  padding:8px 10px;border-radius:10px;background:#f8fafc;cursor:pointer;font-size:12.5px;
}
.india-loc-row:hover{background:#eef2ff;}
.india-loc-dot{width:8px;height:8px;border-radius:50%;background:#f59e0b;}
.india-loc-name{font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.india-loc-meta{color:#64748b;font-size:11px;}
.india-loc-val{font-weight:700;color:#4f46e5;white-space:nowrap;}
.zone-val{white-space:nowrap;font-size:15px!important;}
@media (max-width:900px){
  .india-map-layout{grid-template-columns:1fr;}
}

/* India map side — 2 columns */
.india-map-layout{
  display:grid;grid-template-columns:1fr 1.15fr;gap:16px;padding:16px;align-items:start;
}
.india-map-side-2col{
  display:grid!important;grid-template-columns:1fr 1fr;gap:12px;max-height:none!important;overflow:visible!important;
}
.india-col{
  background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px;max-height:360px;overflow:auto;
}
.india-col-head{
  display:grid;grid-template-columns:1fr 36px 72px;gap:6px;
  font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8;
  padding:0 8px 8px 28px;border-bottom:1px solid #e2e8f0;margin-bottom:6px;
}
.india-col-head span:nth-child(2),.india-col-head span:nth-child(3){text-align:right;}
.india-col .india-loc-row{
  grid-template-columns:12px 1fr 36px 72px;
}
.india-col .india-loc-meta,.india-col .india-loc-val{text-align:right;}
@media (max-width:1100px){
  .india-map-layout{grid-template-columns:1fr;}
  .india-map-side-2col{grid-template-columns:1fr 1fr;}
}
@media (max-width:700px){
  .india-map-side-2col{grid-template-columns:1fr;}
}

/* Real India map (Leaflet) */
.india-leaflet{
  width:100%;height:380px;border-radius:14px;z-index:1;background:#dbeafe;
}
.india-map-svg-wrap{padding:0!important;overflow:hidden;}
.leaflet-container{font-family:var(--sans);}
.india-map-caption{
  font-size:11px;color:#64748b;text-align:center;padding:8px 10px 4px;font-weight:600;
}
.india-state-tip{
  background:#1e1b4b!important;color:#fff!important;border:none!important;
  border-radius:6px!important;font-size:11px!important;font-weight:600!important;
}
.zone-map-badge{background:transparent!important;border:none!important;}
.india-leaflet{height:420px!important;}

/* India-only map (no neighbour countries) */
.india-only-map{
  background:#e8f4fc!important;
  border-radius:16px;
  height:440px!important;
  box-shadow:inset 0 0 0 1px rgba(99,102,241,.15);
}
.india-only-wrap{
  background:linear-gradient(160deg,#f0f9ff 0%,#eef2ff 100%);
  border-radius:18px;
  padding:10px!important;
}
.zone-badge-pill{
  color:#fff;font-weight:800;font-size:11px;padding:4px 9px;border-radius:999px;
  border:2px solid #fff;box-shadow:0 3px 10px rgba(15,23,42,.25);white-space:nowrap;
}
.india-state-tip{
  background:#312e81!important;color:#fff!important;border:none!important;
  border-radius:8px!important;padding:4px 8px!important;font-size:11px!important;font-weight:600!important;
  box-shadow:0 4px 12px rgba(0,0,0,.2)!important;
}

/* Dashboard creative polish */
.dash-hint{
  display:inline-flex;align-items:center;gap:8px;
  background:linear-gradient(90deg,#eef2ff,#fdf4ff);
  border:1px solid #c7d2fe;border-radius:999px;
  padding:6px 14px;font-size:12px;color:#4338ca;font-weight:600;
}
.dash-grid .panel{
  transition:transform .2s ease, box-shadow .2s ease;
}
.dash-grid .panel:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 32px rgba(99,102,241,.12);
}
.kpi-click{
  background:linear-gradient(145deg,#ffffff 0%,#f8fafc 100%)!important;
  border:1px solid #e2e8f0!important;
  border-radius:16px!important;
}
.kpi-click:hover{
  border-color:#a5b4fc!important;
  background:linear-gradient(145deg,#eef2ff 0%,#ffffff 100%)!important;
}

/* Google-style map pins */
.gmap-pin-wrap{background:transparent!important;border:none!important;}
.gmap-pin{
  width:18px;height:18px;background:#ea4335;border:2.5px solid #fff;
  border-radius:50% 50% 50% 0;transform:rotate(-45deg);
  box-shadow:0 2px 6px rgba(0,0,0,.35);
}
.gmap-pin-label{
  position:absolute;left:50%;top:20px;transform:translateX(-50%);
  font-size:10px;font-weight:700;color:#1e293b;white-space:nowrap;
  text-shadow:0 0 3px #fff,0 0 5px #fff;pointer-events:none;
}
.india-only-map{background:#e8f4fc!important;}

/* Creative India-only map (no world tiles = no other countries, no bound box) */
.india-creative-wrap{
  background:
    radial-gradient(ellipse at 30% 20%, rgba(165,180,252,.35), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(125,211,252,.3), transparent 45%),
    linear-gradient(165deg, #e0f2fe 0%, #dbeafe 40%, #e0e7ff 100%);
  border-radius:20px;
  padding:12px!important;
  box-shadow:inset 0 0 0 1px rgba(99,102,241,.12);
}
.india-creative-map{
  background:transparent!important;
  height:440px!important;
  border-radius:16px;
}
.india-creative-map .leaflet-container{
  background:transparent!important;
}
/* kill any leaflet selection / box UI */
.leaflet-zoom-box,
.leaflet-draw-tooltip,
.leaflet-editing-icon{
  display:none!important;
}

/* Map type filter pills */
.map-type-filters{
  display:flex;flex-wrap:wrap;gap:8px;padding:4px 4px 12px;justify-content:center;
}
.map-filter-btn{
  border:1px solid #c7d2fe;background:#fff;color:#4338ca;
  font-size:12px;font-weight:700;padding:7px 12px;border-radius:999px;
  cursor:pointer;transition:all .15s ease;
}
.map-filter-btn:hover{background:#eef2ff;border-color:#a5b4fc;}
.map-filter-btn.active{
  background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border-color:transparent;
  box-shadow:0 4px 14px rgba(99,102,241,.35);
}


/* Standard form modal alignment */
.modal-form{
  width:min(680px, 100%);
}
.modal-form .form-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px 14px;
}
.password-wrap{width:100%;max-width:100%;}
.password-wrap input{width:100%;}

/* Panel / page content alignment */
.panel{overflow:hidden;}
.panel-body, .panel > div:last-child{min-width:0;}
.main, .content{overflow-x:hidden;}

@media (max-width: 640px){
  .modal-form .form-grid{grid-template-columns:1fr;}
}


/* Soft page switch (no hard refresh feel) */
.page-anim-soft{
  animation: pageSoft 0.18s ease-out both;
}
@keyframes pageSoft{
  from{opacity:0.55; transform:translateY(4px);}
  to{opacity:1; transform:translateY(0);}
}


/* Combobox: free type + dropdown */
.combo-wrap{
  position:relative;display:flex;align-items:center;width:100%;
}
.combo-wrap input{
  width:100%;padding-right:36px!important;
}
.combo-caret{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  border:none;background:transparent;cursor:pointer;
  color:#64748b;font-size:12px;padding:4px 8px;line-height:1;
  border-radius:6px;
}
.combo-caret:hover{background:#f1f5f9;color:#312e81;}


/* Site completion / site expense forms — clean 2-col alignment */
.site-form-page{max-width:820px;margin:0 auto;}
.site-form-card{overflow:visible;}
.site-form-body{padding:20px 22px 18px;}
.site-form-grid{
  display:grid!important;
  grid-template-columns:repeat(2, minmax(0, 1fr))!important;
  gap:16px 20px!important;
  width:100%;
  align-items:start;
}
.site-form-grid .field{
  min-width:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.site-form-grid .field label{
  font-size:12px;
  font-weight:600;
  color:#475569;
  line-height:1.3;
  white-space:normal;
  overflow:visible;
}
.site-form-grid .field input,
.site-form-grid .field select{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  min-height:42px;
  padding:10px 12px;
}
.site-form-grid .field input:disabled,
.site-form-grid .field input[readonly]{
  opacity:0.9;
  background:#f1f5f9!important;
  color:#334155;
  cursor:default;
}
.site-form-grid .site-form-full{grid-column:1 / -1;}
.field-hint{
  font-size:12px;
  color:#6366f1;
  font-weight:600;
  margin-top:4px;
  min-height:1.2em;
}
.site-form-actions{
  margin-top:18px;
  padding-top:12px;
  border-top:1px solid #e2e8f0;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.site-form-status{font-size:13px;font-weight:600;}
@media (max-width:640px){
  .site-form-grid{grid-template-columns:1fr!important;}
  .site-form-page{max-width:100%;}
}


/* Export buttons — always visible in panel heads */
.export-btns{display:inline-flex;gap:6px;flex-shrink:0;align-items:center;}
.export-xls,.export-pdf{
  border-radius:8px !important;font-weight:700 !important;font-size:12px !important;
  padding:6px 12px !important;white-space:nowrap;
}
.export-xls{
  background:linear-gradient(135deg,#ecfdf5,#d1fae5) !important;
  border:1px solid #6ee7b7 !important;color:#047857 !important;
}
.export-xls:hover{background:#a7f3d0 !important;}
.export-pdf{
  background:linear-gradient(135deg,#eff6ff,#dbeafe) !important;
  border:1px solid #93c5fd !important;color:#1d4ed8 !important;
}
.export-pdf:hover{background:#bfdbfe !important;}
.panel-head{
  display:flex !important;flex-wrap:wrap !important;align-items:center !important;
  gap:8px !important;justify-content:space-between;
}
.panel-head-extra{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-left:auto;}


/* Customization — module toggles */
.module-list{display:flex;flex-direction:column;gap:0;padding:8px 0;}
.module-row{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 18px;border-bottom:1px solid #f1f5f9;
}
.module-row:hover{background:#f8fafc;}
.module-info{min-width:0;flex:1;}
.module-name{font-weight:700;font-size:14px;color:#0f172a;margin-bottom:2px;}
.module-desc{font-size:12px;color:#64748b;line-height:1.4;}
.module-desc .muted{opacity:.7;font-size:11px;}
.module-toggle{flex-shrink:0;min-width:110px;}

/* Site forms — prevent left accent clipping labels */
.site-form-card.panel{overflow:visible;}
.site-form-card .panel-body,
.site-form-body{
  padding:20px 22px 18px 24px !important;
  box-sizing:border-box;
}
.site-form-grid .field label{
  padding-left:0 !important;
  overflow:visible !important;
  text-indent:0 !important;
}
.panel-body .form-grid{
  padding:16px 18px 18px 20px;
  box-sizing:border-box;
}


/* Part required materials modal */
.pm-help{font-size:12px;color:#64748b;margin:0 0 14px;line-height:1.45;}
.pm-lines{display:flex;flex-direction:column;gap:12px;}
.pm-line{
  display:grid;
  grid-template-columns:1.2fr 1.4fr 1fr 0.7fr 0.7fr auto;
  gap:10px 12px;
  align-items:end;
  padding:12px 14px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:12px;
}
.pm-field{display:flex;flex-direction:column;gap:5px;min-width:0;}
.pm-field label{font-size:11px;font-weight:700;color:#475569;letter-spacing:.02em;}
.pm-field select,
.pm-field input{
  width:100%;
  box-sizing:border-box;
  min-height:40px;
  padding:8px 10px;
  border:1.5px solid #e2e8f0;
  border-radius:10px;
  font-size:13px;
  background:#fff;
}
.pm-remove-wrap{justify-self:end;}
.pm-remove-wrap .pm-remove{min-width:36px;min-height:40px;}
@media (max-width:720px){
  .pm-line{grid-template-columns:1fr 1fr; }
  .pm-remove-wrap{grid-column:1 / -1;}
}





/* Purchase materials — card rows (no horizontal scroll) */
.purchase-modal .form-grid.site-form-grid{padding:0;}
.mp-cards{display:flex;flex-direction:column;gap:12px;}
.mp-card{
  border:1px solid #e2e8f0;border-radius:14px;background:#fff;
  padding:12px 14px 14px;box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.mp-card-head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #f1f5f9;
}
.mp-card-head .badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:28px;height:28px;border-radius:8px;
  background:#eef2ff;color:#3730a3;font-weight:800;font-size:13px;
}
.mp-card-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px 14px;
  align-items:end;
}
.mp-card-grid .field{margin:0;min-width:0;}
.mp-card-grid .field label{
  display:block;font-size:11px;font-weight:700;color:#64748b;
  margin-bottom:5px;letter-spacing:.02em;text-transform:uppercase;
}
.mp-card-grid .field select,
.mp-card-grid .field input{
  width:100%;box-sizing:border-box;min-height:40px;
  padding:8px 10px;border:1.5px solid #e2e8f0;border-radius:10px;
  font-size:13.5px;background:#fff;
}
.mp-card-grid .mp-span2{grid-column:span 2;}
.mp-card-grid .mp-tot .mp-amt{
  min-height:40px;display:flex;align-items:center;
  padding:0 10px;border-radius:10px;background:#f8fafc;
  border:1px solid #e2e8f0;font-weight:600;font-size:14px;color:#0f172a;
}
.mp-card-grid .mp-tot .mp-amt.strong{
  background:#ecfdf5;border-color:#a7f3d0;color:#047857;font-weight:800;
}
.mp-total-line{
  margin:14px 0 0;padding:12px 14px;border-radius:12px;
  background:linear-gradient(135deg,#eef2ff,#f8fafc);
  border:1px solid #e2e8f0;font-size:13.5px;color:#334155;line-height:1.5;
}
.mp-total-line strong{color:#0f172a;font-size:14px;}
@media (max-width:720px){
  .mp-card-grid{grid-template-columns:1fr 1fr;}
  .mp-card-grid .mp-span2{grid-column:1 / -1;}
}


/* Purchase material line — single row */
.mp-card-row{
  display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 12px;
}
.mp-card-row .field{margin:0;min-width:0;}
.mp-card-row .field label{
  display:block;font-size:10px;font-weight:700;color:#64748b;
  margin-bottom:4px;text-transform:uppercase;letter-spacing:.03em;
}
.mp-card-row .field select,
.mp-card-row .field input{
  width:100%;box-sizing:border-box;min-height:38px;
  padding:6px 8px;border:1.5px solid #e2e8f0;border-radius:10px;font-size:13px;background:#fff;
}
.mp-card-row .mp-grow{flex:1 1 180px;min-width:160px;}
.mp-card-row .mp-tot .mp-amt{
  min-height:38px;display:flex;align-items:center;padding:0 8px;
  border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0;font-weight:600;font-size:13px;
}
.mp-card-row .mp-tot .mp-amt.strong{background:#ecfdf5;border-color:#a7f3d0;color:#047857;font-weight:800;}
.mp-card-row .badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:28px;height:28px;border-radius:8px;margin-bottom:4px;
  background:#eef2ff;color:#3730a3;font-weight:800;font-size:13px;flex:0 0 auto;
}
.mp-bts-box{
  margin-top:12px;padding:12px 14px;border:1px solid #e2e8f0;border-radius:12px;background:#fafaf7;
  overflow:visible;
}
.mp-check-row{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:10px !important;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  margin:0;
  width:100%;
  max-width:100%;
  line-height:1.4;
}
.mp-check-row input.mp-bts-cb,
.mp-check-row input[type="checkbox"]{
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  max-width:16px !important;
  min-height:16px !important;
  max-height:16px !important;
  flex:0 0 16px !important;
  margin:0 !important;
  padding:0 !important;
  accent-color:#ea580c;
  transform:none !important;
  scale:1 !important;
  -webkit-appearance:checkbox;
  appearance:auto;
}
.mp-check-text{
  flex:1 1 auto;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:unset !important;
  line-height:1.4;
}


/* Purchase modal wide + single-line materials */
.purchase-modal{max-width:1280px!important;}
.mp-card{overflow-x:auto;}
.mp-card-row{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:flex-end!important;
  gap:8px!important;
  min-width:980px;
}
.mp-card-row .mp-grow{flex:1 1 200px;min-width:180px!important;}
.mp-card-row .field{flex:0 0 auto;}
.mp-card-row .mp-tot .mp-amt{white-space:nowrap;}


/* Engineer approval / stage chips */
.stage-bar{
  display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px;max-width:220px;
}
.stage-chip{
  display:inline-block;padding:3px 8px;border-radius:999px;
  font-size:10px;font-weight:700;line-height:1.3;white-space:nowrap;
  background:#f1f5f9;color:#64748b;border:1px solid #e2e8f0;
}
.stage-chip.stage-done{background:#ecfdf5;color:#047857;border-color:#a7f3d0;}
.stage-chip.stage-current{background:#eef2ff;color:#3730a3;border-color:#c7d2fe;}
.stage-chip.stage-pending{background:#f8fafc;color:#94a3b8;border-color:#e2e8f0;}
.stage-chip.stage-rejected{background:#fef2f2;color:#b91c1c;border-color:#fecaca;}
.stage-arrow{color:#cbd5e1;font-size:11px;font-weight:700;}
.appr-status{
  display:inline-block;padding:4px 10px;border-radius:999px;
  font-size:11px;font-weight:700;white-space:nowrap;
}
.appr-status.pending{background:#f1f5f9;color:#64748b;}
.appr-status.requested{background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;}
.appr-status.approved{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0;}
.appr-status.rejected{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;}
.wo-parts-table .act-btn{margin:2px 2px 0 0;}
.kpi-money .kpi-value{font-variant-numeric:tabular-nums;}


/* —— Message popup / banner (not under notification bell) —— */
.ardent-msg-overlay{
  position:fixed;inset:0;z-index:100000;
  background:rgba(15,23,42,.45);
  display:flex;align-items:center;justify-content:center;
  padding:16px;
  animation:ardentFadeIn .15s ease;
}
.ardent-msg-box{
  background:#fff;
  border-radius:16px;
  padding:22px 24px 18px;
  width:min(420px,94vw);
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  text-align:center;
  border:1px solid #e2e8f0;
}
.ardent-msg-box.err{ border-color:#fecaca; background:linear-gradient(180deg,#fff 0%,#fef2f2 100%); }
.ardent-msg-title{
  font-weight:800;font-size:15px;letter-spacing:.02em;
  color:#b91c1c;margin-bottom:10px;text-transform:uppercase;
}
.ardent-msg-body{
  font-size:15px;line-height:1.45;color:#1e293b;
  margin-bottom:16px;word-break:break-word;white-space:pre-wrap;
}
.ardent-msg-hint{ margin-top:10px;font-size:11px;color:#94a3b8; }
.ardent-msg-banner{
  position:fixed;top:18px;left:50%;transform:translateX(-50%) translateY(-12px);
  z-index:100000;opacity:0;pointer-events:auto;
  background:#0f766e;color:#fff;
  padding:12px 20px;border-radius:12px;
  font-size:14px;font-weight:600;
  box-shadow:0 12px 30px rgba(15,23,42,.2);
  max-width:min(520px,92vw);text-align:center;
  transition:opacity .2s ease, transform .2s ease;
  cursor:pointer;
}
.ardent-msg-banner.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.ardent-msg-banner.ok{ background:linear-gradient(135deg,#0f766e,#0d9488); }
@keyframes ardentFadeIn{ from{opacity:0} to{opacity:1} }


/* —— Notification drawer (bell click) —— */
#notifPanel{ display:none !important; visibility:hidden !important; pointer-events:none !important; }
.notif-wrap{ position:relative; }
.notif-bell, .bell-btn{
  width:42px;height:42px;border-radius:12px;border:1px solid #e2e8f0;
  background:#fff;cursor:pointer;font-size:18px;display:inline-flex;align-items:center;justify-content:center;
  transition:transform .15s ease, box-shadow .15s ease, background .15s;
}
.notif-bell:hover{ background:#eef2ff; border-color:#c7d2fe; transform:scale(1.05); box-shadow:0 6px 16px rgba(99,102,241,.2); }
.notif-badge{
  position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 5px;
  border-radius:999px; background:linear-gradient(135deg,#ef4444,#dc2626); color:#fff;
  font-size:10px; font-weight:800; display:none; align-items:center; justify-content:center;
  box-shadow:0 2px 8px rgba(220,38,38,.45); border:2px solid #fff;
}
.notif-backdrop{
  position:fixed; inset:0; z-index:90000;
  background:rgba(15,23,42,.4); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none; transition:opacity .22s ease;
}
.notif-backdrop.open{ opacity:1; pointer-events:auto; }
.notif-drawer{
  position:fixed; top:0; right:0; z-index:90001;
  width:min(400px, 94vw); height:100vh;
  background:linear-gradient(165deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
  color:#e2e8f0;
  box-shadow:-12px 0 40px rgba(0,0,0,.35);
  transform:translateX(105%);
  transition:transform .28s cubic-bezier(.22,1,.36,1);
  display:flex; flex-direction:column;
}
.notif-drawer.open{ transform:translateX(0); }
.notif-drawer-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:22px 20px 16px; border-bottom:1px solid rgba(255,255,255,.1);
}
.notif-drawer-title{ display:flex; gap:12px; align-items:center; }
.notif-drawer-icon{
  width:44px;height:44px;border-radius:14px;
  background:linear-gradient(135deg,#818cf8,#6366f1);
  display:flex;align-items:center;justify-content:center;font-size:20px;
  box-shadow:0 8px 20px rgba(99,102,241,.4);
}
.notif-drawer-h1{ font-weight:800; font-size:17px; color:#fff; }
.notif-drawer-h2{ font-size:12px; color:#a5b4fc; margin-top:2px; }
.notif-drawer-close{
  width:36px;height:36px;border-radius:10px;border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.06); color:#fff; font-size:22px; line-height:1; cursor:pointer;
}
.notif-drawer-close:hover{ background:rgba(255,255,255,.12); }
.notif-drawer-body{ flex:1; overflow:auto; padding:14px 14px 20px; }
.notif-drawer-foot{
  padding:12px 16px; border-top:1px solid rgba(255,255,255,.1);
  display:flex; justify-content:flex-end;
}
.notif-card{
  width:100%; text-align:left; cursor:pointer;
  display:flex; gap:12px; align-items:center;
  padding:12px 12px; margin-bottom:10px;
  border-radius:14px; border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.06);
  color:inherit; font:inherit;
  animation:notifCardIn .35s ease both;
  transition:background .15s, transform .15s, border-color .15s;
}
.notif-card:hover{
  background:rgba(255,255,255,.12); border-color:rgba(165,180,252,.45);
  transform:translateX(-3px);
}
.notif-card-icon{
  width:40px;height:40px;border-radius:12px;flex-shrink:0;
  background:rgba(255,255,255,.1); display:flex;align-items:center;justify-content:center;font-size:18px;
}
.notif-card-text{ flex:1; min-width:0; }
.notif-card-title{ font-weight:700; font-size:13px; color:#fff; }
.notif-card-sub{ font-size:12px; color:#c7d2fe; margin-top:3px; line-height:1.35; word-break:break-word; }
.notif-card-go{ color:#a5b4fc; font-weight:700; opacity:.7; }
.notif-empty{ text-align:center; padding:48px 20px; color:#c7d2fe; }
.notif-empty-icon{ font-size:36px; margin-bottom:10px; }
.notif-empty-title{ font-weight:800; font-size:16px; color:#fff; }
.notif-empty-sub{ font-size:13px; margin-top:6px; opacity:.85; line-height:1.4; }
@keyframes notifCardIn{
  from{ opacity:0; transform:translateX(16px); }
  to{ opacity:1; transform:translateX(0); }
}


/* ============================================================
   GLOBAL TITLE / VALUE ALIGNMENT (CRM-wide)
   ============================================================ */

/* Page title in topbar */
#pageTitle, .topbar #pageTitle {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Section titles */
.section-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #312e81;
  line-height: 1.3;
}

/* Panel head title consistency */
.panel-head h3,
.panel-title {
  margin: 0;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #312e81;
  line-height: 1.3;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-head-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* KPI / summary cards — consistent title + value stack */
.kpi-row,
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  align-items: stretch;
}
.kpi,
.kpi-card,
.kpi-money,
.kpi-click {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 78px;
  min-width: 0;
  padding: 12px 14px;
  box-sizing: border-box;
  overflow: visible;
}
.kpi .label,
.kpi-label,
.kpi .kpi-label {
  display: block;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.25;
  margin: 0 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi .value,
.kpi-value,
.kpi .kpi-value {
  display: block;
  width: 100%;
  margin: 0;
  font-size: clamp(11px, 1.1vw, 16px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1e1b4b;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: normal;          /* allow full amount to show */
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  text-align: left;
}

/* Forms — aligned labels & controls */
.form-grid,
.site-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}
@media (min-width: 960px) {
  .form-grid.cols-3,
  .modal-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .form-grid,
  .site-form-grid,
  .modal-form .form-grid {
    grid-template-columns: 1fr !important;
  }
  .kpi-row,
  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.field > label {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1.3;
  min-height: 16px;
}
.field input,
.field select,
.field textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 40px;
  padding: 8px 12px;
  margin: 0;
  line-height: 1.3;
  vertical-align: middle;
}
.field textarea,
.form-grid textarea,
.modal textarea {
  height: auto;
  min-height: 72px;
  padding-top: 10px;
}
.field-hint,
.site-form-status {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
  margin-top: 2px;
}
.form-actions,
.site-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 4px;
}

/* Tables — title headers + value cells */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data,
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
table.data thead th,
table thead th {
  text-align: left;
  vertical-align: middle;
  padding: 11px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
table.data tbody td,
table tbody td {
  text-align: left;
  vertical-align: middle;
  padding: 10px 12px;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.35;
  border-bottom: 1px solid #f1f5f9;
}
/* Numbers & Sr No — right aligned, tabular */
table.data th.num,
table.data td.num,
table th.num,
table td.num,
td.r, th.r, .num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
}
table.data td.sr,
table td.sr {
  width: 52px;
  color: #64748b;
  font-weight: 600;
}
table.data td .action-stack,
.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

/* Modal form alignment */
.modal.modal-form,
.modal {
  max-width: min(720px, 96vw);
}
.modal h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.modal .form-grid {
  margin-bottom: 8px;
}

/* Site forms */
.site-form-page {
  max-width: 920px;
  margin: 0 auto;
}
.site-form-card .panel-body,
.site-form-body {
  padding: 18px 20px 20px;
}
.site-form-help {
  max-width: 920px;
  margin: 0 auto 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef2ff, #fdf4ff);
  border: 1px solid #e0e7ff;
  color: #4338ca;
  font-size: 13px;
  line-height: 1.45;
}

/* Content padding consistency */
.content {
  padding: 18px 20px 28px;
  box-sizing: border-box;
}

/* Filter bars */
.period-bar, .filter-bar, .adv-filter {
  align-items: flex-end;
}
.period-bar .field,
.filter-bar .field,
.adv-filter .field {
  margin: 0;
}

/* Sticky action column stays aligned */
th.sticky-action,
td.sticky-action {
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 2;
  text-align: right !important;
  box-shadow: -6px 0 12px rgba(15, 23, 42, 0.04);
}
thead th.sticky-action {
  background: #f8fafc;
  z-index: 3;
}


/* Force full amounts on KPI cards — no ellipsis */
.kpi .value, .kpi-value, .kpi .kpi-value, .kpi-money .kpi-value {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  font-variant-numeric: tabular-nums !important;
}

.company-switch{
  display:flex;align-items:center;gap:8px;margin-right:12px;
  background:linear-gradient(135deg,#eef2ff,#fdf4ff);
  border:1px solid #e0e7ff;border-radius:12px;padding:4px 10px 4px 12px;
}
.company-switch-label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#6366f1;}
.company-select{
  border:none;background:transparent;font-weight:700;font-size:13px;color:#1e1b4b;
  padding:6px 4px;cursor:pointer;max-width:180px;
}

.company-switch{display:flex;align-items:center;gap:10px;margin-right:12px;
  background:linear-gradient(135deg,#eef2ff,#fdf4ff);border:1px solid #c7d2fe;
  border-radius:14px;padding:6px 12px;box-shadow:0 4px 14px rgba(99,102,241,.12);}
.company-switch-icon{font-size:18px;line-height:1;}
.company-switch-text{display:flex;flex-direction:column;gap:0;}
.company-switch-label{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#6366f1;margin:0;}
.company-select{border:none;background:transparent;font-weight:800;font-size:13px;color:#1e1b4b;
  padding:2px 4px 0;cursor:pointer;max-width:200px;outline:none;}

.brand-clickable{cursor:pointer!important;transition:transform .15s,filter .15s;}
.brand-clickable:hover{filter:brightness(1.12);transform:scale(1.02);}
.company-picker-modal{max-width:420px;}
.company-picker-hint{font-size:13px;color:#64748b;margin:0 0 14px;line-height:1.4;}
.company-picker-list{display:flex;flex-direction:column;gap:10px;margin-bottom:8px;}
.company-pick-card{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:14px 16px;border-radius:14px;border:1.5px solid #e2e8f0;
  background:#fff;cursor:pointer;font:inherit;color:inherit;
  transition:border-color .15s,box-shadow .15s,transform .12s;
}
.company-pick-card:hover{border-color:#818cf8;box-shadow:0 8px 24px rgba(99,102,241,.15);transform:translateY(-1px);}
.company-pick-card.active{border-color:#6366f1;background:linear-gradient(135deg,#eef2ff,#fdf4ff);}
.company-pick-icon{font-size:22px;}
.company-pick-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.company-pick-name{font-weight:800;font-size:15px;color:#1e1b4b;}
.company-pick-meta{font-size:12px;color:#64748b;}
.company-pick-go{font-weight:700;color:#6366f1;font-size:13px;}
.company-select-label{font-weight:800;font-size:13px;color:#1e1b4b;}

.company-gate{
  position:fixed;inset:0;z-index:500;display:flex;align-items:center;justify-content:center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99,102,241,.35), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(14,165,233,.3), transparent 50%),
    linear-gradient(160deg,#0f172a 0%,#1e1b4b 50%,#0f172a 100%);
  padding:24px;
}
.company-gate-inner{width:min(720px,100%);text-align:center;}
.company-gate-brand{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:28px;}
.company-gate-title{font-size:26px;font-weight:800;color:#fff;letter-spacing:-.02em;}
.company-gate-sub{font-size:14px;color:#a5b4fc;margin-top:4px;}
.company-gate-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;}
.company-gate-loading{color:#c7d2fe;padding:40px;}
.company-tile{
  position:relative;overflow:hidden;border:none;cursor:pointer;text-align:left;
  padding:24px 22px;border-radius:20px;background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);color:#fff;font:inherit;
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;
  transition:transform .18s,box-shadow .18s,background .18s;
  animation:companyTileIn .45s ease both;
}
.company-tile:hover{transform:translateY(-6px) scale(1.02);background:rgba(255,255,255,.14);
  box-shadow:0 20px 50px rgba(0,0,0,.35);}
.company-tile-glow{position:absolute;right:-30px;top:-30px;width:120px;height:120px;border-radius:50%;opacity:.5;filter:blur(8px);}
.company-tile-icon{font-size:28px;position:relative;z-index:1;}
.company-tile-name{font-size:20px;font-weight:800;position:relative;z-index:1;}
.company-tile-meta{font-size:12px;color:#c7d2fe;position:relative;z-index:1;}
.company-tile-cta{margin-top:10px;font-size:13px;font-weight:700;color:#a5b4fc;position:relative;z-index:1;}
.company-gate-foot{margin-top:22px;font-size:12px;color:#94a3b8;}
@keyframes companyTileIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

/* ===== Creative company switch (logo click) ===== */
.company-switch-overlay{
  position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;
  padding:20px;box-sizing:border-box;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  opacity:0;transition:opacity .22s ease;
}
.company-switch-overlay.open{opacity:1;}
.company-switch-panel{
  position:relative;width:min(560px,100%);
  background:linear-gradient(165deg,#0f172a 0%,#1e1b4b 45%,#172554 100%);
  border:1px solid rgba(165,180,252,.25);
  border-radius:24px;padding:28px 24px 22px;
  box-shadow:0 30px 80px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.05) inset;
  transform:translateY(12px) scale(.97);transition:transform .25s ease;
  color:#fff;
}
.company-switch-overlay.open .company-switch-panel{transform:none;}
.company-switch-x{
  position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);
  color:#fff;font-size:22px;line-height:1;cursor:pointer;
}
.company-switch-x:hover{background:rgba(255,255,255,.14);}
.company-switch-hero{text-align:center;margin-bottom:20px;position:relative;}
.company-switch-orb{
  width:56px;height:56px;margin:0 auto 12px;border-radius:18px;
  background:linear-gradient(135deg,#818cf8,#6366f1,#22d3ee);
  box-shadow:0 12px 30px rgba(99,102,241,.45);
}
.company-switch-kicker{
  font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#a5b4fc;
}
.company-switch-title{margin:6px 0 4px;font-size:24px;font-weight:800;letter-spacing:-.02em;}
.company-switch-sub{margin:0;font-size:13px;color:#c7d2fe;opacity:.9;}
.company-switch-tiles{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;
}
@media (max-width:520px){.company-switch-tiles{grid-template-columns:1fr;}}
.company-switch-tile{
  position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.12);
  border-radius:18px;padding:20px 16px 16px;text-align:left;cursor:pointer;
  background:rgba(255,255,255,.06);color:#fff;font:inherit;
  display:flex;flex-direction:column;align-items:flex-start;gap:6px;
  transition:transform .18s,box-shadow .18s,border-color .18s,background .18s;
}
.company-switch-tile:hover{
  transform:translateY(-4px);border-color:rgba(165,180,252,.5);
  box-shadow:0 16px 40px rgba(0,0,0,.35);background:rgba(255,255,255,.1);
}
.company-switch-tile.is-current{
  border-color:rgba(129,140,248,.7);
  box-shadow:0 0 0 1px rgba(129,140,248,.35),0 12px 32px rgba(99,102,241,.25);
}
.company-switch-tile-bg{
  position:absolute;right:-24px;top:-24px;width:110px;height:110px;border-radius:50%;
  opacity:.45;filter:blur(2px);pointer-events:none;
}
.company-switch-tile-mark{
  position:relative;z-index:1;width:40px;height:40px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.15);font-weight:800;font-size:18px;
}
.company-switch-tile-name{position:relative;z-index:1;font-size:17px;font-weight:800;}
.company-switch-tile-meta{position:relative;z-index:1;font-size:12px;color:#c7d2fe;}
.company-switch-tile-footer{position:relative;z-index:1;margin-top:10px;}
.company-switch-badge{
  display:inline-block;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:800;
  background:rgba(16,185,129,.2);color:#6ee7b7;border:1px solid rgba(52,211,153,.35);
}
.company-switch-go{font-size:13px;font-weight:700;color:#a5b4fc;}
.company-switch-tile.is-loading{opacity:.7;pointer-events:none;}
.company-switch-note{text-align:center;margin:16px 0 0;font-size:12px;color:#94a3b8;}
.brand-clickable{cursor:pointer!important;}
.brand-clickable:hover{filter:brightness(1.12);}

.brand{position:relative;flex-wrap:wrap;}
.brand-switch-chip{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  margin-top:8px;width:100%;
  padding:6px 10px;border-radius:999px;border:1px solid rgba(165,180,252,.35);
  background:rgba(99,102,241,.25);color:#e0e7ff;font-size:11px;font-weight:800;
  cursor:pointer;letter-spacing:.02em;
  transition:background .15s,transform .15s,border-color .15s;
}
.brand-switch-chip:hover{
  background:rgba(99,102,241,.45);border-color:rgba(165,180,252,.7);
  transform:translateY(-1px);color:#fff;
}
#sidebar .brand.brand-clickable:hover{filter:brightness(1.08);}

/* Compact company switch — topbar */
.company-switch, .company-switch-compact{
  display:inline-flex!important;align-items:center;gap:6px;
  margin:0 8px 0 0;padding:5px 10px!important;
  border-radius:999px!important;border:1px solid #e2e8f0!important;
  background:#fff!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
  height:32px;max-width:160px;cursor:pointer;font:inherit;
  color:#1e293b!important;
}
.company-switch-compact .company-switch-icon{font-size:14px;line-height:1;}
.company-switch-compact .company-select-label{
  font-size:12px!important;font-weight:700!important;color:#334155!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100px;
}
.company-switch-compact .company-switch-caret{font-size:10px;color:#94a3b8;}
.company-switch-label{display:none!important;}
.company-switch-text{display:none!important;}

.brand-switch-chip{
  width:auto!important;margin-top:6px!important;padding:3px 8px!important;
  font-size:10px!important;opacity:.85;
}

/* Sidebar collapse */
.sidebar-collapse-btn{
  width:32px;height:32px;border-radius:10px;border:1px solid #e2e8f0;
  background:#fff;color:#475569;font-size:14px;font-weight:800;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;margin-right:8px;
  box-shadow:0 1px 2px rgba(15,23,42,.05);
}
.sidebar-collapse-btn:hover{background:#f1f5f9;color:#1e293b;}

.app.sidebar-collapsed .sidebar,
body.sidebar-collapsed .sidebar{
  width:72px!important;padding:12px 8px!important;
}
.app.sidebar-collapsed .brand-name,
.app.sidebar-collapsed .brand-sub,
.app.sidebar-collapsed .nav-group-title,
.app.sidebar-collapsed .nav-item > span:not(.nav-icon-badge):not(.nav-icon),
.app.sidebar-collapsed .nav-item .nav-label,
.app.sidebar-collapsed .user-name,
.app.sidebar-collapsed .reconcile-btn,
.app.sidebar-collapsed .sidebar-action-btn,
.app.sidebar-collapsed .brand-switch-chip{
  display:none!important;
}
.app.sidebar-collapsed .nav-item{
  justify-content:center;padding:10px 8px;
}
.app.sidebar-collapsed .brand{
  justify-content:center;padding:6px 0 12px;flex-direction:column;
}
.app.sidebar-collapsed .brand-mark{margin:0 auto;}
.app.sidebar-collapsed .user-bar{align-items:center;}
.app.sidebar-collapsed .nav-group{margin:0;}

/* When collapsed, show tooltip on hover via title already on items */
.app.sidebar-collapsed .nav-item{position:relative;}

.app.sidebar-collapsed .nav-label,
.app.sidebar-collapsed .nav-group-label,
.app.sidebar-collapsed .nav-group-toggle,
.app.sidebar-collapsed .nav-group-title{
  display:none!important;
}
.app.sidebar-collapsed .nav-group-head{
  justify-content:center;padding:10px 8px;
}
.app.sidebar-collapsed .nav-group-body{
  display:block!important; /* show children as icon stack when minimized */
}
.app.sidebar-collapsed .nav-group-body .nav-item{
  justify-content:center;
}
.app.sidebar-collapsed .nav-group-icon{
  margin:0 auto;
}

/* ===== Topbar: company + bell one line ===== */
.topbar-right{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
}
.topbar-right #companySwitch,
.topbar-right .company-switch{
  order:1;
  margin:0!important;
  height:36px!important;
  max-width:150px;
}
.topbar-right #notifWrap,
.topbar-right .notif-wrap{
  order:2;
  display:inline-flex!important;
  align-items:center;
  position:relative;
  margin:0!important;
  flex-shrink:0;
}
.topbar-right .notif-bell{
  width:36px;height:36px;border-radius:12px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #e2e8f0;background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.05);
  font-size:16px;cursor:pointer;padding:0;
}
.topbar-right .notif-badge{
  position:absolute;top:-2px;right:-2px;
}
.sidebar-collapse-btn{
  order:0;
  width:36px;height:36px;border-radius:12px;
  flex-shrink:0;
}

/* ===== Creative collapsed sidebar (icon rail) ===== */
.app.sidebar-collapsed .sidebar,
body.sidebar-collapsed .sidebar{
  width:68px!important;
  padding:12px 8px 16px!important;
  align-items:center;
}
.app.sidebar-collapsed .brand{
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  padding:4px 0 12px!important;
  gap:6px!important;
  width:100%;
}
.app.sidebar-collapsed .brand-mark{
  width:40px!important;height:40px!important;
  margin:0 auto;
  border-radius:14px;
  box-shadow:0 8px 20px rgba(99,102,241,.4);
}
.app.sidebar-collapsed .brand > div:not(.brand-mark),
.app.sidebar-collapsed .brand-name,
.app.sidebar-collapsed .brand-sub,
.app.sidebar-collapsed .brand-switch-chip{
  display:none!important;
}
.app.sidebar-collapsed #nav{
  width:100%;
  align-items:center;
  gap:4px;
  padding:0;
}
.app.sidebar-collapsed .nav-group{
  width:100%;
  margin:2px 0;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.app.sidebar-collapsed .nav-group-head{
  width:44px;height:44px;
  display:flex!important;align-items:center;justify-content:center;
  border-radius:14px;
  padding:0!important;
  margin:0 auto 2px;
  background:rgba(255,255,255,.06);
  border:1px solid transparent;
  cursor:pointer;
}
.app.sidebar-collapsed .nav-group-head:hover,
.app.sidebar-collapsed .nav-group.open .nav-group-head{
  background:rgba(255,255,255,.12);
  border-color:rgba(165,180,252,.35);
}
.app.sidebar-collapsed .nav-group-icon{
  font-size:18px;margin:0;line-height:1;
}
.app.sidebar-collapsed .nav-group-label,
.app.sidebar-collapsed .nav-group-toggle,
.app.sidebar-collapsed .nav-label,
.app.sidebar-collapsed .nav-group-title{
  display:none!important;
}
.app.sidebar-collapsed .nav-group-body{
  display:none!important; /* groups expand on click only when not collapsed - show flat icons instead */
}
/* Flat icon items when collapsed */
.app.sidebar-collapsed .nav-item,
.app.sidebar-collapsed .nav-item-solo{
  width:44px!important;
  height:44px!important;
  margin:3px auto!important;
  padding:0!important;
  display:flex!important;
  align-items:center;justify-content:center;
  border-radius:14px!important;
  gap:0!important;
}
.app.sidebar-collapsed .nav-item.active,
.app.sidebar-collapsed .nav-item-solo.active{
  background:rgba(255,255,255,.16)!important;
  box-shadow:0 0 0 1px rgba(165,180,252,.45);
}
.app.sidebar-collapsed .nav-icon-badge,
.app.sidebar-collapsed .nav-icon{
  margin:0!important;
  font-size:16px;
}
.app.sidebar-collapsed .reconcile-btn,
.app.sidebar-collapsed .user-name,
.app.sidebar-collapsed .sidebar-action-btn{
  display:none!important;
}
.app.sidebar-collapsed .user-bar{
  border-top:1px solid rgba(165,180,252,.2);
  padding-top:10px;
  width:100%;
  align-items:center;
}
/* When collapsed: auto-expand all groups into icon list for access */
.app.sidebar-collapsed .nav-group-body.show-when-collapsed,
.app.sidebar-collapsed.force-icons .nav-group-body{
  display:flex!important;
  flex-direction:column;
  align-items:center;
  width:100%;
}



}


/* ===== Customization — clean cards ===== */
.cust-hero {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #f1f5f9;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.cust-hero-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(245,158,11,0.2);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.35);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.cust-hero-title { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.cust-hero-sub { font-size: 12.5px; opacity: 0.85; line-height: 1.45; margin: 0; max-width: 640px; }
.cust-hero-sub strong { color: #fde68a; }

.cust-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
}
.cust-mode-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.cust-mode-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}
.cust-mode-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.cust-mode-btn.active {
  background: #f59e0b;
  color: #1c1917;
}
.cust-mode-hint { font-size: 11px; color: #64748b; flex: 1 1 160px; }

.module-groups { display: flex; flex-direction: column; gap: 10px; }

.cust-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--g, #6366f1);
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
  overflow: hidden;
}
.cust-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}
.cust-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.cust-card-title-wrap { min-width: 0; }
.cust-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  text-align: left;
}
.cust-card-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cust-card-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  text-align: left;
}
.cust-count { color: #64748b; font-weight: 600; }
.cust-card-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}
.cust-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #475569;
  flex-shrink: 0;
}
.cust-collapse-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }

.cust-card-body {
  padding: 0 10px 12px 50px;
  border-top: 1px solid #f1f5f9;
}
.cust-card.is-collapsed .cust-card-body { display: none; }
.cust-card.is-collapsed .cust-card-head {
  background: linear-gradient(90deg, color-mix(in srgb, var(--g) 8%, #fff), #fff 55%);
}

.cust-mod-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  background: #fafafa;
}
.cust-mod-row:hover { background: #f8fafc; border-color: #e2e8f0; }
.cust-mod-row.is-off { opacity: 0.72; }
.cust-mod-row .module-name { font-weight: 700; font-size: 13px; color: #0f172a; }
.cust-mod-row .module-desc { font-size: 11px; color: #94a3b8; margin-top: 2px; }

.cust-toggle {
  position: relative;
  min-width: 56px;
  height: 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0 8px 0 26px;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.cust-toggle.on { background: #f59e0b; color: #1c1917; }
.cust-toggle.off { background: #e2e8f0; color: #64748b; padding: 0 26px 0 8px; justify-content: flex-start; }
.cust-toggle-knob {
  position: absolute;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cust-toggle.on .cust-toggle-knob { right: 3px; left: auto; }
.cust-toggle.off .cust-toggle-knob { left: 3px; right: auto; }

@media (max-width: 720px) {
  .cust-card-body { padding-left: 14px; }
  .cust-card-actions { display: none; }
}

.cust-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.cust-subtab {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 999px;
}
.cust-mod-row.is-off .cust-subtab {
  opacity: 0.65;
  text-decoration: line-through;
  color: #94a3b8;
}

.cust-subtab-row { padding: 0 !important; background: transparent !important; border: none !important; margin-top: 8px !important; }
.cust-subtab-main { width: 100%; }
.cust-subtab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.cust-subtab-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15,23,42,0.06);
}
.cust-mod-row.is-on .cust-subtab-btn {
  border-color: color-mix(in srgb, var(--g, #f59e0b) 35%, #e2e8f0);
  background: color-mix(in srgb, var(--g, #f59e0b) 6%, #fff);
}
.cust-mod-row.is-off .cust-subtab-btn {
  background: #f8fafc;
  opacity: 0.85;
}
.cust-subtab-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cust-subtab-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cust-subtab-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.cust-subtab-state {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}
.cust-mod-row.is-on .cust-subtab-state { color: #b45309; }

.se-mat-box {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  border-radius: 12px;
  padding: 12px 14px;
}
.se-mat-title {
  font-size: 12px;
  font-weight: 800;
  color: #9a3412;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.se-mat-line {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
}
.se-mat-line-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr 0.7fr 0.6fr auto;
  gap: 8px;
  align-items: end;
}
.se-line-amt {
  font-weight: 800;
  font-size: 13px;
  color: #9a3412;
  padding: 8px 0;
}
@media (max-width: 900px) {
  .se-mat-line-grid { grid-template-columns: 1fr 1fr; }
}


/* ===== V8 sidebar alignment / long-group clipping fix ===== */
@keyframes navBodySlide {
  0%   { opacity:0; transform:translateY(-8px); max-height:0; }
  100% { opacity:1; transform:translateY(0); max-height:1400px; }
}
.nav-group.open .nav-group-body{
  max-height:1400px!important;
  overflow:visible!important;
  padding-bottom:14px!important;
}
.nav-group-body .nav-item{
  min-height:42px;
  box-sizing:border-box;
  align-items:center;
}
.nav-group-body .nav-item:last-child{margin-bottom:2px;}
.nav-group{overflow:visible!important;}
#nav{padding-bottom:16px!important;}


/* ===== V11 accounting / statutory / dashboard visual system ===== */
.accounting-health-strip{
  margin:10px 0 14px;padding:12px 14px;border-radius:14px;border:1px solid #dbe4f6;
  display:flex;gap:12px;align-items:center;justify-content:space-between;cursor:pointer;
  background:linear-gradient(135deg,#f8fbff,#f7f2ff);box-shadow:0 8px 24px rgba(48,56,120,.06);
}
.accounting-health-strip.good{border-color:#bbf7d0;background:linear-gradient(135deg,#f0fdf4,#f8fafc)}
.accounting-health-strip.warn{border-color:#fde68a;background:linear-gradient(135deg,#fffbeb,#fff7ed)}
.accounting-health-strip.bad{border-color:#fecaca;background:linear-gradient(135deg,#fff1f2,#fff7ed)}
.accounting-health-strip:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(48,56,120,.1)}
.finance-mini-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;margin:8px 0 12px}
.finance-mini-strip>div{padding:11px 12px;border:1px solid #e5e7eb;border-radius:12px;background:linear-gradient(145deg,#fff,#faf8ff)}
.finance-mini-strip span{display:block;color:#64748b;font-size:10px;text-transform:uppercase;letter-spacing:.04em;font-weight:750}
.finance-mini-strip strong{display:block;margin-top:4px;font-size:16px;color:#172554}
.accounting-basis-banner,.statutory-note{margin:9px 0 13px;padding:11px 13px;border-radius:12px;border:1px solid #dbeafe;background:linear-gradient(135deg,#eff6ff,#f5f3ff);font-size:12px;line-height:1.45;color:#334155}
.accounting-basis-banner{display:flex;align-items:center;gap:12px;justify-content:space-between}
.accounting-basis-banner strong{color:#312e81;white-space:nowrap}.accounting-basis-banner span{flex:1}
.statutory-note strong{color:#3730a3}.statutory-note.good{border-color:#bbf7d0;background:#f0fdf4}.statutory-note.good strong{color:#166534}
.accounting-health-hero{border-radius:18px;padding:18px 20px;margin:0 0 14px;display:flex;justify-content:space-between;align-items:center;gap:18px;border:1px solid #e2e8f0;background:linear-gradient(135deg,#eef2ff 0%,#faf5ff 50%,#fff 100%);box-shadow:0 12px 30px rgba(44,39,110,.08)}
.accounting-health-hero.good{border-color:#bbf7d0;background:linear-gradient(135deg,#ecfdf5,#f8fafc)}
.accounting-health-hero.warn{border-color:#fde68a;background:linear-gradient(135deg,#fffbeb,#fff7ed)}
.accounting-health-hero.bad{border-color:#fecaca;background:linear-gradient(135deg,#fff1f2,#fff7ed)}
.accounting-health-hero h2{margin:2px 0 5px;font-size:22px;color:#172554}.accounting-health-hero p{margin:0;color:#64748b;max-width:760px}
.eyebrow{font-size:10px;font-weight:850;letter-spacing:.08em;color:#7c3aed;text-transform:uppercase}
.health-score{display:grid;grid-template-columns:auto auto;gap:3px 8px;align-items:baseline;min-width:120px}.health-score strong{font-size:22px;color:#111827}.health-score span{font-size:10px;color:#64748b;text-transform:uppercase}
.health-pill{display:inline-flex;padding:3px 8px;border-radius:999px;font-size:9px;font-weight:850;letter-spacing:.04em}
.health-high{background:#fee2e2;color:#b91c1c}.health-medium{background:#fef3c7;color:#92400e}.health-info{background:#dbeafe;color:#1d4ed8}
.accounting-control-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:12px;margin:12px 0}.accounting-control-grid>.panel{margin:0}
/* Global compact/creative consistency across operational tabs */
#content .panel{transition:box-shadow .16s ease,transform .16s ease;border-radius:14px}
#content .panel:hover{box-shadow:0 10px 28px rgba(38,44,92,.07)}
#content .panel-title{letter-spacing:.025em}
.table-scroll thead th{position:sticky;top:0;z-index:2;background:#f8fafc}
.period-bar,.advanced-filter-bar{border-radius:13px!important}
@media(max-width:800px){.accounting-basis-banner,.accounting-health-hero{align-items:flex-start;flex-direction:column}.health-score{grid-template-columns:auto auto}.finance-mini-strip{grid-template-columns:1fr 1fr}}


/* V16 native India SVG map — offline/local, no CDN dependency */
.native-india-loading{min-height:420px;display:flex;align-items:center;justify-content:center;color:var(--text-dim);font-size:13px}
.native-india-shell{height:100%;min-height:420px;position:relative;display:flex;align-items:center;justify-content:center;padding:8px 10px 28px;overflow:hidden}
.native-india-svg{width:100%;height:100%;max-height:500px;display:block;overflow:visible}
.india-state-shape{stroke:#ffffff;stroke-width:1.25;vector-effect:non-scaling-stroke;cursor:pointer;transition:filter .16s ease,opacity .16s ease,stroke .16s ease;filter:url(#indiaMapShadow)}
.india-state-shape:hover,.india-state-shape:focus{stroke:#4f46e5;stroke-width:2.4;filter:brightness(1.02) drop-shadow(0 3px 5px rgba(79,70,229,.25));outline:none}
.india-project-pin{cursor:pointer;filter:drop-shadow(0 3px 3px rgba(15,23,42,.2));outline:none}
.india-pin-halo{fill:#fff;opacity:.9;stroke:#4f46e5;stroke-width:1.2}
.india-pin-drop{fill:#f97316;stroke:#fff;stroke-width:1.5}
.india-pin-core{fill:#fff}
.india-pin-label{font-size:11px;font-weight:800;fill:#172554;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round;pointer-events:none}
.india-project-pin:hover .india-pin-drop,.india-project-pin:focus .india-pin-drop{fill:#db2777;transform:scale(1.08)}
.india-zone-chip{cursor:pointer;filter:drop-shadow(0 2px 2px rgba(15,23,42,.18));outline:none}
.india-zone-chip text{font-size:10px;font-weight:900;fill:#fff;pointer-events:none}
.native-india-legend{position:absolute;left:12px;bottom:5px;display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:var(--text-dim);background:rgba(255,255,255,.88);padding:4px 7px;border:1px solid rgba(148,163,184,.28);border-radius:999px;backdrop-filter:blur(3px)}
.native-india-legend span{display:flex;align-items:center;gap:5px}.legend-dot{width:8px;height:8px;border-radius:50%;display:inline-block}.legend-dot.project{background:#f97316}.legend-dot.zone{background:#6366f1}
.india-leaflet.india-creative-map{background:linear-gradient(145deg,#f7fbff 0%,#eef2ff 48%,#faf5ff 100%)!important;border-radius:16px;min-height:420px;overflow:hidden}
@media(max-width:900px){.native-india-shell{min-height:360px}.india-pin-label{font-size:9px}.native-india-legend{font-size:9px}}

/* ============================================================
   V85 — ERP-WIDE PRECISION ALIGNMENT SYSTEM
   Applies to every rendered page, modal, register and master.
   ============================================================ */

/* Universal sizing and overflow safety */
#content, #content *, .modal, .modal * { box-sizing:border-box; }
#content > * { max-width:100%; min-width:0; }
#content .panel, #content .card, #content .site-form-card { width:100%; min-width:0; }

/* Consistent page rhythm */
#content > .section-title:first-child { margin-top:2px; }
#content .panel { margin-bottom:16px; }
#content .panel-head { min-height:50px; padding:12px 16px; }
#content .panel-body { min-width:0; }
#content .panel-body > .empty { padding:30px 18px; }

/* All field blocks align from the same baseline */
.field, .pm-field, .mp-card-row .field, .mp-card-grid .field {
  position:relative;
  min-width:0;
}
.field > label, .pm-field > label, .mp-card-row .field > label, .mp-card-grid .field > label {
  display:flex;
  align-items:center;
  min-height:18px;
  margin:0 0 5px;
  line-height:1.25;
}

/* Inline master creation stays on the LABEL line, never below a dropdown. */
.field > .qc-inline-btn,
.pm-field > .qc-inline-btn,
.mp-card-row .field > .qc-inline-btn,
.mp-card-grid .field > .qc-inline-btn {
  position:absolute!important;
  top:-2px!important;
  right:0!important;
  z-index:3;
  margin:0!important;
  padding:2px 7px!important;
  min-height:22px!important;
  height:22px!important;
  border-radius:7px!important;
  font-size:9.5px!important;
  line-height:1!important;
  white-space:nowrap;
  box-shadow:none!important;
  background:#fff!important;
}
.field:has(> .qc-inline-btn) > label,
.pm-field:has(> .qc-inline-btn) > label,
.mp-card-row .field:has(> .qc-inline-btn) > label,
.mp-card-grid .field:has(> .qc-inline-btn) > label {
  padding-right:94px;
}

/* All standard controls have the same visual height. */
#content input:not([type="checkbox"]):not([type="radio"]),
#content select,
.modal input:not([type="checkbox"]):not([type="radio"]),
.modal select {
  min-height:40px;
  height:40px;
  line-height:1.25;
}
#content textarea, .modal textarea { height:auto; min-height:76px; }

/* Critical: never let generic input rules turn checkboxes/radios into 40px fields. */
#content input[type="checkbox"], #content input[type="radio"],
.modal input[type="checkbox"], .modal input[type="radio"] {
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  max-width:16px!important;
  min-height:16px!important;
  max-height:16px!important;
  padding:0!important;
  margin:0!important;
  flex:0 0 16px!important;
  box-shadow:none!important;
  vertical-align:middle;
}
#content label:has(> input[type="checkbox"]),
#content label:has(> input[type="radio"]),
.modal label:has(> input[type="checkbox"]),
.modal label:has(> input[type="radio"]) {
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:24px;
  line-height:1.35;
}

/* Form grids: equal columns / no accidental stagger */
.form-grid, .site-form-grid {
  align-items:start!important;
  grid-auto-rows:auto;
}
.form-grid > *, .site-form-grid > * { min-width:0; }
.form-grid .field, .site-form-grid .field { align-self:start; }

/* Buttons in headers and action rows use one baseline */
.panel-head-extra, .form-actions, .site-form-actions,
#content [style*="display:flex"][style*="gap"] {
  align-items:center;
}
.panel-head-extra .btn, .form-actions .btn, .site-form-actions .btn { flex:0 0 auto; }
.action-stack { min-height:30px; align-items:center!important; }
.action-stack .btn, .action-stack .act-btn { margin:0!important; }

/* Modal shell consistency for every create/edit/view window */
.modal-overlay { padding:18px; overflow:auto; }
.modal {
  margin:auto;
  border-radius:16px;
  max-height:94vh;
  overflow:auto;
}
.modal > h3:first-child { padding-right:6px; }
.modal h4 { color:#1e1b4b; font-size:14px; line-height:1.3; }
.modal .site-form-help { width:100%; max-width:none; }
.modal .form-actions:last-child { padding-bottom:2px; }

/* Purchase Bill — precise line alignment */
.purchase-modal { width:min(98vw,1280px)!important; }
.purchase-modal .form-grid.site-form-grid { gap:14px 18px; }
.purchase-modal .field { min-height:64px; }
.purchase-modal .field:has(> .qc-inline-btn) { min-height:64px; }
.purchase-modal .mp-card { overflow-x:auto; }
.purchase-modal .mp-card-row {
  align-items:flex-end!important;
  column-gap:8px!important;
  row-gap:8px!important;
}
.purchase-modal .mp-card-row .field { min-height:62px; }
.purchase-modal .mp-card-row .badge { align-self:flex-end; margin-bottom:5px; }
.purchase-modal .mp-card-row > button,
.purchase-modal .mp-card-row .btn { align-self:flex-end; margin-bottom:0; }
.purchase-modal #mp-round {
  width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;
}
.purchase-modal label:has(#mp-round) {
  display:flex!important;align-items:center!important;gap:8px!important;
  margin:12px 0 0!important;min-height:24px;
}
.purchase-modal .mp-total-line { margin-top:10px; }

/* Register / reports alignment */
.erp-page-top { min-height:48px; display:flex; align-items:center; }
.table-scroll { max-width:100%; }
table.data thead th, table thead th { height:42px; }
table.data tbody td, table tbody td { min-height:44px; }
table.data td .btn, table td .btn { vertical-align:middle; }
.sticky-action { box-shadow:-4px 0 8px rgba(15,23,42,.025); }

/* Filter bars remain clean even when many filters exist */
.period-bar, .filter-bar, .adv-filter, .advanced-filter-bar {
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  align-items:flex-end!important;
}
.period-bar > *, .filter-bar > *, .adv-filter > *, .advanced-filter-bar > * { min-width:0; }

/* KPI rows equal-height everywhere */
.kpi-row > *, .dash-kpis > *, .finance-mini-strip > * { height:100%; }
.kpi, .kpi-card, .kpi-money, .kpi-click { min-height:84px; }

/* Long text must not push a page wider than viewport */
.panel-title, .field label, td, .kpi-value, .muted { overflow-wrap:anywhere; }
select { text-overflow:ellipsis; }

/* Responsive rules shared by every ERP page */
@media (max-width:1100px) {
  .content { padding:16px 16px 26px; }
  .purchase-modal .mp-card-row { min-width:900px; }
}
@media (max-width:760px) {
  .modal-overlay { padding:8px; align-items:flex-start; }
  .modal { width:100%!important; max-width:100%!important; max-height:calc(100vh - 16px); border-radius:14px; }
  .content { padding:12px 10px 22px; }
  .panel-head { padding:11px 12px; }
  .panel-head-extra { width:100%; justify-content:flex-start; }
  .form-actions, .site-form-actions { width:100%; }
  .form-actions .btn, .site-form-actions .btn { min-height:40px; }
  .field:has(> .qc-inline-btn) > label { padding-right:86px; }
  .field > .qc-inline-btn { font-size:9px!important; }
  .kpi-row, .dash-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:460px) {
  .kpi-row, .dash-kpis, .finance-mini-strip { grid-template-columns:1fr; }
  .panel-head-extra .btn { flex:1 1 auto; }
}


/* ==========================================================
   V90.1 APPROVED REFERENCE UI LOCK — Images 1 & 2 only
   ========================================================== */
:root{--approved-navy:#031a37;--approved-navy-2:#07264b;--approved-blue:#1557d5;--approved-gold:#f7a928;--approved-ink:#071632;--approved-muted:#66748c;--approved-line:#e6ebf2;--approved-bg:#f5f8fc;--approved-card:#fff}
body{background:var(--approved-bg);color:var(--approved-ink)}
.approved-company-gate{position:fixed;inset:0;z-index:9999;display:flex;align-items:stretch;justify-content:center;background:#061a34;color:#fff;overflow:auto;padding:0}.approved-company-shell{position:relative;min-height:100%;width:100%;display:flex;flex-direction:column;background:linear-gradient(90deg,rgba(1,13,30,.95),rgba(5,27,57,.78)),radial-gradient(circle at 78% 25%,rgba(74,122,190,.30),transparent 25%),linear-gradient(155deg,#06172f 0 58%,#0b2749 58% 62%,#07162b 62% 100%);overflow:hidden}.approved-company-shell:before,.approved-login-visual:before{content:"";position:absolute;right:-5%;bottom:-2%;width:58%;height:62%;opacity:.7;background:linear-gradient(90deg,transparent 0 8%,rgba(255,255,255,.08) 8% 9%,transparent 9% 22%,rgba(255,255,255,.06) 22% 23%,transparent 23%),linear-gradient(0deg,rgba(0,0,0,.65),rgba(0,0,0,.05)),repeating-linear-gradient(90deg,transparent 0 55px,rgba(242,173,52,.32) 56px 59px,transparent 60px 112px);clip-path:polygon(0 42%,12% 35%,12% 18%,25% 10%,25% 31%,40% 18%,40% 42%,53% 29%,53% 15%,72% 4%,72% 31%,84% 24%,100% 33%,100% 100%,0 100%);pointer-events:none}.approved-company-brand{position:relative;z-index:2;display:flex;align-items:center;gap:14px;padding:26px 42px}.approved-a{font-size:54px;line-height:1;font-weight:950;font-style:italic;background:linear-gradient(145deg,#ffe083,#d58a0c);-webkit-background-clip:text;color:transparent;filter:drop-shadow(0 4px 8px rgba(0,0,0,.2))}.approved-company-brand div,.approved-brand div{display:flex;flex-direction:column}.approved-company-brand b,.approved-brand b{font-size:19px;letter-spacing:.34em;color:#fff}.approved-company-brand small,.approved-brand small{font-size:9px;letter-spacing:.55em;color:var(--approved-gold);font-weight:800;margin-top:3px}.approved-company-main{position:relative;z-index:2;width:min(1050px,92vw);margin:0 auto;text-align:center;padding:0 0 24px}.approved-company-main h1{font-size:36px;margin:12px 0 8px;color:#fff}.approved-company-main>p{color:#d7dfeb;font-size:16px;margin:0 0 34px}.approved-company-cards{display:grid;grid-template-columns:repeat(2,minmax(270px,1fr));gap:28px;max-width:720px;margin:0 auto}.approved-company-card{position:relative;min-height:265px;border-radius:17px;border:1px solid rgba(255,255,255,.65);background:#fff;color:#10203d;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:28px;cursor:pointer;box-shadow:0 22px 55px rgba(0,0,0,.25);transition:.18s}.approved-company-card.ap{background:linear-gradient(150deg,rgba(2,20,44,.96),rgba(4,31,61,.92));color:#fff;border-color:#d99921}.approved-company-card:hover{transform:translateY(-3px)}.approved-company-card.selected{box-shadow:0 0 0 2px rgba(247,169,40,.35),0 22px 55px rgba(0,0,0,.3)}.approved-company-check{display:none;position:absolute;right:20px;top:18px;width:34px;height:34px;border-radius:50%;background:var(--approved-gold);color:#10203d;align-items:center;justify-content:center;font-size:22px;font-weight:900}.approved-company-card.selected .approved-company-check{display:flex}.approved-company-building{font-size:69px;color:#10203d;line-height:1}.approved-company-card.ap .approved-company-building{color:var(--approved-gold)}.approved-company-card strong{font-size:21px}.approved-company-card small{font-size:14px;line-height:1.65;max-width:200px;color:#69768a}.approved-company-card.ap small{color:#e3e8f1}.approved-company-card i{display:block;width:44px;height:2px;background:#1f65df;margin-top:4px}.approved-company-card.ap i{background:var(--approved-gold)}.approved-company-features{display:grid;grid-template-columns:repeat(3,1fr);max-width:900px;margin:32px auto 0;padding:20px 24px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(2,17,38,.72);text-align:left}.approved-company-features>div{display:grid;grid-template-columns:48px 1fr;grid-template-rows:auto auto;padding:0 22px;border-right:1px solid rgba(255,255,255,.12)}.approved-company-features>div:last-child{border:0}.approved-company-features span{grid-row:1/3;font-size:30px;color:var(--approved-gold)}.approved-company-features b{font-size:13px}.approved-company-features small{font-size:11px;color:#c4cfdd;line-height:1.45;margin-top:5px}.approved-company-shell footer{position:relative;z-index:2;text-align:center;color:#bbc5d3;font-size:11px;padding:10px 0 20px;margin-top:auto}
.approved-login-screen{position:fixed!important;inset:0!important;z-index:9998!important;padding:0!important;background:#fff!important;overflow:auto!important;align-items:stretch!important;justify-content:stretch!important}.approved-login-shell{min-height:100vh;width:100%;display:grid;grid-template-columns:minmax(500px,1.05fr) minmax(520px,.95fr)}.approved-login-visual{position:relative;overflow:hidden;color:#fff;padding:26px 44px;background:linear-gradient(110deg,rgba(2,19,42,.96),rgba(4,29,60,.84)),linear-gradient(155deg,#061a38,#0b315a)}.approved-login-visual:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(45deg,transparent 0 42px,rgba(247,169,40,.08) 43px 44px);pointer-events:none}.approved-brand{position:relative;z-index:2;display:flex;align-items:center;gap:13px}.approved-login-copy{position:absolute;z-index:2;left:48px;top:34%;max-width:390px}.approved-login-copy h1{font-size:35px;line-height:1.28;color:#fff;margin:0;font-weight:800}.approved-login-copy h1 span{color:var(--approved-gold)}.approved-gold-rule{width:56px;height:3px;background:var(--approved-gold);margin:20px 0}.approved-login-copy p{font-size:16px;line-height:1.5;color:#eef3f9}.approved-quote{position:absolute;z-index:2;left:48px;bottom:32px;width:220px;border-radius:12px;padding:15px 16px;background:rgba(0,20,43,.82);border:1px solid rgba(255,255,255,.13)}.approved-quote strong{font-size:35px;line-height:.7;color:var(--approved-gold)}.approved-quote p{font-size:11px;line-height:1.6;margin:7px 0}.approved-quote b{font-size:11px;color:var(--approved-gold)}.approved-login-panel{position:relative;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fff,#fbfcfe);padding:70px 46px}.approved-change-company{position:relative;z-index:3;border:1px solid #dde5f0;background:#fff;color:#0b1b39;border-radius:8px;font-size:12px;font-weight:700;box-shadow:0 4px 12px rgba(12,34,65,.07);cursor:pointer}.approved-change-company.top{position:absolute;right:40px;top:24px;padding:12px 16px}.approved-change-company.wide{width:100%;height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 16px}.approved-login-box{position:relative;z-index:2;width:min(440px,100%);text-align:center}.approved-building-icon{width:68px;height:68px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;border:1px solid #e7edf5;color:#f59e0b;font-size:30px}.approved-login-box h2{font-size:25px;margin:0 0 4px;color:#061632}.approved-login-box>p{font-size:12px;color:#7a879d;margin:0 0 26px}.approved-login-box form{text-align:left}.approved-login-box .field{margin-bottom:14px}.approved-login-box .field label{font-size:11px;color:#101e39;font-weight:700;margin:0 0 7px;display:block}.approved-input-wrap{display:flex;align-items:center;border:1px solid #dce4ee;border-radius:7px;background:#fff;padding:0 12px;height:44px}.approved-input-wrap>span{color:#24395c;margin-right:10px}.approved-input-wrap input{border:0!important;box-shadow:none!important;background:transparent!important;flex:1;height:40px!important;padding:0!important;outline:0!important}.approved-input-wrap .eye-btn{position:static!important;background:transparent!important;color:#263c5f!important;border:0!important}.approved-login-row{display:flex;align-items:center;justify-content:space-between;margin:2px 0 16px}.approved-remember{font-size:11px;color:#66748c;display:flex;align-items:center;gap:7px}.login-forgot-link{border:0;background:none;color:#0664d7;font-size:11px;cursor:pointer}.approved-login-box .login-submit{height:44px;width:100%;border-radius:7px;background:#061f42!important;color:#fff!important;border:0;display:flex;align-items:center;justify-content:center;gap:12px;font-size:14px;font-weight:700}.approved-login-box .login-submit span{position:absolute;right:18px}.approved-or{display:flex;align-items:center;gap:12px;margin:16px 0;color:#53627a;font-size:11px}.approved-or span{height:1px;background:#e5e9f0;flex:1}.approved-or b{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid #eef1f5}.approved-security-note{display:flex;align-items:center;justify-content:center;gap:12px;color:#66748c;font-size:10px;line-height:1.35;margin-top:18px}.approved-forgot{position:absolute;inset:82px 0 0;background:#fff;z-index:8;padding:18px 0}.approved-forgot .btn{width:100%;margin-top:8px}.forgot-success{color:#07815c;background:#e7f9f2;padding:9px;border-radius:6px;font-size:12px}
/* ERP shell/nav locked to reference 2 */
.sidebar{background:linear-gradient(180deg,#041a36,#07254b)!important;border-right:1px solid rgba(255,255,255,.06)!important;width:222px!important}.brand{padding:18px 16px!important}.brand-mark{background:linear-gradient(145deg,#ffe083,#d58a0c)!important;color:transparent!important;-webkit-background-clip:text!important;font-size:48px!important}.brand-name{color:#fff!important;text-transform:uppercase;letter-spacing:.22em;font-size:15px!important}.brand-sub{color:#f6a91f!important;letter-spacing:.28em;font-size:9px!important}.nav-group,.nav-item-solo{background:transparent!important;border:0!important;margin:2px 8px!important}.nav-group-head,.nav-item-solo{min-height:44px!important;border-radius:8px!important;color:#fff!important}.nav-group.open>.nav-group-head,.nav-item-solo.active{background:#1456d7!important}.nav-group-icon,.nav-icon-badge{background:transparent!important;box-shadow:none!important;color:#fff!important}.nav-group-toggle{color:#fff!important}.nav-group-body{background:rgba(0,0,0,.12)!important;border-radius:8px!important;margin-top:2px!important}.nav-item{color:#d9e5f5!important;border-radius:7px!important;margin:2px 5px!important}.nav-item.active{background:rgba(36,101,222,.92)!important;color:#fff!important}.reconcile-btn{background:#0c315f!important;border-color:#24518a!important}.user-bar{border-top:1px solid rgba(255,255,255,.08)!important}.topbar{background:#fff!important;border-bottom:1px solid #e8edf3!important;min-height:64px!important}.topbar #pageTitle{font-size:18px!important;font-weight:800!important;color:#071632!important}.approved-search{height:38px;width:245px;border:1px solid #e0e6ef;border-radius:8px;display:flex;align-items:center;gap:8px;padding:0 10px;color:#51617a}.approved-search input{border:0;outline:0;width:100%;background:transparent;font-size:11px}.content{background:#f7f9fc!important}
.approved-dashboard{max-width:1480px;margin:0 auto}.approved-dash-head{display:flex;align-items:flex-start;justify-content:space-between;margin:4px 2px 16px}.approved-dash-head h1{margin:0;color:#061632;font-size:22px}.approved-dash-head p{margin:5px 0 0;font-size:12px;color:#5f6e85}.approved-period{border:1px solid #e2e8f0;border-radius:8px;background:#fff;padding:10px 13px;color:#1b2a47;font-size:11px;font-weight:650}.approved-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:14px}.approved-kpi{min-width:0;border:1px solid #e5eaf2;background:#fff;border-radius:9px;min-height:104px;padding:14px;display:flex;align-items:center;justify-content:space-between;text-align:left;box-shadow:0 5px 14px rgba(16,43,76,.035);cursor:pointer}.approved-kpi small{display:block;font-size:8px;font-weight:700;color:#31405a}.approved-kpi strong{display:block;font-size:21px;margin:10px 0 7px;color:#061632}.approved-kpi span{display:block;font-size:8px;color:#617089}.approved-kpi i{width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-style:normal;background:#eef1ff;color:#4b63e8;font-size:19px}.approved-kpi i.k1{background:#f2eaff;color:#8e45df}.approved-kpi i.k2{background:#e8f8f0;color:#25a66a}.approved-kpi i.k3{background:#fff0e3;color:#ef7b21}.approved-kpi i.k4{background:#e8f8f7;color:#149f99}.approved-kpi i.k5{background:#ffecef;color:#e44261}.approved-dash-grid-main{display:grid;grid-template-columns:2.05fr 1.12fr .98fr;gap:14px;margin-bottom:14px}.approved-card,.approved-map-card{background:#fff;border:1px solid #e5eaf2;border-radius:10px;box-shadow:0 5px 16px rgba(16,43,76,.035);overflow:hidden}.approved-map-card{position:relative;min-height:382px;padding:14px;background:linear-gradient(145deg,#102746,#081a36);color:#fff}.approved-card{padding:14px}.approved-card h3,.approved-map-card h3{font-size:11px;margin:0;color:#071632}.approved-map-card h3{color:#fff}.approved-map-card p{font-size:8px;margin:3px 0 0;color:#dce7f5}.approved-map-head{display:flex;justify-content:space-between;gap:10px}.approved-map-tabs{display:flex;background:#172e50;border-radius:8px;padding:3px}.approved-map-tabs button{border:0;background:transparent;color:#dce6f4;font-size:7px;padding:6px 10px;border-radius:6px;cursor:pointer}.approved-map-tabs .active{background:#071b3a;color:#fff;box-shadow:inset 0 0 0 1px #39b66f}.approved-map-body{display:grid;grid-template-columns:1.55fr .85fr;gap:12px;margin-top:8px}.approved-india-map{position:relative;min-height:292px}.approved-india-map svg{width:100%;height:292px}.approved-state-layer path{fill:#173f77;stroke:#83aaf0;stroke-width:.6}.approved-map-legend{position:absolute;left:0;bottom:0;display:flex;flex-direction:column;gap:4px;font-size:7px}.approved-map-legend i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:6px}.approved-map-legend .c1{background:#93d62f}.approved-map-legend .c2{background:#f4b01d}.approved-map-legend .c3{background:#ef6a2e}.approved-map-legend .c4{background:#8749ed}.approved-map-legend .c5{background:#a9c2e8}.approved-map-locations{padding-top:44px}.approved-map-locations h4{font-size:9px;margin:0 0 8px}.approved-loc-head,.approved-map-locations button{display:grid;grid-template-columns:1fr 42px 76px;align-items:center;gap:5px;width:100%;font-size:7px}.approved-loc-head{padding:7px;background:#18345a;color:#c7d6e9;border-radius:6px 6px 0 0}.approved-map-locations button{border:0;border-bottom:1px solid rgba(255,255,255,.07);background:#132e51;color:#fff;padding:8px;cursor:pointer}.approved-map-locations button span{text-align:left}.approved-map-locations button strong{text-align:right;font-size:7px}.approved-map-all,.approved-view-all{border:1px solid rgba(255,255,255,.11)!important;background:#102a4c!important;color:#fff!important;border-radius:7px!important;padding:8px 14px!important;font-size:8px!important;cursor:pointer}.approved-map-all{position:absolute;left:14px;bottom:14px}.approved-progress-wrap{display:flex;align-items:center;gap:16px;margin-top:28px}.approved-donut{width:122px;height:122px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:conic-gradient(#3b82f6 0 25%,#35c4b6 25% 60%,#f59e0b 60% 78%,#21b573 78% 100%);position:relative}.approved-donut:after{content:"";position:absolute;inset:20px;background:#fff;border-radius:50%}.approved-donut>div{position:relative;z-index:1;text-align:center}.approved-donut strong{display:block;font-size:22px}.approved-donut span{font-size:8px;color:#607089}.approved-progress-legend{flex:1;display:flex;flex-direction:column;gap:13px}.approved-progress-legend div{display:grid;grid-template-columns:9px 1fr auto;align-items:center;font-size:9px}.approved-progress-legend i{width:7px;height:7px;border-radius:50%}.approved-highlight{border:1px solid #dbe7fb;border-radius:8px;padding:10px;margin-top:24px;background:#fbfdff}.approved-highlight h4{font-size:9px;margin:0 0 12px}.approved-highlight>div{display:grid;grid-template-columns:repeat(3,1fr)}.approved-highlight span{display:grid;grid-template-columns:24px 1fr;grid-template-rows:auto auto;align-items:center;border-right:1px solid #e6ebf2;padding:0 8px;font-size:12px;color:#27ad6d}.approved-highlight span:last-child{border:0}.approved-highlight b{color:#081832;font-size:10px}.approved-highlight small{grid-column:1/3;color:#63718a;font-size:7px}.approved-funnel{display:flex;flex-direction:column}.funnel-row{height:42px;display:grid;grid-template-columns:1fr 90px;align-items:center;gap:8px}.funnel-shape{display:block;justify-self:center;height:100%;clip-path:polygon(8% 0,92% 0,82% 100%,18% 100%);background:#3b82f6}.funnel-shape.f1{background:#3fb5b6}.funnel-shape.f2{background:#8ad44e}.funnel-shape.f3{background:#f7c44d}.funnel-shape.f4{background:#fb923c}.funnel-shape.f5{background:#ef476f}.funnel-row label{font-size:8px;color:#1f2e49}.funnel-row label b{display:block;font-size:10px}.approved-conversion{margin-top:12px;padding:10px;border-radius:7px;background:#f2fbf7;border:1px solid #d7f1e5}.approved-conversion small{display:block;font-size:8px;color:#66758a}.approved-conversion strong{display:block;color:#0f9f5e;font-size:16px}.approved-dash-grid-lower{display:grid;grid-template-columns:1.22fr 1.03fr 1.35fr;gap:14px;margin-bottom:14px}.approved-card-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.approved-card-row button{border:0;background:none;color:#075bd6;font-size:9px;cursor:pointer}.approved-table{width:100%;border-collapse:collapse;font-size:8px}.approved-table th{padding:7px 6px;text-align:left;color:#53627b;border-bottom:1px solid #e9edf3}.approved-table td{padding:8px 6px;border-bottom:1px solid #eef1f5;color:#1a2a47}.approved-table td:first-child{color:#1765df;font-weight:650}.approved-table td small{display:block;color:#6d7a8f;font-size:7px}.approved-status{display:inline-block;padding:3px 7px;border-radius:9px;font-size:7px;background:#eaf8f0;color:#15905a}.approved-status.hold{background:#fff4df;color:#d77a00}.approved-status.done{background:#e7f7ef;color:#168a58}.approved-milestone{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #edf1f5}.approved-milestone time{text-align:center}.approved-milestone time b{display:block;font-size:14px}.approved-milestone time span{font-size:7px;color:#6c7a90}.approved-milestone div strong{display:block;font-size:8px}.approved-milestone div small{display:block;font-size:7px;color:#6b7890}.approved-milestone em{font-size:7px;color:#ef6c14;font-style:normal;font-weight:700}.approved-fin-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.approved-fin-tiles>div{border:1px solid #e3e9f0;border-radius:7px;padding:10px;min-height:82px}.approved-fin-tiles i{width:26px;height:26px;border-radius:6px;background:#eaf8ef;color:#10a05b;display:flex;align-items:center;justify-content:center;font-style:normal;margin-bottom:8px}.approved-fin-tiles small{display:block;font-size:7px;color:#647188}.approved-fin-tiles strong{display:block;font-size:11px;margin-top:4px}.approved-receivable{margin-top:10px;border:1px solid #dfe8f7;border-radius:8px;background:#f9fbff;padding:10px;display:flex;align-items:center;justify-content:space-between}.approved-receivable small,.approved-receivable span{display:block;font-size:7px;color:#66758b}.approved-receivable strong{display:block;font-size:15px;margin:5px 0}.approved-mini-ring{width:58px;height:58px;border-radius:50%;background:conic-gradient(#3b82f6 calc(var(--pct)*1%),#e5ebf4 0);display:grid;place-items:center;position:relative}.approved-mini-ring:after{content:"";position:absolute;inset:7px;border-radius:50%;background:#fff}.approved-mini-ring b{position:relative;z-index:1;font-size:9px}.approved-attention{background:#fff;border:1px solid #e4eaf2;border-radius:10px;padding:12px 14px}.approved-attention h3{font-size:11px;margin:0 0 10px}.approved-attention-row{display:grid;grid-template-columns:repeat(4,1fr) 130px;gap:10px}.approved-attention-row button{border:1px solid #e5eaf1;background:#fff;border-radius:8px;min-height:58px;display:grid;grid-template-columns:32px 24px 1fr;align-items:center;text-align:left;padding:7px;cursor:pointer}.approved-attention-row i{width:28px;height:28px;border-radius:50%;background:#ffecef;color:#ea405a;display:flex;align-items:center;justify-content:center;font-style:normal}.approved-attention-row strong{font-size:14px}.approved-attention-row span{font-size:8px;font-weight:650}.approved-attention-row small{display:block;font-size:7px;color:#768398;font-weight:400}.approved-attention-row .view-alerts{grid-template-columns:1fr;text-align:center;color:#0a60d7;font-size:8px;font-weight:700}.kpi{background:#fff!important}.kpi:before,.kpi:after{display:none!important}.panel,.card{border-color:#e4eaf1!important;border-radius:10px!important;box-shadow:0 4px 15px rgba(15,39,70,.035)!important}
@media(max-width:1100px){.approved-kpis{grid-template-columns:repeat(3,1fr)}.approved-dash-grid-main{grid-template-columns:1fr 1fr}.approved-map-card{grid-column:1/3}.approved-dash-grid-lower{grid-template-columns:1fr 1fr}.approved-fin-card{grid-column:1/3}.approved-login-shell{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.approved-company-brand{padding:18px 22px}.approved-company-main{padding:0 18px 18px}.approved-company-main h1{font-size:22px}.approved-company-cards{grid-template-columns:1fr;gap:12px}.approved-company-card{min-height:156px;display:grid;grid-template-columns:70px 1fr;grid-template-rows:auto auto auto;text-align:left;padding:18px}.approved-company-building{grid-row:1/4;font-size:50px}.approved-company-features{grid-template-columns:repeat(3,1fr);padding:12px 4px;margin-top:14px}.approved-company-features>div{display:flex;flex-direction:column;align-items:center;text-align:center;padding:2px 5px}.approved-company-features small{display:none}.approved-login-shell{display:block}.approved-login-visual{height:52vh;min-height:360px;padding:16px 20px}.approved-login-copy{left:20px;top:100px}.approved-login-copy h1{font-size:22px}.approved-quote{display:none}.approved-login-panel{padding:0 14px 20px;display:block}.approved-login-box{margin:-82px auto 0;background:#fff;border-radius:22px 22px 0 0;padding:20px 18px}.approved-building-icon{display:none}.approved-change-company.top{top:16px;right:16px;background:rgba(4,25,52,.35);color:#fff}.approved-kpis{grid-template-columns:repeat(2,1fr)}.approved-dash-grid-main,.approved-dash-grid-lower{grid-template-columns:1fr}.approved-map-card,.approved-fin-card{grid-column:auto}.approved-map-body{grid-template-columns:1fr}.approved-map-locations{display:none}.approved-attention-row{grid-template-columns:1fr}.approved-search{display:none}}


/* =========================================================
   V90.4 — APPROVED UI TYPOGRAPHY + SIDEBAR REFINEMENT
   Layout remains unchanged; only proportions/readability.
   ========================================================= */
@media (min-width: 901px){
  .sidebar{
    width:264px;
    padding:14px 12px 12px;
  }
  .brand{
    padding:4px 8px 14px;
    gap:10px;
  }
  .brand-mark{
    width:38px;
    height:38px;
    font-size:17px;
  }
  .brand-name{
    font-size:15px;
    line-height:1.12;
  }
  .brand-sub{
    font-size:9px;
    letter-spacing:1.1px;
  }

  #nav{
    gap:2px;
    margin-top:2px;
  }
  .nav-group-title{
    font-size:9.5px;
    padding:10px 10px 4px;
    letter-spacing:1px;
  }
  .nav-item{
    gap:9px;
    padding:8px 10px;
    margin:2px 0;
    min-height:38px;
    border-radius:10px;
    font-size:12.5px;
    line-height:1.2;
  }
  .nav-item-solo{
    min-height:40px;
    padding:8px 10px !important;
    border-radius:11px !important;
  }
  .nav-icon,
  .nav-icon-badge{
    width:24px;
    min-width:24px;
    height:24px;
    font-size:11px;
  }
  .nav-item .nav-label{
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    padding-right:6px;
    line-height:1.15;
    font-weight:650;
  }
  .nav-group-header .nav-label{
    white-space:normal;
  }
  .nav-group-toggle,
  .nav-arrow,
  .nav-chevron{
    transform:scale(.88);
  }

  .reconcile-btn{
    margin:8px 0 6px;
    padding:9px 10px;
    font-size:11.5px;
  }
  .user-bar{
    padding-top:10px;
    gap:6px;
  }
  .user-name{
    font-size:11px;
    padding:0 5px;
  }
  .sidebar-action-btn{
    padding:8px 10px;
    font-size:11.5px;
    border-radius:9px;
  }

  /* Dashboard hierarchy */
  .approved-dash-head h1{
    font-size:24px !important;
    line-height:1.2;
    letter-spacing:-.02em;
  }
  .approved-dash-head p{
    font-size:12.5px !important;
  }
  .approved-period{
    font-size:11.5px !important;
  }
  .approved-kpi small{
    font-size:10.5px !important;
    line-height:1.25;
    letter-spacing:.01em;
  }
  .approved-kpi strong{
    font-size:22px !important;
    line-height:1.15;
  }
  .approved-kpi span{
    font-size:10.5px !important;
    line-height:1.3;
  }
  .approved-map-head h3,
  .approved-progress-card h3,
  .approved-funnel-card h3,
  .approved-card-title,
  .approved-dash-card h3{
    font-size:14px !important;
  }
  .approved-map-head p,
  .approved-map-card p,
  .approved-dash-card p{
    font-size:10.5px !important;
  }
  .approved-map-tabs button{
    font-size:9.5px !important;
  }
  .approved-loc-head,
  .approved-loc-row{
    font-size:10px !important;
  }
  .approved-dashboard table{
    font-size:10.5px !important;
  }
  .approved-dashboard th{
    font-size:9.5px !important;
    letter-spacing:.02em;
  }
  .approved-dashboard td{
    line-height:1.3;
  }
}

/* Keep mobile compact and readable without forcing desktop sidebar width. */
@media (max-width: 900px){
  .approved-dash-head h1{font-size:20px !important;}
  .approved-dash-head p{font-size:12px !important;}
  .approved-kpi small{font-size:10px !important;}
  .approved-kpi strong{font-size:20px !important;}
  .approved-kpi span{font-size:10px !important;}
}


/* =========================================================
   V90.5 — PROFESSIONAL PASSWORD VISIBILITY CONTROL
   Replaces platform emoji with consistent SVG icon.
   ========================================================= */
.eye-btn{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:32px;
  height:32px;
  min-width:32px;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:7px;
  background:transparent!important;
  color:#536782!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  cursor:pointer;
  opacity:1!important;
  box-shadow:none!important;
  vertical-align:middle;
}
.eye-btn:hover{
  background:#f3f6fa!important;
  color:#0b2b55!important;
}
.eye-btn:focus-visible{
  outline:2px solid #2f6fed!important;
  outline-offset:1px;
}
.password-eye-icon{
  width:18px;
  height:18px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.approved-input-wrap{
  position:relative;
}
.approved-input-wrap .eye-btn{
  position:absolute!important;
  right:8px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
}
.approved-input-wrap input[type="password"],
.approved-input-wrap input[type="text"]{
  padding-right:42px!important;
}
.password-wrap{
  position:relative;
}
.password-wrap input{
  padding-right:44px!important;
}


/* =========================================================
   V90.5 — PROFESSIONAL LOGIN ICONS + ALIGNMENT
   Removes emoji/glyph rendering from login controls.
   ========================================================= */
.ui-icon,
.field-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  color:currentColor;
  line-height:0;
}
.ui-icon svg{width:16px;height:16px;display:block;}
.field-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  color:#64748b;
  pointer-events:none;
  z-index:2;
}
.field-icon svg{width:18px;height:18px;display:block;}
.approved-input-wrap{
  position:relative;
  display:flex;
  align-items:center;
}
.approved-input-wrap input{
  padding-left:44px !important;
}
.password-wrap input{
  padding-right:48px !important;
}
.eye-btn{
  position:absolute !important;
  right:12px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  width:32px !important;
  height:32px !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  border-radius:8px !important;
  background:transparent !important;
  color:#475569 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:0 !important;
  font-size:0 !important;
  opacity:1 !important;
  z-index:4;
}
.eye-btn:hover{
  background:#f1f5f9 !important;
  color:#0f2b57 !important;
}
.eye-btn svg{
  width:19px;
  height:19px;
  display:block;
}
.eye-btn .eye-hide{display:none;}
.password-wrap.password-visible .eye-show{display:none;}
.password-wrap.password-visible .eye-hide{display:inline-flex;}

.approved-building-icon{
  width:62px !important;
  height:62px !important;
  border:1px solid #d9e2ef;
  border-radius:50%;
  display:flex !important;
  align-items:center;
  justify-content:center;
  color:#113b7a;
  background:#fff;
}
.approved-building-icon svg{
  width:34px;
  height:34px;
  display:block;
}
.approved-change-company{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:9px;
}
.approved-change-company.wide{
  justify-content:flex-start !important;
}
.approved-change-company.wide > span:last-child{
  margin-left:auto;
}
.approved-change-company .ui-icon svg{
  width:17px;height:17px;
}
.login-submit,
.login-install{
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.login-submit .arrow-icon{
  margin-left:auto;
}
.login-submit .arrow-icon svg{
  width:18px;height:18px;
}
.login-install .download-icon svg{
  width:17px;height:17px;
}
.approved-security-note{
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.approved-security-note .security-icon{
  color:#475569;
}
.approved-security-note .security-icon svg{
  width:21px;height:21px;
}

@media (max-width:900px){
  .approved-building-icon{
    width:54px !important;
    height:54px !important;
  }
  .approved-building-icon svg{width:29px;height:29px;}
  .field-icon{left:12px;}
  .approved-input-wrap input{padding-left:40px !important;}
  .eye-btn{right:8px !important;}
}


/* V90.5 approved left-panel benefit icons */
.approved-login-benefits{
  display:grid;
  gap:13px;
  margin-top:4px;
}
.approved-login-benefits > div{
  display:flex;
  align-items:center;
  gap:12px;
  color:#f8fafc;
  font-size:15px;
  line-height:1.25;
}
.approved-login-benefits > div > span{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#f5a800;
  flex:0 0 22px;
}
.approved-login-benefits svg{
  width:22px;
  height:22px;
  display:block;
}
.approved-login-benefits b{
  font-weight:500;
}
@media (max-width:900px){
  .approved-login-benefits{
    gap:9px;
  }
  .approved-login-benefits > div{
    font-size:12px;
    gap:9px;
  }
  .approved-login-benefits > div > span,
  .approved-login-benefits svg{
    width:18px;height:18px;
  }
}


/* V90.6 Adjustable professional sidebar */
@media (min-width:901px){
  .sidebar{width:var(--sidebar-user-width,292px)!important;min-width:236px;max-width:380px;padding:14px 12px 12px!important;transition:width .18s ease;}
  .sidebar-resizing,.sidebar-resizing *{cursor:col-resize!important;user-select:none!important;}
  .sidebar-resize-handle{position:absolute;right:-4px;top:0;bottom:0;width:8px;z-index:50;cursor:col-resize;background:transparent;}
  .sidebar-resize-handle::after{content:"";position:absolute;right:3px;top:96px;bottom:164px;width:2px;border-radius:2px;background:rgba(148,163,184,.35);}
  .sidebar-resize-handle:hover::after{width:3px;background:rgba(96,165,250,.75);}
  .sidebar-resize-toggle{position:absolute;right:10px;top:125px;width:28px;height:28px;border-radius:50%;border:1px solid rgba(255,255,255,.18);color:#dbeafe;background:rgba(30,64,175,.35);display:flex;align-items:center;justify-content:center;font-size:18px;line-height:1;cursor:pointer;z-index:55;box-shadow:0 5px 16px rgba(0,0,0,.18);}
  .sidebar-resize-toggle:hover{background:rgba(37,99,235,.65);color:#fff;}
  .brand{padding:4px 10px 14px!important;}
  .brand-name{font-size:15px!important;letter-spacing:.04em!important;white-space:normal;}
  .brand-sub{font-size:9px!important;}
  .nav-item,.nav-item-solo{font-size:13px!important;line-height:1.15!important;padding:8px 10px!important;min-height:39px!important;}
  .nav-item .nav-label{display:block;flex:1;min-width:0;padding-right:6px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.2!important;font-weight:650!important;max-width:none!important;}
  .nav-group-header .nav-label{white-space:normal!important;}
  .app.sidebar-collapsed .sidebar{width:76px!important;min-width:76px!important;max-width:76px!important;padding-left:10px!important;padding-right:10px!important;}
  .app.sidebar-collapsed .sidebar .brand{justify-content:center;padding-left:0!important;padding-right:0!important;}
  .app.sidebar-collapsed .sidebar .brand-name,
  .app.sidebar-collapsed .sidebar .brand-sub,
  .app.sidebar-collapsed .sidebar .nav-label,
  .app.sidebar-collapsed .sidebar .nav-group-title,
  .app.sidebar-collapsed .sidebar .nav-group-toggle,
  .app.sidebar-collapsed .sidebar .nav-arrow,
  .app.sidebar-collapsed .sidebar .nav-chevron,
  .app.sidebar-collapsed .sidebar .user-name,
  .app.sidebar-collapsed .sidebar .reconcile-btn,
  .app.sidebar-collapsed .sidebar .sidebar-action-btn{display:none!important;}
  .app.sidebar-collapsed .sidebar .nav-item,.app.sidebar-collapsed .sidebar .nav-item-solo{justify-content:center!important;padding:8px!important;gap:0!important;}
  .app.sidebar-collapsed .sidebar .nav-icon-badge,.app.sidebar-collapsed .sidebar .nav-icon{margin:0!important;}
  .app.sidebar-collapsed .sidebar-resize-toggle{right:24px;}
  .app.sidebar-collapsed .sidebar-resize-handle::after{display:none;}
}
@media (max-width:900px){.sidebar-resize-handle,.sidebar-resize-toggle{display:none!important;}}



/* V90.6P — professional icon system and interactive project-state map */
.erp-nav-svg{width:18px;height:18px;display:block;color:currentColor}
.nav-group-icon,.nav-icon-badge{
  background:rgba(255,255,255,.055)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  box-shadow:none!important;color:#dbeafe!important;
}
.nav-group-icon{width:30px;height:30px;border-radius:8px!important}
.nav-icon-badge{width:26px;height:26px;border-radius:7px!important}
.nav-group-toggle{display:none!important}
.nav-group-head{padding-right:12px!important;cursor:pointer}
.sidebar-resize-toggle{display:none!important}
.sidebar-resize-handle::after{top:92px!important;bottom:150px!important;background:rgba(148,163,184,.22)!important}
.sidebar-resize-handle:hover::after{background:rgba(96,165,250,.65)!important}
.approved-kpi i svg{width:18px;height:18px}
.approved-period{display:inline-flex!important;align-items:center;gap:6px}
.approved-period svg{width:14px;height:14px}
.approved-state-layer .india-state{fill:#173f77;stroke:#7fa4d8;stroke-width:.65;transition:fill .16s ease,opacity .16s ease,stroke-width .16s ease;cursor:pointer;outline:none}
.approved-state-layer .india-state.state-none{fill:#173557}
.approved-state-layer .india-state.state-active{fill:#2b5f93}
.approved-state-layer .india-state.state-progress{fill:#2f80c7}
.approved-state-layer .india-state.state-completed{fill:#278765}
.approved-state-layer .india-state:hover,.approved-state-layer .india-state:focus,.approved-state-layer .india-state.selected{stroke:#fff;stroke-width:1.7;filter:brightness(1.15)}
.approved-state-layer .india-state.map-filter-muted{opacity:.18}
.approved-state-layer .india-state.map-filter-match{opacity:1;stroke:#dbeafe;stroke-width:1.2}
.india-map-tooltip{position:absolute;z-index:12;width:184px;padding:10px 11px;border:1px solid rgba(148,163,184,.32);border-radius:8px;background:rgba(7,27,58,.97);box-shadow:0 10px 26px rgba(0,0,0,.28);pointer-events:none;color:#fff;font-size:8px}
.india-map-tooltip[hidden]{display:none!important}
.india-map-tooltip strong{display:block;font-size:11px;margin-bottom:7px;color:#fff}
.india-map-tooltip div{display:flex;justify-content:space-between;gap:8px;padding:2px 0;color:#cbd5e1}
.india-map-tooltip div b{color:#fff;font-weight:700}
.approved-map-legend.professional{gap:5px!important}
.approved-map-legend.professional i{border-radius:2px!important;width:8px!important;height:8px!important}
.approved-map-legend .map-progress{background:#2f80c7}
.approved-map-legend .map-completed{background:#278765}
.approved-map-legend .map-active{background:#2b5f93}
.approved-map-legend .map-none{background:#173557;border:1px solid #6684a8}


/* V90.6P2 — professional sidebar subtabs */
.nav-group-body{
  position:relative;
  margin:2px 0 6px 14px!important;
  padding:3px 0 5px 13px!important;
}
.nav-group-body::before{
  content:"";
  position:absolute;left:0;top:4px;bottom:7px;width:1px;
  background:rgba(148,163,184,.24);
}
.nav-group-body .nav-item{
  min-height:36px!important;
  padding:6px 9px!important;
  border-radius:7px!important;
  color:#cbd5e1!important;
  background:transparent!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
  transform:none!important;
}
.nav-group-body .nav-item .nav-icon-badge{
  width:23px!important;height:23px!important;border-radius:6px!important;
  background:rgba(255,255,255,.035)!important;
  border-color:rgba(148,163,184,.16)!important;
  color:#a9bdd7!important;
}
.nav-group-body .nav-item .erp-nav-svg{width:14px!important;height:14px!important}
.nav-group-body .nav-item .nav-label{font-size:11.5px!important;font-weight:600!important;letter-spacing:.005em!important}
.nav-group-body .nav-item:hover{
  background:rgba(255,255,255,.055)!important;
  border-color:rgba(148,163,184,.12)!important;
  color:#fff!important;
}
.nav-group-body .nav-item.active{
  background:rgba(59,130,246,.14)!important;
  border-color:rgba(96,165,250,.32)!important;
  color:#fff!important;
}
.nav-group-body .nav-item.active::after{display:none!important}
.nav-group-body .nav-item.active .nav-icon-badge{
  color:#dbeafe!important;
  background:rgba(59,130,246,.16)!important;
  border-color:rgba(96,165,250,.35)!important;
}

/* V90.6P2 — professional project pins */
.approved-project-pins .project-pin{cursor:pointer;outline:none;transition:opacity .15s ease,transform .15s ease}
.approved-project-pins .pin-marker{stroke:#fff;stroke-width:1.2;filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.approved-project-pins .pin-core{fill:rgba(255,255,255,.95)}
.approved-project-pins .pin-count{font-size:5.5px;font-weight:800;fill:#0f172a;pointer-events:none}
.approved-project-pins .pin-progress .pin-marker{fill:#f59e0b}
.approved-project-pins .pin-completed .pin-marker{fill:#22a06b}
.approved-project-pins .pin-active .pin-marker{fill:#3b82f6}
.approved-project-pins .project-pin:hover .pin-marker,
.approved-project-pins .project-pin:focus .pin-marker{stroke-width:2;filter:drop-shadow(0 3px 5px rgba(0,0,0,.5)) brightness(1.08)}
.approved-project-pins .pin-hidden{display:none}


/* V90.6P3 — GLOBAL RESPONSIVE ERP + SIDEBAR TYPE SCALING */

/* The sidebar itself becomes the sizing container.
   As the user drags it narrower, labels/icons scale down automatically. */
@media (min-width:901px){
  #sidebar.sidebar{
    container-type:inline-size;
    container-name:ardent-sidebar;
  }

  /* Keep the main workspace flexible regardless of sidebar width. */
  .app > .main{
    min-width:0!important;
    width:auto!important;
    flex:1 1 auto!important;
  }
  .main > .content,
  #content{
    min-width:0!important;
  }
}

/* Default sidebar typography at the normal 292px width */
@container ardent-sidebar (min-width: 276px){
  .brand-name{font-size:15px!important}
  .brand-sub{font-size:9px!important}
  .nav-group-label,.nav-item .nav-label{font-size:12.5px!important}
  .nav-group-icon{width:30px!important;height:30px!important}
  .nav-icon-badge{width:26px!important;height:26px!important}
  .erp-nav-svg{width:17px!important;height:17px!important}
  .nav-group-body .nav-item .nav-label{font-size:11.5px!important}
  .reconcile-btn,.sidebar-action-btn,.user-name{font-size:11px!important}
}

/* Medium sidebar */
@container ardent-sidebar (max-width: 275px){
  .brand{gap:9px!important;padding-left:7px!important;padding-right:7px!important}
  .brand-mark{width:36px!important;height:36px!important;font-size:16px!important}
  .brand-name{font-size:13.2px!important;letter-spacing:.025em!important}
  .brand-sub{font-size:8px!important;letter-spacing:.8px!important}
  .nav-group,.nav-item-solo{margin-left:3px!important;margin-right:3px!important}
  .nav-group-head,.nav-item-solo{padding-left:7px!important;padding-right:7px!important;gap:7px!important}
  .nav-group-label,.nav-item .nav-label{font-size:11.3px!important;line-height:1.15!important}
  .nav-group-icon{width:27px!important;height:27px!important}
  .nav-icon-badge{width:23px!important;height:23px!important}
  .erp-nav-svg{width:15px!important;height:15px!important}
  .nav-group-body{margin-left:8px!important;padding-left:9px!important}
  .nav-group-body .nav-item{padding-left:6px!important;padding-right:6px!important;min-height:32px!important}
  .nav-group-body .nav-item .nav-label{font-size:10.4px!important}
  .reconcile-btn,.sidebar-action-btn,.user-name{font-size:10px!important}
}

/* Narrowest allowed V90.6 sidebar (236–249px) */
@container ardent-sidebar (max-width: 249px){
  .brand{gap:7px!important}
  .brand-mark{width:32px!important;height:32px!important}
  .brand-name{font-size:11.8px!important;letter-spacing:.015em!important}
  .brand-sub{font-size:7.2px!important;letter-spacing:.55px!important}
  .nav-group-head,.nav-item-solo{min-height:37px!important;padding:5px 5px!important;gap:6px!important}
  .nav-group-label,.nav-item .nav-label{font-size:10.2px!important;line-height:1.12!important}
  .nav-group-icon{width:24px!important;height:24px!important;border-radius:7px!important}
  .nav-icon-badge{width:21px!important;height:21px!important}
  .erp-nav-svg{width:14px!important;height:14px!important}
  .nav-group-body{margin-left:5px!important;padding-left:7px!important}
  .nav-group-body .nav-item{min-height:29px!important;padding:4px 4px!important;gap:5px!important}
  .nav-group-body .nav-item .nav-label{font-size:9.4px!important}
  .reconcile-btn,.sidebar-action-btn,.user-name{font-size:9.3px!important}
}

/* Keep full words visible. Only shrink text; don't truncate it. */
@container ardent-sidebar (max-width: 300px){
  .nav-group-label,
  .nav-item .nav-label,
  .brand-name{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
  }
}

/* -------- ERP-wide workspace sizing -------- */
#content > *,
.content > *{
  max-width:100%;
  min-width:0;
}

.panel,.card,.site-form-card,.module-card,.approved-card{
  min-width:0!important;
  max-width:100%!important;
}

/* Page toolbars and filter rows wrap cleanly instead of overflowing. */
.panel-head,
.panel-header,
.page-head,
.page-header,
.toolbar,
.filter-bar,
.filters,
.table-toolbar,
.list-toolbar,
.approved-dash-head{
  min-width:0;
}

@media (max-width:1350px){
  .toolbar,.filter-bar,.filters,.table-toolbar,.list-toolbar{
    flex-wrap:wrap!important;
    gap:8px!important;
  }

  .kpi-grid,.stats-grid,.summary-grid{
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important;
  }

  .approved-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .approved-dash-grid-main{
    grid-template-columns:minmax(0,1.7fr) minmax(280px,.9fr)!important;
  }
  .approved-dash-grid-main > :nth-child(3){
    grid-column:1/-1;
  }
  .approved-dash-grid-lower{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .approved-dash-grid-lower > :last-child{
    grid-column:1/-1;
  }
}

/* Tables remain readable and scroll inside their own area when necessary. */
.table-wrap,
.table-scroll,
.table-responsive,
.panel-body,
.module-table-wrap{
  max-width:100%;
}

.table-wrap,
.table-scroll,
.table-responsive,
.module-table-wrap{
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
}

.data-table,
.approved-table{
  width:100%!important;
}

.data-table th,
.data-table td{
  vertical-align:middle!important;
}

/* Compact large registers on normal desktop widths without breaking columns. */
@media (min-width:901px) and (max-width:1500px){
  .data-table{
    font-size:11px!important;
  }
  .data-table th{
    font-size:10px!important;
    padding:8px 7px!important;
  }
  .data-table td{
    padding:8px 7px!important;
  }
  .btn.small,
  .data-table .btn{
    font-size:10px!important;
    min-height:30px;
  }
}

/* Forms automatically move from dense desktop layouts to usable columns. */
@media (max-width:1250px){
  .form-grid.cols-4,
  .form-grid.cols-5,
  .site-form-grid.cols-4,
  .site-form-grid.cols-5{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:1050px){
  .approved-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .approved-dash-grid-main,
  .approved-dash-grid-lower{
    grid-template-columns:1fr!important;
  }
  .approved-dash-grid-main > *,
  .approved-dash-grid-lower > *{
    grid-column:auto!important;
  }
  .approved-map-body{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .approved-map-locations{
    padding-top:8px!important;
  }
}

@media (max-width:760px){
  .content{padding:10px!important}
  .panel,.card,.site-form-card{border-radius:8px!important}
  .approved-kpis{grid-template-columns:1fr!important}
  .approved-dash-head{flex-direction:column!important;gap:10px!important}
  .approved-map-head{flex-direction:column!important}
  .approved-map-tabs{width:100%;overflow-x:auto}
  .approved-map-tabs button{flex:1 0 auto}
  .form-grid,
  .form-grid.cols-2,
  .form-grid.cols-3,
  .form-grid.cols-4,
  .form-grid.cols-5,
  .site-form-grid{
    grid-template-columns:1fr!important;
  }
  .approved-attention-row{grid-template-columns:1fr!important}
}

/* Tender and other register action buttons: professional, consistent sizing. */
.data-table td:last-child .btn,
.data-table .actions .btn,
.action-stack .btn{
  border-radius:7px!important;
  min-height:29px!important;
  line-height:1.1!important;
}

/* Keep text readable when browser/window width is reduced. */
@media (max-width:1180px) and (min-width:901px){
  #pageTitle{font-size:16px!important}
  .content{padding-left:12px!important;padding-right:12px!important}
  .panel-title,.card-title{font-size:13px!important}
}


/* V90.6P4 — WORKING INDIA MAP STATUS FILTERS */
.approved-map-tabs{
  gap:3px;
}
.approved-map-tabs button{
  position:relative;
  min-width:48px;
  border:1px solid transparent!important;
  transition:background .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease!important;
}
.approved-map-tabs button:hover{
  background:rgba(255,255,255,.08)!important;
}
.approved-map-tabs button.active,
.approved-map-tabs button[aria-pressed="true"]{
  background:#0b2142!important;
  border-color:#3fbf7f!important;
  color:#fff!important;
  box-shadow:0 0 0 1px rgba(63,191,127,.18) inset!important;
}
.approved-map-tabs button.active::after{
  content:"";
  position:absolute;
  left:28%;right:28%;bottom:2px;height:2px;
  border-radius:2px;
  background:#45d090;
}
.approved-state-layer .india-state.map-filter-muted{
  opacity:.16!important;
  filter:saturate(.45)!important;
}
.approved-state-layer .india-state.map-filter-match{
  opacity:1!important;
  stroke:#dbeafe!important;
  stroke-width:1.45!important;
  filter:brightness(1.1)!important;
}
.approved-project-pins .pin-hidden{
  display:none!important;
}


/* V90.6P5 — GEOGRAPHICALLY CORRECT INDIA MAP */
.approved-india-map svg{
  width:100%!important;
  height:300px!important;
  overflow:visible;
}
.approved-state-layer .india-state{
  vector-effect:non-scaling-stroke;
  shape-rendering:geometricPrecision;
}
.approved-project-pins .project-pin{
  vector-effect:non-scaling-stroke;
}
.approved-project-pins .pin-marker{
  vector-effect:non-scaling-stroke;
}


/* V90.6P6 — LIGHT/DARK MODE + STRICT MAP FILTERS */

/* Theme mode control */
.theme-mode-btn{
  min-height:34px;
  padding:0 10px;
  border:1px solid #d9e2ef;
  border-radius:9px;
  background:#fff;
  color:#334155;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:inherit;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.theme-mode-btn:hover{background:#f8fafc;border-color:#cbd5e1}
.theme-mode-icon{
  width:18px;height:18px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:12px;
}
.theme-mode-label{line-height:1}

/* Empty map-filter state */
.approved-map-filter-empty{
  position:absolute;
  z-index:8;
  left:50%;
  top:48%;
  transform:translate(-50%,-50%);
  min-width:190px;
  max-width:260px;
  padding:12px 14px;
  border-radius:9px;
  border:1px solid rgba(148,163,184,.28);
  background:rgba(7,27,58,.92);
  color:#fff;
  display:none;
  flex-direction:column;
  gap:4px;
  text-align:center;
  pointer-events:none;
  box-shadow:0 8px 24px rgba(0,0,0,.22);
}
.approved-map-filter-empty strong{font-size:10px}
.approved-map-filter-empty span{font-size:8px;color:#cbd5e1}
.approved-state-layer .india-state.map-filter-empty{
  fill:#173557!important;
  opacity:.28!important;
  filter:saturate(.25)!important;
}
.approved-state-layer .india-state.map-filter-match{
  opacity:1!important;
  filter:brightness(1.12)!important;
}

/* ---------------- DARK MODE ---------------- */
html[data-theme="dark"],
html[data-theme="dark"] body{
  color-scheme:dark;
  --paper:#071426;
  --card:#0d1f36;
  --text:#e8eef7;
  --text-dim:#9fb0c7;
  --line:#243951;
  background:#071426!important;
  color:#e8eef7!important;
}

html[data-theme="dark"] body{
  background:
    radial-gradient(1000px 520px at 10% -10%, rgba(37,99,235,.10), transparent 50%),
    #071426!important;
}

html[data-theme="dark"] .main,
html[data-theme="dark"] .content,
html[data-theme="dark"] #content{
  background:#08182b!important;
  color:#e8eef7!important;
}

html[data-theme="dark"] .topbar{
  background:#0a192d!important;
  border-color:#243951!important;
  color:#f8fafc!important;
}
html[data-theme="dark"] #pageTitle{color:#f8fafc!important}

html[data-theme="dark"] .approved-search,
html[data-theme="dark"] .approved-search input,
html[data-theme="dark"] .company-switch,
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .theme-mode-btn,
html[data-theme="dark"] .notif-bell{
  background:#0d2038!important;
  border-color:#28415f!important;
  color:#dbe7f5!important;
}
html[data-theme="dark"] .approved-search input::placeholder{color:#7f93ad!important}

html[data-theme="dark"] .approved-dashboard,
html[data-theme="dark"] .approved-dashboard h1,
html[data-theme="dark"] .approved-dashboard h2,
html[data-theme="dark"] .approved-dashboard h3,
html[data-theme="dark"] .approved-dashboard h4{
  color:#eef5ff!important;
}
html[data-theme="dark"] .approved-dashboard p,
html[data-theme="dark"] .approved-dashboard small,
html[data-theme="dark"] .approved-dashboard span{
  color:#9fb0c7;
}

html[data-theme="dark"] .approved-kpi,
html[data-theme="dark"] .approved-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .site-form-card,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .form-modal,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .kpi-card{
  background:#0d2038!important;
  border-color:#253d59!important;
  color:#e8eef7!important;
  box-shadow:0 4px 18px rgba(0,0,0,.16)!important;
}

html[data-theme="dark"] .approved-kpi strong,
html[data-theme="dark"] .approved-card strong,
html[data-theme="dark"] .panel strong,
html[data-theme="dark"] .card strong{
  color:#fff!important;
}

html[data-theme="dark"] .approved-period{
  background:#0d2038!important;
  border-color:#28415f!important;
  color:#e8eef7!important;
}

html[data-theme="dark"] .approved-progress-wrap,
html[data-theme="dark"] .approved-highlight,
html[data-theme="dark"] .approved-conversion{
  background:#0b1b30!important;
  border-color:#253d59!important;
}

html[data-theme="dark"] .approved-donut:after{background:#0d2038!important}

html[data-theme="dark"] .approved-table,
html[data-theme="dark"] .data-table{
  background:#0d2038!important;
  color:#dce7f5!important;
}
html[data-theme="dark"] .approved-table thead,
html[data-theme="dark"] .data-table thead,
html[data-theme="dark"] .approved-table th,
html[data-theme="dark"] .data-table th{
  background:#102943!important;
  color:#b8cae0!important;
  border-color:#28415f!important;
}
html[data-theme="dark"] .approved-table td,
html[data-theme="dark"] .data-table td{
  color:#dce7f5!important;
  border-color:#203850!important;
  background:#0d2038!important;
}
html[data-theme="dark"] .approved-table tbody tr:hover td,
html[data-theme="dark"] .data-table tbody tr:hover td{
  background:#112a46!important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:#091a2e!important;
  color:#e8eef7!important;
  border-color:#2b4664!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{
  color:#7489a5!important;
}
html[data-theme="dark"] option{
  background:#0d2038;
  color:#e8eef7;
}

html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .field label,
html[data-theme="dark"] label{
  color:#b9c9dd;
}

html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .panel-header,
html[data-theme="dark"] .page-head,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .table-toolbar{
  background:#0d2038!important;
  border-color:#253d59!important;
  color:#e8eef7!important;
}

html[data-theme="dark"] .tabs,
html[data-theme="dark"] .tab-bar,
html[data-theme="dark"] .subtabs{
  border-color:#28415f!important;
}
html[data-theme="dark"] .tab,
html[data-theme="dark"] .tab-btn{
  color:#aabbd0!important;
}
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .tab-btn.active{
  color:#fff!important;
  background:#173b64!important;
}

html[data-theme="dark"] .pagination button,
html[data-theme="dark"] .pager button{
  background:#0d2038!important;
  border-color:#28415f!important;
  color:#dce7f5!important;
}

html[data-theme="dark"] .empty,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .help,
html[data-theme="dark"] .site-form-help{
  color:#8fa4bd!important;
}

html[data-theme="dark"] .approved-map-locations,
html[data-theme="dark"] .approved-map-locations h4{
  color:#eaf2fc!important;
}

/* Keep project map itself navy in both modes */
html[data-theme="dark"] .approved-map-card{
  background:#071d37!important;
  border-color:#24496d!important;
}

/* Light mode stays the existing approved V90.6 look. */
html[data-theme="light"] .theme-mode-btn{
  background:#fff;
  color:#334155;
}

/* Mobile */
@media (max-width:900px){
  .theme-mode-label{display:none}
  .theme-mode-btn{width:36px;padding:0;justify-content:center}
}


/* V90.6P7 — CHROME 100% TYPOGRAPHY + DARK READABILITY + FUNNEL SHORTCUTS */

/* Base typography tuned for Chrome 100% desktop */
html{
  font-size:14px!important;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  font-size:14px!important;
  line-height:1.42!important;
}
button,input,select,textarea{
  font-family:var(--sans)!important;
}
button{font-size:12px}
input,select,textarea{font-size:13px!important}
small{font-size:11px}

/* Page titles / headings */
#pageTitle{font-size:17px!important;font-weight:800!important;letter-spacing:-.01em}
.approved-dash-head h1{font-size:25px!important;line-height:1.15!important}
.approved-dash-head p{font-size:12px!important}
h1{font-size:24px}
h2{font-size:19px}
h3{font-size:14px}
h4{font-size:12px}

/* Cards / panels */
.panel,.card,.approved-card,.approved-kpi,.site-form-card,.module-card{
  border-width:1px!important;
  border-style:solid!important;
}
.panel-head,.panel-header,.page-head,.page-header{
  min-height:44px!important;
  padding:10px 12px!important;
}
.panel-title,.card-title,.approved-card h3{
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.25!important;
}

/* Register/table typography */
.data-table,.approved-table{
  font-size:11.5px!important;
  line-height:1.35!important;
}
.data-table th,.approved-table th{
  font-size:10.5px!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
  white-space:nowrap;
}
.data-table td,.approved-table td{
  font-size:11.5px!important;
}
.data-table td .btn,
.approved-table td .btn{
  font-size:10.5px!important;
}

/* Filters / field labels */
label,.form-group label,.field label{
  font-size:11.5px!important;
  font-weight:650;
}
.toolbar,.filter-bar,.filters,.table-toolbar{
  font-size:11.5px!important;
}

/* Sidebar tuned for full readability at Chrome 100% */
.sidebar .nav-group-label,
.sidebar .nav-item .nav-label{
  font-weight:650!important;
}
@media (min-width:901px){
  .sidebar{
    font-size:12px!important;
  }
  .nav-group-label{font-size:12px!important}
  .nav-item .nav-label{font-size:11.5px!important}
  .nav-group-body .nav-item .nav-label{font-size:10.8px!important}
  .user-name,.reconcile-btn,.sidebar-action-btn{font-size:10.5px!important}
}

/* Funnel shortcuts */
.approved-funnel-shortcuts{
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid #e5edf6;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:5px;
}
.approved-funnel-shortcuts button{
  border:1px solid #dbe5f0;
  background:#fff;
  border-radius:8px;
  min-height:52px;
  padding:5px 4px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  color:#334155;
  cursor:pointer;
}
.approved-funnel-shortcuts button:hover{
  border-color:#93c5fd;
  background:#f8fbff;
  color:#0f3d78;
}
.approved-funnel-shortcuts button span{
  width:22px;height:22px;
  display:flex;align-items:center;justify-content:center;
  color:#2563eb;
}
.approved-funnel-shortcuts button svg{width:16px;height:16px}
.approved-funnel-shortcuts button small{
  font-size:7.5px!important;
  line-height:1.1;
  text-align:center;
  color:inherit!important;
}

/* Stronger dark-mode contrast everywhere */
html[data-theme="dark"] body,
html[data-theme="dark"] .main,
html[data-theme="dark"] .content,
html[data-theme="dark"] #content{
  color:#edf4ff!important;
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .approved-card,
html[data-theme="dark"] .approved-kpi,
html[data-theme="dark"] .site-form-card,
html[data-theme="dark"] .module-card{
  border-color:#284461!important;
}
html[data-theme="dark"] .panel *,
html[data-theme="dark"] .card *,
html[data-theme="dark"] .site-form-card *,
html[data-theme="dark"] .module-card *{
  color:inherit;
}
html[data-theme="dark"] .data-table tbody tr:nth-child(odd) td{
  background:#0c2037!important;
  color:#edf4ff!important;
}
html[data-theme="dark"] .data-table tbody tr:nth-child(even) td{
  background:#102842!important;
  color:#edf4ff!important;
}
html[data-theme="dark"] .data-table tbody tr:hover td{
  background:#163454!important;
}
html[data-theme="dark"] .data-table a,
html[data-theme="dark"] .approved-table a{
  color:#74b7ff!important;
}
html[data-theme="dark"] .data-table .muted,
html[data-theme="dark"] .approved-table .muted{
  color:#b5c6da!important;
}
html[data-theme="dark"] .badge,
html[data-theme="dark"] .status-badge{
  color:#f8fbff!important;
}
html[data-theme="dark"] .theme-mode-btn{
  background:#132a45!important;
  border-color:#3a5574!important;
  color:#ffffff!important;
}
html[data-theme="dark"] .theme-mode-btn .theme-mode-label,
html[data-theme="dark"] .theme-mode-btn .theme-mode-icon{
  color:#ffffff!important;
}
html[data-theme="dark"] .approved-funnel-shortcuts{
  border-color:#284461!important;
}
html[data-theme="dark"] .approved-funnel-shortcuts button{
  background:#0c2037!important;
  border-color:#2c4866!important;
  color:#dfeafe!important;
}
html[data-theme="dark"] .approved-funnel-shortcuts button:hover{
  background:#163454!important;
  border-color:#5a8bc0!important;
  color:#fff!important;
}
html[data-theme="dark"] .approved-funnel-shortcuts button span{
  color:#6fb3ff!important;
}

/* Tender / register dark-mode action column and row readability */
html[data-theme="dark"] .data-table td:last-child,
html[data-theme="dark"] .data-table th:last-child{
  background:inherit!important;
}
html[data-theme="dark"] .data-table .btn,
html[data-theme="dark"] .action-stack .btn{
  background:#132a45!important;
  color:#f8fbff!important;
  border-color:#45617f!important;
}
html[data-theme="dark"] .data-table .btn:hover,
html[data-theme="dark"] .action-stack .btn:hover{
  background:#1c3a5c!important;
}

/* Light mode outlines standardized */
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .approved-card,
html[data-theme="light"] .approved-kpi,
html[data-theme="light"] .site-form-card,
html[data-theme="light"] .module-card{
  border-color:#dce5ef!important;
}

/* Smaller screens */
@media (max-width:1350px){
  html{font-size:13px!important}
  .approved-dash-head h1{font-size:22px!important}
  .data-table,.approved-table{font-size:11px!important}
}
@media (max-width:1050px){
  .approved-funnel-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  html{font-size:12.5px!important}
  .approved-funnel-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* V90.6P8 — PROFESSIONAL DARK ERP / LEADS */
html[data-theme="dark"]{
  --dm-bg:#071421;
  --dm-surface:#0b1d30;
  --dm-surface-2:#0f253c;
  --dm-surface-3:#132c47;
  --dm-border:#203a55;
  --dm-border-strong:#31516f;
  --dm-text:#eef5fc;
  --dm-muted:#9db1c7;
  --dm-purple:#8b5cf6;
  --dm-blue:#3b82f6;
  --dm-green:#22c55e;
  --dm-amber:#f59e0b;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .main,
html[data-theme="dark"] #content,
html[data-theme="dark"] .content{
  background:var(--dm-bg)!important;
  color:var(--dm-text)!important;
}

/* Header */
html[data-theme="dark"] .topbar{
  background:#08192b!important;
  border-bottom:1px solid var(--dm-border)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.02)!important;
}
html[data-theme="dark"] #pageTitle{color:#fff!important;font-size:18px!important}
html[data-theme="dark"] .approved-search,
html[data-theme="dark"] .company-switch,
html[data-theme="dark"] .theme-mode-btn,
html[data-theme="dark"] .notif-bell,
html[data-theme="dark"] .btn.ghost{
  background:#0d2136!important;
  border:1px solid #29445f!important;
  color:#eaf3fd!important;
}
html[data-theme="dark"] .approved-search input{
  background:transparent!important;color:#eaf3fd!important;
}

/* Period and advanced filter bars */
html[data-theme="dark"] #content > div > .filter-bar,
html[data-theme="dark"] #content > div > .filters,
html[data-theme="dark"] #content > div > .toolbar,
html[data-theme="dark"] .advanced-filter-bar,
html[data-theme="dark"] .period-bar{
  background:linear-gradient(180deg,#0e2238,#0b1d30)!important;
  border:1px solid var(--dm-border)!important;
  border-radius:12px!important;
  box-shadow:0 8px 24px rgba(0,0,0,.12)!important;
}
html[data-theme="dark"] .period-bar,
html[data-theme="dark"] .advanced-filter-bar{
  padding:12px 14px!important;
}
html[data-theme="dark"] .period-bar input,
html[data-theme="dark"] .period-bar select,
html[data-theme="dark"] .advanced-filter-bar input,
html[data-theme="dark"] .advanced-filter-bar select{
  min-height:36px!important;
  background:#08192b!important;
  color:#f2f7fd!important;
  border:1px solid #2d4966!important;
  border-radius:7px!important;
}
html[data-theme="dark"] .period-bar label,
html[data-theme="dark"] .advanced-filter-bar label{
  color:#aebfd2!important;
}

/* Lead KPI strip */
.lead-kpi-strip{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
}
.lead-kpi{
  min-width:0;
  min-height:92px;
  border:1px solid #dce5ef;
  border-radius:12px;
  background:#fff;
  padding:12px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.lead-kpi > i{
  width:38px;height:38px;flex:0 0 38px;
  border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  background:#eef4ff;color:#2563eb;
}
.lead-kpi > i svg{width:19px;height:19px}
.lead-kpi div{min-width:0}
.lead-kpi small{display:block;font-size:10px!important;color:#64748b}
.lead-kpi strong{display:block;font-size:20px;line-height:1.15;margin:3px 0;color:#0f172a}
.lead-kpi span{display:block;font-size:9.5px;color:#64748b;white-space:normal}
.lead-kpi.k-won > i{background:#e8f8ef;color:#159455}
.lead-kpi.k-lost > i{background:#fff0f2;color:#e11d48}
.lead-kpi.k-rate > i{background:#e8f8fb;color:#0891b2}
.lead-kpi.k-value > i{background:#f5edff;color:#7c3aed}

html[data-theme="dark"] .lead-kpi{
  background:linear-gradient(145deg,#0d2136,#0b1c2e)!important;
  border-color:#243f5b!important;
  box-shadow:0 8px 20px rgba(0,0,0,.14)!important;
}
html[data-theme="dark"] .lead-kpi > i{
  background:rgba(59,130,246,.16)!important;color:#68a6ff!important;
  border:1px solid rgba(96,165,250,.14);
}
html[data-theme="dark"] .lead-kpi.k-won > i{background:rgba(34,197,94,.15)!important;color:#4ade80!important}
html[data-theme="dark"] .lead-kpi.k-lost > i{background:rgba(244,63,94,.15)!important;color:#fb7185!important}
html[data-theme="dark"] .lead-kpi.k-rate > i{background:rgba(6,182,212,.15)!important;color:#22d3ee!important}
html[data-theme="dark"] .lead-kpi.k-value > i{background:rgba(139,92,246,.16)!important;color:#a78bfa!important}
html[data-theme="dark"] .lead-kpi small,
html[data-theme="dark"] .lead-kpi span{color:#93a8bf!important}
html[data-theme="dark"] .lead-kpi strong{color:#fff!important}

/* Main management panels */
html[data-theme="dark"] .lead-management-panel,
html[data-theme="dark"] .panel{
  background:var(--dm-surface)!important;
  border-color:var(--dm-border)!important;
  border-radius:12px!important;
  overflow:hidden;
}
html[data-theme="dark"] .lead-management-panel .panel-head,
html[data-theme="dark"] .lead-management-panel .panel-header{
  background:linear-gradient(90deg,rgba(139,92,246,.08),transparent 50%)!important;
  border-bottom:1px solid var(--dm-border)!important;
}
html[data-theme="dark"] .lead-management-panel .panel-title{
  color:#b995ff!important;
  text-transform:uppercase;
  letter-spacing:.03em;
}

/* Tables: no pale/grey unreadable rows */
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .approved-table{
  border-collapse:separate!important;
  border-spacing:0!important;
}
html[data-theme="dark"] .data-table thead th,
html[data-theme="dark"] .approved-table thead th{
  background:#122a43!important;
  color:#b9c9da!important;
  border-bottom:1px solid #2b4865!important;
  padding:10px 9px!important;
}
html[data-theme="dark"] .data-table tbody td,
html[data-theme="dark"] .approved-table tbody td{
  background:#0b1d30!important;
  color:#e7eff8!important;
  border-bottom:1px solid rgba(56,83,110,.46)!important;
  padding:11px 9px!important;
}
html[data-theme="dark"] .data-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .approved-table tbody tr:nth-child(even) td{
  background:#0e2339!important;
}
html[data-theme="dark"] .data-table tbody tr:hover td,
html[data-theme="dark"] .approved-table tbody tr:hover td{
  background:#15314e!important;
}
html[data-theme="dark"] .data-table tbody td:first-child{
  color:#b8c7d8!important;
}
html[data-theme="dark"] .data-table a,
html[data-theme="dark"] .approved-table a{
  color:#9b7cff!important;font-weight:700;
}

/* Status badges */
html[data-theme="dark"] .stamp{
  border:0!important;
  font-weight:800!important;
  font-size:9.5px!important;
  padding:4px 9px!important;
  border-radius:999px!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .stamp.green,
html[data-theme="dark"] .stamp.success,
html[data-theme="dark"] .stamp.won{
  background:#138a4e!important;color:#effff6!important;
}
html[data-theme="dark"] .stamp.amber,
html[data-theme="dark"] .stamp.open,
html[data-theme="dark"] .stamp.pending{
  background:#155ed0!important;color:#f5f9ff!important;
}
html[data-theme="dark"] .stamp.red,
html[data-theme="dark"] .stamp.danger,
html[data-theme="dark"] .stamp.lost{
  background:#a72e49!important;color:#fff!important;
}

/* Actions */
html[data-theme="dark"] .lead-management-panel .btn.ghost,
html[data-theme="dark"] .data-table .btn.ghost{
  background:#172b48!important;
  border:1px solid #6844a7!important;
  color:#ede4ff!important;
  border-radius:7px!important;
  min-height:30px!important;
  font-weight:700!important;
}
html[data-theme="dark"] .lead-management-panel .btn.ghost:hover,
html[data-theme="dark"] .data-table .btn.ghost:hover{
  background:#25385b!important;
  border-color:#9868dc!important;
}
html[data-theme="dark"] .btn.amber{
  background:linear-gradient(135deg,#7c3aed,#6d28d9)!important;
  border-color:#8b5cf6!important;
  color:#fff!important;
  box-shadow:0 5px 14px rgba(124,58,237,.22)!important;
}

/* Export buttons retain semantic colors */
html[data-theme="dark"] .btn.export-excel,
html[data-theme="dark"] .excel-btn{
  background:#bdf5d7!important;color:#08643b!important;border-color:#65d89e!important;
}
html[data-theme="dark"] .btn.export-pdf,
html[data-theme="dark"] .pdf-btn{
  background:#bfdbfe!important;color:#174a9c!important;border-color:#77aaf4!important;
}

/* Pagination */
html[data-theme="dark"] .pagination,
html[data-theme="dark"] .pager{
  color:#aebfd2!important;
}
html[data-theme="dark"] .pagination button,
html[data-theme="dark"] .pager button{
  background:#0b1d30!important;
  color:#b6c7d9!important;
  border:1px solid #28445f!important;
  border-radius:6px!important;
}
html[data-theme="dark"] .pagination button.active,
html[data-theme="dark"] .pager button.active,
html[data-theme="dark"] .pagination .active,
html[data-theme="dark"] .pager .active{
  background:#7c3aed!important;
  color:#fff!important;
  border-color:#8b5cf6!important;
}

/* Sidebar polished dark treatment */
html[data-theme="dark"] .sidebar{
  background:linear-gradient(180deg,#07182a 0%,#06213b 100%)!important;
  box-shadow:none!important;
  border-right:1px solid #1f3954!important;
}
html[data-theme="dark"] .nav-group.open{
  background:rgba(255,255,255,.035)!important;
  border-color:#243f59!important;
}
html[data-theme="dark"] .nav-group-body .nav-item.active{
  background:linear-gradient(90deg,rgba(124,58,237,.30),rgba(59,130,246,.14))!important;
  border-color:rgba(139,92,246,.48)!important;
}
html[data-theme="dark"] .nav-group-body::before{background:#29445e!important}

/* Consistent page breathing room */
#content{padding:14px 16px!important}
#content > div{min-width:0}
html[data-theme="dark"] #content{background:#071421!important}

/* Responsive KPI strip */
@media (max-width:1500px){
  .lead-kpi-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:1100px){
  .lead-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
  .lead-kpi-strip{grid-template-columns:1fr}
}


/* V90.6P9 — COMPLETE DARK MODE SURFACE NORMALIZATION */

/* Universal dark surfaces: prevent white/grey leakage anywhere in ERP */
html[data-theme="dark"]{
  --dm-bg:#071421;
  --dm-bg-2:#081a2b;
  --dm-surface:#0b1e31;
  --dm-surface-2:#0e243a;
  --dm-surface-3:#122b45;
  --dm-border:#223d58;
  --dm-border-2:#2d4c69;
  --dm-text:#eef5fc;
  --dm-muted:#9eb2c8;
  --dm-soft:#c3d2e2;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .app,
html[data-theme="dark"] .main,
html[data-theme="dark"] .content,
html[data-theme="dark"] #content,
html[data-theme="dark"] .page,
html[data-theme="dark"] .page-body,
html[data-theme="dark"] .workspace{
  background:var(--dm-bg)!important;
  color:var(--dm-text)!important;
}

/* Generic containers that were still leaking light backgrounds */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .user-card,
html[data-theme="dark"] .role-card,
html[data-theme="dark"] .permission-card,
html[data-theme="dark"] .site-form-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .form-modal,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .context-menu,
html[data-theme="dark"] .section,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .register-card,
html[data-theme="dark"] .table-card{
  background:var(--dm-surface)!important;
  color:var(--dm-text)!important;
  border-color:var(--dm-border)!important;
}

/* Generic inner sections */
html[data-theme="dark"] .panel-body,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .module-body,
html[data-theme="dark"] .admin-body,
html[data-theme="dark"] .settings-body,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .field-group,
html[data-theme="dark"] .filter-section,
html[data-theme="dark"] .sub-panel{
  background:transparent!important;
  color:var(--dm-text)!important;
}

/* Headings and labels */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .module-title,
html[data-theme="dark"] .admin-title,
html[data-theme="dark"] .settings-title{
  color:#f7fbff!important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .help,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .description,
html[data-theme="dark"] .subtitle{
  color:var(--dm-muted)!important;
}

html[data-theme="dark"] label,
html[data-theme="dark"] .label,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .form-label{
  color:#c8d6e5!important;
}

/* Inputs, selects, textarea, search boxes */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .search-input{
  background:#08192b!important;
  color:#f1f7fd!important;
  border-color:#2c4965!important;
  box-shadow:none!important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{
  border-color:#5f8fc0!important;
  box-shadow:0 0 0 2px rgba(96,165,250,.12)!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{
  color:#7288a0!important;
}
html[data-theme="dark"] option{
  background:#0b1e31!important;
  color:#eef5fc!important;
}

/* Checkboxes/radios */
html[data-theme="dark"] input[type="checkbox"],
html[data-theme="dark"] input[type="radio"]{
  accent-color:#6d5dfc;
}

/* Top headers / toolbars / filter areas */
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .panel-header,
html[data-theme="dark"] .page-head,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .table-toolbar,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .advanced-filter-bar,
html[data-theme="dark"] .period-bar,
html[data-theme="dark"] .admin-toolbar,
html[data-theme="dark"] .settings-toolbar{
  background:var(--dm-surface-2)!important;
  color:var(--dm-text)!important;
  border-color:var(--dm-border)!important;
}

/* Tables - eliminate all pale rows */
html[data-theme="dark"] table,
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .approved-table{
  background:var(--dm-surface)!important;
  color:var(--dm-text)!important;
}
html[data-theme="dark"] table thead,
html[data-theme="dark"] .data-table thead,
html[data-theme="dark"] .approved-table thead{
  background:var(--dm-surface-3)!important;
}
html[data-theme="dark"] table th,
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .approved-table th{
  background:var(--dm-surface-3)!important;
  color:#c5d4e4!important;
  border-color:#2b4964!important;
}
html[data-theme="dark"] table tbody tr,
html[data-theme="dark"] .data-table tbody tr,
html[data-theme="dark"] .approved-table tbody tr{
  background:var(--dm-surface)!important;
}
html[data-theme="dark"] table tbody tr:nth-child(even),
html[data-theme="dark"] .data-table tbody tr:nth-child(even),
html[data-theme="dark"] .approved-table tbody tr:nth-child(even){
  background:#0e2439!important;
}
html[data-theme="dark"] table td,
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .approved-table td{
  background:inherit!important;
  color:#edf4fb!important;
  border-color:#203950!important;
}
html[data-theme="dark"] table tbody tr:hover td,
html[data-theme="dark"] .data-table tbody tr:hover td,
html[data-theme="dark"] .approved-table tbody tr:hover td{
  background:#17344f!important;
}
html[data-theme="dark"] table a{
  color:#8cbcff!important;
}

/* Action column - no white side strip */
html[data-theme="dark"] td.actions,
html[data-theme="dark"] th.actions,
html[data-theme="dark"] .action-cell,
html[data-theme="dark"] .action-column,
html[data-theme="dark"] .data-table td:last-child,
html[data-theme="dark"] .data-table th:last-child{
  background:inherit!important;
}

/* Buttons */
html[data-theme="dark"] .btn,
html[data-theme="dark"] button{
  border-color:#35536f;
}
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .sidebar-action-btn,
html[data-theme="dark"] .action-stack .btn{
  background:#112b45!important;
  color:#edf5fd!important;
  border-color:#3a5876!important;
}
html[data-theme="dark"] .btn.ghost:hover,
html[data-theme="dark"] .btn.secondary:hover,
html[data-theme="dark"] .sidebar-action-btn:hover,
html[data-theme="dark"] .action-stack .btn:hover{
  background:#193953!important;
  border-color:#5a7795!important;
}

/* Admin page specifics */
html[data-theme="dark"] .admin-grid,
html[data-theme="dark"] .settings-grid,
html[data-theme="dark"] .permission-grid,
html[data-theme="dark"] .role-grid,
html[data-theme="dark"] .module-grid{
  background:transparent!important;
}
html[data-theme="dark"] .admin-section,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .permission-section,
html[data-theme="dark"] .role-section,
html[data-theme="dark"] .module-section{
  background:var(--dm-surface)!important;
  border:1px solid var(--dm-border)!important;
  border-radius:10px!important;
  color:var(--dm-text)!important;
}
html[data-theme="dark"] .admin-section-header,
html[data-theme="dark"] .settings-section-header,
html[data-theme="dark"] .permission-section-header,
html[data-theme="dark"] .role-section-header,
html[data-theme="dark"] .module-section-header{
  background:var(--dm-surface-2)!important;
  border-bottom:1px solid var(--dm-border)!important;
  color:#f5f9fd!important;
}
html[data-theme="dark"] .module-row,
html[data-theme="dark"] .cust-mod-row,
html[data-theme="dark"] .cust-subtab-row,
html[data-theme="dark"] .permission-row,
html[data-theme="dark"] .role-row,
html[data-theme="dark"] .user-row{
  background:#0d2236!important;
  color:#e8f1fa!important;
  border-color:#203b55!important;
}
html[data-theme="dark"] .module-row:nth-child(even),
html[data-theme="dark"] .cust-mod-row:nth-child(even),
html[data-theme="dark"] .permission-row:nth-child(even),
html[data-theme="dark"] .role-row:nth-child(even),
html[data-theme="dark"] .user-row:nth-child(even){
  background:#102941!important;
}

/* Customization toggles */
html[data-theme="dark"] .cust-subtab-btn,
html[data-theme="dark"] .module-toggle{
  background:transparent!important;
  color:#edf5fc!important;
}
html[data-theme="dark"] .cust-subtab-state{
  color:#a7bad0!important;
}
html[data-theme="dark"] .cust-toggle{
  background:#203b56!important;
  border-color:#35536f!important;
}
html[data-theme="dark"] .cust-toggle.on{
  background:#206c4b!important;
  border-color:#2d9667!important;
}
html[data-theme="dark"] .cust-toggle.off{
  background:#3a4756!important;
  border-color:#566474!important;
}

/* Tabs */
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .tab-bar,
html[data-theme="dark"] .subtabs,
html[data-theme="dark"] .admin-tabs{
  background:transparent!important;
  border-color:var(--dm-border)!important;
}
html[data-theme="dark"] .tab,
html[data-theme="dark"] .tab-btn,
html[data-theme="dark"] .admin-tab{
  background:#0d2237!important;
  color:#aebfd1!important;
  border-color:#2a4762!important;
}
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .tab-btn.active,
html[data-theme="dark"] .admin-tab.active{
  background:linear-gradient(135deg,#4f46e5,#7c3aed)!important;
  color:#fff!important;
  border-color:#7567ef!important;
}

/* Modals */
html[data-theme="dark"] .modal-overlay{
  background:rgba(2,8,18,.76)!important;
}
html[data-theme="dark"] .modal-card{
  box-shadow:0 20px 60px rgba(0,0,0,.42)!important;
}

/* Empty states */
html[data-theme="dark"] .empty{
  background:transparent!important;
  color:#8fa5bd!important;
}

/* Notifications / dropdowns */
html[data-theme="dark"] .notif-panel,
html[data-theme="dark"] .dropdown-panel,
html[data-theme="dark"] .menu-panel{
  background:#0c2136!important;
  color:#edf5fc!important;
  border-color:#294863!important;
  box-shadow:0 16px 40px rgba(0,0,0,.35)!important;
}

/* Lead page specifically: remove any remaining grey inherited backgrounds */
html[data-theme="dark"] .lead-management-panel,
html[data-theme="dark"] .lead-management-panel *{
  --row-bg:transparent;
}
html[data-theme="dark"] .lead-management-panel .data-table tbody tr:nth-child(odd) td{
  background:#0b1e31!important;
}
html[data-theme="dark"] .lead-management-panel .data-table tbody tr:nth-child(even) td{
  background:#0f263d!important;
}
html[data-theme="dark"] .lead-management-panel .data-table tbody tr:hover td{
  background:#183650!important;
}

/* Stronger readable text for compact ERP fonts */
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .approved-table td,
html[data-theme="dark"] .module-row,
html[data-theme="dark"] .cust-mod-row,
html[data-theme="dark"] .permission-row{
  font-weight:500!important;
}

/* Divider / outlines */
html[data-theme="dark"] hr,
html[data-theme="dark"] .divider{
  border-color:#263f59!important;
  background:#263f59!important;
}

/* Scrollbar */
html[data-theme="dark"] *{
  scrollbar-color:#385b78 #08192b;
}
html[data-theme="dark"] *::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] *::-webkit-scrollbar-track{background:#08192b}
html[data-theme="dark"] *::-webkit-scrollbar-thumb{background:#385b78;border-radius:10px;border:2px solid #08192b}
html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover{background:#4b7393}


/* V90.6P10 — PROFESSIONAL NAVY DARK COLOR SYSTEM */
html[data-theme="dark"]{
  --p-bg:#07111f;
  --p-bg-soft:#0a1626;
  --p-panel:#0d1b2d;
  --p-panel-2:#10243a;
  --p-panel-3:#132b45;
  --p-border:#223a55;
  --p-border-strong:#31506d;
  --p-text:#eef4fb;
  --p-muted:#98abc0;
  --p-blue:#3b82f6;
  --p-blue-soft:#16375a;
  --p-gold:#d9a441;
  --p-green:#2aa36b;
  --p-amber:#d99a2b;
  --p-red:#d15364;
}

/* Global page */
html[data-theme="dark"] body,
html[data-theme="dark"] .app,
html[data-theme="dark"] .main,
html[data-theme="dark"] .content,
html[data-theme="dark"] #content{
  background:var(--p-bg)!important;
  color:var(--p-text)!important;
}

/* Sidebar: brand navy, no purple tint */
html[data-theme="dark"] .sidebar{
  background:linear-gradient(180deg,#0a1930 0%,#071a2c 100%)!important;
  border-right:1px solid #203952!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .sidebar::before{
  background:radial-gradient(circle at 20% 0%,rgba(59,130,246,.12),transparent 42%)!important;
}
html[data-theme="dark"] .nav-group.open{
  background:rgba(255,255,255,.025)!important;
  border-color:#28455f!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .nav-item-solo.active,
html[data-theme="dark"] .nav-group-body .nav-item.active{
  background:linear-gradient(90deg,#1b4f8b,#1d5ba4)!important;
  border-color:#4f8fd0!important;
  box-shadow:0 5px 16px rgba(20,78,140,.20)!important;
  transform:none!important;
}
html[data-theme="dark"] .nav-item.active::after{display:none!important}
html[data-theme="dark"] .nav-group-icon,
html[data-theme="dark"] .nav-icon-badge{
  background:#122941!important;
  border-color:#294965!important;
  color:#b9cde1!important;
}

/* Primary dark panels */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .approved-card,
html[data-theme="dark"] .approved-kpi,
html[data-theme="dark"] .approved-attention,
html[data-theme="dark"] .lead-kpi,
html[data-theme="dark"] .site-form-card,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .settings-card{
  background:var(--p-panel)!important;
  border:1px solid var(--p-border)!important;
  color:var(--p-text)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.12)!important;
}

/* Dashboard card text */
html[data-theme="dark"] .approved-card h3,
html[data-theme="dark"] .approved-card h4,
html[data-theme="dark"] .approved-kpi strong,
html[data-theme="dark"] .approved-fin-card h3,
html[data-theme="dark"] .approved-attention h3{
  color:#f4f8fd!important;
}
html[data-theme="dark"] .approved-kpi small,
html[data-theme="dark"] .approved-kpi span,
html[data-theme="dark"] .approved-card small,
html[data-theme="dark"] .approved-card p{
  color:var(--p-muted)!important;
}

/* Work orders / all registers */
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .approved-table{
  background:var(--p-panel)!important;
  color:var(--p-text)!important;
}
html[data-theme="dark"] .data-table thead th,
html[data-theme="dark"] .approved-table thead th{
  background:#132a43!important;
  color:#bed0e2!important;
  border-bottom:1px solid #2a4864!important;
}
html[data-theme="dark"] .data-table tbody tr:nth-child(odd) td,
html[data-theme="dark"] .approved-table tbody tr:nth-child(odd) td{
  background:#0d1f32!important;
}
html[data-theme="dark"] .data-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .approved-table tbody tr:nth-child(even) td{
  background:#10263c!important;
}
html[data-theme="dark"] .data-table tbody tr:hover td,
html[data-theme="dark"] .approved-table tbody tr:hover td{
  background:#173652!important;
}
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .approved-table td{
  color:#eaf1f8!important;
  border-color:#203a52!important;
}

/* Panel headers and title accents: replace purple with steel blue */
html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .panel-header,
html[data-theme="dark"] .page-head,
html[data-theme="dark"] .page-header{
  background:#10243a!important;
  border-bottom:1px solid #29455f!important;
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .lead-management-panel{
  border-left:1px solid var(--p-border)!important;
}
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .lead-management-panel .panel-title{
  color:#d8e7f6!important;
}

/* Buttons: professional muted system */
html[data-theme="dark"] .btn,
html[data-theme="dark"] button{
  box-shadow:none!important;
}
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .data-table .btn,
html[data-theme="dark"] .action-stack .btn{
  background:#122941!important;
  color:#e8f1f9!important;
  border:1px solid #35536f!important;
}
html[data-theme="dark"] .btn.ghost:hover,
html[data-theme="dark"] .btn.secondary:hover,
html[data-theme="dark"] .data-table .btn:hover,
html[data-theme="dark"] .action-stack .btn:hover{
  background:#183651!important;
  border-color:#527390!important;
}
html[data-theme="dark"] .btn.amber{
  background:#1d5b96!important;
  border-color:#3478b8!important;
  color:#fff!important;
}
html[data-theme="dark"] .btn.amber:hover{background:#2469a9!important}

/* Export buttons: toned down */
html[data-theme="dark"] .btn.export-excel,
html[data-theme="dark"] .excel-btn{
  background:#15392e!important;
  color:#b7ead2!important;
  border-color:#2d6f57!important;
}
html[data-theme="dark"] .btn.export-pdf,
html[data-theme="dark"] .pdf-btn{
  background:#163556!important;
  color:#c5def6!important;
  border-color:#35638d!important;
}

/* Status */
html[data-theme="dark"] .stamp,
html[data-theme="dark"] .approved-status{
  border:1px solid transparent!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .stamp.green,
html[data-theme="dark"] .stamp.success,
html[data-theme="dark"] .stamp.won,
html[data-theme="dark"] .approved-status.done{
  background:#153e2e!important;
  color:#bce8d2!important;
  border-color:#2b7454!important;
}
html[data-theme="dark"] .stamp.amber,
html[data-theme="dark"] .stamp.open,
html[data-theme="dark"] .stamp.pending,
html[data-theme="dark"] .approved-status{
  background:#3b331d!important;
  color:#f2daa4!important;
  border-color:#74622f!important;
}
html[data-theme="dark"] .stamp.red,
html[data-theme="dark"] .stamp.danger,
html[data-theme="dark"] .stamp.lost{
  background:#46232c!important;
  color:#efbdc7!important;
  border-color:#7b4050!important;
}

/* Financial Snapshot - remove white blocks */
html[data-theme="dark"] .approved-fin-card{
  background:var(--p-panel)!important;
}
html[data-theme="dark"] .approved-fin-tiles{
  gap:8px!important;
}
html[data-theme="dark"] .approved-fin-tiles > div{
  background:#10253b!important;
  border:1px solid #294762!important;
  color:var(--p-text)!important;
  border-radius:8px!important;
}
html[data-theme="dark"] .approved-fin-tiles i{
  background:#16392f!important;
  color:#76d0a3!important;
}
html[data-theme="dark"] .approved-fin-tiles small{
  color:#91a7bc!important;
}
html[data-theme="dark"] .approved-fin-tiles strong{
  color:#f2f7fc!important;
}
html[data-theme="dark"] .approved-receivable{
  background:#0f2439!important;
  border:1px solid #294762!important;
  color:var(--p-text)!important;
}
html[data-theme="dark"] .approved-receivable small,
html[data-theme="dark"] .approved-receivable span{
  color:#91a7bc!important;
}
html[data-theme="dark"] .approved-receivable strong{
  color:#f3f8fd!important;
}
html[data-theme="dark"] .approved-mini-ring{
  background:conic-gradient(#3b82f6 calc(var(--pct)*1%),#233a52 0)!important;
}
html[data-theme="dark"] .approved-mini-ring:after{
  background:#10243a!important;
}
html[data-theme="dark"] .approved-mini-ring b{
  color:#eef5fc!important;
}

/* Projects Needing Attention - remove huge white strip */
html[data-theme="dark"] .approved-attention{
  background:#0d1b2d!important;
  border-color:#223a55!important;
}
html[data-theme="dark"] .approved-attention-row button{
  background:#10243a!important;
  border:1px solid #294762!important;
  color:#dfe9f3!important;
}
html[data-theme="dark"] .approved-attention-row button:hover{
  background:#15314d!important;
  border-color:#3e6585!important;
}
html[data-theme="dark"] .approved-attention-row i{
  background:#34252b!important;
  color:#dd7c8d!important;
}
html[data-theme="dark"] .approved-attention-row strong{
  color:#f3f8fd!important;
}
html[data-theme="dark"] .approved-attention-row span{
  color:#d0dce8!important;
}
html[data-theme="dark"] .approved-attention-row small{
  color:#869cb2!important;
}
html[data-theme="dark"] .approved-attention-row .view-alerts{
  color:#89baf0!important;
}

/* Highlight/conversion cards */
html[data-theme="dark"] .approved-highlight,
html[data-theme="dark"] .approved-conversion{
  background:#10243a!important;
  border-color:#294762!important;
}
html[data-theme="dark"] .approved-highlight b,
html[data-theme="dark"] .approved-conversion strong{
  color:#eef5fc!important;
}
html[data-theme="dark"] .approved-highlight span{
  border-color:#294762!important;
}

/* Funnel labels */
html[data-theme="dark"] .funnel-row label{
  color:#d4dfeb!important;
}
html[data-theme="dark"] .funnel-row label b{
  color:#fff!important;
}

/* KPI icon blocks less neon */
html[data-theme="dark"] .approved-kpi i{
  filter:saturate(.75);
  box-shadow:none!important;
}

/* Top controls */
html[data-theme="dark"] .theme-mode-btn,
html[data-theme="dark"] .approved-search,
html[data-theme="dark"] .company-switch,
html[data-theme="dark"] .notif-bell{
  background:#0d2136!important;
  border-color:#294762!important;
  color:#e5eef7!important;
}

/* Pagination: blue, not purple */
html[data-theme="dark"] .pagination button.active,
html[data-theme="dark"] .pager button.active,
html[data-theme="dark"] .pagination .active,
html[data-theme="dark"] .pager .active{
  background:#245f9c!important;
  border-color:#3f7eb9!important;
  color:#fff!important;
}

/* Admin tabs: blue system */
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .tab-btn.active,
html[data-theme="dark"] .admin-tab.active{
  background:#1e5f9c!important;
  border-color:#3d82bd!important;
  color:#fff!important;
}

/* Inputs */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:#091a2b!important;
  border-color:#2b4863!important;
  color:#eef4fa!important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{
  border-color:#4c7ca4!important;
  box-shadow:0 0 0 2px rgba(59,130,246,.10)!important;
}

/* Work-order progress bars */
html[data-theme="dark"] progress,
html[data-theme="dark"] .progress{
  background:#263b52!important;
}
html[data-theme="dark"] progress::-webkit-progress-bar{
  background:#263b52!important;
}
html[data-theme="dark"] progress::-webkit-progress-value{
  background:#3b82f6!important;
}
html[data-theme="dark"] progress::-moz-progress-bar{
  background:#3b82f6!important;
}

/* Ensure no pure white dashboard blocks remain */
html[data-theme="dark"] .approved-dashboard [style*="background:#fff"],
html[data-theme="dark"] .approved-dashboard [style*="background: #fff"]{
  background:var(--p-panel)!important;
}


/* V90.6P11 — AUTHORITATIVE ERP COLOR SYSTEM
   One professional palette across the complete ERP.
   DARK: navy / slate / steel blue / teal / muted amber.
   LIGHT: white / slate / blue with restrained status accents.
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
html[data-theme="dark"]{
  --erp-bg:#07131f;
  --erp-bg-alt:#091827;
  --erp-sidebar:#081b2e;
  --erp-sidebar-2:#072239;
  --erp-topbar:#0a1d30;
  --erp-card:#0d2135;
  --erp-card-2:#10263d;
  --erp-card-3:#132d47;
  --erp-table-head:#14304a;
  --erp-border:#29445f;
  --erp-border-soft:#20394f;
  --erp-text:#eef5fb;
  --erp-text-2:#c8d6e4;
  --erp-muted:#91a6ba;
  --erp-blue:#3278b9;
  --erp-blue-strong:#2467a5;
  --erp-blue-soft:#173858;
  --erp-teal:#2b9a83;
  --erp-green:#2d9868;
  --erp-amber:#c99238;
  --erp-red:#bf5866;
  --erp-shadow:0 8px 24px rgba(0,0,0,.14);
}
html[data-theme="light"]{
  --erp-bg:#f4f7fb;
  --erp-bg-alt:#eef3f8;
  --erp-sidebar:#0b2440;
  --erp-sidebar-2:#082d4d;
  --erp-topbar:#ffffff;
  --erp-card:#ffffff;
  --erp-card-2:#f8fafc;
  --erp-card-3:#f1f5f9;
  --erp-table-head:#eef4f9;
  --erp-border:#d8e2ec;
  --erp-border-soft:#e5ebf2;
  --erp-text:#0f2238;
  --erp-text-2:#334b63;
  --erp-muted:#6f8295;
  --erp-blue:#2f73b7;
  --erp-blue-strong:#245f99;
  --erp-blue-soft:#e9f2fb;
  --erp-teal:#228a78;
  --erp-green:#27885d;
  --erp-amber:#b9852e;
  --erp-red:#b74e5d;
  --erp-shadow:0 6px 18px rgba(15,39,70,.055);
}

/* ============================================================
   GLOBAL SURFACE + TYPOGRAPHY
   ============================================================ */
html[data-theme="dark"] body,
html[data-theme="dark"] .app,
html[data-theme="dark"] .main,
html[data-theme="dark"] .content,
html[data-theme="dark"] #content,
html[data-theme="dark"] .page,
html[data-theme="dark"] .workspace{
  background:var(--erp-bg)!important;
  color:var(--erp-text)!important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] strong,
html[data-theme="dark"] b{
  color:var(--erp-text)!important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .help,
html[data-theme="dark"] .description{
  color:var(--erp-muted)!important;
}

/* ============================================================
   SIDEBAR — REMOVE PURPLE / PINK ENTIRELY
   ============================================================ */
html[data-theme="dark"] .sidebar{
  background:linear-gradient(180deg,var(--erp-sidebar),var(--erp-sidebar-2))!important;
  border-right:1px solid #264158!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .nav-group,
html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .nav-item-solo{
  border-color:transparent!important;
}

html[data-theme="dark"] .nav-group.open{
  background:rgba(255,255,255,.025)!important;
  border-color:#29465f!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .nav-group-head:hover,
html[data-theme="dark"] .nav-item:not(.active):hover{
  background:#102b45!important;
}

html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .nav-item-solo.active,
html[data-theme="dark"] .nav-group-body .nav-item.active{
  background:linear-gradient(90deg,#1d578d,#246ba6)!important;
  border:1px solid #4d87b8!important;
  box-shadow:0 5px 14px rgba(12,58,100,.22)!important;
  color:#fff!important;
  transform:none!important;
}

html[data-theme="dark"] .nav-item.active::before,
html[data-theme="dark"] .nav-item.active::after{
  display:none!important;
}

html[data-theme="dark"] .nav-group-icon,
html[data-theme="dark"] .nav-icon-badge{
  background:#122c46!important;
  border-color:#31506a!important;
  color:#c9d9e8!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .nav-group-body::before{
  background:#34536d!important;
}

/* ============================================================
   TOP BAR
   ============================================================ */
html[data-theme="dark"] .topbar{
  background:var(--erp-topbar)!important;
  border-bottom:1px solid var(--erp-border)!important;
}

html[data-theme="dark"] .approved-search,
html[data-theme="dark"] .theme-mode-btn,
html[data-theme="dark"] .company-switch,
html[data-theme="dark"] .notif-bell{
  background:#0e263d!important;
  border:1px solid #31506b!important;
  color:#e8f1f9!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .theme-mode-btn:hover,
html[data-theme="dark"] .company-switch:hover,
html[data-theme="dark"] .notif-bell:hover{
  background:#15334f!important;
}

/* ============================================================
   PANELS / CARDS / MODALS
   ============================================================ */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .approved-card,
html[data-theme="dark"] .approved-kpi,
html[data-theme="dark"] .approved-attention,
html[data-theme="dark"] .lead-kpi,
html[data-theme="dark"] .site-form-card,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .form-modal,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .register-card{
  background:var(--erp-card)!important;
  border:1px solid var(--erp-border)!important;
  color:var(--erp-text)!important;
  box-shadow:var(--erp-shadow)!important;
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .lead-management-panel{
  border-left:1px solid var(--erp-border)!important;
}

html[data-theme="dark"] .panel::before,
html[data-theme="dark"] .panel::after,
html[data-theme="dark"] .lead-management-panel::before,
html[data-theme="dark"] .lead-management-panel::after{
  display:none!important;
}

html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .panel-header,
html[data-theme="dark"] .page-head,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .table-toolbar{
  background:var(--erp-card-2)!important;
  border-color:var(--erp-border)!important;
  color:var(--erp-text)!important;
}

html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .card-title{
  color:#e5eef7!important;
}

/* ============================================================
   TABLES — PROFESSIONAL, UNIFORM, NO STRIPED GREY/WHITE
   ============================================================ */
html[data-theme="dark"] table,
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .approved-table{
  background:var(--erp-card)!important;
  color:var(--erp-text)!important;
}

html[data-theme="dark"] .data-table thead th,
html[data-theme="dark"] .approved-table thead th,
html[data-theme="dark"] table thead th{
  background:var(--erp-table-head)!important;
  color:#cbd9e7!important;
  border-color:#35516a!important;
}

html[data-theme="dark"] .data-table tbody tr:nth-child(odd) td,
html[data-theme="dark"] .approved-table tbody tr:nth-child(odd) td,
html[data-theme="dark"] table tbody tr:nth-child(odd) td{
  background:#0e2236!important;
}

html[data-theme="dark"] .data-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .approved-table tbody tr:nth-child(even) td,
html[data-theme="dark"] table tbody tr:nth-child(even) td{
  background:#10283e!important;
}

html[data-theme="dark"] .data-table tbody tr:hover td,
html[data-theme="dark"] .approved-table tbody tr:hover td,
html[data-theme="dark"] table tbody tr:hover td{
  background:#173650!important;
}

html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .approved-table td,
html[data-theme="dark"] table td{
  color:#e8f0f8!important;
  border-color:#29435a!important;
}

html[data-theme="dark"] .data-table td:last-child,
html[data-theme="dark"] .approved-table td:last-child,
html[data-theme="dark"] table td:last-child{
  background:inherit!important;
}

/* Work Order table specific cleanup */
html[data-theme="dark"] .data-table progress{
  height:7px!important;
  border-radius:999px!important;
  overflow:hidden;
}
html[data-theme="dark"] progress::-webkit-progress-bar{
  background:#263e54!important;
}
html[data-theme="dark"] progress::-webkit-progress-value{
  background:#3e83bd!important;
}
html[data-theme="dark"] progress::-moz-progress-bar{
  background:#3e83bd!important;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
html[data-theme="dark"] .stamp,
html[data-theme="dark"] .approved-status{
  border-radius:999px!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
  font-weight:700!important;
}

html[data-theme="dark"] .stamp.green,
html[data-theme="dark"] .stamp.success,
html[data-theme="dark"] .stamp.won,
html[data-theme="dark"] .approved-status.done{
  background:#173f31!important;
  color:#b9e5cf!important;
  border-color:#2f7757!important;
}

html[data-theme="dark"] .stamp.amber,
html[data-theme="dark"] .stamp.open,
html[data-theme="dark"] .stamp.pending,
html[data-theme="dark"] .approved-status:not(.done):not(.hold){
  background:#40361f!important;
  color:#ead6a7!important;
  border-color:#766439!important;
}

html[data-theme="dark"] .stamp.red,
html[data-theme="dark"] .stamp.danger,
html[data-theme="dark"] .stamp.lost,
html[data-theme="dark"] .approved-status.hold{
  background:#442630!important;
  color:#efc0c9!important;
  border-color:#7a4552!important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
html[data-theme="dark"] .btn,
html[data-theme="dark"] button{
  box-shadow:none!important;
}

html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .data-table .btn,
html[data-theme="dark"] .action-stack .btn{
  background:#132d45!important;
  color:#e8f1f9!important;
  border:1px solid #3a5871!important;
}

html[data-theme="dark"] .btn.ghost:hover,
html[data-theme="dark"] .btn.secondary:hover,
html[data-theme="dark"] .data-table .btn:hover,
html[data-theme="dark"] .action-stack .btn:hover{
  background:#193a55!important;
  border-color:#587691!important;
}

html[data-theme="dark"] .btn.amber,
html[data-theme="dark"] .btn.primary{
  background:#286faa!important;
  color:#fff!important;
  border-color:#3e82ba!important;
}

html[data-theme="dark"] .btn.amber:hover,
html[data-theme="dark"] .btn.primary:hover{
  background:#337eb8!important;
}

/* Export buttons: subtle semantic coloring */
html[data-theme="dark"] .excel-btn,
html[data-theme="dark"] .btn.export-excel{
  background:#173b31!important;
  border-color:#31735b!important;
  color:#b9e6d0!important;
}
html[data-theme="dark"] .pdf-btn,
html[data-theme="dark"] .btn.export-pdf{
  background:#173554!important;
  border-color:#37668f!important;
  color:#c8def3!important;
}

/* ============================================================
   FILTERS / FORMS
   ============================================================ */
html[data-theme="dark"] .period-bar,
html[data-theme="dark"] .advanced-filter-bar,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .filters{
  background:var(--erp-card-2)!important;
  border:1px solid var(--erp-border)!important;
  color:var(--erp-text)!important;
  box-shadow:none!important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .input,
html[data-theme="dark"] .select{
  background:#091c2d!important;
  color:#edf4fb!important;
  border:1px solid #35516a!important;
  box-shadow:none!important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{
  border-color:#5685aa!important;
  box-shadow:0 0 0 2px rgba(60,130,185,.10)!important;
}

html[data-theme="dark"] label{
  color:#c3d2e0!important;
}

/* ============================================================
   DASHBOARD — FINANCIAL + ATTENTION AREAS
   ============================================================ */
html[data-theme="dark"] .approved-fin-card,
html[data-theme="dark"] .approved-attention{
  background:var(--erp-card)!important;
  border-color:var(--erp-border)!important;
}

html[data-theme="dark"] .approved-fin-tiles > div{
  background:var(--erp-card-2)!important;
  border:1px solid #31506a!important;
  color:var(--erp-text)!important;
}

html[data-theme="dark"] .approved-fin-tiles > div i{
  background:#173b31!important;
  color:#73caa0!important;
}

html[data-theme="dark"] .approved-fin-tiles small{
  color:var(--erp-muted)!important;
}

html[data-theme="dark"] .approved-fin-tiles strong{
  color:#f5f9fd!important;
}

html[data-theme="dark"] .approved-receivable{
  background:#10263b!important;
  border:1px solid #31506a!important;
  color:#edf4fb!important;
}

html[data-theme="dark"] .approved-receivable strong{
  color:#f5f9fd!important;
}

html[data-theme="dark"] .approved-receivable small,
html[data-theme="dark"] .approved-receivable span{
  color:var(--erp-muted)!important;
}

html[data-theme="dark"] .approved-mini-ring{
  background:conic-gradient(#3d83bd calc(var(--pct)*1%),#284158 0)!important;
}
html[data-theme="dark"] .approved-mini-ring:after{
  background:#10263b!important;
}
html[data-theme="dark"] .approved-mini-ring b{
  color:#edf5fb!important;
}

html[data-theme="dark"] .approved-attention-row button{
  background:var(--erp-card-2)!important;
  border:1px solid #31506a!important;
  color:#e6eef7!important;
}
html[data-theme="dark"] .approved-attention-row button:hover{
  background:#17334e!important;
}
html[data-theme="dark"] .approved-attention-row i{
  background:#3b2830!important;
  color:#dc8492!important;
}
html[data-theme="dark"] .approved-attention-row strong{
  color:#f3f8fc!important;
}
html[data-theme="dark"] .approved-attention-row span{
  color:#cfdae5!important;
}
html[data-theme="dark"] .approved-attention-row small{
  color:#899db1!important;
}

/* Project highlights */
html[data-theme="dark"] .approved-highlight,
html[data-theme="dark"] .approved-conversion{
  background:var(--erp-card-2)!important;
  border-color:#31506a!important;
}
html[data-theme="dark"] .approved-highlight b{
  color:#eaf2f9!important;
}
html[data-theme="dark"] .approved-highlight span{
  border-color:#31506a!important;
}

/* Funnel labels + shortcut cards */
html[data-theme="dark"] .funnel-row label{
  color:#d4e0eb!important;
}
html[data-theme="dark"] .funnel-row label b{
  color:#fff!important;
}
html[data-theme="dark"] .approved-funnel-shortcuts{
  border-color:#31506a!important;
}
html[data-theme="dark"] .approved-funnel-shortcuts button{
  background:#10263b!important;
  border:1px solid #31506a!important;
  color:#dfeaf4!important;
}
html[data-theme="dark"] .approved-funnel-shortcuts button:hover{
  background:#17344f!important;
  border-color:#4e7390!important;
}

/* ============================================================
   MAP
   ============================================================ */
html[data-theme="dark"] .approved-map-card{
  background:linear-gradient(145deg,#0c2440,#081a30)!important;
  border-color:#2c4b66!important;
}
html[data-theme="dark"] .approved-map-tabs{
  background:#102942!important;
}
html[data-theme="dark"] .approved-map-tabs button{
  color:#b8cadb!important;
}
html[data-theme="dark"] .approved-map-tabs button.active,
html[data-theme="dark"] .approved-map-tabs button[aria-pressed="true"]{
  background:#153754!important;
  border-color:#55a0b5!important;
  color:#fff!important;
}
html[data-theme="dark"] .approved-map-tabs button.active::after{
  background:#55a0b5!important;
}

/* ============================================================
   ADMIN / CUSTOMIZATION
   ============================================================ */
html[data-theme="dark"] .admin-section,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .permission-section,
html[data-theme="dark"] .role-section,
html[data-theme="dark"] .module-section{
  background:var(--erp-card)!important;
  border-color:var(--erp-border)!important;
}
html[data-theme="dark"] .module-row,
html[data-theme="dark"] .cust-mod-row,
html[data-theme="dark"] .cust-subtab-row,
html[data-theme="dark"] .permission-row,
html[data-theme="dark"] .role-row,
html[data-theme="dark"] .user-row{
  background:#0f2438!important;
  color:#e6eef7!important;
  border-color:#29445c!important;
}
html[data-theme="dark"] .module-row:nth-child(even),
html[data-theme="dark"] .cust-mod-row:nth-child(even),
html[data-theme="dark"] .permission-row:nth-child(even),
html[data-theme="dark"] .role-row:nth-child(even),
html[data-theme="dark"] .user-row:nth-child(even){
  background:#112940!important;
}
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .tab-btn.active,
html[data-theme="dark"] .admin-tab.active{
  background:#286faa!important;
  border-color:#4a88bb!important;
  color:#fff!important;
}

/* ============================================================
   PAGINATION
   ============================================================ */
html[data-theme="dark"] .pagination button,
html[data-theme="dark"] .pager button{
  background:#10273c!important;
  color:#9fb2c5!important;
  border-color:#31506a!important;
}
html[data-theme="dark"] .pagination button.active,
html[data-theme="dark"] .pager button.active,
html[data-theme="dark"] .pagination .active,
html[data-theme="dark"] .pager .active{
  background:#286faa!important;
  color:#fff!important;
  border-color:#4a88bb!important;
}

/* ============================================================
   LIGHT MODE CLEANUP TOO — CONSISTENT BLUE, NO RANDOM PURPLE
   ============================================================ */
html[data-theme="light"] .nav-item.active,
html[data-theme="light"] .nav-item-solo.active,
html[data-theme="light"] .nav-group-body .nav-item.active{
  background:linear-gradient(90deg,#2369aa,#2f7ac0)!important;
  border-color:#69a0d1!important;
  box-shadow:0 5px 16px rgba(32,101,162,.15)!important;
}
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .approved-card,
html[data-theme="light"] .approved-kpi,
html[data-theme="light"] .lead-kpi{
  border-color:var(--erp-border)!important;
  box-shadow:var(--erp-shadow)!important;
}
html[data-theme="light"] .pagination button.active,
html[data-theme="light"] .pager button.active,
html[data-theme="light"] .pagination .active,
html[data-theme="light"] .pager .active{
  background:#2f73b7!important;
  color:#fff!important;
  border-color:#2f73b7!important;
}
html[data-theme="light"] .tab.active,
html[data-theme="light"] .tab-btn.active,
html[data-theme="light"] .admin-tab.active{
  background:#2f73b7!important;
  color:#fff!important;
  border-color:#2f73b7!important;
}

/* Remove old magenta/purple decorative rails that survived earlier versions */
html[data-theme="dark"] .panel[style*="border-left"],
html[data-theme="dark"] .card[style*="border-left"],
html[data-theme="dark"] .module-card[style*="border-left"]{
  border-left-color:var(--erp-border)!important;
}


/* V90.6P12 — ERP-WIDE READABLE TYPOGRAPHY
   Optimized for Chrome at 100% display scaling.
   Keeps information density while eliminating undersized text.
*/
:root{
  --erp-font-base:14px;
  --erp-font-small:12px;
  --erp-font-label:12.5px;
  --erp-font-table:13px;
  --erp-font-button:12.5px;
  --erp-font-nav:13.5px;
  --erp-font-card-title:14px;
  --erp-font-page-title:19px;
}

html,body{
  font-size:var(--erp-font-base)!important;
}

/* Main ERP content */
.main,
.content,
#content,
.page,
.workspace{
  font-size:14px!important;
}

/* Top header */
.topbar{
  font-size:13px!important;
}
.topbar h1,
.topbar .page-title,
.page-header h1,
.page-head h1{
  font-size:19px!important;
  line-height:1.25!important;
  font-weight:750!important;
}

/* Sidebar */
.sidebar{
  font-size:13.5px!important;
}
.sidebar .brand-name{
  font-size:15px!important;
}
.sidebar .brand-sub{
  font-size:9.5px!important;
}
.nav-item,
.nav-item-solo,
.nav-group-head{
  font-size:13.5px!important;
  line-height:1.25!important;
}
.nav-group-body .nav-item{
  font-size:12.5px!important;
}
.sidebar-footer,
.sidebar-user{
  font-size:11.5px!important;
}
.sidebar .btn{
  font-size:12px!important;
}

/* Dashboard greeting */
.approved-dashboard h1,
.dashboard-greeting h1{
  font-size:25px!important;
  line-height:1.2!important;
}
.approved-dashboard .dashboard-subtitle,
.dashboard-greeting p{
  font-size:13px!important;
}

/* KPI cards */
.approved-kpi{
  min-height:88px!important;
}
.approved-kpi small,
.lead-kpi small{
  font-size:11.5px!important;
  line-height:1.3!important;
}
.approved-kpi strong,
.lead-kpi strong{
  font-size:21px!important;
  line-height:1.15!important;
}
.approved-kpi span,
.lead-kpi span{
  font-size:11px!important;
}

/* Cards and sections */
.approved-card h3,
.approved-fin-card h3,
.approved-attention h3,
.panel-title,
.card-title,
.section-title,
.module-card h3{
  font-size:14.5px!important;
  line-height:1.3!important;
}
.approved-card h4,
.panel h4,
.card h4{
  font-size:13.5px!important;
}
.approved-card p,
.approved-card small{
  font-size:11.5px!important;
  line-height:1.35!important;
}

/* Dashboard map */
.approved-map-card h3{
  font-size:15px!important;
}
.approved-map-card .map-subtitle{
  font-size:12px!important;
}
.approved-map-tabs button{
  font-size:11.5px!important;
  min-height:31px!important;
  padding:6px 13px!important;
}
.approved-map-legend,
.approved-map-legend span{
  font-size:10.5px!important;
}
.approved-location-table,
.approved-location-table th,
.approved-location-table td{
  font-size:10.5px!important;
}
.approved-map-card .btn{
  font-size:11px!important;
}

/* Funnel */
.funnel-row label{
  font-size:11.5px!important;
  line-height:1.25!important;
}
.funnel-row label b{
  font-size:13px!important;
}
.approved-funnel-shortcuts button{
  font-size:10.5px!important;
  line-height:1.25!important;
}

/* Financial snapshot */
.approved-fin-tiles small,
.approved-receivable small{
  font-size:10.5px!important;
}
.approved-fin-tiles strong{
  font-size:14px!important;
}
.approved-receivable strong{
  font-size:17px!important;
}
.approved-receivable span{
  font-size:10px!important;
}
.approved-mini-ring b{
  font-size:11px!important;
}

/* Attention */
.approved-attention-row strong{
  font-size:12px!important;
}
.approved-attention-row span{
  font-size:11px!important;
}
.approved-attention-row small{
  font-size:10px!important;
}

/* Tables / registers across every module */
table,
.data-table,
.approved-table{
  font-size:var(--erp-font-table)!important;
}
table thead th,
.data-table thead th,
.approved-table thead th{
  font-size:11.5px!important;
  line-height:1.25!important;
  letter-spacing:.015em!important;
}
table tbody td,
.data-table tbody td,
.approved-table tbody td{
  font-size:13px!important;
  line-height:1.35!important;
}
table tbody td small,
.data-table tbody td small{
  font-size:10.5px!important;
}
.data-table .btn,
table .btn,
.action-stack .btn{
  font-size:11.5px!important;
  min-height:29px!important;
}

/* Work order completion values */
.data-table progress + b,
.progress-value,
.work-done-value{
  font-size:13px!important;
}

/* Forms / filters */
label,
.form-label,
.field-label{
  font-size:12.5px!important;
}
input,
select,
textarea,
.input,
.select{
  font-size:13px!important;
}
input,
select,
.input,
.select{
  min-height:36px!important;
}
textarea{
  line-height:1.4!important;
}
.period-bar,
.filter-bar,
.filters,
.advanced-filter-bar{
  font-size:12.5px!important;
}
.period-bar label,
.filter-bar label,
.advanced-filter-bar label{
  font-size:12px!important;
}

/* Buttons */
.btn,
button{
  font-size:var(--erp-font-button)!important;
}
.btn.primary,
.btn.amber{
  font-size:12.5px!important;
}

/* Status pills */
.stamp,
.approved-status,
.status-badge,
.badge{
  font-size:10.5px!important;
  line-height:1.2!important;
  padding:4px 9px!important;
}

/* Pagination */
.pagination,
.pager{
  font-size:11.5px!important;
}
.pagination button,
.pager button{
  font-size:11.5px!important;
  min-width:32px!important;
  min-height:30px!important;
}

/* Tabs and subtabs */
.tabs,
.tab-list,
.admin-tabs{
  font-size:12.5px!important;
}
.tab,
.tab-btn,
.admin-tab,
.subtab,
.sub-tab{
  font-size:12.5px!important;
  line-height:1.25!important;
  min-height:34px!important;
}

/* Admin/settings */
.admin-card,
.settings-card,
.admin-section,
.settings-section{
  font-size:13px!important;
}
.admin-card h3,
.settings-card h3,
.admin-section h3{
  font-size:15px!important;
}
.module-row,
.cust-mod-row,
.cust-subtab-row,
.permission-row,
.role-row,
.user-row{
  font-size:12.5px!important;
}
.module-row small,
.cust-mod-row small,
.permission-row small{
  font-size:10.5px!important;
}

/* Modal readability */
.modal-card,
.form-modal{
  font-size:13px!important;
}
.modal-card h2,
.form-modal h2{
  font-size:18px!important;
}
.modal-card h3,
.form-modal h3{
  font-size:15px!important;
}

/* Preserve responsive adjustable sidebar:
   text scales down progressively only when user intentionally narrows it. */
.sidebar.sidebar-compact .nav-item,
.sidebar.sidebar-compact .nav-item-solo,
.sidebar.sidebar-compact .nav-group-head{
  font-size:12px!important;
}
.sidebar.sidebar-compact .nav-group-body .nav-item{
  font-size:11px!important;
}

/* Mobile */
@media(max-width:900px){
  :root{--erp-font-base:13.5px;}
  .topbar h1,.topbar .page-title{font-size:17px!important;}
  .approved-dashboard h1,.dashboard-greeting h1{font-size:21px!important;}
  table tbody td,.data-table tbody td,.approved-table tbody td{font-size:12px!important;}
  table thead th,.data-table thead th,.approved-table thead th{font-size:10.5px!important;}
}


/* V90.6P13 — ERP-WIDE ALIGNMENT SYSTEM
   Standard dimensions and spacing for Chrome 100%.
*/

/* ---------- PAGE FRAME ---------- */
#content,
.content{
  padding:14px 16px 18px!important;
  box-sizing:border-box!important;
}
#content > *,
.content > *{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
#content > div + div{
  margin-top:12px!important;
}

/* ---------- PERIOD BAR ---------- */
.period-bar{
  min-height:58px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:wrap!important;
  column-gap:10px!important;
  row-gap:8px!important;
  padding:10px 14px!important;
  margin:0!important;
  border-radius:11px!important;
  box-sizing:border-box!important;
}
.period-bar > label{
  display:flex!important;
  align-items:center!important;
  min-height:36px!important;
  margin:0!important;
  white-space:nowrap!important;
  line-height:1!important;
}
.period-bar > select,
.period-bar > input{
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  box-sizing:border-box!important;
}
.period-bar > button{
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  align-self:center!important;
}

/* ---------- ADVANCED FILTER ---------- */
.adv-filter-bar{
  min-height:auto!important;
  padding:12px 14px!important;
  gap:10px!important;
}
.adv-filter-bar > div:first-child{
  width:100%!important;
  min-height:36px!important;
  display:grid!important;
  grid-template-columns:auto minmax(220px,1fr) auto auto!important;
  align-items:end!important;
  gap:8px!important;
}
.adv-filter-bar > div:first-child > label{
  align-self:center!important;
  margin:0!important;
}
.adv-filter-bar > div:first-child > input{
  width:100%!important;
  height:36px!important;
  margin:0!important;
}
.adv-filter-bar > div:first-child > button{
  height:36px!important;
  min-width:58px!important;
  margin:0!important;
}
.adv-filter-bar [data-fields]{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;
  gap:8px!important;
  align-items:end!important;
}
.adv-filter-bar [data-fields] .field{
  min-width:0!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
}
.adv-filter-bar [data-fields] .field label{
  min-height:16px!important;
  display:flex!important;
  align-items:center!important;
  margin:0!important;
}
.adv-filter-bar [data-fields] .field input{
  width:100%!important;
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  box-sizing:border-box!important;
}

/* ---------- KPI / SUMMARY CARDS ---------- */
.kpi-grid,
.stats-grid,
.summary-grid,
.lead-kpi-strip{
  align-items:stretch!important;
}
.kpi,
.stat-card,
.summary-card,
.lead-kpi,
.approved-kpi{
  height:100%!important;
  box-sizing:border-box!important;
}
.lead-kpi{
  min-height:92px!important;
  align-items:center!important;
}
.lead-kpi > div{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}

/* Tender KPI cards generated outside common grid */
#content .kpi-grid > *,
#content .stats-grid > *,
#content .summary-grid > *{
  min-height:88px!important;
}

/* ---------- ALERT / INFORMATION STRIPS ---------- */
.alert,
.alert-box,
.warning-box,
.deadline-alert,
.notice,
.notice-box{
  padding:12px 14px!important;
  box-sizing:border-box!important;
  line-height:1.45!important;
}
.alert > *,
.alert-box > *,
.warning-box > *,
.deadline-alert > *{
  margin-top:0!important;
  margin-bottom:4px!important;
}
.alert > *:last-child,
.alert-box > *:last-child,
.warning-box > *:last-child,
.deadline-alert > *:last-child{
  margin-bottom:0!important;
}

/* ---------- PANEL ---------- */
.panel{
  overflow:hidden!important;
  border-radius:11px!important;
  box-sizing:border-box!important;
}
.panel-head{
  min-height:48px!important;
  height:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:9px 12px!important;
  box-sizing:border-box!important;
}
.panel-title{
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  min-height:30px!important;
}
.panel-head-extra{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  min-height:32px!important;
}
.panel-head-extra > *{
  margin:0!important;
}
.panel-body{
  padding:0!important;
  box-sizing:border-box!important;
}

/* ---------- PAGE SIZE ROW ---------- */
.erp-page-top{
  min-height:52px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:8px 12px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.erp-pager-size{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:36px!important;
  margin:0!important;
}
.erp-pager-size select{
  height:36px!important;
  min-height:36px!important;
  min-width:76px!important;
  padding:0 28px 0 10px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.erp-page-top-count{
  display:flex!important;
  align-items:center!important;
  min-height:36px!important;
  margin-left:auto!important;
}

/* ---------- TABLE WRAPPER ---------- */
.erp-paged-table{
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
.erp-paged-table > .table-scroll,
.table-scroll,
.table-wrap,
.table-responsive{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}

/* ---------- TABLE ---------- */
.data-table,
.approved-table,
.erp-paged-table table{
  width:100%!important;
  min-width:100%!important;
  border-collapse:collapse!important;
  table-layout:auto!important;
  margin:0!important;
}
.data-table thead tr,
.approved-table thead tr,
.erp-paged-table table thead tr{
  height:44px!important;
}
.data-table th,
.approved-table th,
.erp-paged-table table th{
  height:44px!important;
  padding:9px 10px!important;
  vertical-align:middle!important;
  text-align:left!important;
  box-sizing:border-box!important;
  line-height:1.2!important;
}
.data-table td,
.approved-table td,
.erp-paged-table table td{
  min-height:50px!important;
  padding:10px 10px!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
  line-height:1.3!important;
}
.data-table th.r,
.data-table td.r,
.approved-table th.r,
.approved-table td.r{
  text-align:right!important;
}
.data-table th.c,
.data-table td.c,
.approved-table th.c,
.approved-table td.c{
  text-align:center!important;
}
.data-table tbody tr,
.approved-table tbody tr,
.erp-paged-table table tbody tr{
  height:54px!important;
}

/* First serial-number column centered */
.data-table th:first-child,
.data-table td:first-child,
.approved-table th:first-child,
.approved-table td:first-child{
  text-align:center!important;
}

/* Last action column aligned and sized consistently */
.data-table th:last-child,
.data-table td:last-child,
.approved-table th:last-child,
.approved-table td:last-child{
  text-align:center!important;
  vertical-align:middle!important;
}
.data-table td:last-child .btn,
.approved-table td:last-child .btn,
.action-stack .btn{
  min-height:30px!important;
  height:30px!important;
  padding:0 11px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:2px!important;
  white-space:nowrap!important;
}
.action-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:4px!important;
  min-width:86px!important;
}
.action-stack .btn{
  width:100%!important;
  margin:0!important;
}

/* ---------- PAGINATION ---------- */
.erp-pager{
  min-height:46px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:7px 12px!important;
  margin:0!important;
  gap:10px!important;
  box-sizing:border-box!important;
}
.erp-pager-nav{
  min-height:32px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
}
.erp-pager-nav .btn{
  min-height:30px!important;
  height:30px!important;
  padding:0 9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.erp-pager-page{
  display:flex!important;
  align-items:center!important;
  min-height:30px!important;
}
.erp-pager-count{
  display:flex!important;
  align-items:center!important;
  min-height:30px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
}

/* ---------- FORM GRID ---------- */
.form-grid,
.site-form-grid{
  align-items:start!important;
}
.field,
.form-group{
  min-width:0!important;
  box-sizing:border-box!important;
}
.field label,
.form-group label{
  display:flex!important;
  align-items:flex-end!important;
  min-height:18px!important;
  margin:0 0 5px!important;
}
.field input,
.field select,
.field textarea,
.form-group input,
.form-group select,
.form-group textarea{
  width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
}
.form-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  margin-top:12px!important;
}
.form-actions .btn{
  min-height:36px!important;
}

/* ---------- TABS ---------- */
.tabs,
.tab-bar,
.subtabs,
.admin-tabs{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:5px!important;
}
.tab,
.tab-btn,
.admin-tab,
.subtab,
.sub-tab{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  margin:0!important;
}

/* ---------- DASHBOARD ---------- */
.approved-dashboard{
  width:100%!important;
  box-sizing:border-box!important;
}
.approved-kpis,
.approved-dash-grid-main,
.approved-dash-grid-lower{
  align-items:stretch!important;
}
.approved-card,
.approved-map-card{
  height:100%!important;
  box-sizing:border-box!important;
}
.approved-card-row{
  min-height:30px!important;
  align-items:center!important;
}
.approved-card-row h3{
  margin:0!important;
}

/* ---------- ADMIN ---------- */
.admin-grid,
.settings-grid,
.permission-grid,
.role-grid,
.module-grid{
  align-items:start!important;
}
.module-row,
.cust-mod-row,
.cust-subtab-row,
.permission-row,
.role-row,
.user-row{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  box-sizing:border-box!important;
}

/* ---------- DESKTOP WIDTH BEHAVIOR ---------- */
@media(min-width:1101px){
  .panel-head-extra{
    margin-left:auto!important;
  }
  .data-table th:last-child,
  .data-table td:last-child{
    min-width:105px!important;
  }
}

/* ---------- MID WIDTH ---------- */
@media(max-width:1250px){
  .data-table th,
  .approved-table th{
    padding-left:8px!important;
    padding-right:8px!important;
  }
  .data-table td,
  .approved-table td{
    padding-left:8px!important;
    padding-right:8px!important;
  }
  .adv-filter-bar > div:first-child{
    grid-template-columns:auto minmax(180px,1fr) auto auto!important;
  }
}

/* ---------- MOBILE ---------- */
@media(max-width:900px){
  #content,.content{padding:10px!important}
  .period-bar{padding:10px!important}
  .adv-filter-bar > div:first-child{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .adv-filter-bar > div:first-child > label,
  .adv-filter-bar > div:first-child > input{
    grid-column:1/-1!important;
  }
  .erp-page-top{
    align-items:flex-start!important;
    flex-wrap:wrap!important;
  }
  .erp-page-top-count{
    width:100%!important;
    margin:0!important;
  }
  .erp-pager{
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
  .erp-pager-count{
    position:static!important;
    transform:none!important;
    width:100%!important;
    justify-content:flex-end!important;
  }
}


/* V90.6P14 — FINAL ALIGNMENT NORMALIZATION
   Fixes Tender deadline alert and provides final shared alignment rules
   for every page, tab, card, panel, table and action area.
*/

/* ---------- DEADLINE / ALERT CARD ---------- */
.deadline-alert-card{
  position:relative!important;
  margin:12px 0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:10px!important;
  border-left:0!important;
  min-height:0!important;
}
.deadline-alert-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:linear-gradient(180deg,#5b74db 0%,#8b5bd7 50%,#d34a91 100%);
}
.deadline-alert-head{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:40px!important;
  padding:10px 14px 4px 16px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.deadline-alert-icon{
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#d35d69!important;
}
.deadline-alert-icon svg{
  width:16px!important;
  height:16px!important;
}
.deadline-alert-head > strong{
  display:flex!important;
  align-items:baseline!important;
  gap:4px!important;
  margin:0!important;
  font-size:14px!important;
  line-height:1.3!important;
}
.deadline-alert-head > strong span{
  font-weight:700!important;
}
.deadline-alert-list{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  padding:2px 14px 12px 16px!important;
  margin:0!important;
}
.deadline-alert-row{
  display:grid!important;
  grid-template-columns:12px minmax(0,1fr)!important;
  align-items:start!important;
  gap:7px!important;
  min-height:22px!important;
  padding:0!important;
  margin:0!important;
}
.deadline-alert-dot{
  width:5px!important;
  height:5px!important;
  border-radius:50%!important;
  margin-top:7px!important;
  justify-self:center!important;
  background:#d35d69!important;
}
.deadline-alert-content{
  display:flex!important;
  align-items:baseline!important;
  flex-wrap:wrap!important;
  gap:4px!important;
  min-width:0!important;
  margin:0!important;
  font-size:13px!important;
  line-height:1.45!important;
}
.deadline-alert-content > strong{
  font-size:13px!important;
  margin:0!important;
}
.deadline-alert-sep{
  opacity:.55!important;
}
.deadline-alert-days{
  color:#d24c5c!important;
  font-weight:650!important;
}

/* Dark alert colors */
html[data-theme="dark"] .deadline-alert-card{
  background:#0e2236!important;
  border-color:#29455e!important;
}
html[data-theme="dark"] .deadline-alert-head,
html[data-theme="dark"] .deadline-alert-content{
  color:#e7eff7!important;
}
html[data-theme="dark"] .deadline-alert-icon,
html[data-theme="dark"] .deadline-alert-dot,
html[data-theme="dark"] .deadline-alert-days{
  color:#df7984!important;
}
html[data-theme="dark"] .deadline-alert-dot{
  background:#df7984!important;
}
html[data-theme="dark"] .deadline-alert-card::before{
  background:#b25262!important;
}

/* Light alert colors */
html[data-theme="light"] .deadline-alert-card{
  background:#fff!important;
  border-color:#dce5ee!important;
}
html[data-theme="light"] .deadline-alert-card::before{
  background:#d15364!important;
}

/* ---------- SHARED VERTICAL RHYTHM ---------- */
#content > div,
.content > div{
  box-sizing:border-box!important;
}
#content > div:not(:first-child),
.content > div:not(:first-child){
  margin-top:12px!important;
}

/* Normalize direct panel placement so decorative rails never overlap content */
.panel{
  position:relative!important;
}
.panel > .panel-head:first-child,
.panel > .panel-body:first-child{
  margin-left:0!important;
}

/* ---------- PANEL HEADER ---------- */
.panel-head{
  padding-left:14px!important;
  padding-right:14px!important;
}
.panel-head-extra{
  gap:6px!important;
}
.panel-head-extra .btn,
.panel-head-extra button,
.panel-head-extra select{
  height:32px!important;
  min-height:32px!important;
}

/* ---------- TENDER / OTHER KPI ROWS ---------- */
.dash-cards{
  gap:10px!important;
  margin:12px 0!important;
  align-items:stretch!important;
}
.dash-cards > .panel{
  min-height:88px!important;
  padding:12px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.dash-cards > .panel > div:first-child{
  margin-bottom:4px!important;
}

/* ---------- TABLE COLUMN ALIGNMENT ---------- */
/* Numeric columns get consistent tabular figures. */
.data-table td,
.approved-table td,
.erp-paged-table td{
  font-variant-numeric:tabular-nums!important;
}
.data-table th,
.approved-table th,
.erp-paged-table th{
  white-space:nowrap!important;
}

/* Avoid buttons making rows taller than neighboring rows. */
.data-table td .btn,
.approved-table td .btn,
.erp-paged-table td .btn{
  vertical-align:middle!important;
}

/* ---------- TOP PAGE FILTERS ---------- */
.period-bar{
  margin-bottom:12px!important;
}
.adv-filter-bar{
  margin-bottom:12px!important;
}
.period-bar + .adv-filter-bar{
  margin-top:0!important;
}

/* ---------- TAB / SUBTAB ROWS ---------- */
.tabs,
.tab-bar,
.subtabs,
.admin-tabs{
  min-height:38px!important;
  padding:3px!important;
  box-sizing:border-box!important;
}
.tab,
.tab-btn,
.admin-tab,
.subtab,
.sub-tab{
  height:32px!important;
  min-height:32px!important;
  padding:0 12px!important;
}

/* ---------- BUTTON BASELINE ---------- */
.btn,
button{
  vertical-align:middle!important;
}
.btn.small{
  min-height:30px!important;
  height:30px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* ---------- PAGE TITLES ---------- */
.section-title{
  margin:14px 0 8px!important;
  padding:0!important;
  min-height:22px!important;
  display:flex!important;
  align-items:center!important;
}

/* ---------- ADMIN / SETTINGS ---------- */
.admin-section-header,
.settings-section-header,
.permission-section-header,
.role-section-header,
.module-section-header{
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:9px 12px!important;
}
.module-row,
.cust-mod-row,
.cust-subtab-row,
.permission-row,
.role-row,
.user-row{
  padding:8px 10px!important;
}

/* ---------- DASHBOARD CARDS ---------- */
.approved-card,
.approved-map-card,
.approved-attention{
  padding:14px!important;
}
.approved-card-row{
  margin-bottom:10px!important;
}

/* ---------- RESPONSIVE ---------- */
@media(max-width:900px){
  .deadline-alert-content{
    font-size:12px!important;
  }
  .deadline-alert-row{
    grid-template-columns:10px minmax(0,1fr)!important;
  }
  .deadline-alert-list{
    padding-right:10px!important;
  }
}


/* V90.6P15 — TENDER REGISTER COLUMN ALIGNMENT
   Stable column widths, consistent alignment and professional spacing.
*/

.tender-register-panel .erp-paged-table{
  width:100%!important;
  overflow:hidden!important;
}

.tender-register-panel .table-scroll{
  width:100%!important;
  overflow-x:auto!important;
}

.tender-register-panel table.data-table{
  width:100%!important;
  min-width:1320px!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}

/* Exact column structure:
   1 Sr, 2 Select, 3 No, 4 Title, 5 Client, 6 Ref,
   7 Deadline, 8 Days Left, 9 Value, 10 Priority,
   11 Status, 12 Last Step, 13 Owner, 14 EMD, 15 Action
*/
.tender-register-panel .data-table th:nth-child(1),
.tender-register-panel .data-table td:nth-child(1){width:58px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(2),
.tender-register-panel .data-table td:nth-child(2){width:58px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(3),
.tender-register-panel .data-table td:nth-child(3){width:120px!important;text-align:left!important;}

.tender-register-panel .data-table th:nth-child(4),
.tender-register-panel .data-table td:nth-child(4){width:130px!important;text-align:left!important;}

.tender-register-panel .data-table th:nth-child(5),
.tender-register-panel .data-table td:nth-child(5){width:95px!important;text-align:left!important;}

.tender-register-panel .data-table th:nth-child(6),
.tender-register-panel .data-table td:nth-child(6){width:115px!important;text-align:left!important;}

.tender-register-panel .data-table th:nth-child(7),
.tender-register-panel .data-table td:nth-child(7){width:110px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(8),
.tender-register-panel .data-table td:nth-child(8){width:82px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(9),
.tender-register-panel .data-table td:nth-child(9){width:105px!important;text-align:right!important;}

.tender-register-panel .data-table th:nth-child(10),
.tender-register-panel .data-table td:nth-child(10){width:82px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(11),
.tender-register-panel .data-table td:nth-child(11){width:105px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(12),
.tender-register-panel .data-table td:nth-child(12){width:150px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(13),
.tender-register-panel .data-table td:nth-child(13){width:105px!important;text-align:left!important;}

.tender-register-panel .data-table th:nth-child(14),
.tender-register-panel .data-table td:nth-child(14){width:145px!important;text-align:center!important;}

.tender-register-panel .data-table th:nth-child(15),
.tender-register-panel .data-table td:nth-child(15){width:100px!important;text-align:center!important;}

/* Header */
.tender-register-panel .data-table thead tr{
  height:46px!important;
}
.tender-register-panel .data-table thead th{
  height:46px!important;
  padding:0 9px!important;
  vertical-align:middle!important;
  line-height:1.15!important;
  font-weight:800!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  box-sizing:border-box!important;
}

/* Body */
.tender-register-panel .data-table tbody tr{
  height:64px!important;
}
.tender-register-panel .data-table tbody td{
  height:64px!important;
  padding:8px 9px!important;
  vertical-align:middle!important;
  line-height:1.25!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  box-sizing:border-box!important;
}

/* Text can wrap in descriptive columns only */
.tender-register-panel .data-table td:nth-child(4),
.tender-register-panel .data-table td:nth-child(5),
.tender-register-panel .data-table td:nth-child(6),
.tender-register-panel .data-table td:nth-child(12),
.tender-register-panel .data-table td:nth-child(13),
.tender-register-panel .data-table td:nth-child(14){
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

/* Keep IDs, date, numeric and status compact */
.tender-register-panel .data-table td:nth-child(1),
.tender-register-panel .data-table td:nth-child(2),
.tender-register-panel .data-table td:nth-child(3),
.tender-register-panel .data-table td:nth-child(7),
.tender-register-panel .data-table td:nth-child(8),
.tender-register-panel .data-table td:nth-child(9),
.tender-register-panel .data-table td:nth-child(10),
.tender-register-panel .data-table td:nth-child(11){
  white-space:nowrap!important;
}

/* Action stack */
.tender-register-panel .data-table td:nth-child(15){
  padding:6px!important;
}
.tender-register-panel .data-table td:nth-child(15) .btn{
  width:86px!important;
  height:29px!important;
  min-height:29px!important;
  margin:2px auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 8px!important;
  line-height:1!important;
}

/* Select checkbox centered exactly */
.tender-register-panel .data-table th:nth-child(2) input,
.tender-register-panel .data-table td:nth-child(2) input{
  display:block!important;
  margin:0 auto!important;
}

/* EMD status/button centered and constrained */
.tender-register-panel .data-table td:nth-child(14) .btn,
.tender-register-panel .data-table td:nth-child(14) .stamp{
  max-width:130px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Value uses tabular figures */
.tender-register-panel .data-table th:nth-child(9),
.tender-register-panel .data-table td:nth-child(9){
  font-variant-numeric:tabular-nums!important;
}

/* Remove decorative left rails from table/header that visually disturb alignment */
.tender-register-panel,
.tender-register-panel .panel-head,
.tender-register-panel .panel-body,
.tender-register-panel .erp-page-top,
.tender-register-panel .table-scroll{
  border-left-width:1px!important;
}
.tender-register-panel::before,
.tender-register-panel .panel-head::before,
.tender-register-panel .panel-body::before,
.tender-register-panel .erp-page-top::before{
  display:none!important;
}

/* Consistent top controls in the Tender register */
.tender-register-panel .panel-head-extra{
  min-width:230px!important;
  justify-content:flex-end!important;
}
.tender-register-panel .erp-page-top{
  min-height:50px!important;
  padding:7px 12px!important;
}
.tender-register-panel .erp-pager{
  min-height:44px!important;
}

/* Dark */
html[data-theme="dark"] .tender-register-panel .data-table thead th{
  background:#14304a!important;
  color:#cfdae6!important;
  border-color:#35516a!important;
}
html[data-theme="dark"] .tender-register-panel .data-table tbody td{
  border-color:#29435b!important;
}

/* Light */
html[data-theme="light"] .tender-register-panel .data-table thead th{
  background:#f2f6fa!important;
  color:#34495f!important;
  border-color:#d8e2ec!important;
}

/* Shared register header alignment: all tables */
.panel .data-table thead th,
.panel .approved-table thead th{
  vertical-align:middle!important;
}
.panel .data-table tbody td,
.panel .approved-table tbody td{
  vertical-align:middle!important;
}

/* On smaller desktops keep alignment through horizontal scrolling instead of crushing */
@media(max-width:1450px){
  .tender-register-panel table.data-table{
    min-width:1320px!important;
  }
}


/* V90.6P16 — GLOBAL TABLE BLUE ACCENT RAIL
   Adds the approved thin blue status/accent line to EVERY register table.
   Keeps V90.6.15 column alignment intact.
*/

/* Any panel containing a paged/register table becomes an accent container. */
.panel:has(.erp-paged-table),
.panel:has(.data-table),
.panel:has(.approved-table){
  position:relative!important;
  overflow:hidden!important;
  border-left:1px solid var(--erp-border, #d8e2ec)!important;
}

/* Main continuous accent rail */
.panel:has(.erp-paged-table)::before,
.panel:has(.data-table)::before,
.panel:has(.approved-table)::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:8!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:4px!important;
  border-radius:10px 0 0 10px!important;
  pointer-events:none!important;
  background:linear-gradient(
    180deg,
    #3b82f6 0%,
    #4f72e8 38%,
    #536edc 68%,
    #3b82f6 100%
  )!important;
  box-shadow:none!important;
}

/* Keep all table content clear of the rail. */
.panel:has(.erp-paged-table) > .panel-head,
.panel:has(.data-table) > .panel-head,
.panel:has(.approved-table) > .panel-head,
.panel:has(.erp-paged-table) > .panel-body,
.panel:has(.data-table) > .panel-body,
.panel:has(.approved-table) > .panel-body{
  margin-left:4px!important;
  width:calc(100% - 4px)!important;
  box-sizing:border-box!important;
}

/* Table elements themselves must never create duplicate rails. */
.erp-paged-table,
.table-scroll,
.table-wrap,
.table-responsive,
.data-table,
.approved-table{
  border-left:0!important;
}
.erp-paged-table::before,
.table-scroll::before,
.table-wrap::before,
.table-responsive::before,
.data-table::before,
.approved-table::before{
  display:none!important;
}

/* Slightly emphasize rail around header/table/pager junctions without adding
   separate decorative strips. */
.panel:has(.erp-paged-table) .panel-head,
.panel:has(.erp-paged-table) .erp-page-top,
.panel:has(.erp-paged-table) .erp-pager{
  border-left:0!important;
}

/* Tender-specific V90.6.15 rail suppression is superseded by this global rail. */
.tender-register-panel::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:8!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:4px!important;
  background:linear-gradient(180deg,#3b82f6,#4f72e8 50%,#3b82f6)!important;
}
.tender-register-panel{
  border-left:1px solid var(--erp-border, #d8e2ec)!important;
}
.tender-register-panel > .panel-head,
.tender-register-panel > .panel-body{
  margin-left:4px!important;
  width:calc(100% - 4px)!important;
}

/* Light mode rail */
html[data-theme="light"] .panel:has(.erp-paged-table)::before,
html[data-theme="light"] .panel:has(.data-table)::before,
html[data-theme="light"] .panel:has(.approved-table)::before,
html[data-theme="light"] .tender-register-panel::before{
  background:linear-gradient(
    180deg,
    #356fe8 0%,
    #566fe4 45%,
    #426fd9 100%
  )!important;
}

/* Dark mode rail: brighter enough to be visible but still professional. */
html[data-theme="dark"] .panel:has(.erp-paged-table)::before,
html[data-theme="dark"] .panel:has(.data-table)::before,
html[data-theme="dark"] .panel:has(.approved-table)::before,
html[data-theme="dark"] .tender-register-panel::before{
  background:linear-gradient(
    180deg,
    #4b91d1 0%,
    #437db8 48%,
    #2e659d 100%
  )!important;
}

/* Hovering a register subtly brightens only the line, not the whole table. */
@media (hover:hover) and (pointer:fine){
  .panel:has(.erp-paged-table):hover::before,
  .panel:has(.data-table):hover::before,
  .panel:has(.approved-table):hover::before{
    filter:brightness(1.12)!important;
  }
}

/* Mobile: keep visible but thinner. */
@media(max-width:760px){
  .panel:has(.erp-paged-table)::before,
  .panel:has(.data-table)::before,
  .panel:has(.approved-table)::before,
  .tender-register-panel::before{
    width:3px!important;
  }
  .panel:has(.erp-paged-table) > .panel-head,
  .panel:has(.erp-paged-table) > .panel-body,
  .panel:has(.data-table) > .panel-head,
  .panel:has(.data-table) > .panel-body,
  .panel:has(.approved-table) > .panel-head,
  .panel:has(.approved-table) > .panel-body,
  .tender-register-panel > .panel-head,
  .tender-register-panel > .panel-body{
    margin-left:3px!important;
    width:calc(100% - 3px)!important;
  }
}

/* V90.7.120 — notification drawer clear control */
.notif-drawer-foot{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
}
.notif-clear-btn{
  margin-right:auto!important;
  border-color:rgba(248,113,113,.42)!important;
  color:#fecaca!important;
  background:rgba(127,29,29,.18)!important;
}
.notif-clear-btn:hover:not(:disabled){
  border-color:#f87171!important;
  color:#fff!important;
  background:rgba(185,28,28,.38)!important;
}
.notif-clear-btn:disabled{opacity:.4!important;cursor:not-allowed!important}


/* V90.6P17 — PROFESSIONAL FILTERS + CITY MAP PINS */

/* Map filter becomes a clear segmented control with counts. */
.approved-map-tabs{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  padding:4px!important;
  border-radius:10px!important;
  background:rgba(8,28,52,.72)!important;
  border:1px solid rgba(126,160,195,.20)!important;
}
.approved-map-tabs button{
  min-width:74px!important;
  height:36px!important;
  padding:0 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  border:1px solid transparent!important;
  border-radius:7px!important;
  background:transparent!important;
  color:#c7d6e5!important;
  font-size:11.5px!important;
  font-weight:650!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
.approved-map-tabs button b{
  min-width:19px!important;
  height:19px!important;
  padding:0 5px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.08)!important;
  color:#dbe7f3!important;
  font-size:9px!important;
}
.approved-map-tabs button:hover{
  background:rgba(255,255,255,.06)!important;
  color:#fff!important;
}
.approved-map-tabs button.active,
.approved-map-tabs button[aria-pressed="true"]{
  background:#173c5d!important;
  color:#fff!important;
  border-color:#4c9db1!important;
  box-shadow:inset 0 0 0 1px rgba(76,157,177,.12)!important;
}
.approved-map-tabs button.active::after{display:none!important}
.approved-map-tabs button.active b{
  background:#2b887b!important;
  color:#fff!important;
}

/* City pins */
.approved-project-pins .project-pin{
  cursor:pointer!important;
  transition:opacity .14s ease,filter .14s ease!important;
}
.approved-project-pins .pin-marker{
  stroke:#f8fbff!important;
  stroke-width:1.25!important;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.38))!important;
}
.approved-project-pins .pin-progress .pin-marker{fill:#d99a2b!important}
.approved-project-pins .pin-completed .pin-marker{fill:#2d9868!important}
.approved-project-pins .pin-active .pin-marker{fill:#3278b9!important}
.approved-project-pins .pin-core{fill:#fff!important}
.approved-project-pins .project-pin:hover .pin-marker,
.approved-project-pins .project-pin:focus .pin-marker{
  stroke-width:2!important;
  filter:drop-shadow(0 3px 5px rgba(0,0,0,.48)) brightness(1.12)!important;
}
.approved-project-pins .pin-hidden{display:none!important}
.map-tip-project{
  display:block!important;
  padding:2px 0 6px!important;
  color:#d5e2ee!important;
  font-size:9px!important;
  line-height:1.3!important;
}
.approved-location-empty{
  min-height:80px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:12px!important;
  color:#8fa5ba!important;
  font-size:11px!important;
  text-align:center!important;
}

/* Strong filter visibility: unrelated states fade decisively. */
.approved-state-layer .india-state.map-filter-muted{
  opacity:.18!important;
  fill:#16334f!important;
  filter:saturate(.30)!important;
}
.approved-state-layer .india-state.map-filter-match{
  opacity:1!important;
  stroke:#d9edf4!important;
  stroke-width:1.35!important;
  filter:brightness(1.10)!important;
}

/* -------- PROFESSIONAL TAB SYSTEM EVERYWHERE -------- */
.tabs,
.tab-bar,
.subtabs,
.admin-tabs,
.segmented-tabs,
.page-tabs{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:4px!important;
  padding:4px!important;
  border:1px solid var(--erp-border,#d8e2ec)!important;
  border-radius:10px!important;
  background:var(--erp-card-2,#f8fafc)!important;
}
.tab,
.tab-btn,
.admin-tab,
.subtab,
.sub-tab,
.page-tab{
  min-height:34px!important;
  height:34px!important;
  padding:0 12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  border:1px solid transparent!important;
  border-radius:7px!important;
  background:transparent!important;
  color:var(--erp-text-2,#334b63)!important;
  font-size:12px!important;
  font-weight:650!important;
  box-shadow:none!important;
}
.tab:hover,
.tab-btn:hover,
.admin-tab:hover,
.subtab:hover,
.sub-tab:hover,
.page-tab:hover{
  background:var(--erp-blue-soft,#e9f2fb)!important;
}
.tab.active,
.tab-btn.active,
.admin-tab.active,
.subtab.active,
.sub-tab.active,
.page-tab.active{
  background:var(--erp-blue,#2f73b7)!important;
  border-color:var(--erp-blue,#2f73b7)!important;
  color:#fff!important;
}

/* -------- PERIOD / DATE FILTER PROFESSIONAL SYSTEM -------- */
.period-bar:not(.adv-filter-bar){
  min-height:62px!important;
  padding:11px 14px!important;
  gap:9px!important;
  border-radius:11px!important;
  border:1px solid var(--erp-border,#d8e2ec)!important;
  background:var(--erp-card,#fff)!important;
  box-shadow:var(--erp-shadow,0 6px 18px rgba(15,39,70,.055))!important;
}
.period-bar:not(.adv-filter-bar) > label{
  height:38px!important;
  min-height:38px!important;
  display:inline-flex!important;
  align-items:center!important;
  color:var(--erp-text-2,#334b63)!important;
  font-size:12px!important;
  font-weight:700!important;
}
.period-bar:not(.adv-filter-bar) > select,
.period-bar:not(.adv-filter-bar) > input{
  height:38px!important;
  min-height:38px!important;
  padding:0 11px!important;
  border-radius:7px!important;
  border:1px solid var(--erp-border,#d8e2ec)!important;
  background:var(--erp-card-2,#f8fafc)!important;
  color:var(--erp-text,#0f2238)!important;
  font-size:12.5px!important;
  font-weight:600!important;
}
.period-bar:not(.adv-filter-bar) > button{
  height:38px!important;
  min-height:38px!important;
  padding:0 14px!important;
  border-radius:7px!important;
  background:var(--erp-blue-soft,#e9f2fb)!important;
  border:1px solid #8db2d4!important;
  color:var(--erp-blue-strong,#245f99)!important;
  font-weight:750!important;
}
.period-bar:not(.adv-filter-bar) > button:hover{
  background:var(--erp-blue,#2f73b7)!important;
  border-color:var(--erp-blue,#2f73b7)!important;
  color:#fff!important;
}

/* Dark mode filter */
html[data-theme="dark"] .period-bar:not(.adv-filter-bar){
  background:#0d2135!important;
  border-color:#29445f!important;
}
html[data-theme="dark"] .period-bar:not(.adv-filter-bar) > label{
  color:#bdcedd!important;
}
html[data-theme="dark"] .period-bar:not(.adv-filter-bar) > select,
html[data-theme="dark"] .period-bar:not(.adv-filter-bar) > input{
  background:#091c2d!important;
  border-color:#35516a!important;
  color:#eef5fb!important;
}
html[data-theme="dark"] .period-bar:not(.adv-filter-bar) > button{
  background:#173858!important;
  border-color:#436b8b!important;
  color:#dce9f5!important;
}
html[data-theme="dark"] .period-bar:not(.adv-filter-bar) > button:hover{
  background:#286faa!important;
  border-color:#4b88b9!important;
  color:#fff!important;
}

/* Compact responsive behavior */
@media(max-width:900px){
  .approved-map-tabs{
    width:100%!important;
    overflow-x:auto!important;
    justify-content:flex-start!important;
  }
  .approved-map-tabs button{
    flex:0 0 auto!important;
  }
}


/* V90.6P18 — FAIL-SAFE MAP RENDERER */
.map-file-error{
  min-height:250px!important;
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  background:transparent!important;
  color:#9fb1c4!important;
  border:1px dashed rgba(139,166,192,.28)!important;
  border-radius:10px!important;
}
.map-file-error strong{color:#d6e2ee!important;font-size:12px!important}
.map-file-error span{font-size:10px!important}


/* V90.6P19 — CORRECT FUNNEL CONVERSION METRICS */
.approved-conversion-v2{
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(0,.9fr)!important;
  gap:10px!important;
  padding:10px 12px!important;
  align-items:stretch!important;
}
.approved-conversion-v2 .conversion-primary{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.approved-conversion-v2 .conversion-primary small{
  display:block!important;
  margin:0 0 3px!important;
  font-size:10.5px!important;
  font-weight:700!important;
}
.approved-conversion-v2 .conversion-primary strong{
  display:block!important;
  margin:0!important;
  font-size:21px!important;
  line-height:1.1!important;
  color:#169b62!important;
}
.approved-conversion-v2 .conversion-primary span{
  display:block!important;
  margin-top:4px!important;
  font-size:9.5px!important;
  line-height:1.3!important;
  color:#75899e!important;
}
.approved-conversion-v2 .conversion-secondary{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
  border-left:1px solid #d6e5df!important;
  padding-left:10px!important;
}
.approved-conversion-v2 .conversion-secondary > div{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
}
.approved-conversion-v2 .conversion-secondary small{
  font-size:9.5px!important;
  color:#708397!important;
}
.approved-conversion-v2 .conversion-secondary b{
  font-size:11px!important;
  color:#21384d!important;
  font-variant-numeric:tabular-nums!important;
}

html[data-theme="dark"] .approved-conversion-v2 .conversion-primary strong{
  color:#55c991!important;
}
html[data-theme="dark"] .approved-conversion-v2 .conversion-primary span,
html[data-theme="dark"] .approved-conversion-v2 .conversion-secondary small{
  color:#8fa5ba!important;
}
html[data-theme="dark"] .approved-conversion-v2 .conversion-secondary{
  border-left-color:#31506a!important;
}
html[data-theme="dark"] .approved-conversion-v2 .conversion-secondary b{
  color:#e8f1f9!important;
}

@media(max-width:1100px){
  .approved-conversion-v2{
    grid-template-columns:1fr!important;
  }
  .approved-conversion-v2 .conversion-secondary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    border-left:0!important;
    border-top:1px solid #d6e5df!important;
    padding-left:0!important;
    padding-top:8px!important;
  }
  html[data-theme="dark"] .approved-conversion-v2 .conversion-secondary{
    border-top-color:#31506a!important;
  }
}


/* V90.6P20 — RELIABLE MAP TAB CONTROLLER */
.approved-map-tabs button{
  outline:none!important;
}
.approved-map-tabs button:focus-visible{
  outline:2px solid rgba(119,184,214,.78)!important;
  outline-offset:2px!important;
}
.approved-map-tabs button.active,
.approved-map-tabs button.selected,
.approved-map-tabs button[aria-pressed="true"]{
  background:#174464!important;
  border-color:#4c9db1!important;
  color:#fff!important;
}
.approved-map-tabs button:not(.active):not(.selected)[aria-pressed="false"]{
  background:transparent!important;
  border-color:transparent!important;
  color:#c6d5e3!important;
}
.approved-map-tabs .map-tab-count{
  min-width:20px!important;
  height:20px!important;
  padding:0 5px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:rgba(255,255,255,.09)!important;
  color:#dce8f2!important;
  font-size:9px!important;
  font-weight:800!important;
}
.approved-map-tabs button.active .map-tab-count,
.approved-map-tabs button.selected .map-tab-count{
  background:#2a8b7d!important;
  color:#fff!important;
}

/* Explicit visual filtering, even if earlier CSS rules conflict. */
#approvedIndiaMap .project-pin.pin-hidden{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
#approvedIndiaMap[data-current-filter="active"] .project-pin:not(.pin-active),
#approvedIndiaMap[data-current-filter="progress"] .project-pin:not(.pin-progress),
#approvedIndiaMap[data-current-filter="completed"] .project-pin:not(.pin-completed){
  display:none!important;
}

/* V90.6.35 — Personal Approval Inbox */
.approval-personal-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 18px}
.approval-personal-card{border:1px solid #d8e3ee;background:#fff;border-radius:12px;padding:13px 14px;display:flex;align-items:center;gap:11px;text-align:left;min-height:78px;color:#172b4d}
button.approval-personal-card{cursor:pointer}.approval-personal-card.is-active{border-color:#6f73ff;background:linear-gradient(135deg,#f6f7ff,#fff)}
.approval-personal-icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#eef4ff;color:#345bdb;font-size:17px;font-weight:800}
.approval-personal-card small{display:block;font-size:10px;font-weight:800;text-transform:uppercase;color:#6f8094}.approval-personal-card b{display:block;font-size:22px;margin:3px 0;color:#12233f}.approval-personal-card em{display:block;font-size:10px;font-style:normal;color:#7f90a4}
.approval-section-title{scroll-margin-top:86px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 8px;padding:0 2px}.approval-section-title small{font-size:9px;font-weight:850;letter-spacing:.1em;color:#6b72f6}.approval-section-title h3{margin:2px 0;font-size:16px;color:#12233f}.approval-section-title p{margin:0;font-size:10px;color:#7a8ca1}.approval-count-badge{min-width:34px;height:28px;padding:0 9px;border-radius:999px;background:#eef1ff;color:#4b4fd0;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:850}.approval-my-requests-block{border-top:1px solid #e5edf5;margin-top:20px;padding-top:2px}
html[data-theme="dark"] .approval-personal-card{background:#0f263c;border-color:#2d4d68;color:#eaf2fa}html[data-theme="dark"] .approval-personal-card.is-active{background:linear-gradient(135deg,#162d4a,#10283e);border-color:#6677ff}html[data-theme="dark"] .approval-personal-card small,html[data-theme="dark"] .approval-personal-card em,html[data-theme="dark"] .approval-section-title p{color:#8fa5ba}html[data-theme="dark"] .approval-personal-card b,html[data-theme="dark"] .approval-section-title h3{color:#edf5fc}html[data-theme="dark"] .approval-personal-icon{background:#173755;color:#8bbcff}html[data-theme="dark"] .approval-count-badge{background:#243458;color:#aeb7ff}
@media(max-width:900px){.approval-personal-summary{grid-template-columns:1fr}}

/* V90.6.36 current-screen search */
.global-search-match{position:relative!important;outline:2px solid #7c6cff!important;outline-offset:-2px!important;background:linear-gradient(90deg,rgba(124,108,255,.12),rgba(255,255,255,.02))!important;box-shadow:inset 4px 0 0 #7c6cff!important}
.global-search-dim{opacity:.28!important}
html[data-theme="dark"] .global-search-match{background:linear-gradient(90deg,rgba(124,108,255,.24),rgba(16,39,60,.06))!important}

/* V90.6.36 Approval System master control */
.approval-system-control{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 17px;margin:12px 0 15px;border:1px solid #cfe6da;border-radius:14px;background:linear-gradient(135deg,#f1fff8,#fff);box-shadow:0 7px 22px rgba(24,84,61,.05)}
.approval-system-control.is-paused{border-color:#f2d6b1;background:linear-gradient(135deg,#fff8ee,#fff)}.approval-system-copy{display:flex;align-items:center;gap:12px}.approval-system-icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:#dff7ea;color:#148356;font-size:18px;font-weight:900}.is-paused .approval-system-icon{background:#fff0d9;color:#b86a09}.approval-system-copy small{font-size:9px;font-weight:850;letter-spacing:.11em;color:#718399}.approval-system-copy h3{margin:2px 0;font-size:16px;color:#12233f}.approval-system-copy p{margin:0;font-size:10.5px;color:#73859a}.approval-master-switch{display:flex;align-items:center;gap:9px;cursor:pointer}.approval-master-switch input{position:absolute;opacity:0}.approval-master-switch span{width:48px;height:26px;border-radius:999px;background:#cbd5e1;position:relative}.approval-master-switch span:after{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:.2s}.approval-master-switch input:checked+span{background:#17a673}.approval-master-switch input:checked+span:after{transform:translateX(22px)}.approval-master-switch b{font-size:11px;color:#334155}.approval-system-state{font-size:10px;font-weight:850;padding:7px 11px;border-radius:999px;background:#dff7ea;color:#13734f}.is-paused .approval-system-state{background:#fff0d9;color:#a75f08}
html[data-theme="dark"] .approval-system-control{background:linear-gradient(135deg,#102f29,#0f263c);border-color:#285c4c}html[data-theme="dark"] .approval-system-control.is-paused{background:linear-gradient(135deg,#352818,#0f263c);border-color:#6c5127}html[data-theme="dark"] .approval-system-copy h3{color:#edf5fc}html[data-theme="dark"] .approval-system-copy p{color:#91a7ba}

/* V90.6.37 approval partial-load warning */
.approval-load-warning{display:flex;align-items:center;gap:10px;margin:10px 0 12px;padding:10px 12px;border:1px solid #f0d29a;border-radius:10px;background:#fff8e8;color:#7a5200;font-size:10.5px}.approval-load-warning b{font-size:11px}.approval-load-warning span{color:#8b6a26}html[data-theme="dark"] .approval-load-warning{background:#332915;border-color:#69542b;color:#ffd98c}html[data-theme="dark"] .approval-load-warning span{color:#d8b974}


/* V90.6.39 — Approval Module in Customization */
.approval-module-card{border:1px solid #dce5ef;border-radius:14px;background:#fff;overflow:hidden}
.approval-module-card.is-active{border-color:#b8e5d1;box-shadow:0 8px 24px rgba(27,126,88,.06)}
.approval-module-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #e6edf4;background:linear-gradient(135deg,#fbfdff,#f7f8ff)}
.approval-module-card.is-active .approval-module-head{background:linear-gradient(135deg,#f0fff7,#fbfffd)}
.approval-module-brand{display:flex;align-items:center;gap:12px}.approval-module-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#eef1ff;color:#4f46e5;font-size:20px;font-weight:900}.is-active .approval-module-mark{background:#ddf8e9;color:#0f8a5d}
.approval-module-eyebrow{font-size:9px;font-weight:850;letter-spacing:.12em;color:#687b91}.approval-module-brand h3{margin:2px 0;font-size:17px;color:#13233d}.approval-module-brand p{margin:0;font-size:11px;color:#74869a}.approval-module-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.approval-module-status{font-size:9.5px;font-weight:850;padding:7px 10px;border-radius:999px;background:#f1f5f9;color:#64748b}.is-active .approval-module-status{background:#dcf8e9;color:#147452}
.approval-module-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border-bottom:1px solid #e6edf4}.approval-module-overview>div{padding:13px 16px;border-right:1px solid #e6edf4}.approval-module-overview>div:last-child{border-right:0}.approval-module-overview small{display:block;font-size:8.5px;font-weight:850;letter-spacing:.08em;color:#7a8ca0}.approval-module-overview b{display:block;font-size:16px;margin:3px 0;color:#172b4d}.approval-module-overview span{display:block;font-size:9.5px;color:#8392a5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.approval-module-details{padding:15px 18px}.approval-module-details.is-muted{background:#fafbfc}.approval-module-details-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.approval-module-details-head b{display:block;font-size:12px;color:#243750}.approval-module-details-head span{display:block;font-size:9.5px;color:#8191a4;margin-top:2px}.approval-module-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.approval-rule-summary{border:1px solid #dde6ef;border-radius:10px;padding:11px 12px;background:#fff}.approval-rule-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.approval-rule-top b{font-size:11px;color:#172b4d}.approval-rule-top>span{font-size:9px;padding:4px 7px;border-radius:999px;background:#f1f5f9;color:#52657b}.approval-rule-flow{display:flex;align-items:center;gap:8px;margin-top:10px}.approval-person{font-size:10px;font-weight:750;color:#33485f}.approval-person small{display:block;font-size:8px;font-weight:500;color:#8495a7;margin-top:1px}.approval-flow-arrow{color:#7c6cff;font-weight:900}.approval-module-empty{padding:18px;text-align:center;border:1px dashed #ced9e4;border-radius:10px;background:#fafcfe}.approval-module-empty b,.approval-module-empty span{display:block}.approval-module-empty b{font-size:12px;color:#344a61}.approval-module-empty span{font-size:9.5px;color:#8494a6;margin-top:4px}
.approval-module-editor{border-top:1px solid #dce5ef;padding:15px 18px;background:#f9fbfd}.approval-editor-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}.approval-editor-head small{font-size:8.5px;font-weight:850;letter-spacing:.1em;color:#6558d8}.approval-editor-head h4{font-size:14px;margin:2px 0;color:#172b4d}.approval-editor-head p{font-size:9.5px;margin:0;color:#8091a4}
html[data-theme="dark"] .approval-module-card{background:#0f263c;border-color:#2e4d67}html[data-theme="dark"] .approval-module-head{background:linear-gradient(135deg,#10283e,#122b43);border-bottom-color:#2e4d67}html[data-theme="dark"] .approval-module-card.is-active .approval-module-head{background:linear-gradient(135deg,#10342d,#10283e)}html[data-theme="dark"] .approval-module-brand h3,html[data-theme="dark"] .approval-module-overview b,html[data-theme="dark"] .approval-rule-top b,html[data-theme="dark"] .approval-person,html[data-theme="dark"] .approval-editor-head h4{color:#edf5fc}html[data-theme="dark"] .approval-module-brand p,html[data-theme="dark"] .approval-module-overview span,html[data-theme="dark"] .approval-module-details-head span,html[data-theme="dark"] .approval-person small,html[data-theme="dark"] .approval-editor-head p{color:#93a8bb}html[data-theme="dark"] .approval-module-overview,html[data-theme="dark"] .approval-module-overview>div,html[data-theme="dark"] .approval-module-editor{border-color:#2d4c65}html[data-theme="dark"] .approval-module-editor,html[data-theme="dark"] .approval-module-details.is-muted{background:#0c2134}html[data-theme="dark"] .approval-rule-summary,html[data-theme="dark"] .approval-module-empty{background:#102a41;border-color:#36556e}
@media(max-width:980px){.approval-module-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.approval-module-rule-grid{grid-template-columns:1fr}}@media(max-width:680px){.approval-module-head,.approval-editor-head{align-items:flex-start;flex-direction:column}.approval-module-overview{grid-template-columns:1fr}}


/* V90.6.43 — Users fast-open loading shell */
.users-fast-loading{min-height:92px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--text)}
.users-fast-loading b,.users-fast-loading small{display:block}.users-fast-loading b{font-size:13px}.users-fast-loading small{font-size:10px;color:var(--text-dim);margin-top:2px}
.users-loading-spinner{width:24px;height:24px;border-radius:50%;border:3px solid rgba(99,102,241,.18);border-top-color:#6366f1;animation:usersSpin .7s linear infinite}
@keyframes usersSpin{to{transform:rotate(360deg)}}

/* V90.6.48 partial payment */
.payment-hold-note{font-size:9.5px;font-weight:800;color:#b54708;margin-top:4px}.early-pay-note{font-size:9px;font-weight:750;color:#6941c6;margin-top:4px}


/* V90.6.50 — Approval rule tabs + bulk approval controls */
.approval-rule-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0 14px}
.approval-rule-tab{appearance:none;border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:12px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;font-weight:800;box-shadow:0 4px 14px rgba(15,23,42,.04);transition:.16s ease}
.approval-rule-tab span{font-size:11px;text-transform:uppercase;letter-spacing:.035em;text-align:left}
.approval-rule-tab b{min-width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:var(--soft);font-size:14px}
.approval-rule-tab:hover{transform:translateY(-1px);border-color:#8b7cff}
.approval-rule-tab.is-active{border-color:#635bff;box-shadow:0 0 0 2px rgba(99,91,255,.10);background:linear-gradient(135deg,rgba(99,91,255,.10),rgba(255,255,255,.02))}
.approval-rule-tab.is-active b{background:#635bff;color:white}
.approval-bulk-toolbar{margin:12px 0;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(135deg,var(--card),var(--soft));display:flex;align-items:center;gap:14px;justify-content:space-between;flex-wrap:wrap}
.approval-bulk-toolbar>div:first-child b{font-size:13px}
.approval-bulk-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.approval-bulk-actions>span{font-size:10.5px;font-weight:800;color:var(--text-dim);min-width:72px;text-align:right}
.approval-row-select,.payable-approval-select{width:16px;height:16px;accent-color:#635bff;cursor:pointer}
.payable-bulk-toolbar{margin:0 0 10px}
@media(max-width:760px){.approval-rule-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.approval-bulk-actions{margin-left:0;width:100%}.approval-bulk-actions>span{text-align:left}}


/* V90.6.52 — professional vendor-payment approval states */
.payment-awaiting-card,.payment-request-cell{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.payment-awaiting-btn{background:#f1f5f9!important;border:1px solid #cbd5e1!important;color:#475569!important;cursor:not-allowed!important;box-shadow:none!important;opacity:1!important}
.payment-awaiting-meta{font-size:9.5px;line-height:1.25;color:#64748b;max-width:180px}
.payment-remaining-note{font-size:9.5px;line-height:1.25;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;border-radius:6px;padding:3px 6px}
.payment-rejected-note{font-size:9.5px;line-height:1.25;color:#b42318;background:#fff1f2;border-radius:6px;padding:3px 6px}


/* V90.6.53 — payment approval availability guard */
.payment-approval-paused-banner{margin:10px 0 12px;padding:12px 14px;border:1px solid #f3c27a;border-radius:12px;background:linear-gradient(135deg,#fff8eb,#fffdf8);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.payment-approval-paused-banner b{font-size:12.5px;color:#8a4b08}
.payment-approval-paused-banner .muted{margin-top:2px;font-size:10.5px}


/* V90.6.54 — actual city project pins; Top Locations removed */
.approved-map-card-citypins .approved-map-body-full{display:block!important;width:100%;grid-template-columns:1fr!important}
.approved-map-card-citypins .approved-india-map-full{width:100%!important;min-height:390px}
.approved-map-card-citypins .approved-map-locations{display:none!important}
.project-city-label{pointer-events:none}
.project-city-label rect{fill:rgba(8,32,63,.94);stroke:rgba(148,197,255,.48);stroke-width:1}
.project-city-label text{fill:#fff;font-size:10px;font-weight:800;letter-spacing:.15px}
.project-pin.pin-active .project-city-label rect{stroke:#60a5fa}
.project-pin.pin-progress .project-city-label rect{stroke:#38bdf8}
.project-pin.pin-completed .project-city-label rect{stroke:#34d399}
.project-pin:hover .project-city-label rect,.project-pin:focus .project-city-label rect{stroke:#fff;stroke-width:1.4}
@media(max-width:900px){.approved-map-card-citypins .approved-india-map-full{min-height:330px}.project-city-label text{font-size:9px}}


/* V90.6.58 — dashboard project map fit + clean footer */
.approved-map-card-citypins{
  min-height:430px!important;
  padding:14px 14px 58px!important;
  display:flex!important;
  flex-direction:column!important;
}
.approved-map-card-citypins .approved-map-head{flex:0 0 auto}
.approved-map-card-citypins .approved-map-body-full{
  flex:1 1 auto!important;
  display:block!important;
  width:100%!important;
  margin-top:4px!important;
  min-height:0!important;
}
.approved-map-card-citypins .approved-india-map-full{
  width:100%!important;
  min-height:345px!important;
  height:345px!important;
  overflow:visible!important;
}
.approved-map-card-citypins .approved-india-map-full svg{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:contain!important;
}
.approved-map-card-citypins .approved-map-legend{
  left:10px!important;
  bottom:8px!important;
  right:auto!important;
  top:auto!important;
  display:grid!important;
  grid-template-columns:repeat(2,max-content)!important;
  column-gap:16px!important;
  row-gap:5px!important;
  padding:7px 9px!important;
  border:1px solid rgba(153,188,229,.18)!important;
  border-radius:8px!important;
  background:rgba(5,24,49,.68)!important;
  backdrop-filter:blur(4px);
  font-size:7.5px!important;
  line-height:1.15!important;
  z-index:4!important;
}
.approved-map-card-citypins .approved-map-legend span{
  display:flex!important;
  align-items:center!important;
  white-space:nowrap!important;
}
.approved-map-card-citypins .approved-map-all{
  left:auto!important;
  right:14px!important;
  bottom:14px!important;
  min-width:116px!important;
  height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  z-index:5!important;
}
.approved-map-card-citypins .project-city-label rect{
  fill:rgba(7,28,56,.96)!important;
}
@media(max-width:1100px){
  .approved-map-card-citypins{min-height:410px!important}
  .approved-map-card-citypins .approved-india-map-full{height:325px!important;min-height:325px!important}
}
@media(max-width:760px){
  .approved-map-card-citypins{padding-bottom:92px!important}
  .approved-map-card-citypins .approved-india-map-full{height:315px!important;min-height:315px!important}
  .approved-map-card-citypins .approved-map-legend{
    grid-template-columns:1fr 1fr!important;
    left:10px!important;right:10px!important;bottom:48px!important;
  }
  .approved-map-card-citypins .approved-map-all{left:10px!important;right:10px!important;bottom:10px!important;width:auto!important}
}


/* V90.6.59 — state hover shows actual project cities */
.india-map-tooltip .map-tip-city-title{
  margin-top:7px;padding-top:6px;border-top:1px solid rgba(255,255,255,.16);
  font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#9ec5ef
}
.india-map-tooltip .map-tip-city{
  display:flex;justify-content:space-between;align-items:center;gap:14px;
  padding-top:3px;font-size:9px
}
.india-map-tooltip .map-tip-city span{color:#eaf3fb}
.india-map-tooltip .map-tip-city b{
  min-width:18px;text-align:center;border-radius:999px;padding:1px 6px;
  background:rgba(59,130,246,.2);color:#fff
}

/* V90.7.05 current-ERP patches */
.purchase-bill-modal{width:min(97vw,1320px)!important;max-width:1320px!important;overflow-x:hidden!important;padding:18px!important}
.purchase-bill-modal .purchase-charge-scroll{width:100%!important;overflow-x:auto!important}
.purchase-bill-modal .purchase-charge-table th,.purchase-bill-modal .purchase-charge-table td{padding:8px 6px!important;vertical-align:middle!important;white-space:nowrap!important}
.purchase-bill-modal .purchase-charge-table input,.purchase-bill-modal .purchase-charge-table select{width:100%!important;min-width:0!important;box-sizing:border-box!important}
.purchase-charge-summary{padding:11px 14px;text-align:right;font-weight:800;color:#0b2d55;background:#f8fbff;border-top:1px solid #e2ebf5}
@media(max-width:1180px){.purchase-bill-modal{width:98vw!important;padding:12px!important}}


/* =====================================================================
   V90.7.06 — Purchase Register clean columns + no broken wrapping
   ===================================================================== */
.purchase-register-table{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch;
}
.purchase-register-table > .table-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
}
.purchase-register-table table,
.purchase-register-table .data{
  width:100%!important;
  min-width:1280px!important;
  table-layout:auto!important;
}
.purchase-register-table th,
.purchase-register-table td{
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  vertical-align:middle!important;
}
.purchase-register-table th{
  padding-left:10px!important;
  padding-right:10px!important;
}
.purchase-register-table td{
  padding-left:10px!important;
  padding-right:10px!important;
}

/* Keep document numbers, dates, amounts, status and action labels intact. */
.purchase-register-table .stamp,
.purchase-register-table .appr-status,
.purchase-register-table .btn,
.purchase-register-table .num,
.purchase-register-table [data-edit-bill],
.purchase-register-table [data-print-pur],
.purchase-register-table [data-view-pur]{
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}

/* Approval remarks/timestamps may use a second line, but words never split. */
.purchase-register-table td div{
  word-break:normal!important;
  overflow-wrap:normal!important;
}

/* Give the important purchase register columns sensible minimum widths. */
.purchase-register-table th:nth-child(2),
.purchase-register-table td:nth-child(2){min-width:110px!important;} /* Entry No */
.purchase-register-table th:nth-child(3),
.purchase-register-table td:nth-child(3){min-width:105px!important;} /* Date */
.purchase-register-table th:nth-child(4),
.purchase-register-table td:nth-child(4){min-width:150px!important;} /* Vendor */
.purchase-register-table th:nth-child(5),
.purchase-register-table td:nth-child(5){min-width:120px!important;} /* Vendor Bill */
.purchase-register-table th:nth-child(6),
.purchase-register-table td:nth-child(6){min-width:120px!important;} /* Project Name */
.purchase-register-table th:nth-child(7),
.purchase-register-table td:nth-child(7),
.purchase-register-table th:nth-child(8),
.purchase-register-table td:nth-child(8),
.purchase-register-table th:nth-child(9),
.purchase-register-table td:nth-child(9){min-width:105px!important;text-align:right!important;}
.purchase-register-table th:nth-child(10),
.purchase-register-table td:nth-child(10){min-width:105px!important;} /* Payment */
.purchase-register-table th:nth-child(11),
.purchase-register-table td:nth-child(11){min-width:175px!important;} /* Approval Action */
.purchase-register-table th:last-child,
.purchase-register-table td:last-child{min-width:125px!important;} /* Actions */

@media (max-width:1200px){
  .purchase-register-table table,
  .purchase-register-table .data{
    min-width:1280px!important;
  }
}


/* V90.7.15 — universal cancelled-record visual language */
.erp-cancelled-row{
  background:linear-gradient(90deg,rgba(254,242,242,.88),rgba(255,255,255,.96))!important;
  opacity:.78;
}
.erp-cancelled-row td:not(.sticky-action){
  text-decoration:line-through!important;
  text-decoration-thickness:1.5px!important;
  text-decoration-color:#dc2626!important;
  color:#64748b!important;
}
.erp-cancelled-row td.sticky-action,
.erp-cancelled-row .action-stack{
  text-decoration:none!important;
  opacity:1!important;
}
.erp-cancelled-row .stamp{
  text-decoration:none!important;
  background:#fee2e2!important;
  color:#b91c1c!important;
  border-color:#fecaca!important;
  font-weight:800!important;
}


/* V90.7.25 — Work Order action buttons: one aligned action column. */
.data-table td.sticky-action,
.data-table th.sticky-action{
  white-space:nowrap!important;
}
.data-table td.sticky-action .btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:30px!important;
  margin:2px 3px 2px 0!important;
  vertical-align:middle!important;
}

/* V90.7.26 — Professional Work Orders master */
.wo-master-page{display:flex;flex-direction:column;gap:14px;max-width:100%;}
.wo-page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:2px 2px 0;}
.wo-page-heading h2{margin:2px 0 3px;font-size:22px;line-height:1.15;color:var(--text);letter-spacing:-.02em;}
.wo-page-heading p{margin:0;color:var(--text-dim);font-size:11.5px;}
.wo-page-kicker{font-size:8.5px;letter-spacing:.15em;font-weight:900;color:#64748b;}
.wo-heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.wo-heading-actions .btn{height:34px!important;min-height:34px!important;border-radius:8px!important;padding:0 13px!important;font-size:10.5px!important;font-weight:800!important;}
.wo-new-btn{min-width:132px;background:#f28a16!important;border-color:#f28a16!important;color:#fff!important;box-shadow:0 5px 14px rgba(242,138,22,.16);}
.wo-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.wo-kpi-card{appearance:none;border:1px solid #dbe4ef;background:#fff;border-radius:12px;padding:14px 15px;display:flex;align-items:center;gap:12px;text-align:left;min-height:88px;cursor:pointer;transition:.16s ease;box-shadow:0 2px 8px rgba(15,23,42,.035);color:var(--text);}
.wo-kpi-card:hover,.wo-kpi-card.active{transform:translateY(-1px);box-shadow:0 6px 18px rgba(15,23,42,.07);border-color:#b8c9df;}
.wo-kpi-card>span:last-child{display:flex;flex-direction:column;min-width:0;}
.wo-kpi-card small{font-size:10px;font-weight:800;color:#52657b;}
.wo-kpi-card strong{font-size:22px;line-height:1.1;margin-top:2px;color:#10233f;}
.wo-kpi-card em{font-size:9.5px;font-style:normal;color:#8795a7;margin-top:2px;}
.wo-kpi-icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;font-size:15px;font-weight:900;flex:0 0 auto;background:#eaf2ff;color:#1769e0;}
.wo-kpi-card.is-running{background:linear-gradient(135deg,#fff,#f2fbf7)}.wo-kpi-card.is-running .wo-kpi-icon{background:#e7f8ef;color:#139257;}
.wo-kpi-card.is-completed{background:linear-gradient(135deg,#fff,#f7f5ff)}.wo-kpi-card.is-completed .wo-kpi-icon{background:#eeeaff;color:#6555d8;}
.wo-kpi-card.is-cancelled{background:linear-gradient(135deg,#fff,#fff5f5)}.wo-kpi-card.is-cancelled .wo-kpi-icon{background:#ffe9e9;color:#dc3545;}
.wo-register-card{background:#fff;border:1px solid #dfe7f0;border-radius:12px;box-shadow:0 3px 12px rgba(15,23,42,.04);overflow:hidden;}
.wo-register-toolbar{display:flex;align-items:center;gap:9px;padding:12px 12px 10px;border-bottom:1px solid #edf1f5;}
.wo-filter-group{display:flex;align-items:center;gap:5px;flex-wrap:wrap;}
.wo-filter-chip{height:34px;border:1px solid #cbd7e6;background:#fff;color:#52657b;border-radius:8px;padding:0 12px;font-size:11px;font-weight:800;cursor:pointer;white-space:nowrap;}
.wo-filter-chip b{font-size:8.5px;margin-left:3px;background:#f1f5f9;border-radius:999px;padding:2px 5px;color:#64748b;}
.wo-filter-chip.active{border-color:#2f78df;background:#eef5ff;color:#1556ad;box-shadow:inset 0 0 0 1px rgba(47,120,223,.08);}
.wo-register-search{margin-left:auto;width:min(290px,28vw);height:32px;border:1px solid #d7e1ec;border-radius:8px;display:flex;align-items:center;gap:7px;padding:0 10px;background:#fbfdff;}
.wo-register-search span{font-size:16px;color:#6b7f96;}.wo-register-search input{border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;width:100%;font-size:10px!important;padding:0!important;height:auto!important;}
.wo-register-title{display:flex;align-items:center;justify-content:space-between;padding:10px 13px 9px;border-bottom:1px solid #edf1f5;color:#1b2f55;}
.wo-register-title>div{display:flex;align-items:center;gap:8px}.wo-register-title strong{font-size:13.5px;text-transform:uppercase;letter-spacing:.02em}.wo-list-icon{font-size:15px;color:#1769e0}.wo-register-count{font-size:9.5px;color:#8a98a9;}
.wo-professional-table .erp-page-top{padding:8px 12px!important;background:#fbfcfe;border-bottom:1px solid #edf1f5;}
.wo-professional-table .table-scroll{overflow-x:auto;}
.wo-professional-table table.data{min-width:1120px;width:100%;border-collapse:separate;border-spacing:0;}
.wo-professional-table table.data thead th{height:44px!important;background:#f5f8fc!important;color:#52657b!important;font-size:11.2px!important;font-weight:900!important;text-transform:uppercase;letter-spacing:.025em;border-bottom:1px solid #dfe7f0!important;padding-left:12px!important;padding-right:12px!important;}
.wo-professional-table table.data tbody tr{height:64px!important;background:#fff!important;transition:.12s ease;}
.wo-professional-table table.data tbody tr:hover{background:#f8fbff!important;}
.wo-professional-table table.data td{font-size:11.5px!important;border-bottom:1px solid #edf1f5!important;color:#24364d!important;vertical-align:middle!important;padding-top:10px!important;padding-bottom:10px!important;padding-left:12px!important;padding-right:12px!important;}
.wo-professional-table table.data tbody tr:last-child td{border-bottom:0!important;}
.wo-professional-table .action-stack{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;min-width:0!important;width:auto!important;white-space:nowrap!important;}
.wo-professional-table .action-stack .btn{width:auto!important;min-width:72px!important;height:34px!important;min-height:34px!important;margin:0!important;padding:0 12px!important;border:1px solid #cbd7e6!important;border-radius:8px!important;font-size:11px!important;line-height:1!important;font-weight:800!important;background:#fff!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;}
.wo-professional-table th.sticky-action,.wo-professional-table td.sticky-action{min-width:360px!important;width:360px!important;background:inherit!important;box-shadow:-6px 0 14px rgba(15,23,42,.025)!important;}
.wo-action-btn.edit{border-color:#9fc4ff!important;color:#1769e0!important;background:#f8fbff!important}.wo-action-btn.danger{border-color:#f2a9b3!important;color:#d82b41!important;background:#fff8f9!important;}
.wo-professional-table [data-cancel-wo]{border-color:#f2a9b3!important;color:#d82b41!important;background:#fff8f9!important;}
.wo-professional-table [data-reactivate-entity]{border-color:#9fd9b5!important;color:#14804a!important;background:#f3fff7!important;}
.wo-number{font-size:11.8px;font-weight:850;color:#102a52;}.wo-value{font-size:11.5px;font-weight:800;color:#172b48;}
.wo-meta-cell{display:inline-flex;align-items:center;gap:6px}.wo-meta-cell i{font-style:normal;color:#2f78df;font-size:7px;}
.wo-status-pill{display:inline-flex;align-items:center;justify-content:center;min-width:84px;height:28px;padding:0 11px;border-radius:999px;font-size:10.5px;font-weight:850;white-space:nowrap;}.wo-status-pill.running{background:#fff5d7;color:#a66a00}.wo-status-pill.completed{background:#e8f8ef;color:#147747}.wo-status-pill.cancelled{background:#ffe9eb;color:#c72e42;}
.wo-cancel-number{display:flex;flex-direction:column;align-items:flex-start;gap:3px}.wo-cancel-number strong{color:#c93447;text-decoration:line-through;font-weight:850}.wo-cancel-number span{font-size:8px;font-weight:850;color:#c93447;background:#ffe9eb;border-radius:5px;padding:2px 5px;}
/* Cancelled work-order row: professional audit state, not an entire crossed-out row. */
.wo-professional-table .erp-cancelled-row{opacity:1!important;background:linear-gradient(90deg,#fff8f8,#fff)!important;}
.wo-professional-table .erp-cancelled-row td:not(.sticky-action){text-decoration:none!important;color:#52657b!important;}
.wo-professional-table .erp-cancelled-row td:first-child{border-left:3px solid #e5485d!important;}
.wo-professional-table .erp-cancelled-row .stamp{background:initial!important;color:inherit!important;border-color:initial!important;}
.wo-page-tip{min-height:44px;border:1px solid #d7e7f7;background:linear-gradient(90deg,#f3f9ff,#fbfdff);border-radius:10px;display:flex;align-items:center;gap:9px;padding:0 13px;color:#60758d;font-size:9.8px;}
.wo-page-tip>span{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#2374d8;color:#fff;font-weight:900}.wo-page-tip p{margin:0;flex:1}.wo-page-tip strong{color:#244467}.wo-legend{display:flex;align-items:center;gap:7px;white-space:nowrap}.wo-legend b{width:7px;height:7px;border-radius:50%;display:inline-block;margin-left:9px}.wo-legend .run{background:#efad18}.wo-legend .done{background:#1aa35b}.wo-legend .cancel{background:#db354d}
html[data-theme="dark"] .wo-register-card,html[data-theme="dark"] .wo-kpi-card{background:#0f1b2d!important;border-color:#27364a!important;color:#e6edf7!important}html[data-theme="dark"] .wo-kpi-card strong,html[data-theme="dark"] .wo-page-heading h2{color:#f3f7fb!important}html[data-theme="dark"] .wo-register-toolbar,html[data-theme="dark"] .wo-register-title,html[data-theme="dark"] .wo-professional-table .erp-page-top{border-color:#27364a!important;background:#101d30!important}html[data-theme="dark"] .wo-filter-chip,html[data-theme="dark"] .wo-register-search{background:#111f33!important;border-color:#33465e!important;color:#dce7f5!important}html[data-theme="dark"] .wo-professional-table table.data thead th{background:#15243a!important;color:#9fb0c5!important;border-color:#2a3c52!important}html[data-theme="dark"] .wo-professional-table table.data tbody tr{background:#0f1b2d!important}html[data-theme="dark"] .wo-professional-table table.data tbody tr:hover{background:#14243a!important}html[data-theme="dark"] .wo-professional-table table.data td{color:#d6e1ee!important;border-color:#223247!important}
@media(max-width:1150px){.wo-kpi-grid{grid-template-columns:repeat(2,1fr)}.wo-register-toolbar{flex-wrap:wrap}.wo-register-search{margin-left:0;width:100%;order:3}.wo-heading-actions{max-width:55%}}
@media(max-width:700px){.wo-page-heading{align-items:flex-start;flex-direction:column}.wo-heading-actions{max-width:none;width:100%;justify-content:flex-start}.wo-kpi-grid{grid-template-columns:1fr}.wo-filter-group{width:100%;overflow-x:auto;flex-wrap:nowrap}.wo-legend{display:none}}

/* V90.7.27 — Work Order readability + action button border correction */
.wo-professional-table .action-stack .wo-action-btn:not(.danger):not(.edit),
.wo-professional-table .action-stack [data-reactivate-entity]{border-width:1px!important;border-style:solid!important;}
.wo-professional-table .action-stack .wo-action-btn:not(.danger):not(.edit){border-color:#c5d2e2!important;color:#26384f!important;background:#ffffff!important;}
.wo-professional-table .action-stack .btn:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(15,23,42,.08)!important;}
html[data-theme="dark"] .wo-professional-table .action-stack .btn{background:#132238!important;border-color:#41546d!important;color:#e7eef8!important;}
html[data-theme="dark"] .wo-professional-table .action-stack .wo-action-btn.edit{border-color:#3c6fae!important;color:#8fc0ff!important;background:#10213a!important;}
html[data-theme="dark"] .wo-professional-table .action-stack .wo-action-btn.danger,
html[data-theme="dark"] .wo-professional-table [data-cancel-wo]{border-color:#7a3f4c!important;color:#ff9cad!important;background:#2a1820!important;}
html[data-theme="dark"] .wo-professional-table [data-reactivate-entity]{border-color:#386b4c!important;color:#8ee0ac!important;background:#11271a!important;}

/* V90.7.28 — Work Order action alignment at every browser zoom level */
.wo-professional-table .action-stack{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  width:100%!important;
  min-width:max-content!important;
  white-space:nowrap!important;
}
.wo-professional-table .action-stack .btn{
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
.wo-professional-table th.sticky-action,
.wo-professional-table td.sticky-action{
  min-width:390px!important;
  width:390px!important;
  max-width:none!important;
  overflow:visible!important;
}
.wo-professional-table td.sticky-action{
  padding-left:10px!important;
  padding-right:10px!important;
}
/* Keep the cancelled row's smaller action set aligned to the same right edge. */
.wo-professional-table .erp-cancelled-row .action-stack{
  justify-content:flex-end!important;
}
/* At very narrow screens keep one row and allow horizontal table scrolling instead of button wrapping. */
@media(max-width:900px){
  .wo-professional-table table.data{min-width:1260px!important;}
  .wo-professional-table th.sticky-action,
  .wo-professional-table td.sticky-action{min-width:390px!important;width:390px!important;}
}

/* V90.7.42 — Work Order contextual drill-down navigation */
.wo-kpi-drill{cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;background:linear-gradient(180deg,#fff,#fbfdff)}
.wo-kpi-drill:hover,.wo-kpi-drill:focus-visible{transform:translateY(-2px);box-shadow:0 10px 26px rgba(37,99,235,.14);border-color:#93c5fd;outline:none}
.wo-kpi-open{margin-top:7px;font-size:9px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;color:#2563eb;opacity:.72}
.wo-kpi-drill:hover .wo-kpi-open,.wo-kpi-drill:focus-visible .wo-kpi-open{opacity:1}
.wo-context-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:10px 0 12px;padding:10px 14px;border:1px solid #bfdbfe;border-left:4px solid #2563eb;border-radius:10px;background:linear-gradient(90deg,#eff6ff,#f8fafc);box-shadow:0 4px 14px rgba(37,99,235,.06)}
.wo-context-banner>div{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}.wo-context-banner small{font-size:9px;font-weight:900;letter-spacing:.08em;color:#64748b}.wo-context-banner strong{font-size:13px;color:#172554}.wo-context-banner span{font-size:11px;color:#475569}
[data-theme="dark"] .wo-kpi-drill{background:linear-gradient(180deg,#111827,#0f172a)}
[data-theme="dark"] .wo-context-banner{background:linear-gradient(90deg,#0f1f3d,#111827);border-color:#334e7d}.wo-context-banner .btn{white-space:nowrap}


/* V90.7.43 — contextual Work Order return navigation */
.wo-context-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.wo-kpi-drill{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.wo-kpi-drill:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(15,23,42,.08);border-color:#bfdbfe}
.wo-kpi-drill:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
@media (max-width:700px){.wo-context-actions{width:100%;justify-content:flex-start}}
\n\n/* ==========================================================\n   V90.7.51 — SALES INVOICE REGISTER HORIZONTAL SLIDER\n   Keep every register field/action on one row at zoomed views.\n   Do not shrink or wrap; expose a smooth horizontal scrollbar.\n   ========================================================== */\n.invoice-register-scroll{\n  width:100%;\n  max-width:100%;\n  min-width:0;\n}\n.invoice-register-scroll > .table-scroll{\n  width:100%;\n  max-width:100%;\n  overflow-x:auto!important;\n  overflow-y:visible!important;\n  -webkit-overflow-scrolling:touch;\n  overscroll-behavior-x:contain;\n  scrollbar-gutter:stable;\n  padding-bottom:3px;\n}\n.invoice-register-scroll > .table-scroll > table.data{\n  width:max-content!important;\n  min-width:1680px!important;\n  table-layout:auto!important;\n}\n.invoice-register-scroll > .table-scroll > table.data th,\n.invoice-register-scroll > .table-scroll > table.data td{\n  white-space:nowrap!important;\n  word-break:normal!important;\n  overflow-wrap:normal!important;\n}\n.invoice-register-scroll .action-stack{\n  display:flex!important;\n  flex-direction:row!important;\n  flex-wrap:nowrap!important;\n  align-items:center!important;\n  justify-content:flex-end!important;\n  gap:6px!important;\n  width:max-content!important;\n  min-width:max-content!important;\n  white-space:nowrap!important;\n}\n.invoice-register-scroll .action-stack .btn{\n  width:auto!important;\n  min-width:max-content!important;\n  flex:0 0 auto!important;\n  margin:0!important;\n  white-space:nowrap!important;\n}\n.invoice-register-scroll .sticky-action{\n  min-width:360px!important;\n}\n.invoice-register-scroll > .table-scroll::-webkit-scrollbar{height:11px;}\n.invoice-register-scroll > .table-scroll::-webkit-scrollbar-track{background:#eef3f8;border-radius:999px;}\n.invoice-register-scroll > .table-scroll::-webkit-scrollbar-thumb{background:#a9b8ca;border:2px solid #eef3f8;border-radius:999px;}\nhtml[data-theme="dark"] .invoice-register-scroll > .table-scroll::-webkit-scrollbar-track{background:#132238;}\nhtml[data-theme="dark"] .invoice-register-scroll > .table-scroll::-webkit-scrollbar-thumb{background:#53677f;border-color:#132238;}\n@media(max-width:1100px){\n  .invoice-register-scroll > .table-scroll > table.data{min-width:1720px!important;}\n}\n\n\n/* V90.7.52 — Inventory register: never wrap/collapse columns; use horizontal slider. */
.inventory-godown-grid{width:100%!important;min-width:0!important;overflow:visible!important;}
.inventory-godown-grid>.table-scroll{width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-gutter:stable!important;padding-bottom:5px!important;}
.inventory-godown-grid table{width:max-content!important;min-width:1480px!important;table-layout:auto!important;}
.inventory-godown-grid table th,
.inventory-godown-grid table td{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;vertical-align:middle!important;}
.inventory-godown-grid table th:nth-child(2),
.inventory-godown-grid table td:nth-child(2){min-width:440px!important;max-width:620px!important;}
.inventory-godown-grid table th:nth-child(3),
.inventory-godown-grid table td:nth-child(3){min-width:190px!important;max-width:240px!important;}
.inventory-godown-grid table th:nth-child(n+4),
.inventory-godown-grid table td:nth-child(n+4){min-width:95px!important;}
.inventory-godown-grid>.table-scroll::-webkit-scrollbar{height:11px;}
.inventory-godown-grid>.table-scroll::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px;border:2px solid transparent;background-clip:padding-box;}
.inventory-godown-grid>.table-scroll::-webkit-scrollbar-track{background:#eef2f7;border-radius:999px;}
html[data-theme="dark"] .inventory-godown-grid>.table-scroll::-webkit-scrollbar-track{background:#0f172a;}
html[data-theme="dark"] .inventory-godown-grid>.table-scroll::-webkit-scrollbar-thumb{background:#64748b;background-clip:padding-box;}

/* ============================================================
   V90.7.79 — GLOBAL VISIBLE HORIZONTAL TABLE SCROLL
   Keeps register values on one line at 100% zoom and provides a
   viewport-bottom scrollbar, so users never need to reach the last row.
   ============================================================ */
.table-scroll,
.table-wrap,
.table-responsive,
.module-table-wrap{
  overflow-x:auto!important;
  max-width:100%!important;
  scrollbar-gutter:stable;
}

.table-scroll > table,
.table-wrap > table,
.table-responsive > table,
.module-table-wrap > table,
.erp-paged-table table,
table.data-table,
table.approved-table{
  width:max-content!important;
  min-width:100%!important;
  table-layout:auto!important;
}

.table-scroll > table th,
.table-scroll > table td,
.table-wrap > table th,
.table-wrap > table td,
.table-responsive > table th,
.table-responsive > table td,
.module-table-wrap > table th,
.module-table-wrap > table td,
.erp-paged-table table th,
.erp-paged-table table td,
.data-table th,.data-table td,
.approved-table th,.approved-table td{
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}

/* Explicit long-text cells may still wrap without forcing every register wider. */
.erp-wrap-text,
td.description,td.remarks,td.address,td.notes,td.narration,
td[data-wrap="true"]{
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  min-width:180px;
  max-width:420px;
}

/* One shared viewport scrollbar follows whichever wide ERP table is on screen. */
#erpViewportHScroll{
  position:fixed;
  left:var(--erp-hscroll-left,0px);
  bottom:0;
  width:var(--erp-hscroll-width,100vw);
  height:18px;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  z-index:10020;
  background:rgba(248,250,252,.98);
  border-top:1px solid #cbd5e1;
  box-shadow:0 -2px 8px rgba(15,23,42,.08);
  display:none;
}
#erpViewportHScroll > div{height:1px;}
html[data-theme="dark"] #erpViewportHScroll{
  background:rgba(15,23,42,.98);
  border-top-color:#334155;
}
body.erp-hscroll-visible{padding-bottom:18px;}
@media print{#erpViewportHScroll{display:none!important}body.erp-hscroll-visible{padding-bottom:0!important}}


/* ============================================================
   V90.7.80 — SINGLE HORIZONTAL SCROLLBAR
   When the viewport-bottom synchronized scrollbar is active, hide
   only that table wrapper's native horizontal scrollbar. This keeps
   one usable scrollbar on screen and prevents duplicate bars.
   ============================================================ */
.erp-hscroll-source{
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
.erp-hscroll-source::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}
\n\n/* V90.7.82 — Professional invoice sort control */\n.invoice-sort-control{display:inline-flex;align-items:center;height:36px;max-width:330px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;overflow:hidden;white-space:nowrap;box-shadow:0 1px 2px rgba(15,23,42,.04);transition:border-color .15s,box-shadow .15s;background-color .15s}.invoice-sort-control:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.12)}.invoice-sort-icon{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;color:#2563eb;background:#eff6ff;border-right:1px solid #dbeafe;flex:0 0 34px}.invoice-sort-icon svg{width:16px;height:16px}.invoice-sort-label{font-size:11px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.035em;padding:0 7px 0 9px}.invoice-sort-select{height:34px;min-width:185px;max-width:220px;border:0!important;outline:0!important;background:transparent;color:#0f172a;font:inherit;font-size:12px;font-weight:700;padding:0 28px 0 0;cursor:pointer;box-shadow:none!important}.invoice-sort-select option{font-weight:500;background:#fff;color:#0f172a}html[data-theme="dark"] .invoice-sort-control{background:#0f172a;border-color:#334155}html[data-theme="dark"] .invoice-sort-icon{background:#172554;border-right-color:#334155;color:#60a5fa}html[data-theme="dark"] .invoice-sort-label{color:#94a3b8}html[data-theme="dark"] .invoice-sort-select{color:#e2e8f0}html[data-theme="dark"] .invoice-sort-select option{background:#0f172a;color:#e2e8f0}@media(max-width:900px){.invoice-sort-label{display:none}.invoice-sort-select{min-width:170px}.invoice-sort-control{max-width:220px}}\n
/* V90.7.83 — compact professional icon-only Sales Invoice toolbar */
.invoice-icon-btn{width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:9px!important;position:relative;vertical-align:middle}
.invoice-icon-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.invoice-new-icon{box-shadow:0 4px 12px rgba(245,158,11,.20)}
.invoice-clean-icon{color:#b45309!important;background:#fffbeb!important;border-color:#fde68a!important}
.invoice-sort-icon-only{width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;border-radius:9px!important;overflow:hidden!important;position:relative!important;background:#fff!important}
.invoice-sort-icon-only .invoice-sort-icon{width:34px!important;height:34px!important;flex:0 0 34px!important;border:0!important;background:#eff6ff!important}
.invoice-sort-icon-only .invoice-sort-select{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;opacity:0!important;cursor:pointer!important;padding:0!important}
.invoice-sort-icon-only:focus-within{border-color:#3b82f6!important;box-shadow:0 0 0 3px rgba(59,130,246,.12)!important}
.export-btns:has(.invoice-icon-btn){display:inline-flex!important;gap:6px!important;align-items:center!important}
html[data-theme="dark"] .invoice-clean-icon{color:#fbbf24!important;background:#292211!important;border-color:#5f4b16!important}
html[data-theme="dark"] .invoice-sort-icon-only{background:#0f172a!important;border-color:#334155!important}
html[data-theme="dark"] .invoice-sort-icon-only .invoice-sort-icon{background:#172554!important;color:#60a5fa!important}

/* V90.7.84 — stable icon toolbar + custom sort popover */
.invoice-sort-menu-wrap{position:relative;display:inline-flex;align-items:center;flex:0 0 auto}
.invoice-sort-trigger{color:#2563eb!important;background:#eff6ff!important;border-color:#bfdbfe!important}
.invoice-sort-trigger[aria-expanded="true"]{background:#dbeafe!important;border-color:#60a5fa!important;box-shadow:0 0 0 3px rgba(59,130,246,.12)!important}
.invoice-sort-popover{position:absolute;right:0;top:calc(100% + 8px);z-index:1200;width:270px;padding:7px;background:#fff;border:1px solid #dbe3ef;border-radius:12px;box-shadow:0 16px 38px rgba(15,23,42,.18)}
.invoice-sort-popover[hidden]{display:none!important}
.invoice-sort-popover-title{padding:7px 9px 8px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b;border-bottom:1px solid #eef2f7}
.invoice-sort-choice{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;border:0;background:transparent;border-radius:8px;padding:9px 10px;text-align:left;font:inherit;font-size:12px;color:#334155;cursor:pointer}
.invoice-sort-choice:hover{background:#f8fafc}.invoice-sort-choice.active{background:#eff6ff;color:#1d4ed8;font-weight:700}.invoice-sort-check{font-size:14px;font-weight:900}
.invoice-icon-btn>svg{display:block!important;visibility:visible!important;opacity:1!important;flex:0 0 17px!important}
.invoice-icon-btn.active{background:#eff6ff!important;border-color:#60a5fa!important;color:#2563eb!important;box-shadow:0 0 0 3px rgba(59,130,246,.10)!important}
html[data-theme="dark"] .invoice-sort-trigger{background:#172554!important;border-color:#334155!important;color:#60a5fa!important}
html[data-theme="dark"] .invoice-sort-popover{background:#0f172a;border-color:#334155;box-shadow:0 18px 42px rgba(0,0,0,.4)}
html[data-theme="dark"] .invoice-sort-popover-title{color:#94a3b8;border-color:#1e293b}
html[data-theme="dark"] .invoice-sort-choice{color:#e2e8f0}html[data-theme="dark"] .invoice-sort-choice:hover{background:#1e293b}html[data-theme="dark"] .invoice-sort-choice.active{background:#172554;color:#93c5fd}

/* V90.7.86 — unified professional Sales Invoice action toolbar */
.invoice-icon-btn{width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;padding:0!important;border-radius:9px!important;background:#fff!important;border:1px solid #cbd5e1!important;color:#475569!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s!important}
.invoice-icon-btn:hover{background:#f8fafc!important;border-color:#94a3b8!important;color:#0f172a!important;box-shadow:0 4px 10px rgba(15,23,42,.08)!important;transform:translateY(-1px)}
.invoice-icon-btn:focus-visible{outline:none!important;box-shadow:0 0 0 3px rgba(59,130,246,.14)!important}
.invoice-icon-btn svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
.invoice-new-icon{background:#f59e0b!important;border-color:#f59e0b!important;color:#fff!important;box-shadow:0 4px 12px rgba(245,158,11,.22)!important}
.invoice-new-icon:hover{background:#d97706!important;border-color:#d97706!important;color:#fff!important}
.invoice-clean-icon{background:#fff!important;border-color:#cbd5e1!important;color:#64748b!important}
.invoice-clean-icon:hover{background:#fff7ed!important;border-color:#fdba74!important;color:#c2410c!important}
.invoice-sort-trigger{background:#fff!important;border-color:#cbd5e1!important;color:#475569!important}
.invoice-sort-trigger:hover{background:#eff6ff!important;border-color:#93c5fd!important;color:#2563eb!important}
.invoice-sort-trigger[aria-expanded="true"]{background:#eff6ff!important;border-color:#60a5fa!important;color:#2563eb!important;box-shadow:0 0 0 3px rgba(59,130,246,.10)!important}
.invoice-select-icon{background:#fff!important;border-color:#cbd5e1!important;color:#475569!important}
.invoice-select-icon:hover,.invoice-select-icon.active{background:#eff6ff!important;border-color:#93c5fd!important;color:#2563eb!important}
.invoice-toolbar-divider{width:1px;height:24px;background:#e2e8f0;margin:0 2px;flex:0 0 1px}
.invoice-export-xls{background:#f0fdf4!important;border-color:#bbf7d0!important;color:#15803d!important}
.invoice-export-xls:hover{background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}
.invoice-export-pdf{background:#fef2f2!important;border-color:#fecaca!important;color:#dc2626!important}
.invoice-export-pdf:hover{background:#fee2e2!important;border-color:#fca5a5!important;color:#b91c1c!important}
html[data-theme="dark"] .invoice-icon-btn{background:#0f172a!important;border-color:#334155!important;color:#cbd5e1!important}
html[data-theme="dark"] .invoice-icon-btn:hover{background:#1e293b!important;border-color:#475569!important;color:#f8fafc!important}
html[data-theme="dark"] .invoice-new-icon{background:#d97706!important;border-color:#d97706!important;color:#fff!important}
html[data-theme="dark"] .invoice-clean-icon:hover{background:#431407!important;border-color:#9a3412!important;color:#fdba74!important}
html[data-theme="dark"] .invoice-sort-trigger:hover,html[data-theme="dark"] .invoice-sort-trigger[aria-expanded="true"],html[data-theme="dark"] .invoice-select-icon:hover,html[data-theme="dark"] .invoice-select-icon.active{background:#172554!important;border-color:#1d4ed8!important;color:#93c5fd!important}
html[data-theme="dark"] .invoice-toolbar-divider{background:#334155}
html[data-theme="dark"] .invoice-export-xls{background:#052e16!important;border-color:#166534!important;color:#86efac!important}
html[data-theme="dark"] .invoice-export-pdf{background:#450a0a!important;border-color:#991b1b!important;color:#fca5a5!important}

/* V90.7.88 — ERP-wide professional action toolbar system */
.erp-action-icon{width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;padding:0!important;border-radius:9px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;background:#fff!important;border:1px solid #cbd5e1!important;color:#475569!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s!important;vertical-align:middle!important}
.erp-action-icon:hover{background:#f8fafc!important;border-color:#94a3b8!important;color:#0f172a!important;box-shadow:0 4px 10px rgba(15,23,42,.08)!important;transform:translateY(-1px)}
.erp-action-icon:focus-visible{outline:none!important;box-shadow:0 0 0 3px rgba(59,130,246,.14)!important}
.erp-action-icon svg{display:block!important;width:22px!important;height:22px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important;visibility:visible!important;opacity:1!important;pointer-events:none!important}
.erp-action-icon.active{background:#eff6ff!important;border-color:#60a5fa!important;color:#2563eb!important;box-shadow:0 0 0 3px rgba(59,130,246,.10)!important}
.erp-action-primary{background:#f59e0b!important;border-color:#f59e0b!important;color:#fff!important;box-shadow:0 4px 12px rgba(245,158,11,.20)!important}.erp-action-primary:hover{background:#d97706!important;border-color:#d97706!important;color:#fff!important}
.erp-export-xls{background:#f0fdf4!important;border-color:#bbf7d0!important;color:#15803d!important}.erp-export-xls:hover{background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}
.erp-export-pdf{background:#fef2f2!important;border-color:#fecaca!important;color:#dc2626!important}.erp-export-pdf:hover{background:#fee2e2!important;border-color:#fca5a5!important;color:#b91c1c!important}
.erp-action-icon.is-busy{opacity:.65!important;pointer-events:none!important}
.export-btns{display:inline-flex!important;align-items:center!important;gap:6px!important}
.panel-head>div,.panel-head .actions{align-items:center!important}
html[data-theme="dark"] .erp-action-icon{background:#0f172a!important;border-color:#334155!important;color:#cbd5e1!important}
html[data-theme="dark"] .erp-action-icon:hover{background:#1e293b!important;border-color:#475569!important;color:#f8fafc!important}
html[data-theme="dark"] .erp-action-icon.active{background:#172554!important;border-color:#1d4ed8!important;color:#93c5fd!important}
html[data-theme="dark"] .erp-action-primary{background:#d97706!important;border-color:#d97706!important;color:#fff!important}
html[data-theme="dark"] .erp-export-xls{background:#052e16!important;border-color:#166534!important;color:#86efac!important}
html[data-theme="dark"] .erp-export-pdf{background:#450a0a!important;border-color:#991b1b!important;color:#fca5a5!important}

/* V90.7.96 — final ERP-wide icon fit */
.erp-action-icon>svg{width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;max-width:22px!important;max-height:22px!important;flex:0 0 22px!important;}

/* V90.7.98 — ERP-wide register sort control */
.erp-global-sort-wrap{position:relative;display:inline-flex;align-items:center;flex:0 0 auto}
.erp-global-sort-btn{width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:9px!important}
.erp-global-sort-btn svg{width:22px!important;height:22px!important;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.erp-global-sort-popover{position:absolute;right:0;top:calc(100% + 7px);z-index:1200;width:280px;max-height:360px;overflow:auto;background:var(--card,#fff);border:1px solid var(--border,#d8e1ee);border-radius:12px;box-shadow:0 16px 36px rgba(15,23,42,.18);padding:7px}
.erp-global-sort-title{padding:6px 9px 8px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted,#64748b)}
.erp-global-sort-choice{width:100%;border:0;background:transparent;color:inherit;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:8px;text-align:left;font:inherit;font-size:12px;cursor:pointer}
.erp-global-sort-choice:hover,.erp-global-sort-choice.active{background:rgba(59,130,246,.09)}
.erp-global-sort-check{font-weight:800;color:#059669}
body.dark .erp-global-sort-popover{background:#0f2038;border-color:#29415f;box-shadow:0 18px 38px rgba(0,0,0,.4)}
\n/* V90.7.99 Purchase item-wise export toggle */\n.pur-itemwise-export{height:36px;display:inline-flex;align-items:center;gap:7px;padding:0 10px;border:1px solid var(--line,#d7e0ec);border-radius:9px;background:var(--card,#fff);font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer}.pur-itemwise-export input{width:16px;height:16px;accent-color:#2563eb;cursor:pointer}.pur-itemwise-export:hover{border-color:#93b4e8}\n

/* =========================================================
   V90.7.118 — ERP-WIDE RESPONSIVE DESIGN & ACCESSIBILITY PASS
   Final override layer: shared readability, focus, mobile
   density and data-table usability without changing workflows.
   ========================================================= */
:root{
  --ui-blue:#2563eb;
  --ui-blue-soft:#eff6ff;
  --ui-green:#15803d;
  --ui-orange:#d97706;
  --ui-red:#dc2626;
  --ui-ink:#172033;
  --ui-muted:#64748b;
  --ui-line:#dbe3ee;
  --ui-surface:#ffffff;
  --ui-canvas:#f6f8fb;
  --ui-radius:10px;
  --ui-focus:0 0 0 3px rgba(37,99,235,.22);
}

/* Readability and predictable component sizing */
.content,.modal,.modal-card{font-size:14px;line-height:1.45}
.field label,.form-group label,.form-grid label,.modal label{
  font-size:12.5px!important;line-height:1.35;font-weight:700;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,.field textarea,
.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,.form-grid textarea,
.modal input:not([type="checkbox"]):not([type="radio"]),
.modal select,.modal textarea{
  font-size:14px!important;
}
table.data,table.data tbody td,table.data thead th{
  font-size:13px;
}
table.data thead th{letter-spacing:.035em}
.nav-group-label{font-size:13px!important}
.nav-group-body .nav-item .nav-label{font-size:12.5px!important}
.site-form-help,.muted,.help-text{font-size:12.5px!important;line-height:1.5}

/* One consistent keyboard-focus language */
:where(button,[role="button"],a[href],input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--ui-blue)!important;
  outline-offset:2px!important;
  box-shadow:var(--ui-focus)!important;
}
.nav-item:focus-visible,.nav-group-head:focus-visible{
  border-radius:8px;
}

/* Reliable targets and toolbar spacing */
.btn:not(.small),button.btn:not(.small){min-height:40px}
.panel-head{gap:12px}
.panel-head>div,.panel-head .actions,.export-btns{flex-wrap:wrap}
.topbar-right{gap:8px}
.notif-bell,.bell-btn,.menu-toggle{min-width:40px;min-height:40px}

/* Financial and register data is easier to scan */
.kpi{min-height:86px;padding:13px 14px!important}
.kpi-label{font-size:11px!important;letter-spacing:.055em}
.kpi-value{font-variant-numeric:tabular-nums}
.table-scroll{
  position:relative;
  scrollbar-width:thin;
  scrollbar-color:#94a3b8 #eef2f7;
}
.table-scroll::-webkit-scrollbar{height:10px}
.table-scroll::-webkit-scrollbar-track{background:#eef2f7;border-radius:10px}
.table-scroll::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:10px;border:2px solid #eef2f7}
.table-scroll-hint{display:none}
table.data td.num,table.data th.num{font-variant-numeric:tabular-nums}

/* Company selector must not report clipped shell content */
.approved-company-shell,.approved-company-main{
  box-sizing:border-box;
  max-width:100%;
}

/* Dark-mode equivalents for the new shared layer */
html[data-theme="dark"]{
  --ui-ink:#f8fafc;
  --ui-muted:#94a3b8;
  --ui-line:#334155;
  --ui-surface:#0f172a;
  --ui-canvas:#08111f;
}
html[data-theme="dark"] .table-scroll{
  scrollbar-color:#475569 #172033;
}
html[data-theme="dark"] .table-scroll::-webkit-scrollbar-track{background:#172033}
html[data-theme="dark"] .table-scroll::-webkit-scrollbar-thumb{background:#475569;border-color:#172033}

/* Mobile: compact first viewport, usable filters and discoverable tables */
@media(max-width:600px){
  .topbar{
    min-height:62px!important;
    padding:8px 10px!important;
    gap:8px;
  }
  .menu-toggle{
    width:44px!important;height:44px!important;min-width:44px!important;
    margin-right:2px!important;font-size:0!important;color:transparent!important;
  }
  .menu-toggle::before{content:"☰";font-size:18px;color:var(--ui-ink)!important}
  .topbar #pageTitle{
    min-width:0;max-width:none;flex:1;
    font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .topbar-right{gap:6px;flex:0 0 auto}
  #quickCreateBtn{
    min-height:40px!important;padding:0 10px!important;
    max-width:118px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .notif-bell,.theme-mode-btn{width:40px!important;height:40px!important;min-width:40px!important}
  .content{padding:10px 10px 22px!important}

  .kpi-row,.dash-kpis,.finance-mini-strip{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  .kpi{
    min-height:86px!important;
    padding:12px!important;
    border-radius:10px!important;
  }
  .kpi-label{font-size:10px!important}
  .kpi-value{font-size:16px!important;margin-top:7px!important}

  .period-bar,.filter-bar,.adv-filter,.advanced-filter-bar{
    gap:8px!important;padding:11px!important;
  }
  .period-bar input,.period-bar select,
  .filter-bar input,.filter-bar select,
  .adv-filter input,.adv-filter select{
    min-height:42px!important;font-size:14px!important;
  }
  .period-bar .btn,.filter-bar .btn,.adv-filter .btn{min-height:42px!important}

  .panel-head{
    padding:10px 12px!important;
    align-items:flex-start!important;
    flex-wrap:wrap!important;
  }
  .panel-head h3,.panel-title{font-size:13px!important;line-height:1.35}
  .panel-head>div,.panel-head .actions{
    margin-left:auto;gap:6px!important;
  }
  .panel-head .btn.small,.erp-action-icon,.invoice-icon-btn,.erp-global-sort-btn{
    min-width:40px!important;min-height:40px!important;
  }

  .table-scroll{padding-top:0}
  .table-scroll::before{display:none}
  .table-scroll-hint{
    display:block;position:sticky;left:0;
    width:max-content;padding:6px 10px 5px;
    font-size:10px;font-weight:700;color:var(--ui-muted);
    pointer-events:none;
  }
  table.data{min-width:max-content}
  table.data thead th,table.data tbody td{
    font-size:12px!important;
    padding:9px 10px!important;
    white-space:nowrap;
  }
  table.data thead th{height:40px!important}
  table.data tbody td{height:44px}

  .modal-overlay{padding:0!important;align-items:flex-end!important}
  .modal,.modal-card{
    width:100%!important;max-width:100%!important;
    max-height:94vh!important;margin:0!important;
    border-radius:16px 16px 0 0!important;
    padding:16px!important;
  }
  .modal .form-grid{grid-template-columns:1fr!important;gap:12px!important}
  .form-actions{
    position:sticky;bottom:-16px;z-index:5;
    margin:16px -16px -16px!important;padding:12px 16px!important;
    background:var(--ui-surface);border-top:1px solid var(--ui-line);
  }
  .form-actions .btn{min-height:44px!important}

  .approved-company-main{width:100%!important;padding-left:16px!important;padding-right:16px!important}
  .approved-company-cards{width:100%;max-width:100%}
  .approved-company-card{width:100%;box-sizing:border-box}
}

@media(max-width:360px){
  .kpi-row,.dash-kpis,.finance-mini-strip{grid-template-columns:1fr!important}
  #quickCreateBtn{max-width:96px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

/* V90.7.119 — Budget vs Actual actions stay in one horizontal row */
.budget-register-table .sticky-action{
  min-width:390px!important;
  width:390px!important;
  max-width:none!important;
}
.budget-register-table .action-stack{
  width:100%!important;
  min-width:390px!important;
  display:block!important;
  padding:2px 0!important;
}
.budget-action-row{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  width:100%!important;
  white-space:nowrap!important;
}
.budget-register-table .budget-action-row .btn{
  width:auto!important;
  min-width:0!important;
  flex:0 0 auto!important;
  height:32px!important;
  min-height:32px!important;
  margin:0!important;
  padding:0 10px!important;
  font-size:10.5px!important;
  white-space:nowrap!important;
}
@media(max-width:760px){
  .budget-register-table .sticky-action{
    min-width:360px!important;
    width:360px!important;
  }
  .budget-register-table .action-stack{min-width:360px!important}
  .budget-register-table .budget-action-row .btn{
    min-height:36px!important;
    height:36px!important;
    padding:0 9px!important;
  }
}

/* V90.7.121 — every register action set uses one horizontal row */
table.data th.sticky-action,
table.data td.sticky-action,
.table-scroll table th.sticky-action,
.table-scroll table td.sticky-action{
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
}
table.data td .action-stack,
.table-scroll td .action-stack,
.action-stack{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  width:max-content!important;
  min-width:max-content!important;
  max-width:none!important;
  padding:2px 0!important;
  white-space:nowrap!important;
}
table.data .action-stack .btn,
table.data .action-stack .act-btn,
.table-scroll .action-stack .btn,
.table-scroll .action-stack .act-btn{
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  flex:0 0 auto!important;
  margin:0!important;
  white-space:nowrap!important;
}
.budget-register-table .action-stack{
  width:100%!important;
  min-width:390px!important;
}
@media(max-width:760px){
  .budget-register-table .action-stack{min-width:360px!important}
}