/* redesign.css */

/* Remove gradient background & setup body */
body {
    background: #fcfcfc !important; /* Soft off-white to contrast white cards */
    background-attachment: scroll !important;
    color: #1a1a1a !important;
}

body::before, body::after {
    display: none !important; /* Hide blobs */
}

/* ================== LAYOUT WRAPPER ================== */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ================== UNIFIED SIDEBAR (Desktop + Mobile) ================== */
.main-sidebar {
    width: 260px;
    background-color: #0d1b2a;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    box-shadow: 2px 0 15px rgba(0,0,0,0.05); /* Softer shadow */
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-sidebar .sidebar-header-new {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    padding-left: 10px;
    position: relative;
}

.main-sidebar .sidebar-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.main-sidebar .sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: white;
    line-height: 1.2;
}

.sidebar-close-btn-new {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.desktop-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

#navTabs .tab-btn, .desktop-nav-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    color: #a0aec0;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    font-family: inherit;
    width: 100%;
}

#navTabs .tab-btn:hover, .desktop-nav-btn:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

#navTabs .tab-btn.active, .desktop-nav-btn.active {
    background: rgba(255,255,255,0.1) !important;
    color: #d4af37 !important; /* Gold */
    box-shadow: none !important;
    border: none !important;
}

#navTabs .tab-btn i, .desktop-nav-btn i {
    width: 20px;
    text-align: center;
}

/* Backdrop */
#sidebarBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#sidebarBackdrop.open {
    display: block;
    opacity: 1;
}

/* ================== CONTENT AREA ================== */
.content-area {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 260px);
}

.main-content {
    flex: 1;
    padding: 1rem 2rem 3rem 2rem;
    width: 100%;
    max-width: 1200px;
}

/* Redesign Header to top right only */
.header {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 1rem 2rem !important;
    justify-content: flex-end !important;
}

.header-left {
    display: none !important;
}

/* ================== HOME PAGE GRID & BANNER ================== */
.home-banner {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    overflow: hidden;
    min-height: 180px; 
}

.home-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-banner-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #64748b;
    font-family: inherit;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.home-banner-subtitle {
    font-size: 2.8rem;
    font-weight: 800;
    color: #0d1b2a; 
    font-family: inherit;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.home-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.home-dash-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* Consistently spaced cards */
}

.home-dash-column-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================== CARDS OVERRIDE ================== */
.card, .wide-card {
    background: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    border: 1px solid #eaeaea !important;
    border-radius: 12px !important;
    padding: 1.5rem !important; /* Uniform padding */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Remove colored left borders for clean uniform aesthetics */
.wide-card.current { border-left: 1px solid #eaeaea !important; }
.wide-card.upcoming { border-left: 1px solid #eaeaea !important; }
.wide-card.announcement-card { border-left: 1px solid #eaeaea !important; }

.card:hover, .wide-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.06) !important;
}

/* ================== NEW: STORE CSS ================== */
.store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.store-search-bar {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.store-search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 20px;
    border: 1px solid #eaeaea;
    background: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.store-search-bar input:focus {
    border-color: #cbd5e1;
}

.store-search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-img {
    color: #cbd5e1;
    font-size: 2.5rem;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: #0d1b2a;
    margin: 0 0 4px 0;
}

.product-price {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stock-badge.in-stock {
    background: #e6f4ea;
    color: #1e8e3e;
}

.stock-badge.sold-out {
    background: #f1f3f4;
    color: #5f6368;
}

.price-strikethrough {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Product Detail Modal */
.product-modal-content {
    display: flex;
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

.product-modal-left {
    flex: 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eaeaea;
}

.product-modal-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.product-modal-right {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.product-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
}

.product-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    color: #0d1b2a;
}

.product-modal-price {
    font-size: 1.25rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.product-modal-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
    flex: 1;
}

.view-only-label {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eaeaea;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Mod/Admin Add Product Modal */
.add-product-modal {
    width: 560px !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 24px !important;
    border-radius: 12px !important;
    display: flex;
    flex-direction: row;
    gap: 20px;
    background: var(--bg-modal, white) !important;
    box-sizing: border-box;
    position: relative;
    border: none !important;
}

.add-product-left {
    width: 40%;
    border: 2px dashed var(--border-input, #eaeaea);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    background: transparent !important;
}

.add-product-left i {
    font-size: 3rem;
    color: var(--text-muted, #cbd5e1);
}

.add-product-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: none;
}

.add-product-right {
    width: 60%;
    padding: 0 !important;
}

.input-stacked {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.input-stacked label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.input-stacked input, .input-stacked textarea {
    padding: 0.75rem;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.input-stacked textarea {
    resize: vertical;
    min-height: 80px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-add-product {
    width: 100%;
    background: #0d1b2a;
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-cancel {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Mod Delete Icon */
.delete-product-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    z-index: 5;
}

/* Global Notification Banner */
.global-notification {
    background: #0d1b2a;
    color: white;
    padding: 0.75rem 2rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001; /* Above sidebar */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.global-notification.visible {
    transform: translateY(0);
}

.global-notification-close {
    position: absolute;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}

/* ================== MOBILE ADJUSTMENTS ================== */
@media (max-width: 1024px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .main-sidebar {
        left: -320px;
    }
    .main-sidebar.open {
        left: 0;
    }
    .sidebar-close-btn-new {
        display: block;
    }
    .content-area {
        margin-left: 0;
        width: 100%;
    }
    .home-dash-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .header-left {
        display: flex !important;
    }
    .header {
        justify-content: space-between !important;
        padding: 0.85rem 1.75rem !important;
        background: var(--bg-card) !important;
        backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid var(--border-card) !important;
    }
    .home-banner-title {
        font-size: 1.2rem;
    }
    .home-banner-subtitle {
        font-size: 2rem;
    }
    
    /* Hide old navigation tabs on mobile */
    .nav-tabs {
        display: none !important;
    }
    
    /* Ensure hamburger button is visible */
    #hamburgerBtn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--text-body);
        font-size: 1.25rem;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 8px;
        transition: background-color 0.2s;
    }
    
    #hamburgerBtn:hover {
        background-color: var(--bg-card);
    }
    
    #hamburgerBtn:active {
        background-color: var(--border-card);
    }
}

@media (max-width: 600px) {
    .store-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .product-modal-content {
        flex-direction: column;
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
    }
    .product-modal-left {
        border-right: none;
        border-bottom: 1px solid var(--border-card);
        max-height: 300px;
    }
    .add-product-modal {
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: 100vh;
        border-radius: 0;
        overflow-y: auto;
    }
    .add-product-left {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-card);
    }
    .store-search-bar {
        width: 100%;
    }
    
    /* Home banner adjustments for very small screens */
    .home-banner {
        padding: 1.5rem 1rem;
        min-height: 140px;
    }
    
    .home-banner-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .home-banner-subtitle {
        font-size: 1.5rem;
    }
    
    /* Content padding adjustments */
    .main-content {
        padding: 1rem 0.75rem 2rem 0.75rem;
    }
    
    /* Card adjustments */
    .card, .wide-card {
        padding: 1rem !important;
        border-radius: 10px !important;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .card-description,
    .description-preview,
    .description-full {
        font-size: 0.9rem;
    }
    
    /* Ensure logout functionality works on small mobile */
    .desktop-user-info.active {
        display: flex !important;
        align-items: center;
    }
    
    .desktop-user-details {
        display: flex;
        align-items: center;
    }
    
    /* Hide username on mobile, only show logout icon */
    .desktop-user-divider,
    .desktop-username {
        display: none !important;
    }
    
    .desktop-logout-icon-btn {
        min-width: 38px !important;
        min-height: 38px !important;
        font-size: 1rem !important;
        padding: 0.4rem !important;
    }
}

/* ================== CALENDAR REFINEMENTS ================== */
.calendar-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#calendarList.wide-card-list, .wide-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

#calendarList .wide-card, .wide-card {
    width: 100% !important;
    max-width: none !important;
    flex: 1;
}

/* Additional mobile-specific fixes */
@media (max-width: 480px) {
    .home-banner {
        padding: 1rem 0.75rem;
        min-height: 120px;
    }
    
    .home-banner-title {
        font-size: 0.9rem;
    }
    
    .home-banner-subtitle {
        font-size: 1.3rem;
    }
    
    .home-dash-column-title {
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .main-content {
        padding: 0.75rem 0.5rem 2rem 0.5rem;
    }
    
    .card, .wide-card {
        padding: 0.875rem !important;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    /* Ensure sidebar backdrop works properly */
    #sidebarBackdrop {
        z-index: 9999;
    }
    
    #sidebarBackdrop.open {
        opacity: 1;
        visibility: visible;
    }
    
    /* Ensure logout functionality works on very small mobile */
    .desktop-user-info.active {
        display: flex !important;
        align-items: center;
    }
    
    .desktop-user-details {
        display: flex;
        align-items: center;
    }
    
    /* Hide username on mobile, only show logout icon */
    .desktop-user-divider,
    .desktop-username {
        display: none !important;
    }
    
    .desktop-logout-icon-btn {
        min-width: 36px !important;
        min-height: 36px !important;
        font-size: 0.95rem !important;
        padding: 0.3rem !important;
    }
}

/* ================== BUG FIX OVERRIDES FOR OLD MODALS & ADMIN ================== */
.fullscreen-login, .modal, .popup {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    padding: 1rem !important; /* give space on mobile */
    box-sizing: border-box !important;
}

/* Hide inherently if display is none before overriding */
#loginModal[style*="display: none"],
#addProductModal[style*="display: none"],
#productDetailModal[style*="display: none"],
.fullscreen-login[style*="display: none"] {
    display: none !important;
}

.login-container, .login-box {
    background: var(--bg-modal) !important;
    border: 1px solid var(--border-card) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    color: var(--text-modal) !important;
    border-radius: 12px !important;
    max-width: 600px;
    margin: auto !important;
}

.admin-section {
    background: white !important;
    border: 1px solid #eaeaea !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    color: #0d1b2a !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    margin-bottom: 2rem;
    width: 100%;
}

/* Specific reset for add product modal which has no max-width natively */
#addProductModal .login-container, #productDetailModal .login-container {
    max-width: fit-content !important;
    margin: auto !important;
}

.login-title, .admin-section h2, .admin-panel h2 {
    color: #0d1b2a !important;
    font-family: inherit !important;
}

.btn-login, .btn-primary {
    background: #0d1b2a !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover, .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    background: #1a365d !important;
}

/* Force Admin input elements to match new styling */
.admin-section input, .admin-section textarea, .admin-section select, .login-box input {
    background: white !important;
    border: 1px solid var(--border-input, #eaeaea) !important;
    color: var(--text-input, #0d1b2a) !important;
    border-radius: 8px !important;
    padding: 0.85rem !important;
    width: 100%;
    font-family: inherit;
}

/* Admin Panel Grid & Sizing Expansion */
.admin-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 2rem;
    align-items: start;
    width: 100%;
}

@media (max-width: 1200px) {
    .admin-panel-grid {
        grid-template-columns: 1fr;
    }
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-heading);
}

.management-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid var(--border-card);
    padding-top: 1.5rem;
}

.management-item {
    background: var(--bg-main);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.management-item:hover {
    transform: translateX(5px);
}

.admin-form-actions {
    display: flex;
    gap: 1rem;
}

.admin-form-actions .btn-primary, .admin-form-actions .btn-secondary {
    flex: 1;
    padding: 0.85rem !important;
}

/* ================== GLOBAL THEME VARIABLES & ENFORCEMENT ================== */
/* Light Mode Variables (Darker for contrast) */
:root, [data-theme="light"] {
    --bg-main: #fcfcfc;
    --text-body: #0d1b2a;
    --text-heading: #000000;
    --text-muted: #4a5568;
    --bg-card: #ffffff;
    --border-card: #e2e8f0;
    --bg-input: #ffffff;
    --text-input: #0d1b2a;
    --border-input: #cbd5e1;
    --bg-sidebar: #0d1b2a;
    --text-sidebar: #ffffff;
    --bg-modal: #ffffff;
    --text-modal: #0d1b2a;
    --text-label: #1a202c;
    --primary-blue: #2a4365;
}

/* Dark Mode Variables */
[data-theme="dark"], body.dark-mode {
    --bg-main: #111111;
    --text-body: #f0f0f0;
    --text-heading: #ffffff;
    --text-muted: #aaaaaa;
    --bg-card: #1a1a1a;
    --border-card: #2a2a2a;
    --bg-input: #1e1e1e;
    --text-input: #f0f0f0;
    --border-input: #333333;
    --bg-sidebar: #1a1a2e;
    --text-sidebar: #ffffff;
    --bg-modal: #1e1e1e;
    --text-modal: #f0f0f0;
    --text-label: #cccccc;
}

/* ENFORCE UNIVERSAL VARIABLES FOR CONSTANT READABILITY */
body {
    background: var(--bg-main) !important;
    color: var(--text-body) !important;
}

h1, h2, h3, h4, h5, h6, .home-banner-title, .home-banner-subtitle, .product-name, .product-modal-title, .success-title, .login-title {
    color: var(--text-heading) !important;
}

p, .product-price, .description-full, .view-only-label, .success-message, .success-subtext, .store-search-bar i {
    color: var(--text-muted) !important;
}

.card, .wide-card, .home-banner, .product-card, .box, .store-search-bar input, .product-image-container, .product-modal-left {
    background: var(--bg-card) !important;
    border-color: var(--border-card) !important;
    color: var(--text-body) !important;
}

.login-container, .admin-panel, .admin-section, .product-modal-content, .success-box {
    background: var(--bg-modal) !important;
    color: var(--text-modal) !important;
    border-color: var(--border-card) !important;
}

.input-stacked input, .input-stacked textarea, .admin-panel input, .admin-panel textarea, .store-search-bar input, .login-box input, select {
    background: var(--bg-input) !important;
    color: var(--text-input) !important;
    border-color: var(--border-input) !important;
}

label, .input-stacked label, .toggle-container label, .form-group label {
    color: var(--text-label) !important;
}

.main-sidebar, .main-sidebar * {
    /* Fixed Sidebar (Dark ALWAYS) */
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sidebar) !important;
}
#navTabs .tab-btn:hover { background: rgba(255,255,255,0.05) !important; }
#navTabs .tab-btn.active { color: #d4af37 !important; }
.sidebar-footer { background: rgba(0,0,0,0.1) !important; }
.theme-switch { background: transparent !important; }

/* ================== LIGHT/DARK MODE OVERRIDES FOR COMPONENTS ================== */

/* E-Board cards - ensure visible text in both modes */
.eboard-card {
    background: var(--bg-card) !important;
    border-color: var(--border-card) !important;
}

.eboard-position {
    color: var(--text-muted) !important;
}

.eboard-name {
    color: var(--text-heading) !important;
}

.eboard-info {
    background: transparent !important;
    color: var(--text-body) !important;
}

.eboard-icon-container {
    background: transparent !important;
}

/* Info cards - ensure visible text in both modes */
.info-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-card) !important;
    border-left: 4px solid var(--primary-blue, #4a7fe8) !important;
    color: var(--text-body) !important;
}

.info-card-name {
    color: var(--text-heading) !important;
}

.info-card-icon {
    background: rgba(74,127,232,0.12) !important;
    border-color: rgba(74,127,232,0.25) !important;
}

/* Info panel text */
.info-panel, .info-panel h3, .meeting-schedule, .meeting-schedule h3 {
    color: var(--text-body) !important;
}

.panel-subtitle {
    color: var(--text-heading) !important;
}

/* Toast notifications - solid background for visibility */
.toast {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-card) !important;
    color: var(--text-body) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12) !important;
}

.toast span {
    color: var(--text-body) !important;
}

/* Global notification banner - dark background is fine in both modes */
.global-notification {
    background: #0d1b2a !important;
    color: #ffffff !important;
}

/* Section title icon color override */
.section-title i {
    color: var(--primary-blue, #4a7fe8) !important;
}

/* Search bar fix for both modes */
.search-bar {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-card) !important;
    border-radius: 20px !important;
}

.search-bar input {
    background: transparent !important;
    color: var(--text-body) !important;
    border: none !important;
}

.search-bar i {
    color: var(--text-muted) !important;
}

/* Empty state text */
.empty-state {
    color: var(--text-muted) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-card) !important;
}

.empty-state h3 {
    color: var(--text-heading) !important;
}

/* Home dashboard column titles */
.home-dash-column-title {
    color: var(--text-muted) !important;
}

/* Header desktop text */
.desktop-username {
    color: var(--text-body) !important;
}

.desktop-user-divider {
    color: var(--border-card) !important;
}

.desktop-logout-icon-btn {
    color: var(--text-muted) !important;
}

/* Card label fix */
.card-label {
    color: var(--text-muted) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-card) !important;
}

/* Account icon in header */
.account-icon {
    color: var(--text-body) !important;
}

/* Header site title */
.site-title {
    color: var(--text-heading) !important;
}

/* Mobile header background fix for dark mode */
@media (max-width: 900px) {
    .header {
        background: var(--bg-card) !important;
        border-bottom: 1px solid var(--border-card) !important;
    }
    #hamburgerBtn {
        color: var(--text-body) !important;
        background: transparent !important;
        border: none !important;
    }
    
    /* Show desktop user info on mobile when logged in */
    .desktop-user-info.active {
        display: flex !important;
        align-items: center;
    }
    
    .desktop-user-details {
        display: flex;
        align-items: center;
    }
    
    /* Hide username on mobile, only show logout icon */
    .desktop-user-divider,
    .desktop-username {
        display: none !important;
    }
    
    .desktop-logout-icon-btn {
        background: transparent !important;
        border: none !important;
        color: var(--text-muted) !important;
        padding: 0.5rem;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.1rem;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
    }
    
    .desktop-logout-icon-btn:hover {
        background: var(--bg-card) !important;
        color: #ef4444 !important;
    }
}

/* Version identifier */
[style*="pointer-events: none"] {
    color: var(--text-muted) !important;
}

/* Fix for admin panel title and description box blending text */
.admin-form input,
.admin-form textarea,
.admin-form select {
    color: var(--text-body) !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-card) !important;
}

.admin-form input::placeholder,
.admin-form textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}
