:root {
  --ink: #102022;
  --muted: #5f6d70;
  --paper: #f6f4ef;
  --panel: #ffffff;
  --teal: #0f6f73;
  --teal-dark: #12343b;
  --coral: #e85d4f;
  --gold: #e9b949;
  --green: #2f8f5b;
  --line: #d9dedc;
  --shadow: 0 20px 60px rgba(18, 52, 59, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.hidden {
  display: none !important;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(115deg, rgba(18, 52, 59, 0.96), rgba(15, 111, 115, 0.88)),
    #12343b;
}

.auth-card {
  width: min(100%, 540px);
  display: grid;
  gap: 13px;
  padding: 30px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  color: var(--teal-dark);
  font-size: 42px;
}

.auth-card label,
.offline-import label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-card input,
.offline-import input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: var(--teal-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  letter-spacing: 0;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  padding: 13px 14px;
  text-align: left;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
}

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

.rail-card {
  margin-top: auto;
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.rail-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.4;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #8cf5bd;
  box-shadow: 0 0 0 5px rgba(140, 245, 189, 0.16);
}

.main {
  padding: 22px;
  overflow: hidden;
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16, 32, 34, 0.08);
}

.topline span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.secondary-light {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--teal-dark);
  background: #f7faf9;
  font-weight: 800;
}

.hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 24px;
  align-items: stretch;
  padding: 36px;
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(18, 52, 59, 0.96), rgba(15, 111, 115, 0.86)),
    radial-gradient(circle at 70% 20%, rgba(233, 185, 73, 0.5), transparent 32%),
    #12343b;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
}

.hero .eyebrow {
  color: #ffd98a;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.hero-text {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.primary-action,
.secondary-action,
.agent-form button {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
}

.primary-action,
.agent-form button {
  background: var(--coral);
  color: #fff;
}

.secondary-action {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.route-visual {
  position: relative;
  overflow: hidden;
  min-height: 290px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}

.skyline {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.14) 8% 15%, transparent 15% 22%, rgba(255, 255, 255, 0.12) 22% 33%, transparent 33% 45%, rgba(255, 255, 255, 0.15) 45% 55%, transparent 55% 70%, rgba(255, 255, 255, 0.1) 70% 82%, transparent 82%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.16));
}

.route-line {
  position: absolute;
  left: 38px;
  right: 38px;
  top: 46%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
}

.route-line::after {
  content: "";
  position: absolute;
  inset: 0 34% 0 0;
  border-radius: inherit;
  background: #ffd98a;
}

.station {
  position: absolute;
  top: -42px;
  min-width: 56px;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  background: #fff;
  color: var(--teal-dark);
}

.station::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  border: 4px solid #ffd98a;
}

.station.start {
  left: 0;
}

.station.mid {
  left: 46%;
}

.station.end {
  right: 0;
}

.vehicle {
  position: absolute;
  left: 56%;
  top: -18px;
  width: 48px;
  height: 28px;
  border-radius: 7px 14px 7px 7px;
  background: var(--coral);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.22);
  animation: floatVehicle 3s ease-in-out infinite;
}

.vehicle::before,
.vehicle::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #172b2f;
}

.vehicle::before {
  left: 8px;
}

.vehicle::after {
  right: 8px;
}

@keyframes floatVehicle {
  50% {
    transform: translateY(-5px);
  }
}

.route-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.route-caption strong {
  color: #fff;
}

.section {
  display: none;
  margin-top: 22px;
}

.section.active {
  display: block;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quick-card {
  min-height: 120px;
  border: 1px solid rgba(16, 32, 34, 0.08);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  background: #fff;
  box-shadow: 0 10px 35px rgba(18, 52, 59, 0.06);
}

.quick-card span {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--teal);
  background: #e7f5f3;
  font-size: 12px;
  font-weight: 900;
}

.quick-card strong {
  display: block;
  line-height: 1.35;
}

.stat-card,
.panel {
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid rgba(16, 32, 34, 0.08);
  box-shadow: 0 10px 35px rgba(18, 52, 59, 0.06);
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 32px;
  color: var(--teal);
}

.stat-card p,
.panel p,
.note {
  color: var(--muted);
  line-height: 1.55;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
}

.panel.wide {
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head.compact {
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--teal);
  background: #e7f5f3;
  font-weight: 800;
  font-size: 12px;
}

.pill.amber {
  color: #8a6200;
  background: #fff2ca;
}

.pill.green {
  color: var(--green);
  background: #e7f7ed;
}

.feature-matrix,
.media-grid,
.service-grid,
.plane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-matrix div,
.media-card,
.memory-item,
.service-card {
  padding: 15px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid var(--line);
}

.feature-matrix strong,
.media-card strong,
.service-card strong {
  display: block;
  margin-bottom: 6px;
}

.feature-matrix p,
.media-card p,
.service-card p,
.alert-list p {
  margin-bottom: 0;
  font-size: 14px;
}

.service-card {
  min-height: 170px;
  text-align: left;
}

.service-card:hover,
.quick-card:hover {
  border-color: rgba(15, 111, 115, 0.35);
  transform: translateY(-1px);
}

.service-card span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff2ca;
  color: #8a6200;
  font-size: 12px;
  font-weight: 900;
}

.booking-panel {
  display: grid;
  gap: 13px;
  align-content: start;
}

.booking-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.booking-panel input,
.booking-panel select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

.full {
  width: 100%;
}

.booking-result {
  min-height: 112px;
  padding: 14px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.5;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-item {
  display: grid;
  gap: 5px;
  padding: 13px;
  width: 100%;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
}

.record-item strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.record-item small {
  color: var(--muted);
  line-height: 1.4;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gps-panel {
  display: grid;
  gap: 14px;
}

.food-card {
  min-height: 170px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  text-align: left;
}

.food-card span {
  color: var(--coral);
  font-weight: 900;
}

.food-card p {
  margin-bottom: 0;
  font-size: 14px;
}

.alert-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.alert-list li {
  padding: 13px;
  border-left: 4px solid var(--coral);
  border-radius: 8px;
  background: #fff7f5;
}

.alert-list strong {
  display: block;
  margin-bottom: 4px;
}

.chat-panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.chat-window {
  flex: 1;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 310px;
  padding: 14px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid var(--line);
  overflow: auto;
}

.message {
  max-width: 78%;
  padding: 12px 13px;
  border-radius: 8px;
  line-height: 1.45;
  font-size: 14px;
}

.message.agent {
  background: #fff;
  border: 1px solid var(--line);
}

.message.user {
  justify-self: end;
  color: #fff;
  background: var(--teal);
}

.agent-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.agent-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

.memory-list {
  display: grid;
  gap: 10px;
}

.memory-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 12px;
}

.stop {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid var(--line);
}

.stop-time {
  color: var(--teal);
  font-weight: 900;
}

.stop small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.stop-state {
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
}

.media-card {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.player-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #12343b, #0f6f73);
  color: #fff;
}

.player-card .eyebrow {
  color: #ffd98a;
}

.player-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.offline-import {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 15px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid var(--line);
}

.offline-import audio {
  width: 100%;
}

.media-card .count {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf3f2;
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 12px;
}

.download-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eeee;
}

.download-meter span {
  display: block;
  width: 86%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.5s ease;
}

.pack-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.pack-list p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

  .rail {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .rail-card {
    margin-top: 0;
  }

  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main {
    padding: 12px;
  }

  .hero {
    padding: 24px;
    min-height: auto;
  }

  .route-visual {
    min-height: 230px;
  }

  .nav-list,
  .stat-grid,
  .service-strip,
  .food-grid,
  .feature-matrix,
  .media-grid,
  .service-grid,
  .plane-grid {
    grid-template-columns: 1fr;
  }

  .route-caption,
  .panel-head,
  .player-card {
    flex-direction: column;
  }

  .stop {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}
