:root {
  --gold: #e8b923;
  --gold-light: #ffdf72;
  --dark: #111111;
  --dark-2: #1c1c1c;
  --text: #212529;
  --muted: #6c757d;
  --bg: #f4f5f7;
  --white: #ffffff;
  --danger: #dc3545;
  --success: #198754;
  --warning: #ffc107;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-inter), system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-raleway), sans-serif;
  margin: 0;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--dark);
  color: #fff;
  padding: 0.85rem 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--font-raleway), sans-serif;
  font-size: 0.75rem;
}

.brand-text strong {
  display: block;
  font-family: var(--font-raleway), sans-serif;
  font-size: 0.95rem;
}

.brand-text span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-nav a,
.topbar-nav button {
  color: rgba(255, 255, 255, 0.85);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-raleway), sans-serif;
  padding: 0.35rem 0.5rem;
}

.topbar-nav a:hover,
.topbar-nav button:hover {
  color: var(--gold-light);
}

.main-content {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.page-header p {
  color: var(--muted);
  margin: 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.card + .card {
  margin-top: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #444;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dde1e6;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-raleway), sans-serif;
  font-size: 0.9rem;
  transition: transform 0.15s, background 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gold);
  color: var(--dark);
}

.btn-primary:hover {
  background: #cfaa1e;
}

.btn-secondary {
  background: var(--dark);
  color: #fff;
}

.btn-secondary:hover {
  background: #2a2a2a;
}

.btn-ghost {
  background: transparent;
  color: var(--dark);
  border: 1px solid #ccc;
}

.btn-block {
  width: 100%;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fde8ea;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.alert-info {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pending {
  background: #fff3cd;
  color: #664d03;
}

.status-active {
  background: #d1e7dd;
  color: #0f5132;
}

.status-suspended {
  background: #fde8ea;
  color: #842029;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: linear-gradient(145deg, var(--dark) 0%, #2a2418 50%, var(--dark) 100%);
}

.auth-card {
  width: min(440px, 100%);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  padding: 2rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.auth-card .subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.btn-google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #d2d4d7;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 1rem;
}

.stat-box .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.stat-box .value {
  font-weight: 600;
  font-size: 1rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.bike-color-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dde1e6;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bike-color-trigger:hover,
.bike-color-trigger:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.15);
}

.bike-color-trigger-text {
  flex: 1;
  font-weight: 500;
  color: var(--text);
}

.bike-color-placeholder {
  color: var(--muted);
  font-weight: 400;
}

.bike-color-trigger-chevron {
  color: var(--muted);
  font-size: 0.85rem;
}

.bike-color-swatch {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.bike-color-swatch-legacy {
  background: linear-gradient(135deg, #ccc 50%, #999 50%);
}

.bike-color-dialog {
  border: none;
  padding: 0;
  max-width: none;
  max-height: none;
  background: transparent;
}

.bike-color-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.bike-color-dialog-panel {
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
}

.bike-color-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bike-color-dialog-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.bike-color-dialog-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
}

.bike-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.bike-color-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.bike-color-tile:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.bike-color-tile.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.2);
}

.bike-color-tile-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
}

.bike-color-tile-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}

.bike-color-tile-swatch {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.bike-color-tile-name {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}

.bike-color-dialog-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
}

.phone-input-field {
  display: grid;
  gap: 0.35rem;
}

.phone-input-wrap {
  display: flex;
  align-items: stretch;
}

.phone-input-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid #dde1e6;
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.phone-input-wrap input {
  border-radius: 0 8px 8px 0;
}

.phone-input-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

