/* Design tokens: gentill-tokens.css is imported via index.html */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 196, 0, 0.16), transparent 24rem),
    radial-gradient(circle at 12% 18%, rgba(81, 225, 68, 0.055), transparent 18rem),
    linear-gradient(180deg, #02060a 0%, #09121b 48%, #050a10 100%);
  color: var(--text);
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  width: 100%;
  max-width: 472px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6, 13, 20, 0.58), rgba(5, 10, 16, 0.98)),
    var(--bg);
}

.screen {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  max-width: 472px;
  padding: 18px 16px 108px;
}

.login-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(5, 10, 16, 0.28), rgba(5, 10, 16, 0.88)),
    url("assets/backgrounds/gentill-mob-route-map-vertical.png") center / cover;
}

.login-screen form {
  width: min(370px, calc(100vw - 36px));
  align-self: center;
}

.login-card {
  margin-top: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    rgba(10, 17, 25, 0.92);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.login-card h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.login-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.brand-logo {
  width: min(196px, 72vw);
  height: 122px;
  object-fit: contain;
  align-self: center;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.48));
}

.wordmark {
  text-align: center;
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1;
}

.wordmark span {
  color: var(--gold);
}

.subtitle {
  margin: 6px 0 18px;
  text-align: center;
  color: var(--muted);
  line-height: 1.55;
}

.trust-pills {
  width: min(390px, calc(100vw - 32px));
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.trust-pills span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 196, 0, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(8, 15, 23, 0.74);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 17, 25, 0.88);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.field input:focus {
  border-color: var(--gold);
}

.legal-link {
  display: inline-flex;
  justify-content: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-link:focus-visible,
.row-link:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.primary,
.secondary,
.danger {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
}

.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #070a0e;
  box-shadow: 0 14px 24px rgba(255, 196, 0, 0.18);
}

.secondary {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.topbar {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding-top: 4px;
}

.topbar h1 {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 19, 28, 0.78);
  color: var(--text);
  display: grid;
  place-items: center;
}

.mini-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.mini-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.mini-logo span span {
  color: var(--gold);
}

.bell {
  position: relative;
}

.bell::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.hello {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold), #1d2936);
  display: grid;
  place-items: center;
  color: #111;
  font-weight: 900;
  font-size: 1.3rem;
}

.hello h2,
.section-title {
  margin: 0;
  font-size: 1.5rem;
}

.hello p {
  margin: 4px 0 0;
  color: var(--muted);
}

.online-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 900;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.dot.on {
  background: var(--green);
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.grid {
  display: grid;
  gap: 10px;
}

.metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 20px;
}

.live-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
}

.live-card b,
.live-card small {
  display: block;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 77, 61, 0.12);
}

.live-dot.on {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(81, 225, 68, 0.12);
}

.live-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-action {
  min-height: 34px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 196, 0, 0.55);
  color: var(--gold);
  background: rgba(255, 196, 0, 0.08);
  font-weight: 800;
}

.compact-note {
  margin: 8px 2px 0;
  font-size: 0.82rem;
}

.metric {
  min-height: 104px;
  align-content: start;
}

.metric small,
.muted {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 1.12rem;
  line-height: 1.05;
}

.actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-card {
  min-height: 116px;
  text-align: left;
  color: var(--text);
  display: grid;
  align-content: start;
  border-color: rgba(255, 196, 0, 0.11);
}

.action-card svg,
.tab svg {
  width: 24px;
  height: 24px;
}

.action-card b {
  display: block;
  margin: 8px 0 4px;
}

.action-card small {
  color: var(--muted);
}

.alert {
  margin-top: 16px;
  border-color: rgba(255, 196, 0, 0.78);
  display: flex;
  gap: 12px;
  align-items: center;
}

.alert-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: #101010;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.offer-card {
  display: grid;
  gap: 16px;
  border-color: rgba(255, 196, 0, 0.22);
  border-radius: 22px;
}

.section-gap {
  height: 14px;
}

.small-gap {
  height: 8px;
}

.section-head-mobile,
.offer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-head-mobile h3,
.offer-head h2 {
  margin: 0;
}

.section-head-mobile small {
  white-space: nowrap;
}

.offer-head h2 {
  margin-top: 3px;
  font-size: 1.28rem;
  line-height: 1.1;
}

.list-card {
  display: grid;
  gap: 4px;
}

.route-map {
  min-height: 310px;
  margin: 12px 0 0;
  border-color: rgba(255, 196, 0, 0.22);
  box-shadow: inset 0 -80px 120px rgba(5, 10, 16, 0.48);
  border-radius: 20px;
}

.route-panel {
  margin-top: -34px;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  border-color: rgba(255, 196, 0, 0.18);
  border-radius: 20px;
}

.ride-stats-spaced {
  margin-top: 2px;
}

.wallet-hero {
  margin-top: 12px;
  min-height: 174px;
  display: grid;
  align-content: end;
  overflow: hidden;
  position: relative;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 196, 0, 0.22), transparent 8rem),
    linear-gradient(135deg, rgba(255, 196, 0, 0.12), rgba(8, 16, 25, 0.98) 48%),
    var(--panel);
}

.wallet-hero::after {
  content: "";
  position: absolute;
  inset: auto -20px -52px auto;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 196, 0, 0.22);
  border-radius: 50%;
}

.wallet-hero h2 {
  margin: 6px 0 2px;
  font-size: 2.15rem;
  line-height: 1;
}

.wallet-hero p {
  max-width: 260px;
  margin: 0;
  line-height: 1.45;
}

.profile-card {
  margin-top: 12px;
  min-height: 232px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 9px;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 196, 0, 0.22), transparent 9rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    var(--panel);
  border-radius: 22px;
}

.profile-card .avatar {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  font-size: 1.6rem;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.timer {
  width: fit-content;
  margin: 10px auto 18px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 196, 0, 0.3);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 196, 0, 0.08);
  font-weight: 900;
}

.route-list {
  display: grid;
  gap: 12px;
}

.point {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
}

.pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 5px;
  background: var(--green);
}

.pin.end {
  background: var(--gold);
}

.map {
  min-height: 210px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(5, 10, 16, 0.1), rgba(5, 10, 16, 0.38)),
    url("assets/backgrounds/gentill-mob-route-map-vertical.png") center / cover;
  border: 1px solid var(--line);
}

.ride-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ride-stats .card {
  box-shadow: none;
  padding: 12px;
}

.nav-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nav-link {
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row-link {
  color: var(--text);
  text-decoration: none;
}

.status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(81, 225, 68, 0.4);
  color: var(--green);
  font-weight: 800;
  font-size: 0.82rem;
}

.status-pill.warn {
  border-color: rgba(255, 196, 0, 0.55);
  color: var(--gold);
}

.status-pill.bad {
  border-color: rgba(255, 77, 61, 0.55);
  color: var(--red);
}

.state-img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius);
}

.upload-box {
  min-height: 228px;
  border: 1px dashed var(--gold);
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: rgba(13, 20, 28, 0.76);
}

.upload-box b {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.upload-box span {
  color: var(--gold);
}

.notice {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 420px);
  padding: 12px 14px;
  border-radius: 12px;
  background: #101a25;
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 20;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(calc(100% - 20px), 440px);
  height: 72px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(7, 13, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 10;
}

.tab {
  border: 0;
  background: transparent;
  color: #d8dee7;
  display: grid;
  place-content: center;
  gap: 5px;
  font-size: 0.78rem;
  border-radius: 18px;
}

.tab.active {
  color: var(--gold);
  background: rgba(255, 196, 0, 0.08);
}

.subnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 0;
}
.subtab {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
}
.subtab.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #070a0e;
  border-color: transparent;
}

.hidden {
  display: none !important;
}

@media (min-width: 900px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 196, 0, 0.16), transparent 34rem),
      #02060a;
  }

  #app {
    min-height: calc(100svh - 32px);
    margin-block: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 34px;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.62);
  }

  .tabbar {
    bottom: 16px;
    border-radius: 24px;
  }
}


/* Modality selection chips */
.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.15s;
  font-size: 0.85rem;
  color: var(--muted);
}
.check-chip.checked {
  background: rgba(81, 225, 68, 0.1);
  border-color: var(--success);
  color: var(--text);
}
.check-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.modality-fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.modality-fieldset legend {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 6px;
  width: 100%;
  margin-bottom: 4px;
}

/* Badges in profile */
.modality-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
