/* css/style.css - SunnyGO Premium Styling */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-hue: 215;
    --primary: hsl(var(--primary-hue), 60%, 16%);
    --primary-light: hsl(var(--primary-hue), 45%, 25%);
    --primary-ultra-light: hsl(var(--primary-hue), 50%, 95%);
    
    --accent-gold: hsl(38, 92%, 57%);
    --accent-orange: hsl(14, 90%, 55%);
    --accent-pink: hsl(340, 85%, 60%);
    --accent-cyan: hsl(185, 80%, 45%);
    
    --bg-light: hsl(220, 25%, 96%);
    --bg-white: #ffffff;
    
    --text-dark: hsl(215, 60%, 12%);
    --text-medium: hsl(215, 20%, 35%);
    --text-muted: hsl(215, 15%, 55%);
    --text-light: #ffffff;
    
    --success: hsl(150, 60%, 40%);
    --success-light: hsl(150, 60%, 94%);
    --warning: hsl(38, 92%, 50%);
    --warning-light: hsl(38, 92%, 94%);
    --error: hsl(0, 80%, 50%);
    --error-light: hsl(0, 80%, 94%);
    
    /* Card Styles & Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 8px 32px 0 rgba(11, 40, 96, 0.08);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    
    /* Typography & Transitions */
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Montserrat', sans-serif;
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ====================================================================
   SCROLLBAR STYLES
   ==================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(11, 40, 96, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(11, 40, 96, 0.3);
}

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

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-error { background-color: var(--error-light); color: var(--error); }
.badge-info { background-color: var(--primary-ultra-light); color: var(--primary); }

/* ====================================================================
   LOGIN STRUCTURE
   ==================================================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background-image: linear-gradient(135deg, hsl(215, 60%, 12%) 0%, hsl(215, 45%, 25%) 100%);
    overflow: hidden;
}

.login-bg-decor {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 184, 46, 0.35) 0%, rgba(245, 184, 46, 0) 70%);
    top: calc(50% - 300px);
    right: calc(50% - 350px);
    pointer-events: none;
    z-index: 1;
}

.login-bg-decor-2 {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(14, 116, 144, 0.3) 0%, rgba(14, 116, 144, 0) 70%);
    bottom: calc(50% - 280px);
    left: calc(50% - 320px);
    pointer-events: none;
    z-index: 1;
}

.login-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transform: translateY(0);
    transition: transform var(--transition-normal);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 200px;
    height: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(11, 40, 96, 0.08);
    border-radius: var(--border-radius-md);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    outline: none;
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary-light);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(11, 40, 96, 0.08);
}

.form-input:focus + .input-icon {
    color: var(--primary-light);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--border-radius-md);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 40, 96, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-accent:hover {
    background-color: hsl(38, 92%, 52%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 184, 46, 0.3);
}

.btn-secondary {
    background-color: rgba(11, 40, 96, 0.06);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(11, 40, 96, 0.1);
}

.btn-danger {
    background-color: var(--error);
    color: var(--text-light);
}

.btn-danger:hover {
    background-color: hsl(0, 80%, 45%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ====================================================================
   APP SHELL LAYOUT
   ==================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styling */
.app-sidebar {
    width: 280px;
    background-image: linear-gradient(180deg, var(--primary) 0%, hsl(215, 60%, 10%) 100%);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(11, 40, 96, 0.15);
}

.sidebar-header {
    padding: 30px 24px;
    border-b: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-logo {
    width: 130px;
    height: auto;
    margin-bottom: 12px;
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-light);
}

.sidebar-title span {
    color: var(--accent-gold);
}

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

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.72rem;
    color: var(--accent-gold);
    font-weight: 600;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--primary);
    background-color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(245, 184, 46, 0.2);
}

.sidebar-footer {
    padding: 20px;
    border-t: 1px solid rgba(255, 255, 255, 0.08);
}

/* Main Content Area */
.app-main {
    flex-grow: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Navbar */
.app-header {
    height: 70px;
    background-color: var(--bg-white);
    border-bottom: 1px solid rgba(11, 40, 96, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.header-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.db-status-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.db-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.db-local {
    background-color: rgba(245, 184, 46, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 184, 46, 0.2);
}

.db-supabase {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.db-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.logout-btn-header {
    background: none;
    border: none;
    color: var(--error);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color var(--transition-fast);
}

.logout-btn-header:hover {
    background-color: var(--error-light);
}

/* Page Containers */
.app-content {
    flex-grow: 1;
    padding: 32px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.content-panel {
    animation: fade-in var(--transition-normal);
}

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

/* ====================================================================
   DASHBOARD PANEL (PANEL DE CONTROL)
   ==================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(11, 40, 96, 0.08);
}

.stat-details h3 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-blue { background-color: rgba(0, 86, 179, 0.08); color: var(--primary); }
.stat-gold { background-color: rgba(245, 184, 46, 0.08); color: var(--warning); }
.stat-green { background-color: rgba(16, 185, 129, 0.08); color: var(--success); }
.stat-orange { background-color: rgba(229, 87, 36, 0.08); color: var(--accent-orange); }

.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

@media (max-width: 1024px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Real-time Sales Table */
.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 14px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid var(--bg-light);
}

.custom-table td {
    padding: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    border-bottom: 1px solid var(--bg-light);
}

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

.custom-table tbody tr {
    transition: background-color var(--transition-fast);
}

.custom-table tbody tr:hover {
    background-color: var(--primary-ultra-light);
}

.table-event-name {
    font-weight: 700;
    color: var(--primary);
}

.table-cashier {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Event Selector Active Widget */
.event-widget {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 24px rgba(11, 40, 96, 0.12);
    position: relative;
    overflow: hidden;
}

.event-widget-bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    color: rgba(255,255,255,0.05);
    transform: rotate(-15deg);
    pointer-events: none;
}

.widget-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold);
    margin-bottom: 6px;
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 14px;
    line-height: 1.25;
}

.widget-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.85);
}

.widget-detail-row i {
    width: 16px;
    color: var(--accent-gold);
}

.widget-progress-container {
    margin-top: 20px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.progress-bar-bg {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-gold);
    border-radius: 10px;
    width: 0%;
    transition: width var(--transition-slow);
}

/* ====================================================================
   FORM AND POS INTERFACES (CREAR EVENTO Y PUNTO DE VENTA)
   ==================================================================== */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-light);
    border: 2px solid rgba(11, 40, 96, 0.05);
    border-radius: var(--border-radius-md);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    resize: vertical;
    transition: all var(--transition-fast);
}

.form-textarea:focus {
    border-color: var(--primary-light);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(11, 40, 96, 0.08);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-light);
    border: 2px solid rgba(11, 40, 96, 0.05);
    border-radius: var(--border-radius-md);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='hsl(215, 60%, 16%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.form-select:focus {
    border-color: var(--primary-light);
    background-color: var(--bg-white);
}

/* POS checkout wrapper card */
.pos-ticket-card {
    background-image: radial-gradient(circle at 100% 50%, transparent 12px, var(--bg-white) 13px), radial-gradient(circle at 0% 50%, transparent 12px, var(--bg-white) 13px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    padding: 30px;
    position: relative;
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
}

.pos-ticket-card::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 84px;
    border-bottom: 2px dashed var(--bg-light);
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--bg-light);
    margin-bottom: 40px;
}

.pos-total-label {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--primary);
}

.pos-total-val {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--success);
}

/* ====================================================================
   QR VALIDATOR PANEL (ESCANEAR & MOCK VALIDATOR)
   ==================================================================== */
.scanner-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

@media (max-width: 1024px) {
    .scanner-grid {
        grid-template-columns: 1fr;
    }
}

.scanner-view-port {
    background-color: #000000;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), var(--card-shadow);
    border: 4px solid var(--primary);
}

.scanner-camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    border: 60px solid rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-laser {
    position: absolute;
    left: 60px;
    right: 60px;
    height: 4px;
    background-color: var(--accent-orange);
    box-shadow: 0 0 12px var(--accent-orange);
    animation: scan-laser 2s linear infinite;
    z-index: 5;
}

@keyframes scan-laser {
    0% { top: 60px; }
    50% { top: calc(100% - 60px); }
    100% { top: 60px; }
}

.scanner-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 4px solid var(--accent-gold);
    pointer-events: none;
}

.sc-tl { top: calc(60px - 4px); left: calc(60px - 4px); border-right: none; border-bottom: none; }
.sc-tr { top: calc(60px - 4px); right: calc(60px - 4px); border-left: none; border-bottom: none; }
.sc-bl { bottom: calc(60px - 4px); left: calc(60px - 4px); border-right: none; border-top: none; }
.sc-br { bottom: calc(60px - 4px); right: calc(60px - 4px); border-left: none; border-top: none; }

.scanner-control-bar {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.validation-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--bg-light);
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
    box-shadow: var(--card-shadow);
}

.validation-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    color: var(--text-muted);
    text-align: center;
}

.validation-empty-state i {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.ticket-detail-panel {
    animation: fade-in var(--transition-normal);
}

.ticket-header-row {
    border-bottom: 2px dashed var(--bg-light);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.ticket-detail-id {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.ticket-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.meta-item {
    font-size: 0.8rem;
}

.meta-label {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.meta-val {
    font-weight: 600;
    color: var(--text-dark);
}

.wristband-redemption-box {
    background-color: var(--primary-ultra-light);
    border: 1px solid rgba(11, 40, 96, 0.08);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-top: auto;
}

.wristband-meter-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.wristband-redemption-inputs {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.number-stepper {
    display: flex;
    align-items: center;
    border: 2px solid rgba(11, 40, 96, 0.1);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-white);
    overflow: hidden;
}

.stepper-btn {
    border: none;
    background: none;
    width: 38px;
    height: 38px;
    font-weight: 700;
    cursor: pointer;
    color: var(--primary);
    transition: background-color var(--transition-fast);
}

.stepper-btn:hover {
    background-color: var(--primary-ultra-light);
}

.stepper-val {
    width: 44px;
    text-align: center;
    font-weight: 700;
    font-family: var(--font-display);
    border: none;
    outline: none;
}

/* ====================================================================
   EMAIL INBOX SIMULATOR (PANEL SIMULADOR)
   ==================================================================== */
.inbox-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    min-height: 600px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .inbox-layout {
        grid-template-columns: 1fr;
    }
}

.inbox-list-pane {
    border-right: 1px solid var(--bg-light);
    display: flex;
    flex-direction: column;
}

.inbox-pane-header {
    padding: 20px;
    border-bottom: 1px solid var(--bg-light);
    background-color: var(--primary-ultra-light);
}

.inbox-pane-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.inbox-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.inbox-item {
    padding: 16px 32px 16px 20px;
    border-bottom: 1px solid var(--bg-light);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    position: relative;
}

.inbox-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--accent-orange);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.inbox-item:hover {
    background-color: rgba(11, 40, 96, 0.05) !important;
}

.inbox-item.active {
    background-color: var(--primary-ultra-light) !important;
}

.inbox-item.active::before {
    opacity: 1;
}

/* Unread mail styles */
.inbox-item.unread {
    background-color: var(--bg-white);
}

.inbox-item.unread .inbox-sender {
    font-weight: 700;
    color: var(--text-dark);
}

.inbox-item.unread .inbox-subject {
    font-weight: 700;
    color: var(--primary);
}

/* Cyan/Blue unread dot indicator */
.inbox-item.unread::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

/* Read mail styles */
.inbox-item.read {
    background-color: rgba(11, 40, 96, 0.02);
}

.inbox-item.read .inbox-sender {
    font-weight: 500;
    color: var(--text-medium);
}

.inbox-item.read .inbox-subject {
    font-weight: 400;
    color: var(--text-medium);
}

.inbox-item.read .inbox-summary {
    color: var(--text-muted);
}

.inbox-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.inbox-sender {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
}

.inbox-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.inbox-subject {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-summary {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.inbox-empty-state i {
    font-size: 2.5rem;
    opacity: 0.3;
    margin-bottom: 12px;
}

/* Mail Preview Pane */
.mail-view-pane {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-light);
    padding: 24px;
    overflow-y: auto;
}

.mail-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mail-header {
    border-bottom: 1px solid var(--bg-light);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.mail-subject-display {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.mail-info-row {
    font-size: 0.82rem;
    color: var(--text-medium);
    margin-bottom: 4px;
}

.mail-info-row span {
    font-weight: 700;
}

.mail-body-content {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.6;
    flex-grow: 1;
}

/* Simulated ticket template inside email */
.ticket-template {
    border: 2px solid var(--primary-ultra-light);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin: 20px 0;
    background-image: linear-gradient(135deg, #ffffff 0%, var(--primary-ultra-light) 100%);
    position: relative;
    overflow: hidden;
}

.ticket-template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(11, 40, 96, 0.08);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.ticket-template-logo {
    width: 100px;
    height: auto;
}

.ticket-template-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
}

.ticket-template-grid {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 20px;
}

@media (max-width: 480px) {
    .ticket-template-grid {
        grid-template-columns: 1fr;
    }
}

.ticket-template-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ticket-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ticket-qr-img-placeholder {
    width: 100px;
    height: 100px;
    background-color: white;
    border: 1px solid rgba(11, 40, 96, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.ticket-qr-code-text {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 6px;
    font-family: monospace;
}

.mail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    border-top: 1px solid var(--bg-light);
    padding-top: 20px;
}

/* ====================================================================
   DASHBOARD WIDGET ANIMATIONS
   ==================================================================== */
.animated-number {
    animation: number-pop 0.5s ease-out;
}

@keyframes number-pop {
    0% { transform: scale(0.9); opacity: 0; }
    80% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ====================================================================
   CUSTOM COLOR PICKER SYSTEM
   ==================================================================== */
.color-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
}

.color-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #fff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    outline: none;
}

.color-dot:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.color-dot.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px var(--primary);
}

