/* ═══════════════════════════════════════════════════════════════
   AquaTour — Tema marino (CSS puro, sin framework)
   Paleta: azul profundo #0b5d7b · turquesa #0fa3a3 · fondo #f2f8fa
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #f2f8fa;
  --fg: #0d2b3e;
  --card: #ffffff;
  --primary: #0b5d7b;
  --primary-fg: #fdfeff;
  --secondary: #e3f0f4;
  --secondary-fg: #0b5d7b;
  --muted: #e8f1f4;
  --muted-fg: #56788a;
  --accent: #d9f1ef;
  --accent-fg: #0b5d7b;
  --teal: #0fa3a3;
  --teal-fg: #ffffff;
  --border: #d3e4ea;
  --input: #c6dde5;
  --danger: #dc2626;
  --ok: #12805c;
  --warn: #b45309;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 43, 62, .06), 0 6px 18px rgba(13, 43, 62, .07);
  --shadow-lg: 0 10px 34px rgba(11, 93, 123, .18);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main { flex: 1 0 auto; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 18px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.28rem; }
h3 { font-size: 1.05rem; }
p  { margin: .35rem 0; }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted  { color: var(--muted-fg); }
.small  { font-size: .85rem; }
.center { text-align: center; }
.right  { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }

/* ── Barra superior ─────────────────────────────────────────── */
.topbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  color: var(--fg);
  font-weight: 600;
}
.brand:hover { text-decoration: none; }
.brand strong { color: var(--primary); }
.brand-icon { font-size: 1.35rem; }
.brand-light { color: #fff; }
.brand-light strong { color: #9fe3e0; }

.topnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topnav a {
  color: var(--secondary-fg);
  padding: 7px 12px;
  border-radius: 10px;
  font-weight: 500;
  font-size: .93rem;
}
.topnav a:hover { background: var(--secondary); text-decoration: none; }
.topnav .nav-login {
  background: var(--primary);
  color: var(--primary-fg);
}
.topnav .nav-login:hover { background: #094b64; }
.topnav .nav-out { color: var(--danger); }
.topnav .nav-panel { background: var(--accent); color: var(--accent-fg); font-weight: 600; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, #083a52 0%, #0b5d7b 45%, #0fa3a3 100%);
  color: #fff;
  padding: 58px 0 84px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -2px 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0,32 C240,64 480,0 720,24 C960,48 1200,16 1440,36 L1440,60 L0,60 Z' fill='%23f2f8fa'/%3E%3C/svg%3E") repeat-x bottom / 100% 100%;
}
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: .4rem; }
.hero .lead { font-size: 1.06rem; opacity: .94; max-width: 640px; }
.hero .hero-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: .85rem;
  margin-bottom: 14px;
}

/* ── Tarjetas y secciones ───────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.section { padding: 34px 0 10px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

/* ── Rejillas ───────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Tarjeta de tour ────────────────────────────────────────── */
.tour-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.tour-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tour-media {
  height: 130px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.tour-media .emoji {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3));
}
.tour-media .price-chip {
  margin-left: auto;
  background: rgba(255, 255, 255, .92);
  color: var(--primary);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: .85rem;
  font-weight: 700;
  text-shadow: none;
}
.media-isla    { background: linear-gradient(135deg, #0ea5b7, #0b5d7b); }
.media-sunset  { background: linear-gradient(135deg, #e9c46a, #e76f51); }
.media-snorkel { background: linear-gradient(135deg, #0fa3a3, #264653); }
.media-buceo   { background: linear-gradient(135deg, #264653, #0b5d7b); }
.tour-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tour-desc { color: var(--muted-fg); font-size: .9rem; flex: 1; }
.tour-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted-fg); font-size: .84rem; }
.includes { margin: 0; padding-left: 18px; color: var(--muted-fg); font-size: .87rem; }
.includes li { margin: 2px 0; }

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--primary);
  color: var(--primary-fg);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s;
  text-decoration: none !important;
}
.btn:hover { background: #094b64; }
.btn:active { transform: scale(.98); }
.btn-teal   { background: var(--teal); }
.btn-teal:hover { background: #0c8f8f; }
.btn-ghost  { background: transparent; color: var(--primary); border-color: var(--input); }
.btn-ghost:hover { background: var(--secondary); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-wa     { background: #1faa53; }
.btn-wa:hover { background: #178c43; }
.btn-sm     { padding: 5px 11px; font-size: .84rem; border-radius: 8px; }
.btn-lg     { padding: 12px 26px; font-size: 1.02rem; }
.btn-block  { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #e8f4f8; }
.btn-white-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-white-ghost:hover { background: rgba(255,255,255,.12); }

/* ── Formularios ────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field > label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--secondary-fg); }
.field .hint { font-size: .78rem; color: var(--muted-fg); margin-top: 3px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="time"], input[type="password"], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--input);
  border-radius: 10px;
  font: inherit;
  color: var(--fg);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.radio-cards { display: grid; gap: 10px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color .12s, background .12s;
}
.radio-card:hover { border-color: var(--teal); }
.radio-card input { accent-color: var(--teal); }
.radio-card.selected, .radio-card:has(input:checked) {
  border-color: var(--teal);
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
}

/* Contador de pasajeros */
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--input);
  background: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}
.stepper button:hover { background: var(--secondary); }
.stepper input { width: 64px; text-align: center; }
.stepper .lbl { flex: 1; font-weight: 600; font-size: .92rem; }
.stepper .lbl small { display: block; color: var(--muted-fg); font-weight: 400; }

/* Pasos del wizard */
.steps { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.step {
  flex: 1;
  min-width: 120px;
  text-align: center;
  font-size: .8rem;
  color: var(--muted-fg);
  padding: 7px 6px;
  border-bottom: 3px solid var(--border);
}
.step b { display: block; font-size: .9rem; }
.step.active { color: var(--primary); border-color: var(--teal); font-weight: 700; }
.step.done { color: var(--ok); border-color: var(--ok); }

/* Horarios como fichas seleccionables */
.sched-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sched-chip {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
  display: block;
}
.sched-chip:has(input:checked) { border-color: var(--teal); background: var(--accent); }
.sched-chip .t { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.sched-chip .a { font-size: .78rem; color: var(--muted-fg); }
.sched-chip.full { opacity: .45; pointer-events: none; }

/* ── Tablas ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted-fg);
  padding: 9px 10px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f6fbfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 800; border-top: 2px solid var(--border); background: #f2f8fa; }

/* ── Insignias ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-ok   { background: #d8f3e8; color: var(--ok); }
.badge-info { background: #dcedf5; color: var(--primary); }
.badge-bad  { background: #fde3e3; color: var(--danger); }
.badge-warn { background: #fdf0dc; color: var(--warn); }

/* ── Alertas ────────────────────────────────────────────────── */
.alert {
  background: #d8f3e8;
  color: var(--ok);
  border: 1px solid #b6e5d0;
  border-radius: 12px;
  padding: 11px 15px;
  margin: 14px auto;
  max-width: 1100px;
  font-weight: 500;
}
.alert-bad { background: #fde3e3; color: var(--danger); border-color: #f5c2c2; }

/* ── KPIs ───────────────────────────────────────────────────── */
.kpi { padding: 16px 18px; }
.kpi .k-lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); font-weight: 700; }
.kpi .k-val { font-size: 1.65rem; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: .8rem; color: var(--muted-fg); }
.kpi-teal .k-val { color: var(--teal); }
.kpi-coral .k-val { color: #e76f51; }

/* Barra de ocupación / canal */
.meter { background: var(--muted); border-radius: 999px; height: 10px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--primary)); }
.chan-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.chan-bar .on  { background: var(--teal); }
.chan-bar .pos { background: var(--primary); }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted-fg); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* ── Pase de abordar (boleto) ───────────────────────────────── */
.ticket {
  max-width: 640px;
  margin: 26px auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fff;
  border: 1px solid var(--border);
  position: relative;
}
.ticket-head {
  background: linear-gradient(135deg, #083a52, #0b5d7b 55%, #0fa3a3);
  color: #fff;
  padding: 22px 26px;
  position: relative;
}
.ticket-head .tk-brand { font-size: .85rem; opacity: .85; letter-spacing: .12em; text-transform: uppercase; }
.ticket-head h1 { font-size: 1.35rem; margin: 4px 0 30px; padding-right: 150px; }
.ticket-head .folio {
  position: absolute;
  right: 26px; top: 22px;
  text-align: right;
}
.ticket-head .folio .f { font-size: 1.1rem; font-weight: 800; letter-spacing: .05em; }
.ticket-body { padding: 22px 26px; display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.ticket-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; align-content: start; }
.tk-item .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); font-weight: 700; }
.tk-item .v { font-weight: 600; font-size: .95rem; }
.ticket-qr { text-align: center; }
.ticket-qr img { width: 148px; height: 148px; border: 1px solid var(--border); border-radius: 12px; padding: 6px; background: #fff; }
.ticket-qr .cap { font-size: .72rem; color: var(--muted-fg); margin-top: 4px; }
.ticket-perf {
  position: relative;
  border-top: 2px dashed var(--input);
  margin: 0 22px;
}
.ticket-perf::before, .ticket-perf::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
}
.ticket-perf::before { left: -34px; }
.ticket-perf::after  { right: -34px; }
.ticket-foot { padding: 14px 26px 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ticket-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ticket-status { position: absolute; left: 26px; bottom: 14px; }
.ticket-head .badge { font-size: .8rem; }
@media (max-width: 560px) {
  .ticket-body { grid-template-columns: 1fr; }
  .ticket-qr { order: -1; }
  .ticket-info { grid-template-columns: 1fr; }
  .ticket-head .folio { position: static; text-align: left; margin-bottom: 8px; }
  .ticket-head h1 { padding-right: 0; margin-bottom: 12px; }
  .ticket-status { position: static; display: inline-block; }
}
.ticket.cancelled { filter: grayscale(.35); }
.ticket.cancelled::before {
  content: "CANCELADO";
  position: absolute;
  top: 45%; left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(220, 38, 38, .18);
  border: 5px solid rgba(220, 38, 38, .18);
  border-radius: 16px;
  padding: 4px 24px;
  z-index: 5;
}

/* ── POS / paneles ──────────────────────────────────────────── */
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: 18px 0; }
.subnav a {
  padding: 7px 13px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--secondary-fg);
  background: #fff;
  border: 1px solid var(--border);
}
.subnav a:hover { text-decoration: none; border-color: var(--teal); }
.subnav a.active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

.ultima-venta {
  border: 1.5px dashed var(--teal);
  background: linear-gradient(180deg, #f2fbfb, #fff);
  border-radius: var(--radius);
  padding: 18px;
}
.ultima-venta .folio { font-size: 1.25rem; font-weight: 800; color: var(--primary); letter-spacing: .04em; }

.route-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.route-row:last-child { border-bottom: none; }
.route-row .r-zone { font-weight: 700; min-width: 170px; }
.route-row .r-meta { color: var(--muted-fg); font-size: .88rem; flex: 1; }
.route-row form { display: flex; gap: 6px; align-items: center; }

.pax-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.pax-row:last-child { border-bottom: none; }
.pax-row .p-name { font-weight: 600; flex: 1; min-width: 160px; }
.pax-row form { display: flex; gap: 5px; }
.pax-row input[type="time"] { width: 96px; }

.resumen { background: var(--secondary); border-radius: 12px; padding: 14px 16px; }
.resumen .line { display: flex; justify-content: space-between; padding: 3px 0; font-size: .93rem; }
.resumen .line.total { border-top: 2px solid var(--input); margin-top: 7px; padding-top: 8px; font-weight: 800; font-size: 1.05rem; color: var(--primary); }

/* ── Pie de página ──────────────────────────────────────────── */
.footer { flex-shrink: 0; background: #08313f; color: #cfe3ea; margin-top: 44px; }
.footer-in { display: flex; justify-content: space-between; gap: 18px; padding: 26px 18px 10px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.footer-links a { color: #9fc7d4; }
.footer-note { font-size: .85rem; color: #8fb3c2; }
.footer-copy { text-align: center; font-size: .78rem; color: #6d93a3; padding: 10px 0 16px; border-top: 1px solid rgba(255,255,255,.08); }

/* ── Impresión ──────────────────────────────────────────────── */
@media print {
  body { background: #fff; }
  .no-print, .topbar, .footer, .alert { display: none !important; }
  .main { padding: 0 !important; }
  .ticket, .card { box-shadow: none !important; border: 1px solid #bbb; }
  .ticket { max-width: 100%; margin: 0; }
  .print-area { padding: 0 !important; }
  a { text-decoration: none; color: #000; }
}

