﻿/* Logo image â€” dashboard header only */
.dashboard-logo {
    display: inline-block;
    object-fit: contain;
    width: 36px;
    height: 36px;
    vertical-align: middle;
    border-radius: 6px;
    margin-right: 8px;
}
@media (max-width: 600px) {
    .dashboard-logo {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }
}
/**
 * SalÃ³n del Reino - Joya Oeste
 * FASE 00 (V2) - Estilos principales
 * 
 * Mobile-first, UX moderna, dark mode
 */

/* ========================================
   VARIABLES Y TEMAS
   ======================================== */
:root {
    /* === COLORES BASE === */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-surface: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-strong: #cbd5e1;

    /* === ACENTO === */
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-subtle: #eff6ff;
    --accent-ring: rgba(37,99,235,0.25);

    /* === STATUS === */
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --info: #0284c7;
    --info-bg: #f0f9ff;
    --info-border: #bae6fd;

    /* === SOMBRAS === */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --shadow: rgba(0, 0, 0, 0.1); /* compatibilidad */

    /* === ESPACIADO (grilla de 8px) === */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    /* alias legacy */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* === RADIOS === */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --border-radius: 8px; /* compatibilidad */

    /* === TRANSICIONES === */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* === Z-INDEX === */
    --z-sticky: 100;
    --z-dropdown: 200;
    --z-modal: 9000;

    /* === TAMAÃ‘OS === */
    --btn-height: 48px;
    --header-height: 64px;
    --sidebar-width: 260px;
    --bottom-nav-height: 64px;

    /* === TIPOGRAFÃA === */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 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: 1.875rem;
    --leading-tight: 1.25;
    --leading-snug: 1.4;
    --leading-base: 1.6;
    --leading-relaxed: 1.75;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
}

/* Bottom nav (mobile) con scroll horizontal */
/* Bottom nav (mobile) */
.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 62px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
    justify-content: space-around;
    align-items: center;
    padding: 0 2px;
}
.bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    height: 100%;
    transition: color .15s;
    border-radius: 10px;
    padding: 0 2px;
}
.bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    height: 100%;
    transition: color .15s;
    border-radius: 10px;
    padding: 0 2px;
}
.bottom-nav-more {
    background: #f3f4f6;
    color: #374151;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.bottom-nav-more.active {
    background: #e0e7ef;
}
.bottom-nav-item.active {
    color: var(--text-primary);
    background: #f1f5f9;
}
.bottom-nav-icon {
    font-size: 1.35rem;
    line-height: 1;
}
.bottom-nav-label {
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
}
/* Menú flotante de más secciones */
.bottom-nav-more-menu {
    position: fixed;
    left: auto;
    right: 0;
    bottom: 62px;
    width: 200px;
    max-width: 90vw;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,.14);
    border-radius: 14px 14px 0 0;
    z-index: 9999;
    display: none;
    padding: 8px 0;
}
.bottom-nav-more-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--text-muted);
    text-decoration: none;
    transition: background .15s;
}
.bottom-nav-more-item:hover,
.bottom-nav-more-item.active {
    background: #f1f5f9;
    color: var(--text-primary);
}
.bottom-nav-more-item .bottom-nav-icon {
    font-size: 1.2rem;
}
.bottom-nav-more-item .bottom-nav-label {
    font-size: 0.85rem;
}
@media (min-width: 800px) {
    .bottom-nav { display: none; }
    .bottom-nav-more-menu { display: none !important; }
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--leading-base);
    transition: background-color var(--transition-slow), color var(--transition-slow);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   HEADER
   ======================================== */
.app-header {
    height: var(--header-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ========================================
   LAYOUT
   ======================================== */
.app-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.main-content {
    flex: 1;
    padding: var(--spacing-lg) var(--spacing-md);
    padding-bottom: calc(var(--bottom-nav-height) + var(--spacing-lg)); /* Espacio para bottom nav mobile */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   SIDEBAR (Desktop)
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: var(--spacing-md);
    display: none; /* Oculto en mobile por defecto */
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: background-color 0.2s ease;
    min-height: var(--btn-height);
}

.nav-item:hover {
    background-color: var(--bg-secondary);
}

.nav-item.active {
    background-color: var(--accent-primary);
    color: white;
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-label {
    font-size: 1rem;
}

/* ========================================
   BOTTOM NAVIGATION (Mobile)
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -2px 4px var(--shadow);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: color 0.2s ease;
    padding: var(--spacing-xs);
}

.bottom-nav-item.active {
    color: var(--accent-primary);
}

.bottom-nav-item:active {
    background-color: var(--bg-secondary);
}

.bottom-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

/* ========================================
   CARDS
   ======================================== */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: 0 2px 4px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--btn-height);
    padding: 0 var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

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

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-icon {
    min-width: var(--btn-height);
    min-height: var(--btn-height);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.btn-icon:hover {
    background-color: var(--bg-secondary);
}

/* ========================================
   BADGES & NOTICES
   ======================================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.phase-notice {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-md);
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   LOGIN & ERROR PAGES
   ======================================== */
.login-container,
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1d4ed8 100%);
}

.login-card,
.error-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-card h1,
.error-card h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.login-card h2 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.error-card h1 {
    font-size: 4rem;
    color: var(--accent-primary);
}

.placeholder-notice {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
}

/* ========================================
   RESPONSIVE - TABLET & DESKTOP
   ======================================== */
@media (min-width: 768px) {
    /* Mostrar sidebar en desktop */
    .sidebar {
        display: block;
    }
    
    /* Ocultar bottom nav en desktop */
    .bottom-nav {
        display: none;
    }
    
    /* Ajustar padding del main content */
    .main-content {
        padding-bottom: var(--spacing-lg);
    }
    
    /* Grid de cards en 2 columnas */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    /* Grid de cards en 3 columnas en pantallas grandes */
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   UTILIDADES
   ======================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--text-secondary);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   FASE 01 - FORMULARIOS
   ======================================== */
.login-form {
    margin-top: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    min-height: var(--btn-height);
    padding: 0 var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn-block {
    width: 100%;
}

.login-help {
    margin-top: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
}

.login-help details {
    margin-top: var(--spacing-sm);
    text-align: left;
}

/* ========================================
   ALERTAS
   ======================================== */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
}

.alert-error {
    background-color: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
}

/* ========================================
   HEADER ACTIONS & USER MENU
   ======================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-menu {
    position: relative;
}

.user-avatar {
    font-size: 1.5rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px var(--shadow);
    z-index: 1000;
}

.dropdown-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-header strong {
    display: block;
    margin-bottom: 0.25rem;
}

.dropdown-item {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
}

/* ========================================
   SIDEBAR USER INFO
   ======================================== */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-primary);
    border-radius: 50%;
    font-size: 1.5rem;
}

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

.sidebar-user-email {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
    margin-bottom: var(--spacing-lg);
}

.page-header h2 {
    margin-bottom: 0.25rem;
}

/* ========================================
   MONITOREO (FASE 01)
   ======================================== */
.monitoring-section {
    margin-top: var(--spacing-xl);
}

.monitoring-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
}

.monitoring-header {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    list-style: none;
}

.monitoring-header::-webkit-details-marker {
    display: none;
}

.monitoring-header h3 {
    display: inline;
    font-size: 1.25rem;
}

.monitoring-header small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
}

.monitoring-content {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.monitoring-stats,
.monitoring-recent {
    margin-bottom: var(--spacing-lg);
}

.monitoring-stats h4,
.monitoring-recent h4 {
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    color: var(--text-secondary);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.stats-table thead {
    background-color: var(--bg-secondary);
}

.stats-table th,
.stats-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.stats-table th {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stats-table td {
    font-size: 0.875rem;
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

.stats-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* Responsive tables */
@media (max-width: 767px) {
    .stats-table {
        font-size: 0.75rem;
    }
    
    .stats-table th,
    .stats-table td {
        padding: var(--spacing-xs);
    }
}

/* ========================================
   FASE 02 â€” PAUTAS: BUSCADOR
   ======================================== */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    transition: border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--accent-primary);
}

.search-icon {
    padding: 0 var(--spacing-sm);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    min-height: var(--btn-height);
    padding: 0 var(--spacing-sm) 0 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear {
    min-width: var(--btn-height);
    min-height: var(--btn-height);
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.search-clear:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.search-count {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

/* ========================================
   FASE 02 â€” PAUTAS: LISTA
   ======================================== */
.pautas-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.pauta-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pauta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.pauta-card-body {
    padding: var(--spacing-md);
    flex: 1;
}

.pauta-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.pauta-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.pauta-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.pauta-card-title a:hover {
    color: var(--accent-primary);
}

.pauta-has-img {
    font-size: 1.1rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.pauta-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    margin: var(--spacing-xs) 0 var(--spacing-sm) 0;
    line-height: 1.5;
}

.pauta-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.pauta-source,
.pauta-date,
.pauta-img-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pauta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: var(--accent-primary);
    color: #fff;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
}

.pauta-card-action {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

/* ========================================
   FASE 02 â€” PAUTAS: ESTADO VACÃO
   ======================================== */
.empty-state {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-lg);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.empty-state h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

/* ========================================
   FASE 02 â€” PAUTAS: DETALLE
   ======================================== */
.back-nav {
    margin-bottom: var(--spacing-lg);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pauta-detail {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px var(--shadow);
    padding: var(--spacing-lg);
}

.pauta-detail-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.pauta-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.pauta-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.pauta-body {
    margin-bottom: var(--spacing-lg);
}

.pauta-body p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    color: var(--text-primary);
}

.pauta-body p:last-child {
    margin-bottom: 0;
}

/* ========================================
   FASE 02 â€” EVIDENCIA
   ======================================== */
.evidencia-section {
    margin-bottom: var(--spacing-lg);
}

.evidencia-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.evidencia-card {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
}

.evidencia-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    align-items: baseline;
}

.evidencia-row:last-child {
    margin-bottom: 0;
}

.evidencia-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 80px;
    flex-shrink: 0;
}

.evidencia-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.evidencia-excerpt-row {
    flex-direction: column;
    gap: var(--spacing-xs);
}

.evidencia-excerpt {
    margin: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    border-left: 2px solid var(--border-color);
}

/* ========================================
   FASE 02 â€” GALERÃA
   ======================================== */
/* ========================================
   GALERÍA DE FOTOS - Nueva desde cero
   ======================================== */

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.galeria-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    padding: 0;
    display: block;
}

.galeria-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--accent-primary);
}

.galeria-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Modal lightbox */
.galeria-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.galeria-modal-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.galeria-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 1;
}

.galeria-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.galeria-close:hover {
    background: rgba(255,255,255,0.2);
}

.galeria-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.galeria-caption {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    text-align: center;
    margin: 0;
}

@media (min-width: 768px) {
    .pauta-detail {
        padding: var(--spacing-xl);
    }
    .pauta-detail-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   FASE 02 â€” PIE DE DETALLE
   ======================================== */
.pauta-detail-footer {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-lg);
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: FILTROS
   ======================================== */
.filter-bar {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.filter-bar .search-box {
    flex: 1 1 220px;
    margin-bottom: 0;
}

.status-filter-select {
    padding: 0.55rem var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: 180px;
    transition: border-color 0.2s;
}

.status-filter-select:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-color: var(--accent-primary);
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: BADGES DE ESTADO
   ======================================== */
.badge-operativo,
.badge-mantenimiento,
.badge-critico {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-operativo {
    background-color: #dcfce7;
    color: #166534;
}

.badge-mantenimiento {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-critico {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
    .badge-operativo    { background-color: #14532d; color: #bbf7d0; }
    .badge-mantenimiento{ background-color: #431407; color: #fef08a; }
    .badge-critico      { background-color: #450a0a; color: #fecaca; }
}

body.dark-mode .badge-operativo    { background-color: #14532d; color: #bbf7d0; }
body.dark-mode .badge-mantenimiento{ background-color: #431407; color: #fef08a; }
body.dark-mode .badge-critico      { background-color: #450a0a; color: #fecaca; }

.page-subtitle .badge-operativo,
.page-subtitle .badge-mantenimiento,
.page-subtitle .badge-critico {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: GRID Y TARJETAS
   ======================================== */
.exh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.exh-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: box-shadow 0.2s, transform 0.1s, border-color 0.2s;
    cursor: pointer;
}

.exh-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    text-decoration: none;
}

.exh-card:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.exh-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.exh-code {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exh-status-badge {
    font-size: 0.75rem;
}

.exh-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.exh-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.exh-updated {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: auto;
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: CHECKLIST PROGRESO (MINI)
   ======================================== */
.checklist-progress-mini {
    margin-top: var(--spacing-xs);
}

.checklist-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.checklist-pct {
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-lg {
    height: 10px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.progress-good  { background-color: #22c55e; }
.progress-warn  { background-color: #eab308; }
.progress-bad   { background-color: #ef4444; }

/* ========================================
   FASE 03 â€” EXHIBIDORES: DETALLE HEADER
   ======================================== */
.exh-detail-header {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.exh-detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.exh-detail-code {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.exh-detail-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.exh-status-badge-lg {
    font-size: 0.9rem;
    padding: 0.35rem 0.85rem;
    flex-shrink: 0;
}

.exh-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.exh-detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.exh-detail-meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.exh-detail-meta-value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.exh-detail-actions {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: SECCIONES
   ======================================== */
.exh-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.exh-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-md) 0;
}

.exh-empty-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: CHECKLIST DETALLE
   ======================================== */
.checklist-progress-block {
    margin-bottom: var(--spacing-md);
}

.checklist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.9rem;
}

.checklist-item.ok {
    background-color: rgba(34, 197, 94, 0.08);
}

.checklist-item.fail {
    background-color: rgba(239, 68, 68, 0.08);
}

.checklist-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.checklist-label {
    color: var(--text-primary);
}

.checklist-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: HISTORIAL
   ======================================== */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.history-table th {
    text-align: left;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.history-table td {
    padding: var(--spacing-sm) var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-ts {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.history-note {
    line-height: 1.5;
}

.history-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.history-type-estado      { background-color: #dbeafe; color: #1d4ed8; }
.history-type-mantenimiento{ background-color: #fef9c3; color: #854d0e; }
.history-type-asignacion  { background-color: #ede9fe; color: #5b21b6; }

body.dark-mode .history-type-estado       { background-color: #1e3a5f; color: #93c5fd; }
body.dark-mode .history-type-mantenimiento{ background-color: #431407; color: #fef08a; }
body.dark-mode .history-type-asignacion   { background-color: #2e1065; color: #d8b4fe; }

/* ========================================
   FASE 03 â€” EXHIBIDORES: WHATSAPP BUTTON
   ======================================== */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--border-radius);
    background-color: #25d366;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-whatsapp:hover {
    background-color: #1ebe5d;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    color: #fff;
}

/* ========================================
   FASE 03 â€” EXHIBIDORES: BACK NAV BOTTOM
   ======================================== */
.back-nav-bottom {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-lg);
}

/* ========================================
   FASE 03 â€” PAGE HEADER REFINEMENT
   ======================================== */
.page-header {
    margin-bottom: var(--spacing-lg);
}

.page-header h2 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1.5rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* ========================================
   FASE 02.5 â€” PREMIUM: TIPOGRAFÃA
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    line-height: var(--leading-tight);
    color: var(--text-primary);
    font-weight: 700;
}

.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-muted { color: var(--text-muted); }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

/* ========================================
   FASE 02.5 â€” PREMIUM: FOCUS-VISIBLE
   ======================================== */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   FASE 02.5 â€” PREMIUM: UTILIDADES
   ======================================== */
.stack > * + * {
    margin-top: var(--stack-gap, var(--spacing-md));
}
.stack-sm > * + * { --stack-gap: var(--spacing-sm); }
.stack-lg > * + * { --stack-gap: var(--spacing-lg); }

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-md) 0;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ========================================
   FASE 02.5 â€” PREMIUM: FORM COMPONENTS
   ======================================== */
.label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: var(--tracking-wide);
}

.input {
    width: 100%;
    min-height: var(--btn-height);
    padding: 0 var(--space-4);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    -webkit-appearance: none;
    appearance: none;
}
.input:hover {
    border-color: var(--border-strong);
}
.input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.input::placeholder {
    color: var(--text-muted);
}
.input.input-error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}

.help {
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}
.error-msg {
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--error);
    font-weight: 500;
}

/* Password field */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}
.password-field .input {
    padding-right: 3rem;
}
.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--btn-height);
    height: var(--btn-height);
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: color var(--transition-fast);
}
.password-toggle:hover {
    color: var(--text-primary);
}

/* Checkbox â€” compact premium */
.form-check-row {
    display: flex;
    align-items: center;
    margin: calc(var(--space-1) * -1) 0;
}
.form-check {
    display: flex;
    align-items: center;
}
.check-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-muted);
    -webkit-user-select: none;
    user-select: none;
    line-height: 1.2;
    padding: 2px 0;
}
.check-input {
    width: 15px;
    height: 15px;
    min-width: 15px;
    cursor: pointer;
    accent-color: var(--accent-primary);
    margin: 0;
}

/* ========================================
   FASE 02.5 â€” PREMIUM: ALERTS MEJORADAS
   ======================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--text-sm);
    line-height: var(--leading-base);
    border: 1px solid transparent;
}
.alert-icon {
    flex-shrink: 0;
    margin-top: 0.05rem;
}
.alert-success {
    background-color: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}
.alert-warning {
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}
.alert-info {
    background-color: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info);
}

/* ========================================
   FASE 02.5 â€” PREMIUM: BOTONES EXTENDIDOS
   ======================================== */
.btn-ghost {
    background-color: transparent;
    color: var(--accent-primary);
    border: 1.5px solid var(--accent-primary);
}
.btn-ghost:hover {
    background-color: var(--accent-subtle);
    color: var(--accent-primary);
}
.btn-danger {
    background-color: var(--error);
    color: #fff;
    border: none;
}
.btn-danger:hover {
    background-color: #b91c1c;
}
.btn-loading {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-sm {
    min-height: 36px;
    padding: 0 var(--space-4);
    font-size: var(--text-sm);
}

/* ========================================
   FASE 02.5 â€” PREMIUM: CHIPS / ROL BADGES
   ======================================== */
.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    border: 1px solid transparent;
}
.chip-admin {
    background-color: #ede9fe;
    color: #5b21b6;
    border-color: #c4b5fd;
}
.chip-ayudante {
    background-color: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.chip-predicacion {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.chip-visitante {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    border-color: var(--border-color);
}
[data-theme="dark"] .chip-admin        { background-color: #2e1065; color: #d8b4fe; border-color: #5b21b6; }
[data-theme="dark"] .chip-ayudante     { background-color: #172554; color: #93c5fd; border-color: #1d4ed8; }
[data-theme="dark"] .chip-predicacion  { background-color: #052e16; color: #86efac; border-color: #166534; }
[data-theme="dark"] .chip-visitante    { background-color: var(--bg-surface); color: var(--text-secondary); border-color: var(--border-color); }

/* ========================================
   FASE 02.5 â€” PREMIUM: KPI CARDS
   ======================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
@media (min-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-5);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.kpi:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.kpi-icon {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: var(--space-1);
}
.kpi-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1;
}
.kpi-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}
.kpi-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}
.kpi-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-primary);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.kpi-accent-success { background-color: var(--success); }
.kpi-accent-warning { background-color: var(--warning); }
.kpi-accent-error   { background-color: var(--error); }

/* ========================================
   FASE 02.5 â€” PREMIUM: DASHBOARD GREETING
   ======================================== */
.dash-greeting {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}
.dash-greeting-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.dash-greeting-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    line-height: var(--leading-tight);
}
.dash-greeting-sub {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.dash-greeting-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* ========================================
   FASE 02.5 â€” PREMIUM: SECTION TITLE
   ======================================== */
.section-title {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 var(--space-4) 0;
}

/* ========================================
   FASE 02.5 â€” PREMIUM: QUICK-ACCESS CARDS
   ======================================== */
.quick-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
@media (min-width: 600px) {
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
}

.quick-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.quick-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    text-decoration: none;
    color: inherit;
}
.quick-card-icon {
    font-size: 2.5rem;
    line-height: 1;
}
.quick-card-body {
    flex: 1;
}
.quick-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin: 0 0 var(--space-1) 0;
    color: var(--text-primary);
}
.quick-card-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-base);
}
.quick-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.quick-card-arrow {
    color: var(--accent-primary);
    font-size: 1.25rem;
    transition: transform var(--transition-base);
    flex-shrink: 0;
}
.quick-card:hover .quick-card-arrow {
    transform: translateX(4px);
}

/* ========================================
   FASE 02.5 â€” PREMIUM: MONITORING MEJORAS
   ======================================== */
.stats-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.stats-table-wrapper .stats-table {
    border: none;
}
.stats-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--bg-secondary);
}

/* ========================================
   FASE 02.5 â€” PREMIUM: SIDEBAR MEJORADO
   ======================================== */
.nav-item {
    position: relative;
    letter-spacing: var(--tracking-wide);
}
.nav-item.active {
    background-color: var(--accent-subtle);
    color: var(--accent-primary);
    font-weight: 600;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background-color: var(--accent-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
[data-theme="dark"] .nav-item.active {
    background-color: var(--accent-subtle);
    color: var(--accent-hover);
}

/* ========================================
   FASE 02.5 â€” PREMIUM: CARD MEJORAS
   ======================================== */
.card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}
.card-body {
    padding: var(--space-6);
}

/* ========================================
   FASE 02.5 â€” PREMIUM: LOGIN PAGE
   ======================================== */
.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background:
        radial-gradient(ellipse at top left, rgba(37,99,235,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(99,102,241,0.09) 0%, transparent 55%),
        var(--bg-secondary);
}
[data-theme="dark"] .login-bg {
    background:
        radial-gradient(ellipse at top left, rgba(37,99,235,0.2) 0%, transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(99,102,241,0.15) 0%, transparent 55%),
        var(--bg-primary);
}

/* Override legacy .login-card overrides only where needed */
.login-bg .login-card {
    max-width: 480px;
    border-radius: var(--radius-xl);
    padding: var(--space-10) var(--space-8);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    text-align: left;
}
@media (max-width: 480px) {
    .login-bg .login-card {
        padding: var(--space-8) var(--space-5);
        border-radius: var(--radius-lg);
    }
}

.login-brand {
    text-align: center;
    margin-bottom: var(--space-8);
}
.login-brand-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--space-4);
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg-secondary);
    box-shadow: 0 4px 16px rgba(37,99,235,0.13), 0 1.5px 4px rgba(0,0,0,0.07);
    border: 1.5px solid var(--border-color);
    overflow: hidden;
}
.login-brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}
.login-brand-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 var(--space-1) 0;
}
.login-brand-sub {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}
.login-form .form-group {
    margin-bottom: 0;
}
.login-footer-note {
    margin-top: var(--space-6);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-4);
}

/* ============================================================
   FASE 02.5 â€” DASHBOARD PREMIUM V2
   Scoped under .dashboard-v2 to avoid collisions
   ============================================================ */

/* === EXTRA TOKENS (premium shell) === */
:root {
    --shell-bg:       #f4f3f0;
    --shell-sidebar:  #181c2e;
    --shell-sidebar-hover: rgba(255,255,255,0.07);
    --shell-sidebar-active: rgba(255,255,255,0.15);
    --sidebar-text:   rgba(255,255,255,0.75);
    --sidebar-text-active: #ffffff;
    --sidebar-accent: #f87171;
    --card-white:     #ffffff;
    --card-radius:    20px;
    --card-shadow:    0 2px 10px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.05);
    --hero-from:      #f97316;
    --hero-mid:       #ec4899;
    --hero-to:        #e11d48;
    --topbar-h:       68px;
}
[data-theme="dark"] {
    --shell-bg:       #0d1117;
    --card-white:     #161b22;
    --card-shadow:    0 2px 10px rgba(0,0,0,0.4);
    --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.5);
}

/* === SHELL LAYOUT === */
.dashboard-v2 {
    background-color: var(--shell-bg);
}
.dashboard-v2 .app-header { display: none; }

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR PREMIUM (dark)
   ============================================================ */
.sidebar-dark {
    width: 72px;
    background: var(--shell-sidebar);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    gap: 0;
    transition: width var(--transition-base);
    overflow: hidden;
}

/* Expanded on desktop â‰¥1024 */
@media (min-width: 1024px) {
    .sidebar-dark { width: 200px; align-items: stretch; padding: 20px 12px 16px; }
    .sidebar-dark .sd-logo-wrap { padding: 0 8px 24px; }
    .sd-label { display: block !important; }
    .sd-logo-text { display: block !important; }
}

.sd-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    padding-bottom: 0;
    width: 100%;
}

.sd-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.sd-logo-text {
    display: none;
    margin-left: 10px;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--sidebar-text-active);
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.sd-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    flex: 1;
}

.sd-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--sidebar-text);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
    position: relative;
}

@media (min-width: 1024px) {
    .sd-item { justify-content: flex-start; }
}

.sd-item:hover {
    background: var(--shell-sidebar-hover);
    color: var(--sidebar-text-active);
}

.sd-item.active {
    background: var(--shell-sidebar-active);
    color: var(--sidebar-text-active);
}

.sd-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--sidebar-accent);
}

.sd-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.sd-label {
    display: none;
}

.sd-spacer { flex: 1; }

.sd-bottom {
    width: 100%;
    padding: 0 0 4px;
}

.sd-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--sidebar-text);
    font-size: var(--text-xs);
    transition: background var(--transition-fast);
}

@media (min-width: 1024px) {
    .sd-avatar { justify-content: flex-start; }
}

.sd-avatar:hover { background: var(--shell-sidebar-hover); color: var(--sidebar-text-active); }

.sd-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f87171, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sd-avatar-info { display: none; }
@media (min-width: 1024px) { .sd-avatar-info { display: block; overflow: hidden; } }

.sd-avatar-email {
    font-weight: 600;
    color: var(--sidebar-text-active);
    font-size: var(--text-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.sd-avatar-role {
    font-size: 10px;
    color: var(--sidebar-text);
    text-transform: capitalize;
}

/* ============================================================
   MAIN SHELL (content right of sidebar)
   ============================================================ */
.shell-main {
    flex: 1;
    margin-left: 72px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--bottom-nav-height);
}

@media (min-width: 768px) {
    .shell-main { padding-bottom: 0; }
}

@media (min-width: 1024px) {
    .shell-main { margin-left: 200px; }
}

/* ============================================================
   TOPBAR PREMIUM
   ============================================================ */
.topbar {
    height: var(--topbar-h);
    background: var(--card-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    flex-shrink: 0;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.topbar-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}

.topbar-spacer { flex: 1; }

.topbar-search {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-width: 160px;
}

@media (min-width: 640px) { .topbar-search { display: flex; } }

.topbar-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: var(--text-sm);
    color: var(--text-primary);
    width: 100%;
}

.topbar-search input::placeholder { color: var(--text-muted); }

.topbar-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--text-primary);
    color: var(--card-white);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .topbar-cta {
    background: #ffffff;
    color: #0f172a;
}

.topbar-cta:hover { opacity: 0.85; }
.topbar-cta:active { transform: scale(0.97); }

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.topbar-icon-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* ── Export dropdown button (topbar) ───────────────────────────── */
.export-dropdown { position: relative; display: inline-flex; flex-shrink: 0; }
.topbar-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-white);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.topbar-export-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.export-drop-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.13);
    min-width: 185px;
    z-index: 300;
    overflow: hidden;
}
.export-drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main, #1e293b);
    text-decoration: none;
    transition: background var(--transition-fast);
}
.export-drop-item:hover { background: var(--bg-secondary); }
.export-drop-item + .export-drop-item { border-top: 1px solid var(--border-color, #e2e8f0); }
.export-drop-group-label {
    padding: 6px 16px 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted, #94a3b8);
}
.export-drop-divider {
    height: 1px;
    background: var(--border-color, #e2e8f0);
    margin: 4px 0;
}

.topbar-notif-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--sidebar-accent);
    border-radius: 50%;
    border: 1.5px solid var(--card-white);
}

.topbar-user-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f87171, #a78bfa);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--transition-fast);
    position: relative;
}

.topbar-user-btn:hover { border-color: var(--accent-primary); }

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow-hover);
    min-width: 220px;
    z-index: 300;
    overflow: hidden;
}

.topbar-dropdown-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-color);
}

.topbar-dropdown-email {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-dropdown-role {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: capitalize;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: left;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.topbar-dropdown-item:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* ============================================================
   DASHBOARD CONTENT GRID
   ============================================================ */
.dash-content {
    padding: 24px 20px;
    flex: 1;
}

.grid-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .grid-main { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
    .grid-main { grid-template-columns: 1fr 1fr 280px; }
}

/* ============================================================
   CARDS
   ============================================================ */

/* Base premium card */
.cp {
    background: var(--card-white);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.05);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    overflow: hidden;
}

[data-theme="dark"] .cp {
    border-color: var(--border-color);
}

.cp:hover { box-shadow: var(--card-shadow-hover); }

.cp-body { padding: 20px 22px; }
.cp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cp-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.cp-more {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 1;
    padding: 0 2px;
    border-radius: 4px;
    transition: color var(--transition-fast);
}

.cp-more:hover { color: var(--text-primary); }

/* Hero gradient card */
.cp-hero {
    background: linear-gradient(145deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
    color: #ffffff;
    border: none;
}

.cp-hero .cp-title { color: rgba(255,255,255,0.85); }
.cp-hero .cp-more { color: rgba(255,255,255,0.6); }
.cp-hero .cp-more:hover { color: #fff; }

.kpi-num {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 6px 0 8px;
}

.cp-hero .kpi-num { color: #ffffff; }

.kpi-sub-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
}

.kpi-sub-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,0.25);
    padding-right: 20px;
}

.kpi-sub-item:last-child { border-right: none; padding-right: 0; }

.kpi-sub-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: #ffffff;
}

.kpi-sub-label {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.7);
}

/* Sparkline SVG in hero */
.sparkline-wrap {
    margin-top: 12px;
    opacity: 0.45;
    overflow: hidden;
    border-radius: 8px;
}

/* Donut chart (CSS conic-gradient) */
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 0 4px;
}

.donut {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-inner {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--card-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-secondary);
    z-index: 1;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.dl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dl-val {
    font-weight: 700;
    color: var(--text-primary);
    margin-left: auto;
}

/* Right column compact cards */
.col-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 640px) and (max-width: 1099px) {
    .col-right { grid-column: span 2; display: grid; grid-template-columns: repeat(3, 1fr); }
}

/* Stat highlight card */
.cp-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cp-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.icon-red { background: #fff0f0; }
.icon-green { background: #f0fdf4; }
.icon-blue { background: #eff6ff; }
.icon-amber { background: #fffbeb; }
[data-theme="dark"] .icon-red { background: #450a0a; }
[data-theme="dark"] .icon-green { background: #052e16; }
[data-theme="dark"] .icon-blue { background: #172554; }
[data-theme="dark"] .icon-amber { background: #451a03; }

.cp-stat-body { flex: 1;}

.cp-stat-val {
    font-size: var(--text-xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.cp-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

/* Progress bar */
.progress-bar-wrap {
    margin-top: 10px;
}

.progress-bar-track {
    height: 5px;
    border-radius: 99px;
    background: var(--bg-secondary);
    overflow: hidden;
}

[data-theme="dark"] .progress-bar-track { background: var(--border-color); }

.progress-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--accent-primary);
    transition: width 0.8s cubic-bezier(.4,0,.2,1);
}

.progress-bar-fill.fill-red { background: var(--sidebar-accent); }
.progress-bar-fill.fill-green { background: var(--success); }
.progress-bar-fill.fill-dark { background: var(--text-primary); }

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 5px;
}

/* Bar chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 60px;
    margin-top: 8px;
}

.bar-chart .bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: var(--bg-secondary);
    transition: background var(--transition-fast);
    min-width: 0;
}

[data-theme="dark"] .bar-chart .bar { background: var(--border-color); }

.bar-chart .bar.bar-active { background: var(--sidebar-accent); }
.bar-chart .bar.bar-mid { background: var(--accent-primary); opacity: 0.45; }

.bar-labels {
    display: flex;
    gap: 5px;
    margin-top: 4px;
}

.bar-labels span {
    flex: 1;
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
}

/* ============================================================
   ACTIVITY SECTION
   ============================================================ */
.section-label {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 28px 0 12px;
}

.activity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .activity-grid { grid-template-columns: 2fr 1fr; }
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-row:last-child { border-bottom: none; }

.activity-thumb {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
}

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

.activity-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 1px;
}

.activity-tag {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.activity-stat {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.stat-up { color: var(--success); }
.stat-dn { color: var(--sidebar-accent); }

.activity-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    letter-spacing: 2px;
    border-radius: 6px;
    transition: color var(--transition-fast);
}

.activity-more-btn:hover { color: var(--text-primary); }

/* Quick-action rows (non-admin) */
.qaction-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background var(--transition-fast);
    border-radius: 0;
}

.qaction-row:first-child { border-radius: var(--card-radius) var(--card-radius) 0 0; }
.qaction-row:last-child { border-bottom: none; border-radius: 0 0 var(--card-radius) var(--card-radius); }
.qaction-row:hover { background: var(--bg-secondary); }

.qaction-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.qaction-body { flex: 1; }

.qaction-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.qaction-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 1px;
}

.qaction-arrow {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Premium table (monitoring) */
.table-premium {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.table-premium thead th {
    padding: 8px 12px;
    text-align: left;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.table-premium tbody td {
    padding: 10px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-premium tbody tr:last-child td { border-bottom: none; }

.table-premium tbody tr:hover td { background: var(--bg-secondary); }

.chip-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chip-admin { background: #eff6ff; color: #2563eb; }
.chip-ayudante { background: #f0fdf4; color: #16a34a; }
.chip-predicacion { background: #fffbeb; color: #d97706; }
.chip-visitante { background: #f5f3ff; color: #7c3aed; }
[data-theme="dark"] .chip-admin { background: #172554; color: #93c5fd; }
[data-theme="dark"] .chip-ayudante { background: #052e16; color: #86efac; }
[data-theme="dark"] .chip-predicacion { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .chip-visitante { background: #2e1065; color: #c4b5fd; }

/* Monitoring details panel */
.monitoring-v2 {
    margin-top: 0;
}

.monitoring-v2 summary.monitoring-header::-webkit-details-marker { display: none; }

/* ============================================================
   BOTTOM NAV â€” keep for mobile inside v2
   ============================================================ */
.dashboard-v2 .bottom-nav {
    display: flex;
}

@media (min-width: 768px) {
    .dashboard-v2 .bottom-nav { display: none; }
    .dashboard-v2 .sidebar-dark { display: flex; }
}

/* Hide old sidebar inside v2 */
.dashboard-v2 .sidebar { display: none !important; }

/* Focus visible for accessibility */
.sd-item:focus-visible,
.topbar-icon-btn:focus-visible,
.topbar-cta:focus-visible,
.topbar-user-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ============================================================
   DARK MODE adjustments for v2
   ============================================================ */
[data-theme="dark"] .topbar {
    background: var(--card-white);
    border-color: var(--border-color);
}
[data-theme="dark"] .topbar-pill {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}
[data-theme="dark"] .topbar-search {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}
[data-theme="dark"] .donut-inner {
    background: var(--card-white);
}



/* =============================================================
   FASE 02.5 — PAUTAS V2 — Minimalista / Sobrio
   Scope: body.pautas-v2
   ============================================================= */

/* Ocultar layout anterior */
.pautas-v2 .app-header,
.pautas-v2 .sidebar,
.pautas-v2 .app-layout { display: none !important; }

/* ---- Page container ---- */
.pautas-page {
    padding: 28px 36px 64px;
    max-width: 780px;
    width: 100%;
}
@media (max-width: 1023px) { .pautas-page { padding: 20px 20px 80px; } }
@media (max-width: 639px)  { .pautas-page { padding: 14px 12px 80px; } }

/* ---- Page heading ---- */
.pautas-heading {
    margin-bottom: 20px;
}
.pautas-heading h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 3px;
}
.pautas-heading p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

/* ---- Toolbar ---- */
.pautas-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pautas-cat-pill {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
    line-height: 1.5;
}
.pautas-cat-pill:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.pautas-cat-pill.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}
.pautas-cat-pill:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.pautas-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ---- List ---- */
.pautas-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;          /* tight list, no gaps —  border creates separation */
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    overflow: hidden;
    background: #e4e4e7; /* thin lines between cards */
}

/* ---- Card ---- */
.pcard {
    background: var(--card-white);
    overflow: hidden;
}
.pcard:first-child { border-radius: 12px 12px 0 0; }
.pcard:last-child  { border-radius: 0 0 12px 12px; }
.pcard.hidden { display: none !important; }

/* If only one card visible, round all corners */
.pcard:only-child  { border-radius: 12px; }

/* HEAD button */
.pcard-head {
    width: 100%;
    background: transparent;
    border: none;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}
.pcard-head:hover    { background: #fafafa; }
.pcard[data-expanded="true"] > .pcard-head { background: #fafafa; }
.pcard-head:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: -2px;
}

/* Number — plain typographic index */
.pcard-num {
    flex-shrink: 0;
    min-width: 26px;
    padding-top: 2px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    font-family: ui-monospace, 'Cascadia Code', monospace;
    line-height: 1.4;
}

.pcard-head-content { flex: 1; min-width: 0; }

.pcard-head-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 3px;
}

.pcard-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

/* Chevron */
.pcard-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    transition: transform .2s cubic-bezier(.4,0,.2,1);
    padding-top: 2px;
    user-select: none;
}
.pcard[data-expanded="true"] .pcard-chevron {
    transform: rotate(90deg);
    color: var(--text-primary);
}

/* Excerpt line  */
.pcard-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 6px;
    line-height: 1.5;
    /* clamp to 2 lines when closed */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* Meta: tags + source ref */
.pcard-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pcard-tag {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
    text-transform: lowercase;
}
.pcard-source {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

/* ---- Expanded body ---- */
.pcard-body-wrap {
    padding: 0 18px 18px 56px;
    animation: pcard-open .18s ease;
}
.pcard-body-wrap[hidden] { display: none; }

@keyframes pcard-open {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pcard-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0 0 14px;
}

/* Body paragraphs */
.pcard-body-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pcard-body-item {
    display: flex;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-primary);
    line-height: 1.75;
}
.pcard-body-bullet {
    flex-shrink: 0;
    margin-top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d5db;
}

/* Source reference block */
.pcard-ref {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}
.pcard-ref-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    white-space: nowrap;
}
.pcard-ref-value {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.pcard-ref-date {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

/* ---- Empty state ---- */
.pautas-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.pautas-empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.pautas-empty h3   { font-size: var(--text-lg); margin: 0 0 4px; }
.pautas-empty p    { font-size: var(--text-sm); margin: 0; }

/* ---- Dark mode ---- */
[data-theme="dark"] .pautas-grid {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .pcard             { background: #1e2235; }
[data-theme="dark"] .pcard-head:hover,
[data-theme="dark"] .pcard[data-expanded="true"] > .pcard-head { background: rgba(255,255,255,.04); }
[data-theme="dark"] .pcard-tag         { background: rgba(255,255,255,.08); color: #9ca3af; }
[data-theme="dark"] .pcard-divider     { background: rgba(255,255,255,.08); }
[data-theme="dark"] .pcard-ref         { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .pcard-excerpt     { color: #94a3b8; }
[data-theme="dark"] .pcard-body-bullet { background: #4b5563; }
[data-theme="dark"] .pautas-cat-pill   { border-color: rgba(255,255,255,.14); color: #94a3b8; }
[data-theme="dark"] .pautas-cat-pill.active { background: #e5e7eb; border-color: #e5e7eb; color: #111; }

/* =============================================================
   FASE 02.5 — EXHIBIDORES V2
   Scope: body.exhibidores-v2
   ============================================================= */

/* Hide old layout elements */
.exhibidores-v2 .app-header,
.exhibidores-v2 .sidebar,
.exhibidores-v2 .app-layout { display: none !important; }

/* ---- Shared page padding ---- */
.exh-page,
.exh-detail-page {
    padding: 24px 28px 64px;
    width: 100%;
    max-width: 1100px;
}
@media (max-width: 1023px) { .exh-page, .exh-detail-page { padding: 18px 16px 80px; } }
@media (max-width: 639px)  { .exh-page, .exh-detail-page { padding: 12px 10px 80px; } }

/* ---- Topbar back link ---- */
.topbar-back-link {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    padding: 4px 6px;
    margin-right: 4px;
    border-radius: 6px;
    transition: background .15s;
}
.topbar-back-link:hover { background: rgba(0,0,0,.06); }

/* Status in topbar (detail page) */
.exh-topbar-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 6px;
}
.exh-topbar-status.exh-status-operativo    { background:#dcfce7; color:#166534; }
.exh-topbar-status.exh-status-mantenimiento{ background:#fef9c3; color:#854d0e; }
.exh-topbar-status.exh-status-critico      { background:#fee2e2; color:#991b1b; }

/* ============================================================
   LIST: KPI BAR
   ============================================================ */
.exh-kpi-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--card-white);
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.exh-kpi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 2px;
}
.exh-kpi-val {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: var(--text-primary);
}
.exh-kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}
.exh-kpi-divider {
    width: 1px;
    height: 36px;
    background: var(--border-color);
    flex-shrink: 0;
}

/* ============================================================
   LIST: FILTER BAR
   ============================================================ */
.exh-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.exh-filter-pill {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
}
.exh-filter-pill:hover { border-color: #6b7280; color: #374151; }
.exh-filter-pill.active { background: #111827; border-color: #111827; color: #fff; }
.exh-filter-pill:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.exh-filter-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ============================================================
   LIST: CARD GRID
   ============================================================ */
.exh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}
@media (max-width: 639px) {
    .exh-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.exh-card {
    display: flex;
    flex-direction: column;
    background: var(--card-white);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s;
}
.exh-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.exh-card.hidden { display: none !important; }

/* Portrait photo area — 3:4 ratio */
.exh-card-photo {
    position: relative;
    width: 100%;
    padding-top: 133%; /* 3:4 portrait */
    background: #f3f4f6;
    overflow: hidden;
    flex-shrink: 0;
}
.exh-card-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.exh-card-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(160deg, #f1f5f9 0%, #e2e8f0 100%);
}
.exh-card-photo-placeholder > span:first-child { font-size: 2.5rem; opacity: .5; }
.exh-placeholder-code {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: .06em;
    font-family: ui-monospace, monospace;
}

/* Status ribbon overlay */
.exh-status-ribbon {
    position: absolute;
    top: 10px;
    left: 0;
    padding: 3px 10px 3px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 0 10px 10px 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.exh-status-operativo     { background: #22c55e; color: #fff; }
.exh-status-mantenimiento { background: #f59e0b; color: #fff; }
.exh-status-critico       { background: #ef4444; color: #fff; }

/* Card body */
.exh-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.exh-card-code {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .06em;
    font-family: ui-monospace, monospace;
}
.exh-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}
.exh-card-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 2px 0;
}
.exh-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.exh-meta-icon { flex-shrink: 0; font-size: 12px; }

/* Checklist mini */
.exh-check-mini { margin-top: auto; padding-top: 8px; }
.exh-check-mini-top {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}
.exh-mini-track {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}
.exh-mini-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .6s ease;
}
.exh-mini-good { background: #22c55e; }
.exh-mini-warn { background: #f59e0b; }
.exh-mini-bad  { background: #ef4444; }

/* Large track (detail hero) */
.exh-mini-track-lg { height: 6px; border-radius: 3px; }

/* ============================================================
   DETAIL: HERO
   ============================================================ */
.exh-hero {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    margin-bottom: 24px;
    align-items: start;
}
@media (max-width: 767px) {
    .exh-hero {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Photo (portrait) */
.exh-hero-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}
.exh-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.exh-hero-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(160deg, #f1f5f9, #e2e8f0);
}
.exh-placeholder-big       { font-size: 4rem; opacity: .4; }
.exh-placeholder-code-big  { font-size: 12px; font-weight: 700; color: #94a3b8; letter-spacing: .08em; font-family: ui-monospace, monospace; }
.exh-placeholder-note      { font-size: 11px; color: #94a3b8; }

/* Info block */
.exh-hero-info { display: flex; flex-direction: column; gap: 10px; }
.exh-hero-code {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    letter-spacing: .08em; font-family: ui-monospace, monospace;
}
.exh-hero-name {
    font-size: 1.75rem; font-weight: 800;
    color: var(--text-primary); margin: 0; line-height: 1.2;
}

/* Status badge large */
.exh-status-badge-lg {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    width: fit-content;
}
.exh-status-badge-lg.exh-status-operativo     { background:#dcfce7; color:#166534; }
.exh-status-badge-lg.exh-status-mantenimiento { background:#fef9c3; color:#854d0e; }
.exh-status-badge-lg.exh-status-critico       { background:#fee2e2; color:#991b1b; }

/* Info definition list */
.exh-info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 4px 0 0;
}
.exh-info-list dt {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.exh-info-list dd {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

/* Hero checklist bar */
.exh-hero-check { margin-top: 4px; }
.exh-hero-check-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.exh-hero-check-label strong { color: var(--text-primary); }

/* ============================================================
   DETAIL: SECTIONS
   ============================================================ */
.exh-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 767px) {
    .exh-sections { grid-template-columns: 1fr; }
}

.exh-section-card {
    background: var(--card-white);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.exh-gallery-section { grid-column: 1 / -1; }

.exh-section-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 0 0 14px;
}

/* Checklist items */
.exh-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.exh-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
}
.exh-check-item.check-ok   { background: #f0fdf4; }
.exh-check-item.check-fail { background: #fff1f2; }
.exh-check-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.check-ok   .exh-check-dot { background: #22c55e; }
.check-fail .exh-check-dot { background: #ef4444; }
.exh-check-lbl { flex: 1; }
.exh-check-val {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
}
.check-ok   .exh-check-val { color: #16a34a; }
.check-fail .exh-check-val { color: #dc2626; }

/* Timeline */
.exh-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.exh-tl-item {
    display: flex;
    gap: 12px;
    padding: 0 0 16px;
    position: relative;
}
/* Vertical line */
.exh-tl-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 28px;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
}
.exh-tl-dot {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    position: relative;
    z-index: 1;
}
.exh-tl-content { flex: 1; padding-top: 3px; }
.exh-tl-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.exh-tl-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--text-primary);
}
.exh-tl-date {
    font-size: 10px;
    color: var(--text-muted);
}
.exh-tl-note {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
}

/* Dot colors by type */
.exh-tl-estado       .exh-tl-dot { background: #dbeafe; }
.exh-tl-mantenimiento .exh-tl-dot { background: #fef9c3; }
.exh-tl-asignacion   .exh-tl-dot { background: #f0fdf4; }
.exh-tl-nota         .exh-tl-dot { background: #f3f4f6; }

/* ============================================================
   SHARED EMPTY STATE
   ============================================================ */
.exh-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.exh-empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.exh-empty h3   { font-size: var(--text-lg); margin: 0 0 4px; }
.exh-empty p    { font-size: var(--text-sm); margin: 0; }
.exh-empty-text { font-size: var(--text-sm); color: var(--text-secondary); }

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] .exh-kpi-bar,
[data-theme="dark"] .exh-section-card   { background: #1e2235; }
[data-theme="dark"] .exh-card            { background: #1e2235; }
[data-theme="dark"] .exh-card:hover      { box-shadow: 0 8px 24px rgba(0,0,0,.3); }
[data-theme="dark"] .exh-card-photo-placeholder,
[data-theme="dark"] .exh-hero-photo-placeholder { background: linear-gradient(160deg, #1e2235, #252a3d); }
[data-theme="dark"] .exh-mini-track      { background: rgba(255,255,255,.1); }
[data-theme="dark"] .exh-check-item.check-ok   { background: rgba(34,197,94,.12); }
[data-theme="dark"] .exh-check-item.check-fail { background: rgba(239,68,68,.12); }
[data-theme="dark"] .exh-tl-dot          { background: rgba(255,255,255,.08); }
[data-theme="dark"] .exh-filter-pill     { border-color: rgba(255,255,255,.14); color: #94a3b8; }
[data-theme="dark"] .exh-filter-pill.active { background: #e5e7eb; border-color: #e5e7eb; color: #111; }
[data-theme="dark"] .exh-status-badge-lg.exh-status-operativo     { background:rgba(34,197,94,.2);  color:#86efac; }
[data-theme="dark"] .exh-status-badge-lg.exh-status-mantenimiento { background:rgba(245,158,11,.2); color:#fde68a; }
[data-theme="dark"] .exh-status-badge-lg.exh-status-critico       { background:rgba(239,68,68,.2);  color:#fca5a5; }

/* ============================================================
   FASE 02.6 — RESPONSIVE PREMIUM PASS
   Correcciones mobile-first. Sin cambios de lógica.
   Breakpoints: xs <480 · sm 480-767 · md 768-1023 · lg 1024+
   ============================================================ */

/* --- 1. Sidebar dark: oculto en móvil, visible en md+ --- */
.dashboard-v2 .sidebar-dark,
.pautas-v2    .sidebar-dark,
.exhibidores-v2 .sidebar-dark,
.turnos-v2 .sidebar-dark,
.plan-v2 .sidebar-dark {
    display: none !important;
}
@media (min-width: 768px) {
    .dashboard-v2 .sidebar-dark,
    .pautas-v2    .sidebar-dark,
    .exhibidores-v2 .sidebar-dark,
    .turnos-v2 .sidebar-dark,
    .plan-v2 .sidebar-dark {
        display: flex !important;
    }
}

/* --- 2. Shell-main: sin margen izquierdo en móvil --- */
.shell-main {
    margin-left: 0;
}
@media (min-width: 768px) {
    .shell-main {
        margin-left: 72px;
        padding-bottom: 0;
    }
}
@media (min-width: 1024px) {
    .shell-main {
        margin-left: 200px;
    }
}

/* --- 3. Bottom nav: visible en móvil para páginas premium --- */
.pautas-v2 .bottom-nav,
.exhibidores-v2 .bottom-nav,
.turnos-v2 .bottom-nav,
.plan-v2 .bottom-nav {
    display: flex;
}
@media (min-width: 768px) {
    .pautas-v2 .bottom-nav,
    .exhibidores-v2 .bottom-nav,
    .turnos-v2 .bottom-nav,
    .plan-v2 .bottom-nav {
        display: none;
    }
}

/* --- 4. Topbar: 2 filas en móvil --- */
@media (max-width: 767px) {
    .topbar {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        padding: 8px 14px;
        gap: 8px;
        align-items: center;
    }
    .topbar-title {
        font-size: var(--text-xl);
    }
    .topbar-pill {
        display: none;
    }
    .topbar-spacer {
        display: none;
    }
    .topbar-cta {
        padding: 7px 12px;
        font-size: var(--text-xs);
    }
    /* Search pill: full-width segunda fila */
    .topbar-search {
        display: flex !important;
        flex: 1 1 100%;
        order: 10;
        min-height: 44px;
        min-width: 0;
        border-radius: 12px;
    }
    .topbar-search input {
        width: 100%;
    }
}
@media (min-width: 768px) {
    .topbar {
        height: var(--topbar-h);
        flex-wrap: nowrap;
        padding: 0 20px;
    }
    .topbar-search {
        display: flex;
        flex: initial;
        order: initial;
        min-height: initial;
        min-width: 160px;
    }
}

/* --- 5. Topbar left/center/right (pautas/exhibidores topbar) --- */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}
.topbar-center {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
@media (max-width: 767px) {
    .topbar-left  { flex: 1; min-width: 0; overflow: hidden; }
    .topbar-left .topbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-center {
        flex: 1 1 100%;
        order: 10;
    }
    .topbar-center .topbar-search {
        display: flex !important;
        width: 100%;
        flex: 1;
        min-height: 44px;
        border-radius: 12px;
    }
}

/* --- 6. topbar-user-btn: estilo pill con username --- */
.topbar-user-btn {
    width: auto;
    min-width: 36px;
    min-height: 44px;
    border-radius: var(--radius-full);
    padding: 6px 12px 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background var(--transition-fast);
}
.topbar-user-btn:hover { background: var(--border-color); }
[data-theme="dark"] .topbar-user-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
@media (max-width: 479px) {
    .topbar-user-btn { max-width: 110px; font-size: var(--text-xs); padding: 6px 10px 6px 8px; }
}

/* --- 7. Dash content: reducir padding en móvil --- */
@media (max-width: 639px) {
    .dash-content { padding: 14px 12px; }
    .grid-main    { gap: 12px; }
    .activity-grid { gap: 12px; }
}

/* --- 8. KPI numbers: clamp fluido --- */
.kpi-num {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
}

/* --- 9. Cards: padding reducido en móvil --- */
@media (max-width: 639px) {
    .cp-body           { padding: 16px 14px; }
    .exh-section-card  { padding: 14px 14px; }
    .exh-kpi-bar       { padding: 12px 16px; border-radius: 12px; }
    .exh-kpi-val       { font-size: 1.6rem; }
}

/* --- 10. col-right: stack en móvil --- */
@media (max-width: 639px) {
    .col-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

/* --- 11. Activity rows: gap compacto en móvil --- */
@media (max-width: 639px) {
    .activity-row {
        padding: 10px 0;
        gap: 10px;
    }
    .activity-thumb {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* --- 13. Tabla premium: scroll horizontal en móvil --- */
@media (max-width: 767px) {
    .monitoring-v2 .cp-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-premium { min-width: 460px; }
}

/* --- 14. Filter pills: scroll horizontal en xs --- */
@media (max-width: 479px) {
    .pautas-toolbar,
    .exh-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 6px;
    }
    .pautas-toolbar::-webkit-scrollbar,
    .exh-filter-bar::-webkit-scrollbar { display: none; }
    .pautas-count,
    .exh-filter-count { display: none; }
}

/* --- 15. Sparkline: siempre ancho completo --- */
.sparkline-wrap { overflow: hidden; }
.sparkline-wrap svg { display: block; width: 100%; }

/* --- 16. Exh hero name: tamaño en xs --- */
@media (max-width: 479px) {
    .exh-hero-name { font-size: 1.4rem; }
}

/* --- 17. Login: padding seguro en xs --- */
@media (max-width: 360px) {
    .login-bg .login-card { padding: var(--space-6) var(--space-4); }
    .login-brand-logo-wrap { width: 64px; height: 64px; }
    .login-brand-title { font-size: var(--text-xl); }
}

/* --- 18. dashboard-page (pautas-detail legacy): responsive --- */
.dashboard-page .main-content {
    padding-bottom: calc(var(--bottom-nav-height) + var(--spacing-lg));
}
@media (min-width: 768px) {
    .dashboard-page .main-content { padding-bottom: var(--spacing-lg); }
    .dashboard-page .bottom-nav { display: none; }
}

/* --- 19. Topbar back link: tap target cómodo --- */
.topbar-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.topbar-back-link:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* --- 20. pautas-page / exh-page: padding-top correcto tras topbar --- */
@media (max-width: 767px) {
    .pautas-page, .exh-page, .exh-detail-page {
        padding-top: 16px;
    }
}

/* FIN FASE 02.6 — RESPONSIVE PREMIUM PASS */

/* ============================================================
   FASE 02.7 — TURNOS + KIT (Dashboard Collapsibles + /turnos)
   ============================================================ */

/* ── Dashboard: details/summary premium (Colapsables) ── */
.dash-collapsible-card .cp-body { padding: 0; }

.dash-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
    gap: 10px;
}
.dash-collapsible-summary::-webkit-details-marker { display: none; }
.dash-collapsible-summary:hover { background: var(--bg-secondary); }

details[open] .dash-collapsible-summary { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

.dcs-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.dcs-icon { font-size: 1.25rem; flex-shrink: 0; }
.dcs-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.dcs-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.dcs-pill-blue   { background: var(--accent-subtle); color: var(--accent-primary); }
.dcs-pill-green  { background: var(--success-bg);   color: var(--success); }
.dcs-pill-yellow { background: #fef9c3;             color: #854d0e; }

.dcs-chevron {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}
details[open] .dcs-chevron { transform: rotate(90deg); }

.dcs-body {
    padding: 0 20px 18px;
    border-top: 1px solid var(--border-color);
}

/* Mini KPIs en dashboard turnos card */
.dash-turnos-kpi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 14px 0 8px;
}
@media (max-width: 479px) {
    .dash-turnos-kpi { grid-template-columns: repeat(2, 1fr); }
}
.dtk-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 10px 6px;
}
.dtk-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.dtk-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 3px;
}
.dtk-occ .dtk-val  { color: #d97706; }
.dtk-avail .dtk-val { color: var(--success); }

/* Lista por etapa en dashboard */
.dash-etapa-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.dash-etapa-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}
.dash-etapa-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dash-etapa-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-etapa-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-full  { background: #fef2f2; color: #dc2626; }
.badge-avail { background: var(--success-bg); color: var(--success); }

.dash-etapa-link {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.dash-etapa-link:hover { text-decoration: underline; }

/* ── Panel Admin: Gestión de Turnos ────────────────────────────────── */
.ta-etapa-section { margin-bottom: 18px; }
.ta-etapa-header {
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.ta-slot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: background var(--transition-fast);
}
.ta-avail   { background: #f0fdf4; border-color: #bbf7d0; }
.ta-pending { background: #fefce8; border-color: #fde047; }
.ta-occ     { background: #eff6ff; border-color: #bfdbfe; }

.ta-slot-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.ta-slot-exh {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
}
.ta-slot-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}
.ta-slot-pair {
    font-size: var(--text-xs);
    color: #1e40af;
    font-weight: 600;
}

.ta-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.ta-badge-avail   { background: #dcfce7; color: #166534; }
.ta-badge-pending { background: #fef9c3; color: #854d0e; }
.ta-badge-occ     { background: #dbeafe; color: #1e40af; }

.ta-slot-actions { display: flex; align-items: center; flex-shrink: 0; }
.ta-action-wrap  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ta-manual-form  { display: inline-flex; align-items: center; gap: 6px; }

.ta-pair-input {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-primary);
    background: #fff;
    outline: none;
    width: 200px;
    max-width: 100%;
    transition: border-color var(--transition-fast);
}
.ta-pair-input:focus { border-color: var(--accent-primary); }

.ta-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.ta-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ta-btn-occupy  { background: #16a34a; color: #fff; }
.ta-btn-occupy:hover:not(:disabled)  { background: #15803d; }
.ta-btn-reject  { background: #f3f4f6; color: var(--text-secondary); }
.ta-btn-reject:hover:not(:disabled)  { background: #e5e7eb; }
.ta-btn-release { background: #3b82f6; color: #fff; }
.ta-btn-release:hover:not(:disabled) { background: #2563eb; }
.ta-btn-manual  { background: #f3f4f6; color: var(--text-secondary); border: 1px dashed var(--border-color); }
.ta-btn-manual:hover { background: #e5e7eb; }

@media (max-width: 600px) {
    .ta-slot-row { flex-direction: column; align-items: flex-start; }
    .ta-slot-actions { width: 100%; }
    .ta-pair-input { width: 100%; }
}

/* ── Historial de cambios de turnos (Dashboard) ───────────────────── */
.th-subtitle {
    margin: 12px 0 14px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}
.th-meta-date {
    display: inline-block;
    margin-left: 8px;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.th-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.th-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.th-field label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.th-input,
.th-select {
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 10px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    background: #fff;
    outline: none;
    width: 100%;
}
.th-input:focus,
.th-select:focus {
    border-color: var(--accent-primary);
}
.th-field-search {
    grid-column: span 2;
}
.th-field-actions {
    justify-content: flex-end;
}
.th-clear-btn {
    margin-top: auto;
    height: 34px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    padding: 0 10px;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.th-clear-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.th-results-line {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 8px;
}

.th-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
}
.th-table {
    min-width: 980px;
}
.th-table thead th {
    white-space: nowrap;
}
.th-table tbody td {
    vertical-align: top;
    font-size: 0.78rem;
    line-height: 1.35;
}

.th-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.th-action-add_slot,
.th-action-add_exhibidor { background: #dcfce7; color: #166534; }
.th-action-remove_slot { background: #fee2e2; color: #991b1b; }
.th-action-replace_slot { background: #fef9c3; color: #854d0e; }
.th-action-restore_slot { background: #dbeafe; color: #1e3a8a; }
.th-action-rename_exhibidor { background: #ede9fe; color: #5b21b6; }
.th-action-update_slot { background: #e2e8f0; color: #334155; }

.th-status-active { background: #dcfce7; color: #166534; }
.th-status-superseded { background: #f1f5f9; color: #64748b; }

.th-empty {
    margin-top: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

@media (max-width: 800px) {
    .th-field-search {
        grid-column: span 1;
    }
}

[data-theme="dark"] .th-input,
[data-theme="dark"] .th-select,
[data-theme="dark"] .th-table-wrap {
    background: #111827;
    border-color: #374151;
    color: #e5e7eb;
}
[data-theme="dark"] .th-clear-btn {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}
[data-theme="dark"] .th-clear-btn:hover {
    background: #374151;
}
[data-theme="dark"] .th-empty {
    background: #111827;
    color: #cbd5e1;
}

/* Kit list */
.dash-kit-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dash-kit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}
.dash-kit-dot { color: var(--accent-primary); font-size: 8px; flex-shrink: 0; }
.dash-kit-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}
.dash-kit-link:hover { text-decoration: underline; }
.dash-kit-text { color: var(--text-primary); }

.fill-blue { background: linear-gradient(90deg, var(--accent-primary), #60a5fa); }

/* ── /turnos — Layout general ── */
body.turnos-v2 { 
    background: #FAFAF9 !important; /* Fondo premium off-white */
    margin: 0;
    overflow-x: hidden;
}
.turnos-main { padding-bottom: calc(var(--bottom-nav-height) + 24px); }

/* Hardening anti-desborde para vistas /turnos y /public/turnos */
body.turnos-v2 .app-shell,
body.turnos-v2 .shell-main,
body.turnos-v2 .pub-shell,
body.turnos-v2 .dash-content,
body.turnos-v2 .turnos-main,
body.turnos-v2 .pub-shell .dash-content,
body.turnos-v2 .public-stage-picker,
body.turnos-v2 .pub-sheet-card,
body.turnos-v2 .pub-sheet-list,
body.turnos-v2 .pub-sheet-item {
    box-sizing: border-box;
    max-width: 100%;
}

/* Resumen compacto con barra de progreso */
.turnos-summary-bar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ts-progress-wrap {
    width: 100%;
}
.ts-progress-bg {
    width: 100%;
    height: 8px;
    background: #d1fae5;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.ts-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
}
.ts-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: var(--text-sm);
}
.ts-stat {
    font-weight: 600;
    white-space: nowrap;
}
.ts-occupied { color: #1e40af; }
.ts-available { color: #065f46; }
.ts-pct { color: var(--text-muted); }
.ts-separator {
    color: var(--border-color);
    font-weight: 300;
}
@media (max-width: 599px) {
    .turnos-summary-bar { padding: 10px 14px; }
    .ts-stats { font-size: var(--text-xs); gap: 6px; }
}

/* Etapa tabs */
.turnos-etapa-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.tr-etapa-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #374151; /* Texto gris oscuro legible */
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 42px;
}
.tr-etapa-tab:hover { 
    border-color: var(--accent-primary); 
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tr-etapa-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff; /* Blanco sobre azul */
    box-shadow: 0 3px 12px rgba(37,99,235,0.3);
}
.tr-etapa-tab.active .tr-badge { 
    background: rgba(255,255,255,0.3); 
    color: #ffffff; 
}
.tr-etapa-tab.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f3f4f6;
    border-color: #d1d5db;
}
.tr-etapa-tab.coming-soon:hover {
    transform: none;
    box-shadow: none;
}

.tr-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tr-badge-full  { background: #fef2f2; color: #dc2626; }
.tr-badge-avail { background: var(--success-bg); color: var(--success); }
.tr-badge-soon  { background: #fef3c7; color: #92400e; }

/* Legend OCUPADO/DISPONIBLE */
.turnos-legend {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.tr-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}
.tr-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tr-legend-occupied { background: #3b82f6; }
.tr-legend-available { background: #10b981; }

/* Etapa panel */
.turnos-etapa-panel { display: none; }
.turnos-etapa-panel.active { display: block; }

/* Coming Soon State */
.turnos-coming-soon {
    background: #ffffff;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-lg);
    padding: 48px 20px;
    text-align: center;
    margin: 24px 0;
}
.coming-soon-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 16px;
}
.coming-soon-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}
.coming-soon-text {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin: 0;
}

/* Exhibidor pills filter */
.tr-exh-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
@media (max-width: 767px) {
    .tr-exh-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        /* Padding para que la primera pill no quede pegada al borde */
        padding-left: 2px;
    }
    .tr-exh-pills::-webkit-scrollbar { display: none; }
    .tr-exh-pill { flex-shrink: 0; }
}
.tr-exh-pill {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #4b5563; /* Gris oscuro legible */
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 38px;
}
.tr-exh-pill:hover { 
    border-color: var(--accent-primary); 
    color: var(--accent-primary); 
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.tr-exh-pill.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff; /* Blanco sobre azul */
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

/* ── Desktop Table ── */
.tr-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
}
.tr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-xs);
    min-width: 620px;
}
.tr-table thead tr {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #ffffff;
    border-bottom: 2px solid #1e40af;
}
.tr-th-hora,
.tr-table th {
    padding: 12px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff; /* Blanco en header azul */
    white-space: nowrap;
    text-align: center;
}
.tr-th-hora { text-align: left; min-width: 60px; }
.tr-th-day { min-width: 110px; }
.tr-th-day-full {
    display: none;
}
@media (min-width: 900px) {
    .tr-th-day { font-size: var(--text-xs); }
    .tr-th-day-full { display: inline; font-size: 0.65rem; color: var(--text-muted); margin-left: 4px; }
}

.tr-row:nth-child(even) { background: #f9fafb; }
.tr-row:hover { background: #f3f4f6; }

.tr-td-hora {
    padding: 8px 12px 8px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    vertical-align: middle;
    width: 90px;
    border-right: 1px solid var(--border-color);
    line-height: 1.5;
}
.tr-hora-start { display: block; }
.tr-hora-sep   { display: none; }
.tr-hora-end   { display: block; font-weight: 700; font-size: 0.66rem; }

.tr-td-cell {
    padding: 6px 6px;
    vertical-align: middle;
    border-right: 1px solid var(--border-color);
}
.tr-td-cell:last-child { border-right: none; }
.tr-td-empty { background: transparent; }

/* Chips - Claramente OCUPADO (azul) vs DISPONIBLE (verde) */
.tr-chip {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 8px;
    border-radius: 6px;
    margin-bottom: 3px;
    font-size: 0.68rem;
    line-height: 1.3;
    cursor: default;
    transition: transform 0.1s, box-shadow 0.1s;
}
.tr-chip:last-child { margin-bottom: 0; }
.tr-chip:hover { 
    transform: scale(1.02); 
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.tr-chip-label {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.tr-chip-sub {
    font-size: 0.62rem;
    opacity: 0.7;
    white-space: nowrap;
}
.tr-chip-pair {
    font-weight: 400;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
/* OCUPADO (azul suave) */
.tr-chip-ocupado {
    background: #dbeafe; /* Azul muy claro */
    border: 1px solid #93c5fd;
    color: #1e40af; /* Azul oscuro legible */
}
[data-theme="dark"] .tr-chip-ocupado {
    background: #1e3a5f;
    border-color: #2563eb;
    color: #93c5fd;
}
/* DISPONIBLE (verde suave) */
.tr-chip-disponible {
    background: #d1fae5; /* Verde muy claro */
    border: 1px solid #6ee7b7;
    color: #065f46; /* Verde oscuro legible */
}
[data-theme="dark"] .tr-chip-disponible {
    background: #052e16;
    border-color: #166534;
    color: #86efac;
}
.tr-chip-libre { font-style: italic; opacity: 0.75; }
.tr-chip-vacio { color: var(--text-muted); font-size: 0.7rem; }

/* EN PROCESO — tras enviar solicitud por WA */
.tr-chip-proceso {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #9ca3af;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
}
.tr-chip-proceso:hover { transform: none; box-shadow: none; }

/* Botón restaurar (×) en chips "En proceso" */
.tr-chip-restore {
    pointer-events: all;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: #9ca3af;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    margin-left: 4px;
    flex-shrink: 0;
    vertical-align: middle;
    transition: background var(--transition-fast);
}
.tr-chip-restore:hover { background: #ef4444; }

/* WhatsApp clickeable chips */
.tr-chip-whatsapp {
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(16, 185, 129, 0.18);
    user-select: none;
    -webkit-user-select: none;
}
.tr-chip-whatsapp:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.tr-chip-whatsapp:active {
    transform: scale(0.98);
}

/* Chip hidden when exh filter active */
.tr-chip.tr-hidden { display: none; }

/* ── Mobile View ── */
.tr-mobile-view { display: none; }

.tr-day-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}
.tr-day-pills::-webkit-scrollbar { display: none; }

.tr-day-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    min-width: 48px;
    flex-shrink: 0;
}
.tr-day-pill-abbr { font-size: 1.1rem; line-height: 1.1; }
.tr-day-pill-full { display: none; font-size: 0.6rem; margin-top: 2px; }

@media (min-width: 420px) {
    .tr-day-pill-full { display: block; }
    .tr-day-pill { min-width: 58px; }
}

.tr-day-pill:hover { 
    border-color: var(--accent-primary); 
    color: var(--accent-primary); 
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.tr-day-pill.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff; /* Blanco sobre azul */
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.tr-day-blocks { display: none; flex-direction: column; gap: 12px; }
.tr-day-blocks.active { display: flex; }

.tr-mobile-empty {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.tr-mobile-block {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    background: #ffffff;
    min-height: 70px;
    transition: box-shadow var(--transition-fast);
}
.tr-mobile-block:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.tr-mobile-block.tr-hidden { display: none; }

.tr-mobile-block-hora {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    gap: 4px;
    background: #f9fafb;
    border-right: 1px solid var(--border-color);
    min-width: 80px;
    flex-shrink: 0;
}
.tr-mobile-hora-badge {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.tr-mobile-hora-sep {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1;
}

.tr-mobile-block-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 16px;
    gap: 5px;
    min-width: 0;
}
.tr-mobile-exh-label {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.tr-mobile-pair {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.3;
}
.tr-mobile-pair-icon { font-size: 0.9rem; }
.tr-mobile-libre { color: var(--success); font-weight: 600; }

.tr-mobile-status-dot {
    width: 6px;
    align-self: stretch;
    flex-shrink: 0;
}
.dot-occ   { background: #3b82f6; }
.dot-avail { background: var(--success); }

.tr-mobile-ocupado    { border-left: 4px solid #3b82f6; }
.tr-mobile-disponible { border-left: 4px solid var(--success); }
.tr-mobile-proceso    { border-left: 4px solid #f59e0b; pointer-events: none; opacity: 0.85; }
.tr-mobile-proceso .tr-mobile-libre { color: #f59e0b; font-style: italic; }
.dot-pending { background: #f59e0b; }

/* WhatsApp clickeable mobile blocks */
.tr-mobile-whatsapp {
    cursor: pointer;
    transition: all var(--transition-fast);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(16, 185, 129, 0.18);
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 1;
    display: flex;
}
.tr-mobile-whatsapp:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}
.tr-mobile-whatsapp:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* Responsive breakpoint: show desktop vs mobile */
@media (max-width: 767px) {
    .tr-table-wrap   { display: none; }
    .tr-mobile-view  { display: block; }
    .tr-exh-pills    { margin-bottom: 12px; }

    /* Compensar los 72px del sidebar fijo para que el contenido
       no quede tapado por el z-index:200 del sidebar */
    body.turnos-v2 .dash-content {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: 12px;
    }

    /* Day pills: primera pill visible, sin clip */
    .tr-day-pills {
        padding-left: 2px;
    }
}

@media (min-width: 768px) {
    .tr-table-wrap  { display: block; }
    .tr-mobile-view { display: none; }
}

/* FIN FASE 02.7 — TURNOS + KIT */


/* ============================================================
   FASE 02.8 — PÁGINA PÚBLICA CON PIN (Public Access)
   ============================================================ */

/* ═══ PUBLIC GATE (PIN ENTRY) ═══ */

.public-gate-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fef3e7 0%, #fdebd0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
}

.public-shell {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.pin-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: clamp(28px, 6vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pin-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pin-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.pin-title {
    font-size: clamp(1.5rem, 5vw, 1.75rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.pin-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.pin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pin-label {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pin-input {
    width: 100%;
    box-sizing: border-box;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.25em;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: 'Courier New', monospace;
}

.pin-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 151, 66, 0.15);
}

.pin-input::placeholder {
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: inherit;
}

.pin-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: #c33;
    font-size: var(--text-sm);
    text-align: center;
    font-weight: 600;
}

.pin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 24px;
    background: #2563eb;
    color: #ffffff;
    font-size: var(--text-lg);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background var(--transition-fast), transform 0.15s ease;
    box-shadow: 0 3px 12px rgba(37,99,235,0.35);
}

.pin-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.45);
}

.pin-btn:active {
    background: #1e40af;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

.pin-btn-icon {
    font-size: 1.25rem;
    transition: transform var(--transition-fast);
}

.pin-btn:hover .pin-btn-icon {
    transform: translateX(3px);
}

.pin-footer {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.pin-footer p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* Responsive: pantallas muy pequeñas */
@media (max-width: 360px) {
    .pin-card { padding: 22px; gap: 20px; }
    .pin-logo { width: 56px; height: 56px; }
}

/* ═══ PUBLIC TURNOS — Layout sin sidebar (usa mismos estilos que turnos-v2) ═══ */

/* Layout wrapper sin sidebar */
.pub-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #FAFAF9;
}

/* Topbar público: igual al privado pero con logo a la izquierda */
.pub-topbar {
    margin-left: 0 !important; /* sin desplazamiento de sidebar */
}
.pub-topbar-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

/* El dash-content dentro de pub-shell no necesita margen de sidebar */
.pub-shell .dash-content {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px;
}

@media (min-width: 768px) {
    .pub-shell .dash-content { padding: 24px 28px; }
}

/* Ocultar la topbar cuando hay pub-shell (el propio pub-shell tiene su topbar) */
.pub-shell .topbar { position: sticky; top: 0; z-index: 100; margin-left: 0; }

/* Legacy: mantener .public-turnos-page para no romper nada */

.public-shell-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar público */
.public-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.public-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.public-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.public-title {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.public-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.public-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: 20px;
}

.public-logout-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.public-logout-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

/* Contenido principal */
.public-content {
    flex: 1;
    padding: clamp(16px, 4vw, 28px);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.public-section-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.2;
}

/* KPIs públicos */
.public-kpis {
    margin-bottom: 32px;
}

.public-kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.public-kpi-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.public-kpi-label {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.public-kpi-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.public-kpi-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.public-kpi-num {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--primary);
}

.public-kpi-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.public-kpi-sep {
    color: var(--text-tertiary);
    font-weight: 300;
}

/* Cronograma */
.public-cronograma {
    margin-bottom: 32px;
}

/* Tabs de etapa */
.public-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.public-tab {
    padding: 10px 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.public-tab:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.public-tab.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Paneles de etapa */
.public-panel {
    display: none;
}

.public-panel.active {
    display: block;
}

/* Pills de exhibidor */
.public-exh-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.public-exh-pill {
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.public-exh-pill:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.public-exh-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Tabla desktop */
.public-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.public-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.public-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
}

.pub-th-hora,
.pub-th-day {
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
}

.pub-th-hora {
    min-width: 80px;
    background: var(--bg-primary);
}

.pub-th-day {
    min-width: 100px;
}

.pub-th-day-full {
    display: none;
}

.pub-row {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
}

.pub-row:hover {
    background: var(--bg-hover);
}

.pub-td-hora {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-primary);
    position: sticky;
    left: 0;
    z-index: 1;
}

.pub-td-cell {
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.pub-td-empty {
    background: #fafafa;
}

.pub-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    line-height: 1.2;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pub-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.pub-chip-vacio {
    background: transparent;
    color: var(--text-tertiary);
    border: 1px dashed var(--border);
    box-shadow: none;
}

.pub-chip-disponible {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.pub-chip-ocupado {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.pub-chip-label {
    font-weight: 700;
}

.pub-chip-pair {
    font-weight: 600;
}

.pub-chip-libre {
    color: #059669;
}

/* Mobile view */
.public-mobile-view {
    display: none;
}

.public-day-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.public-day-pill {
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 50px;
}

.pub-day-pill-abbr {
    font-size: var(--text-sm);
}

.pub-day-pill-full {
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

.public-day-pill:hover {
    background: var(--bg-secondary);
}

.public-day-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.public-day-pill.active .pub-day-pill-full {
    color: rgba(255, 255, 255, 0.8);
}

.public-day-blocks {
    display: none;
}

.public-day-blocks.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.public-mobile-empty {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.public-mobile-block {
    display: flex;
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.public-mobile-block:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.public-mobile-block-hora {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 12px;
    background: var(--bg-secondary);
    min-width: 80px;
}

.pub-mobile-hora-badge {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
}

.pub-mobile-hora-sep {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.public-mobile-block-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 16px;
    gap: 5px;
}

.pub-mobile-exh-label {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.pub-mobile-pair {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.3;
}

.pub-mobile-pair-icon {
    font-size: 0.9rem;
}

.pub-mobile-libre {
    color: var(--success);
    font-weight: 600;
}

.pub-mobile-status-dot {
    width: 6px;
    align-self: stretch;
    flex-shrink: 0;
}

.pub-mobile-ocupado {
    border-left: 4px solid #3b82f6;
}

.pub-mobile-disponible {
    border-left: 4px solid var(--success);
}

/* Kit y recordatorios */
.public-kit {
    margin-bottom: 32px;
}

.public-kit-details {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.public-kit-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background var(--transition-fast);
}

.public-kit-summary::-webkit-details-marker {
    display: none;
}

.public-kit-summary:hover {
    background: var(--bg-secondary);
}

.public-kit-icon {
    font-size: 1.5rem;
}

.public-kit-title {
    flex: 1;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.public-kit-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--primary);
    color: #ffffff;
    font-size: var(--text-sm);
    font-weight: 700;
    border-radius: 14px;
}

.public-kit-body {
    padding: 0 20px 20px 20px;
}

.public-kit-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 12px 0;
}

.public-kit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.public-kit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.public-kit-item:hover {
    background: var(--bg-hover);
}

.public-kit-bullet {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
}

.public-kit-text {
    flex: 1;
    color: var(--text-primary);
    font-size: var(--text-base);
    line-height: 1.5;
}

/* Responsive: Mobile vs Desktop */
@media (max-width: 767px) {
    .public-table-wrap {
        display: none;
    }
    .public-mobile-view {
        display: block;
    }
    .public-topbar {
        padding: 12px 16px;
    }
    .public-content {
        padding: 16px 12px;
    }
    .public-kpis-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .public-table-wrap {
        display: block;
    }
    .public-mobile-view {
        display: none;
    }
    .pub-th-day-full {
        display: inline;
        margin-left: 6px;
    }
}

@media (max-width: 640px) {
    .public-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .public-topbar-left,
    .public-topbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* FIN FASE 02.8 — PÁGINA PÚBLICA CON PIN */

/* ═══════════════════════════════════════════════════════════════
   FASE 02.8.1 — PUBLIC GANTT PREMIUM (Mobile-First)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Section Header ─── */
.public-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ─── Gantt Legend ─── */
.gantt-legend {
    display: flex;
    gap: clamp(12px, 3vw, 20px);
    align-items: center;
}

.gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
    color: var(--text-secondary);
}

.gantt-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gantt-legend-occupied {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.gantt-legend-available {
    background: #cbd5e1;
}

/* ─── Gantt Panel (Tabs Content) ─── */
.gantt-panel {
    display: none;
}

.gantt-panel.active {
    display: block;
}

/* ═══ MOBILE GANTT VIEW (default) ═══ */
.gantt-mobile {
    display: block;
}

.gantt-desktop {
    display: none;
}

/* ─── Day Pills (Mobile) ─── */
.gantt-day-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.gantt-day-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 10px 18px;
    font-size: clamp(0.9375rem, 2.5vw, 1rem);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gantt-day-pill:hover {
    background: var(--bg-surface);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.gantt-day-pill.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
    border-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.gantt-day-abbr {
    font-weight: 600;
}

.gantt-day-full {
    display: none;
}

.gantt-day-pill.active .gantt-day-full {
    display: inline;
}

/* ─── Mobile Day Content ─── */
.gantt-mobile-day {
    display: none;
}

.gantt-mobile-day.active {
    display: block;
}

.gantt-mobile-empty {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: clamp(0.9375rem, 2.5vw, 1rem);
}

/* ─── Mobile Row (Exhibidor) ─── */
.gantt-mobile-row {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all var(--transition-base);
}

.gantt-mobile-row:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.gantt-mobile-label {
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.gantt-mobile-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Mobile Block (Turno) ─── */
.gantt-mobile-block {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.gantt-mobile-block:hover {
    border-color: var(--accent-primary);
}

.gantt-mobile-block-time {
    font-weight: 600;
    font-size: clamp(0.9375rem, 2.5vw, 1rem);
    color: var(--text-primary);
}

.gantt-mobile-block-pair,
.gantt-mobile-block-status {
    font-size: clamp(0.875rem, 2.2vw, 0.9375rem);
    color: var(--text-secondary);
}

.gantt-mobile-occupied {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-color: #0ea5e9;
}

.gantt-mobile-occupied .gantt-mobile-block-pair {
    color: #0369a1;
    font-weight: 500;
}

.gantt-mobile-available {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.gantt-mobile-available .gantt-mobile-block-status {
    color: var(--success);
    font-weight: 500;
}

.gantt-mobile-empty-slot {
    background: #fafafa;
    text-align: center;
    padding: 20px;
}

.gantt-mobile-empty-text {
    color: var(--text-muted);
    font-size: clamp(0.875rem, 2.2vw, 0.9375rem);
}

/* ═══ DESKTOP GANTT VIEW ═══ */
@media (min-width: 768px) {
    .gantt-mobile {
        display: none;
    }

    .gantt-desktop {
        display: block;
    }

    .gantt-day-full {
        display: inline;
    }

    .gantt-desktop-day {
        background: #ffffff;
        border-radius: 24px;
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    }

    .gantt-desktop-day-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 2px solid var(--border-color);
    }

    .gantt-desktop-day-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    /* ─── Grid Gantt (columnas=horas, filas=exhibidores) ─── */
    .gantt-grid {
        display: grid;
        gap: 1px;
        background: var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        position: relative;
    }

    /* ─── Headers (Horas) ─── */
    .gantt-head {
        background: var(--bg-surface);
        padding: 12px 8px;
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--text-secondary);
        text-align: center;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .gantt-head-corner {
        background: var(--bg-surface);
    }

    .gantt-head-time {
        background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    }

    /* ─── Row Labels (Exhibidores) ─── */
    .gantt-row-label {
        background: #ffffff;
        padding: 16px 12px;
        font-weight: 600;
        font-size: 0.9375rem;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        position: sticky;
        left: 0;
        z-index: 5;
        border-right: 2px solid var(--border-color);
    }

    /* ─── Slots (Celdas base disponibles) ─── */
    .gantt-slot {
        background: #ffffff;
        min-height: 56px;
        border-right: 1px dashed #e2e8f0;
    }

    /* ─── Barras (Bloques ocupados/disponibles) ─── */
    .gantt-bar {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        border-radius: 12px;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-weight: 500;
        font-size: 0.875rem;
        box-shadow: 0 2px 8px rgba(14,165,233,0.3);
        transition: all var(--transition-base);
        position: relative;
        z-index: 2;
        margin: 4px 2px;
        min-height: 48px;
    }

    .gantt-bar:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(14,165,233,0.4);
    }

    .gantt-bar-occupied {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    }

    .gantt-bar-available {
        background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
        color: #ffffff;
        box-shadow: 0 2px 8px rgba(148,163,184,0.25);
    }

    .gantt-bar-available:hover {
        box-shadow: 0 4px 12px rgba(148,163,184,0.35);
    }

    .gantt-bar-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }
}

/* ─── Desktop Large (más espacio) ─── */
@media (min-width: 1024px) {
    .gantt-desktop-day {
        padding: 32px;
    }

    .gantt-grid {
        gap: 2px;
    }

    .gantt-head {
        padding: 14px 10px;
        font-size: 0.875rem;
    }

    .gantt-row-label {
        padding: 18px 16px;
        font-size: 1rem;
    }

    .gantt-slot {
        min-height: 64px;
    }

    .gantt-bar {
        padding: 12px 16px;
        font-size: 0.9375rem;
        min-height: 56px;
        border-radius: 14px;
    }
}

/* ─── Responsive: muy pequeño (360-400px) ─── */
@media (max-width: 430px) {
    .gantt-day-pill {
        padding: 10px 14px;
        font-size: 0.9375rem;
    }

    .gantt-mobile-row {
        padding: 14px;
        border-radius: 18px;
    }

    .gantt-mobile-label {
        font-size: 1rem;
    }

    .gantt-mobile-block {
        padding: 12px 14px;
    }
}

/* FIN FASE 02.8.1 — PUBLIC GANTT PREMIUM */

/* ═══════════════════════════════════════════════════════════════
   FASE 02.8.2 — SELECTOR DE ETAPA MÓVIL (Bottom Sheet)
   ═══════════════════════════════════════════════════════════════ */

/* ── Responsive show/hide ──────────────────────────────────────── */
@media (max-width: 767px) {
    .turnos-etapa-tabs { display: none !important; }
}
@media (min-width: 768px) {
    .public-stage-picker { display: none !important; }
    .pub-sheet-overlay,
    .pub-sheet-card { display: none !important; }
}

/* ── Mobile Picker Button ─────────────────────────────────────── */
@keyframes psp-pulse {
    0%   { box-shadow: 0 4px 12px rgba(37,99,235,0.30); }
    50%  { box-shadow: 0 4px 28px rgba(37,99,235,0.65), 0 0 0 7px rgba(37,99,235,0.15); }
    100% { box-shadow: 0 4px 12px rgba(37,99,235,0.30); }
}
.public-stage-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 4px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.30);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    text-align: left;
    animation: psp-pulse 0.85s ease 0.5s 3;
}
.public-stage-picker:hover,
.public-stage-picker:focus-visible {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37,99,235,0.40);
    transform: translateY(-1px);
    outline: none;
}
.public-stage-picker:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.psp-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.psp-main {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}
.psp-sub {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.82);
    line-height: 1.2;
}
.psp-chevron {
    flex-shrink: 0;
    color: rgba(255,255,255,0.82);
    transition: transform 0.2s ease;
}

/* ── Overlay ─────────────────────────────────────────────────── */
.pub-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.50);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.pub-sheet-overlay.pub-sheet--open {
    opacity: 1;
    pointer-events: all;
}

/* ── Bottom Sheet Card ───────────────────────────────────────── */
.pub-sheet-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    box-shadow: 0 -8px 32px rgba(15,23,42,0.16);
    transform: translateY(100%);
    transition: transform 0.30s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pub-sheet-card.pub-sheet--open {
    transform: translateY(0);
}
/* Drag handle */
.pub-sheet-card::before {
    content: '';
    display: block;
    margin: 10px auto 0 auto;
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Sheet Header ────────────────────────────────────────────── */
.pub-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.pub-sheet-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.pub-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    color: #475569;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.pub-sheet-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ── Sheet List ──────────────────────────────────────────────── */
.pub-sheet-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Sheet Item ──────────────────────────────────────────────── */
.pub-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.pub-sheet-item:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateX(3px);
}
.pub-sheet-item:active:not(:disabled) {
    background: #dbeafe;
    transform: translateX(0);
}
.pub-sheet-item--soon,
.pub-sheet-item:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.psi-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}
.psi-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}
.psi-badge--avail { background: #d1fae5; color: #065f46; }
.psi-badge--full  { background: #fee2e2; color: #991b1b; }
.psi-badge--soon  { background: #fef3c7; color: #92400e; }
.psi-arrow { color: #94a3b8; flex-shrink: 0; }

/* FIN FASE 02.8.2 */

/* ======================================================
   FASE 02.9 — PLAN MAESTRO
   ====================================================== */

/* ─── Page header ─────────────────────────────────────────── */
.plan-page-header {
    margin-bottom: 20px;
}
.plan-page-title {
    font-size: clamp(1.15rem, 3.5vw, 1.6rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 0 0 6px;
}
.plan-page-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.5;
}
.plan-updated-pill {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: 999px;
    padding: 3px 10px;
}
.plan-content {
    scroll-behavior: smooth;
}

/* ─── Layout: TOC + content ────────────────────────────── */
.plan-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}
@media (min-width: 768px) {
    .plan-layout {
        flex-direction: row;
        gap: 24px;
    }
}

/* ─── TOC (visible solo desktop) ────────────────────────── */
.plan-toc {
    display: none;
}
@media (min-width: 768px) {
    .plan-toc {
        display: block;
        width: 188px;
        flex-shrink: 0;
        position: sticky;
        top: 76px;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
    }
}
.plan-toc-inner {
    background: #fff;
    border-radius: 12px;
    padding: 12px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.plan-toc-label {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin: 0 0 6px;
    padding: 0 6px;
}
.plan-toc-item {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 8px;
    border-radius: 7px;
    transition: background .15s, color .15s;
    margin-bottom: 1px;
    line-height: 1.4;
}
.plan-toc-item:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}
.plan-toc-pill {
    font-weight: 600;
}

/* ─── Main content column ─────────────────────────────── */
.plan-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.plan-section-title {
    font-size: var(--text-base);
    font-weight: 700;
    margin: 0 0 12px;
    color: inherit;
    line-height: 1.3;
}

/* ─── Hero: Objetivo general ──────────────────────────── */
.plan-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 16px;
    padding: 20px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: #fff;
    box-shadow: 0 4px 18px rgba(37,99,235,.22);
}
.plan-hero-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.plan-hero-body { flex: 1; }
.plan-hero .plan-section-title { color: rgba(255,255,255,.95); }
.plan-objetivo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.plan-objetivo-list li {
    font-size: var(--text-sm);
    padding-left: 15px;
    position: relative;
    opacity: .93;
    line-height: 1.5;
}
.plan-objetivo-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* ─── Corriente accordion card ─────────────────────────── */
.plan-corriente {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
    overflow: hidden;
}
.plan-accordion { border: none; }
.plan-accordion-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    min-height: 52px;
    border-radius: 14px;
    transition: background .15s;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}
.plan-accordion-summary::-webkit-details-marker { display: none; }
.plan-accordion-summary:hover { background: #f8fafc; }
.plan-accordion-summary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
    border-radius: 12px;
}
.plan-corriente-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: var(--text-sm);
    font-weight: 800;
    flex-shrink: 0;
}
.plan-corriente-title {
    flex: 1;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}
.plan-accordion-chevron {
    font-size: 1.15rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform .2s ease;
    font-weight: 700;
    line-height: 1;
}
details.plan-accordion[open] > .plan-accordion-summary .plan-accordion-chevron {
    transform: rotate(90deg);
}
.plan-accordion-body {
    padding: 0 16px 16px;
    border-top: 1px solid #f1f5f9;
}
.plan-corriente-meta {
    font-size: var(--text-sm);
    color: #1d4ed8;
    font-weight: 600;
    margin: 12px 0 10px;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 8px;
    line-height: 1.45;
}
.plan-corriente-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.plan-corriente-list li {
    font-size: var(--text-sm);
    color: var(--text-primary);
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}
.plan-corriente-list li::before {
    content: '●';
    position: absolute;
    left: 2px;
    top: 1px;
    font-size: .42rem;
    color: #93c5fd;
    line-height: 2;
}

/* ─── Stepper: Secuencia sugerida ───────────────────────── */
.plan-stepper-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    padding: 18px 16px;
}
.plan-stepper-section .plan-section-title { color: var(--text-primary); }
.plan-stepper {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.plan-stepper-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.plan-stepper-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}
.plan-stepper-text {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
    padding-top: 4px;
    line-height: 1.5;
}

/* ─── Nota final ──────────────────────────────────────── */
.plan-nota {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-left: 4px solid #a78bfa;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 4px;
}
.plan-nota-text {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
    line-height: 1.65;
}

/* ─── pub-plan-page (página pública, sin sidebar) ─────────── */
.pub-plan-page .plan-page-header {
    padding-top: 4px;
}

/* Override: checkboxes reemplazan bullets en plan pages */
.plan-corriente-list li {
    padding-left: 0;
    position: static;
}
.plan-corriente-list li::before {
    display: none;
}

/* ─── Progress bar en summary ──────────────────────────── */
.plan-prog-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    margin-right: 6px;
    flex-shrink: 0;
}
.plan-prog-bar {
    width: 52px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.plan-prog-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 99px;
    transition: width .35s ease, background .35s ease;
    width: 0%;
}
.plan-prog-pct {
    font-size: .68rem;
    color: var(--text-muted);
    font-weight: 700;
    min-width: 26px;
    text-align: right;
    letter-spacing: -.01em;
}
/* Pill verde cuando 100% */
.plan-corriente-pill.plan-pill-done {
    background: #dcfce7;
    color: #15803d;
}

/* ─── Checklist items ──────────────────────────────── */
.plan-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 5px 0;
    min-height: 40px;
    width: 100%;
}
.plan-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.plan-check-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    margin-top: 1px;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
}
.plan-check-input:checked + .plan-check-box {
    background: #2563eb;
    border-color: #2563eb;
}
.plan-check-input:checked + .plan-check-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}
.plan-check-input:focus-visible + .plan-check-box {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.plan-check-text {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.5;
    padding-top: 1px;
}
.plan-check-label.done .plan-check-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* ─── Reset button ─────────────────────────────────── */
.plan-reset-btn {
    margin-top: 14px;
    background: none;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    font-size: var(--text-xs);
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1;
}
.plan-reset-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

/* FIN FASE 02.9 — PLAN MAESTRO */

/* ═══════════════════════════════════════════════════════════════════════
   FASE 02.10 — VIDEO CARD (turnos)
═══════════════════════════════════════════════════════════════════════ */
/* ── Media Carousel (tr-media-carousel) ─────────────────────────────── */
.tr-media-carousel {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    margin-bottom: 20px;
    user-select: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.tmc-stage {
    display: flex;
    /* Proporción 16:9 usando aspect-ratio — se adapta solo al ancho */
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
}
.tmc-slide {
    min-width: 100%;
    display: none;
    cursor: pointer;
    position: relative;
}
.tmc-slide.active { display: flex; }
.tmc-slide-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    border: none;
    background: none;
}
.tmc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    inset: 0;
}
.tmc-video-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    position: relative;
}
/* Inline autoplay video inside the carousel banner */
.tmc-inline-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
/* Subtle fullscreen hint badge */
.tmc-expand-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    background: rgba(0,0,0,0.42);
    color: rgba(255,255,255,0.85);
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-transform: uppercase;
}
.tmc-no-thumb { font-size: 3.5rem; }
.tmc-play-icon {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.55);
    color: #fff;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding-left: 4px;
    backdrop-filter: blur(4px);
    transition: all var(--transition-fast);
}
.tmc-slide-inner:hover .tmc-play-icon,
.tmc-slide-inner:focus .tmc-play-icon {
    background: rgba(255,255,255,0.28);
    transform: scale(1.1);
}
.tmc-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 16px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
}
.tmc-title {
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.3;
}
.tmc-sub {
    color: rgba(255,255,255,0.68);
    font-size: 0.72rem;
}
.tmc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-65%);
    background: rgba(0,0,0,0.32);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: background var(--transition-fast);
    line-height: 1;
    padding: 0;
}
.tmc-arrow:hover { background: rgba(0,0,0,0.58); }
.tmc-prev { left: 10px; }
.tmc-next { right: 10px; }
.tmc-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.tmc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.38);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-fast);
}
.tmc-dot.active { background: #fff; width: 20px; border-radius: 4px; }
/* Modal lightbox */
.tmc-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}
.tmc-modal-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    z-index: 10000;
    line-height: 1;
    padding: 0;
}
.tmc-modal-close:hover { background: rgba(220,38,38,0.7); }
.tmc-modal-content {
    max-width: min(900px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.tmc-modal-content img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-md);
    object-fit: contain;
}
.tmc-modal-content video {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-md);
    background: #000;
    width: min(860px, 95vw);
}
.tmc-modal-title {
    color: rgba(255,255,255,0.8);
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: center;
}
/* tmc-stage height override removed — now uses aspect-ratio 16/9 */

/* (legacy kept) */
.turnos-video-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.tv-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: default;
}

.tv-badge {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.tv-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tv-title {
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-sub {
    font-size: .78rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: background .15s, color .15s;
    padding: 0;
}

.tv-toggle:hover {
    background: #f1f5f9;
    color: var(--text-primary, #1e293b);
}

.tv-toggle-icon {
    transition: transform .25s ease;
    display: block;
}

.tv-toggle[aria-expanded="false"] .tv-toggle-icon {
    transform: rotate(-90deg);
}

.tv-wrap {
    overflow: hidden;
    transition: max-height .3s ease;
}

.tv-wrap.tv-hidden {
    display: none;
}

.tv-player {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: #000;
    aspect-ratio: 16 / 9;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.12);
}

@media (min-width: 768px) {
    .tv-player {
        max-height: 420px;
        margin: 24px auto;
    }
    .tv-title {
        font-size: 1rem;
    }
}
/* FIN FASE 02.10 — VIDEO CARD */

/* ═══════════════════════════════════════════════════════════════════
   FASE 02.10 — 3 estados (Disponible / En proceso / Ocupado) + filtros
   ═══════════════════════════════════════════════════════════════════ */

/* Ocultar elementos por filtro activo */
.tr-filter-hidden { display: none !important; }

/* ── Barra de filtros de estado ─────────────────────────────────── */
.turnos-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 8px;
    padding: 0 2px;
}
.tr-filter-pill {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: var(--text-sm, 0.85rem);
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    cursor: pointer;
}
.tr-filter-pill.active,
.tr-filter-pill:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.tr-filter-pill--solicitudes {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}
.tr-filter-pill--solicitudes:hover {
    background: #c2410c;
    color: #fff;
    border-color: #c2410c;
}
[data-theme="dark"] .tr-filter-pill {
    background: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}
[data-theme="dark"] .tr-filter-pill.active,
[data-theme="dark"] .tr-filter-pill:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ── Chip estado "En proceso" (gris, sin click) ─────────────────── */
.tr-chip-pending {
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 0.85;
}
[data-theme="dark"] .tr-chip-pending {
    background: #1f2937 !important;
    border-color: #374151 !important;
}
.tr-chip-en-proceso {
    color: #6b7280;
    font-size: 0.78em;
}

/* ── Leyenda — punto "En proceso" ───────────────────────────────── */
.tr-legend-dot.tr-legend-pending {
    background: #9ca3af;
}

/* ── Bloques móviles por estado ─────────────────────────────────── */
.tr-mobile-available {
    background: #f0fdf4 !important;
    border-left: 4px solid #16a34a;
    text-decoration: none;
    color: inherit;
}
.tr-mobile-pending {
    background: #f9fafb !important;
    border-left: 4px solid #9ca3af;
    cursor: not-allowed;
}
.tr-mobile-occupied {
    background: #eff6ff !important;
    border-left: 4px solid #2563eb;
}
.tr-mobile-en-proceso {
    color: #6b7280;
}
[data-theme="dark"] .tr-mobile-available { background: #052e16 !important; border-left-color: #16a34a; }
[data-theme="dark"] .tr-mobile-pending   { background: #111827 !important; border-left-color: #6b7280; }
[data-theme="dark"] .tr-mobile-occupied  { background: #1e3a5f !important; border-left-color: #3b82f6; }

/* ── Puntos de estado ────────────────────────────────────────────── */
.dot-available { background: #16a34a !important; }
.dot-pending   { background: #9ca3af !important; }
.dot-occupied  { background: #2563eb !important; }

/* ── Topbar — punto naranja para solicitudes pendientes ─────────── */
.topbar-pill-dot--orange { background: #f97316 !important; }

/* ── Panel admin solicitudes ─────────────────────────────────────── */
.btn-xs {
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 5px;
    line-height: 1.4;
}
.sol-btn-accept {
    background: #16a34a;
    color: #fff;
    border: none;
    cursor: pointer;
}
.sol-btn-accept:hover { background: #15803d; }
.sol-btn-reject {
    background: #dc2626;
    color: #fff;
    border: none;
    cursor: pointer;
}
.sol-btn-reject:hover { background: #b91c1c; }

.sol-exp {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78em;
    font-weight: 600;
}
.sol-exp-urgent { background: #fee2e2; color: #dc2626; }
.sol-exp-warn   { background: #fef3c7; color: #d97706; }
.sol-exp-ok     { background: #d1fae5; color: #059669; }

/* ─── FIN FASE 02.10 — 3 estados + filtros ───────────────────────── */

/* ─── Modal de Confirmación de Turno ───────────────────────────────── */
.tr-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.tr-confirm-card {
    background: var(--surface, #ffffff);
    border-radius: 20px;
    padding: 28px 24px 24px;
    max-width: 380px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    animation: trConfirmIn 0.22s ease;
}
@keyframes trConfirmIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.tr-confirm-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 8px;
}
.tr-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px;
    color: var(--text-primary, #111);
}
.tr-confirm-details {
    background: var(--surface-alt, #f3f4f6);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.tr-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.tr-confirm-row:last-child { border-bottom: none; }
.tr-confirm-lbl {
    color: var(--text-secondary, #6b7280);
    flex-shrink: 0;
    font-weight: 500;
}
.tr-confirm-val {
    color: var(--text-primary, #111);
    font-weight: 600;
    text-align: right;
}
.tr-confirm-note {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.5;
}
.tr-confirm-actions {
    display: flex;
    gap: 10px;
}
.tr-confirm-btn {
    flex: 1;
    padding: 12px 8px;
    border-radius: 12px;
    border: none;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.tr-confirm-cancel {
    background: var(--surface-alt, #f3f4f6);
    color: var(--text-secondary, #374151);
}
.tr-confirm-cancel:hover { background: #e5e7eb; }
.tr-confirm-ok {
    background: #16a34a;
    color: #ffffff;
}
.tr-confirm-ok:hover  { background: #15803d; }
.tr-confirm-ok:active { background: #166534; transform: scale(0.97); }
[data-theme="dark"] .tr-confirm-card    { background: #1f2937; }
[data-theme="dark"] .tr-confirm-details { background: #111827; }
[data-theme="dark"] .tr-confirm-cancel  { background: #374151; color: #d1d5db; }
[data-theme="dark"] .tr-confirm-cancel:hover { background: #4b5563; }
/* ─── FIN Modal Confirmación ──────────────────────────────────────── */

