:root {
  --ink: #070b14;
  --ink-2: #0d1424;
  --panel: rgba(16, 24, 40, 0.82);
  --panel-solid: #111a2c;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 196, 0, 0.28);
  --text: #f4f7fb;
  --muted: #8b97ad;
  --amber: #ffc400;
  --amber-2: #ff9800;
  --green: #2dd4a0;
  --yellow: #f5c84c;
  --red: #ff5d6c;
  --blue: #4ea1ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --sidebar: 268px;
  --font: "Sora", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 196, 0, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(78, 161, 255, 0.12), transparent 50%),
    radial-gradient(800px 500px at 70% 100%, rgba(45, 212, 160, 0.08), transparent 45%),
    linear-gradient(160deg, #0a1020 0%, var(--ink) 45%, #08101c 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 18, 32, 0.96), rgba(8, 12, 22, 0.98));
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--amber), var(--amber-2));
  color: #1a1200;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(255, 196, 0, 0.28);
  animation: pulseGlow 3.2s ease-in-out infinite;
}
.brand h1 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.nav {
  display: grid;
  gap: 6px;
  flex: 1;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  transition: 0.2s ease;
  border: 1px solid transparent;
}
.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.nav a.active {
  color: #1a1200;
  background: linear-gradient(135deg, var(--amber), #ffdb4d);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(255, 196, 0, 0.22);
  font-weight: 700;
}
.nav .ico {
  width: 22px;
  text-align: center;
  font-size: 15px;
}

.sidebar-foot {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.sidebar-foot .who { font-size: 13px; font-weight: 600; }
.sidebar-foot .role { color: var(--muted); font-size: 11px; margin-top: 2px; }
.logout {
  margin-top: 10px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 93, 108, 0.12);
  color: #ffb4bc;
  cursor: pointer;
  font-weight: 600;
}

.main {
  padding: 28px 28px 48px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  animation: riseIn 0.55s ease both;
}
.topbar h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
}
.topbar .sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.flash {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(45, 212, 160, 0.12);
  border: 1px solid rgba(45, 212, 160, 0.35);
  color: #9af0d0;
  animation: riseIn 0.4s ease both;
}
.flash-error {
  background: rgba(255, 93, 108, 0.12);
  border-color: rgba(255, 93, 108, 0.35);
  color: #ffb4bc;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015)),
    linear-gradient(145deg, rgba(255, 196, 0, 0.04), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  animation: riseIn 0.6s ease both;
}
.stat:nth-child(2) { animation-delay: 0.05s; }
.stat:nth-child(3) { animation-delay: 0.1s; }
.stat:nth-child(4) { animation-delay: 0.15s; }
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--amber), transparent);
}
.stat::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,196,0,0.18), transparent 70%);
}
.stat.accent-green::before { background: linear-gradient(180deg, var(--green), transparent); }
.stat.accent-green .value { color: #8ef0c9; }
.stat.accent-blue::before { background: linear-gradient(180deg, var(--blue), transparent); }
.stat.accent-blue .value { color: #9cc9ff; }
.stat.accent-red::before { background: linear-gradient(180deg, var(--red), transparent); }
.stat.accent-red .value { color: #ffb4bc; }
.stat .label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding-left: 10px;
}
.stat .value {
  margin-top: 10px;
  padding-left: 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--amber);
}
.stat .hint { margin-top: 6px; padding-left: 10px; color: var(--muted); font-size: 12px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  margin-bottom: 16px;
  animation: riseIn 0.65s ease both;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.panel h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.panel .muted { color: var(--muted); font-size: 13px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.table-wrap { overflow: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th,
table.data td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
table.data tr:hover td { background: rgba(255, 255, 255, 0.02); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge-pending { color: #ffd27a; background: rgba(255, 196, 0, 0.12); border-color: rgba(255, 196, 0, 0.25); }
.badge-approved, .badge-paid, .badge-active, .badge-completed { color: #8ef0c9; background: rgba(45, 212, 160, 0.12); border-color: rgba(45, 212, 160, 0.25); }
.badge-rejected, .badge-failed, .badge-cancelled { color: #ffb4bc; background: rgba(255, 93, 108, 0.12); border-color: rgba(255, 93, 108, 0.25); }
.badge-suspended, .badge-paused, .badge-offline { color: #f8dfa0; background: rgba(245, 200, 76, 0.12); border-color: rgba(245, 200, 76, 0.25); }
.badge-running { color: #8ef0c9; background: rgba(45, 212, 160, 0.12); border-color: rgba(45, 212, 160, 0.25); }
.badge-standby { color: #b7c2d6; background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.25); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-amber { background: linear-gradient(135deg, var(--amber), #ffdb4d); color: #1a1200; }
.btn-green { background: linear-gradient(135deg, #2dd4a0, #19b985); color: #04261c; }
.btn-red { background: linear-gradient(135deg, #ff5d6c, #e23d4d); color: white; }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-sm { padding: 7px 10px; font-size: 12px; border-radius: 10px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 196, 0, 0.06), rgba(255, 255, 255, 0.02) 42%, rgba(78, 161, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  align-items: end;
}
.field {
  display: grid;
  gap: 7px;
  min-width: 140px;
}
.field span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}
.field input,
.field select,
.field textarea,
.input,
.select,
.textarea {
  width: 100%;
  background: linear-gradient(180deg, rgba(28, 38, 58, 0.98), rgba(14, 20, 34, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  font-weight: 650;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field select,
.select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(180deg, rgba(28, 38, 58, 0.98), rgba(14, 20, 34, 0.98)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23ffc400' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 12px center;
  background-size: auto, 14px;
  padding-right: 36px;
  cursor: pointer;
  border-color: rgba(255, 196, 0, 0.22);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(255, 196, 0, 0.5);
  box-shadow:
    0 0 0 3px rgba(255, 196, 0, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

/* Subscription adjust controls */
.adjust-form {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(118px, 1fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 340px;
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 196, 0, 0.07), rgba(255, 255, 255, 0.02) 45%, rgba(79, 140, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.adjust-field {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.adjust-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}
.adjust-select-wrap,
.adjust-days-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.adjust-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 42px;
  padding: 10px 36px 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 196, 0, 0.22);
  background:
    linear-gradient(180deg, rgba(28, 38, 58, 0.98), rgba(14, 20, 34, 0.98));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.adjust-select:hover {
  border-color: rgba(255, 196, 0, 0.45);
}
.adjust-select:focus {
  border-color: var(--amber);
  box-shadow:
    0 0 0 3px rgba(255, 196, 0, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.28);
}
.adjust-select option {
  background: #121a28;
  color: #fff;
  font-weight: 600;
}
.adjust-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  pointer-events: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 196, 0, 0.12);
}
.adjust-days-wrap {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(28, 38, 58, 0.95), rgba(14, 20, 34, 0.95));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.adjust-days-wrap:focus-within {
  border-color: rgba(46, 229, 157, 0.55);
  box-shadow:
    0 0 0 3px rgba(46, 229, 157, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.25);
}
.adjust-days-prefix,
.adjust-days-suffix {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.adjust-days-prefix {
  color: #8ef0c9;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.adjust-days-suffix {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.adjust-days {
  appearance: textfield;
  -moz-appearance: textfield;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  padding: 10px 4px;
}
.adjust-days::-webkit-outer-spin-button,
.adjust-days::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.adjust-days::placeholder {
  color: rgba(154, 168, 194, 0.55);
  font-weight: 700;
}
.adjust-save {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(255, 196, 0, 0.22);
}

@media (max-width: 1100px) {
  .adjust-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .adjust-save { width: 100%; }
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: 0.18s ease;
}
.chip:hover {
  border-color: rgba(255, 196, 0, 0.35);
  color: #fff;
  transform: translateY(-1px);
}
.chip.active {
  color: #1a1200;
  background: linear-gradient(135deg, var(--amber), #ffdb4d);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(255, 196, 0, 0.22);
}

.driver-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 196, 0, 0.05), rgba(255, 255, 255, 0.02) 50%, rgba(78, 161, 255, 0.04));
  margin-bottom: 12px;
  transition: 0.2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}
.driver-card:hover {
  border-color: rgba(255, 196, 0, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  background:
    linear-gradient(145deg, rgba(255,196,0,0.4), rgba(255,152,0,0.18)),
    #1b2438;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1a1200;
  font-size: 22px;
  border: 1px solid rgba(255, 196, 0, 0.28);
  box-shadow: 0 10px 22px rgba(255, 196, 0, 0.12);
}
.meta .name { font-weight: 700; margin-bottom: 4px; }
.meta .line { color: var(--muted); font-size: 12px; }

.strong { font-weight: 700; }
.tiny { font-size: 11px; letter-spacing: 0.02em; }

/* Trip log filters + table */
.trip-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 180px)) minmax(220px, 1.6fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 196, 0, 0.06), rgba(255, 255, 255, 0.02) 42%, rgba(78, 161, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.trip-filter-field {
  display: grid;
  gap: 7px;
  margin: 0;
  min-width: 0;
}
.trip-filter-field.grow { min-width: 200px; }
.trip-filter-field > span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}
.trip-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(28, 38, 58, 0.98), rgba(14, 20, 34, 0.98));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.trip-control:focus-within {
  border-color: rgba(255, 196, 0, 0.5);
  box-shadow:
    0 0 0 3px rgba(255, 196, 0, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.28);
}
.trip-control.selectish {
  border-color: rgba(255, 196, 0, 0.22);
}
.trip-control input,
.trip-control select {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 11px 14px;
  min-height: 44px;
}
.trip-control.selectish select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
}
.trip-control.selectish select option {
  background: #121a28;
  color: #fff;
}
.trip-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  pointer-events: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 196, 0, 0.12);
}
.trip-control.search input {
  padding-left: 40px;
  font-weight: 600;
}
.trip-search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}
.trip-apply {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 800;
}

.trip-panel {
  overflow: hidden;
}
.trip-log {
  min-width: 1080px;
}
.trip-log thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(12, 18, 30, 0.96);
  backdrop-filter: blur(10px);
  padding-top: 14px;
  padding-bottom: 14px;
}
.trip-log tbody td {
  padding: 16px 12px;
  vertical-align: top;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.trip-row:hover td {
  background: rgba(255, 196, 0, 0.03);
}
.trip-id {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #1a1200;
  background: linear-gradient(135deg, var(--amber), #ffdb4d);
  box-shadow: 0 6px 14px rgba(255, 196, 0, 0.2);
  margin-bottom: 8px;
}
.driver-name {
  font-weight: 700;
  margin-bottom: 4px;
}
.route-cell { min-width: 240px; max-width: 340px; }
.route-rail {
  position: relative;
  padding-left: 2px;
}
.route-rail::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 18px;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(46, 229, 157, 0.7), rgba(255, 193, 7, 0.7));
}
.route-line {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}
.route-line:last-child { margin-bottom: 0; }
.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  border: 2px solid rgba(7, 11, 20, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
  z-index: 1;
}
.route-dot.origin {
  background: #2ee59d;
  box-shadow: 0 0 0 3px rgba(46, 229, 157, 0.18);
}
.route-dot.dest {
  background: #ffc107;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.18);
}
.route-text {
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}
.trip-log td a {
  color: #e8eefc;
  text-decoration: none;
}
.trip-log td a:hover {
  color: var(--amber);
  text-decoration: underline;
}
.time-chip,
.duration-chip,
.fare-chip {
  display: grid;
  gap: 3px;
}
.time-value,
.duration-main,
.fare-main {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.duration-chip {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(78, 161, 255, 0.08);
  border: 1px solid rgba(78, 161, 255, 0.18);
  width: fit-content;
}
.distance-chip {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.distance-chip span {
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fare-main {
  color: var(--amber);
}
.trip-empty {
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 48px 16px;
  text-align: center;
}

@media (max-width: 1200px) {
  .trip-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trip-filter-field.grow,
  .trip-filter-field.action {
    grid-column: 1 / -1;
  }
  .trip-apply { width: 100%; }
}

.profile-hero {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-items: center;
}
.profile-hero .avatar {
  width: 160px;
  height: 160px;
  border-radius: 28px;
  font-size: 48px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.doc-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.doc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.doc-frame {
  display: block;
  background: #0a0f18;
  min-height: 260px;
}
.doc-frame img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: contain;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.doc-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.map-shell {
  position: relative;
  height: calc(100vh - 180px);
  min-height: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
#fleet-map { width: 100%; height: 100%; }
.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 500;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 16px;
  background: rgba(8, 12, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #d7deeb;
  font-weight: 650;
  padding: 4px 8px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-active { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot-paused { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.dot-standby { background: #94a3b8; }
.dot-offline { background: #64748b; }

.inspector {
  position: absolute;
  top: 14px;
  right: 14px;
  width: min(340px, calc(100% - 28px));
  z-index: 500;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(18, 26, 42, 0.96), rgba(8, 12, 22, 0.94));
  border: 1px solid rgba(255, 196, 0, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: none;
}
.inspector.open { display: block; animation: riseIn 0.3s ease both; }
.inspector h4 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.inspector .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.inspector .row:last-child { border-bottom: 0; }
.inspector .row span:first-child { color: var(--muted); font-weight: 650; }
.inspector .row span:last-child { font-weight: 700; text-align: right; }

.template-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
  background:
    linear-gradient(145deg, rgba(255, 196, 0, 0.05), rgba(255, 255, 255, 0.02) 48%, rgba(78, 161, 255, 0.04));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}
.template-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.template-card code {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: #1a1200;
  background: linear-gradient(135deg, var(--amber), #ffdb4d);
  font-weight: 700;
}

.detail-list {
  display: grid;
  gap: 10px;
}
.detail-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.detail-row .k {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  padding-top: 2px;
}
.detail-row .v {
  font-weight: 700;
  line-height: 1.4;
}

.pill-id {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #1a1200;
  background: linear-gradient(135deg, var(--amber), #ffdb4d);
  box-shadow: 0 6px 14px rgba(255, 196, 0, 0.18);
}

.audit-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(78, 161, 255, 0.1);
  border: 1px solid rgba(78, 161, 255, 0.2);
  color: #b7d7ff;
  font-size: 12px;
  font-weight: 700;
}

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  align-items: center;
}
.pagination a,
.pagination span {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.pagination a:hover {
  color: #fff;
  border-color: rgba(255, 196, 0, 0.35);
}
.pagination .active span {
  color: #1a1200;
  background: linear-gradient(135deg, var(--amber), #ffdb4d);
  border-color: transparent;
}

/* Auth */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(7,11,20,0.15), rgba(7,11,20,0.88)),
    radial-gradient(circle at 30% 20%, rgba(255,196,0,0.28), transparent 40%),
    linear-gradient(145deg, #121a2e, #070b14);
}
.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 80%);
  animation: gridDrift 18s linear infinite;
}
.auth-visual h1 {
  position: relative;
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.04em;
  max-width: 10ch;
}
.auth-visual p {
  position: relative;
  color: var(--muted);
  max-width: 42ch;
  line-height: 1.6;
}
.auth-card-wrap {
  display: grid;
  place-items: center;
  padding: 32px;
}
.auth-card {
  width: min(420px, 100%);
  padding: 30px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(22, 32, 52, 0.96), rgba(12, 18, 32, 0.96));
  border: 1px solid rgba(255, 196, 0, 0.16);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: riseIn 0.55s ease both;
}
.auth-card h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.03em; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-card .btn { width: 100%; margin-top: 8px; padding: 14px; border-radius: 16px; font-weight: 800; }

.empty {
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 196, 0, 0.22); }
  50% { box-shadow: 0 14px 40px rgba(255, 196, 0, 0.4); }
}
@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .profile-hero, .doc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: 280px; }
  .main { padding: 18px 16px 36px; }
}
