/* ==========================================================================
   MyMammut — Design System (dark luxury automotive · RTL · mobile-first)
   ========================================================================== */
@import url('/fonts/fonts.css');

:root {
  --bg: #0a0c10;
  --bg-2: #0f1218;
  --bg-3: #141924;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --text: #f2f4f8;
  --text-2: #9aa3b2;
  --text-3: #616b7c;
  --accent: #e10600;
  --accent-2: #ff3b30;
  --accent-soft: rgba(225, 6, 0, 0.14);
  --ok: #30d158;
  --ok-soft: rgba(48, 209, 88, 0.14);
  --warn: #ffd60a;
  --warn-soft: rgba(255, 214, 10, 0.12);
  --info: #64d2ff;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow-card: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  --tabbar-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 0.9, 0.28, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: 'Vazirmatn', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* پس‌زمینهٔ محیطی */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 38% at 50% -6%, rgba(225, 6, 0, 0.16), transparent 62%),
    radial-gradient(50% 40% at 88% 108%, rgba(38, 66, 120, 0.18), transparent 60%),
    linear-gradient(180deg, #0c0e13 0%, var(--bg) 40%);
}
.ambient::after {
  content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(rgba(255,255,255,0.028) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
}

/* قاب اپ */
.app {
  max-width: 480px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column; position: relative;
}
@media (min-width: 560px) {
  .app { border-inline: 1px solid rgba(255,255,255,0.05); }
}

/* ---------- Splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: radial-gradient(70% 50% at 50% 30%, #131721, var(--bg));
  transition: opacity 0.55s var(--ease), visibility 0.55s;
}
#splash.hide { opacity: 0; visibility: hidden; }
.splash-in { text-align: center; animation: splashUp 0.9s var(--ease) both; }
.splash-in img { width: 132px; margin: 0 auto 18px; filter: drop-shadow(0 12px 34px rgba(225,6,0,0.35)); }
.splash-in .word { font-size: 26px; font-weight: 800; letter-spacing: 0.5px; }
.splash-in .word i { color: var(--accent-2); font-style: normal; }
.splash-in small { display: block; margin-top: 8px; color: var(--text-2); font-size: 13px; }
.splash-bar { width: 120px; height: 3px; border-radius: 3px; background: var(--surface-2); margin: 22px auto 0; overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 3px; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(140%);} 100% { transform: translateX(-260%);} }
@keyframes splashUp { from { opacity: 0; transform: translateY(16px) scale(0.97);} to { opacity: 1; transform: none;} }

/* ---------- Onboarding / Activation ---------- */
#gate { position: fixed; inset: 0; z-index: 200; overflow-y: auto; background: var(--bg); display: none; }
#gate.show { display: block; }
.gate-wrap { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: max(20px, env(safe-area-inset-top)) 22px calc(28px + var(--safe-b)); }
.gate-logo { width: 96px; margin: 6vh auto 0; opacity: 0.95; }
.gate-step { flex: 1; display: flex; flex-direction: column; animation: fadeUp 0.5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none;} }
.gate h1 { font-size: 24px; font-weight: 800; margin: 26px 0 8px; line-height: 1.5; }
.gate h1 em { color: var(--accent-2); font-style: normal; }
.gate .sub { color: var(--text-2); font-size: 14px; line-height: 1.9; }
.gate-dots { display: flex; gap: 6px; justify-content: center; margin: 18px 0 4px; }
.gate-dots i { width: 6px; height: 6px; border-radius: 6px; background: var(--surface-2); transition: 0.3s; }
.gate-dots i.on { width: 22px; background: var(--accent); }

.field { margin-top: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.field input, .field select {
  width: 100%; background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-sm); padding: 14px 16px; font-size: 16px; color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent-2); background: rgba(225,6,0,0.05); }
.field input::placeholder { color: var(--text-3); }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 7px; line-height: 1.8; }
.field.err input { border-color: var(--accent-2); }
.field .errmsg { color: var(--accent-2); font-size: 12.5px; margin-top: 7px; display: none; }
.field.err .errmsg { display: block; }

.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.model-card {
  position: relative; border: 1.5px solid var(--stroke); border-radius: var(--r-md);
  overflow: hidden; background: var(--surface); text-align: right;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.model-card img { width: 100%; height: 92px; object-fit: cover; filter: saturate(0.9); }
.model-card .mc-b { padding: 10px 12px 12px; }
.model-card .mc-n { font-size: 13.5px; font-weight: 700; }
.model-card .mc-c { font-size: 11px; color: var(--text-2); margin-top: 3px; }
.model-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card); transform: translateY(-2px); }
.model-card.sel::after {
  content: ''; position: absolute; top: 8px; left: 8px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}

.paint-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.paint {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--stroke-2);
  position: relative; transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.paint.sel { transform: scale(1.12); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--accent-2); }
.paint-name { font-size: 12.5px; color: var(--text-2); margin-top: 10px; min-height: 18px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 18px; border-radius: 16px; font-size: 15.5px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a30400);
  color: #fff; box-shadow: 0 12px 26px -10px rgba(225, 6, 0, 0.55);
  transition: transform 0.18s var(--ease), box-shadow 0.2s, filter 0.2s;
}
.btn:active { transform: scale(0.975); }
.btn.ghost { background: var(--surface-2); box-shadow: none; color: var(--text); }
.btn.line { background: transparent; border: 1.5px solid var(--stroke-2); box-shadow: none; }
.btn[disabled] { filter: grayscale(0.6) opacity(0.5); pointer-events: none; }
.btn svg { width: 19px; height: 19px; }
.gate-cta { margin-top: auto; padding-top: 26px; display: grid; gap: 10px; }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 18px 12px;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.92), rgba(10, 12, 16, 0.55) 75%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.hdr .hlogo { height: 30px; }
.hdr .htitle { font-size: 16px; font-weight: 800; }
.hdr .hsub { font-size: 11.5px; color: var(--text-2); margin-top: 1px; }
.hdr .grow { flex: 1; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--stroke); color: var(--text-2);
  transition: background 0.2s, color 0.2s; position: relative;
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 9px; left: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 2.5px var(--bg); }

/* ---------- Pages / tabs ---------- */
main { flex: 1; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 26px); }
.page { display: none; padding: 4px 18px 0; animation: fadeUp 0.42s var(--ease) both; }
.page.on { display: block; }
.ptitle { font-size: 21px; font-weight: 800; margin: 12px 2px 4px; }
.psub { color: var(--text-2); font-size: 13.5px; margin: 0 2px 16px; line-height: 1.9; }

/* ---------- 3D hero ---------- */
.stage {
  position: relative; height: min(46vh, 400px); min-height: 300px;
  margin: 2px -18px 0; overflow: hidden;
}
.stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 52%, rgba(4, 5, 8, 0.55) 100%),
    linear-gradient(180deg, rgba(10, 12, 16, 0.35), transparent 22%, transparent 78%, rgba(10, 12, 16, 0.5));
}
.stage .badge-row, .stage .hint3d { z-index: 2; }
.stage3d-canvas { width: 100%; height: 100%; display: block; }
.stage .badge-row {
  position: absolute; top: 12px; right: 18px; left: 18px; display: flex; gap: 8px; align-items: center;
  pointer-events: none;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(12, 14, 19, 0.72); border: 1px solid var(--stroke);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 7px 12px; border-radius: 999px; font-size: 11.5px; color: var(--text-2);
}
.chip b { color: var(--text); font-weight: 700; }
.chip.red { border-color: rgba(225,6,0,0.4); color: #ffb4ae; background: rgba(70, 8, 6, 0.5); }
.stage .hint3d {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px;
  background: rgba(12,14,19,0.55); padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(8px); pointer-events: none; white-space: nowrap;
}
.trailer-title { text-align: center; margin-top: -6px; position: relative; z-index: 2; }
.trailer-title h2 { font-size: 22px; font-weight: 800; }
.trailer-title .tt-sub { color: var(--text-2); font-size: 12.5px; margin-top: 4px; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(150deg, var(--surface-2), var(--surface) 55%);
  border: 1px solid var(--stroke); border-radius: var(--r-lg);
  padding: 18px; margin-top: 14px; box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
.card.flat { box-shadow: none; }
.card h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.card h3 svg { width: 19px; height: 19px; color: var(--accent-2); flex: none; }
.card .all { position: absolute; top: 18px; left: 16px; font-size: 12px; color: var(--text-2); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-md);
  padding: 13px 12px; text-align: center;
}
.stat .sv { font-size: 17px; font-weight: 800; letter-spacing: 0.2px; }
.stat .sv.ok { color: var(--ok); } .stat .sv.warn { color: var(--warn); } .stat .sv.bad { color: var(--accent-2); }
.stat .sl { font-size: 11px; color: var(--text-2); margin-top: 4px; }

/* ring */
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 96px; height: 96px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); }
.ring .bar { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease), stroke 0.4s; }
.ring.warn .bar { stroke: var(--warn); } .ring.bad .bar { stroke: var(--accent-2); }
.ring .rc { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .rc b { font-size: 20px; display: block; }
.ring .rc span { font-size: 10px; color: var(--text-2); }
.ring-info { flex: 1; }
.ring-info .ri-t { font-weight: 800; font-size: 14.5px; }
.ring-info .ri-d { color: var(--text-2); font-size: 12.5px; line-height: 1.9; margin-top: 5px; }

/* quick actions */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-md);
  padding: 14px 6px 12px; transition: background 0.2s, transform 0.2s var(--ease);
}
.qa:active { transform: scale(0.95); background: var(--surface-2); }
.qa svg { width: 22px; height: 22px; color: var(--accent-2); }
.qa span { font-size: 11px; color: var(--text-2); }

/* list rows */
.rows { margin-top: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 13px 2px;
  border-bottom: 1px solid var(--stroke); text-align: right; width: 100%;
}
.row:last-child { border-bottom: 0; }
.row .ric {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent-2);
}
.row .ric.g { background: var(--ok-soft); color: var(--ok); }
.row .ric.y { background: var(--warn-soft); color: var(--warn); }
.row .ric.b { background: rgba(100, 210, 255, 0.12); color: var(--info); }
.row .ric svg { width: 19px; height: 19px; }
.row .rb { flex: 1; min-width: 0; }
.row .rt { font-size: 13.5px; font-weight: 700; }
.row .rd { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.8; }
.row .rl { font-size: 11.5px; color: var(--text-3); flex: none; }
.row .chev { width: 16px; height: 16px; color: var(--text-3); flex: none; transform: rotate(180deg); }

/* ---------- Service page ---------- */
.seg {
  display: flex; background: var(--surface); border: 1px solid var(--stroke);
  border-radius: 14px; padding: 4px; margin-top: 14px;
}
.seg button {
  flex: 1; padding: 9px 6px; border-radius: 11px; font-size: 13px; font-weight: 700; color: var(--text-2);
  transition: 0.25s;
}
.seg button.on { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(225,6,0,0.6); }

.timeline { margin-top: 6px; position: relative; padding-right: 26px; }
.timeline::before { content: ''; position: absolute; right: 8px; top: 10px; bottom: 12px; width: 2px; background: var(--surface-2); border-radius: 2px; }
.tl-item { position: relative; padding: 10px 0 14px; }
.tl-item::before {
  content: ''; position: absolute; right: -24.5px; top: 16px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg-3); border: 2.5px solid var(--text-3); box-sizing: border-box;
}
.tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl-item.due::before { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item .tt { font-size: 13.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.tl-item .tt .tag { font-size: 10.5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.tl-item.done .tt .tag { background: var(--ok-soft); color: var(--ok); }
.tl-item.due .tt .tag { background: var(--accent-soft); color: var(--accent-2); }
.tl-item .td { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.8; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--stroke); width: 100%; text-align: right; }
.check:last-child { border-bottom: 0; }
.check .cbx {
  width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--stroke-2); flex: none; margin-top: 1px;
  display: grid; place-items: center; transition: 0.2s; color: transparent;
}
.check .cbx svg { width: 14px; height: 14px; }
.check.on .cbx { background: var(--ok); border-color: var(--ok); color: #04220e; }
.check .ct { font-size: 13.5px; font-weight: 600; line-height: 1.7; }
.check .cd { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.8; }
.check.on .ct { color: var(--text-2); text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.3); }
.check-progress { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-top: 12px; }
.check-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), #7ae09b); border-radius: 6px; transition: width 0.5s var(--ease); }

/* ---------- Dealers ---------- */
.search-box { position: relative; margin-top: 14px; }
.search-box input {
  width: 100%; background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px;
  padding: 13px 44px 13px 14px; font-size: 14px; color: var(--text);
}
.search-box input:focus { outline: none; border-color: var(--accent-2); }
.search-box svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); }
.prov-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.prov-scroll::-webkit-scrollbar { display: none; }
.pchip {
  flex: none; padding: 8px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--stroke); color: var(--text-2); transition: 0.2s;
}
.pchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.dealer {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-md);
  padding: 15px 16px; margin-top: 11px;
}
.dealer .dh { display: flex; align-items: center; gap: 10px; }
.dealer .dn { font-size: 14.5px; font-weight: 800; flex: 1; }
.dealer .dtag { font-size: 10.5px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; flex: none; }
.dealer .dcity { font-size: 12px; color: var(--accent-2); font-weight: 700; margin-top: 3px; }
.dealer .daddr { font-size: 12.5px; color: var(--text-2); line-height: 1.9; margin-top: 7px; }
.dealer .dacts { display: flex; gap: 9px; margin-top: 13px; }
.dealer .dacts a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
}
.dealer .dacts a svg { width: 16px; height: 16px; }
.dealer .dacts .call { background: var(--ok-soft); color: var(--ok); }
.dealer .dacts .nav { background: var(--surface-2); color: var(--text); }
.dealer .dcode { font-size: 10.5px; color: var(--text-3); }

/* SOS card */
.sos-card {
  margin-top: 14px; border-radius: var(--r-lg); padding: 18px; position: relative; overflow: hidden;
  background: linear-gradient(140deg, #3d0503, #16080a 70%);
  border: 1px solid rgba(225, 6, 0, 0.35);
}
.sos-card::before {
  content: ''; position: absolute; inset: -40% 55% auto -20%; height: 200%;
  background: radial-gradient(closest-side, rgba(255, 60, 40, 0.28), transparent);
}
.sos-card .st { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.sos-card .st svg { width: 21px; height: 21px; color: var(--accent-2); }
.sos-card .sd { font-size: 12.5px; color: #d8a9a4; margin-top: 6px; line-height: 1.9; }
.sos-card .snum { font-size: 24px; font-weight: 800; letter-spacing: 1px; margin-top: 10px; direction: ltr; text-align: right; }
.sos-card .btn { margin-top: 14px; }

/* ---------- Guide ---------- */
.acc { border-bottom: 1px solid var(--stroke); }
.acc:last-child { border-bottom: 0; }
.acc .acc-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 15px 2px; text-align: right; }
.acc .acc-h .at { flex: 1; font-size: 13.5px; font-weight: 700; line-height: 1.7; }
.acc .acc-h svg { width: 17px; height: 17px; color: var(--text-3); transition: transform 0.3s var(--ease); flex: none; }
.acc.open .acc-h svg { transform: rotate(180deg); color: var(--accent-2); }
.acc .acc-b { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.acc .acc-b > div { padding: 0 2px 16px; font-size: 13px; color: var(--text-2); line-height: 2; }

.tip-grid { display: grid; gap: 11px; margin-top: 14px; }
.tip { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-md); padding: 15px 16px; display: flex; gap: 13px; }
.tip .tic { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; flex: none; }
.tip .tic svg { width: 20px; height: 20px; }
.tip .tt { font-size: 13.5px; font-weight: 800; }
.tip .td { font-size: 12.5px; color: var(--text-2); line-height: 1.95; margin-top: 5px; }

.spec-table { margin-top: 10px; }
.spec-table .sp { display: flex; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--stroke); }
.spec-table .sp:last-child { border-bottom: 0; }
.spec-table .sk { font-size: 12.5px; color: var(--text-2); flex: none; }
.spec-table .sv2 { font-size: 12.5px; font-weight: 600; text-align: left; line-height: 1.8; }

.hist { margin-top: 10px; }
.hist .hi { display: flex; gap: 14px; padding: 9px 2px; align-items: baseline; }
.hist .hy { font-size: 13px; font-weight: 800; color: var(--accent-2); min-width: 52px; }
.hist .ht { font-size: 13px; color: var(--text-2); }

/* ---------- Profile ---------- */
.hero-photo { border-radius: var(--r-lg); overflow: hidden; margin-top: 14px; position: relative; border: 1px solid var(--stroke); }
.hero-photo img { width: 100%; height: 190px; object-fit: cover; }
.hero-photo .hp-g { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 10, 14, 0.9)); }
.hero-photo .hp-t { position: absolute; bottom: 14px; right: 16px; left: 16px; }
.hero-photo .hp-t b { font-size: 17px; }
.hero-photo .hp-t span { display: block; font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 80;
  padding: 10px 14px calc(10px + var(--safe-b));
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.6), rgba(10, 12, 16, 0.95) 40%);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; align-items: flex-end; gap: 2px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px; color: var(--text-3); font-size: 10.5px; font-weight: 600;
  transition: color 0.25s; position: relative;
}
.tab svg { width: 23px; height: 23px; transition: transform 0.3s var(--ease); }
.tab.on { color: #fff; }
.tab.on svg { transform: translateY(-2px); color: var(--accent-2); }
.tab.on::after { content: ''; position: absolute; top: -10px; width: 26px; height: 3px; border-radius: 3px; background: var(--accent); }
.tab[hidden] { display: none; }
.tab-sos {
  flex: none; width: 60px; height: 60px; margin: 0 6px; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #ff4d42, var(--accent) 55%, #8f0300);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 10px 26px -6px rgba(225, 6, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-16px); transition: transform 0.2s var(--ease);
  font-size: 10px; font-weight: 800;
}
.tab-sos:active { transform: translateY(-16px) scale(0.93); }
.tab-sos svg { width: 22px; height: 22px; margin-bottom: 1px; }
@keyframes sosPulse { 0%, 100% { box-shadow: 0 10px 26px -6px rgba(225,6,0,0.7), 0 0 0 0 rgba(225,6,0,0.45);} 60% { box-shadow: 0 10px 26px -6px rgba(225,6,0,0.7), 0 0 0 14px rgba(225,6,0,0);} }
.tab-sos { animation: sosPulse 2.6s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .tab-sos { animation: none; } .splash-bar i { animation: none; } }

/* ---------- Sheet ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 150; background: rgba(4, 5, 8, 0.6); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: 0.3s; }
.sheet-back.show { opacity: 1; visibility: visible; }
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 105%);
  width: 100%; max-width: 480px; z-index: 160;
  background: #12151c; border-radius: 26px 26px 0 0; border: 1px solid var(--stroke);
  border-bottom: 0; padding: 10px 20px calc(24px + var(--safe-b));
  transition: transform 0.42s var(--ease); max-height: 86dvh; overflow-y: auto;
}
.sheet.show { transform: translate(-50%, 0); }
.sheet .grip { width: 40px; height: 4.5px; border-radius: 4px; background: var(--surface-2); margin: 6px auto 14px; }
.sheet h3 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.sheet h3 svg { width: 20px; height: 20px; color: var(--accent-2); }
.sheet .ssub { color: var(--text-2); font-size: 13px; margin-top: 6px; line-height: 1.9; }

/* ---------- کارت نصب / اعلان ---------- */
.install-card { position: relative; border-color: rgba(225, 6, 0, 0.28); }
.install-card .ic-row { display: flex; gap: 13px; align-items: center; }
.install-card .ic-icon { width: 52px; height: 52px; border-radius: 14px; flex: none; box-shadow: 0 8px 18px -8px rgba(0,0,0,.8); }
.install-card .ic-icon.bell { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.install-card .ic-icon.bell svg { width: 24px; height: 24px; }
.install-card .ic-t { font-size: 14px; font-weight: 800; }
.install-card .ic-d { font-size: 12px; color: var(--text-2); line-height: 1.9; margin-top: 4px; }
.install-card .ic-x { position: absolute; top: 12px; left: 12px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3); background: var(--surface); }
.install-card .ic-x svg { width: 14px; height: 14px; }

/* ---------- باشگاه مشتریان ---------- */
.club-mini .cm-row { display: flex; align-items: center; gap: 12px; }
.cm-badge {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--t1), var(--t2));
  box-shadow: 0 6px 16px -6px var(--t2);
}
.club-mini .cm-t { font-size: 13.5px; font-weight: 800; }
.club-mini .cm-d { font-size: 11.5px; color: var(--text-2); margin-top: 3px; }
.club-mini .cm-body { flex: 1; min-width: 0; }
.club-mini .cm-pts { text-align: center; flex: none; }
.club-mini .cm-pts b { font-size: 19px; display: block; }
.club-mini .cm-pts span { font-size: 10px; color: var(--text-2); }
.cm-bar { height: 5px; border-radius: 5px; background: var(--surface-2); overflow: hidden; margin-top: 13px; }
.cm-bar i { display: block; height: 100%; border-radius: 5px; transition: width 0.8s var(--ease); }
.cm-bar.big { height: 7px; margin-top: 10px; }
.cm-bar.big i { background: linear-gradient(90deg, var(--t1), var(--t2)); }

.club-card {
  margin-top: 14px; border-radius: var(--r-lg); padding: 20px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 130% at 88% -10%, color-mix(in srgb, var(--t1) 26%, transparent), transparent 55%),
    linear-gradient(155deg, #1a1e27, #0e1117 65%);
  border: 1px solid color-mix(in srgb, var(--t1) 45%, var(--stroke));
  box-shadow: var(--shadow-card);
}
.club-card::before {
  content: ''; position: absolute; inset: -60% -30% auto auto; width: 70%; height: 160%;
  background: linear-gradient(60deg, transparent 46%, rgba(255, 255, 255, 0.05) 50%, transparent 54%);
  pointer-events: none;
}
.cc-top { display: flex; align-items: center; gap: 11px; }
.cc-mark { width: 34px; opacity: 0.92; }
.cc-tt { flex: 1; }
.cc-tt b { font-size: 14.5px; display: block; }
.cc-tt span { font-size: 10.5px; color: var(--text-2); }
.cc-tier {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--t1), var(--t2));
}
.cc-pts { font-size: 34px; font-weight: 800; margin-top: 14px; }
.cc-pts small { font-size: 13px; color: var(--text-2); font-weight: 600; }
.cc-next { font-size: 11.5px; color: var(--text-2); margin-top: 8px; }
.cc-ben { margin-top: 14px; display: grid; gap: 7px; }
.cc-b { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); line-height: 1.8; }
.cc-b svg { width: 14px; height: 14px; color: var(--t1); flex: none; margin-top: 4px; }
.cc-earn { font-size: 10.5px; color: var(--text-3); margin-top: 14px; line-height: 1.9; border-top: 1px solid var(--stroke); padding-top: 11px; }
.cc-hist { margin-top: 8px; border-top: 1px solid var(--stroke); padding-top: 6px; }
.cc-h { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-2); padding: 5px 0; }
.cc-h b { color: var(--ok); }

/* ---------- فرم امداد ---------- */
.sos-probs { display: flex; flex-wrap: wrap; gap: 8px; }
.sos-probs .pchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.geo-box { margin-top: 10px; }
.geo-wait { font-size: 12.5px; color: var(--warn); }
.geo-err { font-size: 12.5px; color: var(--accent-2); line-height: 1.9; display: block; }
.geo-ok {
  display: flex; gap: 10px; align-items: center; background: var(--ok-soft);
  border: 1px solid rgba(48, 209, 88, 0.3); border-radius: 12px; padding: 11px 13px; font-size: 12px; line-height: 1.8;
}
.geo-ok svg { width: 17px; height: 17px; color: var(--ok); flex: none; }
.geo-ok b { color: var(--ok); }
.geo-ok a { flex: none; font-weight: 700; color: var(--info); font-size: 12px; }
.geo-coords { display: block; color: var(--text-3); font-size: 11px; }
.spill { flex: none; font-size: 10.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.spill.new { background: var(--accent-soft); color: var(--accent-2); }
.spill.progress { background: var(--warn-soft); color: var(--warn); }
.spill.done { background: var(--ok-soft); color: var(--ok); }

/* toast */
#toast {
  position: fixed; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); left: 50%;
  transform: translate(-50%, 20px); z-index: 250; opacity: 0; pointer-events: none;
  background: #1c212b; border: 1px solid var(--stroke-2); color: var(--text);
  padding: 12px 20px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-card); transition: 0.35s var(--ease); max-width: 88%; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* notif panel rows reuse .row */
.empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 34px 10px; line-height: 2; }
.empty svg { width: 40px; height: 40px; margin: 0 auto 10px; display: block; color: var(--text-3); }

@media (max-width: 420px) {
  .seg button { font-size: 11.5px; padding: 9px 3px; }
}

/* desktop niceties */
@media (min-width: 1024px) {
  body::before {
    content: 'MyMammut'; position: fixed; top: 44%; right: 6vw; z-index: -1;
    font-size: 12vw; font-weight: 800; color: rgba(255, 255, 255, 0.02);
    letter-spacing: 0.04em; transform: rotate(90deg); transform-origin: right;
  }
}
