:root {
  --bg: #090b12;
  --panel: #101524;
  --panel-soft: #151c2f;
  --text: #f6f8ff;
  --muted: #9da9c8;
  --brand: #00e5ff;
  --brand-2: #5e7bff;
  --success: #13d48f;
  --danger: #ff5f6d;
  --border: #253252;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: radial-gradient(circle at top right, #1e2f5d 0%, #0a0f1d 45%, #070910 100%);
  color: var(--text);
}

body.light {
  --bg: #eef2ff;
  --panel: #ffffff;
  --panel-soft: #f5f7ff;
  --text: #11172a;
  --muted: #5e6a88;
  --border: #dde4ff;
  --shadow: 0 16px 34px rgba(31, 54, 110, 0.12);
  background: linear-gradient(180deg, #f7f9ff 0%, #edf2ff 100%);
}

#app-shell {
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 16px 16px calc(86px + env(safe-area-inset-bottom));
  background: transparent;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

.brand-caption {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-card {
  border: 1px solid #2f4375;
  background: linear-gradient(135deg, #17213f 0%, #1f2f61 50%, #00a3c4 100%);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

body.light .hero-card {
  border-color: #b8c7ff;
  background: linear-gradient(135deg, #e8efff 0%, #d6e2ff 60%, #b4f1ff 100%);
}

.hero-badge {
  display: inline-block;
  margin: 0;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.26);
}

.hero-card h2 {
  margin: 8px 0 6px;
  font-size: 23px;
}

.hero-card p {
  margin: 0;
  color: #d8e1ff;
}

body.light .hero-card p {
  color: #243250;
}

.card {
  margin-bottom: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 12px;
  font-size: 16px;
}

.ride-form {
  display: grid;
  gap: 8px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

input,
select {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  outline: none;
  font: inherit;
}

input:focus,
select:focus {
  border-color: var(--brand-2);
}

.grid-two {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.primary-btn {
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  font-weight: 700;
  color: #02161c;
  background: linear-gradient(110deg, var(--brand) 0%, #00ffc6 100%);
  cursor: pointer;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  border: 1px solid rgba(19, 212, 143, 0.3);
  background: rgba(19, 212, 143, 0.15);
  border-radius: 999px;
  padding: 5px 10px;
}

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

.ride-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel-soft);
  display: grid;
  gap: 6px;
}

.ride-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ride-row strong {
  font-size: 14px;
}

.ride-meta {
  font-size: 12px;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-left: 3px solid var(--brand-2);
  padding: 8px 10px;
  background: var(--panel-soft);
  border-radius: 10px;
}

.timeline-item p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.account-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, #4568dc 0%, #b06ab3 100%);
}

.account-card h3 {
  margin: 0;
}

.account-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.list-item:last-child {
  border-bottom: 0;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.switch-row input {
  width: 18px;
  height: 18px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(408px, calc(100% - 20px));
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tab-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--text);
  background: var(--panel-soft);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  color: #fff;
  background: rgba(9, 11, 18, 0.9);
  border: 1px solid #243056;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 370px) {
  .grid-two {
    grid-template-columns: 1fr;
  }
}
