:root {
  color-scheme: dark;
  --bg: #05070a;
  --bg-soft: #0b1018;
  --panel: rgba(12, 18, 28, 0.86);
  --panel-strong: #111823;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f6f8fb;
  --muted: #a7b0bf;
  --subtle: #758095;
  --cyan: #24d5ff;
  --blue: #377dff;
  --green: #38d996;
  --amber: #ffd166;
  --red: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(36, 213, 255, 0.14), transparent 30rem),
    radial-gradient(circle at 80% 18%, rgba(55, 125, 255, 0.14), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 11rem;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: 1.02rem;
}

.brand small {
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.2rem;
}

.nav-link,
.role-switch select,
.primary-action,
.secondary-action,
.ghost-action {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link {
  min-width: max-content;
  padding: 0.55rem 0.75rem;
  color: var(--muted);
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--text);
  border-color: rgba(36, 213, 255, 0.48);
  background: rgba(36, 213, 255, 0.12);
}

.header-actions {
  display: flex;
  justify-content: end;
}

.role-switch {
  display: grid;
  gap: 0.25rem;
  color: var(--subtle);
  font-size: 0.72rem;
}

.role-switch select {
  padding: 0.45rem 0.7rem;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(78vh, 760px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.96), rgba(5, 7, 10, 0.68) 48%, rgba(5, 7, 10, 0.2)),
    linear-gradient(0deg, rgba(5, 7, 10, 0.76), transparent 42%),
    url("assets/car-rental-hero.jpg") center / cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 4vw, 2rem);
}

.eyebrow,
.page-title p,
.section-heading p {
  margin: 0 0 0.6rem;
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3.4rem, 9vw, 7.8rem);
  line-height: 0.9;
}

.hero p {
  max-width: 560px;
  margin: 1.2rem 0 0;
  color: #d6deea;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.card-actions,
.chat-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-actions {
  margin-top: 1.8rem;
}

.primary-action,
.secondary-action,
.ghost-action {
  min-height: 2.65rem;
  padding: 0.72rem 1rem;
  font-weight: 800;
}

.primary-action {
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #03111b;
  box-shadow: 0 16px 42px rgba(36, 213, 255, 0.24);
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.ghost-action {
  color: var(--muted);
}

.primary-action:disabled,
.secondary-action:disabled,
.ghost-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.full-width {
  width: 100%;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 780px;
  margin: 2rem 0 0;
}

.trust-strip div,
.metric-card,
.step-grid article,
.vehicle-card,
.form-panel,
.detail-panel,
.chat-panel,
.side-list,
.contract-preview,
.filter-panel,
.mini-card,
.admin-card,
.log-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.trust-strip div {
  padding: 0.9rem;
}

.trust-strip dt {
  color: var(--subtle);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.trust-strip dd {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-weight: 750;
}

.section-band,
.page-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
}

.section-band.no-padding {
  padding-top: 0;
  padding-bottom: 0;
}

.section-heading,
.page-title {
  margin-bottom: 1.1rem;
}

.section-heading h2,
.page-title h1,
.form-panel h2,
.contract-preview h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.inline-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.step-grid,
.dashboard-grid,
.admin-grid,
.vehicle-feed,
.compact-feed {
  display: grid;
  gap: 1rem;
}

.step-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-grid article {
  padding: 1.1rem;
}

.step-grid span {
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 900;
}

.step-grid h3,
.vehicle-card h3,
.admin-card h3,
.mini-card h3 {
  margin: 0.55rem 0 0.45rem;
}

.step-grid p,
.wide-copy,
.vehicle-card p,
.admin-card p,
.mini-card p,
.contract-preview p,
.status-line {
  color: var(--muted);
  line-height: 1.55;
}

.split-band {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem;
  align-items: start;
}

.page-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.2rem;
  align-items: start;
}

.page-shell.two-columns {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
}

.page-shell > .page-title {
  grid-column: 1 / -1;
}

.filter-panel,
.form-panel,
.detail-panel,
.chat-panel,
.side-list,
.contract-preview {
  padding: 1rem;
}

.filter-panel,
.form-panel {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.38rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

input[type="range"] {
  padding: 0;
}

.check-line {
  grid-template-columns: 1rem 1fr;
  align-items: center;
}

.check-line input {
  min-height: auto;
}

.vehicle-feed {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.vehicle-card {
  overflow: hidden;
}

.vehicle-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--panel-strong);
}

.vehicle-card-body {
  padding: 1rem;
}

.vehicle-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.price {
  color: var(--cyan);
  font-size: 1.35rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge-row,
.doc-row,
.check-stack,
.status-stack {
  display: grid;
  gap: 0.5rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0.85rem 0;
}

.badge,
.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.ok,
.status-pill.ok {
  border-color: rgba(56, 217, 150, 0.38);
  color: var(--green);
  background: rgba(56, 217, 150, 0.1);
}

.badge.warn,
.status-pill.warn {
  border-color: rgba(255, 209, 102, 0.42);
  color: var(--amber);
  background: rgba(255, 209, 102, 0.1);
}

.badge.danger,
.status-pill.danger {
  border-color: rgba(255, 107, 107, 0.42);
  color: var(--red);
  background: rgba(255, 107, 107, 0.1);
}

.ok-text {
  color: var(--green);
}

.warn-text {
  color: var(--amber);
}

.detail-hero {
  display: grid;
  gap: 0.75rem;
}

.detail-hero img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.spec-grid div,
.doc-row,
.check-item {
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.spec-grid span,
.doc-row span,
.check-item span {
  display: block;
  color: var(--subtle);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.spec-grid strong,
.doc-row strong,
.check-item strong {
  display: block;
  margin-top: 0.2rem;
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.4rem;
}

.metric-card {
  padding: 1rem;
}

.metric-card span {
  color: var(--subtle);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 2rem;
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 1.4rem;
}

.admin-card,
.mini-card {
  padding: 1rem;
}

.mini-card {
  box-shadow: none;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
}

.small-title h1 {
  font-size: 1.4rem;
}

.booking-list-button {
  display: grid;
  width: 100%;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
}

.booking-list-button.is-active {
  border-color: rgba(36, 213, 255, 0.48);
  background: rgba(36, 213, 255, 0.1);
}

.booking-list-button small {
  color: var(--muted);
}

.chat-panel {
  min-height: 620px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 1rem;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.message-list {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.message {
  max-width: min(80%, 560px);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.message.me {
  margin-left: auto;
  border-color: rgba(36, 213, 255, 0.35);
  background: rgba(36, 213, 255, 0.1);
}

.message.system {
  max-width: 100%;
  border-color: rgba(255, 209, 102, 0.28);
  color: #fce9b0;
  background: rgba(255, 209, 102, 0.08);
}

.message small {
  display: block;
  margin-top: 0.35rem;
  color: var(--subtle);
}

.message-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.contract-preview {
  min-height: 620px;
}

.contract-paper {
  padding: 1.1rem;
  border-radius: var(--radius);
  background: #f8fafc;
  color: #0f172a;
}

.contract-paper h2,
.contract-paper h3 {
  color: #020617;
}

.contract-paper p,
.contract-paper li {
  color: #233044;
  line-height: 1.55;
}

.contract-paper .signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.signature-box {
  min-height: 90px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem;
}

.log-list {
  display: grid;
  gap: 0.6rem;
}

.log-item {
  padding: 0.8rem;
  box-shadow: none;
}

.log-item time {
  display: block;
  color: var(--subtle);
  font-size: 0.74rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.4rem clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.site-footer strong,
.site-footer a {
  color: var(--text);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border: 1px solid rgba(36, 213, 255, 0.35);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(7, 12, 20, 0.95);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1020px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .page-shell,
  .page-shell.two-columns,
  .split-band {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .brand {
    min-width: 0;
  }

  .brand span {
    display: none;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-media {
    background:
      linear-gradient(0deg, rgba(5, 7, 10, 0.96), rgba(5, 7, 10, 0.5)),
      url("assets/car-rental-hero.jpg") center / cover;
  }

  .trust-strip,
  .step-grid,
  .dashboard-grid,
  .spec-grid,
  .contract-paper .signature-grid,
  .message-form {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }

  .chat-header,
  .inline-heading {
    display: grid;
  }
}
