/* ===== KUARON · Personal Space (1:1 с референса personal-space-revamp) ===== */

:root {
  /* Deep navy palette */
  --bg: #0a1628;
  --bg-2: #0f1c30;
  --bg-3: #142540;
  --surface: #0f1c30;
  --surface-2: #142540;
  --surface-3: #1a2d4d;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);

  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --ink-muted: #94a3b8;
  --ink-dim: #64748b;

  /* Brand accents */
  --primary: #3b82f6;          /* голубой */
  --primary-2: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --lime: #d4ff3f;             /* лайм только акцент */
  --lime-soft: rgba(212, 255, 63, 0.14);
  --amber: #fbbf24;
  --emerald: #10b981;
  --green: #22c55e;
  --rose: #f43f5e;

  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 28px -16px rgba(0,0,0,0.6);
  --shadow-pop: 0 18px 40px -18px rgba(0,0,0,0.7);

  --sidebar-w: 256px;
  --header-h: 88px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 100% 100%, rgba(34, 197, 94, 0.06), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(59, 130, 246, 0.05), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: #60a5fa; text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ============ Layout ============ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ============ Sidebar ============ */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 22px 14px 14px;
  display: flex;
  flex-direction: column;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 28px;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(59,130,246,0.7);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; color: var(--ink); }
.brand-sub { font-size: 10px; color: var(--ink-dim); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }

.sidebar-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  padding: 8px 12px 10px;
  font-weight: 600;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  color: var(--ink-soft);
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 2px;
  transition: all 0.18s ease;
}
.nav-item:hover {
  background: rgba(148, 163, 184, 0.06);
  color: var(--ink);
  text-decoration: none;
}
.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(59, 130, 246, 0.7);
}
.nav-item.active .nav-icon { color: #fff; }
.nav-item.active::after {
  content: "";
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(212,255,63,0.8);
}
.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--ink-muted);
  transition: color 0.2s;
}
.nav-item:hover .nav-icon { color: var(--ink); }

.sidebar-spacer { flex: 1; }

/* User pill at bottom */
.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 10px;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--lime), #b8e02e);
  color: #0a1628;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta { font-size: 11px; color: var(--ink-dim); }

/* ============ Main column ============ */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}
.topbar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.topbar-titles { display: flex; flex-direction: column; gap: 4px; }
.topbar-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.topbar-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}
.topbar-right { display: flex; align-items: center; gap: 12px; position: relative; }
.bell-btn { position: relative; }
.bell-btn::after {
  content: "";
  position: absolute;
  top: 8px; right: 9px;
  width: 7px; height: 7px;
  background: var(--lime);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.profile-wrap { position: relative; }
.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow-pop);
  display: none;
  flex-direction: column;
  z-index: 20;
}
.profile-menu.show { display: flex; }
.profile-menu-item {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  border: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.profile-menu-item:hover { background: var(--surface-2); text-decoration: none; }
.profile-menu-item-logout { color: var(--rose); }
.profile-menu-divider { height: 1px; background: var(--border); margin: 4px 2px; }
.profile-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.profile-btn-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ============ Page content ============ */
.page-content {
  padding: 28px 32px 56px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.tab-pane[hidden] { display: none !important; }

/* ============ Cards ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}
.card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin: 0 0 16px;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.015em;
}

/* ============ DASHBOARD ============ */
.hero-card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.08), rgba(15,28,48,0.9)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 14px);
  pointer-events: none;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}
.hero-status[data-state="active"] { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.35); color: var(--green); }
.hero-status[data-state="active"]::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero-status[data-state="ended"] { background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.35); color: var(--rose); }
.hero-status[data-state="ended"]::before { background: var(--rose); }
.hero-title {
  font-size: 44px;
  font-weight: 700;
  margin: 16px 0 10px;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.hero-title .accent { color: var(--primary); }
.hero-meta { color: var(--ink-muted); font-size: 15px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-bike {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(59,130,246,0.4), rgba(10,22,40,0.95)),
    var(--bg);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bike img { max-width: 90%; max-height: 90%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,0.5)); }

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  min-height: 138px;
}
.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--kpi-glow, transparent);
  opacity: 0.6;
  pointer-events: none;
}
.kpi-card > * { position: relative; }
.kpi-card.kpi-blue   { --kpi-glow: radial-gradient(120% 100% at 100% 0%, rgba(59,130,246,0.18), transparent 60%); }
.kpi-card.kpi-amber  { --kpi-glow: radial-gradient(120% 100% at 100% 0%, rgba(251,191,36,0.18), transparent 60%); }
.kpi-card.kpi-lime   { --kpi-glow: radial-gradient(120% 100% at 100% 0%, rgba(212,255,63,0.18), transparent 60%); }
.kpi-card.kpi-green  { --kpi-glow: radial-gradient(120% 100% at 100% 0%, rgba(34,197,94,0.18), transparent 60%); }

.kpi-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.kpi-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-muted); }
.kpi-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-blue  .kpi-icon { background: rgba(59,130,246,0.18); color: var(--primary); }
.kpi-amber .kpi-icon { background: rgba(251,191,36,0.2);  color: var(--amber); }
.kpi-lime  .kpi-icon { background: rgba(212,255,63,0.2);  color: var(--lime); }
.kpi-green .kpi-icon { background: rgba(34,197,94,0.2);   color: var(--green); }

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 6px;
  color: var(--ink);
}
.kpi-blue  .kpi-value { color: var(--primary); }
.kpi-amber .kpi-value { color: var(--amber); }
.kpi-lime  .kpi-value { color: var(--lime); }
.kpi-green .kpi-value { color: var(--green); }
.kpi-sub { font-size: 12px; color: var(--ink-muted); }

/* Promo grid */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.promo-card {
  position: relative;
  border-radius: var(--r-xl);
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.promo-card.promo-lime {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(212,255,63,0.12), transparent 60%),
    var(--surface);
}
.promo-card.promo-blue {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(59,130,246,0.12), transparent 60%),
    var(--surface);
}
.promo-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.promo-kicker { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-muted); }
.promo-icon-pill {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.promo-icon-pill svg { width: 22px; height: 22px; }
.promo-lime .promo-icon-pill { background: var(--lime); color: #0a1628; }
.promo-blue .promo-icon-pill { background: var(--primary); color: #fff; }
.promo-title { font-size: 22px; font-weight: 700; margin: 6px 0 8px; letter-spacing: -0.015em; }
.promo-desc { color: var(--ink-muted); font-size: 14px; margin: 0 0 18px; }
.promo-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  background: none; border: none; padding: 0;
}
.promo-lime .promo-link { color: var(--lime); }
.promo-blue .promo-link { color: var(--primary); }
.promo-link:hover { text-decoration: underline; }
.promo-link svg { width: 14px; height: 14px; }

/* ============ RENTAL PAGE ============ */
.rental-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 18px;
  align-items: start;
}
.bike-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.bike-image-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(59,130,246,0.4), rgba(10,22,40,0.95)),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bike-image-wrap img { max-width: 86%; max-height: 86%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,0.45)); }
.bike-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 8px 4px;
}
.bike-foot-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-muted); }
.bike-foot-value { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.bike-status-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.note-info {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.22);
  color: var(--ink-soft);
  font-size: 13px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.note-info svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); margin-top: 2px; }

.extend-side .card { padding: 24px; margin-bottom: 14px; }

/* Days picker */
.days-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.days-btn {
  padding: 16px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
}
.days-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.days-btn-label { font-size: 11px; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 4px; }
.days-btn-price { font-size: 18px; font-weight: 700; color: var(--ink); }
.days-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: var(--primary);
  box-shadow: 0 10px 24px -10px rgba(59,130,246,0.6);
}
.days-btn.active .days-btn-label,
.days-btn.active .days-btn-price { color: #fff; }

/* Price breakdown */
.price-breakdown { padding: 4px 0 8px; }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px dashed var(--border);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { color: var(--ink-muted); font-size: 14px; }
.breakdown-value { color: var(--ink); font-size: 15px; font-weight: 600; }

.breakdown-toggle-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
  margin: 6px 0;
}
.breakdown-toggle-row .breakdown-label { color: var(--ink); font-weight: 500; }
.bonus-toggle-sub { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
.bonus-toggle-text { display: flex; flex-direction: column; }

.bonus-switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.bonus-checkbox { opacity: 0; width: 0; height: 0; position: absolute; }
.bonus-switch-track {
  position: absolute; inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.25s;
}
.bonus-switch-track::before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  border-radius: 50%;
  background: var(--ink-muted);
  transition: transform 0.25s, background 0.25s;
}
.bonus-checkbox:checked + .bonus-switch-track { background: var(--primary); border-color: var(--primary); }
.bonus-checkbox:checked + .bonus-switch-track::before { transform: translateX(18px); background: #fff; }
.bonus-empty-note { padding: 13px 0; color: var(--ink-dim); font-size: 13px; }

.quote-note { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 13px; }
.quote-note-warn { background: rgba(244,63,94,0.08); border: 1px solid rgba(244,63,94,0.3); color: #fda4af; }
.quote-note-soft { background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-muted); }
.quote-note-title { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }
.quote-note-text { margin: 0 0 8px; }
.quote-note-amount { margin-top: 6px; color: var(--ink); }
.quote-note-contact { margin-top: 10px; display: inline-flex; }

/* Total */
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.18), rgba(59,130,246,0.04)),
    var(--surface-2);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--r-lg);
  margin: 10px 0 18px;
}
.total-label { color: var(--ink); font-size: 14px; font-weight: 500; }
.total-value { font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }

/* Buttons */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  padding: 13px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(59,130,246,0.55);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #60a5fa, var(--primary)); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); border-color: var(--border-strong); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface); }

.consent-row {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 4px 0 16px;
  font-size: 13px; color: var(--ink-muted);
}
.consent-row a { color: var(--primary); }
.consent-checkbox { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }

.message { margin-top: 12px; font-size: 14px; min-height: 20px; color: var(--ink-muted); }
.message.error { color: var(--rose); }
.message.success { color: var(--green); }
.message-global {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 14px; margin-top: 14px;
}
.message-global:empty { display: none; }
.rent-loading-note { margin-top: 14px; color: var(--ink-muted); font-size: 13px; }

/* ============ BONUSES PAGE ============ */
.bonus-hero {
  position: relative;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(34,197,94,0.18), transparent 60%),
    radial-gradient(60% 100% at 0% 0%, rgba(212,255,63,0.10), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px;
  margin-bottom: 18px;
  overflow: hidden;
}
.bonus-hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.bonus-hero-kicker svg { width: 14px; height: 14px; }
.bonus-hero-title {
  font-size: 36px; font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.02em; line-height: 1.1;
  max-width: 720px;
}
.bonus-hero-title .accent { color: var(--lime); }
.bonus-hero-desc { color: var(--ink-muted); font-size: 15px; margin: 0; max-width: 640px; }

.bonuses-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 14px;
  align-items: start;
}
.referral-share-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
}
.referral-code-label {
  display: block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.referral-code-box {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  background: var(--surface-2);
  border: 2px dashed rgba(59,130,246,0.3);
  border-radius: var(--r-lg);
  margin-bottom: 18px;
}
.referral-code-value {
  font-family: "JetBrains Mono", "SF Mono", monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.referral-share-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.referral-share-actions .btn { flex: 1; min-width: 160px; }
.referral-copy-status { display: block; margin-top: -10px; margin-bottom: 16px; font-size: 13px; color: var(--green); min-height: 18px; }
.referral-link-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.howto-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.01em; }
.howto-steps { display: flex; flex-direction: column; gap: 10px; }
.howto-step {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.howto-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.howto-step-title { font-weight: 600; color: var(--ink); margin: 0 0 2px; font-size: 14px; }
.howto-step-text { margin: 0; font-size: 13px; color: var(--ink-muted); }

.bonus-side { display: flex; flex-direction: column; gap: 14px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.stat-card.stat-lime {
  background: radial-gradient(120% 100% at 100% 0%, rgba(212,255,63,0.14), transparent 60%), var(--surface);
}
.stat-card.stat-blue {
  background: radial-gradient(120% 100% at 100% 0%, rgba(59,130,246,0.14), transparent 60%), var(--surface);
}
.stat-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-muted); }
.stat-pill {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.stat-pill svg { width: 18px; height: 18px; }
.stat-lime .stat-pill { background: var(--lime); color: #0a1628; }
.stat-blue .stat-pill { background: var(--primary); color: #fff; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1.05; }
.stat-lime .stat-value { color: var(--lime); }
.stat-sub { margin-top: 6px; color: var(--ink-muted); font-size: 12px; }

/* ============ HISTORY PAGE ============ */
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 80px 32px;
  text-align: center;
}
.empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: rgba(59,130,246,0.14);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.empty-icon svg { width: 30px; height: 30px; }
.empty-title { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.empty-text { color: var(--ink-muted); font-size: 14px; margin: 0; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 600; color: var(--ink-muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* ============ PROFILE PAGE ============ */
.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}
.profile-card-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  text-align: center;
}
.profile-avatar-big {
  width: 120px; height: 120px;
  border-radius: 28px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 700;
  position: relative;
}
.profile-avatar-big::after {
  content: "";
  position: absolute;
  bottom: 8px; right: 8px;
  width: 18px; height: 18px;
  background: var(--green);
  border-radius: 50%;
  border: 3px solid var(--surface);
}
.profile-name { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.profile-since { color: var(--ink-muted); font-size: 13px; margin: 0 0 24px; }
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.profile-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}
.profile-stat-value { font-size: 22px; font-weight: 700; color: var(--lime); letter-spacing: -0.01em; }
.profile-stat-label { font-size: 11px; color: var(--ink-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.profile-stat.profile-stat-blue .profile-stat-value { color: var(--primary); }
.btn-logout-wide {
  width: 100%;
  background: rgba(244,63,94,0.08);
  color: var(--rose);
  border: 1px solid rgba(244,63,94,0.25);
  padding: 14px;
  border-radius: var(--r-md);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.18s;
}
.btn-logout-wide:hover { background: rgba(244,63,94,0.15); }
.btn-logout-wide svg { width: 16px; height: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { grid-column: 1 / -1; }
.form-label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.field, .form-field input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 13px 15px;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 14px;
  transition: all 0.18s;
  width: 100%;
}
.field::placeholder, .form-field input::placeholder { color: var(--ink-dim); }
.field:focus, .form-field input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}

.docs-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.docs-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--ink);
  text-decoration: none;
  transition: all 0.18s;
}
.docs-link:hover { background: var(--surface-3); text-decoration: none; }
.docs-link svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }

/* ============ AUTH PAGES ============ */
.auth-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 600px at 100% 100%, rgba(34,197,94,0.06), transparent 60%),
    radial-gradient(700px 500px at 0% 0%, rgba(59,130,246,0.07), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 34px;
  box-shadow: var(--shadow-card);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-eyebrow {
  font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--primary); font-weight: 700;
  margin-bottom: 10px;
}
.auth-title { font-size: 28px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.02em; }
.auth-subtitle { color: var(--ink-muted); margin: 0 0 24px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.auth-form .btn-primary { padding: 14px; font-size: 15px; }
.auth-footer-row {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: var(--ink-muted); margin-bottom: 14px;
}
.auth-note {
  font-size: 12px; color: var(--ink-dim);
  text-align: center; padding-top: 14px; border-top: 1px solid var(--border);
}
.auth-note a { color: var(--ink-muted); }

/* ====== Auth — extras for register / forgot-password / verify-phone / payment-result ====== */
.auth-hint {
  background: var(--lime-soft);
  color: var(--lime);
  border: 1px solid rgba(212, 255, 63, 0.3);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 16px;
}
.auth-step { display: none; }
.auth-step.is-active { display: block; }
.field-code {
  text-align: center;
  letter-spacing: 0.6em;
  font-size: 22px;
  font-weight: 700;
  font-feature-settings: "tnum";
}
.result-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin: 0 auto 18px;
}
.result-icon svg { width: 38px; height: 38px; }
.result-details {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 18px;
}

/* ====== Settings page ====== */
.settings-wrap {
  min-height: 100vh;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 22px 80px;
}
.settings-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 32px;
}
.settings-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-soft); font-weight: 500; font-size: 14px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .15s;
}
.settings-back:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.settings-back svg { width: 16px; height: 16px; }
.settings-brand { display: flex; align-items: center; gap: 10px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.settings-form { display: flex; flex-direction: column; gap: 12px; }
.settings-form .form-label { font-size: 13px; color: var(--ink-muted); margin: 4px 0 -4px; }
.settings-form .btn-primary { margin-top: 6px; }

.card-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 18px;
}
.card-sub { color: var(--ink-muted); font-size: 13px; margin: 4px 0 0; }
.card-icon-pill {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.card-icon-pill svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-topbar { flex-wrap: wrap; }
}

/* ============ Mobile sidebar ============ */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 90; }
.sidebar-backdrop.show { display: block; }

@media (max-width: 1100px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-bike { aspect-ratio: 16/9; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .rental-grid { grid-template-columns: 1fr; }
  .bonuses-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0;
    width: 280px; height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 100;
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 16px 18px; min-height: 72px; }
  .topbar-title { font-size: 18px; }
  .page-content { padding: 20px 16px 40px; }
  .card, .hero-card, .bonus-hero, .empty-state { padding: 22px; }
  .hero-title { font-size: 30px; }
  .bonus-hero-title { font-size: 24px; }
  .total-value { font-size: 22px; }
  .auth-card { padding: 32px 24px; }
}
