/* ==========================================================================
   UNIMOTOS — Interfaz Hiperminimalista (3 Estados en 1 Pantalla)
   Manual de Marca UNIGOU SAS v1.2 (Tema Mango #FFB000 + Azul noche #0E1B2C)
   ========================================================================== */

:root {
  --ink: #0E1B2C;
  --ink-muted: #5B6472;
  --accent: #FFB000;
  --accent-hover: #E89E00;
  --accent-ink: #8A5800;
  --accent-soft: rgba(255, 176, 0, 0.24);
  --field: #F5F1E8;
  --field-focus: #EFE9DC;
  --sheet: #FFFFFF;
  --border: rgba(14, 27, 44, 0.09);
  --border-strong: rgba(14, 27, 44, 0.16);
  --danger: #C53030;
  --radius-sheet: 28px;
  --radius-control: 16px;
  --shadow-sheet: 0 -10px 36px rgba(14, 27, 44, 0.10);
  --shadow-float: 0 6px 20px rgba(14, 27, 44, 0.12);
  --font-sans: 'Sora', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --app-height: 100dvh;
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--field);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}

button,
input,
select,
a {
  font-family: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Layout Principal (Mobile-first 390px -> Desktop >= 960px)
   ========================================================================== */

.app-stage {
  position: relative;
  width: 100%;
  height: var(--app-height);
  overflow: hidden;
  background: var(--field);
}

.map-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-canvas {
  width: 100%;
  height: 100%;
  background: var(--field);
  z-index: 1;
}

.maplibregl-ctrl-attrib {
  font-size: 9px !important;
  background: rgba(255, 255, 255, 0.55) !important;
  color: rgba(14, 27, 44, 0.48) !important;
}

.maplibregl-ctrl-attrib a {
  color: rgba(14, 27, 44, 0.55) !important;
}

.maplibregl-ctrl-bottom-right {
  bottom: auto !important;
  top: calc(66px + env(safe-area-inset-top, 0px)) !important;
  right: 10px !important;
  opacity: 0.7;
}

/* ==========================================================================
   Cabecera Flotante Superior
   ========================================================================== */

.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 0;
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand-imagotipo {
  display: block;
  height: 28px;
  width: auto;
}

.back-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--sheet);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  transition: transform 0.14s ease, background 0.14s ease;
}

.back-btn:active {
  transform: scale(0.95);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.club-pill {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--sheet);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-float);
  transition: transform 0.14s ease;
}

.profile-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--sheet);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transition: transform 0.14s ease;
}

.profile-btn:active {
  transform: scale(0.95);
}

.profile-btn-avatar {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-btn-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.club-pill:active {
  transform: scale(0.96);
}

.club-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.club-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1.8px solid var(--ink);
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.club-dot.is-filled {
  background: var(--ink);
  border-color: var(--ink);
}

.club-pill.has-free-ride {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.club-pill.has-free-ride .club-dot {
  background: var(--ink);
  border-color: var(--ink);
}

.club-pill.has-free-ride .club-gift-icon {
  color: var(--ink);
}

.gps-fab {
  position: absolute;
  right: 16px;
  bottom: calc(var(--sheet-height, 190px) + 14px);
  z-index: 450;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--sheet);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  transition: transform 0.14s ease, color 0.14s ease, bottom 0.22s ease;
}

.gps-fab:active {
  transform: scale(0.94);
}

.gps-fab.is-locating {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

body:not([data-state="destination"]) .gps-fab {
  display: none;
}

/* ==========================================================================
   Hoja Inferior Blanca
   ========================================================================== */

.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 600;
  background: var(--sheet);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: var(--shadow-sheet);
  padding: 2px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 64dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: max-height 0.24s ease;
}

.sheet-handle-btn {
  width: 100%;
  min-height: 30px;
  padding: 8px 0 10px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(14, 27, 44, 0.20);
  display: block;
}

/* En móvil: cuando el panel está minimizado en Estado 1, oculta recientes y footer para liberar el mapa */
@media (max-width: 959px) {
  body[data-state="destination"][data-sheet-collapsed="true"] #recent-list,
  body[data-state="destination"][data-sheet-collapsed="true"] .sheet-legal-footer {
    display: none !important;
  }

  body[data-state="destination"][data-sheet-collapsed="true"] .bottom-sheet {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

.sheet-panel {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Estado 1 · Destino + Ajuste Exacto de Recogida
   ========================================================================== */

.center-pickup-pin {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -100%);
  z-index: 480;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.center-pin-head {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink);
  border: 3px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(14, 27, 44, 0.32);
}

.center-pin-core {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.center-pin-stem {
  width: 3px;
  height: 14px;
  background: var(--ink);
  border-radius: 0 0 3px 3px;
}

.center-pin-shadow {
  width: 14px;
  height: 5px;
  border-radius: 999px;
  background: rgba(14, 27, 44, 0.28);
  margin-top: -1px;
}

.pickup-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.pickup-strip-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  border: 1.5px solid rgba(14, 27, 44, 0.32);
  box-shadow: 0 0 0 4px rgba(255, 176, 0, 0.24);
  flex-shrink: 0;
}

.pickup-strip-dot.is-searching {
  animation: pulse-ring 1.3s ease-out infinite;
}

.pickup-strip-dot.is-warn {
  background: #DC2626;
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.20);
}

.pickup-strip-text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pickup-gps-btn {
  min-height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.pickup-adjust-btn {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.pickup-search-wrap {
  width: 100%;
}

.pickup-search-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  outline: none;
}

.pickup-search-input:focus {
  border-color: var(--accent);
  background: var(--field-focus);
}

.pickup-suggest-list {
  margin-top: 2px;
  max-height: 150px;
  overflow-y: auto;
}

.pickup-adjust-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pickup-adjust-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

.pickup-adjust-addr {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.pickup-adjust-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.pickup-adjust-actions .secondary-btn {
  flex: 0 0 auto;
  padding: 0 18px;
  height: 54px;
}

.cta-compact {
  height: 54px;
  font-size: 16px;
  flex: 1;
}

.dest-form {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.dest-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.dest-input {
  width: 100%;
  height: 64px;
  padding: 0 52px 0 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-control);
  background: var(--field);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.dest-input::placeholder {
  color: var(--ink-muted);
  font-weight: 400;
}

.dest-input:focus {
  background: var(--field-focus);
  border-color: var(--accent);
}

.dest-input.is-loading {
  opacity: 0.72;
}

.dest-go-btn {
  position: absolute;
  right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dest-go-btn:hover {
  background: rgba(14, 27, 44, 0.06);
}

.mic-btn {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, background 0.18s ease;
}

.mic-btn:active {
  transform: scale(0.96);
}

.mic-btn.is-listening {
  background: var(--accent);
  color: var(--ink);
  animation: pulse-ring 1.3s ease-out infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 176, 0, 0.50); }
  70% { box-shadow: 0 0 0 12px rgba(255, 176, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 176, 0, 0); }
}

.dest-error {
  margin: 10px 2px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--danger);
  line-height: 1.35;
}

.recent-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.recent-list li + li {
  border-top: 1px solid var(--border);
}

.recent-item {
  width: 100%;
  min-height: 46px;
  padding: 8px 4px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  transition: background 0.12s ease;
  border-radius: 10px;
}

.recent-item:active,
.recent-item:hover {
  background: rgba(245, 241, 232, 0.65);
}

.recent-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.recent-icon {
  color: var(--ink-muted);
  flex-shrink: 0;
  display: inline-flex;
}

.recent-name {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-price {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ==========================================================================
   Estado 2 · Precio y Pedir
   ========================================================================== */

.quote-dest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.quote-dest-name {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-star-btn {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.14s ease;
}

.fav-star-btn:active {
  transform: scale(0.92);
}

.fav-star-btn.is-saved {
  color: var(--ink);
}

.fav-star-btn.is-saved svg {
  fill: var(--accent);
  stroke: var(--ink);
}

.quote-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.quote-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quote-price {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.quote-free-note {
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.quote-eta {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.payment-wrap {
  position: relative;
  margin-bottom: 16px;
}

.payment-select {
  width: 100%;
  height: 52px;
  padding: 0 42px 0 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}

.payment-select:focus {
  border-color: var(--accent);
}

.payment-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.cta-primary {
  width: 100%;
  height: 64px;
  border: none;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}

.cta-primary:hover {
  background: var(--accent-hover);
}

.cta-primary:active {
  transform: scale(0.985);
}

.cta-primary:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

/* ==========================================================================
   Estado 3 · En Camino
   ========================================================================== */

.tracking-headline {
  margin: 0 0 14px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #ECE7DC;
  overflow: hidden;
  margin-bottom: 22px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.45s ease;
}

.driver-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.driver-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.driver-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.driver-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.driver-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.driver-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-vehicle-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.driver-plate-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.driver-pilot-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}

.driver-plate {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-circle-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: var(--field);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.14s ease, background 0.14s ease;
}

.icon-circle-btn:hover {
  background: var(--field-focus);
}

.icon-circle-btn:active {
  transform: scale(0.94);
}

.icon-circle-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.tracking-footer {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.cancel-link {
  min-height: 44px;
  min-width: 120px;
  padding: 0 18px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 10px;
}

.cancel-link:hover {
  color: var(--ink);
}

/* ==========================================================================
   Marcadores Personalizados en Mapa (MapLibre DOM Markers)
   ========================================================================== */

.gps-pin-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gps-pin-halo {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 176, 0, 0.28);
}

.gps-pin-dot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 2px #FFFFFF, 0 2px 8px rgba(14, 27, 44, 0.28);
}

.dest-pin-ring {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 5px solid var(--ink);
  box-shadow: 0 2px 8px rgba(14, 27, 44, 0.25);
}

.moto-pin-badge {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #FFFFFF, 0 6px 18px rgba(14, 27, 44, 0.34);
}

/* ==========================================================================
   Diálogos Nativos (<dialog closedby="any">)
   ========================================================================== */

.modal-sheet {
  width: min(400px, calc(100vw - 32px));
  padding: 22px 20px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 20px 50px rgba(14, 27, 44, 0.22);
}

.modal-sheet::backdrop {
  background: rgba(14, 27, 44, 0.45);
  backdrop-filter: blur(4px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--field);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-copy {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.google-btn-slot {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.modal-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: var(--field);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  outline: none;
}

.modal-input:focus {
  border-color: var(--accent);
}

.member-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.member-email {
  font-size: 13px;
  color: var(--ink-muted);
}

.member-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.member-stat {
  background: var(--field);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-stat strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.member-stat span {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.logout-btn {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-muted);
  font-size: 14.5px;
  font-weight: 600;
}

.logout-btn:hover {
  color: var(--ink);
  background: var(--field);
}

.modal-sheet-scroll {
  max-height: min(86dvh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.profile-subhead {
  margin: 6px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.text-action-btn {
  min-height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
}

.text-action-btn:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.fav-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fav-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--field);
}

.fav-slot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fav-slot-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.fav-slot-addr {
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-slot-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.fav-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--sheet);
}

.fav-editor-actions {
  display: flex;
  gap: 8px;
}

.secondary-btn,
.save-mini-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.secondary-btn {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-muted);
}

.save-mini-btn {
  border: none;
  background: var(--ink);
  color: #FFFFFF;
}

.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--field);
  font-size: 13px;
}

.mini-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-row-title {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-row-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.mini-row-action {
  min-height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.setting-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.payment-wrap-tight {
  margin-bottom: 0;
}

.setting-status {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
}

.setting-status.is-error {
  color: var(--danger);
}

.save-profile-btn {
  height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.quick-note-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-note-chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--field);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.14s ease, transform 0.12s ease;
}

.quick-note-chip:hover {
  background: var(--field-focus);
}

.quick-note-chip:active {
  transform: scale(0.96);
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whatsapp-cta {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.14s ease, transform 0.12s ease;
}

.whatsapp-cta:active {
  transform: scale(0.985);
}

.whatsapp-cta.is-disabled {
  opacity: 0.42;
  pointer-events: none;
}

/* ==========================================================================
   Tarjeta visual Club 3+1 + Footer legal discreto
   ========================================================================== */

.club-card {
  background: var(--field);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.club-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.club-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}

.club-cap-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
}

.club-steps-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 0;
}

.club-step-node {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  background: var(--sheet);
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.club-step-node.is-done {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.club-step-node.is-gift {
  width: auto;
  min-width: 48px;
  padding: 0 9px;
  font-size: 11.5px;
  border-color: var(--accent);
  color: var(--ink);
}

.club-step-node.is-gift.is-ready {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.club-step-line {
  flex: 1;
  height: 2px;
  background: var(--border-strong);
  border-radius: 999px;
}

.club-status-copy {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.club-rule-copy {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.sheet-legal-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.sheet-legal-footer a {
  color: var(--ink-muted);
  text-decoration: none;
  padding: 4px 2px;
  font-weight: 500;
}

.sheet-legal-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.modal-legal-link {
  text-align: center;
  padding-top: 4px;
}

.modal-legal-link a {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: underline;
}

/* ==========================================================================
   Escritorio (>= 960px): Mapa izquierda + Panel fijo derecha (420px)
   ========================================================================== */

@media (min-width: 960px) {
  .app-stage {
    display: grid;
    grid-template-columns: 1fr 420px;
  }

  .bottom-sheet {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 30px rgba(14, 27, 44, 0.06);
    padding: 36px 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .sheet-handle-btn {
    display: none;
  }

  .gps-fab {
    bottom: 24px;
    right: 24px;
  }

  .center-pickup-pin {
    top: 50%;
  }
}
