@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg: #0b0d12;
  --bg-panel: #12141b;
  --bg-card: #1b1e27;
  --bg-card-hover: #21252f;
  --border: #262a36;
  --accent: #f6a623;
  --accent-light: #ffcf73;
  --accent-dark: #d98812;
  --accent-ink: #14110a;
  --text: #f1f1f3;
  --text-dim: #9aa1b0;
  --text-faint: #5c6272;
  --success: #2ecc71;
  --danger: #e5484d;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-card: 0 12px 28px -10px rgba(0, 0, 0, 0.45);
  --shadow-float: 0 10px 30px rgba(246, 166, 35, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
.brand .brand-icon {
  font-size: 22px;
  line-height: 1;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0c10;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.45);
}
.brand .brand-icon img { width: 100%; height: 100%; display: block; }
.brand.brand-sm { font-size: 18px; gap: 7px; }
.brand.brand-sm .brand-icon { font-size: 15px; width: 30px; height: 30px; border-radius: 10px; }

.btn {
  font-size: 17px;
  padding: 13px 22px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  color: var(--accent-ink);
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 26px -10px rgba(246, 166, 35, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.08s ease, filter 0.15s ease, opacity 0.15s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); }

input {
  font-size: 17px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
input::placeholder { color: var(--text-faint); }
select {
  font-size: 17px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(246, 166, 35, 0.35);
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(246, 166, 35, 0.35);
}
/* El autocompletado de Chrome/Android pinta el fondo del input de blanco
   por encima de cualquier CSS normal — este truco (box-shadow inset gigante)
   es la única forma confiable de forzarlo a respetar el tema oscuro. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-card) inset;
  box-shadow: 0 0 0 1000px var(--bg-card) inset;
  caret-color: var(--text);
  transition: background-color 5000s ease-in-out 0s;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-faint);
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.dot.disponible { background: var(--success); box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.18); }
.dot.en_viaje { background: var(--accent); box-shadow: 0 0 0 3px rgba(246, 166, 35, 0.18); }

.credit {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}
.credit strong { color: var(--accent); font-weight: 700; }
.credit a { color: var(--text-faint); text-decoration: underline; }

.locationBanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  color: var(--accent-ink);
  font-size: 13.5px;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.locationBanner-text { flex: 1; }
.locationBanner-chevron { font-size: 18px; flex-shrink: 0; opacity: 0.7; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp 0.25s ease both; }

.btn-sm {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
}
.btn-sm:hover { background: var(--bg-card-hover); }
.btn-sm:active { transform: scale(0.96); }
.btn-sm.danger { color: var(--danger); border-color: rgba(229, 72, 77, 0.35); }
.btn-sm.wa { background: #25d366; border-color: #25d366; color: #04240f; font-weight: 700; }
.btn-sm.wa:hover { filter: brightness(1.05); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
th { color: var(--text-dim); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
