/* =====================================================================
   EventoSID - Ultra-Premium Design System & Stylesheet
   Modern, Sleek, Glassmorphism, Micro-Animations & Responsive
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-surface: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.25);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Sidebar & Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 270px;
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 12px;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 12px 14px 6px;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 3px;
}

.sidebar-item a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.sidebar-item.active a {
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f8fafc;
}

.admin-topbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-content {
    padding: 32px;
    flex-grow: 1;
}

/* Modern Cards */
.card-modern {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    overflow: hidden;
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-stat {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
    color: var(--dark);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Tables */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern th {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.table-modern td {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    vertical-align: middle;
}

.table-modern tr:hover td {
    background: #f8fafc;
}

/* Badges */
.badge-status {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-primary { background: #e0e7ff; color: #4338ca; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white !important;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, #4338ca, #4f46e5);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        left: -270px;
    }
    .admin-sidebar.show {
        left: 0;
    }
    .admin-topbar {
        padding: 0 16px;
    }
    .admin-content {
        padding: 16px;
    }
}

/* Animaciones y Efecto Flash para Escáner QR */
.scanner-viewport-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    transition: opacity 0.15s ease-out;
}

.scanner-viewport-flash.flash-reading {
    background-color: rgba(255, 255, 255, 0.85);
    animation: flashReadingAnim 0.3s ease-out;
}

.scanner-viewport-flash.flash-green {
    background-color: rgba(16, 185, 129, 0.55);
    animation: flashResultAnim 0.45s ease-out;
}

.scanner-viewport-flash.flash-yellow {
    background-color: rgba(245, 158, 11, 0.55);
    animation: flashResultAnim 0.45s ease-out;
}

.scanner-viewport-flash.flash-red {
    background-color: rgba(239, 68, 68, 0.55);
    animation: flashResultAnim 0.45s ease-out;
}

@keyframes flashReadingAnim {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes flashResultAnim {
    0% { opacity: 0.9; }
    50% { opacity: 0.6; }
    100% { opacity: 0; }
}

.scanner-target-box {
    transition: all 0.25s ease;
}

.scanner-target-box.pulse-reading {
    border-color: #ffffff !important;
    transform: translate(-50%, -50%) scale(1.06) !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.9), 0 0 0 9999px rgba(0, 0, 0, 0.5) !important;
}

.scanner-target-box.pulse-green {
    border-color: #10b981 !important;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.8), 0 0 0 9999px rgba(0, 0, 0, 0.45) !important;
}

.scanner-target-box.pulse-yellow {
    border-color: #f59e0b !important;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.8), 0 0 0 9999px rgba(0, 0, 0, 0.45) !important;
}

.scanner-target-box.pulse-red {
    border-color: #ef4444 !important;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.8), 0 0 0 9999px rgba(0, 0, 0, 0.45) !important;
}

