/* =====================================================================
   Parkia · Hoja de estilos
   ===================================================================== */
:root {
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --brand-200: #99f6e4;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --brand-700: #0f766e;
  --brand-800: #115e59;
  --brand-900: #134e4a;
  --accent: #fbbf24;
  --accent-600: #d97706;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #a16207;
  --warning-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --info: #1d4ed8;
  --info-bg: #dbeafe;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 48px -20px rgba(15, 23, 42, .28);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-800); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-weight: 800; }
.h3, h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
code { font-family: var(--mono); font-size: .88em; background: #eef2f7; padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.narrow-lg { max-width: 980px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.strong { font-weight: 700; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.break { word-break: break-word; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Marca ---------- */
.brand { flex-shrink: 0; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.brand .logo-mark { width: 36px; height: 36px; color: var(--brand-700); }
.brand-sm { font-size: 1.1rem; } .brand-sm .logo-mark { width: 28px; height: 28px; }
.brand-light { color: #fff; } .brand-light .logo-mark { color: rgba(255,255,255,.18); }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.nav-toggle { display: none; cursor: pointer; width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 1px solid var(--line); background: #fff; padding: 0; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .94rem; padding: 8px 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; }
.nav-link:hover { background: var(--brand-50); color: var(--brand-800); }
.nav-link.is-active { color: var(--brand-800); background: var(--brand-50); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.icon-btn { position: relative; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; color: var(--ink-2); }
.icon-btn:hover { background: var(--brand-50); color: var(--brand-800); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-700); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.inline-form { display: inline; margin: 0; }

@media (max-width: 1180px) {
  .role-admin .nav-link { padding: 8px 9px; font-size: .9rem; }
  .role-admin .nav-user-name { display: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; align-items: stretch; background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); gap: 2px; }
  .nav-link { padding: 12px 14px; font-size: 1rem; }
  .nav-actions { margin: 10px 0 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
  .nav-open .main-nav { display: flex; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

.verify-banner { background: var(--warning-bg); color: #78350f; font-size: .92rem; padding: 10px 0; border-bottom: 1px solid #fde68a; }
.verify-banner a { color: #78350f; font-weight: 700; }

.site-main { flex: 1; padding-bottom: 56px; }

/* ---------- Pie ---------- */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 40px 0; margin-top: auto; }
.site-footer .brand { color: #fff; } .site-footer .logo-mark { color: var(--brand-600); }
.site-footer .muted { color: #94a3b8; }
.footer-inner { display: grid; gap: 24px; grid-template-columns: 1.2fr 2fr; align-items: start; }
.footer-inner > .small { grid-column: 1 / -1; border-top: 1px solid #1e293b; padding-top: 20px; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: flex-end; }
.footer-links a { color: #e2e8f0; text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } }

/* ---------- Botones ---------- */
.btn {
  --b: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, box-shadow .15s, transform .05s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn[disabled], .btn.is-loading { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand-700); color: #fff; box-shadow: 0 6px 16px -8px rgba(15,118,110,.7); }
.btn-primary:hover { background: var(--brand-800); color: #fff; }
.btn-accent { background: var(--accent); color: #111827; }
.btn-accent:hover { background: #f59e0b; color: #111827; }
.btn-soft { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-100); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-900); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: #fecaca; }
.btn-danger-ghost:hover { background: var(--danger-bg); color: var(--danger); }
.btn-sm { padding: 8px 13px; font-size: .88rem; border-radius: 10px; }
.btn-xs { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Tarjetas y estructura ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card, .page > .card, .page > section.card { margin-top: 20px; }
.card-title { font-size: 1.15rem; margin-bottom: 16px; }
.card-subtitle { font-size: .95rem; font-weight: 700; margin: 0 0 10px; color: var(--ink-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-dark { background: linear-gradient(135deg, #0b3b37 0%, #0f766e 60%, #0d9488 100%); color: #e6fffb; border: 0; }
.card-dark h2 { color: #fff; }
.link-card { text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
.link-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow); color: inherit; }
.page { padding-top: 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.section-title { margin: 32px 0 14px; font-size: 1.3rem; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.back-link:hover { color: var(--brand-700); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2.tight, .grid-3.tight { gap: 12px; }
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card { margin-top: 0; }
.page .grid-2 + .card, .page .grid-3 + .card, .page .grid-4 + .card, .page .grid-4 + .checkin-card { margin-top: 20px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 20px; }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; color: var(--brand-700); margin: 0 0 8px; }
.eyebrow-light { color: var(--accent); }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-end { justify-content: flex-end; }
label, .label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 13px; width: 100%;
  transition: border-color .15s, box-shadow .15s; min-height: 46px;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(20,184,166,.18); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #f87171; background: #fffafa; }
input[disabled] { background: #f1f5f9; color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--brand-700); flex: none; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; line-height: 1.4; }
.check input { margin-top: 2px; }
.check-lg { font-weight: 700; font-size: 1rem; margin-bottom: 14px; }
.help { font-size: .84rem; color: var(--muted); margin: 0; }
.field-error { color: var(--danger); font-size: .84rem; font-weight: 600; margin: 2px 0 0; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: #f1f5f9; color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.plate-input, .code-input { text-transform: uppercase; font-family: var(--mono); letter-spacing: .12em; font-weight: 700; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #eef2f6; padding: 4px; border-radius: 12px; gap: 4px; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 9px 10px; border-radius: 9px; font-weight: 700; font-size: .92rem; color: var(--ink-2); transition: background-color .15s, color .15s; }
.segmented input:checked + span { background: #fff; color: var(--brand-800); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 3px solid var(--brand-500); }
.inline-field input { min-height: 40px; padding: 7px 10px; }
.inline-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.inline-group input { width: 110px; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-inline-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .form-inline-grid { grid-template-columns: 1fr 1fr; } .form-inline-grid .btn { grid-column: 1 / -1; } }
fieldset.card { margin: 0; min-width: 0; }
fieldset.card legend { float: left; width: 100%; margin-bottom: 14px; padding: 0; }
fieldset.card legend + * { clear: both; }

/* ---------- Avisos ---------- */
.flash-stack { display: grid; gap: 10px; margin-top: 18px; }
.flash { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 14px; border: 1px solid; font-weight: 500; animation: flash-in .25s ease-out; }
.flash p { margin: 0; flex: 1; }
.flash-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; color: #fff; }
.flash-close { background: none; border: 0; font-size: 1.3rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 0 4px; }
.flash-close:hover { opacity: 1; }
.flash-success { background: var(--success-bg); border-color: #bbf7d0; color: #14532d; } .flash-success .flash-icon { background: var(--success); }
.flash-error { background: var(--danger-bg); border-color: #fecaca; color: #7f1d1d; } .flash-error .flash-icon { background: var(--danger); }
.flash-warning { background: var(--warning-bg); border-color: #fde68a; color: #78350f; } .flash-warning .flash-icon { background: var(--accent-600); }
.flash-info { background: var(--info-bg); border-color: #bfdbfe; color: #1e3a8a; } .flash-info .flash-icon { background: var(--info); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.notice { padding: 12px 14px; border-radius: 12px; border: 1px solid; margin: 14px 0; }
.notice-info { background: var(--info-bg); border-color: #bfdbfe; color: #1e3a8a; }
.notice-success { background: var(--success-bg); border-color: #bbf7d0; color: #14532d; }
.notice-warning { background: var(--warning-bg); border-color: #fde68a; color: #78350f; }
.notice-danger { background: var(--danger-bg); border-color: #fecaca; color: #7f1d1d; }
.notice a { color: inherit; font-weight: 700; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: #f1f5f9; color: #475569; }

.empty-state { text-align: center; padding: 36px 20px; }
.empty-state.compact { padding: 16px 8px; text-align: left; }
.empty-state .btn { margin-top: 10px; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.card { padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; background: #f8fafc; white-space: nowrap; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table tr.is-today th, .table tr.is-today td { background: var(--brand-50); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .actions form { margin: 0; }
.table-compact th, .table-compact td { padding: 8px 10px; }
.capacity-table input { min-width: 100px; }
.plate { display: inline-block; font-family: var(--mono); font-weight: 800; letter-spacing: .08em; background: #fde047; color: #111; border: 2px solid #111; border-radius: 6px; padding: 1px 7px; font-size: .86rem; }
.plate-lg { font-size: 1.1rem; padding: 4px 12px; }

.tabs { display: inline-flex; background: #eef2f6; padding: 4px; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.tab { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .88rem; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: #fff; color: var(--brand-800); box-shadow: var(--shadow-sm); }
.filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; padding: 16px; }
.filters .field { min-width: 180px; flex: 1; }
.filters .check { align-self: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 20px; }

/* ---------- Estadísticas ---------- */
.stat-card { padding: 18px 20px; }
.stat-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; margin: 0; color: var(--ink); }
.stat-value small { font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat-card.accent { background: var(--brand-700); border-color: var(--brand-700); }
.stat-card.accent .stat-label { color: var(--brand-100); }
.stat-card.accent .stat-value { color: #fff; }

/* ---------- Inicio ---------- */
.hero { position: relative; padding: 56px 0 64px; overflow: hidden; background:
  radial-gradient(900px 420px at 85% -10%, rgba(20,184,166,.20), transparent 60%),
  radial-gradient(700px 380px at -5% 110%, rgba(251,191,36,.18), transparent 60%),
  linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.06; letter-spacing: -.04em; }
.hero .hl { background: linear-gradient(90deg, var(--brand-700), var(--brand-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero-stats { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand-800); }
.hero-stats span { font-size: .88rem; color: var(--muted); font-weight: 600; }
.hero-card { box-shadow: var(--shadow-lg); padding: 26px; border-radius: 24px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } .hero { padding-top: 32px; } }

.search-form { display: grid; gap: 14px; }
.search-hero { grid-template-columns: 1fr 1fr; }
.search-hero .field-city, .search-hero .field-type, .search-hero .search-actions { grid-column: 1 / -1; }
.search-hero .field-duration { grid-column: 1 / -1; }
.search-actions { display: flex; gap: 10px; }
.search-actions .btn-primary { flex: 1; }
.search-bar-wrap { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 0; }
.search-bar { grid-template-columns: 1.1fr 1fr 1fr .8fr 1fr auto; align-items: end; }
@media (max-width: 1100px) { .search-bar { grid-template-columns: repeat(3, 1fr); } .search-bar .search-actions { grid-column: 1 / -1; } }
@media (max-width: 560px) { .search-bar, .search-hero { grid-template-columns: 1fr 1fr; } .search-bar .field-city, .search-bar .field-type, .search-bar .field-duration { grid-column: 1 / -1; } }

.section { padding: 64px 0; }
.section-tint { background: linear-gradient(180deg, #eefbf8, #f6f8fb); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; padding-top: 28px; }
.step-num { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-700); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.step p { color: var(--ink-2); margin: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.owner-cta { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: center; padding: 40px; }
.owner-cta p { color: #ccfbf1; }
.owner-cta-actions { display: flex; justify-content: flex-end; }
@media (max-width: 860px) { .owner-cta { grid-template-columns: 1fr; padding: 28px 22px; } .owner-cta-actions { justify-content: flex-start; } }
.check-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-100); color: var(--brand-800); font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.check-light li { color: #ecfeff; } .check-light li::before { background: rgba(255,255,255,.15); color: var(--accent); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--brand-700); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--ink-2); padding-bottom: 12px; }

.hour-pills { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .88rem; }
.pill small { font-weight: 600; opacity: .8; }
.pill-hot { background: #fee2e2; color: #991b1b; }
.pill-calm { background: #dcfce7; color: #166534; }

/* ---------- Búsqueda ---------- */
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; padding-top: 24px; align-items: start; }
.results-head { margin-bottom: 16px; }
.results-head h1 { margin-bottom: 4px; }
.map-panel { position: sticky; top: 86px; }
.map { width: 100%; height: calc(100vh - 120px); min-height: 360px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #e5eef0; overflow: hidden; z-index: 1; }
.map-sm { height: 240px; min-height: 0; margin: 16px 0 12px; }
.map-md { height: 320px; min-height: 0; margin: 10px 0 14px; cursor: crosshair; }
@media (max-width: 1000px) {
  .search-layout { grid-template-columns: 1fr; }
  .map-panel { position: static; order: -1; }
  .map-panel .map { height: 300px; }
}
.lot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.lot-card { display: grid; grid-template-columns: 1fr auto; gap: 16px; transition: border-color .15s, box-shadow .15s; }
.lot-card:hover, .lot-card.is-highlight { border-color: var(--brand-200); box-shadow: var(--shadow); }
.lot-card.is-full { opacity: .78; }
.lot-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.lot-name { font-size: 1.1rem; margin: 0; }
.lot-name a { color: var(--ink); text-decoration: none; }
.lot-name a:hover { color: var(--brand-700); }
.lot-card .muted { margin-bottom: 8px; font-size: .92rem; }
.lot-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lot-meta span { font-size: .8rem; font-weight: 600; background: #f1f5f9; color: var(--ink-2); border-radius: 8px; padding: 4px 9px; }
.lot-card-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; text-align: right; }
.price { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.price small { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.capacity-bar { height: 6px; border-radius: 3px; background: #eef2f6; margin-top: 12px; overflow: hidden; }
.capacity-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-600), var(--brand-500)); border-radius: 3px; transition: width .6s ease; }
@media (max-width: 560px) { .lot-card { grid-template-columns: 1fr; } .lot-card-side { flex-direction: row; align-items: center; text-align: left; } }

/* Marcadores del mapa */
.pk-marker { display: grid; place-items: center; min-width: 38px; height: 30px; padding: 0 8px; border-radius: 10px; background: var(--brand-700); color: #fff; font: 800 13px/1 var(--font); box-shadow: 0 4px 12px rgba(0,0,0,.25); border: 2px solid #fff; position: relative; white-space: nowrap; }
.pk-marker::after { content: ""; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--brand-700); border-bottom: 0; }
.pk-marker.is-low { background: var(--accent-600); } .pk-marker.is-low::after { border-top-color: var(--accent-600); }
.pk-marker.is-full { background: #64748b; } .pk-marker.is-full::after { border-top-color: #64748b; }
.pk-user { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); }
.leaflet-popup-content { font-family: var(--font); }
.leaflet-popup-content a.btn { color: #fff; margin-top: 8px; }

/* ---------- Detalle del parqueadero ---------- */
.breadcrumbs { display: flex; gap: 8px; font-size: .9rem; color: var(--muted); padding: 22px 0 10px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }
.lot-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.lot-info > * + * { margin-top: 18px; }
.lot-header h1 { margin-bottom: 4px; }
.lot-description { color: var(--ink-2); white-space: normal; }
.booking-panel { position: sticky; top: 86px; }
.booking-card { box-shadow: var(--shadow-lg); border-radius: 22px; }
@media (max-width: 1000px) { .lot-layout { grid-template-columns: 1fr; } .booking-panel { position: static; order: -1; } }
.quote { background: #f8fafc; border: 1px dashed var(--line-2); border-radius: 14px; padding: 14px; }
.quote-msg { font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.quote-msg.is-ok { color: var(--success); }
.quote-msg.is-error { color: var(--danger); }
.quote-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; }
.quote-total strong { font-size: 1.5rem; letter-spacing: -.02em; }
.quote.is-loading { opacity: .6; }
.day-profile { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; margin-top: 12px; }
.day-slot { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; background: #fff; cursor: pointer; font: inherit; transition: transform .1s, border-color .15s; }
.day-slot:hover:not([disabled]) { border-color: var(--brand-500); transform: translateY(-1px); }
.day-slot strong { display: block; font-size: .78rem; color: var(--muted); font-weight: 700; }
.day-slot span { display: block; font-size: 1.05rem; font-weight: 800; }
.day-slot.is-good span { color: var(--success); }
.day-slot.is-low { background: #fffbeb; } .day-slot.is-low span { color: var(--accent-600); }
.day-slot.is-full { background: #fef2f2; } .day-slot.is-full span { color: var(--danger); }
.day-slot[disabled] { opacity: .45; cursor: not-allowed; background: #f8fafc; }
.day-slot.is-selected { border-color: var(--brand-700); box-shadow: 0 0 0 2px var(--brand-500) inset; }
.recs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .recs { grid-template-columns: 1fr; } }
.schedule { list-style: none; padding: 0; margin: 0; }
.schedule li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.schedule li:last-child { border-bottom: 0; }
.schedule li.is-today { font-weight: 800; color: var(--brand-800); }

/* ---------- Mapa de calor ---------- */
.heatmap-wrap { overflow-x: auto; margin: 12px 0 8px; -webkit-overflow-scrolling: touch; }
.heatmap { border-collapse: separate; border-spacing: 3px; font-size: .74rem; min-width: 100%; }
.heatmap th { font-weight: 700; color: var(--muted); padding: 2px 4px; text-align: center; white-space: nowrap; }
.heatmap th small { display: block; font-weight: 600; font-size: .62rem; }
.heatmap tbody th, .heatmap thead th:first-child { text-align: left; padding-right: 8px; width: 1%; }
.heatmap tr.is-today th { color: var(--brand-800); }
.heatmap td { min-width: 24px; height: 26px; border-radius: 6px; }
.hm-na { background: #f1f5f9; }
.hm-closed { background: repeating-linear-gradient(135deg, #f8fafc, #f8fafc 4px, #e2e8f0 4px, #e2e8f0 6px); }
.hm-0 { background: #ecfdf5; } .hm-1 { background: #d1fae5; } .hm-2 { background: #a7f3d0; }
.hm-3 { background: #bef264; } .hm-4 { background: #fde68a; } .hm-5 { background: #fcd34d; }
.hm-6 { background: #fbbf24; } .hm-7 { background: #fb923c; } .hm-8 { background: #f97316; }
.hm-9 { background: #ef4444; } .hm-10 { background: #b91c1c; }
.heatmap-legend { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; margin-top: 8px; }
.legend-scale { display: inline-flex; gap: 3px; }
.legend-scale i, .legend-closed i { display: inline-block; width: 18px; height: 12px; border-radius: 3px; vertical-align: middle; }
.legend-closed { margin-left: auto; }

/* ---------- Reservas ---------- */
.res-list { list-style: none; margin: 0; padding: 0; }
.res-list.card { padding: 6px; }
.res-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center; padding: 14px; border-radius: 12px; text-decoration: none; color: inherit; }
.res-item:hover { background: #f8fafc; color: inherit; }
.res-list li + li .res-item { border-top: 1px solid var(--line); border-radius: 0; }
.res-item strong { display: block; }
.res-item small { color: var(--muted); font-size: .84rem; }
@media (max-width: 640px) { .res-item { grid-template-columns: 1fr auto; } .res-when { grid-column: 1 / -1; } }
.ticket { padding: 0; overflow: hidden; }
.ticket-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 24px 24px 18px; }
.ticket-lot { font-size: 1.5rem; margin: 0 0 4px; }
.ticket-code { background: linear-gradient(135deg, var(--brand-800), var(--brand-600)); color: #fff; text-align: center; padding: 22px 16px; position: relative; }
.ticket-code .muted { color: var(--brand-100); display: block; }
.ticket-code strong { font-family: var(--mono); font-size: clamp(1.9rem, 7vw, 2.7rem); letter-spacing: .14em; display: block; margin-top: 4px; }
.ticket-code::before, .ticket-code::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); transform: translateY(-50%); }
.ticket-code::before { left: -11px; } .ticket-code::after { right: -11px; }
.ticket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 22px 24px; margin: 0; }
.ticket-grid dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.ticket-grid dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 600px) { .ticket-grid { grid-template-columns: 1fr 1fr; } }
.ticket > .notice, .ticket > .pay-box, .ticket > .btn, .ticket > .ticket-actions { margin-left: 24px; margin-right: 24px; }
.ticket > .btn { margin-bottom: 8px; }
.pay-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 18px; }
.pay-box > * + * { margin-top: 12px; }
.countdown { font-family: var(--mono); font-size: 1.15rem; color: var(--accent-600); }
.countdown.is-expired { color: var(--danger); }
.ticket-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-bottom: 24px; }
.ticket-actions form { margin: 0; }
.vehicle-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.vehicle { display: flex; align-items: center; gap: 18px; padding: 16px 20px; }
.vehicle > span:nth-child(2) { flex: 1; }
.vehicle form { margin: 0; }

/* ---------- Panel del dueño ---------- */
.checkin-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 20px; background: linear-gradient(90deg, #ffffff, var(--brand-50)); }
.checkin-card h2 { margin: 0 0 4px; }
.checkin-form { display: flex; gap: 10px; flex-wrap: wrap; }
.checkin-form .code-input { width: 180px; font-size: 1.1rem; }
.owner-lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .owner-lots { grid-template-columns: 1fr; } }
.owner-lot-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.owner-lot-head h3, .owner-lot-head h2 { margin: 0 0 4px; }
.spaces-form { margin: 14px 0; padding: 14px; background: #f8fafc; border-radius: 14px; }
.spaces-form .label { display: block; margin-bottom: 10px; }
.spaces-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.space-box input { font-size: 1.2rem; font-weight: 800; }
.space-box p { margin: 6px 0 0; color: var(--ink-2); }
.owner-lot-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.owner-lot-actions form { margin: 0; }
.report-form label { display: block; font-weight: 500; margin-top: 10px; }
.hours-grid { display: grid; gap: 10px; }
.hours-grid.is-disabled { opacity: .45; pointer-events: none; }
.hours-row { display: grid; grid-template-columns: 110px 170px 16px 170px 1fr; gap: 10px; align-items: center; }
.hours-row .field-error { grid-column: 1 / -1; }
.hours-day { font-weight: 700; }
@media (max-width: 640px) { .hours-row { grid-template-columns: 1fr 1fr; } .hours-row > span[aria-hidden] { display: none; } .hours-day { grid-column: 1 / -1; } }

/* ---------- Administración ---------- */
.admin-lots { display: grid; gap: 14px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.admin-actions form { margin: 0; }
.reject-form { display: flex; gap: 8px; }
.reject-form input { min-height: 36px; padding: 6px 10px; width: 240px; }
.bar-chart { list-style: none; padding: 0; margin: 16px 0 0; display: flex; align-items: flex-end; gap: 8px; height: 200px; }
.bar-chart li { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bar-chart .bar { width: 100%; max-width: 42px; height: 0; background: linear-gradient(180deg, var(--brand-500), var(--brand-700)); border-radius: 8px 8px 3px 3px; transition: height .6s ease; }
.bar-chart small { font-size: .7rem; color: var(--muted); }
.kv { margin: 0; display: grid; gap: 14px; }
.kv > div { display: grid; grid-template-columns: 200px 1fr; gap: 12px; }
.kv dt { font-weight: 700; color: var(--ink-2); }
.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 640px) { .kv > div { grid-template-columns: 1fr; gap: 4px; } }

.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.notif-list li:last-child { border-bottom: 0; }
.notif-list li.is-unread { background: var(--brand-50); }
.notif-list li.is-unread .notif-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-600); margin-right: 8px; vertical-align: middle; }
.notif-title { font-weight: 700; margin-bottom: 2px; }
.notif-list .muted { margin-bottom: 4px; }

.prose h2 { font-size: 1.2rem; margin-top: 28px; }
.prose ul { padding-left: 1.2em; } .prose li { margin-bottom: 6px; }

/* ---------- Autenticación ---------- */
.auth-body { background: #fff; }
.auth-shell { display: grid; grid-template-columns: 460px 1fr; min-height: 100vh; }
.auth-aside { background: linear-gradient(160deg, #0b3b37 0%, #0f766e 55%, #14b8a6 130%); color: #e6fffb; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(251,191,36,.18); }
.auth-pitch h2 { color: #fff; font-size: 2rem; line-height: 1.15; }
.auth-aside .check-list li { color: #ecfeff; }
.auth-aside .check-list li::before { background: rgba(255,255,255,.18); color: var(--accent); }
.auth-aside-foot { font-size: .85rem; color: var(--brand-100); position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-title { font-size: 1.8rem; margin-bottom: 6px; }
.auth-card form { margin-top: 22px; }
.auth-switch { text-align: center; margin-top: 22px; color: var(--muted); }
.auth-mobile-brand { display: none; margin-bottom: 26px; }
.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-option { position: relative; cursor: pointer; }
.role-option input { position: absolute; opacity: 0; }
.role-option span { display: block; border: 2px solid var(--line); border-radius: 14px; padding: 14px; transition: border-color .15s, background-color .15s; height: 100%; }
.role-option strong { display: block; color: var(--ink); }
.role-option small { color: var(--muted); font-weight: 500; }
.role-option input:checked + span { border-color: var(--brand-600); background: var(--brand-50); }
.role-option input:focus-visible + span { outline: 3px solid var(--brand-500); outline-offset: 2px; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-aside { display: none; } .auth-mobile-brand { display: inline-flex; } .auth-main { place-items: start center; } }

/* ---------- Errores ---------- */
.error-body { display: grid; place-items: center; padding: 24px 16px; }
.error-card { max-width: 480px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 40px 28px; box-shadow: var(--shadow); }
.error-card .brand { margin-bottom: 20px; }
.error-code { font-size: 4rem; font-weight: 800; letter-spacing: -.05em; color: var(--brand-700); margin: 0; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
