/* =====================================================================
   Tracksee design system — red primary, ink neutrals, Bangla-friendly type
   ===================================================================== */
:root {
  --red: #e3182d;
  --red-600: #c40f22;
  --red-700: #9e0b1b;
  --red-50: #fff1f2;
  --red-100: #ffe1e4;
  --ink: #12131a;
  --ink-2: #2a2c37;
  --muted: #6b6f7e;
  --line: #ececf1;
  --bg: #fffafa;
  --card: #ffffff;
  --ok: #0f9d58;
  --warn: #e8a100;
  --info: #2563eb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(18, 19, 26, 0.04), 0 8px 24px rgba(18, 19, 26, 0.06);
  --shadow-red: 0 10px 30px rgba(227, 24, 45, 0.28);
  --font: "Plus Jakarta Sans", "Hind Siliguri", system-ui, -apple-system, sans-serif;
  --font-bn: "Hind Siliguri", "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html[lang="bn"] body { font-family: var(--font-bn); }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.red { color: var(--red); }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------ Buttons ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease; white-space: nowrap; position: relative; overflow: hidden; }
.btn:active { transform: scale(0.97); }
.btn-red { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn-red:hover { background: var(--red-600); transform: translateY(-1px); }
.btn-red::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); }
.btn-red:hover::after { animation: shine 0.9s ease; }
.btn-ghost { background: transparent; border-color: currentColor; }
.btn-ghost:hover { background: rgba(227, 24, 45, 0.06); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-danger { background: #fff; color: var(--red-700); border-color: var(--red-100); }
.btn-danger:hover { background: var(--red-50); }

/* ------------------------------- Header ------------------------------ */
.topbar { background: var(--ink); color: #d6d7de; font-size: 13px; }
.topbar .container { display: flex; gap: 18px; padding: 6px 0; align-items: center; }
.topbar a:hover { color: #fff; }
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 250, 250, 0.85); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--red); display: grid; place-items: center; box-shadow: var(--shadow-red); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: -4px; border-radius: 14px; border: 2px solid var(--red); opacity: 0; animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite; }
.logo b { color: var(--red); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--ink-2); transition: background 0.2s; }
.nav a:hover, .nav a.active { background: var(--red-50); color: var(--red); }
.lang-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.lang-toggle button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.lang-toggle button.on { background: var(--red); color: #fff; }
.cart-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; }
.cart-btn .badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 11px; min-width: 19px; height: 19px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; animation: pop 0.35s ease; }
.menu-btn { display: none; }
.nav .only-sm { display: none; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; animation: slideDown 0.25s ease; }
  .menu-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
  .topbar .hide-sm, .header .hide-sm { display: none; }
  .nav .only-sm { display: block; }
}

/* -------------------------------- Hero ------------------------------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 85% -10%, rgba(227, 24, 45, 0.45), transparent 60%), var(--ink); color: #fff; padding: 72px 0 96px; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%); animation: gridMove 20s linear infinite; }
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 13px; font-weight: 600; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: pulse 1.8s infinite; }
.hero h1 { font-size: clamp(34px, 5.2vw, 62px); font-weight: 800; margin: 18px 0 16px; letter-spacing: -0.035em; }
.hero h1 .accent { color: var(--red); background: linear-gradient(90deg, #ff4d5e, #e3182d, #ff8a95, #e3182d); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradientShift 6s ease infinite; }
.hero p { color: #b9bcc8; font-size: 18px; max-width: 560px; }
.hero .row { margin-top: 28px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .hero { padding: 48px 0 64px; } }

.map-card { position: relative; border-radius: 28px; background: linear-gradient(160deg, #1d1f2a, #15161e); border: 1px solid rgba(255,255,255,.08); padding: 14px; box-shadow: 0 40px 80px rgba(0,0,0,.45); animation: float 7s ease-in-out infinite; }
.map-card svg { width: 100%; height: auto; display: block; border-radius: 18px; }
.route-path { stroke-dasharray: 8 10; animation: dash 1.2s linear infinite; }
.pin-pulse { transform-origin: center; transform-box: fill-box; animation: pinPulse 2s ease-out infinite; }
.live-chip { position: absolute; top: 26px; left: 26px; display: flex; align-items: center; gap: 8px; background: rgba(18,19,26,.85); padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,.1); }
.live-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
.stat-float { position: absolute; background: #fff; color: var(--ink); border-radius: 16px; padding: 10px 14px; box-shadow: 0 20px 40px rgba(0,0,0,.3); font-size: 12px; display: flex; gap: 10px; align-items: center; }
.stat-float b { font-size: 18px; display: block; line-height: 1.1; }
.stat-float.a { right: -14px; top: 30%; animation: float 5s ease-in-out infinite reverse; }
.stat-float.b { left: -14px; bottom: 14%; animation: float 6s ease-in-out infinite; }
.stat-float .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--red-50); color: var(--red); }
@media (max-width: 600px) { .stat-float.a { right: 6px; } .stat-float.b { left: 6px; } }

/* ------------------------------- Sections ---------------------------- */
.section { padding: 84px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.sec-head .kicker { display: inline-block; color: var(--red); font-weight: 800; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }

.stats-strip { margin-top: -48px; position: relative; z-index: 2; }
.stats-strip .inner { background: #fff; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-strip .s { padding: 24px; text-align: center; border-right: 1px solid var(--line); }
.stats-strip .s:last-child { border-right: 0; }
.stats-strip b { display: block; font-size: 32px; font-weight: 800; color: var(--red); letter-spacing: -0.03em; }
@media (max-width: 700px) { .stats-strip .inner { grid-template-columns: repeat(2, 1fr); } .stats-strip .s:nth-child(2) { border-right: 0; } .stats-strip .s:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.plan { position: relative; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s; }
.plan:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(18,19,26,.12); border-color: var(--red-100); }
.plan.featured { border: 2px solid var(--red); }
.plan .ribbon { position: absolute; top: 16px; right: -1px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px 0 0 8px; }
.plan .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--red-50); color: var(--red); display: grid; place-items: center; margin-bottom: 14px; }
.plan .price { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 22px; flex: 1; }
.plan li { padding: 6px 0 6px 28px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--red-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3182d' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

.steps { counter-reset: s; }
.step { position: relative; padding-top: 18px; }
.step .num { width: 54px; height: 54px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 22px; display: grid; place-items: center; box-shadow: var(--shadow-red); margin-bottom: 14px; }
.feature { display: flex; gap: 16px; }
.feature .ico { flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; transition: background 0.3s, transform 0.3s; }
.feature:hover .ico { background: var(--red); transform: rotate(-6deg) scale(1.06); }

.product { overflow: hidden; padding: 0; display: flex; flex-direction: column; transition: transform 0.3s, box-shadow 0.3s; }
.product:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(18,19,26,.12); }
.product .thumb { aspect-ratio: 4/3; background: linear-gradient(135deg, #fff1f2, #fff); display: grid; place-items: center; position: relative; overflow: hidden; }
.product .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product:hover .thumb img { transform: scale(1.06); }
.product .thumb .sale { position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.product .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.product .pr { font-weight: 800; font-size: 20px; }
.product .pr s { color: var(--muted); font-weight: 500; font-size: 14px; margin-left: 6px; }

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 10px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.chip { display: inline-flex; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.chip.red { background: var(--red-50); border-color: var(--red-100); color: var(--red-700); }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--red); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--red); font-size: 22px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--muted); animation: fadeIn 0.3s ease; }

.cta { background: linear-gradient(120deg, var(--red-700), var(--red) 55%, #ff4d5e); color: #fff; border-radius: 28px; padding: 48px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.08); right: -120px; top: -160px; animation: spin 30s linear infinite; }
.cta .btn-light { color: var(--red); }

.footer { background: var(--ink); color: #b9bcc8; padding: 64px 0 24px; margin-top: 40px; }
.footer h4 { color: #fff; }
.footer a:hover { color: #fff; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ------------------------------- Forms ------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.input, select.input, textarea.input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(227, 24, 45, 0.12); }
textarea.input { min-height: 96px; resize: vertical; }
.err { color: var(--red-700); font-size: 13px; background: var(--red-50); padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.okbox { color: #065f46; background: #ecfdf5; padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; }
.pay-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pay-opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; background: #fff; transition: all 0.2s; }
.pay-opt.on { border-color: var(--red); background: var(--red-50); color: var(--red-700); }
.pay-opt input { accent-color: var(--red); }

.page-head { background: var(--ink); color: #fff; padding: 46px 0; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(227,24,45,.5), transparent 70%); animation: float 8s ease-in-out infinite; }
.page-head h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; position: relative; z-index: 1; }
.page-head p { color: #b9bcc8; margin: 0; position: relative; z-index: 1; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button, .tabs a { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.tabs .on { background: var(--red); color: #fff; border-color: var(--red); }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--red-100); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 18px 22px; animation: fadeUp 0.4s ease both; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-50); }

/* ------------------------------ Tables ------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #fafafc; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tr:hover td { background: #fffafa; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f1f1f5; color: var(--ink-2); white-space: nowrap; }
.pill.ok, .pill.completed, .pill.paid, .pill.active, .pill.done { background: #e7f8ee; color: #0b7a43; }
.pill.warn, .pill.pending, .pill.pending_verify, .pill.in_progress, .pill.scheduled, .pill.medium { background: #fff6dd; color: #8a5a00; }
.pill.bad, .pill.cancelled, .pill.expired, .pill.failed, .pill.urgent, .pill.unpaid, .pill.suspended, .pill.high { background: var(--red-50); color: var(--red-700); }
.pill.info, .pill.confirmed, .pill.processing, .pill.shipped, .pill.installation_scheduled, .pill.open { background: #e8f0ff; color: #1d4ed8; }

/* ----------------------------- Dashboard ----------------------------- */
.dash { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: #f6f6f9; }
.side { background: var(--ink); color: #c9cbd4; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { color: #fff; margin: 4px 8px 22px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; margin-bottom: 2px; transition: background 0.15s; }
.side nav a small { display: block; font-size: 11px; color: #8b8e9c; font-weight: 500; font-family: var(--font-bn); }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.active { background: var(--red); color: #fff; }
.side nav a.active small { color: #ffd5da; }
.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #6c6f7d; margin: 18px 12px 6px; }
.dash-main { padding: 24px 28px 48px; min-width: 0; }
.dash-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.dash-top h1 { font-size: 24px; margin: 0; }
.dash-top h1 small { display: block; font-size: 14px; color: var(--muted); font-weight: 500; font-family: var(--font-bn); }
.kpi { background: #fff; border-radius: 16px; padding: 18px; border: 1px solid var(--line); position: relative; overflow: hidden; animation: fadeUp 0.45s ease both; }
.kpi .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.kpi::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--red-50); }
.kpi.red { background: var(--red); color: #fff; border-color: var(--red); }
.kpi.red .lbl { color: #ffd5da; }
.kpi.red::after { background: rgba(255,255,255,.12); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .b { flex: 1; background: linear-gradient(180deg, var(--red), #ff7581); border-radius: 6px 6px 2px 2px; min-height: 3px; position: relative; transform-origin: bottom; animation: grow 0.7s cubic-bezier(.2,.8,.2,1) both; }
.bars .b:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; }
.dash-mobile-bar { display: none; }
@media (max-width: 960px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 80; transform: translateX(-105%); transition: transform 0.25s ease; height: 100%; }
  .side.open { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.35); }
  .dash-main { padding: 16px; }
  .dash-mobile-bar { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 70; }
}

.modal-bg { position: fixed; inset: 0; background: rgba(18,19,26,.55); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fadeIn 0.2s ease; }
.modal { background: #fff; border-radius: 20px; width: min(640px, 100%); max-height: 92vh; overflow-y: auto; padding: 24px; animation: popIn 0.25s cubic-bezier(.2,.8,.2,1); }
.modal h3 { display: flex; justify-content: space-between; align-items: center; }
.modal .x { border: 0; background: #f1f1f5; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--red-50); color: var(--red); display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.avatar.lg { width: 96px; height: 96px; font-size: 34px; }
.validity { height: 8px; background: #f1f1f5; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.validity span { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #4ade80); border-radius: 99px; animation: growX 1s ease both; transform-origin: left; }
.validity.low span { background: linear-gradient(90deg, var(--warn), #facc15); }
.validity.out span { background: var(--red); }

.toasts { position: fixed; bottom: 90px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); animation: slideIn 0.3s ease; max-width: 360px; font-weight: 600; border-left: 4px solid var(--ok); }
.toast.err { border-left-color: var(--red); }
.pixel-debug { position: fixed; left: 12px; bottom: 12px; z-index: 300; background: #111; color: #eee; font: 12px/1.5 ui-monospace, monospace; padding: 10px 12px; border-radius: 10px; max-width: 420px; }
.pixel-debug .ok { color: #4ade80; } .pixel-debug .bad { color: #f87171; } .pixel-debug a { color: #f87171; margin-left: 8px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, #f1f1f5 25%, #fafafc 50%, #f1f1f5 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 18px; }

/* ----------------------------- Animations ---------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; } .reveal.d4 { transition-delay: 0.32s; } .reveal.d5 { transition-delay: 0.4s; }
@keyframes ping { 75%, 100% { transform: scale(1.5); opacity: 0; } 0% { opacity: .6; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes pinPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes dash { to { stroke-dashoffset: -36; } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes gridMove { to { background-position: 48px 48px, 48px 48px; } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

@media print {
  .header, .topbar, .footer, .side, .no-print, .dash-mobile-bar, .toasts { display: none !important; }
  .dash { display: block; background: #fff; } .dash-main { padding: 0; }
  body { background: #fff; }
}
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37,211,102,.45); animation: float 4s ease-in-out infinite; }
.kpi > * { position: relative; z-index: 1; }
.kpi::after { z-index: 0; }
.bars { justify-content: flex-start; }
.bars .b { max-width: 38px; }
.btn-red .muted, .btn-red small { color: #ffd5da !important; }

/* ---- PHP edition additions ---- */
.lang-toggle a { padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.lang-toggle a.on { background: var(--red); color: #fff; }
.chip.dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }
small.bn, .bn { font-family: var(--font-bn); font-weight: 500; }
.menu-btn.light { display: grid; background: transparent; color: #fff; border-color: #333; }
.modal h3 > span { flex: 1; }
.modal h3 .x { display: grid; place-items: center; text-decoration: none; color: var(--ink); }
.side.open + .dash-main::before { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 75; }
.inline { display: inline; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.filters .input { padding: 8px 12px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }
.check input { accent-color: var(--red); width: 17px; height: 17px; }
.checkout-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } }
.steps-bar { display: flex; margin: 22px 0; }
.steps-bar .sb { flex: 1; text-align: center; position: relative; font-size: 12px; }
.steps-bar .sb::before { content: ""; position: absolute; top: 12px; left: 0; right: 0; height: 4px; background: var(--line); }
.steps-bar .sb:first-child::before { left: 50%; } .steps-bar .sb:last-child::before { right: 50%; }
.steps-bar .sb.done::before { background: var(--red); }
.steps-bar .sb i { position: relative; display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: #fff; border: 3px solid var(--line); color: #fff; font-style: normal; }
.steps-bar .sb.done i { background: var(--red); border-color: var(--red); }
.steps-bar .sb.done i::after { content: "✓"; font-size: 13px; }
.steps-bar .sb.cur span { font-weight: 800; }
.check-draw { stroke-dasharray: 30; stroke-dashoffset: 30; animation: drawCheck .6s .2s ease forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.invoice { border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.invoice hr { border: 0; border-top: 1px solid var(--line); }
@media print { .modal-bg { position: static; background: none; padding: 0; } .modal { box-shadow: none; max-height: none; width: 100%; padding: 0; } .modal h3 .x, .dash-top { display: none; } .table-wrap:not(.modal .table-wrap), .tabs, .pager { display: none; } }
@media (max-width: 600px) { .dash .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 14px; } .kpi .val { font-size: 21px; } }
