:root{--primary:#102a43;--accent:#0ea5a4;--muted:#64748b;--bg:#f4f7fb;--card:#fff;--danger:#dc2626;--ok:#16a34a;--line:#e2e8f0}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Tahoma,Arial,sans-serif;color:#0f172a}.topbar{background:linear-gradient(90deg,#07182e,#123c69);color:#fff;padding:14px 22px;display:flex;gap:20px;align-items:center;justify-content:space-between;box-shadow:0 4px 18px #0002}.brand{font-size:20px;font-weight:800;letter-spacing:.2px}.brand span{color:#facc15}nav{display:flex;gap:8px;flex-wrap:wrap}nav a{color:#fff;text-decoration:none;background:#ffffff18;padding:8px 11px;border-radius:10px;font-size:14px}nav a:hover{background:#ffffff30}.container{width:min(1180px,96%);margin:22px auto}.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:16px;box-shadow:0 12px 30px #0f172a12}h1,h2,h3{margin-top:0;color:#0b1f35}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}label{font-weight:700;font-size:14px;display:block;margin-bottom:6px}input,select,textarea{width:100%;border:1px solid #cbd5e1;border-radius:11px;padding:10px;background:#fff;font-size:15px}textarea{min-height:90px}.btn,button{border:0;background:var(--primary);color:#fff;border-radius:11px;padding:10px 16px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-block}.btn.secondary{background:#64748b}.btn.green{background:var(--ok)}.btn.danger{background:var(--danger)}table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden}th,td{border-bottom:1px solid var(--line);padding:10px;text-align:right}th{background:#eef5ff;color:#0b1f35}.total{font-weight:900;font-size:18px}.section-total{background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:10px;margin-top:8px}.summary-box{margin-top:10px}.alert{background:#fee2e2;border:1px solid #fca5a5;color:#991b1b;border-radius:12px;padding:10px;margin-bottom:12px}.success{background:#dcfce7;border:1px solid #86efac;color:#166534;border-radius:12px;padding:10px;margin-bottom:12px}.login-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#f8fafc,#dbeafe)}.login-card{background:#fff;width:min(420px,92%);border:1px solid var(--line);border-radius:20px;padding:28px;box-shadow:0 20px 50px #0f172a22}.login-card h1{text-align:center;margin-bottom:22px}.pill{display:inline-block;border-radius:999px;background:#e0f2fe;color:#075985;padding:5px 10px;font-size:13px}.kpi{background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:14px}.kpi b{display:block;font-size:22px;margin-top:6px}.muted{color:var(--muted);font-size:13px}.receipt{width:320px;margin:auto;background:#fff;padding:12px;font-size:13px}.receipt h2{text-align:center}.receipt table td,.receipt table th{padding:6px}@media(max-width:800px){.grid2{grid-template-columns:1fr}.topbar{display:block}nav{margin-top:12px}.container{width:98%;margin-top:12px}.card{padding:12px}}@media print{.topbar,.no-print,.btn,button{display:none!important}body{background:#fff}.container{width:100%;margin:0}.card{box-shadow:none;border:0}.receipt{width:100%}}
.notice{background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;padding:12px;margin:12px 0;color:#7c2d12}.unread{background:#eff6ff;font-weight:700}.topbar{box-shadow:0 4px 16px rgba(15,23,42,.12)}.brand span{color:#f59e0b}.card{border-radius:16px}.btn.green{background:#047857}.btn.secondary{background:#334155}

.quick-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.welcome-card{border-top:4px solid #0b6bcb}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.brand{display:flex;align-items:center;gap:8px}.brand-logo{height:34px;max-width:90px;object-fit:contain;background:#fff;border-radius:7px;padding:2px}.danger-text{color:#dc2626}.ok-text{color:#047857}.print-header{text-align:center;margin-bottom:14px}

/* V1.10 logo constraints */
.logo-box{display:inline-flex;align-items:center;justify-content:center;background:#fff;border-radius:10px;padding:4px;border:1px solid #e5e7eb;overflow:hidden;flex:0 0 auto}.logo-box.small{width:56px;height:42px}.logo-box.medium{width:90px;height:58px}.logo-box.large{width:130px;height:74px}.brand-logo{max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:contain!important;display:block}.admin-actions{display:flex;gap:6px;flex-wrap:wrap}.mini-form{display:inline}.danger-link{color:#dc2626;font-weight:700}.logo-preview-box{width:220px;height:90px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #cbd5e1;border-radius:14px;overflow:hidden}.logo-preview-box img{max-width:100%;max-height:100%;object-fit:contain}


/* V1.11 strict header logo containment */
.topbar{min-height:66px;align-items:center;overflow:hidden!important}
.brand{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;line-height:1.2!important}
.brand .logo-box{display:inline-flex!important;align-items:center!important;justify-content:center!important;background:#fff!important;border-radius:10px!important;padding:3px!important;border:1px solid #e5e7eb!important;overflow:hidden!important;flex:0 0 auto!important}
.brand .logo-box.small{width:56px!important;height:38px!important}
.brand .logo-box.medium{width:86px!important;height:52px!important}
.brand .logo-box.large{width:120px!important;height:64px!important}
.brand .logo-box img,.topbar .brand img{display:block!important;max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:contain!important;position:static!important}
.logo-preview-box{width:220px!important;height:90px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
.logo-preview-box img{max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:contain!important}
@media(max-width:800px){.topbar{overflow:visible!important}.brand .logo-box.large{width:86px!important;height:52px!important}}


/* V1.12 thermal printer support */
.print-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.thermal-print{width:72mm;max-width:72mm;margin:0 auto;background:#fff;color:#000;font-family:Tahoma,Arial,sans-serif;font-size:12px;line-height:1.35;padding:2mm}.thermal-print h1,.thermal-print h2,.thermal-print h3{font-size:14px;text-align:center;margin:4px 0;color:#000}.thermal-print .line{border-top:1px dashed #000;margin:5px 0}.thermal-print table{width:100%;border-collapse:collapse}.thermal-print th,.thermal-print td{border:0;border-bottom:1px dotted #999;padding:3px 1px;background:#fff;color:#000;font-size:11px}.thermal-print .center{text-align:center}.thermal-print .total-line{font-weight:900;font-size:13px}.thermal-logo{max-width:48mm;max-height:22mm;object-fit:contain;display:block;margin:0 auto 3px}
@media print{
  .thermal-mode .topbar,.thermal-mode .no-print,.thermal-mode .btn,.thermal-mode button{display:none!important}
  .thermal-mode body,.thermal-mode .container{margin:0!important;padding:0!important;width:80mm!important;max-width:80mm!important;background:#fff!important}
  .thermal-mode .card{border:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;margin:0!important}
  .thermal-mode .thermal-print{width:72mm!important;max-width:72mm!important;margin:0 auto!important;padding:2mm!important}
}
@media print{
  .thermal-print{width:72mm!important;max-width:72mm!important;margin:0 auto!important;padding:2mm!important;box-shadow:none!important;border:0!important}
}
