/* MakeCool - Diseño Premium 2025 */

/* ============================================
   VARIABLES Y CONFIGURACIÓN
   ============================================ */
:root {
    /* Paleta Premium - Tonos Fríos Elegantes */
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
    
    --accent: #8b5cf6;
    --accent-light: #ede9fe;
    
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Escala de Grises Premium */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --black: #020617;
    
    /* Sombras Premium */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);
    
    /* Bordes */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Tipografía Premium */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   RESET Y BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    min-height: 100vh;
}

/* Fondo con patrón sutil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(20, 184, 166, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   TIPOGRAFÍA PREMIUM
   ============================================ */
/* La fuente Outfit se carga desde el layout principal */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

/* ============================================
   CONTENEDOR
   ============================================ */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

/* ============================================
   NAVBAR PREMIUM
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-brand .logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-brand h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1002;
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
}

.mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Animación hamburguesa a X */
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-info {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.875rem;
}

/* Ocultar accesos rápidos móvil en desktop por defecto */
.mobile-quick-access-menu {
    display: none !important;
}

.nav-info span {
    color: var(--gray-600);
}

/* Ocultar accesos rápidos móvil en desktop por defecto */
.mobile-quick-access-menu {
    display: none !important;
}

.nav-restaurant {
    font-weight: 600;
    color: var(--gray-700) !important;
}

.nav-separator {
    color: var(--gray-300) !important;
}

.nav-user {
    font-weight: 500;
}

/* ============================================
   BOTONES PREMIUM
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
    transform: translateY(-2px);
}

.btn-block { width: 100%; }

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* ============================================
   ICONOS SVG INLINE
   ============================================ */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-xl {
    width: 48px;
    height: 48px;
}

/* ============================================
   LOGIN PAGE PREMIUM
   ============================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
    animation: aurora 15s ease-in-out infinite;
}

@keyframes aurora {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 36px;
}

.logo img {
    max-width: 100px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.logo p {
    font-size: 0.9375rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   FORMULARIOS PREMIUM
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-800);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input:hover {
    border-color: var(--gray-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.form-info {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    border-radius: var(--radius);
    margin: 24px 0;
}

.form-info h4 {
    margin: 0 0 12px 0;
    color: var(--primary-dark);
    font-size: 1rem;
}

.form-info ul {
    margin: 0;
    padding-left: 20px;
}

.form-info li {
    margin: 8px 0;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
    border-radius: 4px;
}

/* ============================================
   ALERTAS PREMIUM
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
    border: 1px solid transparent;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: var(--success-light);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.2);
}

/* ============================================
   DASHBOARD HEADER
   ============================================ */
.dashboard-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.restaurant-name {
    font-size: 1rem;
    color: var(--gray-500);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.page-header p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ============================================
   STATS CARDS PREMIUM
   ============================================ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card.alert-card::before {
    background: linear-gradient(180deg, var(--warning) 0%, #d97706 100%);
}

.stat-card.temp-card::before {
    background: linear-gradient(180deg, var(--success) 0%, #16a34a 100%);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card.alert-card .stat-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card.temp-card .stat-icon {
    background: var(--success-light);
    color: var(--success);
}

.stat-content {
    flex: 1;
}

.stat-card h3 {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ============================================
   CAMERA DASHBOARD CARDS
   ============================================ */
.cameras-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.camera-dashboard-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.camera-dashboard-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.camera-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.camera-card-header h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.camera-card-header h3::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

/* LED rojo para cámaras inactivas */
.camera-dashboard-card:has(.status-inactive) .camera-card-header h3::before,
.camera-card.inactive .camera-card-header h3::before {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.camera-stats-mini {
    text-align: right;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mini-label {
    font-size: 0.6875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.mini-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
}

.mini-value.temp-reading {
    color: var(--success);
}

.mini-value.no-data {
    color: var(--gray-400);
}

.camera-info-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px 0;
    background: var(--gray-50);
    margin: 0 -24px;
    padding: 12px 24px;
}

.info-item-small {
    display: flex;
    gap: 8px;
    align-items: center;
}

.info-label-small {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
}

.info-value-small {
    font-size: 0.875rem;
    color: var(--gray-800);
    font-weight: 600;
}

.camera-chart-container {
    height: 180px;
    position: relative;
    margin: 8px 0;
}

.no-chart-data {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--radius);
    color: var(--gray-500);
    font-size: 0.875rem;
    border: 2px dashed var(--gray-200);
}

.camera-card-footer {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-access-card {
    margin-top: 32px;
}

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

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition);
}

.quick-action:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.qa-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 12px;
    background: var(--gray-100);
    border-radius: var(--radius);
    transition: var(--transition);
}

.quick-action:hover .qa-icon {
    background: var(--white);
    transform: scale(1.1);
}

.qa-label {
    font-size: 0.8125rem;
    color: var(--gray-700);
    font-weight: 600;
    text-align: center;
}

/* ============================================
   DASHBOARD CARD / GENERIC CARD
   ============================================ */
.dashboard-card,
.card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.dashboard-card h3,
.card h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   CAMERAS GRID (Lista de cámaras)
   ============================================ */
.cameras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.camera-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.camera-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.camera-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.camera-card.inactive::before {
    background: var(--gray-400);
}

.camera-card.inactive {
    opacity: 0.7;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.camera-header h3 {
    font-size: 1.125rem;
    margin: 0;
}

.status-badge {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-active {
    background: var(--success-light);
    color: #166534;
}

.status-inactive {
    background: var(--danger-light);
    color: #991b1b;
}

.camera-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.camera-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.camera-stats .stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.stat-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
}

.temp-reading {
    color: var(--success);
    font-weight: 700;
}

.no-data {
    color: var(--gray-400);
    font-style: italic;
}

.camera-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-success {
    background: var(--success-light);
    color: #166534;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-info {
    background: var(--info-light);
    color: #1e40af;
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* ============================================
   TABLES PREMIUM
   ============================================ */
.data-card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
    gap: 16px;
}

.data-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.data-count {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-700);
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.row-warning {
    background: var(--warning-light) !important;
}

.temp-cell {
    font-weight: 600;
}

.temp-alert {
    color: var(--danger);
    font-weight: 700;
}

/* ============================================
   CHARTS
   ============================================ */
.chart-card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--gray-100);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
    gap: 16px;
}

.chart-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.chart-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--gray-600);
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

#temperatureChart {
    height: 350px !important;
}

/* ============================================
   FILTERS
   ============================================ */
.filters-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--gray-100);
}

.filters-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition);
    background: var(--white);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    background: var(--white);
    padding: 80px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 32px;
    font-size: 1rem;
}

/* ============================================
   TOKEN DISPLAY
   ============================================ */
.token-alert {
    background: var(--warning-light);
    border: 2px solid rgba(245, 158, 11, 0.3);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.token-display {
    display: block;
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    border: 2px solid var(--gray-200);
    margin: 16px 0;
    word-break: break-all;
    font-weight: 600;
    color: var(--gray-800);
}

.token-warning {
    margin-top: 16px;
    color: #92400e;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-box.stat-warning {
    border-left: 4px solid var(--warning);
}

.stat-box .stat-icon {
    font-size: 1.75rem;
}

.stat-box .stat-info {
    flex: 1;
}

.stat-box .stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-box .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.temp-low { color: var(--info); }
.temp-high { color: var(--danger); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.pagination span {
    color: var(--gray-600);
    font-weight: 500;
}

/* ============================================
   INFO LIST
   ============================================ */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.info-value {
    color: var(--gray-900);
    font-weight: 500;
}

/* ============================================
   LOGIN FOOTER
   ============================================ */
.login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .navbar {
        padding: 12px 16px;
    }

    .nav-brand h2 {
        font-size: 1.25rem;
    }

    .nav-brand .logo-img {
        height: 30px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-info {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        gap: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .nav-info.active {
        right: 0;
    }

    /* Header del menú móvil */
    .nav-info::after {
        content: 'Menú';
        display: block;
        padding: 20px 20px 16px;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--gray-900);
        border-bottom: 1px solid var(--gray-100);
        background: var(--white);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .nav-info > * {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nav-info span,
    .nav-info .btn {
        width: 100%;
        padding: 10px 0;
        border-bottom: none;
        display: block;
        flex-shrink: 0;
    }
    
    /* Ocultar información de restaurante y usuario en móvil */
    .nav-info .nav-restaurant,
    .nav-info .nav-user,
    .nav-info .badge {
        display: none !important;
    }
    
    .nav-info .btn-logout {
        margin: 16px;
        padding: 14px 20px !important;
        border-radius: var(--radius) !important;
        background: var(--danger-light) !important;
        color: var(--danger) !important;
        border: 1px solid rgba(239, 68, 68, 0.2) !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: calc(100% - 32px) !important;
    }
    
    .nav-info .btn-logout:active {
        background: var(--danger) !important;
        color: white !important;
    }

    .nav-info .nav-separator {
        display: none;
    }
    
    /* Accesos rápidos dentro del menú móvil - Diseño compacto */
    .mobile-quick-access-menu {
        display: block !important;
        width: 100%;
        margin: 0;
        padding: 16px;
        background: var(--white);
        border-radius: 0;
        border-top: none;
        flex-shrink: 0;
        flex-grow: 1;
    }
    
    .mobile-menu-section-title {
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--gray-500);
        margin-bottom: 12px;
        padding: 0;
    }
    
    .mobile-quick-menu-items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .mobile-quick-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 14px 8px;
        text-decoration: none;
        color: var(--gray-700);
        background: var(--gray-50);
        border-radius: 12px;
        transition: all 0.2s ease;
        font-weight: 600;
        font-size: 0.75rem;
        border: 1px solid transparent;
        text-align: center;
        min-height: 70px;
    }
    
    .mobile-quick-menu-item:active {
        background: var(--primary);
        color: white;
        transform: scale(0.95);
    }
    
    .mobile-quick-menu-item:active svg,
    .mobile-quick-menu-item:active i {
        color: white !important;
    }
    
    .mobile-quick-menu-item svg,
    .mobile-quick-menu-item i {
        color: var(--primary);
        flex-shrink: 0;
        width: 24px !important;
        height: 24px !important;
    }
    
    .mobile-quick-menu-item:hover,
    .mobile-quick-menu-item:focus {
        background: var(--primary-light);
        color: var(--primary-dark);
        border-color: var(--primary);
    }
    
    .mobile-quick-menu-item span {
        color: inherit;
        font-weight: inherit;
        line-height: 1.2;
    }

    /* Backdrop oscuro */
    .nav-info::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: -1;
    }

    .nav-info.active::before {
        opacity: 1;
        pointer-events: all;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cameras-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .cameras-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 24px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .filters-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .login-box {
        padding: 32px 24px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .camera-actions {
        flex-direction: column;
    }

    .camera-actions .btn {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
    }

    .page-header div:last-child {
        width: 100%;
        flex-direction: column;
    }

    .page-header div:last-child .btn {
        width: 100%;
    }

    #temperatureChart {
        height: 280px !important;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.375rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-action {
        padding: 20px 12px;
    }
    
    .qa-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
    }
    
    .qa-label {
        font-size: 0.75rem;
    }
    
    /* Ocultar accesos rápidos en desktop cuando está la barra móvil */
    .quick-access-card {
        margin-bottom: 100px; /* Espacio para la barra móvil */
    }

    .camera-info-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   BARRA DE ACCESOS RÁPIDOS MÓVIL (ELIMINADA - AHORA EN MENÚ HAMBURGUESA)
   ============================================ */
.mobile-quick-access {
    display: none !important; /* Oculto completamente */
}

.mobile-quick-access-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    min-width: 64px;
    text-decoration: none;
    color: var(--gray-600);
    transition: var(--transition);
    border-radius: var(--radius-sm);
    position: relative;
    flex: 1;
    max-width: 80px;
}

.mobile-quick-item:active {
    background: var(--gray-100);
    transform: scale(0.95);
}

.mobile-quick-item svg {
    transition: var(--transition);
    color: var(--primary); /* Color azul primario como el resto */
}

.mobile-quick-item span {
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: var(--gray-700);
}

.mobile-quick-item:hover,
.mobile-quick-item:focus {
    color: var(--gray-800);
}

.mobile-quick-item:hover svg,
.mobile-quick-item:focus svg {
    color: var(--primary-dark);
    transform: scale(1.1);
}

/* Estado activo cuando coincide con la página actual */
.mobile-quick-item.active {
    color: var(--gray-800);
}

.mobile-quick-item.active svg {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.mobile-quick-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Menú expandible para opciones adicionales */
.mobile-quick-expanded {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: slideDown 0.3s ease-out;
}

.mobile-quick-expanded.show {
    display: block;
}

.mobile-quick-expanded-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--gray-700);
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9375rem;
}

.mobile-quick-expanded-item:active {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-quick-expanded-item:hover,
.mobile-quick-expanded-item:focus {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-quick-expanded-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mostrar barra móvil solo en pantallas pequeñas */
@media (max-width: 768px) {
    .mobile-quick-access {
        display: block;
    }
    
    /* Ocultar accesos rápidos tradicionales en móvil */
    .quick-access-card {
        display: none !important;
    }
    
    /* Ajustar padding del contenido principal (sin barra móvil superior) */
    .main-content {
        padding-top: 24px;
    }
    
    /* Ajustar dashboard header */
    .dashboard-header {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .mobile-quick-item {
        min-width: 56px;
        padding: 8px 8px;
    }
    
    .mobile-quick-item span {
        font-size: 0.625rem; /* 10px */
    }
    
    .mobile-quick-item svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   TOUCH OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .quick-action,
    .camera-card,
    .stat-card {
        -webkit-tap-highlight-color: transparent;
    }

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .page-header div:last-child,
    .btn,
    .form-actions,
    .camera-actions {
        display: none !important;
    }

    body {
        background: white;
    }

    body::before {
        display: none;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.3s ease-out;
}
