/* /mi-viaje: panel del viajero. Base: /reservar/reserva.css (colores, inputs, chips, botones). */

.mv-main { padding: 36px 0 72px; min-height: 60vh; }
.loading { padding: 80px 0; text-align: center; color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nav: usuario */
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-3); min-width: 0; }
.nav-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----- Login ----- */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 48px; align-items: center; padding: 24px 0; }
.auth-intro h1 { font-size: clamp(34px, 4vw, 50px); line-height: 1.05; margin-top: 6px; }
.auth-intro p { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 30em; }
.auth-intro .trip-kicker { font-size: 30px; }
#v-newpass { grid-template-columns: minmax(0, 460px); justify-content: center; }
.auth-card h2 { font-size: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--mint-50); border-radius: var(--radius-pill); margin-bottom: 8px; }
.auth-tabs button { height: 42px; border: 0; border-radius: var(--radius-pill); background: none; font-weight: 600; font-size: 15px; color: var(--ink-3); }
.auth-tabs button.on { background: white; color: var(--mint-700); box-shadow: 0 1px 6px rgba(94, 31, 18, .12); }
.auth-card .sub { margin-top: 16px; }
.auth-card .sub b { color: var(--ink); }
.fields.one { grid-template-columns: 1fr; }
.fields.three { grid-template-columns: 1fr 1fr 1fr; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 64px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--mint-700); font-weight: 600; font-size: 13.5px; }
.pass-toggle:hover { background: var(--mint-50); }
.hint-small { font-size: 13.5px; color: var(--ink-3); }
.auth-card .done .btn { max-width: none; }

/* ----- Mis viajes ----- */
.trips-head h1 { font-size: clamp(30px, 3.4vw, 42px); margin-top: 4px; }
.trips-head .trip-kicker { font-size: 28px; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 26px; }
.trip-tile { display: block; text-align: left; width: 100%; padding: 0; border: 0; background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); color: inherit; transition: transform .15s, box-shadow .15s; }
.trip-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(94,31,18,.12), 0 18px 44px rgba(94,31,18,.08); }
.trip-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(240, 179, 36, .6), var(--shadow); }
.tile-photo { position: relative; aspect-ratio: 16 / 10; background: var(--mint-100); }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,22,16,0) 40%, rgba(43,22,16,.7) 100%); }
.tile-photo .tile-name { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; color: white; }
.tile-name h2 { color: white; font-size: 26px; line-height: 1.1; }
.tile-kicker { font-family: var(--font-hand); font-size: 25px; line-height: 1; color: var(--coral-500); margin-bottom: 2px; text-shadow: 0 1px 10px rgba(0, 0, 0, .7), 0 0 2px rgba(0, 0, 0, .5); }
.tile-name h2, .tile-name span, .trip-photo-text { text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.tile-name span { display: block; margin-top: 4px; font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,.9); }
.tile-body { padding: 16px 20px 20px; display: grid; gap: 12px; }
.tile-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.tile-row b { color: var(--ink); white-space: nowrap; }
.tile-badge { justify-self: start; padding: 5px 11px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; background: var(--coral-100); color: var(--coral-600); }
.tile-badge.ok { background: #e9f7ef; color: #1d7a4a; }
.tile-cta { font-weight: 700; color: var(--mint-700); font-size: 15px; }
.empty { max-width: 560px; margin: 30px auto 0; text-align: center; }
.empty .big { font-size: 54px; }
.empty h2 { margin-top: 10px; }
.empty p { margin-top: 12px; color: var(--ink-2); }
.empty .btn { max-width: 320px; text-decoration: none; }

/* ----- Un viaje ----- */
.back-trips { margin: 0 0 14px; font-size: 15px; }
.trip-layout { padding-top: 0; }
.trip-photo img { object-position: center 40%; }
.progress-box { display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.pb-row { display: flex; justify-content: space-between; gap: 12px; }
.pb-row b { color: var(--ink); }
.bar { height: 8px; border-radius: 99px; background: rgba(127, 20, 35, .12); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--mint-700); transition: width .6s ease; }
.bar span.full { background: #2e9a5f; }

.panel-tabs { display: flex; gap: 4px; padding: 4px; background: var(--mint-50); border-radius: var(--radius-pill); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.panel-tabs::-webkit-scrollbar { display: none; }
.panel-tabs button { flex: 1 0 auto; height: 42px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: none; font-weight: 600; font-size: 15px; color: var(--ink-3); white-space: nowrap; }
.panel-tabs button.on { background: white; color: var(--mint-700); box-shadow: 0 1px 6px rgba(94, 31, 18, .12); }
.panel-tabs button .tab-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--coral-500); margin-left: 6px; vertical-align: 2px; }

/* Pagos (mismo diseño que /pagar) */
.balance { padding: 18px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(240, 179, 36, .2), rgba(240, 179, 36, .06)); border: 1px solid rgba(240, 179, 36, .45); }
.balance .lbl { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--coral-600); }
.balance .amt { font-family: var(--font-display); font-weight: 700; font-size: 48px; line-height: 1; letter-spacing: -.04em; color: var(--mint-700); margin-top: 8px; white-space: nowrap; }
.balance .bar { margin-top: 14px; }
.balance .cap { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.balance .cap b { color: var(--ink); }
.balance.is-done { background: #e9f7ef; border-color: #b8e4c9; }
.balance.is-done .lbl { color: #1d7a4a; }
.next-due { margin-top: 14px; display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--mint-50); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.next-due b { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.next-due .what { font-weight: 600; color: var(--ink); }
.next-due.is-overdue { background: #fdeceb; border-color: rgba(196, 22, 28, .3); }
.next-due.is-overdue b { color: var(--red-600); }
#pane-pagos .btn { text-decoration: none; }
.history-block { margin-top: 28px; display: grid; gap: 10px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.history li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.history li:last-child { border-bottom: 0; padding-bottom: 0; }
.history .h-amt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.history-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* Mis datos */
#pane-datos > .sub { margin-top: 0; }
.group { border: 0; padding: 22px 0 0; margin: 22px 0 0; border-top: 1px solid var(--line); min-width: 0; }
.group:first-of-type { border-top: 0; margin-top: 8px; padding-top: 8px; }
.group legend { padding: 0; font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--mint-700); display: flex; align-items: center; gap: 8px; }
.group .ok-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px dashed var(--ink-4); display: inline-grid; place-items: center; }
.group.is-done .ok-dot { border: 0; background: #2e9a5f; }
.group.is-done .ok-dot::after { content: ""; width: 9px; height: 5px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg) translate(1px, -1px); }
.group-hint { margin-top: 6px; font-size: 14px; color: var(--ink-3); }
.group .fields { margin-top: 16px; }
.group .chips { margin-top: 14px; }
.group #d-diet-notes-field { margin-top: 14px; }
.field-warn { font-size: 13px; font-weight: 600; color: #a35b00; }
.group .hint a { color: var(--mint-700); font-weight: 600; }
#email_ro { background: var(--mint-50); color: var(--ink-3); cursor: default; }
.group-hint b { color: var(--ink-2); }
.field-warn:empty { display: none; }
.locked-note { margin-bottom: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--mint-50); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.locked-note a { color: var(--mint-700); font-weight: 600; }
#d-consent-box { margin-top: 26px; }
.save-bar { position: sticky; bottom: 0; margin: 8px -32px -32px; padding: 4px 32px 24px; background: linear-gradient(180deg, rgba(255,255,255,0), white 22%); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.saved-msg { margin-top: 10px; text-align: center; font-size: 14.5px; font-weight: 600; color: #1d7a4a; min-height: 1.5em; }
.saved-msg.is-warn { color: #a35b00; }
#pane-datos.is-locked .group { opacity: .75; }

/* Acuerdo */
#pane-acuerdo h2 { font-size: 26px; }
.w-doc { margin-top: 18px; height: 360px; }
.w-doc h3 { font-size: 17px; margin: 18px 0 8px; }
.w-doc h3:first-child { margin-top: 0; }
.w-doc .w-head { text-align: center; margin-bottom: 14px; }
.w-doc .w-head b { display: block; color: var(--mint-700); font-family: var(--font-display); font-size: 17px; letter-spacing: .01em; }
.w-doc .w-head span { display: block; font-size: 13px; color: var(--ink-3); }
.w-doc ul { margin: 0 0 12px; padding-left: 20px; }
.w-doc li { margin-bottom: 6px; }
.w-doc .w-party { color: var(--ink); font-weight: 600; }
.w-doc .w-health { white-space: pre-wrap; }
#w-need-doc { margin-top: 16px; }
#w-sign .fields { gap: 18px; }
#w-sign .fields { margin-top: 20px; }
#w-accept-box { margin-top: 16px; }
.accepted-box { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); background: #e9f7ef; border: 1px solid #b8e4c9; font-size: 14.5px; color: #17603a; }
.accepted-box b { color: #0f4a2b; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 22px; padding: 0; }
  .auth-intro p { font-size: 16px; }
  .trip-layout .trip-photo { aspect-ratio: 16 / 9; }
  .balance .amt { font-size: 42px; }
  .save-bar { margin: 8px -18px -24px; padding: 4px 18px 18px; }
}
@media (max-width: 560px) {
  .mv-main { padding: 22px 0 48px; }
  .fields.three { grid-template-columns: 1fr 1fr; }
  .fields.three .field:last-child { grid-column: 1 / -1; }
  .nav-email { display: none; }
  .trip-grid { grid-template-columns: 1fr; }
  .panel-tabs button { padding: 0 12px; font-size: 14px; }
}
