/* ==========================================
   RESET
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:#f5f7fb;
    color:#1f2937;
    line-height:1.7;
}

/* ==========================================
   GLOBAL
========================================== */

section{
    padding:90px 24px;
}

section h2{
    text-align:center;
    font-size:clamp(2rem,4vw,2.8rem);
    color:#111827;
    margin-bottom:60px;
}

.container{
    max-width:1200px;
    margin:0 auto;
}

/* ==========================================
   NAVIGATION
========================================== */

.navbar{

    position:sticky;
    top:0;
    z-index:1000;

    display:flex;
    justify-content:space-between;
    align-items:center;

    background:#111827;

    padding:20px 40px;

}

.logo{

    color:white;
    font-size:1.8rem;
    font-weight:700;

}

.nav-links{

    display:flex;
    align-items:center;
    gap:28px;

}

.nav-links a{

    text-decoration:none;
    color:white;
    transition:.25s;

}

.nav-links a:hover{

    color:#60a5fa;

}

.login-btn{

    background:#2563eb;
    color:white;

    padding:12px 22px;

    border-radius:10px;

    font-weight:600;

}

.login-btn:hover{

    background:#1d4ed8;
    color:white;

}

.assessment-btn {
    background: #16a34a; /* A nice conversion green to stand out */
    color: white !important;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: .25s;
}

.assessment-btn:hover {
    background: #15803d;
}

/* ==========================================
   HERO
========================================== */

header{
    background:#111827;
    color:white;
    text-align:center;
    padding:150px 24px 120px; /* Pushes text down while keeping the background anchored at the top */
}

.hero-eyebrow {
    color: #9ca3af; /* A nice, light muted gray */
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

header h1{

    max-width:900px;

    margin:0 auto 30px;

    font-size:clamp(2.6rem,6vw,4.3rem);

    line-height:1.15;

}

header p{

    max-width:760px;

    margin:0 auto 40px;

    font-size:1.2rem;

    opacity:.9;

}

.cta{

    display:flex;

    justify-content:center;

    gap:20px;

    flex-wrap:wrap;

}

.cta a{

    text-decoration:none;

    background:#2563eb;

    color:white;

    padding:16px 34px;

    border-radius:12px;

    font-size:1rem;

    font-weight:700;

    transition:.25s;

}

.cta a:hover{

    background:#1d4ed8;

    transform:translateY(-2px);

}

/* ===========================
   What We Do
=========================== */

section {
    padding: 90px 30px;
}

section h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: #111827;
}

.cards {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 18px;
    color: #111827;
}

.card p {
    color: #4b5563;
    line-height: 1.8;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1;
}

/* ===========================
   Our Process
=========================== */

.process-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 30px;
}

.process-step {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,.08);
    transition: transform .25s ease;
}

.process-step:hover {
    transform: translateY(-6px);
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-step h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #111827;
}

.process-step p {
    color: #4b5563;
    line-height: 1.7;
}

/* ==========================================
   Everything Included
========================================== */

.included-grid{

    max-width:1200px;

    margin:0 auto;

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:30px;

}

.included-card{

    background:#ffffff;

    border:1px solid #e5e7eb;

    border-radius:18px;

    padding:35px;

    box-shadow:0 15px 35px rgba(0,0,0,.08);

    transition:.25s ease;

}

.included-card:hover{

    transform:translateY(-6px);

}

.included-card h3{

    color:#111827;

    font-size:1.35rem;

    margin-bottom:18px;

}

.included-card p{

    color:#4b5563;

    line-height:1.8;

    font-size:1rem;

}

/* ===========================
   Pricing Card
=========================== */

.pricing-card{

    max-width:800px;
    margin:0 auto;

    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;

    padding:40px;

    box-shadow:0 15px 35px rgba(0,0,0,.08);
}

.pricing-card h3{
    font-size:2rem;
    margin-bottom:20px;
    color:#111827;
}

.price{
    font-size:3.5rem;
    font-weight:700;
    color:#2563eb;
    line-height:1;
    margin-bottom:10px;
}

.price span{
    font-size:1.2rem;
    color:#6b7280;
    font-weight:500;
}

.price-subtitle{
    font-size:1.1rem;
    font-weight:600;
    margin-bottom:30px;
    color:#111827;
}

.pricing-list{
    list-style:none;
    padding:0;
    margin:0 0 30px;
}

.pricing-list li{
    margin-bottom:12px;
    color:#374151;
}

.budget-box{
    background:#f8fafc;
    border-radius:12px;
    padding:18px;
    margin-bottom:25px;
}

.budget-box strong{
    display:block;
    margin-bottom:8px;
    color:#111827;
}

.pricing-note{
    color:#6b7280;
    line-height:1.7;
    margin-bottom:30px;
}

.pricing-btn{
    display:inline-block;
    background:#2563eb;
    color:#fff;
    text-decoration:none;
    padding:14px 28px;
    border-radius:10px;
    font-weight:600;
    transition:.25s;
}

.pricing-btn:hover{
    background:#1d4ed8;
}

/* ==========================================
   Why Chicagoland Media
========================================== */

#why{

    padding:90px 24px;

}

.why-intro{

    max-width:800px;

    margin:0 auto 60px;

    text-align:center;

    font-size:1.1rem;

    color:#4b5563;

    line-height:1.8;

}

.why-grid{

    max-width:1200px;

    margin:0 auto;

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:30px;

}

.why-card{

    background:white;

    border:1px solid #e5e7eb;

    border-radius:18px;

    padding:40px;

    box-shadow:0 15px 35px rgba(0,0,0,.08);

    transition:.25s;

}

.why-card:hover{

    transform:translateY(-6px);

}

.why-card h3{

    font-size:1.45rem;

    margin-bottom:18px;

    color:#111827;

}

.why-card p{

    color:#4b5563;

    line-height:1.8;

}

/* ===========================
   Staff Board Modal
=========================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.modal-content {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #111827;
    font-size: 1.2rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

@media(max-width:768px){
    
    .why-grid{

    grid-template-columns:1fr;

}

    .why-grid{

        grid-template-columns:1fr;

    }

}

/* ===========================
   Bottom CTA & Buttons
=========================== */
.bottom-cta {
    background: #ffffff;
    text-align: center;
    padding: 80px 24px;
    border-top: 1px solid #e5e7eb;
}

.bottom-cta h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #111827;
}

.bottom-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

/* Minimalist Button Style */
.simple-btn {
    background: transparent;
    color: #4b5563;
    border: 1px solid #d1d5db;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.simple-btn:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #9ca3af;
}

/* Make the Assessment button stand out slightly more */
.highlight-btn {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.highlight-btn:hover {
    background: #374151;
    color: #ffffff;
    border-color: #374151;
}

/* ===========================
   Professional Footer
=========================== */
.professional-footer {
    background: #111827;
    color: #9ca3af;
    text-align: center;
    padding: 60px 24px;
    font-size: 0.9rem;
}

.footer-brand {
    color: #ffffff;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.footer-tagline {
    margin-bottom: 20px;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    margin: 0 10px;
    transition: 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ===========================
   Navbar Layout & Sticky Fix
=========================== */

/* Ensure the navbar stays locked to the top with a smooth fade */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
    
    /* Increased bottom padding from 40px to 50px for more space below buttons */
    padding: 20px 40px 50px 40px; 
    
    /* Pushed the solid color down to 75% (was 65%) to decrease the size of the fade */
    background: linear-gradient(to bottom, rgba(17, 24, 39, 1) 75%, rgba(17, 24, 39, 0) 100%);
    
    pointer-events: none; 
}

/* Re-enables clicking for the actual logo and buttons inside the navbar */
.brand-container, 
.nav-links, 
.hamburger {
    pointer-events: auto;
}

/* Align Logo and Demo Button */
.brand-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Scale the top-left demo button */
.demo-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Responsive Text Swapping */
.mobile-text {
    display: none;
}
.desktop-text {
    display: inline;
}

/* Swap text on mobile screens */
    .mobile-text {
        display: inline;
    }
    .desktop-text {
        display: none;
    }
    
    /* ===========================
   Navbar Logo & Branding
=========================== */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px; /* Controls the space between the picture and the text */
}

.nav-logo-img {
    width: 38px; /* Perfectly sized for a premium navbar */
    height: 38px;
    object-fit: contain;
    border-radius: 6px; /* Gives the square image slightly softened, modern corners */
}
    
    /* ===========================
   Metric Ticker
=========================== */
.metric-ticker {
    background: #16a34a;
    color: white;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    position: relative;
    height: 42px;
    width: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
}

.ticker-item {
    position: absolute;
    left: 0;
    width: 100%;
    top: 50%;
    transform: translateY(-50%); /* Perfectly centers the text vertically */
    white-space: nowrap; /* Forces the text to stay on one single line */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.ticker-item.active {
    opacity: 1;
}

/* Hide nav links and demo button while Firebase checks auth state */
.auth-loading .demo-btn,
.auth-loading .nav-links a:not(.close-btn) {
    opacity: 0;
    visibility: hidden;
}

/* Ensure they fade in smoothly once Firebase is ready */
.demo-btn, 
.nav-links a,
.metric-ticker {
    transition: opacity 0.3s ease-in-out;
}

/* ===========================
   Login Page Logo
=========================== */
.login-logo {
    width: 85px; /* A decent, premium size */
    height: 85px;
    object-fit: contain;
    border-radius: 12px; /* Smooths the square corners */
    margin: 0 auto 20px auto; /* Centers it and adds space below */
    display: block; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* Subtle premium shadow */
}

/* ===========================
   Metric Ticker Overlap Fix
=========================== */
.ticker-item {
    position: absolute;
    left: 0;
    width: 100%;
    top: 50%;
    transform: translateY(-50%); 
    white-space: nowrap; /* Forces the text to stay on one single line */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* ===========================
   Premium Form Inputs
=========================== */
.premium-input {
    width: 100%; 
    padding: 16px 20px; 
    margin-bottom: 20px; /* Replaces the old <br> tags */
    border: 1.5px solid #e5e7eb; /* Subtle gray border */
    border-radius: 10px; /* Matches your button curves */
    font-size: 1rem;
    color: #1f2937;
    background-color: #f9fafb; /* Very light gray to stand out from the white card */
    box-sizing: border-box; /* Prevents the padding from stretching the box off-screen */
    transition: all 0.3s ease;
}

/* ===========================
   Login Role Selection Buttons
=========================== */
.role-btn {
    width: 100%;
    background-color: #f9fafb;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    padding: 16px 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* NEW: Forces the buttons above everything and makes mobile taps instant */
    position: relative !important; 
    z-index: 99999 !important; 
    touch-action: manipulation !important;
}

.role-btn::after {
    content: "→";
    color: #9ca3af;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.role-btn:hover {
    border-color: #2563eb;
    background-color: #eff6ff;
    color: #1d4ed8;
}

.role-btn:hover::after {
    color: #2563eb;
    transform: translateX(5px); /* Creates a smooth slide animation on the arrow */
}

/* The "Focus" State: What happens when they click inside to type */
.premium-input:focus {
    outline: none;
    border-color: #2563eb; /* Chicagoland Media blue */
    background-color: #ffffff; /* Turns pure white when active */
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); /* Adds a premium soft blue glow */
}

/* Styles the placeholder text so it isn't too dark */
.premium-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* ===========================
   Login Welcome Animation
=========================== */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #111827;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out;
}

.welcome-overlay.active {
    opacity: 1;
    visibility: visible;
}

.welcome-content {
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out 0.2s;
}

.welcome-overlay.active .welcome-content {
    transform: translateY(0);
    opacity: 1;
}

.welcome-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
}

.welcome-content p {
    color: #9ca3af;
    font-size: 1.1rem;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #2563eb;
    border-radius: 50%;
    margin: 0 auto 25px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   Premium UI & Button Overrides
=========================== */
.nav-links a:not(.assessment-btn):not(.login-btn):not(.logout-btn-nav) {
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    opacity: 0.7;
    transition: color 0.3s ease, opacity 0.3s ease !important;
}

.nav-links a:not(.assessment-btn):not(.login-btn):not(.logout-btn-nav):hover {
    opacity: 1;
    color: #60a5fa !important;
}

.assessment-btn, 
.login-btn, 
.simple-btn, 
.demo-btn {
    border-radius: 6px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.assessment-btn:hover, 
.highlight-btn:hover {
    background-color: #15803d !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.login-btn:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.simple-btn:not(.highlight-btn) {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
}

.simple-btn:not(.highlight-btn):hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
}

/* ===========================
   Staff Portal Data Table
=========================== */
.staff-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    text-align: left;
}

.staff-table th {
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 20px;
    border-bottom: 2px solid #e5e7eb;
}

.staff-table td {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
    color: #111827;
    font-size: 0.95rem;
    vertical-align: middle;
}

.staff-table tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #dcfce7;
    color: #16a34a;
}

.manage-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.manage-btn:hover {
    background: #1d4ed8;
}

/* ===========================
   Sidebar & Mobile Fixes
=========================== */
body {
    overflow-x: hidden;
    max-width: 100vw;
}

.hamburger {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
}

.close-btn {
    display: none;
    font-size: 40px;
    color: white;
    cursor: pointer;
    align-self: flex-end;
    line-height: 1;
    margin-bottom: 20px;
}

/* ===========================
   THE MASTER MOBILE BLOCK
=========================== */
@media(max-width: 768px) {
    
    /* Layout Reset */
    .navbar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 75px !important; 
        padding: 0 20px !important; 
    }

    .brand-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-grow: 1;
        gap: 12px;
    }

    /* Logo Fixes */
    .logo-wrapper .logo {
        display: none !important;
    }
    
    .nav-logo-img {
        width: 42px !important;
        height: 42px !important;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 15px; 
        border-radius: 10px; 
    }

    /* Menu Fixes */
    .hamburger {
        position: static !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 280px;
        height: 100vh;
        background: #111827;
        flex-direction: column;
        justify-content: flex-start;
        padding: 30px;
        transition: 0.3s ease-in-out;
        z-index: 9999;
        box-shadow: -5px 0 15px rgba(0,0,0,0.8);
    }

    .nav-links.active {
        right: 0; 
    }

    .close-btn {
        display: block; 
    }

    .nav-links a {
        margin-bottom: 20px;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .nav-links a:not(.login-btn) {
        display: block !important;
    }

    /* Ticker Fixes */
    .metric-ticker {
        margin-left: auto !important; 
        margin-right: 15px !important;
        width: 175px !important;
        font-size: 0.85rem;
        height: 36px;
    }

    /* Grid & Padding Fixes */
    .cards,
    .process-grid,
    .why-grid,
    .included-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card,
    .included-list {
        max-width: 100%;
        padding: 28px;
    }
    
    /* Responsive Text Swapping */
.mobile-text {
    display: none;
}
.desktop-text {
    display: inline;
}

/* Swap text ONLY on mobile screens */
@media(max-width: 768px) {
    .mobile-text {
        display: inline;
    }
    .desktop-text {
        display: none;
    }
}

    header {
        padding-top: 140px; 
        padding-bottom: 55px;
        padding-left: 20px;
        padding-right: 20px;
    }

    header h1 {
        font-size: 1.9rem; 
        line-height: 1.15;
    }

    header p {
        font-size: 1.05rem;
    }
    
    .hero-eyebrow {
        font-size: 0.9rem;
        margin-bottom: 25px; 
    }
    
    .bottom-buttons {
        flex-direction: column;
    }
    
    .bottom-buttons .simple-btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    .demo-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* Login Animation Mobile Fix */
    .welcome-content {
        padding: 0 20px; 
    }
    
    .welcome-content h2 {
        font-size: 1.8rem; 
    }
    
    .welcome-content p {
        font-size: 0.95rem;
    }
    
    .spinner {
        width: 35px; 
        height: 35px;
        margin-bottom: 20px;
    }
    
    /* Guarantee the menu slides open on the portal */
@media(max-width: 768px) {
    .nav-links.active {
        right: 0 !important;
    }
}
} /* <--- This bracket correctly closes all mobile rules! */

/* ===========================
   Homepage Ticker & Logo Alignment
=========================== */
.brand-container {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important; /* Creates a clean, professional gap between the logo and ticker */
}

.metric-ticker {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    height: 42px !important;
    width: 260px !important; 
    padding: 0 !important;
}

.ticker-item {
    position: absolute !important;
    width: 100% !important;
    text-align: center !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important; /* Mathematically guarantees vertical centering */
    margin: 0 !important;
}

/* =========================================================
   MOBILE SIDEBAR SLIDE-IN REPAIR
   ========================================================= */
@media (max-width: 768px) {
  /* Hide sidebar off-screen by default on mobile */
  .admin-sidebar, 
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -280px !important; /* Hides it off the left edge */
    width: 260px !important;
    height: 100vh !important;
    z-index: 99999 !important; /* Pushes it on top of everything */
    transition: left 0.3s ease-in-out !important;
    background-color: #111827; /* Adjust to match your theme */
  }

  /* WHEN JS ADDS .active OR .open -> SLIDE IT ONTO THE SCREEN */
  .admin-sidebar.active,
  .admin-sidebar.open,
  .sidebar.active,
  .sidebar.open {
    left: 0 !important; /* Brings it into view */
    display: block !important;
    visibility: visible !important;
  }

  /* Make sure the hamburger button sits ABOVE everything and registers taps */
  #mobileMenuToggle,
  .mobile-menu-toggle {
    display: block !important;
    z-index: 100000 !important;
    position: relative !important;
    cursor: pointer !important;
    padding: 10px;
  }
}