/*
  GoldenShuttle cabinet shared styles.
  One source of truth for cabinet tokens, reset, layout shell, cards, alerts,
  buttons, badges, common page headings and header typography.
*/
:root {
  --bg: #f7f5f1;
  --surface: rgba(255,255,255,.88);
  --surface-strong: #ffffff;
  --line: #e8dfcf;
  --line-soft: #efe7da;
  --text: #172033;
  --muted: #6d7891;
  --navy: #15233f;
  --navy-2: #203153;
  --gold: #c9a44a;
  --gold-2: #e8cb76;
  --gold-soft: #fbf4df;
  --success: #167a4a;
  --success-soft: #e7f6ee;
  --warn: #a76612;
  --warn-soft: #fff3dc;
  --danger: #be4334;
  --danger-soft: #fdecea;
  --blue: #3b6ebf;
  --shadow-sm: 0 6px 18px rgba(21, 35, 63, .06);
  --shadow: 0 18px 50px rgba(21, 35, 63, .10);
  --radius-s: 12px;
  --radius: 20px;
  --radius-l: 28px;
  --max: 1120px;
  --cabinet-gap: 18px;

  --cabinet-font-body: var(--gs-font-body, 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --cabinet-font-heading: var(--gs-font-heading, 'Unbounded', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --cabinet-fs-xs: var(--gs-fs-xs, 11px);
  --cabinet-fs-sm: var(--gs-fs-sm, 12px);
  --cabinet-fs-body: var(--gs-fs-md, 14px);
  --cabinet-fs-title: var(--gs-fs-lg, 18px);
  --cabinet-fs-hero: var(--gs-fs-xl, 24px);
  --cabinet-fw-regular: 400;
  --cabinet-fw-medium: 500;
  --cabinet-fw-semibold: 600;
  --cabinet-fw-bold: 700;
  --cabinet-line-tight: var(--gs-line-tight, 1.12);
  --cabinet-line-title: var(--gs-line-title, 1.22);
  --cabinet-line-body: var(--gs-line-body, 1.6);
  --cabinet-letter-title: var(--gs-letter-title, -0.035em);
  --cabinet-letter-meta: var(--gs-letter-meta, 0.06em);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(231, 207, 142, .18), transparent 24%),
    linear-gradient(180deg, #f8f3e8 0%, #f5f0e6 20%, #f7f5f1 100%);
  font-family: var(--cabinet-font-body);
  font-size: var(--cabinet-fs-body);
  line-height: var(--cabinet-line-body);
  font-weight: var(--cabinet-fw-regular);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; font-family: var(--cabinet-font-body); }

.shell {
  width: 100%;
  max-width: var(--max);
  min-width: 0;
  margin: 0 auto;
  padding: 24px var(--cabinet-gap) 56px;
}
.shell--flush-top { padding-top: 0; }
.shell--narrow { max-width: 980px; }
.shell > * { max-width: 100%; min-width: 0; }

.hero,
.panel,
.card,
.stat,
.glass {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: var(--shadow);
  border-radius: var(--radius-l);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero { padding: 28px; margin-bottom: var(--cabinet-gap); }
.panel { padding: 24px; }
.card { padding: 20px; background: var(--surface-strong); }
.stat { padding: 22px; }
.shell > .panel + .panel { margin-top: var(--cabinet-gap); }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.topbar,
.topbar button,
.topbar input,
.topbar a { font-family: var(--cabinet-font-body); }
.topbar .brand-title {
  font-family: var(--cabinet-font-heading);
  font-size: var(--cabinet-fs-body);
  font-weight: var(--cabinet-fw-bold);
  line-height: var(--cabinet-line-tight);
  letter-spacing: var(--cabinet-letter-title);
  color: var(--navy);
}
.topbar .brand-sub {
  font-size: var(--cabinet-fs-xs);
  font-weight: var(--cabinet-fw-semibold);
  line-height: 1.35;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.topbar .profile-email-short {
  font-size: var(--cabinet-fs-body);
  font-weight: var(--cabinet-fw-semibold);
  line-height: 1.35;
}
.topbar .profile-menu-item,
.topbar .btn {
  font-size: var(--cabinet-fs-body);
  font-weight: var(--cabinet-fw-bold);
  line-height: 1.35;
}
.topbar .profile-avatar {
  font-family: var(--cabinet-font-heading);
  font-size: var(--cabinet-fs-sm);
  font-weight: var(--cabinet-fw-bold);
}

.hero-title,
.title,
.panel-title,
.section-title,
.tg-connect-title,
.rf-title,
.status-big,
.stat-value,
.rv-sum-price,
.rv-tl-date {
  font-family: var(--cabinet-font-heading);
  letter-spacing: var(--cabinet-letter-title);
  color: var(--navy);
}
.hero-title,
.title {
  margin: 14px 0 8px;
  font-size: var(--cabinet-fs-hero);
  font-weight: var(--cabinet-fw-bold);
  line-height: var(--cabinet-line-tight);
}
.panel-title,
.section-title,
.tg-connect-title,
.rf-title {
  margin: 0 0 6px;
  font-size: var(--cabinet-fs-title);
  font-weight: var(--cabinet-fw-bold);
  line-height: var(--cabinet-line-title);
}
.sub,
.panel-sub,
.section-sub,
.hero-sub,
.tg-connect-text,
.hall,
.hint,
.empty,
.note,
.rf-subtitle,
.status-hint {
  font-family: var(--cabinet-font-body);
  font-size: var(--cabinet-fs-body);
  font-weight: var(--cabinet-fw-regular);
  line-height: var(--cabinet-line-body);
  color: var(--muted);
}
.sub,
.hero-sub { max-width: 60ch; }
.panel-sub,
.section-sub { margin: 0; }

.eyebrow,
.mini-label,
.channel-head,
.rv-day-wd,
.rv-tl-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--cabinet-fs-xs);
  font-weight: var(--cabinet-fw-bold);
  line-height: 1.35;
  letter-spacing: var(--cabinet-letter-meta);
  text-transform: uppercase;
}
.eyebrow {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #8a6716;
}
.badge,
.field label,
.rf-row-label {
  font-size: var(--cabinet-fs-sm);
  font-weight: var(--cabinet-fw-semibold);
  line-height: 1.4;
}
.name,
.dt,
.price,
.rv-day-n,
.rv-sl-time,
.rf-row-value,
.status-title,
.step-title,
.mode-title,
.rental-feature-title,
.setting-title,
.calendar-reset-title,
.link-title {
  font-family: var(--cabinet-font-body);
  font-size: var(--cabinet-fs-body);
  font-weight: var(--cabinet-fw-bold);
  line-height: var(--cabinet-line-title);
  letter-spacing: 0;
}
.price,
.status-big { font-size: var(--cabinet-fs-title); }
.old,
.mode-sub,
.rental-feature-sub,
.rv-sum-slots,
.rv-sum-warn,
.rv-sl-dur,
.rv-sr-price,
.calendar-reset-text,
.setting-help-pop,
.mb-cal-hint-text,
.link-text,
.link-meta,
.info-box,
.autosave-status {
  font-size: var(--cabinet-fs-sm);
  font-weight: var(--cabinet-fw-regular);
  line-height: 1.5;
}

.field { display: grid; gap: 8px; margin-bottom: 14px; }
.field label { color: #56627d; }
.field input,
.field select,
.input,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.field input:focus,
.field select:focus,
.input:focus,
input:focus,
select:focus {
  border-color: #d7be86;
  box-shadow: 0 0 0 4px rgba(201,164,74,.12);
}
input::placeholder { color: #9aa3b6; }

.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn,
.more {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--cabinet-font-body);
  font-size: var(--cabinet-fs-body);
  font-weight: var(--cabinet-fw-bold);
  line-height: 1.35;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover,
.more:hover { transform: translateY(-1px); }
.btn:disabled,
.more:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary,
.more {
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(21,35,63,.18);
}
.btn-gold {
  background: linear-gradient(145deg, var(--gold), var(--gold-2));
  color: #fff;
  box-shadow: 0 12px 24px rgba(201,164,74,.24);
}
.btn-outline,
.btn-secondary,
.btn.secondary {
  background: rgba(255,255,255,.86);
  border-color: var(--line);
  color: var(--navy);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding: 0 10px;
  min-height: 38px;
}
.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: #efc0b9;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: var(--cabinet-fs-sm); }
.btn-full { width: 100%; }
.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  position: absolute;
  right: 12px;
  top: calc(50% - 7px);
  animation: gs-spin .7s linear infinite;
}
@keyframes gs-spin { to { transform: rotate(360deg); } }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
  background: #eef2f7;
  color: #39465f;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.badge-success,
.badge.success { color: var(--success); background: var(--success-soft); }
.badge-warn { color: var(--warn); background: var(--warn-soft); }
.badge-danger,
.badge.danger { color: var(--danger); background: var(--danger-soft); }
.badge-gold { color: #866411; background: var(--gold-soft); }

.msg,
.err,
.note {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-family: var(--cabinet-font-body);
  font-size: var(--cabinet-fs-body);
  font-weight: var(--cabinet-fw-regular);
  line-height: 1.5;
}
.msg.ok,
.msg-ok { background: var(--success-soft); color: var(--success); border-color: #bfe2cd; }
.msg.err,
.msg-error,
.err { background: var(--danger-soft); color: #9d3b2f; border-color: #f3c8c1; }
.note { color: #8a6716; background: var(--gold-soft); border-color: #efdfb5; }
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.muted { color: var(--muted); }

.gs-modal-title {
  font-family: var(--cabinet-font-heading);
  font-size: var(--cabinet-fs-title);
  font-weight: var(--cabinet-fw-bold);
  line-height: var(--cabinet-line-title);
  letter-spacing: var(--cabinet-letter-title);
  margin-bottom: 10px;
}
.gs-modal-text {
  font-family: var(--cabinet-font-body);
  font-size: var(--cabinet-fs-body);
  line-height: var(--cabinet-line-body);
  color: var(--muted);
  margin-bottom: 18px;
}

@media (max-width: 720px) {
  :root { --cabinet-gap: 14px; }
  .shell { padding: 18px var(--cabinet-gap) 48px; overflow-x: clip; }
  .hero, .panel, .card, .stat { border-radius: 24px; }
  .hero, .panel { padding: 20px; }
  .hero-title,
  .title,
  .panel-title,
  .section-title,
  .tg-connect-title,
  .rf-title { overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  :root { --cabinet-gap: 12px; }
  .hero, .panel, .card, .stat { padding-left: 14px; padding-right: 14px; }
}
