:root {
  --primary: #1a3c8f;
  --primary-dark: #0f2660;
  --accent-teal: #00b4c8;
  --accent-purple: #7c3aed;
  --accent-orange: #f97316;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --warning-bg: #fff7ed;
  --warning-border: #fed7aa;
  --card-bg: #ffffff;
  --sidebar-bg: #0f2660;
  --sidebar-text: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --step-done: #1a3c8f;
  --step-active: #ffffff;
  --step-inactive: #cbd5e1;

  /* refreshed design tokens */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15,38,96,0.04), 0 2px 8px rgba(15,38,96,0.05);
  --shadow-md: 0 6px 20px rgba(15,38,96,0.08);
  --shadow-lg: 0 12px 32px rgba(15,38,96,0.12);
  --sidebar-gradient: linear-gradient(165deg, #163a86 0%, #0f2660 60%, #0a1c4d 100%);
  --page-bg: #eef2f8;
}

* { box-sizing: border-box; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--page-bg);
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

a { text-decoration: none; color: inherit; }

/* ───── LAYOUT ───── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  direction: rtl;
}

/* ───── SIDEBAR ───── */
.sidebar {
  width: 312px;
  min-width: 312px;
  background: var(--sidebar-gradient);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 26px 20px 22px;
  flex-shrink: 0;
  position: relative;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 4px;
}

.sidebar-logo-text {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-teal), #0894a6);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,180,200,0.4);
}

.sidebar-tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 400;
}

/* ── vehicle hero card ── */
.vehicle-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 14px 14px 16px;
  margin-bottom: 18px;
  backdrop-filter: blur(4px);
}

.vehicle-card-photo {
  background: linear-gradient(160deg, #ffffff 0%, #eaf6f8 100%);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}

.sidebar-car-img {
  width: 100%;
  max-width: 230px;
  height: 116px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(10,28,77,0.18));
}

.vehicle-card-name {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.warranty-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 7px 14px;
}

.warranty-pill-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

.warranty-pill.is-active {
  color: #bbf7d0;
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.35);
}

.warranty-pill.is-active .warranty-pill-dot {
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
}

.dot-green {
  width: 10px; height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
}

.dot-orange {
  width: 10px; height: 10px;
  background: var(--accent-orange);
  border-radius: 50%;
  display: inline-block;
}

/* ── info chips ── */
.sidebar-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 10px 12px;
  transition: background 0.15s;
}

.sidebar-info-row:hover { background: rgba(255,255,255,0.09); }

.sidebar-info-texts { flex: 1; min-width: 0; }

.sidebar-info-label {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2px;
  text-align: right;
}

.sidebar-info-value {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  text-align: right;
  direction: ltr;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-info-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  flex-shrink: 0;
}

/* ── sidebar navigation ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(255,255,255,0.78);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav-item i { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.09);
  color: #fff;
}

.sidebar-nav-item.active {
  background: rgba(43,212,192,0.16);
  color: #fff;
}

.sidebar-logout-form { margin-top: auto; padding-top: 14px; }

.sidebar-logout {
  width: 100%;
  border: 1px solid rgba(248,113,113,0.28);
  background: rgba(248,113,113,0.1);
  color: #fca5a5;
  text-align: right;
  font-family: 'Vazirmatn', sans-serif;
  cursor: pointer;
}

.sidebar-logout:hover {
  background: rgba(248,113,113,0.18);
  color: #fecaca;
}

/* ───── MAIN CONTENT ───── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ───── TOP NAV ───── */
.topnav {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topnav-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  position: relative;
  padding-right: 12px;
}

.topnav-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(var(--accent-teal), var(--primary));
}

.topnav-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topnav-bell {
  position: relative;
  font-size: 22px;
  color: var(--text-main);
  cursor: pointer;
}

.topnav-bell .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-red);
  color: #fff;
  font-size: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.topnav-menu {
  font-size: 20px;
  color: var(--text-main);
  cursor: pointer;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f1f5f9;
  transition: background 0.15s;
}

.topnav-menu:hover { background: #e2e8f0; }

/* ───── SCROLL AREA ───── */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 28px;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

/* ───── GUARANTEE CARDS ROW ───── */
.guarantee-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.g-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s;
  cursor: pointer;
  border: 1px solid #eef2f8;
}

.g-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.g-card-icon-wrap {
  width: 56px; height: 56px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #f1f5f9;
}

.g-card.theme-teal .g-card-icon-wrap { background: linear-gradient(150deg, #e0f7fa, #cffafe); }
.g-card.theme-purple .g-card-icon-wrap { background: linear-gradient(150deg, #f3e8ff, #ede9fe); }
.g-card.theme-orange .g-card-icon-wrap { background: linear-gradient(150deg, #ffedd5, #fff7ed); }

.g-card-icon {
  font-size: 24px;
  z-index: 1;
}

.circle-svg {
  position: absolute;
  top: 0; left: 0;
  width: 52px; height: 52px;
  transform: rotate(-90deg);
}

.circle-bg { fill: none; stroke: #e2e8f0; stroke-width: 3; }
.circle-fill { fill: none; stroke-width: 3; stroke-linecap: round; }

.g-card-title { font-size: 13px; font-weight: 600; color: var(--text-main); }
.g-card-status { font-size: 12px; font-weight: 600; }
.status-teal { color: var(--accent-teal); }
.status-purple { color: var(--accent-purple); }
.status-orange { color: var(--accent-orange); }
.status-green { color: var(--accent-green); }
.status-red { color: var(--accent-red); }

/* ───── INFO ROW ───── */
.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.info-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eef2f8;
  transition: transform 0.18s, box-shadow 0.18s;
}

a.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.info-card-icon {
  width: 44px; height: 44px;
  background: linear-gradient(150deg, #e0f2fe, #eff6ff);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.info-card-text { flex: 1; text-align: right; }
.info-card-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.info-card-value { font-size: 13px; font-weight: 700; color: var(--text-main); }

/* ───── WARNING BANNER ───── */
.warning-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.warning-icon { font-size: 22px; color: var(--accent-orange); flex-shrink: 0; }
.warning-text { flex: 1; text-align: right; font-size: 13px; color: var(--text-main); line-height: 1.6; }
.warning-text strong { color: var(--accent-orange); }
.warning-text span { color: var(--primary); font-weight: 700; }

/* ───── SERVICE SECTION ───── */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.service-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.service-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.service-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

.service-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* ───── TIMELINE ───── */
.timeline-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 420px;
  position: relative;
  padding: 8px 0 24px;
}

.tl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.tl-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.tl-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--step-inactive);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
}

.tl-circle.done {
  background: var(--step-done);
  border-color: var(--step-done);
}

.tl-circle.active {
  background: #fff;
  border-color: var(--step-done);
  box-shadow: 0 0 0 3px rgba(26,60,143,0.15);
}

.tl-circle i { font-size: 11px; color: #fff; }
.tl-circle.active::after {
  content: '';
  width: 10px; height: 10px;
  background: var(--step-done);
  border-radius: 50%;
  position: absolute;
}

.tl-line {
  flex: 1;
  height: 2px;
  background: var(--step-inactive);
  margin-top: -11px;
  z-index: 1;
}

.tl-line.done { background: var(--step-done); }

.tl-car {
  position: absolute;
  bottom: 0;
  font-size: 20px;
  color: var(--primary);
  transform: translateX(-50%);
  transition: left 0.3s;
}

.timeline-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

/* ───── SERVICE DETAIL CARD ───── */
.service-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.service-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: 'Vazirmatn', sans-serif;
  transition: opacity 0.15s;
}

.service-tab.active { opacity: 1; box-shadow: 0 0 0 2px currentColor; }
.service-tab:not(.active) { opacity: 0.65; }

.tab-electric { background: #eff6ff; color: var(--accent-teal); }
.tab-motor { background: #f5f3ff; color: var(--accent-purple); }
.tab-body { background: #fff7ed; color: var(--accent-orange); }

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
}

.tab-electric .tab-count { background: var(--accent-teal); color: #fff; }
.tab-motor .tab-count { background: var(--accent-purple); color: #fff; }
.tab-body .tab-count { background: var(--accent-orange); color: #fff; }

.service-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
  text-align: right;
}

.service-list-item:last-child { border-bottom: none; }
.service-list-item i { color: var(--accent-green); font-size: 14px; flex-shrink: 0; }

.service-detail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-top: 1px solid #f1f5f9;
  margin-top: 6px;
}

.service-detail-link:hover { color: var(--primary-dark); }

/* ───── DESCRIPTION ───── */
.desc-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eef2f8;
  margin-bottom: 16px;
}

.desc-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.desc-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.desc-card-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: right;
}

/* ───── MILEAGE HERO ───── */
.mileage-hero {
  background: var(--sidebar-gradient);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.mileage-hero::after {
  content: '\F66B';
  font-family: 'bootstrap-icons';
  position: absolute;
  left: -10px;
  bottom: -24px;
  font-size: 120px;
  color: rgba(255,255,255,0.06);
  line-height: 1;
}

.mileage-hero-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  position: relative;
  z-index: 1;
}

.mileage-hero-value {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
  direction: rtl;
}

.mileage-hero-value small { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.7); }

.mileage-hero-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}

.mileage-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.mileage-input {
  flex: 1;
  min-width: 120px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
  direction: ltr;
  text-align: center;
}

.mileage-input::placeholder { color: rgba(255,255,255,0.55); }
.mileage-input:focus { outline: none; border-color: var(--accent-teal); background: rgba(255,255,255,0.18); }

.mileage-submit {
  background: var(--accent-teal);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, transform 0.15s;
}

.mileage-submit:hover { background: #0894a6; transform: translateY(-1px); }

.mileage-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 12px;
  position: relative;
  z-index: 1;
  line-height: 1.7;
}

.section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin: 4px 2px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-label i { color: var(--primary); }

/* ───── CTA BUTTON ───── */
.btn-cta {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  justify-content: center;
  margin-bottom: 14px;
  text-decoration: none;
}

.btn-cta:hover { background: var(--primary-dark); color: #fff; }

.btn-cta-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-cta-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ───── FOOTER ───── */
.bottom-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
  justify-content: center;
}

.footer-item i { font-size: 14px; }

.chevron-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  cursor: pointer;
}

/* ───── AUTH PAGES ───── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e5aa8 100%);
  padding: 20px;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-logo-text {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.auth-logo-icon {
  width: 42px; height: 42px;
  background: var(--accent-teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

.auth-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-step {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--text-muted);
}

.auth-step.active {
  background: var(--primary);
  color: #fff;
}

.auth-step.done {
  background: var(--accent-green);
  color: #fff;
}

.auth-step-line {
  width: 40px;
  height: 2px;
  background: #e2e8f0;
}

.auth-step-line.done { background: var(--accent-green); }

.auth-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: right;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 15px;
  text-align: center;
  letter-spacing: 2px;
  direction: ltr;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-input.error { border-color: var(--accent-red); }

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 6px;
}

.form-error {
  font-size: 12px;
  color: var(--accent-red);
  text-align: center;
  margin-top: 10px;
  display: none;
}

.form-error.show { display: block; }

.engine-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  direction: ltr;
}

.engine-digit {
  width: 56px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.2s;
}

.engine-digit:focus {
  outline: none;
  border-color: var(--primary);
}

/* ───── LOADING PAGE ───── */
.loading-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 20px;
}

.loading-spinner {
  width: 64px; height: 64px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  margin-top: 24px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: var(--accent-teal);
  border-radius: 4px;
  animation: progress 2s ease-in-out forwards;
}

@keyframes progress {
  from { width: 0; }
  to { width: 100%; }
}

/* ───── SLIDE MENU ───── */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.slide-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 1001;
  padding: 24px 20px;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.slide-menu.open { right: 0; }

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.menu-close {
  font-size: 24px;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
}

.menu-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: background 0.15s;
}

.menu-nav-item:hover,
.menu-nav-item.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.menu-nav-item i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.menu-divider {
  border-color: rgba(255,255,255,0.12);
  margin: 12px 0;
}

.menu-logout {
  color: var(--accent-red);
}

/* ───── NOTIFICATIONS ───── */
.notif-item {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border-right: 4px solid transparent;
}

.notif-item.unread {
  border-right-color: var(--primary);
  background: #f8fafc;
}

.notif-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notif-icon.warning { background: var(--warning-bg); color: var(--accent-orange); }
.notif-icon.info { background: #eff6ff; color: var(--primary); }
.notif-icon.success { background: #f0fdf4; color: var(--accent-green); }

.notif-content { flex: 1; text-align: right; }
.notif-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.notif-body { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.notif-time { font-size: 10px; color: var(--text-muted); margin-top: 6px; }

/* ───── WARRANTY DETAIL ───── */
.warranty-hero {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 16px;
}

.warranty-hero-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.warranty-hero-info { flex: 1; text-align: right; }
.warranty-hero-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.warranty-hero-status { font-size: 14px; font-weight: 600; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-item {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  text-align: right;
}

.detail-item-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.detail-item-value { font-size: 14px; font-weight: 700; }

.tip-list {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eef2f8;
  margin-bottom: 16px;
}

.tip-list-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tip-list-title i { color: var(--primary); }

.tip-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
  line-height: 1.7;
  text-align: right;
}

.tip-item:last-child { border-bottom: none; }
.tip-item i { color: var(--accent-teal); flex-shrink: 0; margin-top: 2px; }

/* ───── SERVICE REQUEST FORM ───── */
.request-form {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 14px;
}

.request-form .form-group { margin-bottom: 16px; }

.request-form .form-input,
.request-form select,
.request-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
  text-align: right;
  direction: rtl;
}

.request-form select { cursor: pointer; }
.request-form textarea { resize: vertical; min-height: 80px; }

.success-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 14px;
}

.success-card i {
  font-size: 48px;
  color: var(--accent-green);
  margin-bottom: 12px;
}

.success-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ───── SERVICE HISTORY TABLE ───── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.history-table th {
  background: #f8fafc;
  padding: 10px 12px;
  text-align: right;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: right;
}

.history-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.history-badge.done { background: #f0fdf4; color: var(--accent-green); }
.history-badge.pending { background: #fff7ed; color: var(--accent-orange); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.back-link:hover { color: var(--primary-dark); }

/* ───── RESPONSIVE ───── */
@media (max-width: 991px) {
  .sidebar { width: 260px; min-width: 260px; }
}

@media (max-width: 767px) {
  .app-wrapper { flex-direction: column; }

  .sidebar {
    width: 100%;
    min-width: unset;
    padding: 16px 16px 18px;
  }

  .sidebar-tagline { margin-bottom: 14px; }

  .vehicle-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 14px;
    align-items: center;
    text-align: right;
    margin-bottom: 14px;
  }

  .vehicle-card-photo { margin-bottom: 0; }
  .sidebar-car-img { height: 92px; }

  .vehicle-card-name { text-align: right; margin-bottom: 8px; font-size: 15px; }
  .warranty-pill { justify-content: flex-start; width: -moz-max-content; width: max-content; }

  .sidebar-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .guarantee-row { grid-template-columns: repeat(3, 1fr); }
  .info-row { grid-template-columns: 1fr 1fr; }
  .service-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .vehicle-card { grid-template-columns: 110px 1fr; gap: 12px; }
  .sidebar-car-img { height: 78px; }
  .sidebar-info-grid { grid-template-columns: 1fr; }

  .guarantee-row { grid-template-columns: 1fr; gap: 10px; }
  .g-card { flex-direction: row; justify-content: flex-start; text-align: right; padding: 14px; gap: 14px; }
  .g-card-icon-wrap { width: 48px; height: 48px; }
  .info-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .bottom-footer { flex-direction: column; gap: 8px; }
  .footer-item { width: 100%; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
  .footer-item:last-child { border-bottom: none; }
  .auth-card { padding: 28px 20px; }
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ═══════════════════════════════════════════════
   ADMIN — TIP FORM (Create / Edit)
   ═══════════════════════════════════════════════ */
.tip-form-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.tip-form-main { display: flex; flex-direction: column; gap: 16px; }

.form-section {
  background: #fff;
  border: 1px solid #eef2f8;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(15,38,96,0.05));
  padding: 20px;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.form-section-num {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-teal, #00b4c8), var(--primary, #1a3c8f));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-section-title { font-size: 15px; font-weight: 800; color: var(--text-main, #1e293b); }
.form-section-sub { font-size: 11.5px; color: var(--text-muted, #64748b); margin-top: 2px; line-height: 1.6; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 7px;
}

.field-label .opt {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 1px 7px;
  margin-right: auto;
}

.field-input,
.field-textarea {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  padding: 11px 13px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 13.5px;
  color: var(--text-main, #1e293b);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input::placeholder,
.field-textarea::placeholder { color: #aab4c2; }

.field-input:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--primary, #1a3c8f);
  box-shadow: 0 0 0 4px rgba(26,60,143,0.1);
}

.field-textarea { resize: vertical; min-height: 92px; line-height: 1.8; }

.field-input.ltr { direction: ltr; text-align: left; }

.field-hint { font-size: 11px; color: var(--text-muted, #64748b); margin-top: 6px; line-height: 1.6; }
.field-error { font-size: 11px; color: var(--accent-red, #ef4444); margin-top: 5px; display: block; }

.input-wrap { position: relative; }
.input-wrap .unit {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
}
.input-wrap .field-input { padding-left: 52px; }

/* ── visual choice cards (warranty type / severity) ── */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  padding: 14px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  background: #fff;
}

.choice:hover { transform: translateY(-2px); border-color: #cbd5e1; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice-ico {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: #f1f5f9;
  color: #64748b;
  transition: all 0.15s;
}

.choice-text { font-size: 12.5px; font-weight: 700; color: #475569; }
.choice-check {
  position: absolute;
  top: 8px; left: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-teal, #00b4c8);
  color: #fff;
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
}

.choice:has(input:checked) {
  border-color: var(--accent-teal, #00b4c8);
  background: #f0fdff;
}
.choice:has(input:checked) .choice-ico { background: linear-gradient(135deg, var(--accent-teal, #00b4c8), var(--primary, #1a3c8f)); color: #fff; }
.choice:has(input:checked) .choice-text { color: var(--text-main, #1e293b); }
.choice:has(input:checked) .choice-check { display: flex; }

/* severity color theming */
.choice.sev-info:has(input:checked)     { border-color: #0ea5e9; background: #f0f9ff; }
.choice.sev-info:has(input:checked) .choice-ico { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.choice.sev-info:has(input:checked) .choice-check { background: #0ea5e9; }
.choice.sev-warning:has(input:checked)  { border-color: #f97316; background: #fff7ed; }
.choice.sev-warning:has(input:checked) .choice-ico { background: linear-gradient(135deg, #fb923c, #ea580c); }
.choice.sev-warning:has(input:checked) .choice-check { background: #f97316; }
.choice.sev-critical:has(input:checked) { border-color: #dc2626; background: #fef2f2; }
.choice.sev-critical:has(input:checked) .choice-ico { background: linear-gradient(135deg, #f87171, #dc2626); }
.choice.sev-critical:has(input:checked) .choice-check { background: #dc2626; }

/* ── toggle switch ── */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 13px;
  background: #fbfdff;
}

.switch-texts .switch-title { font-size: 13px; font-weight: 700; color: var(--text-main, #1e293b); }
.switch-texts .switch-sub { font-size: 11px; color: var(--text-muted, #64748b); margin-top: 2px; }

.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s;
  cursor: pointer;
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  right: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked ~ .slider { background: var(--accent-green, #22c55e); }
.switch input:checked ~ .slider::before { transform: translateX(-20px); }

/* ── sticky action bar ── */
.form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: 1px solid #eef2f8;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-md, 0 6px 20px rgba(15,38,96,0.08));
  padding: 14px 16px;
  margin-top: 4px;
}

.btn-save {
  background: linear-gradient(135deg, var(--accent-teal, #00b4c8), var(--primary, #1a3c8f));
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 12px 26px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 8px 18px rgba(0,180,200,0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,180,200,0.34); }

.btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border-radius: 11px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-cancel:hover { background: #e2e8f0; color: #334155; }

.form-actions .spacer { flex: 1; }

/* ── live preview ── */
.tip-preview-wrap { position: sticky; top: 20px; }

.preview-card {
  background: #fff;
  border: 1px solid #eef2f8;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(15,38,96,0.05));
  padding: 18px;
}

.preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
}

.preview-banner {
  border-radius: 13px;
  padding: 14px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  border: 1px solid;
}

.preview-banner .pv-ico { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.preview-banner .pv-title { font-size: 13.5px; font-weight: 800; margin-bottom: 3px; }
.preview-banner .pv-msg { font-size: 12px; color: var(--text-main, #1e293b); line-height: 1.7; }
.preview-banner .pv-meta { font-size: 10.5px; color: var(--text-muted, #64748b); margin-top: 7px; display: flex; align-items: center; gap: 5px; }

.pv-chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pv-chip {
  font-size: 10.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 860px) {
  .tip-form-layout { grid-template-columns: 1fr; }
  .tip-preview-wrap { position: static; order: -1; }
  .field-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   LANDING v2 — dark hero (Home/Index)
   ═══════════════════════════════════════════════ */
.lx {
  min-height: 100vh;
  direction: rtl;
  color: #e7eefb;
  display: flex;
  flex-direction: column;
  padding: 26px clamp(20px, 5vw, 64px) 0;
  background:
    radial-gradient(1100px 640px at 30% 28%, #173a6e 0%, rgba(12,28,64,0) 58%),
    radial-gradient(900px 700px at 85% 80%, rgba(124,58,237,0.16) 0%, rgba(12,28,64,0) 55%),
    linear-gradient(160deg, #0f2552 0%, #0a1838 55%, #070f24 100%);
}

/* ── header ── */
.lx-top {
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: clamp(22px, 5vh, 52px);
}
.lx-logo { display: flex; align-items: center; gap: 11px; }
.lx-logo-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1fc6d4, #1786d6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  box-shadow: 0 8px 20px rgba(23,134,214,0.45);
}
.lx-logo-text { font-size: 25px; font-weight: 800; color: #fff; letter-spacing: 0.3px; }

.lx-top-right { direction: rtl; display: flex; align-items: center; gap: 16px; }
.lx-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: #bdeede;
  background: rgba(28,201,179,0.12);
  border: 1px solid rgba(28,201,179,0.28);
  border-radius: 999px; padding: 8px 16px;
}
.lx-pill i { color: #2bd4c0; }
.lx-help { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: #aab8d4; cursor: pointer; }
.lx-help:hover { color: #e7eefb; }
.lx-help .q {
  width: 27px; height: 27px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: #cdd8ee;
}

/* ── main grid ── */
.lx-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 26px;
}

/* ── left content ── */
.lx-h1 {
  font-size: clamp(27px, 3.3vw, 42px);
  font-weight: 800;
  line-height: 1.55;
  color: #fff;
  margin-bottom: 18px;
}
.lx-h1 .t { color: #2bd4c0; }

.lx-lead {
  font-size: clamp(13.5px, 1.05vw, 15.5px);
  line-height: 2.1;
  color: #9fb0cf;
  max-width: 480px;
  margin-bottom: 28px;
}

.lx-form { max-width: 480px; }
.lx-flabel { display: block; font-size: 13.5px; font-weight: 700; color: #c8d4ec; margin-bottom: 10px; }
.lx-input-wrap { position: relative; margin-bottom: 14px; }
.lx-input-wrap .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; color: #7f93b8; }
.lx-input {
  width: 100%;
  padding: 16px 18px 16px 46px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  color: #fff;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 16px; font-weight: 600; letter-spacing: 1px;
  direction: ltr; text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.lx-input::placeholder { color: #6f83a8; font-weight: 500; letter-spacing: 0.5px; }
.lx-input:focus { outline: none; border-color: #2bd4c0; box-shadow: 0 0 0 4px rgba(43,212,192,0.16); background: rgba(255,255,255,0.07); }
.lx-input.error { border-color: #f87171; }

.lx-error {
  display: none; align-items: center; gap: 8px;
  font-size: 13px; color: #fecaca;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 12px; padding: 11px 14px; margin-bottom: 14px;
}
.lx-error.show { display: flex; }

.lx-btn {
  width: 100%; border: none; border-radius: 14px; padding: 16px;
  background: linear-gradient(270deg, #2f6fe0 0%, #16bdc9 100%);
  color: #fff; font-family: 'Vazirmatn', sans-serif; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  box-shadow: 0 12px 28px rgba(22,189,201,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lx-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(22,189,201,0.4); color: #fff; }

.lx-trust { display: flex; gap: 24px; margin-top: 30px; flex-wrap: wrap; }
.lx-trust-item { display: flex; align-items: center; gap: 11px; }
.lx-trust-ico {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(43,212,192,0.1); border: 1px solid rgba(43,212,192,0.2);
  display: flex; align-items: center; justify-content: center; color: #2bd4c0; font-size: 17px; flex-shrink: 0;
}
.lx-trust-title { font-size: 13px; font-weight: 700; color: #eaf1ff; }
.lx-trust-sub { font-size: 11px; color: #8497ba; margin-top: 2px; }

.lx-secure { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #7f93b8; margin-top: 26px; }
.lx-secure i { color: #34d399; }

/* ── right: demo card ── */
.demo-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 30px 70px rgba(3,10,30,0.5);
  backdrop-filter: blur(6px);
}

.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 6px 16px; }
.demo-brand { display: flex; align-items: center; gap: 13px; }
.demo-logo {
  width: 56px; height: 56px; border-radius: 15px;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 27px;
  box-shadow: 0 8px 20px rgba(37,99,235,0.45); flex-shrink: 0;
}
.demo-name { font-size: 18px; font-weight: 800; color: #fff; text-align: right; }
.demo-meta { font-size: 12px; color: #93a6c8; margin-top: 4px; text-align: right; }
.demo-car { width: 46%; max-width: 230px; }
.demo-car img { width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 16px 22px rgba(0,0,0,0.45)); }

.demo-warranty {
  display: flex; align-items: stretch;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; overflow: hidden; margin-bottom: 13px;
}
.dw-half { flex: 1; padding: 14px 18px; }
.dw-remain { border-right: 1px solid rgba(255,255,255,0.08); }
.dw-active { display: flex; align-items: center; gap: 12px; }
.dw-check {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(52,211,153,0.16); color: #34d399;
  display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0;
}
.dw-active-label { font-size: 13px; font-weight: 800; color: #34d399; }
.dw-active-date { font-size: 11px; color: #8497ba; margin-top: 3px; direction: ltr; text-align: right; }
.dw-remain-num { font-size: 21px; font-weight: 800; color: #2bd4c0; text-align: right; }
.dw-remain-label { font-size: 11.5px; color: #8497ba; margin-top: 3px; text-align: right; }

.demo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 16px; }
.demo-info {
  background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 12px;
}
.demo-info-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.demo-info-ico.blue { background: rgba(47,111,224,0.16); color: #60a5fa; }
.demo-info-ico.amber { background: rgba(245,158,11,0.16); color: #fbbf24; }
.demo-info-text { flex: 1; text-align: right; min-width: 0; }
.demo-info-label { font-size: 11px; color: #8497ba; }
.demo-info-value { font-size: 14px; font-weight: 800; color: #fff; margin-top: 3px; }
.demo-info-sub { font-size: 10.5px; color: #7f93b8; margin-top: 2px; }

.demo-services-label { font-size: 13px; font-weight: 700; color: #c8d4ec; margin-bottom: 16px; text-align: right; display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.demo-timeline { display: flex; align-items: flex-start; }
.demo-node { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; padding: 0 2px; }
.demo-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: rgba(52,211,153,0.16); color: #34d399; border: 2px solid #34d399; z-index: 2;
}
.demo-node.pending .demo-dot { background: rgba(255,255,255,0.06); color: #7f93b8; border-color: rgba(255,255,255,0.22); }
.demo-node:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 31px;
    right: -73px;
    width: 100%;
    height: 2px;
    background: #34d399;
    z-index: 1;
}
.demo-node.pending::before { background: rgba(255,255,255,0.16); }
.demo-node-title { font-size: 11.5px; font-weight: 700; color: #e7eefb; margin-top: 9px; }
.demo-node-sub { font-size: 10px; color: #8497ba; margin-top: 3px; line-height: 1.6; }

.demo-report {
  margin-top: 16px; width: 100%;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 13px; color: #cdd8ee; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  transition: background 0.15s;
}
.demo-report:hover { background: rgba(255,255,255,0.09); }

/* ── bottom stats ── */
.lx-stats {
  display: flex; align-items: stretch; justify-content: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1240px; width: 100%; margin: 8px auto 0;
  padding: 22px 0 26px;
}
.lx-stat { flex: 1; display: flex; align-items: center; justify-content: center; gap: 13px; }
.lx-stat + .lx-stat { border-right: 1px solid rgba(255,255,255,0.08); }
.lx-stat-ico { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: #2bd4c0; font-size: 19px; flex-shrink: 0; }
.lx-stat-num { font-size: 22px; font-weight: 800; color: #2bd4c0; }
.lx-stat-label { font-size: 11.5px; color: #8497ba; margin-top: 2px; }

/* ── responsive ── */
@media (max-width: 1024px) {
  .lx-main { grid-template-columns: 1fr 1.05fr; gap: 34px; }
}
@media (max-width: 900px) {
  .lx-main { grid-template-columns: 1fr; gap: 34px; }
  .lx-right { order: 2; }
  .lx-left { order: 1; }
  .lx-form, .lx-lead { max-width: none; }
  .demo-card { max-width: 560px; margin: 0 auto; }
}
@media (max-width: 620px) {
  .lx { padding: 18px 16px 0; }
  .lx-top { margin-bottom: 22px; }
  .lx-pill { display: none; }
  .lx-trust { gap: 12px; }
  .lx-trust-item { width: 100%; }
  .demo-head { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .demo-car { width: 58%; margin: 0 auto; }
  .demo-brand { justify-content: flex-end; }
  .demo-cards { grid-template-columns: 1fr; }
  .dw-remain-num { font-size: 19px; }
  .demo-node-title { font-size: 10.5px; }
  .demo-node-sub { font-size: 9px; }
  .lx-stats { flex-direction: column; padding: 0; margin-top: 16px; }
  .lx-stat { width: 100%; padding: 16px; justify-content: flex-start; }
  .lx-stat + .lx-stat { border-right: none; border-top: 1px solid rgba(255,255,255,0.08); }
}

/* ═══════════════════════════════════════════════
   DARK THEME — app-wide (Portal + Admin)
   هماهنگ با صفحهٔ ورود (Home/Index)
   ═══════════════════════════════════════════════ */
:root {
  --text-main: #e7eefb;
  --text-muted: #8aa0c4;
  --border: rgba(255,255,255,0.1);
  --d-surface: rgba(255,255,255,0.05);
  --d-surface-2: rgba(255,255,255,0.035);
  --d-hairline: rgba(255,255,255,0.09);
  --d-teal: #2bd4c0;
}

body {
  background:
    radial-gradient(1100px 640px at 30% 0%, #173a6e 0%, rgba(12,28,64,0) 55%),
    linear-gradient(160deg, #0f2552 0%, #0a1838 55%, #070f24 100%);
  background-attachment: fixed;
  color: var(--text-main);
}

/* ── top nav ── */
.topnav {
  background: rgba(12,26,58,0.72);
  border-bottom-color: var(--d-hairline);
}
.topnav-title { color: #f1f5f9; }
.topnav-menu { background: rgba(255,255,255,0.08); color: #e7eefb; }
.topnav-menu:hover { background: rgba(255,255,255,0.15); }

/* ── generic surfaces ── */
.desc-card,
.info-card,
.g-card,
.tip-list,
.detail-item,
.warranty-hero,
.notif-item,
.request-form,
.service-card {
  background: var(--d-surface);
  border-color: var(--d-hairline);
  box-shadow: 0 12px 30px rgba(3,10,30,0.35);
}

a.info-card:hover,
.g-card:hover { box-shadow: 0 18px 40px rgba(3,10,30,0.5); }

/* ── icon tints ── */
.info-card-icon { background: rgba(47,111,224,0.16); color: #7cb0ff; }
.g-card.theme-teal .g-card-icon-wrap { background: rgba(43,212,192,0.16); }
.g-card.theme-purple .g-card-icon-wrap { background: rgba(124,58,237,0.2); }
.g-card.theme-orange .g-card-icon-wrap { background: rgba(249,115,22,0.18); }

/* ── titles / accents on dark ── */
.section-label,
.desc-card-title,
.g-card-title,
.info-card-value,
.tip-list-title,
.warranty-hero-title { color: #f1f5f9; }

.section-label i,
.tip-list-title i,
.desc-card-header i,
.tip-item i { color: var(--d-teal) !important; }

.back-link,
.chevron-link { color: var(--d-teal); }
.back-link:hover,
.chevron-link:hover { color: #5fe6d6; }

.warning-text span { color: var(--d-teal); }

/* ── mileage hero (separate from bg) ── */
.mileage-hero { border: 1px solid var(--d-hairline); }

/* ── tables ── */
.history-table th { background: rgba(255,255,255,0.04); color: var(--text-muted); border-bottom-color: var(--d-hairline); }
.history-table td { border-bottom-color: var(--d-hairline); }
.tip-item { border-bottom-color: var(--d-hairline); }
.service-list-item { border-bottom-color: var(--d-hairline); }
.service-detail-link { border-top-color: var(--d-hairline); color: var(--d-teal); }

/* ── notifications ── */
.notif-item.unread { background: rgba(43,212,192,0.07); border-right-color: var(--d-teal); }

/* ── request form inputs ── */
.request-form .form-input,
.request-form select,
.request-form textarea {
  background: var(--d-surface);
  border-color: var(--d-hairline);
  color: var(--text-main);
}

/* ── footer ── */
.bottom-footer { border-top-color: var(--d-hairline); }

/* ═══ DARK — Admin tip form (Create/Edit) ═══ */
.form-section,
.preview-card {
  background: var(--d-surface);
  border-color: var(--d-hairline);
  box-shadow: 0 12px 30px rgba(3,10,30,0.35);
}
.form-section-title { color: #f1f5f9; }
.form-section-sub,
.field-hint { color: var(--text-muted); }
.field-label { color: #c8d4ec; }
.field-label .opt { background: rgba(255,255,255,0.08); color: #93a6c8; }

.field-input,
.field-textarea {
  background: var(--d-surface);
  border-color: var(--d-hairline);
  color: var(--text-main);
}
.field-input::placeholder,
.field-textarea::placeholder { color: #6f83a8; }
.field-input:focus,
.field-textarea:focus { border-color: var(--d-teal); box-shadow: 0 0 0 4px rgba(43,212,192,0.16); background: rgba(255,255,255,0.07); }
.input-wrap .unit { color: #7f93b8; }

/* choice cards */
.choice {
  background: var(--d-surface-2);
  border-color: var(--d-hairline);
}
.choice:hover { border-color: rgba(255,255,255,0.22); }
.choice-ico { background: rgba(255,255,255,0.08); color: #aab8d4; }
.choice-text { color: #c8d4ec; }
.choice:has(input:checked) { background: rgba(43,212,192,0.12); border-color: var(--d-teal); }
.choice:has(input:checked) .choice-text { color: #fff; }
.choice.sev-info:has(input:checked) { background: rgba(14,165,233,0.14); border-color: #38bdf8; }
.choice.sev-warning:has(input:checked) { background: rgba(249,115,22,0.14); border-color: #fb923c; }
.choice.sev-critical:has(input:checked) { background: rgba(220,38,38,0.14); border-color: #f87171; }

/* switch row */
.switch-row { background: var(--d-surface-2); border-color: var(--d-hairline); }
.switch-texts .switch-title { color: #f1f5f9; }
.switch-texts .switch-sub { color: var(--text-muted); }
.switch .slider { background: rgba(255,255,255,0.2); }

/* preview */
.preview-head { color: var(--text-muted); border-bottom-color: var(--d-hairline); }
.pv-chip { background: rgba(255,255,255,0.08); color: #c8d4ec; }

/* sticky action bar */
.form-actions {
  background: rgba(12,26,58,0.85);
  border-color: var(--d-hairline);
  box-shadow: 0 -6px 24px rgba(3,10,30,0.4);
}
.btn-cancel { background: rgba(255,255,255,0.08); color: #c8d4ec; }
.btn-cancel:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ═══════════════════════════════════════════════
   PORTAL LOGIN — OTP STEP
   ═══════════════════════════════════════════════ */
.lx-otp-hint {
  margin-bottom: 14px;
  color: var(--text-muted, #8aa0c4);
  font-size: 0.92rem;
  line-height: 1.8;
}

.lx-otp-phone {
  color: var(--accent-teal, #2bd4c0);
  font-weight: 800;
  direction: ltr;
  display: inline-block;
}

.lx-otp-container {
  direction: ltr;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 16px;
}

.lx-otp-input {
  width: 52px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  text-align: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  font-family: 'Vazirmatn', sans-serif;
}

.lx-otp-input:focus {
  border-color: var(--accent-teal, #2bd4c0);
  box-shadow: 0 0 0 4px rgba(43,212,192,0.18);
  transform: translateY(-1px);
}

.lx-otp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.lx-text-btn {
  border: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--accent-teal, #2bd4c0);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  font-family: 'Vazirmatn', sans-serif;
  transition: background .15s;
}

.lx-text-btn:hover { background: rgba(255,255,255,0.1); }
.lx-text-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.lx-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
  color: #64748b;
  font-weight: 700;
  font-size: 0.85rem;
}

.lx-divider::before,
.lx-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.lx-divider::before { right: 0; }
.lx-divider::after { left: 0; }

.lx-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7,15,36,0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lx-loading-overlay.open { display: flex; }

.lx-loading-box {
  width: 100%;
  max-width: 300px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
}

.lx-loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid rgba(43,212,192,0.2);
  border-top-color: var(--accent-teal, #2bd4c0);
  animation: lxSpin 0.9s linear infinite;
}

.lx-loading-text {
  margin: 0;
  color: #e7eefb;
  font-size: 0.95rem;
  font-weight: 700;
}

.lx-dev-code {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.3);
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  direction: ltr;
}

@keyframes lxSpin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .lx-otp-input { width: 44px; height: 50px; font-size: 1.1rem; }
  .lx-otp-container { gap: 7px; }
}
