/* ==========================================
   PREMIUM SaaS DESIGN SYSTEM (UI/UX PRO MAX)
   Theme: Deep Tech Slate & Luminous Glow
   Fonts: Cairo (Arabic) & Inter (English)
   ========================================== */

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

:root {
    /* Curated Harmonious Light Theme (Sky Blue & Emerald Green) */
    --bg-base: #f1f5f9;          /* Slate 100 */
    --bg-card: #ffffff;          /* White */
    --bg-card-hover: #f8fafc;
    --border-glass: #e2e8f0;     /* Slate 200 */
    --border-glass-hover: #cbd5e1; /* Slate 300 */
    
    /* Brand Accents (Light Blue & Light Green) */
    --primary: #0284c7;          /* Sky 600 (Light Blue) */
    --primary-hover: #0369a1;    /* Sky 700 */
    --primary-glow: rgba(2, 132, 199, 0.15);
    --primary-light: rgba(2, 132, 199, 0.08);
    
    --accent: #10b981;           /* Emerald 500 (Light Green) */
    --accent-hover: #059669;     /* Emerald 600 */
    --accent-glow: rgba(16, 185, 129, 0.15);
    --accent-light: rgba(16, 185, 129, 0.08);
    
    --text-main: #334155;        /* Slate 700 (Dark Slate for body) */
    --text-muted: #64748b;       /* Slate 500 */
    --text-dark: #0f172a;        /* Slate 900 (Bold headings) */
    
    /* Semantic Status */
    --success: #10b981;          /* Emerald 500 */
    --success-glow: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;          /* Amber 500 */
    --danger: #ef4444;           /* Red 500 */
    
    /* Typography & Animations */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 20px;
    --radius-md: 10px;
    
    /* Premium Soft Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 15px 30px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.1);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-ar);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Custom Slim Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Ambient Glowing Orbs Background (Aurora UI) */
.glow-orb-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    animation: orbFloat 25s infinite alternate ease-in-out;
}

.orb-primary {
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    width: 600px;
    height: 600px;
    top: -200px;
    left: -100px;
}

.orb-accent {
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    width: 500px;
    height: 500px;
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.orb-success {
    background: radial-gradient(circle, var(--success) 0%, transparent 70%);
    width: 400px;
    height: 400px;
    top: 35%;
    left: 45%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4%, 8%) scale(1.1); }
    100% { transform: translate(-4%, -4%) scale(0.9); }
}

/* Layout App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Elegant Navbar Glassmorphism */
.main-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.brand-logo:hover {
    opacity: 0.95;
}

.logo-icon-svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

.logo-text {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.nav-link.active {
    color: var(--primary) !important;
    background-color: var(--primary-light) !important;
    border: 1px solid var(--primary-glow) !important;
}

.nav-link.admin-badge.active {
    color: var(--accent) !important;
    background-color: var(--accent-light) !important;
    border: 1px solid var(--accent-glow) !important;
}

/* Header buttons */
.nav-link.login-btn {
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent);
    background-color: var(--accent-light);
}

.nav-link.login-btn:hover {
    background-color: var(--accent);
    color: var(--text-dark);
}

.nav-link.register-btn {
    border: 1px solid var(--primary-glow);
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-link.register-btn:hover {
    background-color: var(--primary);
    color: #fff;
}


/* Main Content Wrapper */
.main-content {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeIn 0.3s ease-out;
}

/* Footer Section */
.main-footer {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid var(--border-glass);
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Alerts System */
.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.close-alert {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

/* Auth Cards styling (Login/Register Forms) */
.auth-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 180px);
    padding: 20px 0;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.auth-card:hover {
    border-color: var(--border-glass-hover);
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Form Groups & Controls */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 0 15px rgba(99, 102, 241, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    background-color: rgba(15, 23, 42, 0.85);
}

.form-control::placeholder {
    color: #64748b; /* Slate 500 - much better contrast */
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--primary-glow);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px var(--success-glow);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--success-glow);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background-color: #e11d48;
}

.btn-outline-primary {
    background: none;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

.btn-outline-secondary {
    background: none;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-google {
    background-color: #fff;
    color: var(--text-dark);
}

.btn-google:hover {
    background-color: #f3f4f6;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.08);
}

.auth-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* User Dashboard Layout & Glassmorphism */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 769px) {
    .dashboard-wrapper {
        display: grid;
        grid-template-columns: 1.4fr 1fr;
        gap: 28px;
        align-items: start;
    }
    .welcome-card {
        grid-column: 1 / span 2;
    }
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 24px !important;
    padding: 28px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.01) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.2) !important;
}

.welcome-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar-initials {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.welcome-text h2 {
    font-size: 1.65rem;
    font-weight: 850;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.user-email {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Secret Code Premium Widget */
.secret-code-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-radius: 20px !important;
    padding: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15) !important;
    width: 100%;
    max-width: 340px;
    position: relative;
}

.code-label {
    display: block;
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.code-box-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.code-box {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--accent) !important;
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
    font-family: var(--font-en);
    font-size: 1.8rem !important;
    letter-spacing: 4px !important;
    font-weight: 800 !important;
    padding: 10px !important;
    border-radius: 12px !important;
    text-align: center;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding: 12px !important;
    border-radius: 12px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2) !important;
}

.code-warning {
    font-size: 0.775rem !important;
    color: rgba(245, 158, 11, 0.85) !important;
    margin-top: 8px;
    line-height: 1.4;
}

/* Active Event card layout */
.active-event-box {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.03) 0%, rgba(16, 185, 129, 0.03) 100%) !important;
    border-right: 4px solid var(--primary) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    margin-top: 15px;
    border: 1px solid rgba(2, 132, 199, 0.1);
}

.active-event-box h4 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.event-time-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.attendance-actions {
    margin-top: 18px;
}

.btn-scan {
    width: 100%;
    max-width: 280px;
    margin-top: 12px;
}

.status-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.status-in {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-out {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(2, 132, 199, 0.15);
}

.attendance-summary {
    background-color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding: 16px !important;
    border-radius: 12px !important;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
}

.attendance-summary p {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-main);
}

.eligibility-badge {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    font-size: 0.9rem;
}

.eligible {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.not-eligible {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.certificate-download-box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-glass);
    text-align: center;
}

/* Certificate Cards List */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.cert-item-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cert-item-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

.cert-icon-svg {
    width: 36px;
    height: 36px;
    color: var(--accent);
    filter: drop-shadow(0 4px 8px var(--accent-glow));
}

.cert-info h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.cert-date {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.cert-code {
    font-size: 0.8rem;
    margin-top: 6px;
    color: var(--text-main);
}

.cert-code code {
    font-family: var(--font-en);
    background-color: #0f172a !important;
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--accent) !important;
    font-weight: 700;
}

.cert-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.cert-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 9px 12px;
    font-weight: 700;
    border-radius: 10px;
}

/* Premium Empty State & No Event Styling */
.no-event-box, .empty-state {
    background-color: rgba(248, 250, 252, 0.6) !important;
    border: 1px dashed rgba(2, 132, 199, 0.2) !important;
    border-radius: 16px !important;
    padding: 45px 20px !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
}

.no-event-box:hover, .empty-state:hover {
    border-color: var(--primary) !important;
    background-color: rgba(248, 250, 252, 0.9) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.02);
}

.no-event-box p, .empty-state p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.65;
    margin-bottom: 4px;
}

/* Custom Toast Notification styling */
.custom-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Data Tables inside Admin portal */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin-top: 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.9rem;
}

.table th, .table td {
    padding: 12px 14px;
}

.table th {
    background-color: rgba(3, 7, 18, 0.8);
    color: var(--text-main);
    font-weight: 700;
    border-bottom: 1px solid var(--border-glass);
}

.table td {
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Public Verification Portal Card */
.verify-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 180px);
    padding: 20px 0;
}

.verification-card {
    background-color: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.verification-header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
}

.verification-header.success {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.verification-header.error {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
}

.verification-header-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
}

.verification-header.success .verification-header-icon {
    color: var(--success);
    filter: drop-shadow(0 0 8px var(--success-glow));
}

.verification-header.error .verification-header-icon {
    color: var(--danger);
}

.verification-badge {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.verification-badge.success {
    color: var(--success);
}

.verification-badge.error {
    color: var(--danger);
}

.verification-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.verification-body {
    padding: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
}

.name-highlight {
    font-size: 1.1rem;
    color: #a5b4fc; /* Light indigo */
}

.event-highlight {
    color: #fde047; /* Bright gold */
}

.code-highlight code {
    background-color: #030712;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent);
    font-family: var(--font-en);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.verification-footer {
    padding: 20px 24px;
    text-align: center;
    border-top: 1px dashed var(--border-glass);
}

.site-ref {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.site-ref a {
    color: #818cf8;
    font-weight: bold;
    text-decoration: none;
}

/* Admin Dashboard Elements */
.admin-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    margin-top: 15px;
}

.admin-sidebar {
    background-color: rgba(3, 7, 18, 0.7);
    border-radius: var(--radius-lg);
    padding: 15px 8px;
    height: fit-content;
    border: 1px solid var(--border-glass);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    text-align: right;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    background-color: var(--primary);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.admin-main-content {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-glass);
    min-height: 500px;
}

/* QR Code Display cards in admin panel */
.qr-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.qr-card {
    border: 1.5px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    background-color: rgba(3, 7, 18, 0.3);
}

.qr-card h6 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.qr-image-placeholder {
    background-color: #fff;
    padding: 10px;
    border-radius: var(--radius-md);
    display: inline-block;
    margin: 8px 0;
}

.qr-image-placeholder img {
    display: block;
}

/* Animations declarations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Live Camera QR scan layout */
.scan-laser {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.scan-target {
    border-color: var(--success);
    box-shadow: 0 0 0 1000px rgba(3, 7, 18, 0.75);
}

/* Settings Forms tabs elements */
.settings-section-card {
    background-color: rgba(3, 7, 18, 0.5) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
}

.settings-section-card h4 {
    margin-bottom: 15px;
    color: var(--accent);
    font-weight: 800;
    font-size: 1.05rem;
}

/* Modal form popup */
.verify-modal {
    background-color: rgba(3, 7, 18, 0.85);
}

.verify-content {
    background-color: #111827; /* Gray 900 */
    border: 1px solid var(--border-glass-hover);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Grid Layout definitions */
.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ==========================================
   MOBILE RESPONSIVENESS OVERRIDES
   ========================================== */
@media (max-width: 768px) {
    .main-content {
        padding: 15px 12px;
    }
    
    .welcome-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 20px 15px;
    }
    .welcome-header {
        flex-direction: column;
        gap: 12px;
    }
    .secret-code-section {
        max-width: 100%;
        width: 100%;
    }
    
    .admin-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .admin-sidebar {
        padding: 8px;
    }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 6px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
    }
    .tab-btn {
        flex: 0 0 auto;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    .admin-main-content {
        padding: 15px 12px;
    }
}

@media (max-width: 600px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    .logo-text {
        font-size: 1.05rem;
    }
    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    .nav-link {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 580px) {
    .grid-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .qr-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .qr-card img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .btn-scan {
        max-width: 100%;
    }
    .verification-card {
        border-radius: var(--radius-md);
    }
    .verification-header {
        padding: 20px 10px;
    }
    .verification-body {
        padding: 15px 10px;
    }
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .info-value {
        font-size: 0.95rem;
        text-align: right;
    }
    .auth-card {
        padding: 20px 15px;
    }
    .auth-header h2 {
        font-size: 1.35rem;
    }
}

/* Split Authentication Layout (Similar to reference image) */
.auth-split-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px);
    padding: 40px 20px;
}

.auth-split-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 960px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.05), 0 5px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
}

.auth-panel-left {
    flex: 1.1;
    background-color: #a3c9be; /* Sage green matching the illustration background */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #1e293b;
    position: relative;
}

/* Premium Dynamic Slider */
.auth-slider-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.auth-slide.active {
    display: flex;
    opacity: 1;
}

.auth-illustration {
    width: 100%;
    max-width: 320px;
    margin-bottom: 25px;
    border-radius: 12px;
}

.auth-illustration img {
    width: 100%;
    height: auto;
    display: block;
}

.auth-left-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.auth-left-content p {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

.auth-pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    justify-content: center;
    z-index: 15;
}

.auth-pagination .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.15);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-pagination .dot.active {
    background-color: #0f172a;
    width: 16px;
    border-radius: 4px;
}

.auth-panel-right {
    flex: 0.9;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
}

/* Underline inputs for split login form to match reference */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    font-size: 0.825rem;
    color: #64748b; /* Slate 500 */
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.auth-form .form-control {
    border: none !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    border-radius: 0 !important;
    padding: 10px 0 !important;
    background-color: transparent !important;
    color: #0f172a !important;
    box-shadow: none !important;
    font-size: 0.95rem;
    transition: border-color 0.2s ease-in-out;
}

.auth-form .form-control:focus {
    border-color: var(--primary) !important;
    background-color: transparent !important;
}

.auth-form .form-control::placeholder {
    color: #cbd5e1;
}

/* Custom Dividers */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 22px 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider:not(:empty)::before {
    margin-left: 10px;
}

.auth-divider:not(:empty)::after {
    margin-right: 10px;
}

/* Pill buttons for split login panel */
.auth-panel-right .btn-primary {
    background: #475569; /* Slate 600 matching reference button */
    color: #ffffff;
    border-radius: 50px;
    padding: 12px 30px;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(71, 85, 105, 0.15);
    transition: var(--transition);
}

.auth-panel-right .btn-primary:hover {
    background: #334155; /* Slate 700 */
    box-shadow: 0 6px 15px rgba(71, 85, 105, 0.25);
    transform: translateY(-1px);
}

.auth-panel-right .btn-google {
    background-color: #ffffff;
    color: #334155;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    padding: 12px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.auth-panel-right .btn-google:hover {
    background-color: #f8fafc;
}
    .auth-panel-right .btn-google:hover {
        background-color: #f8fafc;
        border-color: #cbd5e1;
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    }

/* Mobile Responsiveness for Split Layout */
@media (max-width: 768px) {
    /* Hide header and footer in mobile auth pages for a clean full-screen look */
    body:has(.auth-split-container) .main-header,
    body:has(.auth-split-container) .main-footer {
        display: none !important;
    }
    
    body:has(.auth-split-container) {
        background-color: var(--bg-base) !important;
        overflow-y: auto;
    }
    
    body:has(.auth-split-container) .main-content {
        padding: 24px 12px !important; /* Elegant padding */
        margin: 0 auto !important;
        max-width: 470px !important; /* Slightly wider for a grander, bigger feel */
        width: 100% !important;
        min-height: calc(100vh - 40px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important; /* Re-center vertically */
        align-items: center !important;
    }
    
    body:has(.auth-split-container) .auth-split-container {
        padding: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    body:has(.auth-split-container) .auth-split-card {
        width: 100% !important;
        height: auto !important; /* Fit content height snugly */
        border-radius: 28px !important; /* Large smooth corners */
        border: 1px solid rgba(226, 232, 240, 0.8) !important;
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08), 0 8px 20px -6px rgba(0, 0, 0, 0.02) !important;
        margin: -35px 0 0 0 !important; /* Pulled slightly upwards to visually balance the dynamic mobile URL bar */
        display: flex !important;
        flex-direction: column !important;
        background-color: #a3c9be !important;
        overflow: hidden !important;
    }
    
    /* Top Panel with Image Banner & Text */
    body:has(.auth-split-container) .auth-panel-left {
        flex: none !important;
        width: 100% !important;
        height: auto !important; /* Dynamic height */
        padding: 35px 24px 45px 24px !important; /* Grand padding */
        background-color: #a3c9be !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    body:has(.auth-split-container) .auth-panel-left .auth-left-content {
        display: block !important; /* Show description text on mobile */
        margin-top: 12px !important;
    }
    
    body:has(.auth-split-container) .auth-panel-left .auth-left-content h3 {
        font-size: 1.25rem !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        margin-bottom: 6px !important;
    }
    
    body:has(.auth-split-container) .auth-panel-left .auth-left-content p {
        font-size: 0.85rem !important;
        color: #334155 !important;
        line-height: 1.45 !important;
        max-width: 320px !important;
    }
    
    body:has(.auth-split-container) .auth-illustration {
        width: 100% !important;
        height: auto !important; /* Let height auto-scale with width */
        max-width: 230px !important; /* Bigger, grander certificate size */
        margin: 0 auto !important;
        border-radius: 0 !important;
    }
    
    body:has(.auth-split-container) .auth-illustration img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important; /* Completely visible illustration */
    }
    
    body:has(.auth-split-container) .auth-pagination {
        display: flex !important; /* Show slide indicators on mobile */
        margin-top: 12px !important;
        margin-bottom: 20px !important; /* Push active dot up to prevent cutoff */
    }
    
    body:has(.auth-split-container) .auth-slide {
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        opacity: 0 !important;
        transition: opacity 0.4s ease-in-out !important;
    }
    
    body:has(.auth-split-container) .auth-slide.active {
        display: flex !important;
        opacity: 1 !important;
    }
    
    /* Bottom Panel overlaying the top banner (Floating inside the green card) */
    body:has(.auth-split-container) .auth-panel-right {
        flex: none !important;
        height: auto !important; /* Wrap content snugly */
        padding: 32px 28px 28px 28px !important; /* Spacious premium padding */
        background-color: #ffffff !important;
        border-radius: 24px !important; /* Large rounded corners for the card-in-card overlap */
        margin: -24px 12px 12px 12px !important; /* Floating with 12px border on sides/bottom */
        position: relative !important;
        z-index: 10 !important;
        box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.03), 0 10px 20px rgba(0, 0, 0, 0.02) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start;
        border: 1px solid rgba(226, 232, 240, 0.5) !important;
    }

    body:has(.auth-split-container) .auth-header {
        margin-bottom: 20px !important;
    }

    body:has(.auth-split-container) .auth-footer {
        margin-top: 25px !important;
        padding-top: 16px !important;
        border-top: 1px solid #f1f5f9 !important;
    }
}

@media (max-width: 480px) {
    body:has(.auth-split-container) .main-content {
        padding: 16px 8px !important;
        max-width: 430px !important;
    }
    body:has(.auth-split-container) .auth-split-card {
        margin: -25px 0 0 0 !important; /* Slightly pulled up on small screens */
    }

    body:has(.auth-split-container) .auth-panel-left {
        padding: 30px 16px 40px 16px !important;
    }
    
    body:has(.auth-split-container) .auth-illustration {
        max-width: 200px !important;
    }
    
    body:has(.auth-split-container) .auth-panel-right {
        padding: 25px 20px 20px 20px !important;
        margin: -24px 8px 8px 8px !important; /* Floating with 8px border */
    }
    
    body:has(.auth-split-container) .auth-header {
        margin-bottom: 16px !important;
    }
    
    .auth-header h2 {
        font-size: 1.45rem !important;
        font-weight: 800 !important;
        color: var(--text-dark) !important;
    }
    
    .auth-header p {
        font-size: 0.85rem !important;
    }
    
    .auth-form .form-group {
        margin-bottom: 14px !important;
    }
    
    .auth-form label {
        font-size: 0.75rem !important;
    }
    
    .auth-panel-right .btn-primary,
    .auth-panel-right .btn-google {
        font-size: 0.9rem !important;
        padding: 11px 20px !important;
    }
    
    body:has(.auth-split-container) .auth-footer {
        margin-top: 20px !important;
        padding-top: 12px !important;
    }
}
