:root{
  /* Base (kept for compatibility) */
  --bg:#0b1220;
  --bg2:#070b14;
  --card:#101a2f;
  --card2:rgba(10,16,30,.65);
  --muted:#93a4c7;
  --text:#e9eefc;
  --line:rgba(255,255,255,.10);

  /* Existing accents (kept) */
  --brand:#3b82f6;
  --brand2:#22c55e;
  --danger:#ef4444;
  --warn:#f59e0b;

  /* Milan Lounge accents (new) */
  --gold:#f5c14b;
  --gold2:#d99a2b;
  --flame:#ff7a18;
  --flame2:#ff3d00;

  /* UI */
  --radius:16px;
  --shadow:0 18px 50px rgba(0,0,0,.55);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:
    radial-gradient(900px 520px at 15% 5%, rgba(245,193,75,.18), transparent 55%),
    radial-gradient(900px 520px at 85% 15%, rgba(255,122,24,.14), transparent 55%),
    radial-gradient(1200px 700px at 50% 90%, rgba(59,130,246,.10), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  color:var(--text);
}
a{color:inherit}
.container{max-width:1200px; margin:0 auto; padding:18px;}
.spacer{height:12px}

.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; border:1px solid var(--line); border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(16,26,47,.70), rgba(10,16,30,.55));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.brand{display:flex; align-items:center; gap:10px;}
.brand img{width:38px; height:38px; object-fit:contain; border-radius:10px; background:#fff;}
.brand h1{font-size:18px; margin:0;}
.brand small{display:block; color:var(--muted); margin-top:2px;}

.right{display:flex; gap:8px; align-items:center; flex-wrap:wrap}

.btn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}
.btn:hover{background:rgba(255,255,255,.10)}

/* Primary = Luxury gold/flame (keeps your old primary usage) */
.btn.primary{
  background: linear-gradient(135deg, var(--gold), var(--flame));
  border: none;
  color:#0b1220;
  font-weight: 700;
}
.btn.primary:hover{filter:brightness(1.05)}

/* Keep success/danger look */
.btn.success{background:rgba(34,197,94,.18); border-color:rgba(34,197,94,.45)}
.btn.danger{background:rgba(239,68,68,.16); border-color:rgba(239,68,68,.45)}

.pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--line); color:var(--muted); font-size:12px;
  background: rgba(255,255,255,.03);
}

.grid{display:grid; gap:12px;}
.card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(16,26,47,.80), rgba(10,16,30,.55));
  border-radius:var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.card h2,.card h3{margin:0 0 10px 0}

.muted{color:var(--muted)}

.input, select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  outline:none;
}
label{font-size:12px; color:var(--muted)}

.table{width:100%; border-collapse:collapse}
.table th,.table td{padding:10px; border-bottom:1px solid rgba(255,255,255,.08); text-align:left}
.table th{color:var(--muted); font-size:12px; font-weight:600}

.kpi{
  display:flex; flex-direction:column; gap:6px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius); padding:12px;
}
.kpi b{font-size:20px}

.notice{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  padding:10px 12px;
  border-radius:14px;
  color:var(--muted);
}

.badge{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
}

/* --- Layout with sidebar --- */
.layout{
  display:grid;
  grid-template-columns: 200px 1fr;  /* ? reduced from 260px */
  gap:12px;
}
@media(max-width: 980px){
  .layout{grid-template-columns: 1fr;}
  .sidebar{position:relative}
}

.sidebar{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(16,26,47,.78), rgba(10,16,30,.55));
  border-radius:var(--radius);
  padding:10px; /* ? tighter */
  height: fit-content;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  text-decoration:none;
  padding:8px 10px; /* ? tighter */
  border-radius:10px;
  border:1px solid transparent;
  color:var(--text);
}
.nav a:hover{background:rgba(255,255,255,.06)}

/* Active = gold accent (matches logo) */
.nav a.active{
  border-color: rgba(245,193,75,.35);
  background: rgba(245,193,75,.10);
}
.nav a.active small{color: rgba(245,193,75,.95)}

.nav small{color:var(--muted); font-size:11px;}
.hr{height:1px;background:rgba(255,255,255,.08); margin:10px 0}

/* =========================
   Mobile Sidebar Toggle
   ========================= */
.mobileToggle{
  display:none;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}
.mobileToggle:hover{ background: rgba(255,255,255,.10); }

.mobileToggle .bars{
  width:18px; height:12px; position:relative; display:inline-block;
}
.mobileToggle .bars::before,
.mobileToggle .bars::after,
.mobileToggle .bars span{
  content:"";
  position:absolute; left:0; right:0;
  height:2px; border-radius:2px;
  background: rgba(255,255,255,.85);
}
.mobileToggle .bars::before{ top:0; }
.mobileToggle .bars span{ top:5px; }
.mobileToggle .bars::after{ bottom:0; }

.overlay{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 50; /* ? lowered so selects don't get blocked */
}

/* Sidebar becomes drawer on small screens */
@media(max-width: 980px){
  .mobileToggle{ display:inline-flex; }

  .sidebar{
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    max-width: 92vw; /* ? better on phone */
    z-index: 100;     /* ? above overlay */
    transform: translateX(-110%);
    transition: transform .22s ease;
  }

  body.sidebar-open .sidebar{ transform: translateX(0); }
  body.sidebar-open .overlay{ display:block; }

  /* spacing so page content isn't hidden under topbar */
  .container{ padding: 14px; }
}

/* =========================
   ? DROPDOWN VISIBILITY FIX
   ========================= */

/* solid select backgrounds for phone browsers */
select{
  background-color: #0b1220 !important;
  color: #e9eefc !important;
}
select option{
  background-color: #0b1220 !important;
  color: #e9eefc !important;
}

/* ensure dropdown controls are above glass/overlay stacking */
select, .input {
  position: relative;
  z-index: 200;
}

/* prevent glass containers from clipping dropdown visuals */
.card, .topbar, .sidebar, .layout {
  overflow: visible !important;
}

.login-logo {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo img {
  max-width: 120px;
  border-radius: 8px;
}

/* ============================================================
   ✅ UX POLISH ADD-ONS (safe) — appended, does not break layout
   ============================================================ */

/* Micro polish transitions + focus glow */
:root{
  --shadow2: 0 10px 30px rgba(0,0,0,.35);
  --ease: cubic-bezier(.2,.8,.2,1);
}
.btn, .card, .sidebar, .topbar, .pill, .input, select{
  transition: transform .12s var(--ease), filter .12s var(--ease), background .12s var(--ease),
              border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.btn:active{ transform: translateY(1px) scale(.99); }
.btn.primary:active{ transform: translateY(1px) scale(.985); }
.btn:focus, .input:focus, select:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(245,193,75,.18), var(--shadow2);
  border-color: rgba(245,193,75,.35);
}

/* POS product cards (use class="product-card") */
.product-card{
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(16,26,47,.75), rgba(10,16,30,.55));
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow2);
  cursor: pointer;
  user-select:none;
}
.product-card:hover{
  transform: translateY(-2px);
  border-color: rgba(245,193,75,.25);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.product-card:active{
  transform: translateY(0) scale(.985);
}
.product-card.disabled{
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.25);
}
.product-card.disabled:hover{
  transform:none;
  box-shadow: var(--shadow2);
  border-color: rgba(255,255,255,.10);
}

/* Cart total emphasis */
.cart-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(245,193,75,.22);
  background: linear-gradient(135deg, rgba(245,193,75,.16), rgba(255,122,24,.10));
}
.cart-total b{
  font-size: 18px;
  letter-spacing:.2px;
}

/* Toast notifications */
.toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,16,30,.92);
  box-shadow: 0 16px 50px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
  color: var(--text);
  animation: toastIn .18s var(--ease);
}
.toast.success{ border-color: rgba(34,197,94,.30); }
.toast.error{ border-color: rgba(239,68,68,.35); }
.toast.warn{ border-color: rgba(245,158,11,.35); }
@keyframes toastIn{
  from{ transform: translateY(8px); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}

/* Stock sheet variance colors */
.var-zero{ color: rgba(233,238,252,.75); }
.var-pos{ color: rgba(34,197,94,.95); }
.var-neg{ color: rgba(239,68,68,.95); }

/* Loading skeleton */
.skeleton{
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  border-radius: 14px;
}
.skeleton::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer{
  to{ transform: translateX(100%); }
}