:root {
  color-scheme: dark;
  --bg0: #0b1014;
  --bg1: #121a21;
  --bg2: #182229;
  --line: rgba(214, 228, 236, 0.12);
  --text: #e8eef2;
  --muted: #93a4b0;
  --accent: #3ecfba;
  --accent-2: #f0b429;
  --danger: #ff7a7a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --font: "Manrope", sans-serif;
  --display: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(62, 207, 186, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(240, 180, 41, 0.12), transparent 50%),
    linear-gradient(180deg, #0a0f13, #10171d 40%, #0b1014);
}

body.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }

.auth-glow, .app-glow {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 30% 20%, rgba(62,207,186,.08), transparent 35%);
  animation: drift 12s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); opacity: .8; }
  to { transform: translate3d(2%, 1%, 0) scale(1.05); opacity: 1; }
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: stretch;
}
.auth-brand {
  padding: 28px 8px;
  animation: rise .7s ease both;
}
.auth-brand h1, .panel-head h1, .brand {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .2px;
}
.auth-brand h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: 10px 0 14px; line-height: 1.05; }
.lede, .panel-head p, .hint, .brand-sub, .user-chip { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-card, .panel {
  background: linear-gradient(180deg, rgba(24,34,41,.92), rgba(14,20,25,.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.auth-card { padding: 28px; animation: rise .8s .08s ease both; }
.auth-card h2 { margin: 0 0 18px; font-size: 1.35rem; }

.stack { display: grid; gap: 14px; }
label { display: grid; gap: 8px; font-size: .9rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(8,12,16,.7);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(62,207,186,.55);
  box-shadow: 0 0 0 4px rgba(62,207,186,.12);
}
.check-label {
  align-content: end;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}
.check-label input { width: auto; }

.dt-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 8px;
}
input[type="date"],
input[type="time"] {
  color-scheme: dark;
  min-height: 46px;
  padding-right: 10px;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.95;
  filter: invert(1) brightness(1.35);
  margin-left: 4px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 12px 18px; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #3ecfba, #2aa897); color: #04110f; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.small { padding: 8px 12px; font-size: .85rem; }
.btn.danger { border-color: rgba(255,122,122,.35); color: #ffd0d0; }

.divider { display: grid; place-items: center; margin: 16px 0; color: var(--muted); }
.divider span {
  position: relative; padding: 0 10px; background: transparent;
}
.alert {
  background: rgba(255,122,122,.12);
  border: 1px solid rgba(255,122,122,.35);
  color: #ffd0d0;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(10,15,19,.72);
  backdrop-filter: blur(14px);
}
.brand-lockup { display: flex; align-items: baseline; gap: 10px; }
.brand { font-size: 1.7rem; }
.brand-sub { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.user-chip { font-size: .9rem; }

.layout {
  width: min(1280px, calc(100% - 36px));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 20px;
}
.panel { padding: 22px; animation: rise .55s ease both; }
.panel-head h1 { margin: 0; font-size: 2.2rem; }
.panel-head p { margin: 8px 0 0; }
.panel-head.compact { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel-head.compact h2 { margin: 0; font-size: 1.1rem; }

.grid-2, .grid-3 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.passengers { display: grid; gap: 12px; }
.passenger-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.02);
}
.passenger-card h3 {
  margin: 0 0 10px;
  font-size: .9rem;
  color: var(--accent);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.segments { display: grid; gap: 14px; }
.segment {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.02);
  animation: rise .4s ease both;
}
.segment h3 {
  margin: 0 0 12px;
  font-size: .95rem;
  color: var(--accent);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.route-block { margin-bottom: 12px; }
.route-label {
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.combo { position: relative; }
.combo-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(8,12,16,.7);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}
.combo-input:focus {
  border-color: rgba(62,207,186,.55);
  box-shadow: 0 0 0 4px rgba(62,207,186,.12);
}
.combo-list {
  display: none;
  position: absolute;
  z-index: 40;
  left: 0; right: 0;
  top: calc(100% + 6px);
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121a21;
  box-shadow: var(--shadow);
}
.combo.open .combo-list { display: block; }
.combo-option {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}
.combo-option span { color: var(--muted); font-size: .85rem; }
.combo-option:hover { background: rgba(62,207,186,.1); }
.combo-empty { padding: 12px; color: var(--muted); font-size: .9rem; }


.side { display: grid; gap: 16px; align-content: start; }
.booking-list { display: grid; gap: 10px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.booking-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.booking-item:hover, .booking-item.active {
  border-color: rgba(62,207,186,.45);
  background: rgba(62,207,186,.06);
  transform: translateY(-1px);
}
.booking-item strong { display: block; margin-bottom: 4px; }
.booking-item span { color: var(--muted); font-size: .86rem; }
.booking-actions { display: flex; gap: 8px; margin-top: 10px; }

.memo-panel pre {
  white-space: pre-wrap;
  background: rgba(0,0,0,.25);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  line-height: 1.45;
  max-height: 42vh;
  overflow: auto;
}
.hidden { display: none !important; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .auth-shell, .layout, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar { padding: 14px 16px; }
  .layout { width: min(100% - 20px, 100%); }
}
