/* ============================================
   SENTINEL - iOS-Style Glassmorphism
   Clean, Minimal, Professional
   ============================================ */

:root {
    /* Theme Base - Elegant Dark Blue */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* iOS Glassmorphism - More visible */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-bg-elevated: rgba(51, 65, 85, 0.8);
    --glass-border: rgba(148, 163, 184, 0.2);
    --glass-blur: 20px;
    
    /* Colors - Vibrant & Clear */
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #0EA5E9;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius - iOS Style */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   LIGHT THEME - Alto contraste
   ============================================ */
body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-bg-elevated: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.15);
}

body.light-theme {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
}

body.light-theme .header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .glass,
body.light-theme .stat-card,
body.light-theme .content-section,
body.light-theme .health-panel,
body.light-theme .alerts-section,
body.light-theme .top-items-section,
body.light-theme .activity-section {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme .stat-value,
body.light-theme .stat-label,
body.light-theme .section-title {
    color: #1e293b !important;
}

body.light-theme p,
body.light-theme span,
body.light-theme .stat-icon,
body.light-theme .health-label {
    color: #475569 !important;
}

body.light-theme .icon-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #334155 !important;
}

body.light-theme .icon-btn:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #2563eb !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

body.light-theme .fab-sidebar {
    background: rgba(255, 255, 255, 0.98) !important;
    border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .fab-item {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .fab-item:hover,
body.light-theme .fab-item.active {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

body.light-theme .fab-section-title {
    color: #64748b !important;
}

body.light-theme .btn-sm,
body.light-theme .btn-primary,
body.light-theme .btn-secondary {
    color: #1e293b !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

body.light-theme .btn-primary {
    background: #3b82f6 !important;
    color: white !important;
    border-color: #2563eb !important;
}

body.light-theme .alert-item,
body.light-theme .activity-item,
body.light-theme .product-item,
body.light-theme .audit-card,
body.light-theme .mesa-card {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
}

body.light-theme .alert-item:hover,
body.light-theme .activity-item:hover,
body.light-theme .audit-card:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .chart-container,
body.light-theme canvas {
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 12px;
}

body.light-theme select,
body.light-theme input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #1e293b !important;
}

body.light-theme .period-selector select {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1e293b !important;
}

body.light-theme .health-item {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .health-status {
    color: #475569 !important;
}

body.light-theme .mesero-item,
body.light-theme .stat-comparison {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

/* Scrollbar - Minimal */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* ============================================
   iOS GLASSMORPHISM - Base Class
   ============================================ */
.glass {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Glass Card variations */
.glass-subtle {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: var(--radius-lg);
}

.glass-solid {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius-lg);
}

/* Theme Toggle - Hidden for now */
.theme-toggle {
    display: none;
}

/* ============================================
   MOBILE NAVIGATION - Premium Glass Style
   ============================================ */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    padding-bottom: max(env(safe-area-inset-bottom, 10px), 10px);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 64px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-btn i {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.nav-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-btn.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
}

.nav-btn.active i {
    transform: scale(1.1);
}

.nav-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}
.nav-btn .badge {
    position: absolute;
    top: 4px;
    right: 10px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* Nav Item - Alternative class name (same styles) */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    min-width: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item span {
    font-size: 0.65rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item .mobile-badge {
    position: absolute;
    top: 4px;
    right: 10px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
    body {
        padding-bottom: 0;
    }
}

/* App Container */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

@media (min-width: 769px) {
    .app-container {
        padding: var(--spacing-xl);
    }
}

/* Main Content Area */
.main-content {
    display: block;
    padding-bottom: 100px; /* Space for mobile nav */
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   HEADER - Premium Glassmorphic Style
   ============================================ */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-left i {
    font-size: 1.6rem;
    color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.header-left h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.period-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 10px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(var(--glass-blur));
    min-height: 68px;
}

.period-selector label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ============================================
   WORK PERIOD INDICATOR - Turno Activo
   ============================================ */
.work-period-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(var(--glass-blur));
    transition: var(--transition);
    min-height: 68px;
}

.work-period-indicator.active {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
}

.work-period-indicator.inactive {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.work-period-status {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.work-period-status strong {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.work-period-status small {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
}

.work-period-indicator.active .work-period-status {
    color: var(--success);
}

.work-period-indicator.inactive .work-period-status {
    color: var(--danger);
}

.work-period-status i {
    font-size: 1rem;
}

.work-period-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#workPeriodDuration {
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.work-period-indicator.active #workPeriodDuration {
    color: var(--success);
    font-weight: 700;
}

/* ============================================
   DATE TIME ENHANCED - Fecha y Hora Grande
   ============================================ */
.date-time-enhanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    min-height: 68px;
    backdrop-filter: blur(var(--glass-blur));
}

.date-time-main {
    display: flex;
    align-items: center;
}

.time-display {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.date-time-sub {
    display: flex;
    align-items: center;
}

.date-display {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.date-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .header-center {
        gap: 8px;
    }
    
    .work-period-indicator {
        padding: 6px 10px;
    }
    
    #workPeriodDuration {
        font-size: 1rem;
    }
    
    .work-period-status {
        font-size: 0.65rem;
    }
    
    .date-time-enhanced {
        padding: 6px 12px;
    }
    
    .time-display {
        font-size: 1.25rem;
    }
    
    .date-display {
        font-size: 0.7rem;
    }
    
    .period-selector {
        display: none;
    }
    
    .header-right {
        gap: 4px;
    }
    
    .header-left h1 {
        display: none;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--primary);
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.status-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    display: none;
}

@media (min-width: 769px) {
    .status-text {
        display: inline;
    }
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   STATS CARDS - iOS Glass Style
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.stat-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 18px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.stat-card:hover {
    background: rgba(51, 65, 85, 0.85);
    transform: translateY(-3px);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(99, 102, 241, 0.15));
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(16, 185, 129, 0.15));
    color: var(--success);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.15));
    color: var(--warning);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.stat-icon.danger {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.25), rgba(239, 68, 68, 0.15));
    color: var(--danger);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

/* Stat Icons by Type - Dashboard */
.stat-icon.ventas {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.2));
    color: var(--success);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.stat-icon.tickets {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.2));
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.stat-icon.mesas {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(251, 191, 36, 0.2));
    color: var(--warning);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.stat-icon.alertas {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(248, 113, 113, 0.2));
    color: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Stat Icons - Corte de Caja */
.stat-icon.efectivo {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.2));
    color: #22C55E;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.stat-icon.fondo {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.2));
    color: #3B82F6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.stat-icon.gastos {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(248, 113, 113, 0.2));
    color: #EF4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.stat-icon.entregar {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(34, 197, 94, 0.3));
    color: #10B981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.stat-icon.fondo-manana {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(139, 92, 246, 0.2));
    color: #A855F7;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

/* Stat Card Highlight (para Efectivo a Entregar) */
.stat-card.highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-card.highlight .stat-value {
    color: #10B981;
    font-size: 1.8rem;
}

.stat-card.highlight .stat-value.negative {
    color: #EF4444;
}

/* Grid de 5 columnas para corte de caja */
.stats-grid.corte-caja {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 16px;
}

.stats-grid.corte-caja .stat-trend {
    white-space: nowrap;
    overflow: visible;
    font-size: 0.7rem;
}

@media (max-width: 1400px) {
    .stats-grid.corte-caja {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .stats-grid.corte-caja {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid.corte-caja {
        grid-template-columns: 1fr;
    }
}

/* Stat Icons - Mesas Types */
.stat-icon.pool {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.2));
    color: #3B82F6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.stat-icon.carambola {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(251, 191, 36, 0.2));
    color: #F59E0B;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.stat-icon.domino {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.2));
    color: #22C55E;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.stat-icon.ingreso {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(16, 185, 129, 0.25));
    color: var(--success);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Stat Info Container */
.stat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.stat-icon.danger {
    background: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
}

.stat-change.up {
    color: var(--success);
    background: rgba(16, 185, 129, 0.15);
}

.stat-change.down {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
}

.stat-change.neutral {
    color: var(--text-muted);
    background: rgba(128, 128, 128, 0.12);
}

.stat-period {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

/* Stat Trend - Dashboard indicators */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-trend.positive,
.stat-trend i.fa-arrow-up {
    color: var(--success);
}

.stat-trend.negative,
.stat-trend i.fa-arrow-down {
    color: var(--danger);
}

/* Highlight Card */
.stat-card.highlight-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(16, 185, 129, 0.1));
    border-color: rgba(34, 197, 94, 0.35);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 968px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SECTIONS - iOS Glass Style
   ============================================ */
.section {
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-header h2 i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1));
    color: var(--primary);
    font-size: 1rem;
    border-radius: 10px;
}

.section-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 i {
    color: var(--primary);
    font-size: 0.95rem;
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 12px;
    overflow: visible;
    padding: 8px;
    margin-right: 8px;
}

/* Wrapper for notification button with badge */
.icon-btn-wrapper {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
    display: none;
}

.notification-badge.visible {
    display: block;
}

/* ============================================
   BUTTONS - Premium Glassmorphic Style
   ============================================ */
.btn-primary, .btn-secondary, .btn-minimal, .btn-icon {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), #818cf8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
    transform: scale(0.98) translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-minimal {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 12px;
}

.btn-minimal:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-icon:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* Icon Button - Header style */
.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.icon-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.icon-btn .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    font-size: 0.6rem;
    padding: 3px 5px;
    border-radius: 50%;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    z-index: 1000;
    line-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Small Buttons */
.btn-sm {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    min-height: 34px;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

/* Filter Select */
.filter-select {
    padding: 10px 36px 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(30, 41, 59, 0.75);
    color: #f8fafc;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-height: 42px;
    backdrop-filter: blur(10px);
}

.filter-select:hover {
    border-color: rgba(148, 163, 184, 0.25);
    background-color: rgba(30, 41, 59, 0.85);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.filter-select option {
    background: #1e293b;
    color: #f8fafc;
    padding: 10px;
}

.full-width {
    width: 100%;
}

/* Health Grid */
.health-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 768px) {
    .health-grid {
        gap: 8px;
    }
}

.health-item {
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
    flex: 1;
    min-width: 150px;
}

.health-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
}

.health-item i {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.health-item .health-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.health-status {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.health-item .health-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.health-item.up {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(52, 211, 153, 0.05));
    border-color: rgba(16, 185, 129, 0.15);
}

.health-item.up i {
    color: var(--success);
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

.health-item.up .health-status {
    color: var(--success);
}

.health-item.down {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(248, 113, 113, 0.05));
    border-color: rgba(239, 68, 68, 0.15);
}

.health-item.down i {
    color: var(--danger);
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.3));
}

.health-item.down .health-status {
    color: var(--danger);
}

/* Health Panel - Dashboard system status */
.health-panel {
    padding: 12px 16px;
    margin-bottom: 16px;
}

.health-panel h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.health-panel h3 i {
    color: var(--primary);
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    max-height: 350px;
}

.chart-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Cash Control Styles */
.cash-control {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cash-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.cash-row.total {
    padding-top: 12px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.cash-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cash-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cash-value.success {
    color: var(--success);
}

.cash-value.warning {
    color: var(--warning);
}

.cash-value.error {
    color: var(--danger);
}

.cash-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* Movements Realtime */
.movements-realtime {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Activity List */
.actividad-list {
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom scrollbar for activity list */
.actividad-list::-webkit-scrollbar {
    width: 6px;
}

.actividad-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.actividad-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.actividad-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Actividad Item Styles */
.actividad-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.actividad-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.08);
}

.actividad-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.actividad-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.actividad-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
}

.actividad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.actividad-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.actividad-meta i {
    font-size: 0.68rem;
    opacity: 0.75;
}

.activity-item-new {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.activity-item-new:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1));
    color: var(--primary);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.15);
}

.activity-icon.sale {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.activity-icon.cancel {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.activity-icon.table {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Activity Item Extended Styles */
.activity-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon-wrapper i {
    font-size: 1rem;
}

.activity-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.activity-description {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-amount {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.activity-footer {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.activity-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-footer i {
    font-size: 0.65rem;
    opacity: 0.7;
}

.activity-user {
    color: var(--text-secondary);
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.products-list::-webkit-scrollbar {
    width: 4px;
}

.products-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

.products-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Product Item - Premium Design */
.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.product-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.08);
}

.product-item.gold {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.04));
    border-color: rgba(251, 191, 36, 0.15);
}

.product-item.silver {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.08), rgba(100, 116, 139, 0.04));
    border-color: rgba(148, 163, 184, 0.15);
}

.product-item.bronze {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(180, 83, 9, 0.04));
    border-color: rgba(217, 119, 6, 0.15);
}

.product-rank {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.product-rank.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e1e1e;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.product-rank.silver {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #1e1e1e;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.3);
}

.product-rank.bronze {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1e1e1e;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.product-content {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
}

.product-qty {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-qty i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.product-revenue {
    color: #22c55e;
    font-weight: 600;
}

/* Tables List - Dashboard */
.tables-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.tables-list::-webkit-scrollbar {
    width: 4px;
}

.tables-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

.tables-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Table Card - Premium Design */
.table-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s ease;
}

.table-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.table-card.pool {
    border-left: 3px solid #3B82F6;
}

.table-card.carambola {
    border-left: 3px solid #F59E0B;
}

.table-card.domino {
    border-left: 3px solid #22C55E;
}

.table-card.warning {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.table-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
}

.table-badge.pool {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.table-badge.carambola {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.table-badge.domino {
    background: rgba(34, 197, 94, 0.15);
    color: #4ADE80;
}

.table-badge i {
    font-size: 0.85rem;
}

.table-timer {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.table-timer.warning {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.15);
    animation: pulse-timer 2s ease-in-out infinite;
}

@keyframes pulse-timer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.table-card-body {
    margin-bottom: 8px;
}

.table-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #22C55E;
    margin-bottom: 6px;
}

.table-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.table-user {
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-user i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.table-orders {
    color: var(--text-muted);
}

.table-card-footer {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.table-type-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alerts List */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.chart-card {
    padding: 24px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    margin-top: 16px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

/* Select & Input */
.select-minimal, .input-minimal {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 46px;
    font-weight: 500;
}

.select-minimal:hover, .input-minimal:hover {
    border-color: rgba(148, 163, 184, 0.2);
}

.select-minimal:focus, .input-minimal:focus {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   ALERTS - iOS Glass Style
   ============================================ */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.alert-item {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.alert-item:hover {
    background: rgba(51, 65, 85, 0.85);
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.alert-item.CANCELLATION {
    border-left-color: var(--warning);
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.05), rgba(30, 41, 59, 0.75));
}

.alert-item.TIME_FRAUD {
    border-left-color: var(--danger);
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.05), rgba(30, 41, 59, 0.75));
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 10px;
}

.alert-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.alert-type.CANCELLATION {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    color: var(--warning);
}

.alert-type.TIME_FRAUD {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(239, 68, 68, 0.1));
    color: var(--danger);
}

.alert-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.alert-status.pending {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(239, 68, 68, 0.1));
    color: var(--danger);
}

.alert-status.acknowledged {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(16, 185, 129, 0.1));
    color: var(--success);
}

.alert-message {
    font-size: 0.98rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    line-height: 1.4;
}

.alert-details {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.alert-product-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    font-size: 0.85rem;
    color: var(--text-primary);
}

.alert-product-details span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.alert-product-details i {
    color: var(--primary);
    opacity: 0.8;
}

.alert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.alert-meta {
    display: flex;
    gap: var(--spacing-md);
}

.alert-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.3;
}

/* ============================================
   CANCELLATIONS REPORT STYLES
   ============================================ */
.cancellations-report {
    min-height: 200px;
}

.cancellations-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.summary-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(var(--glass-blur));
}

.summary-card i {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.8;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cancellations-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.cancellations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cancellations-table thead {
    background: var(--glass-bg-elevated);
    position: sticky;
    top: 0;
    z-index: 1;
}

.cancellations-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--glass-border);
}

.cancellations-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
}

.cancellations-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.cancellations-table .text-center {
    text-align: center;
}

.cancellations-table .text-right {
    text-align: right;
}

.time-details {
    font-size: 0.75rem;
    line-height: 1.4;
}

.time-details small {
    color: var(--text-muted);
}

.time-details strong {
    color: var(--primary);
}

@media (max-width: 768px) {
    .cancellations-table {
        font-size: 0.8rem;
    }
    
    .cancellations-table th,
    .cancellations-table td {
        padding: var(--spacing-xs);
    }
}

.empty-state p {
    font-size: 1rem;
}

/* Filters Bar */
.filters-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: 24px;
}

.metric-card {
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
}

.metric-value small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Settings */
.settings-group {
    margin-bottom: var(--spacing-xl);
}

.settings-group h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: var(--spacing-md);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-label {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-description {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Toggle Switch - Premium Style */
.toggle {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-color: rgba(59, 130, 246, 0.3);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Modal - iOS Style */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.25s ease;
}

.modal-content {
    position: relative;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    background: rgba(25, 28, 40, 0.97);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.modal-body {
    padding: 28px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Toast Notifications - Premium Style */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    padding: 16px 22px;
    border-radius: 16px;
    background: rgba(25, 28, 40, 0.95);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    animation: toastSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    min-width: 320px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), rgba(25, 28, 40, 0.95));
}

.toast.error {
    border-left: 4px solid var(--danger);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), rgba(25, 28, 40, 0.95));
}

.toast.info {
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(25, 28, 40, 0.95));
}

.toast.warning {
    border-left: 4px solid var(--warning);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(25, 28, 40, 0.95));
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }
    
    .chart-wrapper {
        height: 220px;
    }
    
    .filters-bar {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 0 var(--spacing-sm);
    }
}

/* Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    .btn-primary:active,
    .btn-secondary:active,
    .btn-minimal:active,
    .btn-icon:active,
    .nav-btn:active,
    .alert-item:active {
        opacity: 0.7;
        transform: scale(0.97);
    }
}

/* Loading Spinner - Premium */
.loading-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50px;
    animation: spinSmooth 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spinSmooth {
    to { transform: rotate(360deg); }
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Print Styles */
@media print {
    .mobile-nav,
    .theme-toggle,
    .header-actions,
    .btn-primary,
    .btn-secondary,
    .modal {
        display: none !important;
    }
}

/* ============================================
   ENHANCED UX/UI ADDITIONS
   ============================================ */

/* Loading Screen - iOS Style */
.app-loader,
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.app-loader.fade-out,
.loader.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

.loader-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.loader-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--radius-lg);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Empty State - Modern Glass Design */
.empty-state {
    text-align: center;
    padding: 50px 30px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.4;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 250px;
    line-height: 1.5;
}

/* Empty state variants */
.empty-state.compact {
    padding: 30px 20px;
}

.empty-state.compact i {
    font-size: 2rem;
}

.empty-state.compact p {
    font-size: 0.85rem;
}

/* Alert Item Enhancements */
.alert-item {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInRight 0.4s ease-out;
    animation-fill-mode: both;
}

.alert-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.3);
}

.alert-item:active {
    transform: translateX(8px) scale(0.98);
}

/* New Alert Highlight */
.alert-new {
    animation: pulseGlow 2s ease-in-out 3;
    border-left: 3px solid var(--warning) !important;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.35);
    }
}

.alert-icon {
    font-size: 1.4rem;
    margin-right: 10px;
}

.alert-type-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.alert-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 8px 0;
}

.alert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(245, 158, 11, 0.1));
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge-success {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(16, 185, 129, 0.1));
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(239, 68, 68, 0.1));
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.badge-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(99, 102, 241, 0.1));
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Button Press Feedback */
button, .btn {
    position: relative;
    overflow: hidden;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before, .btn:active::before {
    width: 300px;
    height: 300px;
}

/* Enhanced Toast */
.toast {
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
}

.toast.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
}

.toast.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(251, 146, 60, 0.95));
}

/* Pulse Animation for Live Indicators */
@keyframes pulseLive {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-indicator.connected::before {
    animation: pulseLive 2s ease-in-out infinite;
}

/* Smooth Page Transitions */
.page {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Visible for Accessibility */
button:focus-visible,
.btn:focus-visible,
.nav-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    button:active,
    .btn:active,
    .alert-item:active {
        transform: scale(0.95);
    }
}


/* ============================================
   HEADER FIXES
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    z-index: 900;
    overflow: visible;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.badge-count {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulseLive 2s ease-in-out infinite;
}

.status-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main content offset for fixed header */
.main-content {
    margin-top: 90px;
}

/* Mobile Header */
@media (max-width: 768px) {
    .header {
        height: 60px;
    }
    
    .header-nav {
        display: none;
    }
    
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .main-content {
        margin-top: 70px;
        margin-bottom: 80px;
    }
}


/* ============================================
   LOGIN SCREEN - Modern Professional
   ============================================ */

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
}

/* Animated gradient background */
.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 60%, rgba(14, 165, 233, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    padding: 40px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    animation: fadeInUp 0.6s ease;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 50px -15px rgba(0, 0, 0, 0.5),
        0 0 100px -20px rgba(59, 130, 246, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
}

.login-header h1 {
    font-size: 2.25rem;
    margin: 0 0 8px 0;
    color: #f8fafc;
    font-weight: 700;
    letter-spacing: -1px;
}

.login-header p,
.login-header .subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .btn-primary {
    margin-top: 12px;
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.login-form .btn-primary:active {
    transform: translateY(0);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #3B82F6;
}

.btn-large {
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 8px;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    background: rgba(59, 130, 246, 0.08);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.login-hint i {
    color: var(--primary);
}

.login-hint strong {
    color: var(--primary);
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* ============================================
   PIN PAD LOGIN - SambaPOS Style
   ============================================ */

.section-label {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 24px;
    font-weight: 500;
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.user-card.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f8fafc;
    text-align: center;
    line-height: 1.3;
}

.user-role {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* PIN Section */
.pin-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.back-btn {
    align-self: flex-start;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: #f8fafc;
}

.pin-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 28px 0;
    text-align: center;
}

/* PIN Dots */
.pin-dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 60px;
}

.pin-placeholder {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 8px;
}

.pin-masked {
    font-size: 2rem;
    color: #3B82F6;
    letter-spacing: 6px;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.pin-count {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.pin-dots.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* PIN Error */
.pin-error {
    color: #f87171;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

/* PIN Pad */
.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 280px;
    margin-top: 20px;
}

.pin-key {
    aspect-ratio: 1;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-key:hover {
    background: rgba(255, 255, 255, 0.12);
}

.pin-key:active,
.pin-key.pressed {
    transform: scale(0.95);
    background: rgba(59, 130, 246, 0.3);
}

/* Quitar outline feo del focus */
#pinSection:focus {
    outline: none;
}

.pin-key-action {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    font-size: 1.2rem;
}

.pin-key-action:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* PIN Submit */
.pin-submit {
    margin-top: 20px;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.5);
}

.pin-submit:active,
.pin-submit.pressed {
    transform: scale(0.98);
}

.pin-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pin-section.success .pin-dots .pin-dot {
    background: #10b981;
    border-color: transparent;
}

/* ============================================
   FORM INPUTS - iOS Glass Style
   ============================================ */

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 16px;
    color: #64748b;
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    color: #f8fafc;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.input-group input::placeholder {
    color: #64748b;
}

.input-group input:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.login-form .input-group input:focus ~ i,
.input-group:focus-within i {
    color: var(--primary);
}

/* General Inputs */
input, select, textarea {
    font-family: inherit;
}

select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

select option {
    background: #1e293b;
    color: #f8fafc;
}

.login-error {
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #EF4444;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.25);
    transform: translateY(-2px);
}

.full-width {
    width: 100%;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CONFIRM MODAL (Custom Dialog)
   ============================================ */

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-modal.show {
    opacity: 1;
}

.confirm-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.confirm-modal-content {
    position: relative;
    background: var(--glass-bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(var(--glass-blur));
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-modal.show .confirm-modal-content {
    transform: scale(1);
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.confirm-modal-header i {
    font-size: 1.5rem;
    color: var(--warning);
}

.confirm-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.confirm-modal-body {
    padding: var(--spacing-lg);
}

.confirm-modal-body p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
    justify-content: flex-end;
}

.confirm-modal-actions button {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.confirm-cancel {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.confirm-cancel:hover {
    background: var(--glass-bg-elevated);
    color: var(--text-primary);
}

.confirm-ok {
    background: var(--danger);
    color: white;
}

.confirm-ok:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .login-container {
        width: 92%;
        padding: 32px 24px;
    }
    
    .logo-icon-large {
        font-size: 3rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   PRODUCTS GRID
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.product-item {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.product-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
}

.product-rank {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 45px;
    text-align: center;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.product-stats {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   TABLES GRID
   ============================================ */

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.table-item {
    padding: 1.25rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.table-item:hover {
    transform: translateY(-2px);
}

.table-item.alert {
    border-left: 3px solid var(--danger);
    background: rgba(248, 113, 113, 0.06);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.table-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.table-time {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.table-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.alert-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 8px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   MESAS EN TIEMPO REAL - iOS Glassmorphism
   ============================================ */

.mesas-live-section {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.mesas-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.mesas-live-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

.live-indicator .pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Stats de mesas */
.mesas-stats {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.mesa-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.mesa-stat i {
    font-size: 1rem;
}

.mesa-stat.pool i { color: #3B82F6; }
.mesa-stat.carambola i { color: #F59E0B; }
.mesa-stat.domino i { color: #22C55E; }
.mesa-stat.ingreso { color: var(--success); font-weight: 600; }

/* Filtros de mesas */
.mesas-filters {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.mesa-filter {
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mesa-filter:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--text-primary);
}

.mesa-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-separator {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
    margin: 0 var(--spacing-xs);
}

.mesa-filter.ocupadas.active {
    background: var(--warning);
    border-color: var(--warning);
    color: #1a1a1a;
}

.mesa-filter.libres.active {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Grid de mesas */
.mesas-live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

@media (max-width: 480px) {
    .mesas-live-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
}

/* Card de mesa individual - iOS Glassmorphism */
.mesa-live-card {
    position: relative;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: var(--transition);
    overflow: hidden;
}

.mesa-live-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--mesa-color, rgba(148, 163, 184, 0.3));
}

.mesa-live-card[data-tipo="Pool"] { --mesa-color: #3B82F6; }
.mesa-live-card[data-tipo="Carambola"] { --mesa-color: #F59E0B; }
.mesa-live-card[data-tipo="Dominó"],
.mesa-live-card[data-tipo="Domino"] { --mesa-color: #22C55E; }

/* Estado: Ocupada */
.mesa-live-card.ocupada {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.mesa-live-card.ocupada::before {
    background: var(--warning);
}

/* Estado: Libre */
.mesa-live-card.libre {
    background: rgba(51, 65, 85, 0.5);
    border-color: rgba(148, 163, 184, 0.15);
    opacity: 0.75;
}

.mesa-live-card:hover {
    transform: translateY(-2px);
    background: rgba(51, 65, 85, 0.9);
}

.mesa-live-card.ocupada:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* Header de mesa */
.mesa-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mesa-live-numero {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mesa-tipo-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mesa-estado-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mesa-estado-badge.ocupada {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.mesa-estado-badge.libre {
    background: rgba(52, 211, 153, 0.2);
    color: var(--success);
}

/* Timer - iOS Glass interno */
.mesa-live-timer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 10px;
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timer-display i {
    font-size: 1.1rem;
    color: var(--warning);
}

.timer-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.timer-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: center;
    margin-top: 4px;
}

/* Costo */
.mesa-live-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.cost-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cost-label i {
    color: var(--success);
}

.cost-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* Info de mesa */
.mesa-live-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--spacing-sm);
}

.mesa-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mesa-info-item i {
    width: 14px;
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Mesa libre - mensaje */
.mesa-libre-message {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--text-muted);
}

.mesa-libre-message i {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    display: block;
    opacity: 0.5;
}

/* Mesa warning (mucho tiempo) */
.mesa-live-card.warning {
    border-color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.15);
}

.mesa-live-card.warning .timer-value {
    color: var(--danger);
}

/* Ocultar timer y costo en mesas libres */
.mesa-live-card.libre .mesa-live-timer,
.mesa-live-card.libre .mesa-live-cost {
    display: none;
}

/* Leyenda */
.mesas-legend {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.libre {
    background: rgba(100, 116, 139, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.8);
}

.legend-color.ocupada {
    background: rgba(245, 158, 11, 0.5);
    border: 1px solid rgba(245, 158, 11, 0.8);
}

.legend-color.warning {
    background: rgba(239, 68, 68, 0.5);
    border: 1px solid rgba(239, 68, 68, 0.8);
}

/* ============================================
   AUDITORÍA - Glassmorphism
   ============================================ */

.audit-filters-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Audit Card - iOS Glassmorphism */
.audit-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    transition: var(--transition);
    position: relative;
}

.audit-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.audit-card.pending {
    border-left: 3px solid var(--warning);
}

.audit-card.resolved {
    border-left: 3px solid var(--success);
    opacity: 0.7;
}

.audit-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
}

.audit-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audit-card-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.audit-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.audit-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.audit-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.audit-card-details span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-card-details i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.audit-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.audit-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-card-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-card-status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.audit-card-status.resolved {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
}

.audit-card-action {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.audit-card-action:hover {
    background: var(--success);
    color: white;
    transform: scale(1.05);
}

/* ============================================
   REPORTES - iOS Glassmorphism
   ============================================ */

.report-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.report-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.report-card i {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.report-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.report-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================
   SETTINGS - iOS Glassmorphism
   ============================================ */

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: var(--transition);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: var(--success);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ============================================
   SETTINGS - Additional Elements
   ============================================ */

.input-number {
    width: 80px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}

.input-number:focus {
    outline: none;
    border-color: var(--primary);
}

.input-unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 8px;
}

.setting-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Meseros List */
.meseros-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mesero-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.mesero-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.mesero-rank {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 34px;
    text-align: center;
}

.mesero-info {
    flex: 1;
}

.mesero-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.mesero-stats {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.mesero-total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--success);
}

/* Suspicious Movements List */
.suspicious-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.suspicious-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0.02));
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.suspicious-item:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.04));
}

.suspicious-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.1));
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.suspicious-content {
    flex: 1;
}

.suspicious-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.suspicious-details {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Loading States */
.loading-mesas {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--text-muted);
}

.loading-mesas i {
    color: var(--primary);
}

.loading-mesas p {
    font-size: 0.9rem;
}

/* Legend Dots */
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.libre {
    background: rgba(100, 116, 139, 0.6);
    border: 2px solid rgba(100, 116, 139, 0.8);
}

.legend-dot.ocupada {
    background: rgba(245, 158, 11, 0.6);
    border: 2px solid rgba(245, 158, 11, 0.8);
}

.legend-dot.warning {
    background: rgba(239, 68, 68, 0.6);
    border: 2px solid rgba(239, 68, 68, 0.8);
}

/* Pulse Live Animation */
.pulse-live {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* Mesas Filter Section */
.mesas-filter-section {
    margin-bottom: 20px;
    padding: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .products-grid,
    .tables-grid {
        grid-template-columns: 1fr;
    }
    
    .mesas-live-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mesas-stats {
        width: 100%;
    }
    
    .audit-card {
        flex-direction: column;
    }
    
    .audit-card-action {
        position: static;
        align-self: flex-end;
    }
    
    .setting-actions {
        flex-direction: column;
    }
    
    .setting-item {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ============================================
   REPORTES & AUDITORÍA - SECCIONES DINÁMICAS
   ============================================ */

/* Section Header Main - Para secciones creadas dinámicamente */
.section-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
}

.section-header-main h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-header-main h1 i {
    color: var(--primary);
}

.section-header-main .section-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Audit Log List */
.audit-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.audit-log-list::-webkit-scrollbar {
    width: 6px;
}

.audit-log-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.audit-log-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Audit User Summary */
.audit-user-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.audit-user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.audit-user-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.audit-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.audit-user-info {
    flex: 1;
}

.audit-user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.audit-user-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stat-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-badge.total {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.stat-badge.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.stat-badge.info {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.stat-badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.stat-badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Tiempo Mesas Grid */
.tiempo-mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.tiempo-mesa-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tiempo-mesa-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mesa-tipo-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mesa-tipo-info {
    flex: 1;
}

.mesa-tipo-nombre {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.mesa-tipo-stats {
    display: flex;
    gap: 18px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.mesa-tipo-stats span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.mesa-tipo-stats i {
    opacity: 0.75;
    font-size: 0.78rem;
}

/* Comparativo Grid */
.comparativo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.comparativo-item {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comparativo-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.comparativo-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(79, 70, 229, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.comparativo-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.comparativo-valores {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
}

.comparativo-actual,
.comparativo-anterior {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comparativo-actual .label,
.comparativo-anterior .label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.comparativo-actual .value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
}

.comparativo-anterior .value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.comparativo-cambio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
}

.comparativo-cambio.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.comparativo-cambio.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

/* Category Legend */
.category-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.category-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.category-legend-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.category-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mesero Rank Highlight */
.mesero-rank.rank-1 {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.mesero-rank.rank-2 {
    color: #e2e8f0;
}

.mesero-rank.rank-3 {
    color: #cd7f32;
}

.mesero-percent {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 55px;
    text-align: right;
}

/* Configuration Section Styles */
.config-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 0;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.config-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(3px);
}

.config-item span {
    color: var(--text-primary);
    font-weight: 600;
}

.config-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--primary);
    cursor: pointer;
}
.config-item input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}

.config-item input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .section-header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .section-header-main .section-controls {
        width: 100%;
    }
    
    .tiempo-mesas-grid,
    .comparativo-grid,
    .audit-user-summary {
        grid-template-columns: 1fr;
    }
    
    .comparativo-valores {
        flex-direction: column;
        gap: 12px;
    }
    
    .audit-user-stats {
        gap: 4px;
    }
    
    .stat-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
}

/* Loading Spinner mejorado */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: var(--primary);
}

.loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Investigation Panel Styles */
.order-item,
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
}

.order-item.cancelled {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
}

.order-name,
.payment-method {
    font-weight: 500;
}

.order-price,
.payment-amount {
    color: #10b981;
    font-weight: 600;
}

.order-status {
    color: #ef4444;
    font-size: 0.85rem;
}

.no-data {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ============================================
   MOVEMENTS LIST STYLES
   ============================================ */

.movements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px;
}

.movement-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.movement-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.movement-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    min-width: 45px;
    font-weight: 500;
}

.movement-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.movement-info {
    flex: 1;
    min-width: 0;
}

.movement-description {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movement-meta {
    display: flex;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.movement-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.movement-meta i {
    font-size: 0.68rem;
    opacity: 0.75;
}

.movement-amount {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.movement-amount.positive {
    color: var(--success);
}

.movement-amount.negative {
    color: var(--danger);
}
/* ============================================
   TICKET MODAL
   ============================================ */
.ticket-modal {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ticket-info-item {
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.ticket-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ticket-info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.ticket-section {
    margin-bottom: 24px;
}

.ticket-section h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-order-item, .ticket-payment-item {
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-order-info {
    flex: 1;
}

.ticket-order-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.ticket-order-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.ticket-order-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
}

.ticket-payment-name {
    font-weight: 600;
    color: var(--text);
}

.ticket-payment-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.ticket-total {
    padding: 16px;
    background: var(--glass-bg-heavy);
    border: 2px solid var(--primary);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.ticket-total-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.ticket-total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.activity-item-new {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-item-new:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.actividad-item {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.actividad-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal Overlay for Ticket Details */
#ticketModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.25s ease;
}

#ticketModal.show {
    display: flex !important;
}

#ticketModal .modal-content {
    position: relative;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    background: rgba(25, 28, 40, 0.97);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#ticketModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#ticketModal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

#ticketModal .modal-body {
    padding: 24px 28px;
    color: var(--text);
}

#ticketModal .modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

/* Stat card clickable */
.stat-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card.clickable:active {
    transform: translateY(0);
}

/* Gastos Modal Styles */
#gastosModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#gastosModal.show {
    display: flex !important;
}

.gastos-summary {
    margin-bottom: 20px;
}

.gastos-total-box {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.15), rgba(239, 68, 68, 0.08));
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.gastos-total-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gastos-total-amount {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #f87171;
    margin-bottom: 4px;
}

.gastos-total-count {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gastos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gasto-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.gasto-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.gasto-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gasto-icon i {
    color: #f87171;
    font-size: 1rem;
}

.gasto-info {
    flex: 1;
    min-width: 0;
}

.gasto-descripcion {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gasto-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gasto-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gasto-monto {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f87171;
    flex-shrink: 0;
}

.gasto-categoria {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Gastos Chart Section */
.gastos-chart-section {
    margin: 20px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.gastos-chart-section h4,
.gastos-list-section h4 {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gastos-chart-section h4 i,
.gastos-list-section h4 i {
    color: var(--primary);
}

.gastos-chart-container {
    height: 180px;
    margin-bottom: 16px;
}

.gastos-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.gastos-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.gastos-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.gastos-legend-label {
    color: var(--text);
    font-weight: 500;
}

.gastos-legend-value {
    color: var(--text-muted);
}

.gastos-list-section {
    margin-top: 20px;
}

.gastos-list-section .gastos-list {
    max-height: 300px;
    overflow-y: auto;
}
