/* ==========================================================================
   NLOL portal — shared styles for login, dealer and retailer pages.
   Brand palette matches the leaderboard (Gulf · NLOL · Janakpur Bolts).
   ========================================================================== */
:root {
  --deep: #1B2653;
  --magenta: #DC278E;
  --pink: #D4267B;
  --orange: #F46F22;
  --navy: #11367D;
  --brand-gradient: linear-gradient(115deg, #1B2653 0%, #57236A 45%, #DC278E 100%);
  --brand-gradient-v: linear-gradient(160deg, #1B2653 0%, #3A2460 40%, #9A2380 78%, #DC278E 100%);

  --bg: #F2F0F7;
  --card: #FFFFFF;
  --border: #E1DEEE;
  --line: #EFEDF6;
  --field: #FAF9FD;
  --muted: #6E6B92;
  --muted-2: #8A87AC;
  --green: #1F8A5F;
  --green-bg: #E6F5EE;
  --red: #C22E52;
  --red-bg: #FCE8ED;

  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: Barlow, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(27, 38, 83, .05), 0 8px 24px rgba(27, 38, 83, .06);
  --shadow-lg: 0 24px 60px rgba(27, 38, 83, .18);
  --ring: 0 0 0 4px rgba(220, 39, 142, .16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--navy);
  font-family: var(--body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--pink); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.ico { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.display { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; letter-spacing: .02em; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 10px 24px rgba(220, 39, 142, .28); background-size: 140% 100%; background-position: 0 0; }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 12px 28px rgba(220, 39, 142, .36); }
.btn-primary[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-light { background: #fff; color: var(--deep); box-shadow: 0 8px 20px rgba(11, 15, 40, .22); }
.btn-light:hover { background: #FFF6FB; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { background: #F7F5FC; }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: #fff; display: inline-grid; place-items: center; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--magenta); border-color: #F3C4DE; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-family: var(--display); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; }
.card-head p { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.card-body { padding: 20px 22px 22px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 16px; }
.label { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--deep); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label .opt { font-weight: 500; color: var(--muted-2); font-size: 12px; }
.control {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 14px; border-radius: 14px;
  background: var(--field); border: 1.5px solid var(--border);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.control > .ico { color: var(--muted-2); }
.control:hover { border-color: #CFCAE3; }
.control:focus-within { border-color: var(--magenta); box-shadow: var(--ring); background: #fff; }
.control:focus-within > .ico { color: var(--magenta); }
.control input, .control select {
  flex: 1; min-width: 0; width: 100%; height: 100%; border: none; outline: none; background: transparent;
  font-size: 16px; font-weight: 600; color: var(--navy);
}
.control input::placeholder { color: #A5A1C0; font-weight: 500; }
.control .prefix { font-weight: 700; color: var(--muted); padding-right: 10px; border-right: 1.5px solid var(--border); font-size: 15px; }
.control .suffix { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--muted); }
.control .toggle { background: none; border: none; color: var(--muted-2); cursor: pointer; display: grid; place-items: center; padding: 4px; border-radius: 8px; }
.control .toggle:hover { color: var(--magenta); }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.error-msg { font-size: 12.5px; font-weight: 600; color: var(--red); display: none; align-items: center; gap: 5px; }
.field.invalid .control { border-color: var(--red); background: #FFF8FA; }
.field.invalid .control:focus-within { box-shadow: 0 0 0 4px rgba(194, 46, 82, .14); }
.field.invalid .error-msg { display: flex; }
.field.invalid .hint { display: none; }
.field.valid .control { border-color: #9ED3B9; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--magenta); }

.form-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 500; }
.form-alert.error { background: var(--red-bg); color: var(--red); }
.form-alert.info { background: #EEF1FB; color: var(--navy); }
.form-alert .ico { margin-top: 1px; width: 18px; height: 18px; }

.demo-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9A5A00; background: #FFF4DE; border: 1px dashed #F2C77A; border-radius: 999px; padding: 5px 10px; }

/* ==========================================================================
   AUTH (login) — split screen
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; background: var(--brand-gradient-v);
  padding: 44px clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-brand::before { width: 520px; height: 520px; right: -180px; top: -160px; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); }
.auth-brand::after { width: 420px; height: 420px; left: -160px; bottom: -180px; background: radial-gradient(circle, rgba(244,111,34,.35), transparent 65%); }
.auth-brand > * { position: relative; z-index: 1; }
.brand-row { display: flex; align-items: center; gap: 14px; }
.logo-tile { width: 64px; height: 64px; border-radius: 16px; background: #fff; padding: 5px; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(11, 15, 40, .3); flex: none; }
.logo-tile img { border-radius: 11px; max-height: 100%; }
.brand-row .eyebrow { color: #F6C8DF; }
.brand-row strong { display: block; font-family: var(--display); font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.auth-hero h1 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(44px, 5.2vw, 72px); line-height: .92; letter-spacing: .005em; }
.auth-hero h1 .x { color: #FFC08A; }
.auth-hero p { margin-top: 18px; max-width: 460px; font-size: 16.5px; color: #EBD3E4; font-weight: 500; }
.perks { list-style: none; display: grid; gap: 12px; margin-top: 28px; max-width: 440px; }
.perks li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); font-weight: 600; font-size: 14.5px; }
.perks .ico { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: rgba(255,255,255,.14); color: #FFC08A; }
.auth-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: #E7C9DD; }
.auth-foot a { color: #fff; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-family: var(--display); font-size: 36px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.auth-card .sub { color: var(--muted); font-weight: 500; margin: 8px 0 26px; }
.auth-card form { display: flex; flex-direction: column; gap: 18px; }
.auth-card .field + .field { margin-top: 0; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 22px 20px 26px; gap: 18px; border-radius: 0 0 26px 26px; }
  .auth-hero h1 { font-size: 40px; }
  .auth-hero p { font-size: 14.5px; margin-top: 10px; }
  .perks, .auth-foot { display: none; }
  .logo-tile { width: 52px; height: 52px; border-radius: 14px; }
  .auth-panel { padding: 26px 16px 40px; align-items: flex-start; }
  .auth-card h2 { font-size: 30px; }
}

/* ==========================================================================
   APP SHELL (dealer)
   ========================================================================== */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1240px; margin: 0 auto; height: 68px; padding: 0 20px; display: flex; align-items: center; gap: 18px; }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--deep); text-decoration: none; }
.topbar .brand .logo-tile { width: 42px; height: 42px; border-radius: 11px; padding: 3px; box-shadow: 0 4px 10px rgba(27, 38, 83, .15); border: 1px solid var(--line); }
.topbar .brand .logo-tile img { border-radius: 8px; }
.topbar .brand b { font-family: var(--display); font-size: 19px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; display: block; }
.topbar .brand small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a .ico { width: 18px; height: 18px; }
.nav a:hover { color: var(--navy); background: #F5F3FA; text-decoration: none; }
.nav a.active { color: var(--deep); background: #F1EDF9; }
.nav a.active .ico { color: var(--magenta); }
.user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-gradient); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .04em; flex: none; }
.user-meta { line-height: 1.15; }
.user-meta b { font-size: 14px; display: block; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-chip { display: inline-flex; align-items: center; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 11.5px; font-weight: 700; color: var(--pink); background: #FCE4F0; padding: 2px 7px; border-radius: 6px; }

.main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 22px; }

@media (max-width: 1060px) { .user-meta { display: none; } .nav { margin-left: auto; } .user { margin-left: 8px; } }

/* Bottom tab bar (mobile) */
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav, .user-meta { display: none; }
  .topbar-in { height: 60px; padding: 0 14px; }
  .main { padding: 16px 14px 110px; gap: 16px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 20px;
    box-shadow: 0 12px 30px rgba(27, 38, 83, .18); padding: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border-radius: 14px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--deep); background: #F1EDF9; }
  .tabbar a.active .ico { color: var(--magenta); }
  .tabbar .tab-cta .ico { width: 38px; height: 38px; margin-top: -24px; padding: 9px; border-radius: 14px; background: var(--brand-gradient); color: #fff; box-shadow: 0 8px 18px rgba(220, 39, 142, .38); border: 3px solid #fff; }
  .tabbar .tab-cta.active .ico { color: #fff; }
}

/* ---------- Dashboard ---------- */
.welcome {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff; background: var(--brand-gradient);
  padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  box-shadow: 0 16px 36px rgba(27, 38, 83, .24);
}
.welcome::after { content: ""; position: absolute; right: -70px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); pointer-events: none; }
.welcome > * { position: relative; z-index: 1; }
.welcome .eyebrow { color: #F6C8DF; }
.welcome h1 { font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; text-transform: uppercase; line-height: 1; margin: 6px 0 10px; }
.welcome-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); }
.tag .ico { width: 15px; height: 15px; }
.tag.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.stat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.stat-ico .ico { width: 18px; height: 18px; }
.stat-ico.o { background: #FEEDE1; color: var(--orange); }
.stat-ico.m { background: #FCE4F0; color: var(--magenta); }
.stat-ico.n { background: #E8ECF8; color: var(--navy); }
.stat-ico.g { background: var(--green-bg); color: var(--green); }
.stat-value { font-family: var(--display); font-size: 36px; font-weight: 700; line-height: 1; }
.stat-value small { font-size: 17px; color: var(--muted); margin-left: 3px; }
.stat-note { font-size: 12.5px; font-weight: 500; color: var(--muted); }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stat { padding: 14px; } .stat-value { font-size: 30px; } }

.dash-grid > *, .sale-grid > * { min-width: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.side { display: flex; flex-direction: column; gap: 22px; }

.searchbox { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; background: var(--field); border: 1px solid var(--border); flex: 1 1 220px; max-width: 320px; min-width: 0; color: var(--muted-2); }
.searchbox:focus-within { border-color: var(--magenta); box-shadow: var(--ring); }
.searchbox input { border: none; outline: none; background: transparent; width: 100%; font-weight: 500; font-size: 14px; }
.searchbox .ico { width: 17px; height: 17px; }

.sales { list-style: none; padding: 6px 10px 10px; }
.sale { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; transition: background .15s; }
.sale:hover { background: #F8F5FC; }
.sale + .sale { border-top: 1px solid var(--line); }
.sale:hover + .sale { border-top-color: transparent; }
.thumb { width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, #F4F1FA, #EAE5F5); display: grid; place-items: center; color: #A49FC2; overflow: hidden; position: relative; }
.thumb .ico { width: 22px; height: 22px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.sale-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sale-main b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sale-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.sale-sub span { display: inline-flex; align-items: center; gap: 4px; }
.sale-sub .ico { width: 14px; height: 14px; }
.sale-vol { text-align: right; }
.sale-vol b { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1; }
.sale-vol b small { font-size: 14px; color: var(--muted); margin-left: 2px; }
.sale-vol span { display: block; font-size: 12px; color: var(--muted-2); font-weight: 600; margin-top: 3px; }
@media (max-width: 480px) {
  .sale-main b { white-space: normal; }
  .sale { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; padding: 10px 4px; }
  .thumb { width: 46px; height: 46px; border-radius: 10px; }
  .sale-vol b { font-size: 22px; }
}
.list-foot { padding: 12px 22px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); font-weight: 600; }

.empty { padding: 50px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ico { width: 54px; height: 54px; padding: 14px; border-radius: 16px; background: #F1EDF9; color: var(--magenta); margin-bottom: 6px; }
.empty b { font-family: var(--display); font-size: 22px; text-transform: uppercase; }
.empty span { color: var(--muted); font-size: 14px; font-weight: 500; max-width: 320px; }

.share-card .card-body { display: flex; flex-direction: column; gap: 12px; }
.share-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); }
.share-link code { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campaign-card { background: var(--brand-gradient-v); color: #fff; border: none; overflow: hidden; position: relative; }
.campaign-card .card-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.campaign-card::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.1); }
.campaign-card .eyebrow { color: #F6C8DF; }
.countdown { display: flex; align-items: baseline; gap: 8px; }
.countdown b { font-family: var(--display); font-size: 56px; line-height: .9; }
.countdown span { font-family: var(--display); font-size: 20px; text-transform: uppercase; color: #FFC08A; font-weight: 700; }
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFC08A, var(--orange)); }
.campaign-card .small { font-size: 12.5px; color: #EBD3E4; font-weight: 500; }
.campaign-card a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.campaign-card a .ico { width: 16px; height: 16px; }

/* ---------- Record sale ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.back .ico { width: 16px; height: 16px; }
.page-head h1 { font-family: var(--display); font-size: clamp(32px, 3.6vw, 44px); font-weight: 700; text-transform: uppercase; line-height: 1; }
.page-head p { color: var(--muted); font-weight: 500; margin-top: 6px; }

.sale-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
@media (max-width: 980px) { .sale-grid { grid-template-columns: minmax(0, 1fr); } .summary-col { display: none; } }

.step { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 16px; padding: 22px; }
.step + .step { border-top: 1px solid var(--line); }
.step-num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-size: 19px; font-weight: 700; background: #F1EDF9; color: var(--deep); transition: background .2s, color .2s; }
.step.done .step-num { background: var(--green-bg); color: var(--green); }
.step-body h3 { font-family: var(--display); font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.step-body > p { color: var(--muted); font-size: 13.5px; font-weight: 500; margin: 3px 0 14px; }
@media (max-width: 520px) { .step { grid-template-columns: 1fr; gap: 10px; padding: 18px 16px; } .step-num { width: 32px; height: 32px; font-size: 17px; border-radius: 10px; } }

/* Combobox */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 300px; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; list-style: none;
}
.combo-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: #F6F2FB; }
.combo-list .r-ico { width: 36px; height: 36px; border-radius: 10px; background: #FCE4F0; color: var(--magenta); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 15px; flex: none; }
.combo-list b { font-size: 14.5px; display: block; }
.combo-list small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.combo-list .none { cursor: default; color: var(--muted); font-size: 13.5px; justify-content: center; padding: 18px; }
.combo-list .none:hover { background: none; }
.picked { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid #9ED3B9; background: #F4FBF7; }
.picked .r-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-gradient); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 17px; flex: none; }
.picked div { flex: 1; min-width: 0; }
.picked b { display: block; font-size: 15px; }
.picked small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.link-btn { background: none; border: none; color: var(--pink); font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 6px; }
.link-btn:hover { text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--magenta); color: var(--magenta); }

/* Dropzone */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 190px; padding: 24px; border-radius: 16px; border: 2px dashed #D6D1EA; background: var(--field); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--magenta); background: #FFF6FB; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-ico { width: 56px; height: 56px; border-radius: 16px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--magenta); box-shadow: var(--shadow); }
.dropzone .dz-ico .ico { width: 26px; height: 26px; }
.dropzone b { font-size: 15px; }
.dropzone span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field.invalid .dropzone { border-color: var(--red); background: #FFF8FA; }
.preview { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; border-radius: 16px; border: 1.5px solid #9ED3B9; background: #F4FBF7; }
.preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.preview b { display: block; font-size: 14.5px; word-break: break-all; }
.preview small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.preview .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 420px) { .preview { grid-template-columns: 84px minmax(0, 1fr); } .preview img { width: 84px; height: 84px; } }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--line); background: #FCFBFE; border-radius: 0 0 var(--radius) var(--radius); }
.form-foot .hint { max-width: 360px; }
@media (max-width: 520px) { .form-foot { padding: 16px; } .form-foot .btn { width: 100%; } }

/* Summary */
.summary { position: sticky; top: 90px; }
.summary .card-body { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
.sum-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.sum-row + .sum-row { border-top: 1px dashed var(--border); }
.sum-row .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; color: transparent; flex: none; transition: all .2s; }
.sum-row .tick .ico { width: 14px; height: 14px; stroke-width: 3; }
.sum-row.ok .tick { border-color: var(--green); background: var(--green); color: #fff; }
.sum-row div { flex: 1; min-width: 0; }
.sum-row small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.sum-row b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-row b.empty-val { color: #B3AFCB; font-weight: 500; }
.sum-total { margin-top: 10px; padding: 16px; border-radius: 14px; background: var(--brand-gradient); color: #fff; display: flex; align-items: baseline; justify-content: space-between; }
.sum-total .sum-label { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #F6C8DF; }
.sum-total b { font-family: var(--display); font-size: 36px; line-height: 1; }
.sum-total b small { font-size: 16px; color: #FFC08A; margin-left: 3px; }

/* Modal (success) */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(17, 20, 45, .55); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-card { width: 100%; max-width: 440px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 30px 26px 24px; text-align: center; animation: pop .28s cubic-bezier(.2, 1.3, .5, 1); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
.success-ico { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; box-shadow: 0 0 0 10px #F2FAF6; }
.success-ico .ico { width: 34px; height: 34px; stroke-width: 2.6; }
.modal-card h2 { font-family: var(--display); font-size: 30px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.modal-card p { color: var(--muted); font-weight: 500; margin-top: 8px; }
.receipt { margin: 18px 0 20px; text-align: left; border: 1px solid var(--border); border-radius: 14px; padding: 4px 16px; background: var(--field); }
.receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.receipt div + div { border-top: 1px dashed var(--border); }
.receipt span { color: var(--muted); font-weight: 500; }
.receipt b { text-align: right; word-break: break-word; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 400px) { .modal-actions { grid-template-columns: 1fr; } }

/* ==========================================================================
   SALES PAGE — add a new retailer
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.form-grid > * { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field + .field { margin-top: 0; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.section-title { font-family: var(--display); font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin: 6px 0 -8px; }

.new-retailer { overflow: hidden; border: 1.5px solid #F1C9E0; background: linear-gradient(180deg, #FFF8FC, #fff 70%); transition: box-shadow .2s; }
.new-retailer.open { box-shadow: 0 0 0 4px rgba(220, 39, 142, .08), var(--shadow); }
.nr-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 22px; }
.nr-ico { width: 52px; height: 52px; border-radius: 15px; background: var(--brand-gradient); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(220, 39, 142, .25); }
.nr-ico .ico { width: 24px; height: 24px; }
.nr-text h2 { font-family: var(--display); font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; }
.nr-text p { color: var(--muted); font-size: 13.5px; font-weight: 500; margin-top: 3px; }
.nr-body { padding: 20px 22px 22px; border-top: 1px dashed #EBCFE0; display: flex; flex-direction: column; gap: 16px; animation: slideDown .22s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } }
.nr-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.nr-actions .hint { margin-right: auto; }
@media (max-width: 620px) {
  .nr-head { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; gap: 12px; }
  .nr-ico { width: 44px; height: 44px; border-radius: 13px; }
  .nr-head .btn { grid-column: 1 / -1; width: 100%; }
  .nr-text h2 { font-size: 21px; }
  .nr-body { padding: 16px; }
  .nr-actions .btn { flex: 1; }
  .nr-actions .hint { width: 100%; }
}
.link-btn.inline { padding: 0; font-size: inherit; }
.combo-list li.none { flex-direction: column; gap: 6px; text-align: center; }
.picked.is-new b::after { content: "NEW"; margin-left: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--pink); background: #FCE4F0; padding: 2px 6px; border-radius: 6px; vertical-align: 2px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px;
  background: var(--deep); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ico { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--green); color: #fff; flex: none; }
@media (max-width: 760px) { .toast { bottom: 100px; } }
#nrToggle .when-closed, #nrToggle .when-open { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Backend-era additions ---------- */
.user form { display: contents; }
.test-chip { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9A5A00; background: #FFF4DE; border: 1px dashed #F2C77A; padding: 1px 6px; border-radius: 6px; }
.test-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: #FFF8E8; border: 1px dashed #F2C77A; color: #7A4A00; font-size: 13.5px; font-weight: 500; }
.test-banner .ico { width: 18px; height: 18px; margin-top: 1px; color: #C98200; }
a.thumb { text-decoration: none; }
.thumb img { position: absolute; inset: 0; z-index: 1; }
.toast.error { background: var(--red); }
.toast.error .ico { display: none; }

/* Dealer topbar logo (Gulf · NLOL) */
.topbar .brand-logo { height: 58px; width: auto; flex: none; margin: -6px 0; }
@media (max-width: 760px) { .topbar .brand-logo { height: 50px; } }
@media (max-width: 760px) { .topbar .brand small { display: none; } .topbar .brand b { white-space: nowrap; font-size: 17px; } }

/* ---------- Quantity: cartons & packs / litres ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: #F1EEF8; border: 1px solid var(--border); align-self: flex-start; flex-wrap: wrap; }
.seg-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: none; border-radius: 10px; background: none; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg-btn .ico { width: 17px; height: 17px; }
.seg-btn.active { background: #fff; color: var(--deep); box-shadow: 0 2px 8px rgba(27, 38, 83, .12); }
.seg-btn.active .ico { color: var(--magenta); }

.qty-cartons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 4px; }
.stepper { display: flex; flex-direction: column; gap: 6px; }
.stepper label { font-size: 13px; font-weight: 700; color: var(--deep); }
.stepper small { font-size: 12px; color: var(--muted); font-weight: 500; }
.stepper-ctl { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; height: 58px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--field); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.stepper-ctl:focus-within { border-color: var(--magenta); box-shadow: var(--ring); background: #fff; }
.field.invalid .stepper-ctl { border-color: var(--red); background: #FFF8FA; }
.stepper-ctl input { min-width: 0; border: none; outline: none; background: transparent; text-align: center; font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--navy); -moz-appearance: textfield; }
.stepper-ctl input::-webkit-outer-spin-button, .stepper-ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-ctl input::placeholder { color: #C3BFD8; }
.step-btn { border: none; background: #fff; font-size: 24px; font-weight: 600; color: var(--deep); cursor: pointer; }
.step-btn:hover { background: #FCE4F0; color: var(--magenta); }
.step-btn:first-child { border-right: 1px solid var(--line); }
.step-btn:last-child { border-left: 1px solid var(--line); }
.qty-cartons.qty-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stepper label small { font-weight: 600; }
@media (max-width: 640px) { .qty-cartons.qty-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qty-cartons.qty-3 .qty-litres { grid-column: 1 / -1; } }
@media (max-width: 420px) { .qty-cartons, .qty-cartons.qty-3 { grid-template-columns: 1fr; } }

.qty-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: linear-gradient(90deg, #F4F1FA, #FBF6FB); border: 1px dashed #DCD5EC; }
.qty-total span { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); }
.qty-total b { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1; }
.qty-total em { font-style: normal; font-weight: 700; color: var(--pink); font-size: 14px; }

.sum-total .sum-label em { display: block; font-style: normal; font-size: 13px; letter-spacing: 0; text-transform: none; color: #fff; margin-top: 4px; font-weight: 600; }
.sale-vol .qty { color: var(--pink); font-weight: 700; }
.vol-control { height: 58px; } .vol-control input { font-family: var(--display); font-size: 24px; }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.admin-eyebrow { color: var(--magenta); }
.admin-chip { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--brand-gradient); padding: 2px 7px; border-radius: 6px; }
.admin-avatar .ico { width: 20px; height: 20px; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-head p .id-chip { vertical-align: 1px; }

.test-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none !important; padding: 6px 4px; }
.test-toggle .switch { width: 34px; height: 20px; border-radius: 999px; background: #DCD8EA; position: relative; transition: background .15s; }
.test-toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.test-toggle.on { color: #9A5A00; }
.test-toggle.on .switch { background: #F2B544; }
.test-toggle.on .switch::after { left: 16px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FCFBFE; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FAF7FD; }
.table tr[data-href] { cursor: pointer; }
.table td small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 2px; }
.table td small.ctn { color: var(--pink); font-weight: 700; }
.table td a { color: var(--navy); }
.table td a:hover { color: var(--magenta); }
.table .num { text-align: right; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; white-space: nowrap; }
.table .rank-cell { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--muted-2); width: 36px; }
.table .t-thumb { width: 60px; }
.table .thumb { width: 48px; height: 48px; border-radius: 10px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; }
.filters .grow { flex: 1 1 260px; max-width: none; }
.select { height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #fff; padding: 0 12px; font-weight: 600; font-size: 14px; color: var(--navy); max-width: 100%; }
.pager-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pager-row span:last-child { display: flex; gap: 8px; }

.mini-list { list-style: none; padding: 6px 12px 12px; }
.mini-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: none; }
.mini-list b { display: block; font-size: 14px; }
.mini-list small { color: var(--muted); font-size: 12px; }
.mini-list .num { font-family: var(--display); font-weight: 700; font-size: 17px; white-space: nowrap; }

@media (max-width: 760px) {
  .tabbar-4 { grid-template-columns: repeat(4, 1fr); }
  .head-actions { width: 100%; }
}

/* ---------- Leaderboard poster (export to JPG) ---------- */
.export-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 16px 20px; }
.export-controls .ctl { display: flex; flex-direction: column; gap: 6px; }
.export-controls .btn { margin-left: auto; }
.poster-wrap { overflow-x: auto; padding: 20px; background: #E9E6F2; }
.poster-status { padding: 40px; text-align: center; color: var(--muted); font-weight: 600; }

.poster { width: 1080px; margin: 0 auto; background: #F2F0F7; padding: 36px; display: flex; flex-direction: column; gap: 22px; color: var(--navy); font-family: var(--body); }
.p-hero { display: flex; align-items: center; gap: 24px; padding: 26px 28px; border-radius: 22px; background: linear-gradient(115deg, #1B2653 0%, #57236A 45%, #DC278E 100%); color: #fff; }
.p-logo { width: 124px; height: 124px; border-radius: 22px; background: #fff; padding: 8px; flex: none; display: grid; place-items: center; }
.p-logo img { border-radius: 14px; max-height: 100%; }
.p-title { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.p-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #F6C8DF; }
.p-title h2 { font-family: var(--display); font-size: 46px; font-weight: 700; text-transform: uppercase; line-height: .95; margin-top: 4px; }
.p-title h2 span { color: #FFC08A; font-weight: 500; }
.p-title h3 { font-family: var(--display); font-size: 30px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: #FFC08A; line-height: 1; }
.p-period { font-size: 14px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #EBD3E4; margin-top: 6px; }
.p-brand { width: 150px; height: 110px; border-radius: 18px; background: #fff; padding: 8px 12px; flex: none; display: grid; place-items: center; }
.p-brand img { max-height: 100%; max-width: 100%; }

.p-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.p-kpi { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.p-kpi span { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.p-kpi b { font-family: var(--display); font-size: 38px; font-weight: 700; line-height: 1; }
.p-kpi b small { font-size: 18px; margin-left: 3px; }
.p-kpi em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); }
.p-kpi.dark { background: linear-gradient(115deg, #1B2653 0%, #57236A 45%, #DC278E 100%); border: none; color: #fff; }
.p-kpi.dark span { color: #F6C8DF; }
.p-kpi.dark b small { color: #FFC08A; }
.p-kpi.dark em { color: #fff; }
.orange { color: var(--orange); }

.p-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.p-boards.single { grid-template-columns: 1fr; }
.p-board { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px 8px; }
.p-board h4 { font-family: var(--display); font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 3px solid var(--orange); }
.p-board.accent-magenta h4 { border-bottom-color: var(--magenta); }
.p-board h4 span { color: var(--muted); font-size: 17px; font-weight: 600; }
.p-row { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.p-row .p-main { flex: 1 1 auto; }
.p-row .p-rank, .p-row .p-val { flex: none; }
.p-row:last-child { border-bottom: none; }
.p-rank { display: block; width: 30px; height: 30px; flex: none; }
.p-rank.gold { background: #E0A526; color: #fff; }
.p-rank.silver { background: #9AA7BF; color: #fff; }
.p-rank.bronze { background: #C07A3E; color: #fff; }
.p-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.p-main b { font-size: 15px; font-weight: 700; }
.p-main small { font-size: 12px; color: var(--muted); font-weight: 500; }
.p-bar { position: relative; height: 7px; border-radius: 999px; background: var(--line); margin-top: 3px; }
.p-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: #A9A5C6; }
.p-bar i.hot { background: linear-gradient(90deg, #F46F22, #FF8F3C); }
.p-bar em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #1B2653; opacity: .55; }
.p-val { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.p-val b { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1; }
.p-val b small { font-size: 13px; margin-left: 2px; color: var(--muted); }
.p-val b.orange small { color: var(--orange); }
.p-val > small { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.p-val > small.ctn { color: var(--pink); font-family: var(--display); font-size: 14px; font-weight: 700; }
.p-empty { padding: 30px 0; text-align: center; color: var(--muted); font-weight: 600; }
.p-foot { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; }

/* ---------- Delete sale (soft delete) ---------- */
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(194, 46, 82, .25); }
.btn-danger:hover { background: #A82445; }
.btn-danger[disabled] { opacity: .6; }
.textarea { width: 100%; min-height: 86px; resize: vertical; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--field); font: inherit; font-size: 15px; font-weight: 500; color: var(--navy); outline: none; }
.textarea:focus { border-color: var(--magenta); box-shadow: var(--ring); background: #fff; }
.field.invalid .textarea { border-color: var(--red); background: #FFF8FA; }
.delete-card { text-align: left; }
.delete-card h2 { text-align: center; }
.danger-ico { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--red-bg); color: var(--red); display: grid; place-items: center; box-shadow: 0 0 0 10px #FDF3F5; }
.danger-ico .ico { width: 28px; height: 28px; }
.delete-summary { text-align: center; font-weight: 600 !important; color: var(--navy) !important; margin: 8px 0 18px !important; }
.delete-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 18px !important; }

.sale { grid-template-columns: 56px minmax(0, 1fr) auto 40px; }
.sale-del { width: 36px; height: 36px; border-radius: 10px; opacity: .55; }
.sale:hover .sale-del, .sale-del:focus-visible { opacity: 1; }
.sale-del:hover { color: var(--red); border-color: #F2B8C6; background: #FFF5F7; }
@media (max-width: 480px) { .sale { grid-template-columns: 46px minmax(0, 1fr) auto 34px; } .sale-del { width: 32px; height: 32px; opacity: .8; } }

.flash { margin-bottom: -4px; }
.del-list { list-style: none; padding: 6px 14px 12px; }
.del-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.del-list li:last-child { border-bottom: none; }
.del-list b { display: block; font-size: 14px; }
.del-list small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.del-list small.reason { font-style: italic; margin-top: 2px; }
.status { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.status .ico { width: 13px; height: 13px; }
.status.pending { color: #9A5A00; background: #FFF4DE; }
.status.approved { color: var(--red); background: var(--red-bg); }
.status.restored { color: var(--green); background: var(--green-bg); }

/* ---------- Admin: deletion review ---------- */
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.tabbar .nav-badge { position: absolute; margin: -4px 0 0 18px; }
.tabbar a { position: relative; }
@media (max-width: 760px) {
  .tabbar-5 { grid-template-columns: repeat(5, 1fr); } .tabbar-5 a { font-size: 10.5px; }
  .tabbar-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); left: 8px; right: 8px; padding: 5px; }
  .tabbar-6 a { font-size: 10px; padding: 7px 2px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabbar-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); left: 6px; right: 6px; padding: 5px; }
  .tabbar-7 a { font-size: 9px; padding: 6px 1px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.table .t-act { width: 48px; text-align: right; }
.review-tabs { margin-bottom: -6px; }
.review-tabs .seg-btn { text-decoration: none; }
.review-list { display: flex; flex-direction: column; gap: 14px; }
.review { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 18px; }
.review-thumb { width: 96px; height: 96px; border-radius: 14px; }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review-top > b { font-size: 17px; }
.review-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.review-meta b { color: var(--navy); }
.review-reason { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FFF8E8; border: 1px dashed #F2C77A; color: #6B4300; font-size: 14px; }
.review-reason .ico { width: 17px; height: 17px; margin-top: 2px; color: #C98200; flex: none; }
.review-reason small { color: #9A7A40; }
.review-done { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.note-input { flex: 1 1 220px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--field); font: inherit; font-size: 14px; }
.note-input:focus { outline: none; border-color: var(--magenta); box-shadow: var(--ring); }
@media (max-width: 560px) { .review { grid-template-columns: 1fr; } .review-thumb { width: 100%; height: 160px; } }
.nav a, .topbar .brand small { white-space: nowrap; }
@media (max-width: 1360px) { body.admin .user-meta { display: none; } body.admin .nav { margin-left: auto; } body.admin .nav a { padding: 0 11px; } }
@media (max-width: 1100px) { body.admin .nav a .ico { display: none; } }
.pw-card { max-width: 560px; }
.pw-card .field + .field { margin-top: 16px; }
.user .icon-btn + form { margin-left: 0; }
@media (max-width: 420px) { .topbar .brand b { font-size: 15px; } .topbar .brand { min-width: 0; } .topbar .brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; } }

/* ---------- Admin: service station (timings + bookings) ---------- */
.sv-timings { display: flex; flex-wrap: wrap; gap: 10px; }
.sv-timing {
  display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 108px; padding: 12px 14px;
  border-radius: 14px; cursor: pointer; background: var(--field); border: 1.5px solid var(--border);
  font: inherit; transition: border-color .15s, background .15s;
}
.sv-timing b { font-family: var(--display); font-size: 15px; color: var(--deep); white-space: nowrap; }
.sv-timing small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--green); }
.sv-timing .switch { width: 34px; height: 20px; border-radius: 999px; background: var(--green); position: relative; transition: background .15s; }
.sv-timing .switch::after { content: ""; position: absolute; top: 2px; left: 16px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.sv-timing:hover { border-color: #F1B9D8; }
.sv-timing.is-off { background: #F4F3F8; border-style: dashed; }
.sv-timing.is-off small { color: var(--red); }
.sv-timing.is-off .switch { background: #DCD8EA; }
.sv-timing.is-off .switch::after { left: 2px; }
.sv-code-sm { font-family: var(--display); font-size: 15px; letter-spacing: .1em; color: var(--magenta); }
