/* TaxiRadar Driver Dashboard — dark premium */
:root {
  --tr-bg: #09090b;
  --tr-bg-elevated: #121214;
  --tr-card: #18181b;
  --tr-card-border: #27272a;
  --tr-gold: #e8b923;
  --tr-gold-bright: #f5c842;
  --tr-gold-dim: rgba(232, 185, 35, 0.15);
  --tr-gold-border: rgba(232, 185, 35, 0.35);
  --tr-text: #fafafa;
  --tr-muted: #a1a1aa;
  --tr-muted-dim: #71717a;
  --tr-success: #34d399;
  --tr-radius: 1rem;
  --tr-radius-lg: 1.25rem;
  --tr-nav-h: 4.25rem;
  --tr-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body.dashboard-body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--tr-bg);
  color: var(--tr-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.dashboard-shell {
  max-width: 28rem;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem calc(var(--tr-nav-h) + var(--tr-safe-bottom) + 1rem);
}

/* Header */
.dash-header {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dash-header--solo {
  grid-template-columns: 1fr;
  justify-items: center;
}

.dash-header__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--tr-card-border);
  border-radius: 0.75rem;
  background: var(--tr-card);
  color: var(--tr-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dash-header__btn:hover {
  background: var(--tr-bg-elevated);
  border-color: var(--tr-gold-border);
}

.dash-header__btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dash-header__center {
  text-align: center;
  width: 100%;
}

.dash-header__logo {
  display: block;
  margin: 0 auto;
  max-width: 10.5rem;
  height: auto;
  object-fit: contain;
}

.dash-header__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tr-gold);
  text-align: center;
}

/* Cards */
.tr-card {
  background: var(--tr-card);
  border: 1px solid var(--tr-card-border);
  border-radius: var(--tr-radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.tr-card--gold {
  border-color: var(--tr-gold-border);
  background: linear-gradient(165deg, rgba(232, 185, 35, 0.08) 0%, var(--tr-card) 45%);
}

.tr-card__title {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tr-muted);
}

/* Hero availability */
.hero-card {
  text-align: center;
  padding: 1.5rem 1.25rem;
}

.hero-card__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  text-align: center;
}

.hero-card__identity {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar-wrap {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  overflow: hidden;
  border: 2px solid var(--tr-gold-border);
  background: #000;
  box-shadow: 0 0 24px rgba(232, 185, 35, 0.12);
}

.hero-avatar {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  object-position: center center;
}

.hero-card__name {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.hero-card__vehicle {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: var(--tr-muted);
  text-align: center;
}

.hero-badge {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-height: 5.5rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--tr-card-border);
  background: var(--tr-bg-elevated);
}

.hero-status__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--tr-muted-dim);
}

.hero-status--available .hero-status__dot {
  background: var(--tr-success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

.hero-status--available {
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.hero-status__label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tr-text);
  margin: 0 0 0.25rem;
}

.hero-toggle {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: var(--tr-radius);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
}

.hero-toggle:active {
  transform: scale(0.98);
}

.hero-toggle--available {
  background: linear-gradient(180deg, var(--tr-gold-bright), var(--tr-gold));
  color: #0a0a0a;
  box-shadow: 0 4px 20px rgba(232, 185, 35, 0.25);
}

.hero-toggle--offline {
  background: var(--tr-bg-elevated);
  color: var(--tr-text);
  border: 1px solid var(--tr-card-border);
}

.hero-card__hint {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--tr-muted);
  line-height: 1.45;
}

/* Stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.stat-tile {
  background: var(--tr-bg-elevated);
  border: 1px solid var(--tr-card-border);
  border-radius: var(--tr-radius);
  padding: 1rem;
  text-align: center;
}

.stat-tile__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tr-gold);
  line-height: 1.2;
}

.stat-tile__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--tr-muted);
}

/* Badge progress */
.badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.badge-pill {
  text-align: center;
  flex: 1;
  min-width: 7rem;
}

.badge-pill__img {
  display: block;
  margin: 0 auto 0.35rem;
  max-height: 4.5rem;
  width: auto;
  max-width: 6.5rem;
  object-fit: contain;
}

.badge-pill__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--tr-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pill--current .badge-pill__label {
  color: var(--tr-gold);
}

.badge-arrow {
  color: var(--tr-muted-dim);
  font-size: 1.25rem;
}

.progress-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.progress-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
}

.progress-item__head span:last-child {
  color: var(--tr-muted);
  font-size: 0.75rem;
}

.progress-bar {
  height: 0.35rem;
  border-radius: 9999px;
  background: var(--tr-bg);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--tr-gold), var(--tr-gold-bright));
  transition: width 0.3s ease;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--tr-card-border);
  font-size: 0.875rem;
}

.checklist li:last-child {
  border-bottom: none;
}

.check-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.check-icon--done {
  background: rgba(52, 211, 153, 0.2);
  color: var(--tr-success);
}

.check-icon--pending {
  background: var(--tr-gold-dim);
  color: var(--tr-gold);
  border: 1px solid var(--tr-gold-border);
}

/* Reviews */
.review-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--tr-card-border);
}

.review-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-item__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.review-item__name {
  font-weight: 600;
  font-size: 0.875rem;
}

.review-item__date {
  font-size: 0.75rem;
  color: var(--tr-muted-dim);
}

.review-stars {
  color: var(--tr-gold);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.review-item__text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--tr-muted);
  line-height: 1.45;
}

/* Buttons */
.tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--tr-radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  width: 100%;
}

.tr-btn:active {
  transform: scale(0.98);
}

.tr-btn--gold {
  background: linear-gradient(180deg, var(--tr-gold-bright), var(--tr-gold));
  color: #0a0a0a;
}

.tr-btn--outline {
  background: transparent;
  color: var(--tr-text);
  border: 1px solid var(--tr-card-border);
}

.tr-btn--ghost {
  background: var(--tr-bg-elevated);
  color: var(--tr-gold);
  border: 1px solid var(--tr-gold-border);
}

.tr-btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tr-link-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.65rem;
  background: none;
  border: none;
  color: var(--tr-gold);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* Boost / referral */
.tr-muted-block {
  font-size: 0.8125rem;
  color: var(--tr-muted);
  line-height: 1.5;
  margin: 0 0 0.75rem;
}

.tr-muted-block strong {
  color: var(--tr-text);
  font-weight: 600;
}

.referral-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: var(--tr-bg);
  border: 1px dashed var(--tr-gold-border);
  border-radius: var(--tr-radius);
  font-family: ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tr-gold);
  letter-spacing: 0.08em;
}

.trust-quote {
  font-size: 0.875rem;
  color: var(--tr-muted);
  line-height: 1.55;
}

.trust-quote p {
  margin: 0 0 0.65rem;
}

.trust-quote p:last-child {
  margin-bottom: 0;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: var(--tr-gold-dim);
  border: 1px solid var(--tr-gold-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tr-gold);
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--tr-card-border);
  padding-bottom: var(--tr-safe-bottom);
}

.bottom-nav__inner {
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: var(--tr-nav-h);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.35rem 0.25rem;
  border: none;
  background: none;
  color: var(--tr-muted-dim);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.15s;
}

.bottom-nav__item svg {
  width: 1.35rem;
  height: 1.35rem;
}

.bottom-nav__item--active {
  color: var(--tr-gold);
}

.dashboard-section {
  scroll-margin-top: 1rem;
}

.dashboard-section[hidden] {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: calc(var(--tr-nav-h) + var(--tr-safe-bottom) + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 60;
  padding: 0.65rem 1.25rem;
  background: var(--tr-card);
  border: 1px solid var(--tr-gold-border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tr-gold);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (min-width: 480px) {
  .dashboard-shell {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
