/* ==========================================================================
   Power Point – Battery Shop  |  Design system
   ========================================================================== */
:root {
  --bg: #f7f4f2;
  --surface: #ffffff;
  --surface-2: #faf7f5;
  --ink: #1f1b1a;
  --ink-2: #4a4240;
  --muted: #8d827e;
  --line: #efe8e4;

  --brand: #ec5b52;
  --brand-2: #f08a4b;
  --brand-3: #e7405c;
  --charcoal: #2d2a29;
  --violet: #7c3aed;
  --indigo: #4f46e5;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --green: #10b981;
  --lime: #84cc16;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;

  --grad-primary: linear-gradient(135deg, #f7954a 0%, #ef6a4f 50%, #e7405c 100%);
  --grad-violet: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%);
  --grad-ocean: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  --grad-lime: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --grad-sunset: linear-gradient(135deg, #fb923c 0%, #ec4899 100%);
  --grad-amber: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  --grad-berry: linear-gradient(135deg, #f472b6 0%, #8b5cf6 100%);
  --grad-night: linear-gradient(160deg, #332d2b 0%, #1a1615 100%);

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --r-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(60, 35, 30, .06), 0 2px 8px -2px rgba(60, 35, 30, .06);
  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 2px 6px rgba(60, 35, 30, .04), 0 14px 34px -16px rgba(90, 45, 35, .22);
  --shadow-lg: 0 30px 60px -24px rgba(90, 45, 35, .35), 0 10px 20px -10px rgba(90, 45, 35, .15);

  --sidebar-w: 268px;
  --font: 'Plus Jakarta Sans', 'Noto Sans Gujarati', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before { /* colourful mesh backdrop */
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 0% 0%, rgba(236, 91, 82, .13), transparent 60%),
    radial-gradient(35vw 35vw at 100% 10%, rgba(240, 138, 75, .14), transparent 60%),
    radial-gradient(40vw 40vw at 80% 100%, rgba(231, 64, 92, .09), transparent 60%),
    radial-gradient(30vw 30vw at 10% 90%, rgba(16, 185, 129, .08), transparent 60%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0; }
[x-cloak] { display: none !important; }
svg.lucide { width: 1.15em; height: 1.15em; stroke-width: 2.1; flex-shrink: 0; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: var(--grad-night);
  color: #ddd5d1;
  padding: 22px 16px;
  display: none; flex-direction: column; gap: 6px;
  overflow-y: auto;
}
.sidebar::after {
  content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  left: -90px; bottom: -90px; background: radial-gradient(circle, rgba(240, 106, 79, .40), transparent 70%);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  background: #fff; color: #fff; box-shadow: 0 10px 24px -8px rgba(236, 91, 82, .7), inset 0 -2px 0 rgba(0,0,0,.06);
  flex-shrink: 0; padding: 7px;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-wordmark { height: 40px; width: auto; }
.brand-name { font-weight: 800; font-size: 18px; color: #fff; letter-spacing: -.02em; }
.brand-sub { font-size: 12px; color: #a89c97; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #8a7d78; padding: 14px 12px 6px; font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px;
  font-weight: 600; font-size: 14.5px; color: #cfc5c1; transition: .2s; position: relative;
}
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.active { background: var(--grad-primary); color: #fff; box-shadow: 0 12px 24px -10px rgba(236, 91, 82, .8); }
.nav-link .count { margin-left: auto; background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .05); display: flex; gap: 10px; align-items: center; position: relative; z-index: 1; }

.main { min-height: 100vh; padding-bottom: 110px; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(247, 244, 242, .8);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(231, 234, 244, .7);
}
.topbar .brand { padding: 0; }
.topbar .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
.topbar .brand-name { color: var(--ink); font-size: 16px; }
.topbar .brand-sub { color: var(--muted); }
.topbar-title { font-weight: 800; font-size: 20px; display: none; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.content { padding: 18px 16px; max-width: 1280px; margin: 0 auto; }

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 40px; }
  .topbar { padding: 16px 32px; }
  .topbar .brand { display: none; }
  .topbar-title { display: block; }
  .content { padding: 26px 32px; }
  .bottom-nav { display: none !important; }
}

/* ---------- Bottom navigation (mobile) ---------- */
.bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom) * .5);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  box-shadow: 0 20px 40px -12px rgba(90, 45, 35, .3);
}
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 0; position: relative; }
.bn-item svg.lucide { width: 22px; height: 22px; }
.bn-item.active { color: var(--brand); }
.bn-item.active::after { content: ''; position: absolute; bottom: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.bn-item .dot { position: absolute; top: 2px; right: calc(50% - 18px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--pink); color: #fff; font-size: 10px; display: grid; place-items: center; border: 2px solid #fff; }
.bn-fab {
  justify-self: center; margin-top: -34px;
  width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 16px 30px -8px rgba(236, 91, 82, .7), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .12);
  transform: rotate(0deg); transition: transform .25s;
  border: 4px solid #fff;
}
.bn-fab svg.lucide { width: 28px; height: 28px; }
.bn-fab:active { transform: scale(.94); }

/* ---------- Typography helpers ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 800; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.section-title { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.bold { font-weight: 700; }
.xbold { font-weight: 800; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .02em; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gradient-text { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-stats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
@media (min-width: 768px) {
  .md-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}
@media (min-width: 1024px) {
  .lg-grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .lg-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg-span-2 { grid-column: span 2; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid rgba(231, 234, 244, .9);
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-link { font-size: 13px; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; }
.card.flush { padding: 0; overflow: hidden; }
.card.glass { background: rgba(255, 255, 255, .7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@media (min-width: 768px) { .card { padding: 22px; } }

/* 3D tilt */
.tilt {
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
  will-change: transform;
}
.tilt.is-tilting { transition: transform .08s linear, box-shadow .35s; }
.tilt .pop { transform: translateZ(34px); }
.tilt .pop-sm { transform: translateZ(18px); }
.tilt::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .28), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.tilt.is-tilting::after { opacity: 1; }

/* Gradient stat cards */
.stat {
  position: relative; overflow: hidden; color: #fff;
  border-radius: var(--r-lg); padding: 16px;
  min-height: 132px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 22px 36px -20px var(--glow, rgba(236, 91, 82, .8)), inset 0 1px 0 rgba(255, 255, 255, .35);
  isolation: isolate;
}
.stat::before {
  content: ''; position: absolute; z-index: -1; width: 150px; height: 150px; border-radius: 50%;
  right: -46px; top: -56px; background: rgba(255, 255, 255, .16);
}
.stat .stat-orb { position: absolute; z-index: -1; width: 90px; height: 90px; border-radius: 50%; right: 18px; bottom: -48px; background: rgba(255, 255, 255, .10); }
.stat-icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .4);
  backdrop-filter: blur(6px);
}
.stat-icon svg.lucide { width: 22px; height: 22px; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.stat-label { font-size: 12.5px; font-weight: 600; opacity: .9; }
.stat-foot { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.bg-primary { background: var(--grad-primary); --glow: rgba(236, 91, 82, .9); }
.bg-violet { background: var(--grad-violet); --glow: rgba(236, 91, 82, .9); }
.bg-ocean { background: var(--grad-ocean); --glow: rgba(37, 99, 235, .9); }
.bg-lime { background: var(--grad-lime); --glow: rgba(5, 150, 105, .9); }
.bg-sunset { background: var(--grad-sunset); --glow: rgba(236, 72, 153, .9); }
.bg-amber { background: var(--grad-amber); --glow: rgba(249, 115, 22, .9); }
.bg-berry { background: var(--grad-berry); --glow: rgba(139, 92, 246, .9); }
.bg-night { background: var(--grad-night); --glow: rgba(15, 22, 49, .9); }
@media (min-width: 768px) { .stat { padding: 20px; min-height: 150px; } .stat-value { font-size: 32px; } }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  border-radius: var(--r-xl); padding: 22px;
  background: var(--grad-primary);
  box-shadow: 0 30px 60px -30px rgba(236, 91, 82, .9), inset 0 1px 0 rgba(255, 255, 255, .3);
  display: flex; align-items: center; gap: 16px; min-height: 180px;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(300px 200px at 90% 10%, rgba(255, 255, 255, .25), transparent 60%),
    radial-gradient(260px 200px at 0% 100%, rgba(236, 72, 153, .45), transparent 60%);
}
.hero-grid { position: absolute; inset: 0; z-index: -1; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); }
.hero h1 { font-size: 23px; font-weight: 800; }
.hero p { opacity: .9; font-size: 14px; margin-top: 6px; }
.hero-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hero-art { margin-left: auto; flex-shrink: 0; width: 120px; }
@media (min-width: 768px) { .hero { padding: 30px 34px; } .hero h1 { font-size: 30px; } .hero-art { width: 190px; } }

/* 3D battery */
.battery3d { width: 100%; animation: floaty 5s ease-in-out infinite; filter: drop-shadow(0 26px 24px rgba(20, 10, 80, .45)); }
.battery3d .liquid { animation: charge 3.2s ease-in-out infinite; transform-origin: bottom; }
.battery3d .bolt { animation: pulse 1.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10px) rotate(-3deg); } }
@keyframes charge { 0% { transform: scaleY(.35); } 60%, 100% { transform: scaleY(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .85; } }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  color: var(--ink); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary {
  color: #fff; background: var(--grad-primary);
  box-shadow: 0 14px 26px -12px rgba(236, 91, 82, .9), inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .12);
}
.btn-success { color: #fff; background: var(--grad-lime); box-shadow: 0 14px 26px -12px rgba(5, 150, 105, .8), inset 0 -3px 0 rgba(0, 0, 0, .1); }
.btn-warn { color: #fff; background: var(--grad-amber); box-shadow: 0 14px 26px -12px rgba(249, 115, 22, .8), inset 0 -3px 0 rgba(0, 0, 0, .1); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 14px 26px -12px rgba(220, 38, 38, .8); }
.btn-soft { background: rgba(236, 91, 82, .1); color: var(--brand); box-shadow: none; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(15, 22, 49, .05); }
.btn-glass { background: rgba(255, 255, 255, .2); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); box-shadow: none; }
.btn-white { background: #fff; color: var(--indigo); box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .35); }
.btn-sm { --h: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn-lg { --h: 54px; padding: 0 24px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 13px; display: inline-grid; place-items: center; position: relative;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); box-shadow: var(--shadow-sm); cursor: pointer;
}
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--grad-sunset); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
@media (min-width: 768px) { .form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .span-2 { grid-column: span 2; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.label .req { color: var(--pink); }
.hint { font-size: 12px; color: var(--muted); }
.error { font-size: 12.5px; color: var(--red); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 14px;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none; -webkit-appearance: none;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a84a6' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(236, 91, 82, .12); }
.input.is-invalid { border-color: var(--red); }
.input-icon { position: relative; }
.input-icon > svg.lucide { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 42px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.search-bar { position: relative; flex: 1; min-width: 200px; }
.search-bar .input { padding-left: 44px; background: #fff; box-shadow: var(--shadow-sm); }
.search-bar > svg.lucide { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* segmented / chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 99px;
  background: #fff; border: 1.5px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; cursor: pointer;
}
.chip .n { background: var(--surface-2); color: var(--muted); border-radius: 99px; padding: 0 7px; font-size: 11.5px; }
.chip.active { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -10px rgba(236, 91, 82, .8); }
.chip.active .n { background: rgba(255, 255, 255, .18); color: #fff; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 58px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); font-weight: 800; cursor: pointer; transition: .15s; font-size: 16px; line-height: 1.1; }
.opt span small { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.opt input:checked + span { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -10px rgba(236, 91, 82, .9); transform: translateY(-2px); }
.opt input:checked + span small { color: rgba(255, 255, 255, .85); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { display: none; }
.switch .track { width: 48px; height: 28px; border-radius: 99px; background: #d9ddeb; position: relative; transition: .2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { left: 23px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; white-space: nowrap; letter-spacing: .01em; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-pending { background: #fff4db; color: #b45309; }
.b-assigned { background: #e0ecff; color: #1d4ed8; }
.b-in_progress { background: #efe7ff; color: #6d28d9; }
.b-completed, .b-active, .b-good { background: #dcfce7; color: #047857; }
.b-cancelled, .b-replaced, .b-returned { background: #eef0f6; color: #5b6488; }
.b-expired, .b-overdue, .b-replace, .b-high { background: #ffe4e6; color: #be123c; }
.b-expiring, .b-weak { background: #ffedd5; color: #c2410c; }
.b-average { background: #fef9c3; color: #a16207; }
.b-old { background: #e0f2fe; color: #0369a1; }
.b-scheduled { background: #ede9fe; color: #6d28d9; }
.b-complaint { background: #ffe4e6; color: #be123c; }
.b-manual { background: #e0f2fe; color: #0369a1; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover .li-title { color: var(--brand); }
.li-body { flex: 1; min-width: 0; }
.li-title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.li-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.li-end { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff; background: var(--grad-primary); overflow: hidden;
  box-shadow: 0 8px 16px -8px rgba(236, 91, 82, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; }
.av-1 { background: var(--grad-violet); } .av-2 { background: var(--grad-ocean); } .av-3 { background: var(--grad-lime); }
.av-4 { background: var(--grad-sunset); } .av-5 { background: var(--grad-amber); } .av-6 { background: var(--grad-berry); }
.icon-tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.it-violet { background: #f1eaff; color: var(--brand); } .it-blue { background: #e4efff; color: #2563eb; }
.it-green { background: #dcfce7; color: #059669; } .it-amber { background: #fff4db; color: #d97706; }
.it-pink { background: #ffe4f1; color: #db2777; } .it-red { background: #ffe4e6; color: #e11d48; } .it-cyan { background: #d9f7fc; color: #0891b2; }

/* Task / sale cards */
.item-card {
  display: block; background: #fff; border-radius: 20px; padding: 16px; border: 1px solid var(--line);
  box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.item-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.item-card .accent { position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.cards { display: grid; gap: 12px; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1280px) { .cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Warranty ticket */
.ticket {
  position: relative; overflow: hidden; color: #fff; border-radius: 26px; padding: 22px;
  background: var(--grad-night);
  box-shadow: 0 30px 50px -28px rgba(15, 22, 49, .9), inset 0 1px 0 rgba(255, 255, 255, .12);
  isolation: isolate;
}
.ticket::before { content: ''; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(280px 200px at 100% 0%, rgba(240, 138, 75, .55), transparent 60%), radial-gradient(260px 200px at 0% 100%, rgba(231, 64, 92, .45), transparent 60%); }
.ticket.expired::before { background: radial-gradient(280px 200px at 100% 0%, rgba(239, 68, 68, .55), transparent 60%), radial-gradient(260px 200px at 0% 100%, rgba(249, 115, 22, .35), transparent 60%); }
.ticket .t-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; opacity: .65; font-weight: 700; }
.ticket .t-value { font-weight: 800; font-size: 15px; }
.ticket .barcode-strip { font-family: ui-monospace, Menlo, monospace; letter-spacing: .15em; font-size: 15px; font-weight: 700; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .25); display: inline-flex; align-items: center; gap: 10px; }
.ticket-cut { border-top: 2px dashed rgba(255, 255, 255, .18); margin: 18px -22px; position: relative; }
.ticket-cut::before, .ticket-cut::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.ticket-cut::before { left: -12px; } .ticket-cut::after { right: -12px; }

/* Progress ring */
.ring { --p: 0; --c: var(--brand); --s: 96px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #211c1b; }
.ring.light { background: conic-gradient(var(--c) calc(var(--p) * 1%), #edf0f7 0); }
.ring.light::before { background: #fff; }
.ring > * { position: relative; text-align: center; line-height: 1.1; }
.ring b { font-size: 22px; font-weight: 800; display: block; }
.ring small { font-size: 10.5px; opacity: .7; font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: #edf0f7; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad-primary); }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -26px; top: 3px; width: 18px; height: 18px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 1.5px var(--line); background: var(--brand); }

/* Mini bar chart */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .b { width: 100%; max-width: 38px; border-radius: 10px 10px 6px 6px; background: var(--grad-primary); min-height: 6px; position: relative;
  box-shadow: 0 10px 18px -10px rgba(236, 91, 82, .9), inset 0 1px 0 rgba(255, 255, 255, .4); transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.chart .b.today { background: var(--grad-sunset); box-shadow: 0 10px 18px -10px rgba(236, 72, 153, .9); }
.chart .b span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--ink-2); }
.chart .l { font-size: 11px; color: var(--muted); font-weight: 700; }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.quick .q-ico { width: 58px; height: 58px; border-radius: 19px; display: grid; place-items: center; color: #fff; transition: transform .2s;
  box-shadow: 0 14px 22px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .1); }
.quick .q-ico svg.lucide { width: 25px; height: 25px; }
.quick a:hover .q-ico { transform: translateY(-3px) rotate(-3deg); }

/* Tables (desktop) */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fafbff; }
.show-md { display: none; }
@media (min-width: 900px) { .show-md { display: block; } .hide-md { display: none !important; } }

/* Empty state */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .e-ico { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #ffe9df, #ffe1e6); color: var(--brand); transform: rotate(-8deg); box-shadow: var(--shadow); }
.empty .e-ico svg.lucide { width: 32px; height: 32px; }
.empty h4 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* Alerts / toast */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 16px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.alert-success { background: #dcfce7; color: #065f46; }
.alert-error { background: #ffe4e6; color: #9f1239; }
.alert-warn { background: #fff4db; color: #92400e; }
.alert-info { background: #e0ecff; color: #1e40af; }
.toast {
  position: fixed; z-index: 100; left: 50%; top: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px;
  background: #0f1631; color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toastIn .45s cubic-bezier(.2, .9, .3, 1.3); max-width: calc(100vw - 32px);
}
.toast .t-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--grad-lime); flex-shrink: 0; }
.toast.error .t-ico { background: linear-gradient(135deg, #f87171, #dc2626); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -20px) scale(.95); } }

/* Sheet / modal */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(12, 16, 40, .5); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 12px 20px 26px; box-shadow: var(--shadow-lg); animation: sheetUp .35s cubic-bezier(.2, .9, .3, 1); }
.sheet-grip { width: 44px; height: 5px; border-radius: 99px; background: #dde1ee; margin: 0 auto 14px; }
.sheet-title { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) { .overlay { align-items: center; } .sheet { border-radius: 28px; } .sheet-grip { display: none; } }

/* Staff picker */
.pick { display: grid; gap: 8px; }
.pick label { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; transition: .15s; }
.pick input { display: none; }
.pick label:has(input:checked) { border-color: var(--brand); background: #fff3ee; box-shadow: 0 0 0 4px rgba(236, 91, 82, .1); }
.pick .check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.pick label:has(input:checked) .check { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Scanner */
.scanner { position: relative; border-radius: 26px; overflow: hidden; background: #1a1615; aspect-ratio: 4 / 3; box-shadow: var(--shadow-lg); }
.scanner #reader { width: 100%; height: 100%; }
.scanner #reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner #reader img, .scanner #reader__dashboard_section_csr span, .scanner #reader__header_message { display: none !important; }
.scan-frame { position: absolute; inset: 18% 12%; pointer-events: none; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; filter: drop-shadow(0 0 8px rgba(236, 91, 82, .9)); }
.scan-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scan-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scan-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scan-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scan-line { position: absolute; left: 6%; right: 6%; height: 3px; top: 10%; border-radius: 3px; background: linear-gradient(90deg, transparent, #fbbf24, #ef6a4f, transparent); box-shadow: 0 0 18px 4px rgba(239, 106, 79, .6); animation: scanline 2.2s ease-in-out infinite alternate; }
@keyframes scanline { to { top: 90%; } }
.scanner-idle { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #c6ccef; padding: 20px; background: radial-gradient(circle at 50% 40%, rgba(236, 91, 82, .35), transparent 60%); }
.scanner-idle .big { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--grad-primary); color: #fff; box-shadow: 0 20px 40px -12px rgba(236, 91, 82, .9); animation: floaty 4s ease-in-out infinite; }
.scanner-idle .big svg.lucide { width: 38px; height: 38px; }

/* Steps */
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps .s { flex: 1; height: 6px; border-radius: 99px; background: #e3e7f2; transition: .3s; }
.steps .s.on { background: var(--grad-primary); }

/* Auth page */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; background: #1a1615; }
.auth::before { content: ''; position: absolute; inset: -20%;
  background: radial-gradient(40% 40% at 20% 20%, rgba(236, 91, 82, .7), transparent 60%), radial-gradient(40% 40% at 85% 30%, rgba(240, 138, 75, .55), transparent 60%), radial-gradient(40% 40% at 60% 90%, rgba(236, 72, 153, .5), transparent 60%);
  animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { to { transform: rotate(18deg) scale(1.1); } }
.auth-card { position: relative; width: 100%; max-width: 420px; padding: 30px 24px; border-radius: 30px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(20px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.auth-art { width: 120px; margin: -90px auto 6px; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.pager .on { background: var(--grad-primary); color: #fff; border-color: transparent; }
.pager .off { opacity: .45; }

/* KV list */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }

.divider { height: 1px; background: var(--line); margin: 16px 0; }
.fade-up { animation: fadeUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.fade-up.d1 { animation-delay: .05s; } .fade-up.d2 { animation-delay: .1s; } .fade-up.d3 { animation-delay: .15s; } .fade-up.d4 { animation-delay: .2s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
