/* ===================================================================
   SOS – سرویس روغن | mobile web app
   Palette derived from the SOS logo (red + orange oil drop)
=================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand */
  --red:        #D4860A;
  --red-dark:   #A86400;
  --orange:     #F5A623;
  --orange-lt:  #FFD066;
  --brand-grad: linear-gradient(135deg, #FFD066 0%, #D4860A 100%);

  /* surfaces */
  --bg:         #eef2f7;
  --surface:    #ffffff;
  --surface-2:  #f6f8fb;

  /* text */
  --ink:        #1f2a37;
  --ink-2:      #5b6675;
  --ink-3:      #9aa4b2;

  /* feedback */
  --green:      #3f9e54;
  --green-bg:   #e4f1e6;

  /* misc */
  --line:       #eceff3;
  --radius:     22px;
  --radius-sm:  16px;
  --shadow:     0 10px 30px -12px rgba(31, 42, 55, .18);
  --shadow-sm:  0 6px 18px -10px rgba(31, 42, 55, .22);
  --nav-h:      72px;
  --maxw:       100%;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* hide browser scrollbars globally (keep scroll functionality) */
html { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input { font-family: inherit; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }

/* phone-frame container — wraps the whole Blazor app */
.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: clip;
}

.fade-page { animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===================================================================
   LOADING SPLASH (index.html) + skeletons
=================================================================== */
.loading-splash {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: var(--bg);
  font-family: "Vazirmatn", system-ui, sans-serif;
  color: var(--ink-2); font-weight: 600;
}
.loading-logo { width: 84px; height: 84px; filter: drop-shadow(0 10px 18px rgba(212,134,10,.18)); }
.loading-spinner {
  width: 38px; height: 38px;
  border: 3.5px solid #e0e6ee;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: loading-spin .8s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }

/* branded spinner used inside buttons / pages */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loading-spin .7s linear infinite;
  display: inline-block;
}
.spinner.spinner-brand { border-color: #F0D8A0; border-top-color: var(--red); }
.page-loader { display: flex; justify-content: center; padding: 56px 0; }
.page-loader .spinner { width: 34px; height: 34px; }

/* skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, #e9edf3 25%, #dde3ec 37%, #e9edf3 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-line { height: 13px; border-radius: 7px; }
.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
}
.sk-row { display: flex; align-items: center; gap: 12px; }
.sk-circle { width: 50px; height: 50px; border-radius: 50%; flex: 0 0 auto; }
.sk-square { width: 54px; height: 54px; border-radius: 16px; flex: 0 0 auto; }

/* ===================================================================
   AUTH (phone + otp)
=================================================================== */
.auth-screen {
  min-height: 100dvh;
  display: flex;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(245,166,35,.16), transparent 60%),
    radial-gradient(120% 50% at 50% 110%, rgba(212,134,10,.10), transparent 60%),
    var(--bg);
  overflow-y: auto;
}
.auth-inner {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 40px 26px calc(30px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-brand { text-align: center; }
.auth-logo {
  width: 116px; height: auto;
  filter: drop-shadow(0 10px 18px rgba(212,134,10,.18));
}
.auth-tagline { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); font-weight: 500; }

.auth-card {
  background: var(--surface);
  border-radius: 26px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.auth-title { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.auth-sub   { margin: 0 0 22px; font-size: 14px; color: var(--ink-2); line-height: 1.9; }
.auth-sub b { color: var(--ink); }

.auth-foot { text-align: center; font-size: 12.5px; color: var(--ink-3); margin: 0; }
.auth-foot a { color: var(--red); font-weight: 600; }
.otp-hint { color: var(--orange); }

.auth-back {
  position: absolute;
  top: 30px; right: 22px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.auth-back svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* fields */
.field { display: block; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 9px; }
.field-control { position: relative; }
.field-control input {
  width: 100%; height: 56px;
  border: 1.6px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0 50px 0 16px;
  font-size: 17px; font-weight: 600; letter-spacing: 1px;
  color: var(--ink); outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field-control input::placeholder { color: var(--ink-3); font-weight: 500; letter-spacing: normal; }
.field-control input:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(245,166,35,.14);
}
.field-icon { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); width: 20px; height: 20px; fill: var(--ink-3); }
.field-error { display: block; min-height: 18px; margin-top: 7px; font-size: 12px; color: var(--red); font-weight: 600; }

/* buttons */
.btn {
  width: 100%; height: 56px;
  border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { color: #fff; background: var(--brand-grad); box-shadow: 0 12px 24px -10px rgba(212,134,10,.55); }
.btn-primary:disabled { opacity: .55; box-shadow: none; cursor: default; }

/* spacing between the field / otp boxes and the submit button */
.auth-card .btn-primary { margin-top: 22px; }

/* otp */
.otp-boxes { display: flex; gap: 12px; justify-content: center; margin-bottom: 4px; }
.otp-cell {
  width: 62px; height: 66px;
  text-align: center;
  font-size: 26px; font-weight: 800;
  border: 1.6px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--ink); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.otp-cell:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(245,166,35,.14); }
.otp-cell.filled { border-color: var(--orange-lt); }

.otp-resend { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-2); }
.link-btn { color: var(--red); font-weight: 700; font-size: 14px; }

/* ===================================================================
   MAIN APP shell
=================================================================== */
.tab-page { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); }

/* header */
.app-header {
  background: var(--surface);
  padding: calc(18px + env(safe-area-inset-top)) 20px 18px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 8px 24px -18px rgba(31,42,55,.4);
  position: sticky; top: 0; z-index: 5;
}
.app-header--plain { padding-bottom: 16px; }
.app-header-row { display: flex; align-items: center; gap: 12px; }
.header-logo { width: 52px; height: 52px; object-fit: contain; }
.header-greeting { display: flex; flex-direction: column; line-height: 1.5; flex: 1; }
.header-hi { font-size: 12.5px; color: var(--ink-3); }
.header-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.page-h1 { margin: 0; font-size: 20px; font-weight: 800; }

/* car filter chips */
.car-chips { display: flex; gap: 9px; margin-top: 18px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.car-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all .18s;
}
.chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 16px -10px rgba(212,134,10,.6); }

/* page body */
.page-body { padding: 18px 18px; flex: 1; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 14px; }
.section-title { margin: 0; font-size: 16px; font-weight: 800; }
.section-count { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

/* ---------- service card ---------- */
.service-list { display: flex; flex-direction: column; gap: 14px; }
.service-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .14s, box-shadow .2s;
  cursor: pointer;
}
.service-card:active { transform: scale(.985); box-shadow: var(--shadow); }
.sc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sc-info { flex: 1; min-width: 0; }
.sc-title { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: var(--ink); }
.sc-oil   { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--orange); }
.sc-drop { flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(145deg, #fff1df, #ffe1c2); display: grid; place-items: center; }
.sc-drop .drop-ic { width: 26px; height: 26px; }
.drop-ic { fill: var(--orange); }
.drop-ic.is-red { fill: var(--red); }

.sc-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 700; background: var(--green-bg); color: var(--green); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.badge-scheduled { background: #fff3e0; color: var(--orange); }
.badge.badge-new { background: #FFF3D6; color: var(--red); }

/* ---------- pull-to-refresh ---------- */
.ptr-indicator { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: height .12s ease; }
.ptr-indicator .ptr-spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--red); border-radius: 50%; }
.ptr-indicator.loading .ptr-spinner { animation: loading-spin .8s linear infinite; }

.sc-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--orange); border-top: 1.5px dashed var(--line); padding-top: 12px; }
.sc-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }
.sc-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.sc-meta svg { width: 16px; height: 16px; fill: none; stroke: var(--orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sc-meta .num { color: var(--ink); }

/* global page-loading overlay */
.page-loading {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: var(--bg);
  animation: pageLoadingIn .15s ease;
}
@keyframes pageLoadingIn { from { opacity: 0; } to { opacity: 1; } }
.page-loading-logo { width: 76px; height: 76px; filter: drop-shadow(0 10px 18px rgba(212,134,10,.18)); }

/* lazy-load sentinel */
.lazy-sentinel { display: flex; justify-content: center; padding: 18px 0 4px; }

/* empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty-emoji { font-size: 46px; margin-bottom: 12px; }
.empty-state p { margin: 0; font-size: 14px; font-weight: 500; }

/* ---------- car cards ---------- */
.car-list { display: flex; flex-direction: column; gap: 14px; }
.car-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 14px;
  transition: transform .14s; cursor: pointer;
}
.car-card:active { transform: scale(.985); }
.car-emblem { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--brand-grad); box-shadow: 0 8px 16px -10px rgba(212,134,10,.6); }
.car-emblem svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.car-body { flex: 1; min-width: 0; }
.car-name { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.car-plate { margin: 0; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.car-count { flex: 0 0 auto; text-align: center; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; line-height: 1.3; }
.car-count b { display: block; font-size: 16px; color: var(--red); }
.car-count span { font-size: 10.5px; color: var(--ink-3); }

/* ---------- profile ---------- */
.profile-card { background: var(--surface); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; background: var(--brand-grad); box-shadow: 0 10px 20px -10px rgba(212,134,10,.6); }
.profile-meta { display: flex; flex-direction: column; gap: 5px; }
.profile-meta strong { font-size: 17px; font-weight: 800; }
.profile-meta span { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }

.profile-stats { display: flex; gap: 12px; margin: 14px 0; }
.stat { flex: 1; text-align: center; background: var(--surface); border-radius: var(--radius-sm); padding: 16px 8px; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-size: 22px; font-weight: 800; color: var(--red); }
.stat span { font-size: 12.5px; color: var(--ink-2); }

.menu-list { list-style: none; margin: 4px 0 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1.5px solid var(--line); transition: background .15s; cursor: pointer; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--surface-2); }
.menu-ic { width: 26px; display: inline-flex; align-items: center; justify-content: center; }
.menu-ic svg { width: 23px; height: 23px; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-txt { flex: 1; font-size: 14.5px; font-weight: 600; }
.menu-arrow { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.logout-btn { width: 100%; margin-top: 18px; height: 52px; border-radius: var(--radius-sm); background: #FEF3DC; color: var(--red); font-size: 14.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 9px; }
.logout-btn:active { background: #FDE8B8; }
.logout-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===================================================================
   BOTTOM NAV — fixed within the centered phone frame
=================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -8px 30px -16px rgba(31,42,55,.35);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 20;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--ink-3);
  font-size: 11.5px; font-weight: 600;
  padding-top: 6px;
  transition: color .18s;
}
.nav-item .nav-ic { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.nav-item.active { color: var(--red); }
.nav-item.active .nav-ic { transform: translateY(-1px) scale(1.04); }

/* center floating button */
.nav-center {
  flex: 0 0 auto;
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transform: translateY(-22px);
  width: 84px;
  color: var(--ink-3);
}
.nav-center-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--brand-grad);
  display: grid; place-items: center;
  box-shadow: 0 14px 26px -8px rgba(212,134,10,.6);
  border: 5px solid var(--surface);
  transition: transform .2s;
}
.nav-center .drop-ic { width: 30px; height: 30px; fill: #fff; }
.nav-center-label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); transition: color .18s; }
.nav-center.active .nav-center-label { color: var(--red); }
.nav-center.active .nav-center-circle { transform: scale(1.05); }

/* ===================================================================
   SERVICE DETAIL
=================================================================== */
.detail-screen { min-height: 100dvh; background: var(--bg); animation: slideIn .28s ease; }
@keyframes slideIn { from { transform: translateX(-100%); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.detail-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top)) 18px 16px;
  background: var(--surface);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 24px -18px rgba(31,42,55,.4);
}
.detail-header h1 { margin: 0; font-size: 17px; font-weight: 800; }
.detail-back { width: 42px; height: 42px; display: grid; place-items: center; background: var(--surface-2); border-radius: 13px; }
.detail-back svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.detail-spacer { width: 42px; }

.detail-body { padding: 18px 18px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }

.d-hero { background: var(--surface); border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: var(--shadow-sm); }
.d-hero-drop { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: linear-gradient(145deg, #fff1df, #ffe1c2); display: grid; place-items: center; }
.d-hero-drop .drop-ic { width: 42px; height: 42px; }
.d-hero h2 { margin: 0 0 12px; font-size: 22px; font-weight: 800; }

.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.d-cell { background: var(--surface); border-radius: var(--radius-sm); padding: 18px 16px; box-shadow: var(--shadow-sm); text-align: center; }
.d-cell-ic { width: 30px; height: 30px; margin: 0 auto 12px; display: block; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.d-cell-label { font-size: 12.5px; font-weight: 700; color: var(--orange); margin-bottom: 5px; }
.d-cell-val { font-size: 16px; font-weight: 800; color: var(--ink); }

.d-interval { background: var(--surface); border-radius: var(--radius-sm); padding: 18px; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: space-between; }
.d-interval-label { font-size: 13.5px; font-weight: 700; color: var(--orange); }
.d-interval-val { font-size: 16px; font-weight: 800; }

.d-actions { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.d-actions h3 { margin: 0 0 16px; font-size: 16px; font-weight: 800; text-align: right; }
.d-actions ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.d-actions li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.d-check { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.d-check svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.d-note { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.d-note h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.d-note p { margin: 0; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }

/* generic centered message (errors / not found) */
.center-msg { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--ink-2); }
.center-msg .emoji { font-size: 52px; }
.center-msg p { margin: 0; font-size: 15px; font-weight: 600; }
.center-msg .btn { max-width: 240px; }

/* ===================================================================
   TOAST
=================================================================== */
.toast-host { position: fixed; bottom: calc(var(--nav-h) + 18px); left: 0; right: 0; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: 100%; padding: 0 16px; }
.toast {
  background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: 14px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.4);
  max-width: 90%; text-align: center;
  animation: toastIn .25s ease;
}
.toast.toast-error { background: #c4141d; }
.toast.toast-success { background: #2f7d44; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.toast.leaving { animation: toastOut .25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(20px); } }

/* ===================================================================
   blazor error ui
=================================================================== */
#blazor-error-ui {
  color-scheme: light only;
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  display: none;
  right: 0; left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; left: 0.75rem; top: 0.5rem; }

/* ===================================================================
   POLISH — accessibility, consistency & micro-interactions
=================================================================== */

/* brand-tinted text selection */
::selection { background: rgba(245,166,35,.28); color: var(--ink); }

/* brand caret in text fields */
.field-control input, .otp-cell { caret-color: var(--red); }

/* keyboard focus ring (only for keyboard users, never on tap) */
:focus-visible { outline: 2.5px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
/* fields already carry their own focus treatment — avoid a doubled ring */
.field-control input:focus-visible, .otp-cell:focus-visible { outline: none; }
/* clickable cards / rows: inset ring so it follows the rounded corners */
.service-card:focus-visible,
.car-card:focus-visible,
.menu-item:focus-visible { outline: 2.5px solid var(--orange); outline-offset: -3px; }

/* press/hover parity — car cards now lift like service cards */
.car-card:active { box-shadow: var(--shadow); }

/* pointer (desktop) niceties — never affects touch */
@media (hover: hover) {
  .btn-primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(212,134,10,.6); }
  .service-card:hover, .car-card:hover { box-shadow: var(--shadow); }
  .chip:not(.active):hover { border-color: var(--orange-lt); color: var(--ink); }
  .link-btn:hover, .auth-foot a:hover { text-decoration: underline; }
}

/* bottom-nav: clearer active state with a small top indicator bar */
.nav-item { position: relative; }
.nav-item.active::before {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--red);
}

/* respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 360px) {
  .otp-cell { width: 54px; height: 60px; }
}
