/* Zona de reservas y panel admin (reservas.html, admin.html) */
:root {
    --color-black: oklch(0.10 0 0);
    --color-red: oklch(0.55 0.22 25);
    --color-red-soft: oklch(0.55 0.22 25 / 0.14);
    --color-white: oklch(0.96 0.002 25);
    --color-gray-dark: oklch(0.18 0.005 25);
    --color-gray-mid: oklch(0.14 0.004 25);
    --color-gray: oklch(0.30 0.008 25);
    --color-gray-light: oklch(0.55 0.01 25);
    --color-muted: oklch(0.74 0.008 25);
    --color-ok: oklch(0.78 0.14 150);
    --color-warn: oklch(0.82 0.13 85);
    --font-display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
    --font-body: 'Montserrat', system-ui, sans-serif;
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
    color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100dvh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    background: var(--color-black);
    color: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: inherit; }

.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;
}

:focus-visible { outline: 2px solid var(--color-red); outline-offset: 2px; }

/* Cabecera */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--color-black);
    border-bottom: 1px solid var(--color-gray);
}

.app-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.app-logo img { width: 44px; height: 44px; }
.app-logo span {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 0.06em;
}

.app-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--color-muted);
    min-width: 0;
}

.app-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 16px 64px;
}

.narrow { max-width: 440px; margin: 0 auto; }

.page-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 64px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.h3 {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
}

.muted { color: var(--color-muted); }
.small { font-size: 13px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    background: var(--color-red);
    color: var(--color-black);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
    white-space: nowrap;
}

.btn:hover { background: var(--color-white); }
.btn:disabled { cursor: not-allowed; background: var(--color-gray); color: var(--color-gray-light); }
.btn.is-busy { opacity: 0.6; pointer-events: none; }

.btn-ghost {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-gray);
}
.btn-ghost:hover { background: transparent; border-color: var(--color-white); }
.btn-ghost:disabled { background: transparent; border-color: var(--color-gray); }

.btn-danger { background: transparent; color: var(--color-red); border-color: var(--color-red); }
.btn-danger:hover { background: var(--color-red); color: var(--color-black); }

.btn-sm { min-height: 36px; padding: 0 12px; font-size: 11px; }
.btn-block { width: 100%; }

.link-btn {
    background: none;
    border: none;
    padding: 4px 0;
    color: var(--color-muted);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.link-btn:hover { color: var(--color-white); }

/* Formularios */
.field { display: block; }
.field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
}

.input, select.input, textarea.input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    background: var(--color-gray-mid);
    border: 1px solid var(--color-gray);
    color: var(--color-white);
    font: inherit;
    font-size: 16px;
    border-radius: 0;
}
.input:focus { outline: none; border-color: var(--color-white); }
textarea.input { min-height: 80px; resize: vertical; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-red); flex-shrink: 0; }

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.form-error {
    padding: 10px 12px;
    border-left: 3px solid var(--color-red);
    background: var(--color-red-soft);
    font-size: 14px;
}

.form-note {
    padding: 10px 12px;
    border-left: 3px solid var(--color-gray-light);
    background: var(--color-gray-mid);
    font-size: 14px;
}

/* Paneles */
.panel {
    padding: 24px;
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray);
}

/* Pestañas */
.tabs {
    display: flex;
    gap: 4px;
    margin: 24px 0;
    border-bottom: 1px solid var(--color-gray);
    overflow-x: auto;
    scrollbar-width: none;
}

.tab {
    flex-shrink: 0;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    color: var(--color-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}
.tab:hover { color: var(--color-white); }
.tab[aria-selected="true"] { color: var(--color-white); border-bottom-color: var(--color-red); }

/* Chips / badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--color-gray);
    color: var(--color-muted);
    white-space: nowrap;
}
.badge-ok { border-color: var(--color-ok); color: var(--color-ok); }
.badge-warn { border-color: var(--color-warn); color: var(--color-warn); }
.badge-red { border-color: var(--color-red); color: var(--color-red); }
.badge-solid { background: var(--color-white); color: var(--color-black); border-color: var(--color-white); }

/* Resumen semanal */
.quota {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray);
}

.quota-count {
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1;
}

.quota-bar { display: flex; gap: 4px; }
.quota-bar i {
    display: block;
    width: 22px;
    height: 8px;
    background: var(--color-gray);
}
.quota-bar i.on { background: var(--color-red); }

/* Navegación por semana */
.week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0 16px;
}

.week-nav-label {
    flex: 1;
    text-align: center;
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 0.05em;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-gray);
    color: var(--color-white);
    cursor: pointer;
    font-size: 18px;
}
.icon-btn:hover:not(:disabled) { border-color: var(--color-white); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Filtro tipo de clase (como en #horarios) */
.tt-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    background: transparent;
    border: 1px solid var(--color-gray);
    color: var(--color-muted);
    font: inherit;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}
.tt-filter-btn:hover { color: var(--color-white); border-color: var(--color-gray-light); }
.tt-filter-btn[aria-pressed="true"] { background: var(--color-white); border-color: var(--color-white); color: var(--color-black); }

.tt-dot { width: 10px; height: 10px; }
.tt-dot.tt-hybrid { background: var(--color-white); border: 1px solid var(--color-gray-light); }
.tt-dot.tt-strength { background: var(--color-red); }
.tt-dot.tt-engine { background: var(--color-gray-light); }

/* Selector de día (móvil) */
.day-picker {
    display: none;
    gap: 4px;
    margin-bottom: 16px;
}

.day-pick {
    flex: 1;
    min-height: 52px;
    padding: 4px 0;
    background: transparent;
    border: 1px solid var(--color-gray);
    color: var(--color-muted);
    font: inherit;
    cursor: pointer;
    line-height: 1.1;
}
.day-pick b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.day-pick span { font-family: var(--font-display); font-size: 20px; color: var(--color-white); }
.day-pick[aria-pressed="true"] { background: var(--color-white); border-color: var(--color-white); }
.day-pick[aria-pressed="true"] b, .day-pick[aria-pressed="true"] span { color: var(--color-black); }
.day-pick.is-today { box-shadow: inset 0 3px 0 var(--color-red); }
.day-pick:disabled { opacity: 0.35; cursor: default; }

/* Rejilla semanal */
.week-grid {
    display: grid;
    grid-template-columns: repeat(var(--days, 5), minmax(0, 1fr));
    gap: 12px;
}

.day-col { min-width: 0; }
.day-head {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray);
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 0.05em;
}
.day-head small { font-family: var(--font-body); font-size: 12px; color: var(--color-muted); margin-left: 6px; letter-spacing: 0; }
.day-col.is-today .day-head { box-shadow: inset 0 3px 0 var(--color-red); }
.day-empty { padding: 16px 12px; color: var(--color-gray-light); font-size: 13px; }

.slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--color-gray-mid);
    border: 1px solid var(--color-gray);
    border-left: 3px solid var(--color-white);
}
.slot.tt-strength { border-left-color: var(--color-red); }
.slot.tt-engine { border-left-color: var(--color-gray-light); }
.slot.is-mine { background: oklch(0.2 0.03 25); border-color: var(--color-red); }
.slot.is-waiting { border-style: dashed; border-left-style: solid; }
.slot.is-past, .slot.is-cancelled { opacity: 0.5; }
.slot.is-filtered { display: none; }

.slot-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px; }
.slot-time { font-family: 'Courier New', monospace; font-weight: 900; font-size: 16px; white-space: nowrap; }
.slot-type { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.05em; }
.slot-meta { font-size: 12px; color: var(--color-muted); }
.slot-meta strong { color: var(--color-white); }
.slot .btn { width: 100%; }

.spots { display: flex; gap: 3px; }
.spots i { display: block; flex: 1; height: 4px; background: var(--color-gray-light); }
.spots i.taken { background: var(--color-gray); }

/* Casillas y números a juego con la web */
.check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background: var(--color-gray-mid);
    border: 1px solid var(--color-gray-light);
    cursor: pointer;
    flex-shrink: 0;
}
.check input[type="checkbox"]:hover { border-color: var(--color-white); }
.check input[type="checkbox"]:checked { background: var(--color-red); border-color: var(--color-red); }
.check input[type="checkbox"]:checked::after {
    content: '';
    width: 10px;
    height: 5px;
    margin-top: -2px;
    border-left: 2px solid var(--color-black);
    border-bottom: 2px solid var(--color-black);
    transform: rotate(-45deg);
}
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Desplegable, calendario, hora y buscador (ui.js) */
.ui-native { display: none !important; }

.ui-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s var(--ease);
}
.ui-btn:hover:not(:disabled) { border-color: var(--color-gray-light); }
.ui-btn[aria-expanded="true"] { border-color: var(--color-white); }
.ui-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ui-btn svg { flex: none; width: 14px; height: 14px; opacity: 0.7; }
.ui-btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-btn-label.is-empty { color: var(--color-gray-light); }
.table .ui-btn { min-height: 36px; padding: 6px 8px; font-size: 14px; }

.ui-pop {
    position: fixed;
    z-index: 300;
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    box-shadow: 0 12px 32px oklch(0 0 0 / 0.6);
    color: var(--color-white);
    animation: pop-in 0.14s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }

.ui-list, .ui-col { scrollbar-width: thin; scrollbar-color: var(--color-gray-light) transparent; }
.ui-list { list-style: none; max-height: 260px; overflow-y: auto; padding: 4px; outline: none; }
.ui-opt { display: flex; align-items: center; padding: 10px 12px; font-size: 14px; cursor: pointer; line-height: 1.3; }
.ui-opt small { display: block; margin-top: 2px; font-size: 12px; color: var(--color-muted); }
.ui-opt.is-active { background: var(--color-gray); }
.ui-opt[aria-selected="true"] { font-weight: 800; box-shadow: inset 3px 0 0 var(--color-red); }
.ui-empty { padding: 12px; font-size: 13px; color: var(--color-muted); }

.ui-cal { width: 296px; max-width: calc(100vw - 16px); padding: 12px; }
.ui-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-family: var(--font-display); font-size: 22px; letter-spacing: 0.05em; text-transform: capitalize; }
.ui-cal-nav { width: 36px; height: 36px; background: none; border: 1px solid var(--color-gray); color: var(--color-white); font-size: 18px; cursor: pointer; }
.ui-cal-nav:hover { border-color: var(--color-white); }
.ui-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ui-cal-wd { padding: 6px 0; text-align: center; font-size: 11px; font-weight: 800; color: var(--color-muted); }
.ui-day { height: 38px; background: none; border: 1px solid transparent; color: var(--color-white); font: inherit; font-size: 14px; cursor: pointer; }
.ui-day:hover { border-color: var(--color-gray-light); }
.ui-day.is-today { box-shadow: inset 0 -3px 0 var(--color-red); }
.ui-day[aria-selected="true"] { background: var(--color-white); color: var(--color-black); font-weight: 800; }
.ui-cal-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

.ui-time { display: flex; gap: 4px; padding: 8px; }
.ui-col { display: flex; flex-direction: column; gap: 2px; max-height: 232px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.ui-tm { min-width: 60px; height: 38px; background: none; border: 1px solid transparent; color: var(--color-white); font: inherit; font-size: 15px; font-family: 'Courier New', monospace; cursor: pointer; }
.ui-tm:hover { border-color: var(--color-gray-light); }
.ui-tm[aria-selected="true"] { background: var(--color-white); color: var(--color-black); font-weight: 900; }

/* Estado de ocupación: completa (rojo) y últimas plazas (ámbar) */
.slot.is-full { border-color: oklch(0.55 0.22 25 / 0.45); }
.slot.is-full .spots i.taken { background: var(--color-red); }
.slot.is-full .slot-meta strong { color: var(--color-red); }
.slot.is-low .spots i.taken { background: var(--color-warn); }
.slot.is-low .slot-meta strong { color: var(--color-warn); }
.slot.is-mine .spots i.taken { background: var(--color-gray); }

/* Listas */
.list { border: 1px solid var(--color-gray); }
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-gray);
    background: var(--color-gray-mid);
}
.list-item:last-child { border-bottom: none; }
.list-item > .grow { flex: 1 1 220px; }
.list-empty { padding: 20px 16px; color: var(--color-muted); }

/* Tablas admin */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-gray); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--color-gray); vertical-align: middle; }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); background: var(--color-gray-dark); white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table .input { min-height: 36px; padding: 6px 8px; font-size: 14px; }

/* Diálogos */
dialog {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 24px;
    background: var(--color-gray-dark);
    color: var(--color-white);
    border: 1px solid var(--color-gray);
}
dialog::backdrop { background: oklch(0 0 0 / 0.7); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

/* Avisos flotantes */
.toasts {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.toast {
    max-width: 480px;
    width: 100%;
    padding: 14px 16px;
    background: var(--color-white);
    color: var(--color-black);
    font-weight: 600;
    font-size: 14px;
    border-left: 4px solid var(--color-ok);
    box-shadow: 0 8px 24px oklch(0 0 0 / 0.5);
    animation: toast-in 0.25s var(--ease);
    pointer-events: auto;
}
.toast.is-error { border-left-color: var(--color-red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading { padding: 40px 0; text-align: center; color: var(--color-muted); }

.welcome-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.welcome-list li { padding-left: 14px; border-left: 3px solid var(--color-red); font-size: 14px; color: var(--color-muted); }
.welcome-list strong { display: block; color: var(--color-white); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px; }

.rules {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 32px;
    font-size: 13px;
    color: var(--color-muted);
}
.rules strong { display: block; color: var(--color-white); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }

@media (max-width: 860px) {
    .day-picker { display: flex; }
    .week-grid { grid-template-columns: 1fr; }
    .day-col:not(.is-selected) { display: none; }
    .day-head { display: none; }
    .app-user-name { max-width: 30vw; }
    .panel { padding: 18px; }
    .tabs { position: sticky; top: 65px; z-index: 40; margin: 16px -16px; padding: 0 16px; background: var(--color-black); }
    .tab { flex: 1; padding: 14px 10px; font-size: 12px; letter-spacing: 0.06em; }
}

@media (max-width: 480px) {
    .app-logo span { display: none; }
    .app-user { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Estilo suave: esquinas redondeadas, bordes tenues y relieve ligero */
:root {
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-pill: 999px;
    --line: oklch(1 0 0 / 0.09);
    --line-strong: oklch(1 0 0 / 0.2);
    --lift: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 8px 24px oklch(0 0 0 / 0.28);
}

.app-header {
    background: oklch(0.10 0 0 / 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}
.app-logo img { border-radius: 12px; }

/* Botones */
.btn { border-radius: var(--r-pill); padding: 0 24px; box-shadow: 0 6px 18px oklch(0.55 0.22 25 / 0.28); }
.btn:hover { box-shadow: 0 6px 18px oklch(1 0 0 / 0.12); }
.btn:disabled { box-shadow: none; }
.btn-ghost { box-shadow: none; border-color: var(--line-strong); }
.btn-ghost:hover { background: oklch(1 0 0 / 0.06); }
.btn-danger { box-shadow: none; }
.btn-sm { padding: 0 16px; }
.icon-btn { border-radius: 50%; border-color: var(--line-strong); }
.icon-btn:hover:not(:disabled) { background: oklch(1 0 0 / 0.06); }

/* Campos */
.input, select.input, textarea.input {
    border-radius: var(--r-sm);
    border-color: var(--line-strong);
    background: oklch(1 0 0 / 0.04);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input:focus { background: oklch(1 0 0 / 0.07); box-shadow: 0 0 0 3px var(--color-red-soft); border-color: var(--color-red); }
.check input[type="checkbox"] { border-radius: 6px; background: oklch(1 0 0 / 0.04); border-color: var(--line-strong); }
.form-error, .form-note { border-left: none; border-radius: var(--r-sm); }
.form-error { box-shadow: inset 0 0 0 1px oklch(0.55 0.22 25 / 0.4); }
.form-note { box-shadow: inset 0 0 0 1px var(--line); }

/* Tarjetas */
.panel, .quota {
    border-radius: var(--r-lg);
    border-color: var(--line);
    background: linear-gradient(180deg, oklch(0.205 0.005 25), oklch(0.17 0.005 25));
    box-shadow: var(--lift);
}
.list, .table-wrap { border-radius: var(--r-md); border-color: var(--line); overflow: hidden; }
.list-item { border-bottom-color: var(--line); }
.table th, .table td { border-bottom-color: var(--line); }
dialog { border-radius: var(--r-lg); border-color: var(--line-strong); box-shadow: 0 24px 64px oklch(0 0 0 / 0.6); }
.toast { border-left: none; border-radius: var(--r-md); box-shadow: 0 10px 30px oklch(0 0 0 / 0.5), inset 4px 0 0 var(--color-ok); }
.toast.is-error { box-shadow: 0 10px 30px oklch(0 0 0 / 0.5), inset 4px 0 0 var(--color-red); }
.welcome-list li { border-left: none; padding-left: 0; }
.welcome-list li strong::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--color-red); }

/* Pestañas en cápsula */
.tabs {
    gap: 4px;
    padding: 4px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: oklch(1 0 0 / 0.03);
}
.tab { border-bottom: none; margin-bottom: 0; border-radius: var(--r-pill); padding: 10px 18px; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.tab:hover { background: oklch(1 0 0 / 0.05); }
.tab[aria-selected="true"] { background: var(--color-red); color: var(--color-black); }

/* Chips y etiquetas */
.badge { border-radius: var(--r-pill); padding: 4px 10px; border-color: var(--line-strong); }
.badge-ok { border-color: oklch(0.78 0.14 150 / 0.5); background: oklch(0.78 0.14 150 / 0.1); }
.badge-warn { border-color: oklch(0.82 0.13 85 / 0.5); background: oklch(0.82 0.13 85 / 0.1); }
.badge-red { border-color: oklch(0.55 0.22 25 / 0.6); background: var(--color-red-soft); }
.tt-filter-btn { border-radius: var(--r-pill); border-color: var(--line-strong); }
.tt-filter-btn:hover { background: oklch(1 0 0 / 0.05); }
.tt-dot { border-radius: 50%; }

/* Cuota semanal */
.quota-bar i, .spots i { border-radius: var(--r-pill); }
.quota-bar i { height: 8px; width: 26px; }

/* Selector de día */
.day-pick { border-radius: var(--r-md); border-color: var(--line); }
.day-pick.is-today { box-shadow: none; border-color: var(--color-red); }

/* Rejilla semanal */
.day-head {
    border-radius: var(--r-md);
    border-color: var(--line);
    background: oklch(1 0 0 / 0.04);
}
.day-col.is-today .day-head { box-shadow: none; background: var(--color-red-soft); border-color: oklch(0.55 0.22 25 / 0.5); }
.slot {
    position: relative;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    border-left-width: 1px;
    padding: 14px 14px 14px 18px;
    background: oklch(1 0 0 / 0.035);
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.slot::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: var(--r-pill);
    background: var(--color-white);
}
.slot.tt-strength::before { background: var(--color-red); }
.slot.tt-engine::before { background: var(--color-gray-light); }
.slot:hover:not(.is-past):not(.is-cancelled) { background: oklch(1 0 0 / 0.06); }
.slot.is-mine { background: oklch(0.55 0.22 25 / 0.12); border-color: oklch(0.55 0.22 25 / 0.55); }
.slot.is-waiting { border-style: dashed; border-left-style: dashed; }
.slot.is-full { border-color: oklch(0.55 0.22 25 / 0.35); }
.slot-time { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 800; }

/* Selectores de fecha, hora y lista */
.ui-pop { border-radius: var(--r-md); border-color: var(--line-strong); box-shadow: 0 18px 48px oklch(0 0 0 / 0.6); }
.ui-opt { border-radius: var(--r-sm); }
.ui-opt[aria-selected="true"] { box-shadow: none; background: var(--color-red-soft); }
.ui-cal-nav { border-radius: 50%; border-color: var(--line-strong); }
.ui-day { border-radius: 50%; }
.ui-day.is-today { box-shadow: inset 0 0 0 1px var(--color-red); }
.ui-day[aria-selected="true"], .ui-tm[aria-selected="true"] { background: var(--color-red); color: var(--color-black); }
.ui-tm { border-radius: var(--r-sm); font-family: var(--font-body); font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
    .tabs { position: sticky; top: 65px; width: auto; margin: 16px 0; background: oklch(0.12 0 0 / 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
    .tab { padding: 12px 10px; }
}

/* Avisos con acción, estados de carga y de error */
.toast.has-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toast button { flex: none; min-height: 36px; padding: 0 14px; border: none; border-radius: var(--r-pill); background: var(--color-black); color: var(--color-white); font: inherit; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; }

.skeleton { height: 96px; margin-bottom: 10px; border-radius: var(--r-md); background: linear-gradient(100deg, oklch(1 0 0 / 0.04) 30%, oklch(1 0 0 / 0.09) 50%, oklch(1 0 0 / 0.04) 70%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.error-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 16px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--color-muted); }

.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 400; padding: 8px 16px; text-align: center; font-size: 13px; font-weight: 700; background: var(--color-warn); color: var(--color-black); }

.install-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 12px 12px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--color-red-soft); }
.install-bar strong { display: block; font-size: 14px; }
.install-bar .icon-btn { width: 36px; height: 36px; flex: none; }

/* Habituales */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips[hidden] { display: none; }
.chips-label { width: 100%; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); }
.chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: oklch(1 0 0 / 0.04); color: var(--color-white); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chip:hover { background: oklch(1 0 0 / 0.08); }
.chip[aria-pressed="true"] { background: var(--color-red); border-color: var(--color-red); color: var(--color-black); }

/* Resumen de hoy (admin) */
.today-card { display: grid; gap: 8px; margin-bottom: 16px; }
.today-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: oklch(1 0 0 / 0.04); color: var(--color-white); font: inherit; text-align: left; cursor: pointer; }
button.today-row:hover { background: oklch(1 0 0 / 0.08); }
.today-row.is-plain { cursor: default; }
.today-row.is-alert { border-color: oklch(0.82 0.13 85 / 0.4); background: oklch(0.82 0.13 85 / 0.07); }
.today-row strong { display: block; font-size: 15px; }
.today-row small { display: block; font-size: 12px; color: var(--color-muted); }

.person-contact { display: flex; gap: 8px; }

/* Próxima clase (cliente) */
.next-card { margin-bottom: 16px; padding: 16px 18px; border: 1px solid oklch(0.55 0.22 25 / 0.45); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--color-red-soft), oklch(0.55 0.22 25 / 0.04)); }
.next-card .h3 { margin-bottom: 6px; }
.next-card .next-title { font-family: var(--font-display); font-size: 28px; letter-spacing: 0.05em; line-height: 1.1; }
.next-card .row { margin-top: 12px; }

@media (max-width: 700px) {
    .person-contact .btn { flex: 1; min-height: 44px; }
    .today-row { padding: 14px 16px; }
    .next-card .row .btn { flex: 1; min-height: 44px; }
}
