﻿/* ============================================================
   FilaCero · Sistema de diseño (base del proyecto)
   Paleta derivada de app.py: gradiente #1e3a8a → #3b82f6
   Superficie #f3f4f6 · Bordes #e5e7eb · Texto #111827 / #6b7280
   ============================================================ */

:root {
    /* Color */
    --brand-900: #1e3a8a;
    --brand-600: #2563eb;
    --brand-500: #3b82f6;
    --surface: #ffffff;
    --surface-alt: #f9fafb;
    --page-bg: #f3f4f6;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --error-600: #dc2626;
    --error-50: #fef2f2;
    --success-600: #10b981;
    --success-50: #ecfdf5;

    /* Tipografía */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: clamp(1.75rem, 3.5vw, 2.25rem);

    /* Espaciado (escala 4/8) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    /* Forma y elevación */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-btn: 0 4px 6px -1px rgba(59, 130, 246, 0.25);

    /* Movimiento */
    --motion-fast: 150ms;
    --motion-base: 250ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */

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

/* El atributo hidden debe ganar siempre sobre cualquier display de clase */
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

button { font-family: inherit; }

fieldset { min-width: 0; }

svg { display: block; }

:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ---------- Layout principal ---------- */

.page { min-height: 100dvh; }

.layout {
    display: grid;
    min-height: 100dvh;
    grid-template-columns: 1fr;
}

/* ---------- Panel de marca ---------- */

.brand-panel {
    background:
        radial-gradient(120% 90% at 90% -10%, rgba(59, 130, 246, 0.35), transparent 60%),
        linear-gradient(135deg, var(--brand-900), var(--brand-600));
    color: #ffffff;
}

.brand-panel-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-height: 100%;
    padding: var(--space-6) var(--space-5);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.brand-logo svg { width: 40px; height: 40px; }

.brand-name {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand-copy { max-width: 42ch; }

.brand-headline {
    margin: 0 0 var(--space-3);
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    margin: 0;
    font-size: var(--text-base);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 400;
}

.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.feature-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-icon svg { width: 20px; height: 20px; }

.brand-footer {
    margin-top: auto;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- Panel del formulario ---------- */

.form-panel {
    display: flex;
    justify-content: center;
    padding: var(--space-6) var(--space-4);
}

.form-wrap {
    width: 100%;
    max-width: 640px;
}

.form-header { margin-bottom: var(--space-5); }

.form-eyebrow {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.form-title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.form-desc {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ---------- Banner de error global ---------- */

.form-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    background-color: var(--error-50);
}

.banner-icon {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--error-600);
    margin-top: 0.125rem;
}

.banner-text {
    margin: 0;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: #991b1b;
    font-weight: 500;
}

/* ---------- Formulario ---------- */

.client-form { display: flex; flex-direction: column; gap: var(--space-5); }

.field-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    border: 0;
}

.group-title {
    padding: 0;
    margin: 0 0 var(--space-1);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.field { display: flex; flex-direction: column; gap: var(--space-2); }

.field-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.required-mark { color: var(--error-600); }

.required-mark-inline { color: var(--error-600); font-weight: 700; }

.optional-mark {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 0.125rem var(--space-2);
    border-radius: var(--radius-full);
    background-color: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
    vertical-align: middle;
    line-height: 1.4;
}

.field-input {
    width: 100%;
    min-height: 48px; /* objetivo táctil cómodo */
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: var(--text-base); /* 16px evita el zoom automático en iOS */
    font-family: inherit;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.field-input::placeholder { color: #6b7688; }

.field-input:hover { border-color: #9ca3af; }

.field-input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field-input:disabled {
    background-color: var(--surface-alt);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Estado de error del campo */

.field.has-error .field-input {
    border-color: var(--error-600);
}

.field.has-error .field-input:focus {
    border-color: var(--error-600);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.field-error {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--error-600);
    font-weight: 500;
    line-height: 1.4;
}

.field-helper {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.45;
}

.field.has-error .field-helper { display: none; }

/* ---------- Campo de contraseña ---------- */

.field-password { position: relative; }

.field-password .field-input { padding-right: 3.5rem; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: var(--space-2);
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.password-toggle:hover {
    color: var(--text-primary);
    background-color: var(--surface-alt);
}

.password-toggle svg { width: 20px; height: 20px; }

.password-toggle[aria-pressed="true"] .icon-eye { display: none; }

.password-toggle[aria-pressed="false"] .icon-eye-off { display: none; }

.password-meter {
    display: flex;
    gap: var(--space-1);
    height: 4px;
}

.meter-bar {
    flex: 1;
    border-radius: var(--radius-full);
    background-color: var(--border);
    transition: background-color var(--motion-base) var(--ease-out);
}

.meter-bar.is-active[data-bar="1"],
.meter-bar.is-active[data-bar="2"] { background-color: #f59e0b; }

.meter-bar.is-active[data-bar="3"] { background-color: var(--brand-500); }

.meter-bar.is-active[data-bar="4"] { background-color: var(--success-600); }

/* ---------- Nota y botón de envío ---------- */

.form-note {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
    border: 0;
    border-radius: var(--radius-md);
    background-color: #1e40af;
    color: #ffffff;
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, opacity var(--motion-fast) ease;
}

.submit-btn:hover { box-shadow: 0 6px 12px -1px rgba(59, 130, 246, 0.35); }

.submit-btn:active { transform: scale(0.98); }

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner de carga */

.submit-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Estado de éxito ---------- */

.success-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-7) var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-card);
}

.success-panel:focus { outline: none; }

.success-icon svg { width: 56px; height: 56px; margin-bottom: var(--space-4); }

.success-title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xl);
    font-weight: 700;
}

.success-text {
    margin: 0 0 var(--space-5);
    max-width: 40ch;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- Código de cliente generado ---------- */

.code-display {
    width: 100%;
    max-width: 380px;
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background-color: var(--surface-alt);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.code-label {
    margin: 0;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.code-value-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.code-value {
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--brand-900);
    letter-spacing: 0.02em;
}

.copy-btn {
    min-height: 44px;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.copy-btn:hover {
    border-color: var(--brand-500);
    background-color: var(--surface-alt);
}

.copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.code-hint {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.45;
}

.ghost-btn {
    min-height: 44px;
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.ghost-btn:hover {
    border-color: var(--brand-500);
    background-color: var(--surface-alt);
}

/* ---------- Pie ---------- */

.form-footer {
    margin-top: var(--space-6);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-align: center;
}

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
    .field-group { grid-template-columns: 1fr 1fr; }
    .field-md { grid-column: auto; }
    .field-group .field:not(.field-md) { grid-column: 1 / -1; }
    .form-panel { padding: var(--space-7) var(--space-6); }
    .brand-panel-inner { padding: var(--space-7) var(--space-6); }
}

@media (min-width: 1024px) {
    .layout { grid-template-columns: minmax(380px, 2fr) 3fr; }
    .form-panel { padding: var(--space-7) var(--space-7); align-items: center; }
    .form-wrap { max-width: 680px; }
}

/* En móvil el panel de marca se compacta: se ocultan la lista de
   features largas y el pie para priorizar el formulario. */

@media (max-width: 1023.98px) {
    .brand-panel-inner { gap: var(--space-4); min-height: 0; }
    .feature-list { display: none; }
    .brand-footer { display: none; }
    .brand-headline { font-size: var(--text-2xl); }
    .brand-subtitle { font-size: var(--text-sm); }
}

/* ---------- Movimiento reducido ---------- */

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

/* ============================================================
   FilaCero · Extensiones por página
   (landing, login, turno público, pantalla TV, consola, panel)
   ============================================================ */

/* ---------- Utilidades compartidas ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background-color: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.link {
    color: var(--brand-600);
    font-weight: 600;
    text-decoration: none;
}

.link:hover { text-decoration: underline; }

.hint {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.form-banner-info {
    border-color: #bfdbfe;
    background-color: #eff6ff;
}

.form-banner-info .banner-text { color: #1e40af; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: var(--space-3) var(--space-5);
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ffffff, #dbeafe);
    color: var(--brand-900);
    font-size: var(--text-base);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.btn-primary:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24); }
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.btn-outline:hover { border-color: var(--brand-500); }

.btn-block { width: 100%; }

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(30, 58, 138, 0.25);
    border-top-color: var(--brand-900);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---------- Landing (M2) ---------- */

.landing {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-height: 100dvh;
    padding: var(--space-6) var(--space-5) var(--space-5);
    background:
        radial-gradient(120% 90% at 90% -10%, rgba(59, 130, 246, 0.35), transparent 60%),
        linear-gradient(135deg, var(--brand-900), var(--brand-600));
    color: #ffffff;
}

.landing-top { display: flex; }

.landing-hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    max-width: 720px;
    margin-top: var(--space-5);
}

.landing-title {
    margin: 0;
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.landing-sub {
    margin: 0;
    font-size: var(--text-lg);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.landing-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.landing .feature-list { margin-top: var(--space-4); }

.landing-footer {
    margin-top: auto;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- Login (M3) ---------- */

.auth-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    min-height: 100dvh;
    padding: var(--space-6) var(--space-4);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: var(--space-6) var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-card);
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    text-align: center;
}

.brand-logo svg { width: 40px; height: 40px; }

.brand-logo-sm svg { width: 36px; height: 36px; }

.auth-title {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 700;
}

.auth-desc {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-footer {
    margin-top: var(--space-5);
    text-align: center;
}

.auth-switch {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.auth-brand-note {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-align: center;
}

/* ---------- Página pública del turno (M4) ---------- */

.turn-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: var(--space-5) var(--space-4);
}

.turn-card {
    width: 100%;
    max-width: 440px;
    padding: var(--space-6);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.turn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.turn-tenant {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
    text-align: left;
}

.turn-welcome {
    margin: 0 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background-color: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.turn-label {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.turn-number {
    margin: 0 0 var(--space-5);
    font-size: clamp(4rem, 16vw, 6rem);
    font-weight: 800;
    line-height: 1;
    color: #16305c;
    font-variant-numeric: tabular-nums;
}

.turn-status {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--surface-alt);
    text-align: left;
}

.turn-status-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
}

.status-key { font-size: var(--text-sm); color: var(--text-secondary); }

.status-value {
    font-size: var(--text-lg);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.turn-state {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--brand-600);
}

.turn-card .form-banner { margin-bottom: var(--space-4); }

.turn-hint {
    margin: var(--space-4) 0 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.turn-alert-icon { display: flex; justify-content: center; margin-bottom: var(--space-4); }

.turn-alert-icon svg { width: 56px; height: 56px; }

/* ---------- Pantalla para TV (M9) — estilo referencial claro ---------- */

.display-body {
    min-height: 100dvh;
    margin: 0;
    background-color: #e8f0fa;
    color: #16305c;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

.display-body:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 2px;
}

/* Barra superior azul */
.display-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 0.65rem var(--space-5);
    background: linear-gradient(135deg, #1e3a8a, #2451a8);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 40, 90, 0.25);
}

.display-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.display-topbar-name {
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.display-clock {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    white-space: nowrap;
}

.display-clock-date {
    font-size: clamp(0.85rem, 1.6vw, 1.1rem);
    font-weight: 500;
    opacity: 0.92;
}

.display-clock-sep {
    opacity: 0.5;
    font-weight: 300;
}

.display-clock-time {
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Contenido en 3 columnas */
.display-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-4);
    min-height: calc(100dvh - 3.4rem);
    align-items: stretch;
}

@media (min-width: 1080px) {
    .display-content {
        grid-template-columns: minmax(300px, 1.05fr) minmax(0, 1.7fr) minmax(280px, 0.8fr);
    }
}

/* Columna izquierda */
.display-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
}

.at-card {
    background-color: transparent;
}

.at-card-title,
.at-next-title {
    margin: 0;
    padding: 0.55rem 1rem;
    border-radius: 14px 14px 0 0;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
}

.at-now .at-card-title {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
    position: relative;
    z-index: 1;
}

.at-now-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: clamp(1.2rem, 4vw, 2.4rem) 1rem;
    border: 3px solid #1e4fbf;
    border-radius: 0 0 16px 16px;
    background-color: #ffffff;
    box-shadow: 0 10px 22px rgba(30, 58, 138, 0.18);
    min-height: 9rem;
}

.at-now-box.at-pop { animation: at-pop 480ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)); }

@keyframes at-pop {
    0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
    60% { transform: scale(1.03); }
    100% { transform: scale(1); box-shadow: 0 10px 22px rgba(30, 58, 138, 0.18); }
}

.at-now-code {
    font-size: clamp(3.5rem, 8vw, 5.2rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    color: #16305c;
    font-variant-numeric: tabular-nums;
}

.at-now-divider {
    width: 2px;
    align-self: stretch;
    background-color: #dbe4f2;
}

.at-now-module {
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    font-weight: 700;
    color: #2451a8;
    text-align: center;
    max-width: 8rem;
    line-height: 1.2;
}

/* Próximos turnos */
.at-next .at-next-title {
    background: #4c668a;
}

.at-next-list {
    list-style: none;
    margin: 0;
    padding: 12px 8px 8px;
    background-color: #ffffff;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(30, 58, 138, 0.12);
}

.at-next-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: clamp(0.65rem, 1.6vw, 1rem) 1.2rem;
    border-bottom: 1px solid #eef2f8;
}

.at-next-item:last-child { border-bottom: 0; }

.at-next-code {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    font-weight: 800;
    color: #1e4fbf;
    font-variant-numeric: tabular-nums;
    min-width: 4.5ch;
}

.at-next-sep {
    width: 2px;
    align-self: stretch;
    background-color: #e5ebf4;
}

.at-next-module {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    font-weight: 500;
    color: #66788f;
}

.at-next-empty {
    padding: clamp(1rem, 3vw, 1.6rem) 1.2rem;
    text-align: center;
    color: #64748B;
    font-size: var(--text-sm);
}

/* Columna central: media por enlace o marca por defecto */
.display-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    border-radius: 18px;
    padding: var(--space-5);
    background:
        radial-gradient(60% 90% at 100% 0%, rgba(59, 130, 246, 0.18), transparent 60%),
        radial-gradient(80% 60% at 0% 100%, rgba(37, 99, 235, 0.16), transparent 55%),
        linear-gradient(160deg, #f6f9ff 0%, #e9f1fc 45%, #dfeafa 100%);
    border: 1px solid #dbe6f6;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 10px 24px rgba(30, 58, 138, 0.08);
    overflow: hidden;
}

.display-media-el {
    max-width: 100%;
    max-height: 62dvh;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.15);
}

iframe.display-media-el {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.display-media-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.display-media-default svg {
    width: clamp(90px, 12vw, 150px);
    height: auto;
}

.display-media-title {
    margin: 0;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 800;
    color: #16305c;
    letter-spacing: -0.01em;
}

.display-media-caption {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #33517E;
    line-height: 1.55;
    max-width: 34ch;
}

/* Columna derecha: QRs por fila con esquinas decorativas */
.display-join {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
    border-radius: 18px;
    background-color: #ffffff;
    border: 1px solid #e2eaf5;
    box-shadow: 0 12px 26px rgba(30, 58, 138, 0.12);
    align-items: center;
    overflow-y: auto;
}

.display-join-title {
    margin: 0;
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-weight: 800;
    color: #16305c;
}

.display-join-sub {
    margin: 0;
    font-size: var(--text-sm);
    color: #5d739a;
    text-align: center;
    line-height: 1.4;
}

.display-qr-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    width: 100%;
    padding-top: var(--space-2);
}

.display-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    position: relative;
    padding: 10px;
}

/* Esquinas decorativas tipo marco de cámara */
.display-qr-item::before,
.display-qr-item::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 3px solid #3b82f6;
    border-radius: 6px;
}

.display-qr-item::before {
    top: 0;
    left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top-left-radius: 10px;
}

.display-qr-item::after {
    bottom: 0;
    right: 0;
    border-left: 0;
    border-top: 0;
    border-bottom-right-radius: 10px;
}

.display-qr {
    width: 132px;
    height: 132px;
    display: block;
}

.display-qr-item:only-child .display-qr {
    width: 176px;
    height: 176px;
}

.display-qr-label {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    color: #66788f;
    text-align: center;
    max-width: 170px;
}

.display-qr-letter {
    color: #1e4fbf;
    font-size: var(--text-base);
    font-weight: 800;
}

@media (max-width: 1079.98px) {
    .display-content {
        grid-template-columns: 1fr;
    }
    .display-media { min-height: 40dvh; }
    .display-media-el { max-height: 40dvh; }
}

@media (prefers-reduced-motion: reduce) {
    .at-now-box.at-pop { animation: none; }
}

/* ---------- Consola de llamada (M7) ---------- */

.console-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-5);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
}

.console-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.console-brand-name {
    font-size: var(--text-base);
    font-weight: 700;
}

.console-nav { display: flex; align-items: center; gap: var(--space-3); }

/* Botón de regreso al dashboard (diseño consistente con el sistema) */
.console-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0 0.95rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color var(--motion-fast) ease,
                background-color var(--motion-fast) ease,
                transform var(--motion-fast) ease,
                box-shadow var(--motion-fast) ease;
}

.console-back-btn svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--brand-600);
    transition: transform var(--motion-fast) ease;
}

.console-back-btn:hover {
    border-color: var(--brand-500);
    background-color: var(--surface-alt);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
}

.console-back-btn:hover svg { transform: translateX(-2px); }

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

@media (max-width: 560px) {
    /* En pantallas angostas el botón compacta a solo icono con tooltip */
    .console-back-btn span {
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    .console-back-btn {
        position: relative;
        width: 40px;
        padding: 0;
        justify-content: center;
    }
    .console-topbar { padding: var(--space-3) var(--space-4); }
}

.console-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.console-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.console-title {
    margin: 0;
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.cat-tab .cat-icon-tab { width: 17px; height: 17px; flex: none; }

.cat-tab.is-active .cat-icon-tab { color: #ffffff; }

.cat-tab:hover { border-color: var(--brand-500); }

.cat-tab.is-active {
    background: linear-gradient(135deg, var(--brand-900), var(--brand-500));
    border-color: transparent;
    color: #ffffff;
}

.console-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-7) var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.console-current-label {
    margin: 0;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.console-current {
    margin: 0;
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #16305c;
}

.console-cat-hint {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--brand-600);
}

.console-waiting {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.console-card .form-banner {
    width: 100%;
    margin: var(--space-2) 0 0;
}

.action-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
    margin-top: var(--space-4);
}

.action-row-secondary {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.action-row-secondary .ghost-btn { min-height: 44px; }

.ghost-danger {
    color: var(--error-600);
    border-color: #fecaca;
}

.ghost-danger:hover {
    border-color: var(--error-600);
    background-color: var(--error-50);color: #991B1B; }

.console-flow {
    margin: var(--space-4) 0 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.console-flow span { font-weight: 600; }

.display-link-row {
    display: flex;
    justify-content: center;
    padding-top: var(--space-2);
}

.console-layout .console-card .form-banner-info { align-items: center; }

/* ---------- Panel / Dashboard (M5 · M6 · M10 · M12) ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-5);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.topbar-name {
    font-size: var(--text-base);
    font-weight: 700;
}

.topbar-tenant {
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background-color: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.topbar-link {
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.topbar-link:hover {
    color: var(--text-primary);
    background-color: var(--surface-alt);
}

.topbar-link.is-active {
    color: var(--brand-600);
    background-color: #eff6ff;
}

.panel-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.panel-header { display: flex; flex-direction: column; gap: var(--space-1); }

.panel-title {
    margin: 0;
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.panel-sub {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.kpi-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-card);
}

.kpi-label {
    margin: 0;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.kpi-value {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--brand-900);
}

.kpi-hint {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

@media (min-width: 900px) {
    .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.section {
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-card);
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.section-title {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
}

.range-tabs {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background-color: var(--surface-alt);
}

.range-tab {
    padding: 0.35rem 0.9rem;
    border: 0;
    border-radius: var(--radius-full);
    background-color: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.range-tab.is-active {
    background-color: var(--surface);
    color: var(--brand-600);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-box {
    width: 100%;
    padding: var(--space-3) 0 var(--space-1);
}

.chart-box canvas {
    display: block;
    width: 100%;
}

.export-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}

.cat-list {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.cat-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
}

.cat-row:last-child { border-bottom: 0; }

.qr-mini {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.qr-anchor {
    flex: none;
    line-height: 0;
    border-radius: var(--radius-sm);
    transition: box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.qr-anchor:hover {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    transform: scale(1.03);
}

.cat-info { min-width: 0; flex: 1; }

.cat-name {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
}

.cat-meta {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.cat-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--error-600);
    cursor: pointer;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.icon-btn:hover {
    background-color: var(--error-50);
    border-color: #fecaca;
}

.cat-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-3);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.cat-form .field { flex: 1 1 220px; }

.submit-btn-inline {
    width: auto;
    min-width: 120px;
}

.submit-btn-inline .submit-label { white-space: nowrap; }

#cat-form ~ .form-banner { margin-top: var(--space-3); }

.config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.config-wide { grid-column: 1 / -1; }

.config-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    justify-content: flex-start;
}

@media (min-width: 720px) {
    .config-grid { grid-template-columns: 1fr 1fr; }
}

.panel-footer {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-align: center;
}

/* ============================================================
   Panel — layout referencial (sidebar oscuro + tarjetas)
   ============================================================ */

.dash-body {
    background-color: #eef2f9;
    color: #16305c;
}

.dash-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100dvh;
}

/* ---------- Sidebar ---------- */

.dash-sidebar {
    background: linear-gradient(180deg, #16305c, #10244a);
    color: #d9e3f2;
    padding: var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-brand-logo { width: 42px; height: 42px; border-radius: 10px; }

.dash-brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.dash-brand-text strong { font-size: var(--text-lg); color: #ffffff; }
.dash-brand-text small { font-size: var(--text-xs); color: rgba(217, 227, 242, 0.7); }

.dash-nav { display: flex; flex-direction: column; gap: 0.35rem; }

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    color: rgba(217, 227, 242, 0.85);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.dash-nav-item svg { width: 20px; height: 20px; flex: none; }

.dash-nav-item:hover { background-color: rgba(255, 255, 255, 0.07); color: #ffffff; }

.dash-nav-item.is-active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(29, 78, 216, 0.25);
}

.dash-sidebar-footer {
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-tenant {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.dash-tenant-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dash-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.dash-tenant-fallback {
    font-size: var(--text-lg);
    font-weight: 700;
    color: #ffffff;
}

.dash-tenant-name { font-size: var(--text-sm); font-weight: 600; color: #ffffff; word-break: break-word; }

.dash-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    color: rgba(217, 227, 242, 0.65);
}

.dot-online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

/* ---------- Header ---------- */

.dash-main {
    padding: var(--space-4) var(--space-5) var(--space-7);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.dash-title { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; color: #16305c; }

.dash-sub { margin: 0.15rem 0 0; font-size: var(--text-sm); color: #5d739a; }

.dash-header-actions { display: flex; align-items: center; gap: var(--space-3); }

.dash-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.8rem 0.35rem 0.35rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background-color: #ffffff;
    color: #16305c;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-sm);
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.dash-avatar-btn:hover {
    border-color: var(--brand-500);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

.dash-avatar-btn svg { width: 22px; height: 22px; color: #5d739a; }

.dash-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: contain;
    background-color: #f4f7fc;
    padding: 2px;
}

.dash-header-link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #5d739a;
    text-decoration: none;
}
.dash-header-link:hover { color: #16305c; }

/* ---------- KPIs pastel ---------- */

.kpi-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 1080px) {
    .kpi-row { grid-template-columns: repeat(4, 1fr); }
}

.kpi {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    min-height: 92px;
}

.kpi-blue { background-color: #e5efff; }
.kpi-green { background-color: #e3f7ea; }
.kpi-amber { background-color: #fff4dc; }
.kpi-violet { background-color: #ece9ff; }

.kpi-icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.85);
}

.kpi-icon svg { width: 24px; height: 24px; }

.kpi-blue .kpi-icon { color: #2563eb; }
.kpi-green .kpi-icon { color: #059669; }
.kpi-amber .kpi-icon { color: #d97706; }
.kpi-violet .kpi-icon { color: #7c3aed; }

.kpi-label { margin: 0; font-size: var(--text-xs); font-weight: 600; color: #5d739a; }

.kpi-value {
    margin: 0;
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    font-weight: 800;
    line-height: 1.15;
    color: #16305c;
    font-variant-numeric: tabular-nums;
}

.kpi-delta { margin: 0; font-size: var(--text-xs); font-weight: 700; color: #64748B; }
.kpi-delta.is-up { color: #16a34a; }
.kpi-delta.is-down { color: #dc2626; }

/* ---------- Tarjetas genéricas ---------- */

.dash-row-2,
.dash-row-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media (min-width: 1024px) {
    .dash-row-2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
    .dash-row-3 { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); }
}

.panel-card {
    background-color: #ffffff;
    border: 1px solid #e4eaf4;
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.06);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid #eef2f8;
}

.card-head-icon { width: 21px; height: 21px; color: #2451a8; flex: none; }

.card-title { margin: 0; font-size: var(--text-base); font-weight: 700; color: #16305c; }

.empty-note { margin: 0; color: #64748B; font-size: var(--text-sm); text-align: center; }

/* ---------- Tiles "Turno actual por fila" ---------- */

.cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}

.cat-tile {
    border-radius: var(--radius-lg);
    padding: 0 0 var(--space-3);
    background-color: var(--cat-color-bg, #e5efff);
    border: 1px solid rgba(30, 58, 138, 0.08);
    overflow: hidden;
    text-align: center;
}

.cat-tile-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem;
    background-color: var(--cat-color, #2451a8);
    color: #ffffff;
}

.cat-icon { width: 20px; height: 20px; }

.cat-tile-name { margin: 0.45rem 0 0; font-size: var(--text-sm); font-weight: 700; color: var(--cat-color, #2451a8); }

.cat-tile-code {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: #16305c;
    font-variant-numeric: tabular-nums;
}

.cat-tile-meta { margin: 0 0 0.35rem; font-size: var(--text-xs); font-weight: 600; color: #64748B; }

/* ---------- Próximos turnos ---------- */

.upcoming-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #eef2f8;
    border-radius: var(--radius-md);
    background-color: #fbfdff;
}

.upcoming-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.6ch;
    padding: 0.35rem 0.6rem;
    border-radius: 9px;
    color: #ffffff;
    font-weight: 800;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}

.upcoming-name { font-size: var(--text-sm); font-weight: 600; color: #33517E; }

.upcoming-empty {
    list-style: none;
    text-align: center;
    color: #64748B;
    font-size: var(--text-sm);
    padding: var(--space-3);
}

/* ---------- Códigos QR por fila ---------- */

.qr-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.qr-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid #eef2f8;
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    text-decoration: none;
    transition: box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.qr-card:hover {
    border-color: var(--brand-500);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.qr-card-img { border-radius: 8px; }

.qr-card-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

.qr-card-name {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: var(--text-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.qr-card-hint { font-size: var(--text-xs); color: #64748B; }

.card-note { margin: 0; font-size: var(--text-xs); color: #64748B; }

/* ---------- Donut + barras ---------- */

.donut-wrap { position: relative; width: 180px; align-self: center; }

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    pointer-events: none;
}

.donut-center strong { font-size: 1.6rem; font-weight: 800; color: #16305c; }
.donut-center span { font-size: var(--text-xs); color: #64748B; font-weight: 600; }

.donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.donut-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: #33517E;
}

.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend-name { flex: 1; font-weight: 600; }
.legend-values { font-variant-numeric: tabular-nums; font-weight: 600; color: #64748B; }

.chart-box { width: 100%; }
.chart-box canvas { display: block; width: 100%; }

/* ---------- Accesos rápidos ---------- */

.quick-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 760px) {
    .quick-row { grid-template-columns: repeat(5, 1fr); }
}

.quick {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    border-radius: var(--radius-md);
    border: 0;
    cursor: pointer;
    font-weight: 700;
    font-size: var(--text-sm);
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    color: #16305c;
    transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, filter var(--motion-fast) ease;
}

.quick:hover { transform: translateY(-2px); filter: brightness(0.98); box-shadow: 0 6px 14px rgba(30, 58, 138, 0.12); }
.quick:active { transform: translateY(0); }

.quick-icon svg { width: 24px; height: 24px; }

.q-blue { background-color: #e5efff; color: #1e4fbf; }
.q-violet { background-color: #ece9ff; color: #5b21b6; }
.q-green { background-color: #e3f7ea; color: #047857; }
.q-gray { background-color: #eef2f7; color: #41556f; }

/* ---------- Icon picker ---------- */

.field-iconpicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 48px;
    padding: 0 var(--space-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    cursor: pointer;
    justify-content: space-between;
}

.field-iconpicker:hover { border-color: var(--brand-500); }

.field-iconpicker svg { width: 18px; height: 18px; color: #64748B; }

.field-iconpicker .cat-icon { color: #2451a8; }

.icon-grid {
    position: absolute;
    z-index: 60;
    top: calc(100% + 4px);
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 44px);
    gap: 6px;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 26px rgba(30, 58, 138, 0.18);
    max-width: 240px;
}

/* ancla del popup relativa al campo del picker */
.cat-form .field { position: relative; }

.icon-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: #f8fafc;
    color: #16305c;
    cursor: pointer;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.icon-option:hover { border-color: var(--brand-500); background-color: #eff6ff; }

.icon-option.is-selected {
    background-color: #e5efff;
    border-color: var(--brand-500);
    color: #1e4fbf;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.icon-option .cat-icon { color: inherit; }

.cat-form { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }

.cat-manage { display: flex; flex-direction: column; gap: 2px; }

.cat-manage-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    border: 1px solid #eef2f8;
    background-color: #fbfdff;
}

.cat-manage-row + .cat-manage-row { margin-top: 8px; }

.cat-manage-body { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }

.cat-manage-body strong { font-size: var(--text-sm); font-weight: 700; color: #16305c; }

.cat-manage-body small { font-size: 11px; color: #8899ad; letter-spacing: 0.02em; }

.cat-icon-manage { color: #2563eb; }

/* ---------- Config / export (reusa estilos previos) ---------- */

.config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.config-wide { grid-column: 1 / -1; }

.config-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    justify-content: flex-start;
}

@media (min-width: 720px) {
    .config-grid { grid-template-columns: 1fr 1fr; }
    .config-wide { grid-column: 1 / -1; }
}

.export-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.hint { font-size: var(--text-xs); color: #64748B; }

/* ---------- Responsive del layout ---------- */

@media (min-width: 980px) {
    .dash-layout { grid-template-columns: 240px minmax(0, 1fr); }
    .dash-sidebar { position: sticky; top: 0; height: 100dvh; }
}

.link-btn {
    margin-top: var(--space-3);
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--brand-600);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--motion-fast) ease;
}

.link-btn:hover { background-color: #eff6ff; }

.link-btn[hidden],
.cat-picker[hidden] { display: none; }

/* ---------- Picker de fila (post-QR) ---------- */

.cat-picker {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.picker-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.picker-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    cursor: pointer;
    text-align: left;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.picker-btn:hover {
    border-color: var(--brand-500);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.picker-btn:active { transform: scale(0.99); }

.picker-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.picker-btn.is-busy {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.picker-code {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-900), var(--brand-500));
    color: #ffffff;
    font-size: var(--text-base);
    font-weight: 700;
}

.picker-label {
    font-size: var(--text-base);
    font-weight: 600;
}


/* ============================================================
   Landing FilaCero (index) — design system vía ui-ux-pro-max
   Blue trust #2563EB + CTA naranja #2563EB · Plus Jakarta Sans
   Modo claro · fotografía real /static/img + glass restringido
   ============================================================ */

.lp-body {
    background-color: #F8FAFC;
    color: #1E293B;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.lp-body :focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
    border-radius: 4px;
}

.lp-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Navbar ---------- */

.lp-nav {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 24px;
    background-color: rgba(248, 250, 252, 0.85);
    border-bottom: 1px solid #E2E8F0;
    backdrop-filter: blur(12px);
}

.lp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    text-decoration: none;
    color: #1E293B;
}

.lp-brand svg { width: 38px; height: 38px; border-radius: 10px; }

.lp-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.lp-brand-text strong { font-size: 1.02rem; font-weight: 800; }
.lp-brand-text small { font-size: 11px; color: #475569; }

.lp-links { display: flex; gap: 18px; }

.lp-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;   /* un enlace nunca parte su texto en el nav */
}
.lp-links a:hover { color: #2563EB; }

.lp-login-link { white-space: nowrap; }

.lp-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 0;
    border-radius: 999px;
    background-color: #2563EB;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease;
}

.lp-nav-cta svg { width: 16px; height: 16px; }
.lp-nav-cta:hover { background-color: #1D4ED8; transform: translateY(-1px); }
.lp-nav-cta:active { transform: translateY(0); }

@media (max-width: 1080px) {
    .lp-nav { gap: 12px; padding: 10px 16px; }
    .lp-links { gap: 12px; }
}

/* ---------- Menú hamburguesa (≤860px · landing + FAQ) ---------- */

.lp-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background-color: #FFFFFF;
    color: #1E293B;
    transition: border-color 160ms ease, color 160ms ease;
}

.lp-menu-btn svg { width: 22px; height: 22px; display: block; }
.lp-menu-btn .icon-close { display: none; }

.lp-menu-btn:hover { border-color: #2563EB; color: #1D4ED8; }
.lp-menu-btn:active { transform: scale(0.96); }

.lp-nav.is-open .lp-menu-btn { border-color: #BFDBFE; color: #1D4ED8; }
.lp-nav.is-open .lp-menu-btn .icon-burger { display: none; }
.lp-nav.is-open .lp-menu-btn .icon-close { display: block; }

/* panel bajo el nav (sticky actúa de contenedor) */
.lp-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 14px 14px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.lp-nav.is-open .lp-mobile-menu {
    display: block;
    animation: lp-menu-in 160ms ease;
}

.lp-menu-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #1E293B;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.lp-menu-link:hover { background-color: #F1F5F9; color: #1D4ED8; }

.lp-menu-sep { height: 1px; margin: 8px 12px; background-color: #E2E8F0; }

.lp-menu-cta { display: flex; width: 100%; justify-content: center; margin-top: 10px; }

@keyframes lp-menu-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
    .lp-links,
    .lp-login-link,
    .lp-nav-cta { display: none; }
    .lp-menu-btn { display: inline-flex; }
}

/* ---------- Hero (split asimétrico + foto real) ---------- */

.lp-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: center;
    padding: 56px 24px 40px;
    max-width: 1180px;
    margin: 0 auto;
}

.lp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background-color: #ffffff;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.lp-eyebrow strong { color: #2563EB; }

.lp-h1 {
    margin: 18px 0 0;
    font-size: clamp(2.1rem, 5vw, 3.3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #1E293B;
    text-wrap: balance;
}

.lp-h1 em {
    font-style: normal;
    color: #2563EB;
}

.lp-lead {
    margin: 18px 0 0;
    max-width: 46ch;
    font-size: 1.02rem;
    line-height: 1.65;
    color: #475569;
}

.lp-lead strong { color: #1E293B; }

.lp-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.lp-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 26px;
    border: 0;
    border-radius: 12px;
    background-color: #2563EB;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.lp-cta-primary svg { width: 18px; height: 18px; }

.lp-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 99, 235, 0.38); }
.lp-cta-primary:active { transform: translateY(0); }

.lp-cta-ghost {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 24px;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    background-color: #ffffff;
    color: #1E293B;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease;
}

.lp-cta-ghost:hover { border-color: #2563EB; color: #2563EB; }

/* Visual hero: collage de fotos reales + glass card */

.lp-hero-visual {
    position: relative;
    display: grid;
    gap: 14px;
}

.lp-photo-main {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
}

.lp-photo-main img { height: 220px; }
.lp-photo-main[data-missing="1"] img { height: 220px; }

.lp-photo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.lp-photo-row .lp-photo-main { grid-column: auto; }

/* Slot genérico: foto real con degradado de respaldo */
.lp-photo-slot {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    background:
        radial-gradient(120% 90% at 15% 0%, #DBEAFE 0%, transparent 60%),
        linear-gradient(160deg, #EDF2F7, #DFE7EF);
    margin: 0;
}

.lp-photo-slot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.lp-photo-slot::before {
    content: attr(data-icon);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    opacity: 0.35;
}

.lp-photo-slot img[src] { z-index: 1; }

.lp-photo-tag {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.88);
    color: #F8FAFC;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Tarjeta glass: mini-pantalla del sistema sobre la foto */
.lp-glass {
    position: absolute;
    left: -14px;
    bottom: -24px;
    z-index: 3;
    width: min(300px, 78%);
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background-color: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

$111.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2563EB;
}

.lp-glass-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.lp-glass-code {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    color: #1E293B;
    font-variant-numeric: tabular-nums;
}

.lp-glass-div { width: 2px; align-self: stretch; background-color: #E2E8F0; }

.lp-glass-module {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    line-height: 1.25;
}

.lp-glass-next {
    margin-top: 10px;
    border-top: 1px solid #E2E8F0;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.lp-glass-next b { color: #1E293B; font-variant-numeric: tabular-nums; }

/* chips de iconos flotantes */
.lp-hero-chips {
    position: absolute;
    right: -8px;
    top: -16px;
    display: grid;
    gap: 8px;
    z-index: 3;
}

.lp-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
    font-size: 12.5px;
    font-weight: 700;
    color: #1E293B;
}

.lp-chip .cat-icon { width: 15px; height: 15px; }

.lp-chip-c1 { color: #B91C1C; }
.lp-chip-c2 { color: #B45309; }
.lp-chip-c3 { color: #047857; }

@media (min-width: 980px) {
    .lp-hero { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); padding-top: 64px; }
}

@media (prefers-reduced-transparency: reduce) {
    .lp-glass, .lp-chip { background-color: #ffffff; backdrop-filter: none; }
}

/* ---------- Afirmaciones (100% gratis, cloud, sin apps) ---------- */

.lp-claims {
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    background-color: #ffffff;
}

.lp-claims-row {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.lp-claim {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1E293B;
}

.lp-claim svg { width: 20px; height: 20px; color: #2563EB; flex: none; }

@media (min-width: 760px) {
    .lp-claims-row { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Secciones servibles ---------- */

.lp-section { max-width: 1180px; margin: 0 auto; padding: 64px 24px; }

.lp-title {
    margin: 0;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1E293B;
    max-width: 28ch;
}

.lp-sub {
    margin: 12px 0 0;
    max-width: 58ch;
    color: #475569;
    line-height: 1.65;
}

/* Bento de características: fotos reales + tarjetas, celdas desiguales */

.lp-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.lp-bento-big {
    grid-column: span 2;
    grid-row: span 2;
}

.lp-bento-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border-radius: 18px;
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    text-align: left;
}

.lp-bento-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1E293B;
}

.lp-bento-card p { margin: 0; font-size: 0.9rem; color: #475569; line-height: 1.55; }

.lp-bento-card.is-photo { padding: 0; position: relative; min-height: 260px; }

.lp-bento-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #2563EB;
}

.lp-bento-icon svg { width: 24px; height: 24px; }

.lp-bento .lp-photo-slot { height: 100%; border-radius: 0; border: 0; }
.lp-bento .lp-photo-slot img { position: absolute; }
.lp-bento .lp-photo-slot::before { font-size: 44px; }
.lp-bento .lp-photo-tag { font-size: 11px; }

.lp-bento-card:not(.is-photo) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.lp-bento-card:not(.is-photo) h3 { flex: 1; min-width: 50%; }

.lp-bento-card:not(.is-photo) p { flex-basis: 100%; }

.lp-bento-note {
    position: absolute;
    z-index: 2;
    bottom: 14px;
    left: 14px;
    right: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background-color: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
    color: #F8FAFC;
}

.lp-bento-note strong { display: block; font-size: 0.98rem; }
.lp-bento-note span { font-size: 0.82rem; color: #F8FAFC; }

@media (max-width: 980px) {
    .lp-bento { grid-template-columns: repeat(2, 1fr); }
    .lp-bento-big { grid-column: span 2; grid-row: auto; min-height: 320px; }
}

/* ---------- Gira de fotos scroll-snap (esperas reales) ---------- */

.lp-gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(320px, 78vw);
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 18px;
    scrollbar-width: thin;
}

.lp-gallery .lp-photo-slot { scroll-snap-align: start; aspect-ratio: 4 / 3; }
.lp-gallery .lp-photo-slot img { position: absolute; height: 100%; }

.lp-gallery-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.lp-gallery-info strong { color: #F8FAFC; font-size: 0.95rem; }
.lp-gallery-info span { color: #E2E8F0; font-size: 0.78rem; }

/* ---------- Precios / GRATIS ---------- */

.lp-price {
    border-radius: 24px;
    padding: 42px 34px;
    background:
        radial-gradient(110% 120% at 100% 0%, rgba(37, 99, 235, 0.14), transparent 55%),
        #ffffff;
    border: 1px solid #E2E8F0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: center;
}

.lp-price-badge {
    justify-self: center;
    text-align: center;
    padding: 22px 30px;
    border-radius: 20px;
    background-color: #E8F0FF;
    border: 1px solid #BFDBFE;
}

.lp-price-badge strong {
    display: block;
    font-size: clamp(2rem, 5vw, 2.7rem);
    font-weight: 800;
    line-height: 1;
    color: #2563EB;
}

.lp-price-badge span {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1E40AF;
}

.lp-price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }

.lp-price-list li {
    display: flex;
    gap: 11px;
    font-weight: 600;
    color: #1E293B;
    align-items: flex-start;
}

.lp-price-list svg {
    width: 22px;
    height: 22px;
    flex: none;
    color: #2563EB;
    margin-top: 1px;
}

.lp-price-list small { display: block; color: #475569; font-weight: 500; }

@media (min-width: 880px) {
    .lp-price { grid-template-columns: auto minmax(0, 1fr); }
}

/* ---------- Cómo funciona (pasos) ---------- */

.lp-steps-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 30px; }

.lp-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border-radius: 16px;
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
}

.lp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    background-color: #2563EB;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
}

.lp-step strong { display: block; font-size: 1rem; color: #1E293B; }
.lp-step p { margin: 2px 0 0; color: #475569; font-size: 0.9rem; line-height: 1.55; }

.step-icon svg { width: 22px; height: 22px; }

@media (min-width: 900px) {
    .lp-steps-row { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Casos de uso (lista corta con iconos de fila) ---------- */

.lp-uses-list {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.lp-use {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
}

.lp-use .cat-icon { width: 26px; height: 26px; color: #2563EB; flex: none; }

.lp-use:nth-child(3n+2) .cat-icon { color: #2563EB; }
.lp-use:nth-child(3n+3) .cat-icon { color: #B45309; }

.lp-use strong { font-size: 0.95rem; color: #1E293B; display: block; }
.lp-use span { font-size: 0.82rem; color: #475569; }

@media (min-width: 760px) {
    .lp-uses-list { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- CTA final + footer ---------- */

.lp-cta {
    margin: 24px auto 0;
    max-width: 1180px;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(160deg, #1E3A8A, #15407F 60%, #0F2C64);
    color: #F8FAFC;
    position: relative;
}

.lp-cta > .lp-container {
    position: relative;
    z-index: 1;
    padding-top: 46px;
    padding-bottom: 46px;
    display: grid;
    gap: 18px;
    justify-items: center;
    text-align: center;
}

.lp-cta h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 22ch;
}

.lp-cta p { margin: 0; color: #CBD5E1; font-size: 1rem; max-width: 52ch; }

.lp-cta .lp-ctas { justify-content: center; }

.lp-footer {
    border-top: 1px solid #E2E8F0;
    background-color: #ffffff;
    padding: 30px 24px 26px;
    margin-top: 56px;
}

.lp-footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
}

.lp-footer strong { color: #1E293B; font-size: 1rem; }
.lp-footer .lp-footer-tag { margin: 4px 0 0; font-size: 0.82rem; color: #475569; }

.lp-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.lp-footer-links a {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
}
.lp-footer-links a:hover { color: #2563EB; }

.lp-footer-copy {
    max-width: 1180px;
    margin: 22px auto 0;
    padding-top: 14px;
    border-top: 1px solid #E2E8F0;
    font-size: 12px;
    color: #5d6f8a;
    text-align: center;
}

@media (min-width: 800px) {
    .lp-footer-grid { grid-template-columns: 1fr auto; }
}

/* ---------- Landing: complementos (logo, subrayado, flow, footer) ---------- */

.lp-brand img { width: auto; height: 34px; display: block; }

.lp-underline {
    color: inherit;
    border-bottom: 6px solid #F59E0B;
    padding-bottom: 0.04em;
}

.lp-photo-main img { height: 100%; }

.lp-photo-slot::before {
    content: "";
    background-image: radial-gradient(rgba(37, 99, 235, 0.16) 1.3px, transparent 1.4px);
    background-size: 18px 18px;
}

.lp-flow { margin: 36px auto 0; max-width: 900px; text-align: center; }

.lp-flow img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
}

.lp-flow figcaption { margin-top: 12px; font-size: 0.82rem; color: #5d6f8a; }

.lp-cta-ghost-dark {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.lp-cta-ghost-dark:hover {
    border-color: #ffffff;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.14);
}

.lp-footer-logo { width: auto; height: 30px; display: block; margin-bottom: 8px; }

.lp-uses-note {
    margin: 22px 0 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.lp-body ::selection { background-color: #BFDBFE; }

/* ============================================================
   Página del cliente (móvil) — estilo MobileFlow
   ============================================================ */

.t-page {
    min-height: 100dvh;
    background-color: #F1F5F9;
    color: #16305c;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.t-header {
    padding: 14px 18px;
    background-color: #ffffff;
    border-bottom: 1px solid #E2E8F0;
    position: sticky;
    top: 0;
    z-index: 30;
}

.t-logo { width: auto; height: 34px; display: block; }

.t-main {
    max-width: 460px;
    margin: 0 auto;
    padding: 22px 18px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.t-h1 { margin: 0 0 4px; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; color: #16305c; }

.t-sub { margin: 0 0 6px; color: #5d739a; font-size: 0.92rem; line-height: 1.5; }

.t-cats { display: flex; flex-direction: column; gap: 12px; }

.t-cat-card {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 16px;
    background-color: var(--t-color-bg, #EFF6FF);
    color: var(--t-color, #1D4ED8);
    text-align: left;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.t-cat-card:nth-child(2) { --t-color-bg: #FEF3E2; --t-color: #B45309; }
.t-cat-card:nth-child(3) { --t-color-bg: #EAF7EC; --t-color: #15803D; }
.t-cat-card:nth-child(4) { --t-color-bg: #FDE8F1; --t-color: #BE185D; }
.t-cat-card:nth-child(5) { --t-color-bg: #EDE9FE; --t-color: #6D28D9; }

.t-cat-card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12); }
.t-cat-card:active { transform: scale(0.985); }
.t-cat-card:disabled { opacity: 0.6; cursor: wait; }
.t-cat-card.is-busy { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }

.t-cat-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.10);
    font-size: 1.05rem;
    font-weight: 800;
    color: inherit;
}

.t-cat-body { flex: 1; min-width: 0; }

.t-cat-body strong { display: block; font-size: 1rem; font-weight: 800; color: #16305c; }

.t-cat-body small { display: block; margin-top: 1px; font-size: 0.78rem; color: #64748B; line-height: 1.4; }

.t-cat-chev { flex: none; width: 20px; height: 20px; opacity: 0.7; }

.t-banner {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
}

.t-banner p { margin: 0; }

.t-ticket-card {
    border-radius: 20px;
    background: linear-gradient(180deg, #EAF2FF 0%, #F5F9FF 45%, #ffffff 100%);
    border: 1px solid #DBEAFE;
    box-shadow: 0 14px 30px rgba(30, 58, 138, 0.12);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.t-ticket-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.t-ticket-title { font-size: 1.15rem; font-weight: 800; color: #16305c; }

.t-ticket-cat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0.32rem 0.9rem;
    border-radius: 999px;
    background-color: #ffffff;
    border: 1px solid #BFDBFE;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1D4ED8;
}

.t-badge-icon { width: 16px; height: 16px; }

.t-ticket-code {
    margin: 0;
    text-align: center;
    font-size: clamp(4.2rem, 22vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #16305c;
    font-variant-numeric: tabular-nums;
}

.t-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 8px;
    background-color: #ffffff;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
}

.t-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.t-stat + .t-stat { border-left: 1px solid #E8EEF6; }

.t-stat-label { font-size: 0.68rem; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.04em; }

.t-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #16305c;
    font-variant-numeric: tabular-nums;
}

.t-timeline {
    list-style: none;
    margin: 0;
    padding: 6px 4px 2px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
}

.t-tl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 44px;
}

.t-tl-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #CBD5E1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.t-tl-dot svg { width: 13px; height: 13px; }

.t-tl-item.is-current .t-tl-dot {
    background-color: #22C55E;
    border-color: #22C55E;
}

.t-tl-item.is-mine .t-tl-dot {
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
    background-color: #ffffff;
}

.t-tl-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: #64748B;
    text-align: center;
    white-space: pre-line;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.t-tl-item.is-current .t-tl-label { color: #15803D; }
.t-tl-item.is-mine .t-tl-label { color: #1D4ED8; }
.t-tl-item.is-ellipsis { color: #94A3B8; font-weight: 800; letter-spacing: 2px; }

.t-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background-color: #1D4ED8;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.t-primary-btn svg { width: 19px; height: 19px; }

.t-primary-btn:hover { filter: brightness(1.05); box-shadow: 0 14px 30px rgba(37, 99, 235, 0.4); }
.t-primary-btn:active { transform: scale(0.985); }
.t-primary-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }

.t-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background-color: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
    font-size: 0.82rem;
    line-height: 1.45;
}

.t-note-ic { flex: none; width: 17px; height: 17px; margin-top: 1px; }

.t-screen {
    display: flex;
    flex-direction: column;
    gap: 10px; /* margen corto entre frame, aviso, boton y nota */
}

.t-screen[hidden] { display: none; }

@media (min-width: 640px) {
    .t-main { padding-top: 34px; }
    .t-ticket-code { font-size: 5.5rem; }
}


/* ============================================================
   Landing auth (registro/login), consola light, sonido de TV
   ============================================================ */

/* ---------- Nav del landing: enlace de login ---------- */

.lp-login-link {
    font-size: var(--text-sm);
    font-weight: 700;
    color: #2451a8;
    text-decoration: none;
}

.lp-login-link:hover { color: #16305c; text-decoration: underline; }

/* ---------- Páginas de autenticación (lp) ---------- */

.lp-auth-page {
    background:
        radial-gradient(90% 70% at 100% 0%, rgba(37, 99, 235, 0.08), transparent 55%),
        #F1F5F9;
    min-height: 100dvh;
}

.lp-back-home {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: color 160ms ease, border-color 160ms ease;
}

.lp-back-home svg { width: 15px; height: 15px; }

.lp-back-home:hover { color: #2563EB; border-color: #BFDBFE; }

.lp-auth {
    max-width: 620px;
    margin: 0 auto;
    padding: 84px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lp-auth-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }

.lp-auth-logo { width: auto; height: 44px; }

.lp-auth-title { margin: 4px 0 0; font-size: clamp(1.5rem, 3.4vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; color: #16305c; }

.lp-auth-sub { margin: 0; color: #5d739a; font-size: 0.95rem; }

/* tarjeta formularia */
.lp-form {
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 26px 26px 24px;
    box-shadow: 0 14px 34px rgba(30, 58, 138, 0.09);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lp-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lp-fieldset-title {
    padding: 0;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5b6b84;
}

.lp-2col { display: grid; grid-template-columns: 1fr; gap: 14px; }

@media (min-width: 620px) {
    .lp-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.lp-opt {
    display: inline-block;
    margin-left: 6px;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background-color: #F1F5F9;
    border: 1px solid #E2E8F0;
    font-size: 11px;
    font-weight: 600;
    color: #64748B;
    vertical-align: middle;
}

.lp-required-note { margin: -6px 0 0; font-size: 0.78rem; color: #55677F; text-align: center; }

/* banners lp */
.lp-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
}

.lp-banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.lp-banner p { margin: 0; }

.lp-banner-error { background-color: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }
.lp-banner-info { background-color: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.lp-banner .lp-banner-text { margin: 0; }

/* éxito registro */
.lp-success {
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 30px 26px;
    box-shadow: 0 14px 34px rgba(30, 58, 138, 0.09);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.lp-success-icon svg { width: 54px; height: 54px; }
.lp-success-title { margin: 0; font-size: 1.3rem; font-weight: 800; color: #16305c; }
.lp-success-text { margin: 0; max-width: 40ch; color: #5d739a; font-size: 0.92rem; line-height: 1.55; }

.lp-code-display {
    width: min(340px, 100%);
    padding: 14px;
    border-radius: 14px;
    border: 1.5px dashed #93C5FD;
    background-color: #F5F9FF;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.lp-code-label {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748B;
}

.lp-code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }

.lp-code-value {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: #16305c;
}

.copy-btn {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background-color: #ffffff;
    color: #16305c;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.copy-btn:hover { border-color: #2563EB; background-color: #F5F9FF; }

.lp-success .ghost-btn { align-self: center; }

.lp-auth-foot { text-align: center; color: #5d739a; font-size: 0.92rem; }

.lp-auth-foot p { margin: 0; }

.lp-link { color: #2563EB; font-weight: 700; text-decoration: none; }
.lp-link:hover { text-decoration: underline; }

/* ---------- Consola (light lp-style) ---------- */

.c-page {
    min-height: 100dvh;
    background-color: #F1F5F9;
    color: #16305c;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.console-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 10px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #E2E8F0;
}

.c-brand { display: flex; align-items: center; }
.c-logo { width: auto; height: 32px; display: block; }

.console-nav { display: flex; align-items: center; gap: 10px; }

.c-salir {
    font-size: 0.88rem;
    font-weight: 600;
    color: #5d739a;
    text-decoration: none;
}
.c-salir:hover { color: #16305c; }

.console-layout {
    max-width: 720px;
    margin: 0 auto;
    padding: 26px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.console-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.console-title { margin: 0; font-size: clamp(1.3rem, 3vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; color: #16305c; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0.5rem 1rem;
    border: 1px solid #CBD5E1;
    border-radius: 999px;
    background-color: #ffffff;
    color: #16305c;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cat-tab .cat-icon-tab { width: 16px; height: 16px; flex: none; }

.cat-tab:hover { border-color: var(--brand-500); }

.cat-tab.is-active {
    border-color: transparent;
    background-color: #1D4ED8;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.16);
}

.cat-tab.is-active .cat-icon-tab { color: #ffffff; }

/* tarjeta de llamada */
.c-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 22px;
    border-radius: 24px;
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    box-shadow: 0 14px 34px rgba(30, 58, 138, 0.09);
    text-align: center;
}

.c-label {
    margin: 0;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5b6b84;
}

.c-current {
    margin: 0;
    font-size: clamp(4.5rem, 16vw, 7rem);
    font-weight: 800;
    line-height: 1;
    color: #16305c;
    font-variant-numeric: tabular-nums;
}

.c-card .form-banner {
    width: 100%;
    margin: 6px 0 0;
    align-items: center;
}

.c-cat-hint { margin: 0; font-size: 0.92rem; font-weight: 700; color: #1D4ED8; }

.c-waiting { margin: 0; font-size: 0.88rem; color: #64748B; font-variant-numeric: tabular-nums; }

/* botón grande de llamar (responsivo) */
.c-call-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    margin-top: 14px;
    padding: 14px 22px;
    border: 0;
    border-radius: 18px;
    background-color: #1D4ED8;
    color: #ffffff;
    font-size: clamp(1.05rem, 2.6vw, 1.25rem);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(30, 58, 138, 0.22);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.c-call-btn:hover { filter: brightness(1.06); box-shadow: 0 16px 34px rgba(30, 58, 138, 0.22); }
.c-call-btn:active { transform: scale(0.985); }
.c-call-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }
.c-call-icon { width: 24px; height: 24px; flex: none; }

.c-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

.c-actions .ghost-btn { flex: 1 1 150px; min-height: 48px; }

.c-flow { margin: 12px 0 0; font-size: 0.8rem; color: #5b6b84; }
.c-flow span { font-weight: 700; color: #475569; }

.console-layout .c-card .form-banner { align-items: center; }

.display-link-row {
    text-align: center;
    padding-top: 6px;
}

.display-link-row .lp-link { font-size: 0.92rem; }

/* ---------- Responsive global del landing ---------- */

@media (max-width: 640px) {
    .lp-hero { padding: 34px 18px 30px; gap: 26px; }
    .lp-lead { font-size: 0.95rem; }
    .lp-glass { left: 14px; right: 14px; width: auto; bottom: -20px; }
    .lp-photo-main img { height: 190px; }
    .lp-strip { gap: 18px; }
    .lp-free-badge { width: 200px; padding: 1.2rem 0.8rem 1rem; }
    .lp-price { padding: 30px 22px; }
    .lp-section { padding: 46px 18px; }
    .lp-steps-row li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -20px; transform: translateX(-50%); }
    .lp-uses-grid { grid-template-columns: 1fr; }
    .lp-bento { grid-template-columns: 1fr; }
    .lp-bento-big { grid-column: auto; min-height: 260px; }
}

@media (min-width: 641px) and (max-width: 899px) {
    .lp-glass { left: 20px; right: auto; bottom: -18px; }
}

/* ---------- TV: botón de sonido ---------- */

.display-sound-btn {
    margin-left: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.display-sound-btn:hover { background-color: rgba(255, 255, 255, 0.22); border-color: #ffffff; }

.display-sound-btn[data-state="on"] {
    border-color: #34D399;
    color: #A7F3D0;
}

.display-sound-btn[data-state="off"] {
    animation: sound-pulse 1.6s ease-in-out infinite;
}

@keyframes sound-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

/* ---------- Rows de gestión de categorías ---------- */
.icon-swap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    color: #2563eb;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.icon-swap:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2); transform: scale(1.05); }


/* ---------- TV: branding + controles de sonido (elegible) ---------- */

.display-topbar-brand .display-topbar-logo {
    width: auto;
    height: 40px;
    display: block;
}

.display-mode-btn {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: transparent;
    color: #ffd34d;
    font-weight: 700;
}

.display-mode-btn:hover { background-color: rgba(255, 255, 255, 0.16); color: #ffe58a; }

.display-mode-btn[data-mode="chime"] { color: #a5d8ff; }

@media (max-width: 700px) {
    .display-clock { display: none; } /* muy angosto: el reloj cede ante los controles */
}
/* ---------- TV: selector de voz (elegible por navegador) ---------- */

.display-voice-select {
    max-width: 210px;
    min-height: 32px;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.display-voice-select:hover { border-color: rgba(255, 255, 255, 0.6); }

.display-voice-select option { color: #16305c; background-color: #ffffff; }

.display-voice-select:disabled { opacity: 0.6; cursor: not-allowed; }

/* el centro de la TV con BgDefault: mantiene proporción sutil */
.display-media-el[alt^="Marca"] {
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(30, 58, 138, 0.14);
    background-color: #ffffff;
}

/* ---------- Cliente: botón "Cambiar de fila" + fila con turno propio ---------- */

.t-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    border: 1.5px solid #CBD5E1;
    border-radius: 14px;
    background-color: #ffffff;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.t-ghost-btn svg { width: 17px; height: 17px; }

.t-ghost-btn:hover {
    border-color: #2563EB;
    color: #1D4ED8;
    background-color: #F5F9FF;
}

.t-ghost-btn:active { transform: scale(0.99); }

/* tarjeta con el turno propio (en selección) */
.t-cat-card.is-mine {
    border: 2px solid #2563EB;
    background-color: #EFF6FF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
}

.t-cat-card.is-mine .t-cat-icon { color: #1D4ED8; }

.t-cat-mine {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 9px;
    border-radius: 999px;
    background-color: #2563EB;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

/* volver a mi turno */
.t-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: center;
    margin: 2px 0 0;
    padding: 9px 18px;
    border-radius: 999px;
    background-color: #ffffff;
    border: 1.5px solid #BFDBFE;
    color: #1D4ED8;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.t-back-link svg { width: 16px; height: 16px; }

.t-back-link:hover { background-color: #EFF6FF; border-color: #2563EB; }

/* nota atenuada (turno vigente) */
.t-note.is-muted { color: #475569; background-color: #F1F5F9; border-color: #E2E8F0; }

.t-cat-card.is-busy .t-cat-icon { opacity: 0.55; }

/* ============================================================
   FAQ pública (/faq)
   Tokens según DESIGN.md · sin JS: <details>/<summary> nativos
   ============================================================ */

.faq-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 20px 72px;   /* el nav sticky vive en el flujo: menos holgura */
}

.faq-head { margin: 0 0 30px; }

.faq-title {
    margin: 0 0 10px;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #16305C;
}

.faq-sub { margin: 0; color: #475569; font-size: 1.02rem; }

.faq-group {
    margin: 38px 0 12px;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #1E293B;
    scroll-margin-top: 84px;   /* al saltar por el nav, la sección no queda bajo el sticky */
}

/* lista de acordeones nativos */
.faq-list { display: grid; gap: 10px; }

.faq-item {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.faq-item:hover { border-color: #CBD5E1; }

.faq-item[open] {
    border-color: #BFDBFE;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-q {
    font-weight: 700;
    font-size: 0.98rem;
    color: #1E293B;
}

.faq-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #475569;
    transition: transform 160ms ease, color 160ms ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: #1D4ED8;
}

.faq-a {
    margin: 0;
    padding: 0 18px 18px;
    max-width: 66ch;           /* línea de lectura 65–75ch (DESIGN.md) */
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.6;
}

/* llamada final hacia el registro */
.faq-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 44px;
    padding: 24px 26px;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    background-color: #FFFFFF;
}

.faq-cta strong {
    display: block;
    color: #16305C;
    font-size: 1.08rem;
    font-weight: 800;
}

.faq-cta p { margin: 4px 0 0; color: #475569; font-size: 0.92rem; }

.faq-mail {
    margin: 22px 0 0;
    text-align: center;
    color: #475569;
    font-size: 0.9rem;
}

.faq-mail a { color: #1D4ED8; font-weight: 700; text-decoration: none; }
.faq-mail a:hover { color: #2563EB; }

@media (max-width: 640px) {
    .faq-page { padding: 26px 14px 56px; }
    .faq-item summary { padding: 14px 15px; gap: 10px; }
    .faq-a { padding: 0 15px 16px; }
    .faq-cta { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-item summary,
    .faq-chevron { transition: none; }
}

