@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

:root{
  --navy:#0f172a;
  --navy2:#111827;
  --blue:#2563eb;
  --green:#16a34a;
  --red:#dc2626;
  --orange:#ea580c;
  --purple:#7c3aed;
  --slate:#64748b;
  --bg:#eef2f7;
  --card:#ffffff;
  --border:#e2e8f0;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:"Tajawal",-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.14), transparent 30%),
    radial-gradient(circle at top right, rgba(22,163,74,.10), transparent 28%),
    var(--bg);
  color:#0f172a;
}
.topbar{
  background:linear-gradient(135deg,var(--navy),#1e3a8a);
  color:#fff;
  padding:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  box-shadow:0 12px 30px rgba(15,23,42,.25);
}
.brand{display:flex;align-items:center;gap:12px}
.logo{
  width:54px;height:54px;border-radius:18px;
  background:linear-gradient(135deg,#60a5fa,#22c55e);
  display:grid;place-items:center;
  font-weight:900;color:#fff;letter-spacing:.5px;
  box-shadow:0 10px 25px rgba(0,0,0,.22);
}
.topbar h1{margin:0;font-size:24px;font-weight:900}
.topbar p{margin:4px 0 0;color:#dbeafe}
.clock-card{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  border-radius:18px;
  padding:12px 16px;
  min-width:150px;
  text-align:center;
  backdrop-filter:blur(10px);
}
.clock-card b{display:block;font-size:25px}
.clock-card span{font-size:13px;color:#e0f2fe}

.container{max-width:1050px;margin:auto;padding:18px}
.view{display:none}
.view.active{display:block}
.hero{
  background:linear-gradient(135deg,#fff, #eff6ff);
  border:1px solid rgba(37,99,235,.12);
  border-radius:26px;
  padding:22px;
  margin-bottom:14px;
  box-shadow:0 12px 30px rgba(15,23,42,.08);
}
.hero h2{margin:0;font-size:28px;font-weight:900}
.hero p{margin:6px 0 0;color:var(--slate)}

.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.menu-card{
  border:0;
  border-radius:24px;
  color:#fff;
  padding:20px 16px;
  min-height:135px;
  text-align:right;
  cursor:pointer;
  box-shadow:0 14px 30px rgba(15,23,42,.16);
  transition:.18s ease;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.menu-card:hover{transform:translateY(-4px);filter:saturate(1.05)}
.menu-card span{font-size:30px}
.menu-card b{font-size:21px;font-weight:900}
.menu-card small{opacity:.9;font-weight:700}
.menu-card.green{background:linear-gradient(135deg,#16a34a,#15803d)}
.menu-card.red{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.menu-card.blue{background:linear-gradient(135deg,#3b82f6,#1d4ed8)}
.menu-card.orange{background:linear-gradient(135deg,#f97316,#c2410c)}
.menu-card.purple{background:linear-gradient(135deg,#8b5cf6,#6d28d9)}

.panel{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(226,232,240,.9);
  border-radius:26px;
  box-shadow:0 14px 35px rgba(15,23,42,.09);
  padding:20px;
  margin-top:16px;
}
.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.section-title h2{margin:0;font-weight:900}
.section-title span{color:var(--slate);font-weight:800}

.form-panel{max-width:720px;margin-inline:auto;border-top:7px solid var(--blue)}
.accent-green{border-top-color:var(--green)}
.accent-red{border-top-color:var(--red)}
.accent-purple{border-top-color:var(--purple)}
.admin-panel{border-top:7px solid var(--purple)}

label{display:block;font-weight:900;margin:14px 0 7px}
input,select,textarea{
  width:100%;
  padding:14px;
  border:1px solid #cbd5e1;
  border-radius:15px;
  font-size:17px;
  background:#fff;
  outline:none;
  font-family:inherit;
}
input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(37,99,235,.12)}
textarea{min-height:88px}
.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}

button{
  font-family:inherit;
  border:0;
  border-radius:15px;
  font-weight:900;
  padding:13px 16px;
  cursor:pointer;
  transition:.15s ease;
}
button:hover{transform:translateY(-1px)}
.primary{color:#fff;margin-top:12px;width:100%;font-size:17px}
.green-btn{background:var(--green)}
.red-btn{background:var(--red)}
.blue-btn{background:var(--blue)}
.purple-btn{background:var(--purple)}
.orange-btn{background:var(--orange)}
.back{background:#fff;color:#0f172a;border:1px solid var(--border);box-shadow:0 6px 16px rgba(15,23,42,.07)}
.msg{font-weight:900}
.success{color:#15803d}
.error{color:#b91c1c}
.hint{color:var(--slate);font-weight:700}
.employee-preview{
  margin-top:9px;
  padding:10px 12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  color:var(--slate);
  font-weight:900;
  min-height:42px;
}
.employee-preview.ok{background:#ecfdf5;color:#166534;border-color:#86efac}
.employee-preview.bad{background:#fef2f2;color:#991b1b;border-color:#fecaca}

.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.stat{
  background:linear-gradient(180deg,#fff,#f8fafc);
  border:1px solid var(--border);
  border-radius:20px;
  padding:16px;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.stat::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:var(--blue)}
.stat.green::before{background:var(--green)}
.stat.red::before{background:var(--red)}
.stat.orange::before{background:var(--orange)}
.stat.purple::before{background:var(--purple)}
.stat b{display:block;font-size:30px;margin-top:4px;font-weight:900;line-height:1.1}
.stat small{color:var(--slate);font-weight:800;display:block;line-height:1.3}
.stat-title{display:block;font-weight:900;font-size:16px;line-height:1.35;color:#0f172a}
.stock-grid .stat{min-height:115px}

.printer-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.printer-card{
  background:linear-gradient(180deg,#fff,#f8fafc);
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
}
.printer-card h3{margin:0 0 10px;font-weight:900}
.status-pill{display:inline-block;padding:7px 10px;border-radius:999px;color:#fff;font-weight:900}
.status-pill.green{background:var(--green)}
.status-pill.yellow{background:#ca8a04}
.status-pill.red{background:var(--red)}

.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.tab{background:#e2e8f0;color:#0f172a}
.tab.active{background:var(--blue);color:#fff}
.tab-content{display:none}
.tab-content.active{display:block}
table{width:100%;border-collapse:collapse;background:#fff;border-radius:16px;overflow:hidden;border:1px solid var(--border)}
th,td{padding:11px;border-bottom:1px solid #e5e7eb;text-align:right}
th{background:#f1f5f9;font-weight:900}
.log{padding:12px;border-bottom:1px solid #e5e7eb;background:#fff;border-radius:12px;margin-bottom:8px}

.toast{
  position:fixed;
  top:18px;
  left:50%;
  transform:translateX(-50%);
  z-index:1000;
  padding:14px 18px;
  color:#fff;
  border-radius:18px;
  box-shadow:0 16px 40px rgba(15,23,42,.28);
  font-weight:900;
  min-width:min(92vw,420px);
  text-align:center;
}
.toast.ok{background:linear-gradient(135deg,#16a34a,#15803d)}
.toast.err{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.hidden{display:none}

@media(max-width:620px){
  .topbar{align-items:flex-start;flex-direction:column}
  .clock-card{width:100%}
  .container{padding:12px}
  .menu-card{min-height:112px}
  .two-cols{grid-template-columns:1fr}
  .section-title{align-items:flex-start;flex-direction:column}
}

.schedule-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}
.schedule-card{
  border-radius:20px;
  padding:16px;
  color:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.14);
}
.schedule-card.morning{background:linear-gradient(135deg,#f59e0b,#ea580c)}
.schedule-card.evening{background:linear-gradient(135deg,#2563eb,#1e3a8a)}
.schedule-card small{display:block;opacity:.9;font-weight:800;margin-bottom:6px}
.schedule-card b{display:block;font-size:22px;font-weight:900}
.current-employee b{font-size:22px}
.current-employee .details{font-size:13px;color:#64748b;font-weight:800;line-height:1.7;margin-top:5px}

.sub-title{
  margin-top:24px;
  padding-top:14px;
  border-top:1px solid var(--border);
}
#savedSchedulesList{
  margin-top:10px;
  overflow-x:auto;
}

.calc-box{
  margin-top:10px;
  border-radius:16px;
  padding:12px 14px;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  color:#1e3a8a;
  font-weight:900;
  line-height:1.7;
}
.calc-box.soft{
  background:#f8fafc;
  border-color:#e2e8f0;
  color:#334155;
}
.calc-box.warn{
  background:#fff7ed;
  border-color:#fdba74;
  color:#9a3412;
}
.calc-box.good{
  background:#ecfdf5;
  border-color:#86efac;
  color:#166534;
}

.table-wrap{
  overflow-x:auto;
}
td:last-child{
  max-width:260px;
  white-space:normal;
  line-height:1.5;
}
#publicSchedulesList table td,
#publicSchedulesList table th{
  font-size:15px;
}

#wasteReport, #adminWasteReport{
  margin-top:12px;
}
#wasteReport table td:nth-child(4),
#adminWasteReport table td:nth-child(4){
  font-weight:900;
  color:#dc2626;
}

.stock-alert{
  position:sticky;
  top:0;
  z-index:999;
  padding:12px 16px;
  text-align:center;
  color:#fff;
  font-weight:900;
  box-shadow:0 10px 24px rgba(15,23,42,.18);
}
.stock-alert.warning{
  background:linear-gradient(135deg,#f59e0b,#ea580c);
}
.stock-alert.danger{
  background:linear-gradient(135deg,#ef4444,#b91c1c);
}
.stock-alert b{
  font-size:18px;
}

#productionTotalsCards{
  margin-bottom:10px;
}

.danger-zone{
  border:1px solid #fecaca;
  background:#fef2f2;
  border-radius:20px;
  padding:16px;
  color:#7f1d1d;
}
.danger-zone h4{margin:0 0 8px;font-weight:900}
.danger-zone p{font-weight:800;line-height:1.7}
.danger-btn{background:#dc2626}
.op{
  display:inline-block;
  padding:5px 9px;
  border-radius:999px;
  color:#fff;
  font-weight:900;
}
.op.add{background:#16a34a}
.op.withdraw{background:#dc2626}
.mini-totals{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:10px;
  margin-bottom:12px;
}
.mini-total{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:12px;
}
.mini-total span{display:block;color:#64748b;font-weight:900}
.mini-total b{display:block;margin-top:5px;font-size:16px}

.ledger-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin-bottom:14px;
}
.ledger-card{
  border-radius:20px;
  padding:15px;
  color:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.12);
}
.ledger-card small{display:block;font-weight:900;opacity:.95;line-height:1.5}
.ledger-card b{display:block;font-size:28px;font-weight:900;margin-top:6px;line-height:1}
.ledger-card span{display:block;margin-top:6px;font-weight:800;opacity:.9}
.ledger-card.add{background:linear-gradient(135deg,#16a34a,#15803d)}
.ledger-card.withdraw{background:linear-gradient(135deg,#f97316,#c2410c)}
.ledger-card.return{background:linear-gradient(135deg,#2563eb,#1d4ed8)}
.ledger-card.print{background:linear-gradient(135deg,#0ea5e9,#0369a1)}
.ledger-card.waste{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.ledger-card.consume{background:linear-gradient(135deg,#7c3aed,#5b21b6)}
.ledger-card.current{background:linear-gradient(135deg,#0f172a,#334155)}
.ledger-equation{
  border-radius:18px;
  padding:14px;
  font-weight:900;
  line-height:1.8;
}
.ledger-equation span, .ledger-equation strong{display:block}
.ledger-equation.good{
  background:#ecfdf5;
  border:1px solid #86efac;
  color:#166534;
}
.ledger-equation.warn{
  background:#fff7ed;
  border:1px solid #fdba74;
  color:#9a3412;
}
.ledger-note{
  margin-top:10px;
  line-height:1.7;
}

.printer-alert{
  position:sticky;
  top:0;
  z-index:998;
  padding:12px 16px;
  text-align:center;
  color:#fff;
  font-weight:900;
  box-shadow:0 10px 24px rgba(15,23,42,.18);
}
.printer-alert.danger{
  background:linear-gradient(135deg,#7c2d12,#dc2626);
}



/* v2.16 refinements */
#todaySummary .stat b{
  font-size:24px;
  line-height:1.15;
}
#todaySummary .current-employee .stat-title{
  font-size:18px;
}
#todaySummary .current{
  background:linear-gradient(180deg,#fff,#f8fafc);
}
#todaySummary .current::before{
  background:#0f172a;
}


/* v2.17 PIN security */
#pinsList td:last-child{
  font-weight:900;
  letter-spacing:2px;
}
input[type="password"]{
  letter-spacing:3px;
  font-weight:900;
}

/* v2.18 temporary PIN lock */
#pinsList td:nth-child(4){
  font-weight:900;
  color:#b91c1c;
}

/* v2.20 manager PIN actions */
.pin-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.mini-btn{
  width:auto;
  padding:7px 10px;
  border-radius:10px;
  color:#fff;
  font-size:13px;
  margin:0;
}
.mini-btn.unlock{background:#16a34a}
.mini-btn.reset{background:#2563eb}

/* v2.22 archive and trash */
.safe-zone{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  border-radius:20px;
  padding:16px;
  color:#14532d;
}
.safe-zone h4{margin:0 0 8px;font-weight:900}
.safe-zone p{font-weight:800;line-height:1.7}

/* v2.23 employee statistics */
.employee-stat-head{
  margin:14px 0;
  padding:14px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
.employee-stat-head h3{
  margin:0 0 6px;
  font-weight:900;
}
.employee-stat-head p{
  margin:0;
  color:#64748b;
  font-weight:800;
}
.employee-stat-table{
  margin-top:14px;
}

/* v2.24 all employees statistics */
.all-employees-table{
  margin-top:14px;
}
.all-employees-table td:nth-child(4){
  font-weight:900;
  color:#15803d;
}
.all-employees-table td:nth-child(5){
  font-weight:900;
  color:#dc2626;
}


/* v2.25 logo update */
.site-logo{
  width:58px;
  height:58px;
  border-radius:18px;
  object-fit:contain;
  background:#050505;
  padding:7px;
  box-shadow:0 10px 25px rgba(0,0,0,.28);
  border:1px solid rgba(255,204,0,.35);
}
.logo{
  display:none;
}


/* v2.26 logo: keep PNG transparent/as-is */
.site-logo{
  width:64px !important;
  height:64px !important;
  object-fit:contain !important;
  background:transparent !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
.logo{
  display:none !important;
}


/* v2.26 merged employee statistics */
.stats-mode-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:14px 0 18px;
  padding:10px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fafc;
}
.stats-mode-tabs .mini-btn{
  width:auto;
  min-width:140px;
}
.stats-mode-tabs .active-mode{
  outline:3px solid rgba(245,158,11,.25);
  transform:translateY(-1px);
}
.hidden-section{
  display:none !important;
}
#allStatsSection, #singleStatsSection{
  animation:fadeInStats .18s ease;
}
@keyframes fadeInStats{
  from{opacity:.35; transform:translateY(4px)}
  to{opacity:1; transform:translateY(0)}
}


/* v2.28 QI-inspired color identity */
:root{
  --navy:#050505;
  --navy2:#101010;
  --blue:#1f2937;
  --green:#22c55e;
  --red:#ef4444;
  --orange:#ff8a00;
  --purple:#7c3aed;
  --slate:#4b5563;
  --bg:#f7f7f2;
  --card:#ffffff;
  --border:#e5e0cf;
  --qi-yellow:#ffc400;
  --qi-yellow-dark:#d99a00;
  --qi-black:#050505;
}
body{
  background:
    radial-gradient(circle at top left, rgba(255,196,0,.18), transparent 30%),
    radial-gradient(circle at top right, rgba(5,5,5,.06), transparent 28%),
    var(--bg) !important;
}
.topbar{
  background:linear-gradient(135deg,#050505,#161616) !important;
  border-bottom:4px solid var(--qi-yellow);
}
.logo{
  background:transparent !important;
  color:var(--qi-yellow) !important;
}
.site-logo{
  width:64px !important;
  height:64px !important;
  object-fit:contain !important;
  background:transparent !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
.hero{
  background:linear-gradient(135deg,#ffffff,#fff8d7) !important;
  border-color:rgba(255,196,0,.35) !important;
}
.menu-card.blue,
.menu-card.purple{
  background:linear-gradient(135deg,#111111,#2b2b2b) !important;
}
.menu-card.orange,
.menu-card.green{
  background:linear-gradient(135deg,#ffc400,#d99a00) !important;
  color:#111 !important;
}
.menu-card.red{
  background:linear-gradient(135deg,#ef4444,#991b1b) !important;
}
.panel{
  border-color:#e7d58b !important;
  box-shadow:0 14px 35px rgba(5,5,5,.08) !important;
}
.form-panel,
.admin-panel{
  border-top-color:var(--qi-yellow) !important;
}
.primary.blue-btn,
.tab.active{
  background:linear-gradient(135deg,#ffc400,#d99a00) !important;
  color:#111 !important;
}
.primary.purple-btn,
.purple-btn{
  background:linear-gradient(135deg,#111,#333) !important;
}
.green-btn{
  background:linear-gradient(135deg,#ffc400,#d99a00) !important;
  color:#111 !important;
}
.orange-btn{
  background:linear-gradient(135deg,#ffc400,#d99a00) !important;
  color:#111 !important;
}
.stat::before{
  background:var(--qi-yellow) !important;
}
.stat.green::before,
.stat.blue::before,
.stat.purple::before{
  background:var(--qi-yellow) !important;
}
.stat.orange::before{
  background:#ff8a00 !important;
}
.stat.red::before{
  background:#ef4444 !important;
}
.schedule-card.morning{
  background:linear-gradient(135deg,#ffc400,#d99a00) !important;
  color:#111 !important;
}
.schedule-card.evening{
  background:linear-gradient(135deg,#111,#333) !important;
}
.ledger-card.add,
.ledger-card.print,
.ledger-card.return,
.ledger-card.current{
  background:linear-gradient(135deg,#111,#333) !important;
}
.ledger-card.withdraw,
.ledger-card.consume{
  background:linear-gradient(135deg,#ffc400,#d99a00) !important;
  color:#111 !important;
}
.status-pill.green{
  background:#ffc400 !important;
  color:#111 !important;
}
.stock-alert.warning{
  background:linear-gradient(135deg,#ffc400,#d99a00) !important;
  color:#111 !important;
}
.printer-alert.danger{
  background:linear-gradient(135deg,#111,#dc2626) !important;
}
.mini-btn.unlock{
  background:#ffc400 !important;
  color:#111 !important;
}
.mini-btn.reset{
  background:#111 !important;
  color:#fff !important;
}
th{
  background:#fff5c2 !important;
}
input:focus,select:focus,textarea:focus{
  border-color:#ffc400 !important;
  box-shadow:0 0 0 4px rgba(255,196,0,.18) !important;
}

/* v3.0 Supabase */
.hidden-section{display:none!important}
#todaySummary .stat b{font-size:24px;line-height:1.15}

/* v3.1 admin remember */
.remember-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin:12px 0;
  font-weight:900;
  color:#334155;
}
.remember-row input{
  width:auto;
}
.admin-logout-btn{
  margin-bottom:12px;
}

/* v3.2 fixes */
.is-loading{opacity:.65; cursor:not-allowed!important}
.manual-clean-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:20px;padding:16px}
.shift-badge{display:inline-block;margin-top:8px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.25);font-weight:900}
.shift-done b{text-decoration:line-through;opacity:.75}
.shift-done{filter:grayscale(.25);opacity:.85}
.shift-active{outline:3px solid rgba(34,197,94,.35)}
.shift-not-started{opacity:.95}
.ledger-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:14px}
.ledger-card{border-radius:20px;padding:15px;color:#fff;box-shadow:0 10px 24px rgba(15,23,42,.12)}
.ledger-card small{display:block;font-weight:900;opacity:.95;line-height:1.5}
.ledger-card b{display:block;font-size:28px;font-weight:900;margin-top:6px;line-height:1}
.ledger-card span{display:block;margin-top:6px;font-weight:800;opacity:.9}
.ledger-card.add,.ledger-card.print,.ledger-card.return,.ledger-card.current{background:linear-gradient(135deg,#111,#333)}
.ledger-card.withdraw{background:linear-gradient(135deg,#ffc400,#d99a00);color:#111}
.ledger-card.waste{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.ledger-equation{border-radius:18px;padding:14px;font-weight:900;line-height:1.8}
.ledger-equation span,.ledger-equation strong{display:block}
.ledger-equation.good{background:#ecfdf5;border:1px solid #86efac;color:#166534}
.ledger-equation.warn{background:#fff7ed;border:1px solid #fdba74;color:#9a3412}
.hidden-section{display:none!important}
.stats-mode-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 18px;padding:10px;border:1px solid #e2e8f0;border-radius:18px;background:#f8fafc}
.employee-stat-head{margin:14px 0;padding:14px;border-radius:18px;background:#f8fafc;border:1px solid #e2e8f0}

/* v3.3 loading visibility */
button.is-loading,
.primary.is-loading{
  opacity:1 !important;
  background:#64748b !important;
  color:#fff !important;
  cursor:not-allowed !important;
  position:relative;
}
.saving-dot{
  display:inline-block;
  width:10px;
  height:10px;
  margin-left:8px;
  border-radius:50%;
  background:#fff;
  animation:savingPulse .8s infinite alternate;
}
@keyframes savingPulse{
  from{opacity:.35; transform:scale(.75)}
  to{opacity:1; transform:scale(1.15)}
}

/* v3.4 employees + PIN merge */
.pin-cell{
  font-weight:900;
  letter-spacing:2px;
  color:#111;
  background:#fff7cc;
}

/* v3.5 restored employee actions */
.pin-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.mini-btn{
  width:auto;
  padding:7px 10px;
  border-radius:10px;
  color:#fff;
  font-size:13px;
  margin:0;
  border:0;
  cursor:pointer;
}
.mini-btn.unlock{background:#ffc400;color:#111}
.mini-btn.reset{background:#111;color:#fff}

/* v3.6 anti duplicate + loading */
button.is-loading,
.primary.is-loading{
  opacity:1 !important;
  background:#64748b !important;
  color:#fff !important;
  cursor:not-allowed !important;
}
.saving-dot{
  display:inline-block;
  width:10px;
  height:10px;
  margin-left:8px;
  border-radius:50%;
  background:#fff;
  animation:savingPulse .8s infinite alternate;
}
@keyframes savingPulse{
  from{opacity:.35; transform:scale(.75)}
  to{opacity:1; transform:scale(1.15)}
}

/* v3.7 schedule status refinement */
.shift-badge{
  display:inline-block;
  margin-top:8px;
  padding:6px 12px;
  border-radius:999px;
  font-weight:900;
  background:rgba(255,255,255,.28);
}
.shift-done b{
  text-decoration:line-through;
  opacity:.75;
}
.shift-done .shift-badge{
  background:rgba(255,255,255,.35);
}
.shift-active{
  outline:3px solid rgba(34,197,94,.35);
}
.shift-active .shift-badge{
  background:#16a34a;
  color:#fff;
}
.shift-not-started .shift-badge{
  background:rgba(255,255,255,.35);
}

/* v3.8 protected login gate */
.login-gate-view{
  min-height:calc(100vh - 90px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.login-gate-view.active{
  display:flex!important;
}
.login-gate-card{
  width:min(460px, 100%);
  background:#fff;
  border:1px solid #e7d58b;
  border-radius:28px;
  padding:24px;
  box-shadow:0 20px 45px rgba(5,5,5,.16);
}
.login-gate-card h1{
  margin:8px 0 6px;
  text-align:center;
  font-size:28px;
  font-weight:900;
}
.login-gate-card p{
  text-align:center;
  color:#64748b;
  font-weight:800;
}
.login-logo-wrap{
  display:flex;
  justify-content:center;
}
.login-logo{
  width:86px!important;
  height:86px!important;
}
.login-type-tabs{
  display:flex;
  gap:10px;
  margin:16px 0;
}
.login-type-tabs button{
  flex:1;
}
.active-login-type{
  outline:3px solid rgba(255,196,0,.3);
}
.global-logout-btn{
  width:auto;
  margin-inline-start:10px;
}

/* v3.9 stable login gate */
.login-gate-view{
  min-height:calc(100vh - 20px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at top left, rgba(255,196,0,.18), transparent 30%),
    #f7f7f2;
}
.login-gate-view.active{
  display:flex!important;
}
.login-gate-card{
  width:min(460px, 100%);
  background:#fff;
  border:1px solid #e7d58b;
  border-radius:28px;
  padding:24px;
  box-shadow:0 20px 45px rgba(5,5,5,.16);
}
.login-gate-card h1{
  margin:8px 0 6px;
  text-align:center;
  font-size:28px;
  font-weight:900;
}
.login-gate-card p{
  text-align:center;
  color:#64748b;
  font-weight:800;
}
.login-logo-wrap{display:flex;justify-content:center}
.login-logo{width:86px!important;height:86px!important}
.login-type-tabs{display:flex;gap:10px;margin:16px 0}
.login-type-tabs button{flex:1}
.active-login-type{outline:3px solid rgba(255,196,0,.3)}
.global-logout-btn{width:auto;margin-inline-start:10px}

/* v4.0 logged account */
.logged-user-badge{
  background:#fff7cc;
  color:#111;
  border:1px solid rgba(255,196,0,.7);
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  margin-inline-start:10px;
  white-space:nowrap;
}
.current-login-info{
  background:#111;
  color:#ffc400;
  border-radius:18px;
  padding:12px 14px;
  font-weight:900;
  margin-bottom:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.14);
}

/* v4.1 visible logout and employee identity */
.floating-logout{
  position:fixed;
  top:14px;
  left:14px;
  z-index:2000;
  border:0;
  border-radius:999px;
  padding:10px 14px;
  background:#111;
  color:#ffc400;
  font-weight:900;
  box-shadow:0 12px 28px rgba(0,0,0,.22);
  cursor:pointer;
}
.employee-preview.ok{
  font-weight:900;
}

/* v4.2 admin simplified home */
.hidden-section{
  display:none!important;
}

/* v4.3 login clean screen + header order */
.login-gate-view.active ~ #stockAlertBar,
.login-gate-view.active ~ #printerAlertBar{
  display:none!important;
}

/* Hide lower black header/footer while on login page */
.topbar.login-topbar-mode{
  display:none!important;
}

/* Keep login page centered and clean */
.login-gate-view.active{
  min-height:100vh!important;
  padding-bottom:24px!important;
}

/* Ensure login logo/title stay at top inside card */
.login-gate-card{
  display:flex;
  flex-direction:column;
}
.login-logo-wrap{
  order:1;
}
.login-gate-card h1{
  order:2;
}
.login-gate-card p{
  order:3;
}
.login-type-tabs{
  order:4;
}
#employeeLoginBox,#adminLoginBox{
  order:5;
}
.remember-row{
  order:6;
}
#gateLoginBtn{
  order:7;
}
#gateLoginMsg{
  order:8;
}

/* v4.4 final cleanup */
.floating-logout{
  position:fixed;
  top:14px;
  left:14px;
  z-index:2000;
  border:0;
  border-radius:999px;
  padding:10px 14px;
  background:#111;
  color:#ffc400;
  font-weight:900;
  box-shadow:0 12px 28px rgba(0,0,0,.22);
  cursor:pointer;
}
.logged-user-badge{
  background:#fff7cc;
  color:#111;
  border:1px solid rgba(255,196,0,.7);
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  margin-inline-start:10px;
  white-space:nowrap;
}
.current-login-info{
  background:#111;
  color:#ffc400;
  border-radius:18px;
  padding:12px 14px;
  font-weight:900;
  margin-bottom:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.14);
}
.login-gate-view.active ~ #stockAlertBar,
.login-gate-view.active ~ #printerAlertBar{
  display:none!important;
}
.topbar.login-topbar-mode{
  display:none!important;
}
.login-gate-view.active{
  min-height:100vh!important;
  padding-bottom:24px!important;
}
.ledger-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:14px}
.ledger-card{border-radius:20px;padding:15px;color:#fff;box-shadow:0 10px 24px rgba(15,23,42,.12)}
.ledger-card small{display:block;font-weight:900;opacity:.95;line-height:1.5}
.ledger-card b{display:block;font-size:28px;font-weight:900;margin-top:6px;line-height:1}
.ledger-card span{display:block;margin-top:6px;font-weight:800;opacity:.9}
.ledger-card.add,.ledger-card.print,.ledger-card.return,.ledger-card.current{background:linear-gradient(135deg,#111,#333)}
.ledger-card.withdraw{background:linear-gradient(135deg,#ffc400,#d99a00);color:#111}
.ledger-card.waste{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.ledger-equation{border-radius:18px;padding:14px;font-weight:900;line-height:1.8}
.ledger-equation span,.ledger-equation strong{display:block}
.ledger-equation.good{background:#ecfdf5;border:1px solid #86efac;color:#166534}
.ledger-equation.warn{background:#fff7ed;border:1px solid #fdba74;color:#9a3412}

/* v4.8 stable checkout layout */
#checkoutView label{
  display:block;
  margin-top:14px;
}
#checkoutView input,
#checkoutView select,
#checkoutView textarea{
  width:100%;
}


/* ===== v5.9 TEST delivery archive ===== */
.test-badge{display:inline-block;font-size:12px;background:#fff3cd;color:#8a5b00;border:1px solid #ffd36b;border-radius:999px;padding:4px 10px;margin-inline-start:8px;vertical-align:middle}
.menu-card.teal{border-color:#0f766e;background:linear-gradient(135deg,#ecfeff,#f0fdfa)}
.filter-row{display:grid;grid-template-columns:1fr 180px auto;gap:10px;align-items:end;margin:12px 0}
.delivery-total-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px;margin:10px 0;font-weight:700}
@media (max-width:700px){.filter-row{grid-template-columns:1fr}.test-badge{display:block;margin:8px 0 0;width:max-content}}

/* ===== v5.9.1 TEST delivery archive: Qi-inspired clean UI ===== */
.qi-delivery-panel{background:linear-gradient(180deg,#ffffff 0%,#f8fffd 100%);border:1px solid #e5f3ef;box-shadow:0 18px 45px rgba(15,118,110,.08)}
.qi-hero-mini{display:flex;justify-content:space-between;gap:16px;align-items:center;background:linear-gradient(135deg,#f0fdfa,#ffffff);border:1px solid #d8f3ec;border-radius:22px;padding:20px 22px;margin-bottom:18px}
.qi-hero-mini h2{margin:4px 0 6px;font-size:26px;color:#102a43}
.qi-hero-mini span{color:#64748b;font-weight:700}
.qi-kicker{margin:0;color:#0f766e;font-weight:900;font-size:13px;letter-spacing:.2px}
.qi-hero-badge{background:#0f766e;color:#fff;border-radius:999px;padding:8px 14px;font-weight:900;box-shadow:0 8px 18px rgba(15,118,110,.22)}
.qi-form-card{background:#fff;border:1px solid #e8eef2;border-radius:22px;padding:20px;box-shadow:0 12px 30px rgba(15,23,42,.05)}
.qi-form-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px;border-bottom:1px solid #eef2f6;padding-bottom:12px}
.qi-form-head h3{margin:0;color:#0f172a;font-size:22px}
.qi-form-head p{margin:0;color:#64748b;max-width:620px;font-weight:700;line-height:1.8}
.delivery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.delivery-grid .field{background:#fbfdff;border:1px solid #edf2f7;border-radius:16px;padding:12px}
.delivery-grid label{display:block;margin-bottom:7px;font-weight:900;color:#334155}
.delivery-grid input,.delivery-grid textarea{background:#fff;border:1px solid #dbe7ee;border-radius:13px;min-height:44px}
.delivery-grid textarea{min-height:86px}
.delivery-file-field small{display:block;margin-top:7px;color:#0f766e;font-weight:800}
.qi-save-btn{width:100%;margin-top:16px;background:linear-gradient(135deg,#0f766e,#14b8a6)!important;border:none!important;border-radius:16px!important;min-height:52px;font-size:17px;font-weight:900;box-shadow:0 14px 25px rgba(15,118,110,.22)}
.qi-archive-panel{border:1px solid #e8eef2;box-shadow:0 12px 35px rgba(15,23,42,.06)}
.qi-filter-row{background:#f8fafc;border:1px solid #e8eef2;border-radius:18px;padding:12px}
.delivery-total-card{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#ecfeff,#ffffff)!important;border:1px solid #ccfbf1!important;color:#0f172a}
.delivery-total-card b{color:#0f766e;font-size:18px}
.delivery-card-list{display:none}
.delivery-doc-link{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 12px;background:#eefcf8;color:#0f766e!important;font-weight:900;text-decoration:none}
.delivery-doc-link:hover{filter:brightness(.97)}
@media (max-width:760px){
  .qi-hero-mini,.qi-form-head{display:block}
  .qi-hero-badge{display:inline-block;margin-top:12px}
  .delivery-grid{grid-template-columns:1fr}
  .qi-delivery-panel,.qi-form-card,.qi-archive-panel{border-radius:18px;padding:14px}
  .delivery-table-wrap{display:none}
  .delivery-card-list{display:grid;gap:12px}
  .delivery-card{background:#fff;border:1px solid #e8eef2;border-radius:18px;padding:14px;box-shadow:0 8px 22px rgba(15,23,42,.05)}
  .delivery-card-top{display:flex;justify-content:space-between;gap:10px;align-items:center;border-bottom:1px solid #eef2f6;padding-bottom:8px;margin-bottom:8px}
  .delivery-card-no{font-weight:900;color:#0f766e}
  .delivery-card-count{background:#f0fdfa;color:#0f766e;border-radius:999px;padding:5px 10px;font-weight:900}
  .delivery-card p{margin:6px 0;color:#334155;font-weight:800}
  .delivery-card small{display:block;color:#64748b;margin-top:4px}
}

/* ===== v5.9.2 TEST: fix delivery menu card contrast ===== */
.menu-card.teal{
  background:linear-gradient(135deg,#111111,#252525) !important;
  color:#ffffff !important;
  border:1px solid rgba(246,190,0,.55) !important;
  box-shadow:0 14px 32px rgba(15,15,15,.18) !important;
}
.menu-card.teal b,
.menu-card.teal small,
.menu-card.teal span{
  color:#ffffff !important;
  opacity:1 !important;
  text-shadow:none !important;
}
.menu-card.teal small{color:#f6d56b !important;font-weight:900 !important}
.menu-card.teal:hover{filter:none;transform:translateY(-4px)}


/* v5.9.3 Delivery security and file metadata */
.locked-actor{
  background:#111827;
  color:#fff;
  border:1px solid rgba(218,165,32,.35);
  border-radius:14px;
  padding:13px 14px;
  font-weight:800;
  line-height:1.5;
  box-shadow:0 10px 24px rgba(17,24,39,.08);
}
.delivery-actor-field small,
.file-info{
  display:block;
  margin-top:7px;
  color:#6b7280;
  font-size:12px;
  line-height:1.5;
}
#deliveryAdminEmployeeSelect.hidden{display:none;}
#deliveryAdminEmployeeSelect{
  width:100%;
  margin-top:10px;
}
.file-info.ok{color:#166534;font-weight:700;}
.file-info.err{color:#b91c1c;font-weight:800;}
.delivery-file-meta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:7px;
}
.delivery-file-meta span{
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  color:#374151;
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
  font-weight:700;
}
.delivery-created-by{
  color:#6b7280;
  font-size:12px;
  margin-top:6px;
}

/* ===== v5.9.5 TEST: Premium delivery UI inspired by the approved mockup ===== */
.delivery-premium-page{
  --dp-teal:#2f8f82;
  --dp-teal-dark:#1d6f65;
  --dp-ink:#111827;
  --dp-muted:#64748b;
  --dp-line:#e4edf3;
  --dp-soft:#f7fbfb;
  --dp-card:#ffffff;
  max-width:1120px;
  margin-inline:auto;
}
.delivery-premium-page .back{margin-bottom:12px}
.delivery-premium-hero{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:20px;
  background:linear-gradient(135deg,#ffffff 0%,#f5fffc 100%);
  border:1px solid #dcefeb;
  border-radius:26px;
  padding:22px 26px;
  box-shadow:0 16px 42px rgba(15,23,42,.07);
  margin-bottom:18px;
}
.delivery-version-pill{
  display:inline-flex;
  align-items:center;
  gap:9px;
  border-radius:999px;
  padding:10px 18px;
  background:#eef8f5;
  border:1px solid #d7ebe6;
  color:var(--dp-teal-dark);
  font-weight:900;
  white-space:nowrap;
}
.delivery-version-pill span{width:9px;height:9px;border-radius:999px;background:var(--dp-teal);display:inline-block}
.delivery-hero-copy{text-align:center}
.delivery-hero-copy h2{margin:3px 0 5px;font-size:34px;line-height:1.1;color:#101827;font-weight:900;letter-spacing:-.5px}
.delivery-hero-copy p:not(.qi-kicker){margin:0;color:var(--dp-muted);font-weight:800;font-size:17px}
.doc-emoji{font-size:28px;vertical-align:middle;opacity:.85}
.delivery-hero-logo{
  width:96px;height:96px;border-radius:22px;background:#fff;border:1px solid var(--dp-line);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  box-shadow:0 10px 24px rgba(15,23,42,.06)
}
.delivery-hero-logo img{width:54px;height:54px;object-fit:contain;display:block}
.delivery-hero-logo small{font-weight:900;color:var(--dp-teal-dark);font-size:12px;line-height:1}
.delivery-premium-card{
  background:rgba(255,255,255,.96);
  border:1px solid var(--dp-line);
  border-radius:22px;
  padding:20px 22px;
  box-shadow:0 12px 30px rgba(15,23,42,.055);
  margin-bottom:14px;
}
.delivery-section-title h3,.delivery-input-card label,.delivery-upload-card > label,.notes-card > label{margin:0 0 12px;font-size:18px;font-weight:900;color:#141d33}
.delivery-actor-row{display:grid;grid-template-columns:78px 1fr;gap:18px;align-items:center}
.delivery-user-icon{
  width:72px;height:72px;border-radius:18px;display:grid;place-items:center;
  background:linear-gradient(135deg,#e6f3ef,#d9ece6);
  color:var(--dp-teal-dark);font-size:34px;border:1px solid #d7e8e4;
}
.delivery-actor-main{min-width:0}
.locked-actor.premium-actor{
  min-height:62px;
  border:1px solid #d8e5ec;
  border-radius:16px;
  display:flex;align-items:center;justify-content:flex-end;
  padding:10px 16px;
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  color:#111827;
  font-size:22px;
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.6);
}
#deliveryAdminEmployeeSelect:not(.hidden){margin-top:10px;background:#fff;border-radius:14px;min-height:50px;font-weight:800}
.delivery-help-row{display:flex;justify-content:flex-end;gap:6px;color:var(--dp-muted);font-weight:800;margin-top:10px;font-size:13px}
.delivery-help-row::before{content:"ⓘ";color:var(--dp-teal-dark);font-weight:900}
.delivery-form-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.delivery-input-card{margin-bottom:14px}
.delivery-input-wrap{position:relative}
.delivery-input-wrap input,.delivery-input-wrap textarea{
  width:100%;
  background:#fff;
  border:1px solid #d8e5ec;
  border-radius:16px;
  min-height:58px;
  padding:13px 48px 13px 14px;
  font-size:17px;
  font-weight:800;
  color:#111827;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.8);
}
.delivery-input-wrap input:focus,.delivery-input-wrap textarea:focus{border-color:var(--dp-teal);box-shadow:0 0 0 4px rgba(47,143,130,.13)}
.delivery-input-wrap .input-icon{position:absolute;right:15px;top:50%;transform:translateY(-50%);opacity:.62;font-size:19px;pointer-events:none}
.delivery-input-wrap .note-icon{top:auto;bottom:12px;transform:none}
.cards-wrap input{font-size:24px;font-weight:900;text-align:right;color:#111827;letter-spacing:.5px}
.delivery-input-card small{display:block;color:var(--dp-muted);font-weight:800;margin-top:8px;font-size:13px}
.delivery-upload-card{padding:22px}
.delivery-drop-zone{
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:175px;
  margin:0!important;
  border:2px dashed #cbd9e6;
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  border-radius:22px;
  cursor:pointer;
  transition:.18s ease;
  text-align:center;
  padding:22px;
}
.delivery-drop-zone:hover{border-color:var(--dp-teal);background:#fbfffd;transform:translateY(-1px)}
.delivery-drop-zone input{display:none!important}
.upload-cloud{font-size:44px;line-height:1;color:var(--dp-teal-dark)}
.delivery-drop-zone b{font-size:17px;color:#111827;font-weight:900}
.delivery-drop-zone small{color:var(--dp-muted);font-weight:800;font-size:13px}
.delivery-file-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:4px}
.delivery-file-badges span,.delivery-file-meta span,.delivery-badge{
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;
  padding:5px 10px;
  background:#f0f6f4;
  color:#1f6f64;
  border:1px solid #dcece8;
  font-weight:900;
  font-size:12px;
}
.file-info.ok{
  margin-top:12px;
  background:#ecfdf5!important;
  border:1px solid #bbf7d0!important;
  color:#166534!important;
  border-radius:14px;
  padding:11px 12px;
  font-weight:900;
}
.file-info.err{
  margin-top:12px;background:#fff1f2!important;border:1px solid #fecdd3!important;color:#9f1239!important;border-radius:14px;padding:11px 12px;font-weight:900
}
.notes-card textarea{min-height:70px;resize:vertical}
.premium-save-btn{
  min-height:58px!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,#2f8f82,#53c2b0)!important;
  box-shadow:0 16px 30px rgba(47,143,130,.22)!important;
  font-size:18px!important;
  margin:2px 0 18px!important;
}
.delivery-archive-card{padding:20px 22px 16px}
.delivery-archive-head h2{font-size:24px}
.delivery-premium-filter{display:grid;grid-template-columns:1fr 190px auto;gap:10px;background:#f8fbfc!important;border:1px solid var(--dp-line)!important;border-radius:18px!important;padding:12px!important;margin-bottom:12px}
.delivery-premium-filter input{min-height:48px;border-radius:14px}
.delivery-premium-filter button{min-height:48px;border-radius:14px}
.delivery-total-card{border-radius:16px!important;margin:12px 0!important;padding:12px 16px!important;background:#f0fdfa!important;border:1px solid #c9f3e8!important;color:#0f172a!important;font-weight:900!important}
.delivery-total-card b{font-size:20px!important;color:var(--dp-teal-dark)!important}
.delivery-table-wrap table{border:1px solid var(--dp-line)!important;border-radius:18px!important;overflow:hidden}
.delivery-table-wrap th{background:#f8fbfc!important;color:#334155!important;font-size:14px!important}
.delivery-table-wrap td{vertical-align:middle;font-weight:800;color:#1f2937}
.delivery-doc-link{background:#eaf8f4!important;color:#1f7a70!important;border:1px solid #cdebe4!important}
.delivery-card-no,.delivery-card-count{font-weight:900}
.delivery-card-no{background:#e9f8f4;border:1px solid #c9eee7;border-radius:999px;padding:6px 10px;color:var(--dp-teal-dark)}
.delivery-card-count{background:#f0fdfa;color:var(--dp-teal-dark);border-radius:999px;padding:6px 10px}
.delivery-card-list{gap:10px}
@media(max-width:760px){
  .delivery-premium-hero{grid-template-columns:1fr;gap:12px;text-align:center;padding:18px}
  .delivery-version-pill{justify-self:center;order:3}
  .delivery-hero-logo{justify-self:center;order:1;width:82px;height:82px}
  .delivery-hero-copy{order:2}
  .delivery-hero-copy h2{font-size:28px}
  .delivery-form-two{grid-template-columns:1fr}
  .delivery-actor-row{grid-template-columns:56px 1fr;gap:12px}
  .delivery-user-icon{width:54px;height:54px;font-size:26px;border-radius:15px}
  .locked-actor.premium-actor{font-size:18px;min-height:54px;padding:8px 12px}
  .delivery-premium-filter{grid-template-columns:1fr}
  .delivery-table-wrap{display:none}
  .delivery-card-list{display:grid!important}
}
@media(min-width:761px){
  .delivery-card-list{display:none!important}
}
.locked-actor.premium-actor{gap:10px;flex-wrap:wrap;position:relative}
.locked-actor.premium-actor .actor-name{font-size:22px;font-weight:900;color:#111827;line-height:1}
.locked-actor.premium-actor .actor-id{font-size:12px;font-weight:900;color:#9a6a00;background:#fff6d7;border:1px solid #e5c45a;border-radius:999px;padding:5px 9px;line-height:1}
.locked-actor.premium-actor small{width:100%;font-size:12px;color:#64748b;font-weight:900;margin-top:2px}
@media(max-width:760px){.locked-actor.premium-actor .actor-name{font-size:18px}}


/* ===== v5.9.6 TEST cleanup: delivery only, no core logic changes ===== */
.test-badge,
.delivery-version-pill,
.delivery-hero-logo{
  display:none!important;
}
.delivery-premium-hero.delivery-no-inner-logo{
  grid-template-columns:1fr;
  justify-items:center;
  text-align:center;
}
.delivery-premium-page,
.delivery-premium-card,
.delivery-card,
.locked-actor.premium-actor,
.delivery-help-row,
.delivery-card-list,
.delivery-table-wrap table{
  direction:rtl;
  text-align:right;
}
.delivery-hero-copy,
.delivery-hero-copy h2,
.delivery-hero-copy p{
  text-align:center;
}
.delivery-card{
  border:1px solid var(--dp-line,#e4edf3);
  border-radius:18px;
  padding:16px 18px;
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.055);
}
.delivery-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  direction:rtl;
}
.delivery-card p,
.delivery-card small,
.delivery-created-by{
  direction:rtl;
  text-align:right;
}
.delivery-doc-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:7px 13px;
  border-radius:12px;
  font-weight:900;
}


/* ===== v5.9.6 HOTFIX: force delivery employee actor name RTL/right side ===== */
#deliveryCurrentActor.locked-actor.premium-actor,
.locked-actor.premium-actor{
  direction:rtl!important;
  text-align:right!important;
  justify-content:flex-start!important;
  align-items:center!important;
}
#deliveryCurrentActor .actor-name,
.locked-actor.premium-actor .actor-name{
  direction:rtl!important;
  text-align:right!important;
  order:1!important;
}
#deliveryCurrentActor .actor-id,
.locked-actor.premium-actor .actor-id{
  order:2!important;
}
#deliveryCurrentActor small,
.locked-actor.premium-actor small{
  order:3!important;
  direction:rtl!important;
  text-align:right!important;
}

/* ===== v5.9.7 TEST: Employee delivery activity modal ===== */
body.modal-open{overflow:hidden}
.employee-activity-trigger{cursor:pointer;position:relative;transition:transform .18s ease,box-shadow .18s ease}
.employee-activity-trigger:hover{transform:translateY(-1px)}
.employee-activity-trigger:after{content:"عرض النشاط";position:absolute;left:12px;bottom:-8px;background:#0f766e;color:#fff;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:900;box-shadow:0 8px 18px rgba(15,118,110,.2)}
.employee-activity-modal.hidden{display:none}
.employee-activity-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px}
.employee-activity-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(5px)}
.employee-activity-panel{position:relative;width:min(920px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:28px;padding:22px;box-shadow:0 30px 90px rgba(15,23,42,.28);border:1px solid rgba(226,232,240,.9)}
.employee-activity-close{position:absolute;top:14px;left:14px;width:40px;height:40px;border:0;border-radius:14px;background:#f1f5f9;color:#0f172a;font-size:28px;line-height:1;cursor:pointer;font-weight:900}
.employee-activity-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:8px 4px 18px;border-bottom:1px solid #e2e8f0}
.employee-activity-head h2{margin:2px 0 4px;font-size:28px;color:#0f172a;font-weight:1000}
.employee-activity-head span{color:#64748b;font-weight:800}
.employee-activity-badge{background:#ecfdf5;color:#0f766e;border:1px solid #bbf7d0;border-radius:999px;padding:9px 14px;font-weight:1000;white-space:nowrap}
.employee-activity-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.employee-activity-stat{background:linear-gradient(180deg,#f8fafc,#fff);border:1px solid #e2e8f0;border-radius:20px;padding:14px;min-height:84px;display:flex;flex-direction:column;justify-content:space-between}
.employee-activity-stat small{color:#64748b;font-weight:900}
.employee-activity-stat b{color:#0f172a;font-size:20px;font-weight:1000;direction:ltr;text-align:right}
.employee-activity-list-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:12px 0}
.employee-activity-list-head h3{margin:0;color:#0f172a;font-weight:1000}
.employee-activity-list-head span{color:#64748b;font-weight:800;font-size:13px}
.employee-activity-list{display:grid;gap:10px}
.employee-activity-list-head>div{display:flex;flex-direction:column;gap:4px}
.employee-activity-toggle{border:0;background:#0f766e;color:#fff;border-radius:999px;padding:10px 14px;font-weight:1000;cursor:pointer;box-shadow:0 10px 22px rgba(15,118,110,.18);white-space:nowrap}
.employee-activity-toggle:hover{filter:brightness(.96)}
.employee-activity-list-all{max-height:360px;overflow:auto;padding-left:4px}
.employee-activity-row{display:grid;grid-template-columns:1.3fr 1.2fr .8fr .8fr;gap:10px;align-items:center;border:1px solid #e2e8f0;background:#fff;border-radius:18px;padding:12px}
.employee-activity-row b{font-weight:1000;color:#0f766e;direction:ltr;display:inline-block}
.employee-activity-row span{font-weight:900;color:#334155}
.employee-activity-row small{display:block;color:#64748b;font-weight:800;margin-top:3px}
.employee-activity-row a{display:inline-block;text-decoration:none;background:#f0fdfa;color:#0f766e;border:1px solid #99f6e4;border-radius:999px;padding:7px 10px;font-weight:900;text-align:center}
.employee-activity-empty{text-align:center;border:1px dashed #cbd5e1;border-radius:18px;padding:22px;color:#64748b;font-weight:900;background:#f8fafc}
@media(max-width:760px){.employee-activity-panel{padding:18px;border-radius:22px}.employee-activity-head{display:block;padding-left:42px}.employee-activity-badge{display:inline-block;margin-top:10px}.employee-activity-grid{grid-template-columns:1fr}.employee-activity-row{grid-template-columns:1fr}.employee-activity-trigger:after{display:none}}

/* ===== v5.9.7 HOTFIX: Professional employee activity modal, no nested scroll, no Excel ===== */
.employee-activity-modal{padding:18px;align-items:center;justify-items:center}
.employee-activity-panel{width:min(1240px,96vw);max-height:92vh;overflow:auto;border-radius:26px;padding:22px;background:#fff}
.employee-activity-close{z-index:5;background:#fff;border:1px solid #e2e8f0;box-shadow:0 8px 22px rgba(15,23,42,.08)}
.employee-activity-shell{display:grid;grid-template-columns:310px minmax(0,1fr);gap:18px;direction:rtl}
.employee-activity-side{border:1px solid #e2e8f0;border-radius:22px;padding:20px 16px;background:linear-gradient(180deg,#ffffff,#fbfdff);display:flex;flex-direction:column;align-items:center;gap:12px;min-height:650px}
.employee-activity-avatar{width:112px;height:112px;border-radius:999px;background:linear-gradient(135deg,#ccfbf1,#0f766e);display:grid;place-items:center;color:#fff;font-size:44px;font-weight:1000;box-shadow:0 14px 34px rgba(15,118,110,.18)}
.employee-activity-side h2{margin:6px 0 0;color:#0f172a;font-size:24px;font-weight:1000;text-align:center;line-height:1.25}
.employee-activity-role{color:#64748b;font-weight:900;margin-bottom:6px}
.employee-activity-side-card{width:100%;border:1px solid #e2e8f0;background:#fff;border-radius:16px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.employee-activity-side-card small{color:#64748b;font-weight:900}
.employee-activity-side-card b{color:#0f172a;font-weight:1000;direction:ltr;text-align:left;font-size:14px}
.employee-activity-side-close{width:100%;margin-top:auto;border:1px solid #e2e8f0;background:#fff;color:#475569;border-radius:16px;padding:13px 14px;font-weight:1000;cursor:pointer}
.employee-activity-main{min-width:0}
.employee-activity-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 12px}
.employee-activity-topbar h3{margin:2px 0 0;color:#0f172a;font-size:26px;font-weight:1000}
.employee-activity-topbar>span{color:#64748b;font-weight:1000;direction:ltr;margin-top:8px}
.employee-activity-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px}
.employee-activity-stat{min-height:110px;border-radius:18px;padding:14px;background:#fff}
.employee-activity-stat b{font-size:24px;margin-top:10px;text-align:center;color:#0f172a}
.employee-activity-stat em{font-style:normal;color:#64748b;font-weight:900;text-align:center;font-size:12px}
.employee-activity-table-card{border:1px solid #e2e8f0;border-radius:20px;background:#fff;padding:12px}
.employee-activity-list-head{margin:0 0 12px}
.employee-activity-list-head h3{font-size:22px}
.employee-activity-toggle{border-radius:14px;padding:12px 18px;background:#0f766e;color:#fff}
.employee-activity-toggle.is-light{background:#fff;color:#0f766e;border:1px solid #99f6e4;box-shadow:none}
.employee-activity-table-head,.employee-activity-row{display:grid;grid-template-columns:.35fr 1fr 1.55fr .9fr 1fr .75fr;gap:8px;align-items:center}
.employee-activity-table-head{padding:10px 12px;color:#64748b;font-weight:1000;font-size:13px;border-bottom:1px solid #e2e8f0}
.employee-activity-list{display:grid;gap:7px;max-height:none!important;overflow:visible!important;padding-left:0!important}
.employee-activity-row{border:1px solid #edf2f7;border-radius:14px;padding:9px 12px;background:#fff;min-height:48px}
.employee-activity-cell{min-width:0;font-weight:900;color:#334155}
.employee-activity-cell span{font-weight:900;color:#475569}
.employee-activity-cell b{font-weight:1000;color:#0f766e;direction:ltr;display:inline-block}
.employee-activity-cell small{display:inline;margin-inline-start:4px;color:#64748b;font-weight:800}
.employee-activity-cell a{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;background:#ecfdf5;color:#0f766e;border:1px solid #99f6e4;border-radius:12px;padding:7px 14px;font-weight:1000;min-width:70px}
.employee-activity-index b{color:#0f172a}
.employee-activity-pagination{display:flex;align-items:center;gap:10px;justify-content:center;margin-top:14px;color:#64748b;font-weight:900;flex-wrap:wrap}
.employee-activity-pagination button{width:36px;height:36px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:10px;cursor:pointer;font-size:22px;font-weight:1000;line-height:1}
.employee-activity-pagination button:not(:disabled):hover{background:#f8fafc}
.employee-activity-pagination button:disabled{opacity:.45;cursor:not-allowed}
.employee-activity-pagination span{background:#0f766e;color:#fff;border-radius:10px;padding:8px 14px;direction:ltr}
.employee-activity-pagination small,.employee-activity-count{width:100%;text-align:center;color:#64748b;font-weight:900;margin-top:2px}
@media(max-width:980px){.employee-activity-shell{grid-template-columns:1fr}.employee-activity-side{min-height:0}.employee-activity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-activity-table-head{display:none}.employee-activity-row{grid-template-columns:1fr 1fr}.employee-activity-panel{max-height:92vh}}
@media(max-width:640px){.employee-activity-grid{grid-template-columns:1fr}.employee-activity-row{grid-template-columns:1fr}.employee-activity-topbar{display:block}.employee-activity-list-head{display:block}.employee-activity-toggle{width:100%;margin-top:10px}}

/* ===== v5.9.8 TEST: Activity Center Revamp ===== */
.activity-center-shell{direction:rtl;background:linear-gradient(180deg,#f8fafc,#fff);border:1px solid #e2e8f0;border-radius:26px;padding:18px;box-shadow:0 16px 45px rgba(15,23,42,.07)}
.activity-center-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.activity-center-head h3{margin:2px 0 4px;font-size:28px;color:#0f172a;font-weight:1000}
.activity-center-head p{margin:0;color:#64748b;font-weight:700}
.activity-eyebrow{display:inline-flex;background:#ccfbf1;color:#0f766e;border-radius:999px;padding:5px 12px;font-weight:1000;font-size:12px}
.activity-total{min-width:130px;background:#0f766e;color:#fff;border-radius:20px;padding:14px 18px;text-align:center;box-shadow:0 14px 30px rgba(15,118,110,.20)}
.activity-total small{display:block;opacity:.85;font-weight:800}.activity-total b{font-size:28px;line-height:1.2}
.activity-center-filters{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 16px}
.activity-filter-chip{border:1px solid #dbeafe;background:#fff;color:#334155;border-radius:999px;padding:10px 15px;font-weight:1000;cursor:pointer;transition:.18s ease;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.activity-filter-chip:hover{transform:translateY(-1px);border-color:#14b8a6}.activity-filter-chip.active{background:#0f766e;color:#fff;border-color:#0f766e;box-shadow:0 10px 24px rgba(15,118,110,.22)}
.activity-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.activity-summary-grid>div{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:13px 14px;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.activity-summary-grid small{display:block;color:#64748b;font-weight:900;margin-bottom:4px}.activity-summary-grid b{font-size:24px;color:#0f172a}
.activity-card-list{display:grid;gap:12px}.activity-card{display:grid;grid-template-columns:52px 1fr auto;gap:14px;align-items:center;background:#fff;border:1px solid #e2e8f0;border-right:6px solid #94a3b8;border-radius:22px;padding:14px;box-shadow:0 10px 26px rgba(15,23,42,.06);cursor:pointer;transition:.18s ease}
.activity-card:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(15,23,42,.10)}
.activity-card.checkin{border-right-color:#22c55e}.activity-card.checkout{border-right-color:#ef4444}.activity-card.withdraw{border-right-color:#3b82f6}.activity-card.delivery{border-right-color:#8b5cf6}.activity-card.add{border-right-color:#f97316}.activity-card.other{border-right-color:#64748b}
.activity-card-icon{width:52px;height:52px;border-radius:18px;background:#f1f5f9;display:grid;place-items:center;font-size:24px}.activity-card-body{min-width:0}.activity-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:5px}.activity-card-type{font-weight:1000;color:#0f766e}.activity-card time{color:#64748b;font-weight:800;font-size:13px}.activity-card h4{margin:0 0 4px;color:#0f172a;font-size:18px;font-weight:1000}.activity-card p{margin:0;color:#334155;font-weight:800;line-height:1.6}.activity-card-details{color:#64748b!important;font-size:13px;margin-top:2px!important}.activity-details-btn{border:0;background:#ecfeff;color:#0f766e;border-radius:14px;padding:10px 13px;font-weight:1000;cursor:pointer}.activity-load-more{display:block;margin:16px auto 0;border:0;background:#0f766e;color:#fff;border-radius:16px;padding:12px 24px;font-weight:1000;cursor:pointer;box-shadow:0 12px 28px rgba(15,118,110,.22)}.activity-empty{background:#fff;border:1px dashed #cbd5e1;border-radius:18px;padding:22px;text-align:center;color:#64748b;font-weight:900}
.activity-details-modal.hidden{display:none}.activity-details-modal{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:18px}.activity-details-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(5px)}.activity-details-panel{position:relative;width:min(720px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:28px;padding:22px;box-shadow:0 30px 90px rgba(15,23,42,.28);border:1px solid rgba(226,232,240,.9);direction:rtl}.activity-details-close{position:absolute;top:14px;left:14px;width:40px;height:40px;border:0;border-radius:14px;background:#f1f5f9;color:#0f172a;font-size:28px;line-height:1;cursor:pointer;font-weight:900}.activity-details-head{display:flex;gap:14px;align-items:center;border-radius:22px;padding:18px;background:#f8fafc;border:1px solid #e2e8f0;margin-bottom:14px}.activity-details-big-icon{width:64px;height:64px;border-radius:22px;display:grid;place-items:center;font-size:32px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.08)}.activity-details-head span{font-weight:1000;color:#0f766e}.activity-details-head h2{margin:4px 0;color:#0f172a}.activity-details-head p{margin:0;color:#64748b;font-weight:800}.activity-details-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.activity-details-grid>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:14px}.activity-details-grid .wide{grid-column:1/-1}.activity-details-grid small{display:block;color:#64748b;font-weight:900;margin-bottom:6px}.activity-details-grid b{color:#0f172a;line-height:1.7;word-break:break-word}
@media(max-width:760px){.activity-center-head{align-items:stretch;flex-direction:column}.activity-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.activity-card{grid-template-columns:44px 1fr}.activity-details-btn{grid-column:1/-1}.activity-card-top{align-items:flex-start;flex-direction:column}.activity-details-grid{grid-template-columns:1fr}}

/* ===== v5.9.8.1 TEST: Real UI polish for Delivery + Activity Center =====
   Scope: typography/responsive polish only. No logic or data changes. */
.delivery-premium-page{
  font-size:14px;
}
.delivery-premium-page .delivery-premium-hero{
  padding:18px 22px;
}
.delivery-premium-page .delivery-hero-copy h2{
  font-size:30px!important;
  line-height:1.15;
  letter-spacing:-.25px;
}
.delivery-premium-page .delivery-hero-copy p:not(.qi-kicker){
  font-size:14px!important;
  line-height:1.7;
}
.delivery-premium-page .qi-kicker{
  font-size:12px!important;
}
.delivery-premium-page .delivery-section-title h3,
.delivery-premium-page .delivery-input-card label,
.delivery-premium-page .delivery-upload-card > label,
.delivery-premium-page .notes-card > label,
.delivery-premium-page .delivery-archive-head h2{
  font-size:16px!important;
  line-height:1.45;
}
.delivery-premium-page .delivery-archive-head span,
.delivery-premium-page .delivery-help-row,
.delivery-premium-page .delivery-input-card small,
.delivery-premium-page .delivery-drop-zone small,
.delivery-premium-page .delivery-created-by{
  font-size:12px!important;
  line-height:1.55;
}
#deliveryCurrentActor.locked-actor.premium-actor,
.locked-actor.premium-actor{
  font-size:19px!important;
  line-height:1.35;
}
#deliveryCurrentActor .actor-name,
.locked-actor.premium-actor .actor-name{
  font-size:19px!important;
  line-height:1.2!important;
}
#deliveryCurrentActor .actor-id,
.locked-actor.premium-actor .actor-id{
  font-size:11px!important;
  padding:4px 8px!important;
}
#deliveryCurrentActor small,
.locked-actor.premium-actor small{
  font-size:11px!important;
  line-height:1.35!important;
}
.delivery-premium-page .delivery-input-wrap input,
.delivery-premium-page .delivery-input-wrap textarea{
  font-size:15px!important;
  font-weight:800;
}
.delivery-premium-page .cards-wrap input{
  font-size:20px!important;
  font-weight:900;
}
.delivery-premium-page .premium-save-btn{
  font-size:16px!important;
}
.delivery-premium-page .delivery-table-wrap th{
  font-size:12px!important;
  line-height:1.45;
  font-weight:900!important;
}
.delivery-premium-page .delivery-table-wrap td{
  font-size:13px!important;
  line-height:1.55;
  font-weight:800!important;
}
.delivery-premium-page .delivery-table-wrap td b{
  font-size:13px!important;
}
.delivery-premium-page .delivery-doc-link{
  font-size:12px!important;
  padding:6px 11px!important;
  min-height:32px!important;
}
.delivery-premium-page .delivery-file-meta span,
.delivery-premium-page .delivery-file-badges span,
.delivery-premium-page .delivery-badge{
  font-size:11px!important;
  padding:4px 8px!important;
}
.delivery-premium-page .delivery-card p{
  font-size:13px!important;
  line-height:1.55;
}
.delivery-premium-page .delivery-card small{
  font-size:12px!important;
}
.delivery-premium-page .delivery-card-no,
.delivery-premium-page .delivery-card-count{
  font-size:12px!important;
}

/* Activity Center final polish: shrink card content by 1px only */
.activity-card h4{
  font-size:17px!important;
}
.activity-card p{
  font-size:14px!important;
}
.activity-card time,
.activity-card-details{
  font-size:12px!important;
}

@media(max-width:760px){
  .delivery-premium-page{
    max-width:100%;
    padding-inline:0;
    font-size:12px;
  }
  .delivery-premium-page .back{
    margin-inline:8px;
  }
  .delivery-premium-page .delivery-premium-hero{
    padding:14px 12px!important;
    border-radius:18px!important;
    margin-bottom:12px!important;
  }
  .delivery-premium-page .delivery-hero-copy h2{
    font-size:22px!important;
    line-height:1.25;
  }
  .delivery-premium-page .delivery-hero-copy p:not(.qi-kicker){
    font-size:12px!important;
    line-height:1.6;
  }
  .delivery-premium-page .qi-kicker{
    font-size:11px!important;
  }
  .delivery-premium-page .delivery-premium-card,
  .delivery-premium-page .qi-delivery-panel,
  .delivery-premium-page .qi-form-card,
  .delivery-premium-page .qi-archive-panel{
    padding:12px!important;
    border-radius:16px!important;
    margin-bottom:10px!important;
  }
  .delivery-premium-page .delivery-section-title h3,
  .delivery-premium-page .delivery-input-card label,
  .delivery-premium-page .delivery-upload-card > label,
  .delivery-premium-page .notes-card > label,
  .delivery-premium-page .delivery-archive-head h2{
    font-size:14px!important;
    line-height:1.45;
  }
  .delivery-premium-page .delivery-actor-row{
    grid-template-columns:48px 1fr!important;
    gap:10px!important;
  }
  .delivery-premium-page .delivery-user-icon{
    width:46px!important;
    height:46px!important;
    font-size:22px!important;
    border-radius:13px!important;
  }
  #deliveryCurrentActor.locked-actor.premium-actor,
  .locked-actor.premium-actor{
    min-height:48px!important;
    padding:8px 10px!important;
    font-size:15px!important;
    gap:6px!important;
  }
  #deliveryCurrentActor .actor-name,
  .locked-actor.premium-actor .actor-name{
    font-size:15px!important;
  }
  #deliveryCurrentActor .actor-id,
  .locked-actor.premium-actor .actor-id{
    font-size:10px!important;
    padding:3px 7px!important;
  }
  #deliveryCurrentActor small,
  .locked-actor.premium-actor small{
    font-size:10px!important;
  }
  .delivery-premium-page .delivery-help-row,
  .delivery-premium-page .delivery-input-card small,
  .delivery-premium-page .delivery-drop-zone small,
  .delivery-premium-page .delivery-archive-head span{
    font-size:10.5px!important;
  }
  .delivery-premium-page .delivery-input-wrap input,
  .delivery-premium-page .delivery-input-wrap textarea{
    min-height:42px!important;
    font-size:12px!important;
    border-radius:12px!important;
    padding:10px 38px 10px 10px!important;
  }
  .delivery-premium-page .cards-wrap input{
    font-size:15px!important;
  }
  .delivery-premium-page .input-icon{
    right:11px!important;
    font-size:15px!important;
  }
  .delivery-premium-page .premium-save-btn{
    min-height:44px!important;
    font-size:13px!important;
    border-radius:13px!important;
    margin-bottom:12px!important;
  }
  .delivery-premium-page .delivery-premium-filter{
    display:grid!important;
    grid-template-columns:1fr 115px auto!important;
    gap:7px!important;
    padding:8px!important;
    border-radius:14px!important;
  }
  .delivery-premium-page .delivery-premium-filter input,
  .delivery-premium-page .delivery-premium-filter button{
    min-height:36px!important;
    font-size:11px!important;
    border-radius:10px!important;
    padding:6px 9px!important;
  }
  .delivery-premium-page .delivery-card-list{
    gap:7px!important;
  }
  .delivery-premium-page .delivery-card{
    padding:9px 10px!important;
    border-radius:13px!important;
    box-shadow:0 6px 16px rgba(15,23,42,.045)!important;
  }
  .delivery-premium-page .delivery-card-top{
    gap:6px!important;
    padding-bottom:6px!important;
    margin-bottom:6px!important;
  }
  .delivery-premium-page .delivery-card p{
    font-size:11px!important;
    margin:4px 0!important;
  }
  .delivery-premium-page .delivery-card small,
  .delivery-premium-page .delivery-created-by{
    font-size:10px!important;
  }
  .delivery-premium-page .delivery-card-no,
  .delivery-premium-page .delivery-card-count{
    font-size:10.5px!important;
    padding:4px 7px!important;
  }
  .delivery-premium-page .delivery-doc-link{
    font-size:10.5px!important;
    padding:5px 8px!important;
    min-height:28px!important;
    border-radius:9px!important;
  }
  .delivery-premium-page .delivery-file-meta{
    gap:4px!important;
    margin-top:5px!important;
  }
  .delivery-premium-page .delivery-file-meta span,
  .delivery-premium-page .delivery-file-badges span,
  .delivery-premium-page .delivery-badge{
    font-size:9.5px!important;
    padding:3px 6px!important;
  }
  .activity-card h4{font-size:16px!important}
  .activity-card p{font-size:13px!important}
  .activity-card time,
  .activity-card-details{font-size:11px!important}
}


/* v5.9.8 final delivery/activity typography polish - real implementation */
.employee-activity-role{display:none!important}
.employee-activity-topbar h3,
.employee-activity-list-head h3{letter-spacing:0!important}
.employee-activity-stat:last-child b{font-size:22px!important;line-height:1.35!important}
.employee-activity-cell,
.employee-activity-cell span,
.employee-activity-cell b,
.employee-activity-table-head span,
.employee-activity-pagination,
.employee-activity-pagination small,
.employee-activity-count{font-size:calc(1em - 1px)!important}
.employee-activity-cell a{font-size:calc(1em - 1px)!important;padding:6px 12px!important}
.employee-activity-delivery-name span{font-size:15px!important;font-weight:900!important;color:#0f172a!important;line-height:1.35!important}
.employee-activity-list-head span{display:none!important}

/* Delivery archive admin typography consistency */
#deliveryArchiveTab h3{font-size:24px!important;line-height:1.25!important;margin-bottom:8px!important}
#deliveryArchiveTab .hint{font-size:14px!important;line-height:1.45!important}
#deliveryArchiveTab .filter-row input,
#deliveryArchiveTab .filter-row button{font-size:14px!important;min-height:44px!important;border-radius:14px!important}
#deliveryArchiveAdmin .delivery-table-wrap table{font-size:14px!important;border-radius:18px!important;overflow:hidden!important}
#deliveryArchiveAdmin .delivery-table-wrap th{font-size:13px!important;font-weight:900!important;padding:12px 10px!important;color:#334155!important;background:#f8fbfc!important}
#deliveryArchiveAdmin .delivery-table-wrap td{font-size:13px!important;font-weight:800!important;line-height:1.35!important;padding:13px 10px!important;color:#111827!important;vertical-align:middle!important}
#deliveryArchiveAdmin .delivery-table-wrap td b{font-size:13px!important;font-weight:900!important}
#deliveryArchiveAdmin .delivery-table-wrap small{font-size:11px!important;font-weight:800!important;line-height:1.2!important}
#deliveryArchiveAdmin .delivery-doc-link{font-size:13px!important;padding:8px 12px!important;min-height:34px!important;border-radius:12px!important}
#deliveryArchiveAdmin .delivery-file-meta span{font-size:10.5px!important;padding:4px 8px!important}
#deliveryArchiveAdmin .delivery-created-by{font-size:12px!important;font-weight:800!important;line-height:1.35!important}
#deliveryArchiveTab .summary-box,
#deliveryArchiveTab .delivery-summary,
#deliveryArchiveTab [class*="summary"]{font-size:14px!important}
#deliveryArchiveTab .delivery-card p{font-size:12px!important;line-height:1.35!important}
#deliveryArchiveTab .delivery-card small{font-size:11px!important}
#deliveryArchiveTab .delivery-card-no,
#deliveryArchiveTab .delivery-card-count{font-size:11px!important}

@media(max-width:760px){
  .employee-activity-stat:last-child b{font-size:18px!important}
  .employee-activity-delivery-name span{font-size:13px!important}
  #deliveryArchiveTab h3{font-size:20px!important}
  #deliveryArchiveTab .hint{font-size:12px!important}
  #deliveryArchiveTab .filter-row input,
  #deliveryArchiveTab .filter-row button{font-size:12px!important;min-height:38px!important}
  #deliveryArchiveAdmin .delivery-card p{font-size:11px!important}
  #deliveryArchiveAdmin .delivery-doc-link{font-size:11px!important;padding:6px 10px!important;min-height:30px!important}
  #deliveryArchiveAdmin .delivery-file-meta span{font-size:9.5px!important}
}

/* ===== v5.9.9 TEST: Attachments Center polish ===== */
.delivery-file-preview-card{
  display:flex!important;align-items:center;gap:12px;margin-top:12px;padding:12px;border-radius:18px!important;
  border:1px solid #c7efe7;background:linear-gradient(180deg,#f0fdfa,#fff);color:#0f172a!important;text-align:right
}
.delivery-file-thumb{width:64px;height:64px;border:1px solid #c7efe7;border-radius:16px;overflow:hidden;background:#fff;padding:0;cursor:pointer;flex:0 0 auto;box-shadow:0 6px 16px rgba(15,118,110,.08)}
.delivery-file-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.delivery-file-preview-meta{display:flex;flex-direction:column;gap:4px;min-width:0;font-weight:800;color:#334155}
.delivery-file-preview-meta b{color:#0f766e;font-size:13px;font-weight:1000}
.delivery-file-preview-meta span{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:420px;color:#0f172a}
.delivery-file-preview-meta div{display:flex;gap:6px;flex-wrap:wrap}
.delivery-file-preview-meta em,.delivery-file-meta-clean span{font-style:normal;background:#e9f8f4;color:#0f766e;border:1px solid #c9eee7;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:900;line-height:1}
.delivery-doc-link.delivery-doc-preview-btn{border:1px solid #c7efe7!important;background:#eaf8f4!important;color:#0f766e!important;border-radius:12px!important;padding:7px 11px!important;font-size:13px!important;font-weight:900!important;gap:6px;cursor:pointer;min-width:80px;box-shadow:none}
.delivery-doc-link.delivery-doc-preview-btn:hover{filter:brightness(.97);transform:translateY(-1px)}
.delivery-doc-ico{font-size:14px;line-height:1}
.delivery-file-meta-clean{margin-top:6px;justify-content:center;gap:5px}
.delivery-doc-empty{color:#94a3b8;font-weight:800}
.delivery-card-v599 .delivery-card-document{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.delivery-attachment-viewer.hidden{display:none!important}
.delivery-attachment-viewer{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:18px;direction:rtl}
.delivery-attachment-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(5px)}
.delivery-attachment-panel{position:relative;width:min(980px,96vw);max-height:92vh;background:#fff;border:1px solid #e2e8f0;border-radius:26px;box-shadow:0 30px 90px rgba(15,23,42,.32);display:flex;flex-direction:column;overflow:hidden}
.delivery-attachment-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid #e2e8f0;background:#fbfdff}
.delivery-attachment-head small{color:#0f766e;font-weight:900}
.delivery-attachment-head h3{margin:2px 0 0;color:#0f172a;font-size:20px;font-weight:1000}
.delivery-attachment-head button{width:38px;height:38px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;font-size:26px;font-weight:900;cursor:pointer;color:#0f172a}
.delivery-attachment-body{min-height:360px;max-height:70vh;display:grid;place-items:center;background:#f8fafc;overflow:auto;padding:14px}
.delivery-attachment-body img{max-width:100%;max-height:68vh;object-fit:contain;border-radius:18px;box-shadow:0 12px 34px rgba(15,23,42,.12);background:#fff}
.delivery-attachment-body iframe{width:100%;height:68vh;border:0;border-radius:16px;background:#fff}
.delivery-attachment-fallback{text-align:center;color:#475569;font-weight:900}.delivery-attachment-fallback a{display:inline-flex;margin-top:10px;color:#0f766e;text-decoration:none;border:1px solid #c7efe7;background:#eaf8f4;border-radius:999px;padding:10px 14px}
.delivery-attachment-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid #e2e8f0;background:#fff}
.delivery-attachment-actions a,.delivery-attachment-actions button{border:1px solid #dbe6ee;background:#fff;border-radius:14px;padding:10px 14px;font-weight:900;color:#334155;text-decoration:none;cursor:pointer}
.delivery-attachment-actions a{background:#0f766e;color:#fff;border-color:#0f766e}
@media(max-width:760px){
  .delivery-file-preview-card{align-items:flex-start;padding:10px;gap:10px}.delivery-file-thumb{width:52px;height:52px;border-radius:14px}.delivery-file-preview-meta span{max-width:240px;font-size:12px}.delivery-file-preview-meta b{font-size:12px}.delivery-file-preview-meta em,.delivery-file-meta-clean span{font-size:10px;padding:3px 7px}.delivery-doc-link.delivery-doc-preview-btn{font-size:11px!important;padding:6px 8px!important;min-width:auto;border-radius:10px!important}.delivery-attachment-viewer{padding:10px}.delivery-attachment-panel{border-radius:20px;width:98vw;max-height:94vh}.delivery-attachment-head{padding:12px}.delivery-attachment-head h3{font-size:16px}.delivery-attachment-body{min-height:300px;padding:8px}.delivery-attachment-body img{max-height:66vh}.delivery-attachment-body iframe{height:66vh}.delivery-attachment-actions{padding:10px;justify-content:stretch}.delivery-attachment-actions a,.delivery-attachment-actions button{flex:1;text-align:center;font-size:12px;padding:10px 8px}
}

/* ===== v5.9.9 HOTFIX: Stock page mobile responsive polish ===== */
html, body{max-width:100%;overflow-x:hidden}
#stockView{max-width:100%;overflow-x:hidden}
#stockView .panel{max-width:100%;overflow:hidden}
#stockView .section-title h2{line-height:1.35}
#stockView .section-title span{line-height:1.45}
#stockView .summary-grid,
#stockView .ledger-grid{min-width:0}
#stockView .stat,
#stockView .ledger-card{min-width:0;word-break:break-word}
#stockView #inventoryArchive,
#stockView #cardsLedger,
#stockView #wasteReport{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
#stockView #inventoryArchive table,
#stockView #wasteReport table{min-width:760px}
#stockView .ledger-equation{max-width:100%;overflow:hidden;word-break:break-word}
#stockView .ledger-equation span{overflow-wrap:anywhere}

@media(max-width:760px){
  #stockView .back{margin:0 0 10px;width:auto;min-height:38px;font-size:12px;padding:9px 12px;border-radius:12px}
  #stockView .panel{padding:12px!important;border-radius:18px!important;margin-top:10px!important}
  #stockView .section-title{display:flex!important;align-items:flex-start!important;gap:4px!important;margin-bottom:10px!important}
  #stockView .section-title h2{font-size:17px!important;line-height:1.35!important;margin:0!important}
  #stockView .section-title span{font-size:11px!important;font-weight:800!important;line-height:1.45!important}
  #stockView .sub-title{margin:12px 0!important}
  #stockView .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  #stockView .stock-grid .stat,
  #stockView .stat{min-height:86px!important;padding:10px!important;border-radius:15px!important;gap:2px!important}
  #stockView .stat::before{height:4px!important}
  #stockView .stat-title,
  #stockView .stat span{font-size:12px!important;line-height:1.3!important}
  #stockView .stat small{font-size:10.5px!important;line-height:1.25!important}
  #stockView .stat b{font-size:21px!important;line-height:1.1!important;margin-top:3px!important}
  #stockView .ledger-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-bottom:10px!important}
  #stockView .ledger-card{padding:10px!important;border-radius:15px!important;min-height:82px!important}
  #stockView .ledger-card small{font-size:11px!important;line-height:1.35!important}
  #stockView .ledger-card b{font-size:22px!important;margin-top:4px!important}
  #stockView .ledger-card span{font-size:11px!important;margin-top:4px!important}
  #stockView .ledger-equation{padding:10px!important;border-radius:14px!important;font-size:11px!important;line-height:1.55!important}
  #stockView .hint{font-size:11px!important;line-height:1.6!important}
  #stockView #inventoryArchive,
  #stockView #wasteReport{border:1px solid #e2e8f0;border-radius:14px;background:#fff}
  #stockView #inventoryArchive table,
  #stockView #wasteReport table{min-width:680px;font-size:11px!important;border:0!important;border-radius:0!important}
  #stockView #inventoryArchive th,
  #stockView #inventoryArchive td,
  #stockView #wasteReport th,
  #stockView #wasteReport td{font-size:11px!important;padding:9px 8px!important;line-height:1.35!important;white-space:nowrap!important}
  #stockView #inventoryArchive td:last-child,
  #stockView #wasteReport td:last-child{white-space:normal!important;min-width:130px!important}
}

@media(max-width:430px){
  #stockView .summary-grid,
  #stockView .ledger-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #stockView .panel{padding:10px!important}
  #stockView .section-title h2{font-size:16px!important}
  #stockView .stat b,
  #stockView .ledger-card b{font-size:20px!important}
}

/* v5.9.9 reports mobile polish - admin daily report only */
#adminView #reportsTab,
#adminView #dailyReport{
  max-width:100%;
  overflow:hidden;
}
#adminView #dailyReport{
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
#adminView #dailyReport table{
  margin:0;
  border:0!important;
  border-radius:0!important;
}
#adminView #dailyReport th,
#adminView #dailyReport td{
  vertical-align:middle;
  white-space:nowrap;
}

@media(max-width:700px){
  #adminView{max-width:100%;overflow-x:hidden;}
  #adminView .panel.admin-panel{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    padding:12px!important;
    border-radius:20px!important;
    overflow:hidden;
  }
  #adminView .section-title{
    gap:4px!important;
    margin-bottom:10px!important;
  }
  #adminView .section-title h2{
    font-size:24px!important;
    line-height:1.28!important;
    margin:0!important;
    word-break:break-word;
  }
  #adminView .section-title span{
    font-size:17px!important;
    line-height:1.35!important;
  }
  #adminView .admin-logout-btn{
    position:static!important;
    display:block!important;
    width:fit-content!important;
    max-width:100%!important;
    margin:8px 0 12px auto!important;
    font-size:13px!important;
    padding:9px 14px!important;
    border-radius:14px!important;
  }
  #adminView .tabs{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin:10px 0 14px!important;
  }
  #adminView .tab{
    width:100%!important;
    min-height:42px!important;
    padding:9px 8px!important;
    font-size:13px!important;
    line-height:1.25!important;
    border-radius:14px!important;
    white-space:normal!important;
  }
  #adminView #reportsTab h3{
    font-size:22px!important;
    line-height:1.3!important;
    margin:14px 0 10px!important;
  }
  #adminView #dailyReport{
    margin-top:8px!important;
  }
  #adminView #dailyReport table{
    min-width:780px!important;
    font-size:11px!important;
  }
  #adminView #dailyReport th,
  #adminView #dailyReport td{
    font-size:11px!important;
    padding:9px 8px!important;
    line-height:1.35!important;
  }
  #adminView #dailyReport th{
    font-size:11.5px!important;
    font-weight:900!important;
  }
  #adminView #dailyReport td:first-child,
  #adminView #dailyReport th:first-child{
    min-width:88px!important;
    white-space:normal!important;
  }
  #adminView #dailyReport td:nth-child(4),
  #adminView #dailyReport th:nth-child(4){
    min-width:84px!important;
    white-space:normal!important;
  }
  #adminView #dailyReport td:nth-child(10),
  #adminView #dailyReport th:nth-child(10){
    min-width:110px!important;
    white-space:normal!important;
  }
  #adminView #dailyReport td:last-child,
  #adminView #dailyReport th:last-child{
    min-width:130px!important;
    white-space:normal!important;
  }
}

@media(max-width:420px){
  #adminView .panel.admin-panel{padding:10px!important;border-radius:18px!important;}
  #adminView .section-title h2{font-size:21px!important;}
  #adminView .section-title span{font-size:15px!important;}
  #adminView .tabs{grid-template-columns:1fr 1fr!important;gap:7px!important;}
  #adminView .tab{font-size:12px!important;min-height:39px!important;padding:8px 6px!important;}
  #adminView #reportsTab h3{font-size:20px!important;}
  #adminView #dailyReport table{min-width:720px!important;font-size:10.5px!important;}
  #adminView #dailyReport th,
  #adminView #dailyReport td{font-size:10.5px!important;padding:8px 7px!important;}
}


/* ===== v5.9.10 QUALITY PASS 1: admin/mobile polish ===== */

/* Admin logout inside manager panel is intentionally removed/hidden; Back is enough */
#adminView #adminLogoutBtn,
#adminView .admin-logout-btn{
  display:none!important;
}

/* Keep floating logout away from top alerts on mobile */
@media(max-width:700px){
  body{
    overflow-x:hidden!important;
  }
  .floating-logout{
    position:static!important;
    display:block;
    width:max-content!important;
    max-width:calc(100vw - 24px)!important;
    margin:10px 12px 8px auto!important;
    padding:10px 16px!important;
    border-radius:18px!important;
    z-index:10!important;
    box-shadow:0 8px 20px rgba(15,23,42,.18)!important;
  }
  .stock-alert,
  .printer-alert{
    position:relative!important;
    top:auto!important;
    z-index:9!important;
    margin:0!important;
  }
}

/* Manager panel mobile structure */
@media(max-width:700px){
  #adminView .panel.admin-panel{
    max-width:100%!important;
    overflow:hidden!important;
  }

  #adminView .tab-content{
    max-width:100%!important;
    overflow:hidden!important;
  }

  #adminView .tab-content > h3{
    font-size:21px!important;
    line-height:1.3!important;
    margin:18px 0 10px!important;
  }

  #adminView .tab-content > .hint{
    font-size:14px!important;
    line-height:1.65!important;
    margin:0 0 12px!important;
  }

  #adminView .stats-mode-tabs{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    padding:5px!important;
    border:1px solid #e2e8f0!important;
    border-radius:18px!important;
    background:#f8fafc!important;
    margin:12px 0 14px!important;
  }

  #adminView .stats-mode-tabs .mini-btn{
    width:100%!important;
    margin:0!important;
    min-height:42px!important;
    font-size:13px!important;
    border-radius:14px!important;
    padding:9px 8px!important;
  }

  .mobile-cards-list{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }

  .mobile-data-card{
    border:1px solid #e2e8f0;
    border-radius:18px;
    background:#fff;
    padding:12px;
    box-shadow:0 8px 20px rgba(15,23,42,.04);
  }

  .mobile-data-card .card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    padding-bottom:8px;
    margin-bottom:8px;
    border-bottom:1px solid #eef2f7;
  }

  .mobile-data-card .card-title{
    font-size:16px;
    line-height:1.35;
    font-weight:900;
    color:#0f172a;
  }

  .mobile-data-card .card-id{
    color:#64748b;
    font-size:12px;
    font-weight:900;
    margin-top:2px;
  }

  .mobile-data-card .card-index{
    min-width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#fff7c2;
    color:#0f172a;
    font-weight:900;
    font-size:13px;
  }

  .mobile-data-card .card-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .mobile-data-card .card-field{
    background:#f8fafc;
    border:1px solid #eef2f7;
    border-radius:14px;
    padding:8px;
    min-height:54px;
  }

  .mobile-data-card .card-field.full{
    grid-column:1 / -1;
  }

  .mobile-data-card .card-field small{
    display:block;
    color:#64748b;
    font-size:11px;
    line-height:1.25;
    font-weight:900;
    margin-bottom:3px;
  }

  .mobile-data-card .card-field b,
  .mobile-data-card .card-field span{
    display:block;
    font-size:14px;
    line-height:1.35;
    font-weight:900;
    color:#0f172a;
    word-break:break-word;
  }

  .mobile-data-card .green-value{color:#15803d!important;}
  .mobile-data-card .red-value{color:#dc2626!important;}
  .mobile-data-card .status-pill-soft{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:70px;
    padding:6px 8px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
    background:#ecfdf5;
    color:#047857;
    border:1px solid #a7f3d0;
  }

  .mobile-data-card .pin-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:8px;
  }

  .mobile-data-card .pin-actions .mini-btn{
    width:100%;
    min-height:36px;
    font-size:12px;
    padding:8px;
    border-radius:12px;
  }

  /* Use cards on mobile for heavy manager tables */
  #allEmployeesStats .table-wrap,
  #employeesList .table-wrap,
  #adminWasteReport .table-wrap,
  #wasteReport .table-wrap,
  #publicSchedulesList .table-wrap{
    display:none!important;
  }

  #allEmployeesStats .mobile-cards-list,
  #employeesList .mobile-cards-list,
  #adminWasteReport .mobile-cards-list,
  #wasteReport .mobile-cards-list,
  #publicSchedulesList .mobile-cards-list{
    display:grid!important;
  }
}

/* On desktop keep traditional tables and hide mobile cards */
@media(min-width:701px){
  .mobile-cards-list{
    display:none!important;
  }
}

/* Schedule saved list polish */
#publicSchedulesList .schedule-saved-card .card-field b{
  font-size:15px;
}

/* Small phones */
@media(max-width:420px){
  #adminView .tab-content > h3{
    font-size:19px!important;
  }
  #adminView .tab-content > .hint{
    font-size:13px!important;
  }
  .mobile-data-card{
    padding:10px;
    border-radius:16px;
  }
  .mobile-data-card .card-title{
    font-size:15px;
  }
  .mobile-data-card .card-grid{
    gap:7px;
  }
  .mobile-data-card .card-field{
    min-height:50px;
    padding:7px;
    border-radius:12px;
  }
  .mobile-data-card .card-field b,
  .mobile-data-card .card-field span{
    font-size:13px;
  }
}

/* ===== v5.9.10 QUALITY PASS 1B polish ===== */
@media(max-width:700px){
  #singleStatsSection label{
    display:block;
    font-size:18px!important;
    font-weight:900!important;
    margin:14px 0 8px!important;
    color:#0f172a!important;
  }
  #employeeStatsSelect{
    min-height:52px!important;
    font-size:15px!important;
    border-radius:18px!important;
    padding:10px 14px!important;
    margin-bottom:12px!important;
  }
  .employee-stat-head-mobile-polish{
    text-align:center!important;
    padding:12px!important;
    margin:12px 0!important;
  }
  .employee-stat-head-mobile-polish h3{
    font-size:20px!important;
    margin:0!important;
  }
  .employee-single-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  .employee-single-summary .stat{
    min-height:92px!important;
    padding:12px!important;
    border-radius:18px!important;
  }
  .employee-single-summary .stat small{
    font-size:12px!important;
    line-height:1.35!important;
  }
  .employee-single-summary .stat b{
    font-size:24px!important;
  }
  .single-employee-table{
    display:none!important;
  }
  .single-employee-mobile-list{
    display:grid!important;
    margin-top:12px!important;
  }
  #savedSchedulesList .table-wrap{
    display:none!important;
  }
  #savedSchedulesList .mobile-cards-list{
    display:grid!important;
  }
}
@media(min-width:701px){
  .single-employee-mobile-list,
  #savedSchedulesList .mobile-cards-list{
    display:none!important;
  }
}

/* ===== v5.9.10 QUALITY PASS 1C: saved schedules show-more polish ===== */
.saved-schedules-more-wrap{
  display:flex;
  justify-content:center;
  margin:18px 0 4px;
}
.saved-schedules-more-btn{
  min-width:190px;
  border-radius:18px;
  font-weight:900;
  padding:12px 22px;
}
@media (max-width: 720px){
  #savedSchedulesList .saved-schedules-table{display:none !important;}
  #savedSchedulesList .saved-schedules-mobile-list{display:grid !important; gap:12px;}
  .saved-schedules-more-wrap{margin-top:14px;}
  .saved-schedules-more-btn{width:100%; max-width:320px; font-size:16px;}
}


/* v5.9.10 Quality Pass 2 - Single Printer Polish */
.single-printer-card {
  max-width: 520px;
  margin-inline: auto;
}
#printersView .section-title span {
  color: #5b6472;
  font-weight: 800;
}
#printerSelect option,
#manualCleanPrinter option {
  font-weight: 800;
}
@media (max-width: 700px) {
  #printersView .printer-list {
    grid-template-columns: 1fr !important;
  }
  #printersView .single-printer-card h3 {
    font-size: 1.35rem;
  }
}

/* ===== v5.9.10 QUALITY PASS 2C: global mobile scroll recovery ===== */
@media (max-width: 900px){
  html, body{
    height:auto!important;
    min-height:100%!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    position:static!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }
  body.modal-open{
    overflow-y:hidden!important;
  }
  .container,
  .view,
  .view.active,
  #homeView,
  #adminView,
  #stockView,
  #deliveryView,
  #deliveryArchiveView,
  #checkinView,
  #checkoutView,
  #loginView{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:visible!important;
  }
  .panel:not(.employee-activity-panel):not(.activity-details-panel):not(.delivery-attachment-panel){
    max-height:none!important;
    overflow-y:visible!important;
  }
  .table-wrap,
  .delivery-table-wrap,
  #dailyReport,
  #wasteReport,
  #adminWasteReport,
  #inventoryArchive{
    -webkit-overflow-scrolling:touch!important;
  }
}

/* ===== v5.9.10 QUALITY PASS 3A: delivery mobile typography/card polish =====
   Scope: mobile UI polish only for delivery page and employee activity modal. No logic changes. */
@media (max-width: 760px){
  /* Delivery screen: reduce inconsistent mobile typography and card density */
  .delivery-premium-page{
    font-size:11.5px!important;
  }
  .delivery-premium-page .delivery-section-title h3,
  .delivery-premium-page .delivery-input-card label,
  .delivery-premium-page .delivery-upload-card > label,
  .delivery-premium-page .notes-card > label,
  .delivery-premium-page .delivery-archive-head h2{
    font-size:13px!important;
    line-height:1.35!important;
  }
  .delivery-premium-page .delivery-premium-card,
  .delivery-premium-page .qi-form-card,
  .delivery-premium-page .qi-delivery-panel,
  .delivery-premium-page .qi-archive-panel{
    padding:10px!important;
    border-radius:15px!important;
  }
  .delivery-premium-page .delivery-user-icon{
    width:42px!important;
    height:42px!important;
    font-size:20px!important;
  }
  #deliveryCurrentActor.locked-actor.premium-actor,
  .locked-actor.premium-actor{
    min-height:44px!important;
    padding:7px 9px!important;
    border-radius:13px!important;
    gap:5px!important;
  }
  #deliveryCurrentActor .actor-name,
  .locked-actor.premium-actor .actor-name{
    font-size:14px!important;
    line-height:1.15!important;
  }
  #deliveryCurrentActor .actor-id,
  .locked-actor.premium-actor .actor-id{
    font-size:9.5px!important;
    padding:3px 6px!important;
  }
  #deliveryCurrentActor small,
  .locked-actor.premium-actor small,
  .delivery-premium-page .delivery-help-row{
    font-size:9.5px!important;
    line-height:1.4!important;
  }
  .delivery-premium-page .delivery-input-wrap input,
  .delivery-premium-page .delivery-input-wrap textarea{
    font-size:11.5px!important;
  }
  .delivery-premium-page .cards-wrap input{
    font-size:14px!important;
  }
  .delivery-premium-page .delivery-card{
    padding:8px 9px!important;
    border-radius:12px!important;
  }
  .delivery-premium-page .delivery-card p{
    font-size:10.5px!important;
    line-height:1.45!important;
  }
  .delivery-premium-page .delivery-card small,
  .delivery-premium-page .delivery-created-by{
    font-size:9.5px!important;
  }
  .delivery-premium-page .delivery-doc-link,
  .delivery-premium-page .delivery-card-no,
  .delivery-premium-page .delivery-card-count{
    font-size:9.5px!important;
  }

  /* Employee activity modal: make the mobile view compact and consistent */
  .employee-activity-modal{
    padding:8px!important;
    place-items:start center!important;
  }
  .employee-activity-panel{
    width:100%!important;
    max-width:100%!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:18px!important;
    padding:12px!important;
  }
  .employee-activity-close{
    width:34px!important;
    height:34px!important;
    border-radius:11px!important;
    font-size:22px!important;
    top:9px!important;
    left:9px!important;
  }
  .employee-activity-shell{
    display:block!important;
  }
  .employee-activity-side{
    min-height:0!important;
    padding:12px!important;
    border-radius:16px!important;
    gap:8px!important;
    margin-bottom:10px!important;
  }
  .employee-activity-avatar{
    width:78px!important;
    height:78px!important;
    font-size:30px!important;
  }
  .employee-activity-side h2{
    font-size:18px!important;
    line-height:1.2!important;
    margin:4px 0!important;
  }
  .employee-activity-side-card{
    padding:9px 10px!important;
    border-radius:13px!important;
  }
  .employee-activity-side-card small{
    font-size:11px!important;
  }
  .employee-activity-side-card b{
    font-size:11px!important;
    line-height:1.45!important;
  }
  .employee-activity-side-close{
    min-height:40px!important;
    padding:9px 10px!important;
    font-size:12px!important;
    border-radius:13px!important;
  }
  .employee-activity-topbar{
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
    margin-bottom:9px!important;
  }
  .employee-activity-topbar .qi-kicker{
    font-size:11px!important;
    margin:0!important;
  }
  .employee-activity-topbar h3{
    font-size:20px!important;
    line-height:1.25!important;
    margin:0!important;
  }
  .employee-activity-topbar>span{
    font-size:12px!important;
    margin:0!important;
  }
  .employee-activity-grid{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin-bottom:10px!important;
  }
  .employee-activity-stat{
    min-height:76px!important;
    padding:10px!important;
    border-radius:14px!important;
  }
  .employee-activity-stat small{
    font-size:11px!important;
    line-height:1.35!important;
  }
  .employee-activity-stat b{
    font-size:19px!important;
    margin-top:5px!important;
    line-height:1.2!important;
  }
  .employee-activity-stat em{
    font-size:10.5px!important;
  }
  .employee-activity-table-card{
    padding:10px!important;
    border-radius:15px!important;
  }
  .employee-activity-list-head{
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
    margin-bottom:8px!important;
  }
  .employee-activity-list-head h3{
    font-size:18px!important;
    line-height:1.25!important;
  }
  .employee-activity-toggle{
    min-height:40px!important;
    padding:9px 12px!important;
    font-size:12px!important;
    border-radius:13px!important;
    width:100%!important;
    margin:0!important;
  }
  .employee-activity-table-head{
    display:none!important;
  }
  .employee-activity-list{
    gap:7px!important;
  }
  .employee-activity-row{
    grid-template-columns:1fr!important;
    gap:5px!important;
    padding:9px 10px!important;
    border-radius:13px!important;
    min-height:0!important;
  }
  .employee-activity-cell,
  .employee-activity-cell span,
  .employee-activity-cell b,
  .employee-activity-cell small{
    font-size:11.5px!important;
    line-height:1.45!important;
  }
  .employee-activity-delivery-name span{
    font-size:12px!important;
  }
  .employee-activity-cell a{
    font-size:11px!important;
    min-height:30px!important;
    padding:6px 10px!important;
    border-radius:10px!important;
  }
  .employee-activity-pagination,
  .employee-activity-pagination small,
  .employee-activity-count{
    font-size:11px!important;
  }
}

/* QUALITY PASS 3D: compact show-more controls */
.qpass-load-more-wrap{display:flex;justify-content:center;align-items:center;margin:16px 0 4px;width:100%;}
.qpass-load-more-btn{border:0;border-radius:18px;padding:13px 28px;font-weight:900;font-size:16px;cursor:pointer;background:linear-gradient(135deg,#0f766e,#2dd4bf);color:#fff;box-shadow:0 10px 24px rgba(15,118,110,.18);min-width:190px;}
@media(max-width:640px){.qpass-load-more-wrap{margin:14px 0 2px}.qpass-load-more-btn{font-size:14px;padding:11px 22px;border-radius:16px;min-width:165px}}

/* ===== v5.9.10 QUALITY PASS 3E: delivery archive pagination ===== */
.delivery-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin:18px auto 6px;
  padding:8px 4px;
}
.delivery-page-numbers{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;}
.delivery-page-btn{
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  color:#0f172a;
  border-radius:12px;
  min-width:42px;
  height:40px;
  padding:0 14px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
}
.delivery-page-btn.active{
  background:#0f8175;
  border-color:#0f8175;
  color:#fff;
}
.delivery-page-btn:disabled{opacity:.45;cursor:not-allowed;}
.delivery-pagination-info{
  width:100%;
  text-align:center;
  color:#64748b;
  font-weight:800;
  font-size:13px;
  margin-top:4px;
}
@media (max-width: 700px){
  .delivery-pagination{gap:8px;margin-top:14px;}
  .delivery-page-btn{min-width:36px;height:36px;border-radius:10px;padding:0 10px;font-size:12px;}
  .delivery-pagination-info{font-size:12px;}
}

/* ===== v5.9.10 QUALITY PASS 3F HOTFIX: mobile delivery archive no horizontal overflow ===== */
@media (max-width: 760px){
  html,
  body,
  #app,
  .view,
  .page,
  .container,
  .delivery-premium-page,
  .delivery-premium-card,
  .qi-archive-panel,
  #deliveryArchivePublic,
  #deliveryArchiveAdmin,
  #deliveryArchiveTab{
    max-width:100vw!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  .delivery-premium-page .delivery-premium-filter,
  #deliveryArchiveTab .filter-row{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  .delivery-premium-page .delivery-premium-filter input,
  .delivery-premium-page .delivery-premium-filter button,
  #deliveryArchiveTab .filter-row input,
  #deliveryArchiveTab .filter-row button{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  .delivery-table-wrap{
    display:none!important;
  }

  .delivery-card-list{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:10px!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  .delivery-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    display:block!important;
    padding:10px 11px!important;
  }

  .delivery-card *,
  .delivery-card-v599 *,
  .delivery-card-document *,
  .delivery-file-meta *{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  .delivery-card-top{
    display:grid!important;
    grid-template-columns:1fr!important;
    justify-items:start!important;
    align-items:start!important;
    gap:6px!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .delivery-card-no,
  .delivery-card-count{
    display:inline-flex!important;
    width:auto!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }

  .delivery-card p,
  .delivery-card small,
  .delivery-created-by{
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    text-align:right!important;
  }

  .delivery-card-document,
  .delivery-file-meta,
  .delivery-file-meta-clean{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
    align-items:center!important;
    gap:6px!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .delivery-doc-link,
  .delivery-doc-link.delivery-doc-preview-btn{
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  .delivery-total-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    gap:8px!important;
    flex-wrap:wrap!important;
  }
}


/* ===== v5.9.10 QUALITY PASS 3G: iPhone delivery input zoom / mobile width hotfix ===== */
@media (max-width: 768px){
  html, body{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }

  /* iOS Safari zooms the page when focused inputs are below 16px. */
  input, select, textarea, button{
    font-size:16px!important;
  }

  #deliveryCardsCount,
  #deliveryName,
  #deliveryNotes,
  #deliveryQuickSearch,
  #deliveryQuickDateFilter,
  #deliverySearch,
  #deliveryDateFilter{
    font-size:16px!important;
    transform:none!important;
    zoom:1!important;
  }

  .delivery-premium-page,
  .delivery-premium-card,
  .delivery-input-wrap,
  .delivery-drop-zone,
  .delivery-archive-card,
  .qi-delivery-panel{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  .delivery-input-wrap input,
  .delivery-input-wrap textarea,
  .delivery-premium-filter input,
  .delivery-premium-filter button{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  .delivery-file-badges{
    justify-content:center!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
}


/* ===== v5.9.11 Employee Stats / Employee Report polish ===== */
.menu-card.indigo{
  background: linear-gradient(135deg,#eef2ff,#e0e7ff);
  border-color: rgba(99,102,241,.25);
}
.employee-stats-filters,
.employee-report-filters{
  display:grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap:10px;
  align-items:end;
  margin:14px 0;
  padding:12px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  background:#f8fafc;
}
.employee-report-filters{
  grid-template-columns: repeat(7, minmax(92px, 1fr));
}
.filter-field label{
  display:block;
  font-size:12px;
  color:#64748b;
  margin-bottom:5px;
}
.filter-field input,
.filter-field select,
.employee-stats-filters select,
.employee-stats-filters input,
.employee-report-filters input{
  width:100%;
  min-width:0;
  height:42px;
  border-radius:12px;
  border:1px solid #dbe3ef;
  padding:0 10px;
  font-size:16px;
  background:#fff;
}
.employee-report-summary.summary-grid{
  margin:12px 0;
}
.employee-report-days{
  display:grid;
  gap:10px;
  margin-top:10px;
}
.employee-report-day-card{
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  background:#fff;
  padding:12px;
  box-shadow:0 8px 20px rgba(15,23,42,.05);
}
.employee-report-day-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.employee-report-day-head b{font-size:14px;color:#0f172a;}
.employee-report-day-head span{font-size:12px;color:#64748b;}
.employee-report-day-grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:8px;
}
.employee-report-day-grid span{
  background:#f8fafc;
  border-radius:12px;
  padding:8px;
  font-size:12px;
  color:#64748b;
}
.employee-report-day-grid span b{
  display:block;
  color:#0f172a;
  font-size:15px;
  margin-top:3px;
}
.employee-report-section-title{
  margin:16px 0 8px;
  font-weight:800;
  color:#0f172a;
}
.employee-stat-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:10px 0;
}
.employee-stat-head h3{margin:0;font-size:17px;}
.employee-stat-head span{font-size:12px;color:#64748b;}
.empty-state{
  padding:14px;
  border-radius:14px;
  background:#f8fafc;
  color:#64748b;
  text-align:center;
}
@media (max-width: 768px){
  .employee-stats-filters,
  .employee-report-filters{
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:10px;
  }
  .employee-stats-filters button,
  .employee-report-filters button{
    min-height:40px;
    font-size:12px;
  }
  .employee-report-filters .primary{
    grid-column:1 / -1;
  }
  .employee-report-day-grid{
    grid-template-columns:1fr 1fr;
  }
  .employee-report-day-card{
    padding:10px;
  }
  .employee-report-day-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .employee-stat-head{
    align-items:flex-start;
    flex-direction:column;
  }
  #employeeStatsTab .summary-grid,
  #employeeReportView .summary-grid{
    grid-template-columns:1fr 1fr;
  }
  #employeeStatsTab .table-wrap{
    overflow-x:auto;
    max-width:100%;
  }
  #employeeStatsTab table{
    min-width:760px;
    font-size:12px;
  }
}

/* ===== v5.9.11 HOTFIX UI: employee self report card polish ===== */
.menu-card.employee-self-report-entry,
.menu-card.indigo.employee-self-report-entry{
  background:linear-gradient(135deg,#ffffff,#f8fffd) !important;
  color:#0f172a !important;
  border:1px solid rgba(15,118,110,.20) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.10) !important;
  min-height:112px !important;
  padding:16px 14px !important;
}
.menu-card.employee-self-report-entry span,
.menu-card.indigo.employee-self-report-entry span{
  color:#0f766e !important;
  font-size:26px !important;
  line-height:1 !important;
  opacity:1 !important;
}
.menu-card.employee-self-report-entry b,
.menu-card.indigo.employee-self-report-entry b{
  color:#0f172a !important;
  font-size:20px !important;
  font-weight:900 !important;
  opacity:1 !important;
  text-shadow:none !important;
}
.menu-card.employee-self-report-entry small,
.menu-card.indigo.employee-self-report-entry small{
  color:#64748b !important;
  font-size:12px !important;
  font-weight:800 !important;
  opacity:1 !important;
  text-shadow:none !important;
}
@media (max-width:768px){
  .menu-card.employee-self-report-entry,
  .menu-card.indigo.employee-self-report-entry{
    min-height:92px !important;
    padding:13px 12px !important;
    border-radius:20px !important;
  }
  .menu-card.employee-self-report-entry span,
  .menu-card.indigo.employee-self-report-entry span{
    font-size:23px !important;
  }
  .menu-card.employee-self-report-entry b,
  .menu-card.indigo.employee-self-report-entry b{
    font-size:18px !important;
  }
  .menu-card.employee-self-report-entry small,
  .menu-card.indigo.employee-self-report-entry small{
    font-size:11px !important;
  }
}

/* ===== v5.9.11 FINAL QA: inventory archive + admin PIN mobile polish ===== */
.inventory-archive-cards{display:none;}
.admin-pin-security-box{margin:14px 0 18px;}
.admin-pin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0;}
.admin-pin-grid label{display:flex;flex-direction:column;gap:6px;font-weight:800;color:#17423c;}
.admin-pin-grid input{font-size:16px;min-height:44px;}
#adminPinSecurityBox .primary{min-height:44px;}
@media (max-width: 768px){
  .inventory-archive-table-wrap{display:none!important;}
  .inventory-archive-cards{display:flex;flex-direction:column;gap:10px;margin-top:10px;}
  .inventory-archive-card{background:#fff;border:1px solid rgba(15,118,110,.12);border-radius:16px;padding:12px;box-shadow:0 8px 22px rgba(15,23,42,.06);}
  .inventory-archive-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;border-bottom:1px solid rgba(15,118,110,.08);padding-bottom:8px;margin-bottom:9px;}
  .inventory-archive-card-head b{font-size:13px;color:#123b35;line-height:1.6;}
  .inventory-archive-card-head span{font-size:11px;color:#64748b;white-space:nowrap;direction:ltr;}
  .inventory-archive-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .inventory-archive-card-grid div{background:#f8fafc;border-radius:12px;padding:8px;min-width:0;}
  .inventory-archive-card-grid small{display:block;font-size:10.5px;color:#64748b;margin-bottom:3px;}
  .inventory-archive-card-grid b{display:block;font-size:12px;color:#0f172a;line-height:1.45;word-break:break-word;}
  .admin-pin-grid{grid-template-columns:1fr;gap:10px;}
  .admin-pin-security-box{padding:14px!important;}
  #adminPinSecurityBox .primary{width:100%;font-size:14px;}
}

/* ===== v5.9.11 HOTFIX: Admin PIN save button visibility ===== */
#adminPinSecurityBox #saveAdminPinBtn,
#adminPinSecurityBox button.primary,
.admin-pin-security-box #saveAdminPinBtn{
  background: linear-gradient(135deg, #111827, #263238) !important;
  color: #ffffff !important;
  border: 1px solid rgba(17,24,39,.18) !important;
  box-shadow: 0 10px 22px rgba(17,24,39,.18) !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}
#adminPinSecurityBox #saveAdminPinBtn:hover,
.admin-pin-security-box #saveAdminPinBtn:hover{
  transform: translateY(-1px);
  filter: brightness(1.04);
}
#adminPinSecurityBox #saveAdminPinBtn:active,
.admin-pin-security-box #saveAdminPinBtn:active{
  transform: translateY(0);
}
@media (max-width: 768px){
  #adminPinSecurityBox #saveAdminPinBtn,
  .admin-pin-security-box #saveAdminPinBtn{
    width: 100% !important;
    min-height: 46px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
  }
}
