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

/* ==========================================================================
   1. CORE VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
    /* Theme Color System (Overwritten dynamically by PHP header settings) */
    --primary-color: #2563eb;       /* Sleek Enterprise Blue */
    --secondary-color: #1e3a8a;     /* Deep Navy Blue */
    --dark-bg: #090d16;             /* Premium Dark Mode Slate */
    --light-bg: #f8fafc;            /* Crisp clean light background */
    
    /* Gold Design Accents */
    --gold-color: #d4af37;
    --gold-gradient: linear-gradient(135deg, #fbbf24, #d4af37);
    --gold-glow: 0 0 15px rgba(212, 175, 55, 0.3);
    
    /* Text Color Mappings */
    --text-light: #1e293b;          /* Dark gray for readability */
    --text-dark: #f8fafc;           /* Near white */
    --text-muted: #64748b;          /* Cool gray */
    
    /* Light Mode Specific Variables */
    --card-bg-light: rgba(255, 255, 255, 0.75);
    --card-border-light: rgba(255, 255, 255, 0.5);
    --body-bg-light: #f8fafc;
    --shadow-light: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
    --border-color-light: #e2e8f0;
    
    /* Dark Mode Specific Variables */
    --card-bg-dark: rgba(17, 24, 39, 0.7);
    --card-border-dark: rgba(255, 255, 255, 0.08);
    --body-bg-dark: #090d16;
    --shadow-dark: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --border-color-dark: #1e293b;
    
    /* Layout Variables */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --accent-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLING
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--body-bg-light);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.25;
    transition: color 0.4s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* ==========================================================================
   3. DARK MODE IMPLEMENTATION
   ========================================================================== */
body.dark-mode {
    background-color: var(--body-bg-dark);
    color: var(--text-dark);
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: #ffffff;
}

body.dark-mode .glass-card {
    background: var(--card-bg-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-dark);
}

body.dark-mode .glass-card:hover {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.dark-mode .navbar {
    background: rgba(9, 13, 22, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .nav-link {
    color: #94a3b8;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    color: #ffffff;
}

body.dark-mode .btn-secondary {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}

body.dark-mode .btn-secondary:hover {
    background: #334155;
    color: #ffffff;
}

body.dark-mode .form-control {
    background: rgba(17, 24, 39, 0.8);
    border-color: #334155;
    color: #f8fafc;
}

body.dark-mode .form-control:focus {
    border-color: var(--primary-color);
    background: #111827;
}

body.dark-mode .form-label {
    color: #cbd5e1;
}

body.dark-mode .table-custom {
    background: #111827;
}

body.dark-mode .table-custom th {
    background: #1e293b;
    color: #cbd5e1;
}

body.dark-mode .table-custom td {
    border-bottom-color: #1e293b;
    color: #cbd5e1;
}

body.dark-mode .faq-question {
    color: #ffffff;
}

body.dark-mode .faq-item {
    border-bottom-color: #1e293b;
}

body.dark-mode .modal-content {
    background: #111827;
    border: 1px solid #1e293b;
}

body.dark-mode .modal-content h3 {
    color: #fff;
}

body.dark-mode .modal-content p {
    color: #94a3b8;
}

body.dark-mode .widget-card {
    background: #111827;
    border-color: #1e293b;
}

body.dark-mode .widget-info p {
    color: #94a3b8;
}

body.dark-mode .admin-topbar {
    background: #111827;
    border-bottom-color: #1e293b;
}

body.dark-mode .admin-topbar .admin-user-name {
    color: #fff;
}

body.dark-mode .admin-card {
    background: #111827;
    border-color: #1e293b;
}

body.dark-mode .admin-title {
    color: #fff;
}

/* Accessibility overrides */
body.high-contrast {
    filter: contrast(1.2);
}
body.high-contrast.dark-mode {
    background-color: #000000;
}

/* ==========================================================================
   4. GLASSMORPHISM & CONTAINER
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.glass-card {
    background: var(--card-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border-light);
    border-radius: var(--border-radius-md);
    padding: 32px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px 0 rgba(31, 38, 135, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.glass-card-gold {
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.glass-card-gold::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--gold-gradient);
}

/* ==========================================================================
   5. PREMIUM HEADER & FOOTER Layouts
   ========================================================================== */
/* Scroll Progress Indicator */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color));
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 14px 0;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color) 30%, var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-fast);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-link:hover::after, 
.nav-link.active::after {
    width: 100%;
}

/* Footer */
.footer {
    background: #090d16;
    color: #94a3b8;
    padding: 80px 0 40px;
    border-top: 1px solid #1e293b;
    margin-top: auto;
    position: relative;
}

.footer h4 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 14px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 14.5px;
    display: inline-block;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #1e293b;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: var(--transition-smooth);
    border: 1px solid #1e293b;
}

.footer-social-link:hover {
    color: #ffffff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   6. PREMIUM BUTTONS & HOVER EFFECTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    gap: 8px;
    outline: none;
    position: relative;
    overflow: hidden;
}

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

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

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

.btn-primary:hover {
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    box-shadow: 0 6px 22px rgba(212, 175, 55, 0.45);
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

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

/* ==========================================================================
   7. ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; box-shadow: var(--gold-glow); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse-glow 2.5s infinite ease-in-out;
}

/* Skeleton Loading Shimmer */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
    height: 20px;
    width: 100%;
}
body.dark-mode .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

/* ==========================================================================
   8. HERO SECTIONS & LANDING COMPONENT
   ========================================================================== */
.hero-section {
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: left;
}

.hero-bg-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('hero_bg.png'); /* Custom dynamic bg generated */
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    z-index: -2;
}

body.dark-mode .hero-bg-visual {
    opacity: 0.15;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-title {
    font-size: 62px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #0f172a 40%, var(--primary-color), var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .hero-title {
    background: linear-gradient(135deg, #ffffff 40%, var(--primary-color), var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.6;
}

body.dark-mode .hero-subtitle {
    color: #cbd5e1;
}

/* Stat bar grid */
.stat-counter-bar {
    background: var(--card-bg-light);
    border-top: 1px solid var(--border-color-light);
    border-bottom: 1px solid var(--border-color-light);
    padding: 36px 0;
    margin-bottom: 60px;
    backdrop-filter: blur(12px);
}
body.dark-mode .stat-counter-bar {
    background: rgba(17, 24, 39, 0.4);
    border-color: var(--border-color-dark);
}

.stat-counter-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
    text-align: center;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   9. FORMS & VERIFICATIONS
   ========================================================================== */
.form-group {
    margin-bottom: 22px;
    text-align: left;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14.5px;
    color: #334155;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    transition: var(--transition-smooth);
    outline: none;
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

/* Password Strength Meter */
.password-strength-container {
    margin-top: 8px;
}

.password-strength-bar {
    height: 5px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.password-strength-progress {
    height: 100%;
    width: 0%;
    background: #ef4444;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    display: block;
    text-align: right;
    color: var(--text-muted);
}

/* OTP Verification UI */
.otp-container {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0;
}

.otp-input {
    width: 50px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #cbd5e1;
    border-radius: var(--border-radius-sm);
    outline: none;
    transition: var(--transition-smooth);
}
.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   10. VOTING PAGES: Catalog, Roster, Dashboard & Live Results
   ========================================================================== */
/* Timeline Step-by-Step voting process */
.timeline-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    position: relative;
    margin-top: 48px;
}

.timeline-step {
    padding: 24px;
    text-align: left;
    position: relative;
}

.timeline-step-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 800;
    font-family: 'Outfit';
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.timeline-step-gold .timeline-step-badge {
    background: var(--gold-gradient);
    color: #0f172a;
    box-shadow: var(--gold-glow);
}

/* Election cards catalog */
.election-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 16px;
}
body.dark-mode .election-tabs {
    border-color: var(--border-color-dark);
}

.election-tab-btn {
    padding: 10px 24px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.election-tab-btn.active {
    background: var(--primary-color);
    color: #fff;
}
body.dark-mode .election-tab-btn.active {
    background: #fff;
    color: var(--dark-bg);
}

/* Candidate display cards */
.candidate-card-premium {
    background: white;
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-md);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.candidate-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-color);
}

.candidate-portrait-frame {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    position: relative;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--gold-color));
}

.candidate-portrait-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid white;
}
body.dark-mode .candidate-portrait-frame img {
    border-color: #111827;
}

.party-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    margin-bottom: 12px;
}
body.dark-mode .party-tag {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Live Results progress metrics */
.result-candidate-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    gap: 20px;
    align-items: center;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    background: #f8fafc;
    transition: var(--transition-smooth);
}
body.dark-mode .result-candidate-row {
    background: #1e293b;
}

.result-candidate-row.winner-row {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

/* ==========================================================================
   11. MULTIMEDIA MASONRY GALLERY
   ========================================================================== */
.masonry-gallery {
    column-count: 3;
    column-gap: 24px;
}

.gallery-masonry-item {
    background: var(--card-bg-light);
    border: 1px solid var(--card-border-light);
    border-radius: var(--border-radius-md);
    margin-bottom: 24px;
    break-inside: avoid;
    overflow: hidden;
    padding: 12px;
    transition: var(--transition-smooth);
}

.gallery-masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.gallery-media-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-media-wrapper img {
    width: 100%;
    transition: transform 0.5s ease;
}

.gallery-media-wrapper:hover img {
    transform: scale(1.08);
}

@media (max-width: 900px) {
    .masonry-gallery {
        column-count: 2;
    }
}
@media (max-width: 600px) {
    .masonry-gallery {
        column-count: 1;
    }
}

/* ==========================================================================
   12. BLOG & PORTAL CONTENT CARD Layout
   ========================================================================== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}
body.dark-mode .blog-card {
    background: #111827;
    border-color: var(--border-color-dark);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: var(--primary-color);
}

.blog-card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img-wrapper img {
    transform: scale(1.06);
}

/* ==========================================================================
   13. DASHBOARD COMPONENTS: Sidebar & Analytics
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.widget-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 28px 24px;
    border: 1px solid var(--border-color-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}
.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.widget-icon {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.widget-info h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 2px;
    font-family: 'Outfit', sans-serif;
}

.widget-info p {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Professional Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color-light);
}
body.dark-mode .table-responsive {
    border-color: var(--border-color-dark);
}

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

.table-custom th, 
.table-custom td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color-light);
}

.table-custom th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom td {
    font-size: 14.5px;
    color: #475569;
}

.table-custom tr:hover td {
    background: rgba(37, 99, 235, 0.02);
}
body.dark-mode .table-custom tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

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

.badge-success { background: #d1fae5; color: #065f46; }
body.dark-mode .badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.badge-danger { background: #fee2e2; color: #991b1b; }
body.dark-mode .badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.badge-warning { background: #fef3c7; color: #92400e; }
body.dark-mode .badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.badge-info { background: #dbeafe; color: #1e40af; }
body.dark-mode .badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

/* ==========================================================================
   14. SYSTEM MESSAGES / TOASTS & FLOATING WIDGETS
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    border-radius: var(--border-radius-sm);
    padding: 18px 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 5px solid #cbd5e1;
    min-width: 320px;
    max-width: 450px;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}
body.dark-mode .toast {
    background: #111827;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border-color: #1e293b;
}

.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }
.toast-info { border-left-color: #3b82f6; }
.toast-warning { border-left-color: #fbbf24; }

.toast-message {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}
body.dark-mode .toast-message {
    color: #cbd5e1;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 22, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 520px;
    padding: 36px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.3);
    transform: scale(0.92);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Floating Action Button Support widget */
.floating-widget-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-support-chat {
    background: var(--accent-gradient);
}
.btn-support-chat:hover {
    transform: translateY(-4px) rotate(10deg);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

.btn-back-to-top {
    background: #111827;
    border: 1px solid #1e293b;
    color: #f8fafc;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.btn-back-to-top:hover {
    background: #1e293b;
    transform: translateY(-4px);
}

/* Cookie consent banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    max-width: 420px;
    background: var(--card-bg-light);
    border: 1px solid var(--card-border-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(24px);
    z-index: 1000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: slideInRight 0.5s ease-out;
}
body.dark-mode .cookie-consent-banner {
    background: var(--card-bg-dark);
    border-color: var(--card-border-dark);
    box-shadow: var(--shadow-dark);
}

/* Accessibility Control Drawer Panel */
.accessibility-panel {
    position: fixed;
    top: 100px;
    right: -280px;
    width: 280px;
    background: var(--card-bg-light);
    border: 1px solid var(--card-border-light);
    border-top-left-radius: var(--border-radius-md);
    border-bottom-left-radius: var(--border-radius-md);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(24px);
    z-index: 998;
    padding: 24px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
body.dark-mode .accessibility-panel {
    background: var(--card-bg-dark);
    border-color: var(--card-border-dark);
    box-shadow: var(--shadow-dark);
}
.accessibility-panel.open {
    right: 0;
}
.accessibility-toggle-tab {
    position: absolute;
    left: -48px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   15. FAQ COLLAPSIBLE ACCORDION
   ========================================================================== */
.faq-accordion-premium {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item-premium {
    background: #ffffff;
    border: 1.5px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition-smooth);
}
body.dark-mode .faq-item-premium {
    background: #111827;
    border-color: var(--border-color-dark);
}

.faq-item-premium:hover {
    border-color: var(--primary-color);
}

.faq-question-premium {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    transition: var(--transition-fast);
}
body.dark-mode .faq-question-premium {
    color: #ffffff;
}

.faq-question-premium i {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-muted);
}

.faq-answer-premium {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
    color: var(--text-muted);
    font-size: 14.5px;
    background: #f8fafc;
}
body.dark-mode .faq-answer-premium {
    background: #0d121f;
    color: #cbd5e1;
}

.faq-answer-inner {
    padding: 0 24px 24px 24px;
    line-height: 1.7;
}

.faq-item-premium.active .faq-question-premium i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-item-premium.active .faq-answer-premium {
    background: #f8fafc;
}
body.dark-mode .faq-item-premium.active .faq-answer-premium {
    background: #0d121f;
}

/* ==========================================================================
   16. RESPONSIVE DESIGN ADJUSTMENTS
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    
    .hero-title {
        font-size: 46px;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-visual {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 16px 0;
    }
    
    .nav-menu {
        display: none; /* Can be toggled with JS mobile drawer */
    }
    
    .stat-counter-grid {
        flex-direction: column;
        gap: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
