/* ===================================
   SHARED PANEL LAYOUT STYLES - Clean & Simple Design
   Used by: Admin, Institute, User panels
   =================================== */

/* ===================================
   PREVENT FLASH ON PAGE LOAD
   =================================== */
.preload * {
    transition: none !important;
}

/* ===================================
   SMOOTH THEME TRANSITIONS
   =================================== */
body,
.card,
.table,
.form-control,
.form-select,
.modal-content,
.navbar-dark,
.dropdown-menu,
.list-group-item {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ===================================
   NAVBAR - Clean & Simple
   =================================== */
.navbar.sticky-top {
    z-index: 1050;
    position: sticky;
    top: 0;
    width: 100%;
}

nav.navbar {
    position: sticky !important;
    top: 0 !important;
    min-height: 64px;
    padding: 0;
    background: var(--olive-primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    padding: 0.5rem 0;
}

.navbar-logo {
    height: 42px;
    width: auto;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ===================================
   HAMBURGER BUTTON - Minimal
   =================================== */
.hamburger-btn {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.hamburger-icon .bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* ===================================
   OFFCANVAS SIDEBAR - Clean Design
   =================================== */
#sidebarMenu {
    background: linear-gradient(180deg, #ffffff 0%, #f8faf5 100%);
    --bs-offcanvas-width: 260px;
    border-right: 2px solid #e0e8d5;
    box-shadow: 2px 0 8px rgba(107, 142, 35, 0.06);
}

.offcanvas-280 {
    --bs-offcanvas-width: 280px;
}

.offcanvas-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #e0e8d5;
    background: linear-gradient(135deg, #f5f8f0 0%, #eef3e5 100%);
}

.offcanvas-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary, #2a3a2a);
}

/* Desktop - Fixed sidebar */
@media (min-width: 768px) {
    #sidebarMenu {
        position: fixed !important;
        top: var(--navbar-height) !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 1040 !important;
        width: 260px !important;
        border-right: 2px solid #e0e8d5;
        visibility: visible !important;
    }

    #sidebarMenu.offcanvas-280 {
        width: 280px !important;
    }

    #sidebarMenu .offcanvas-header {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding-top: 1rem;
        transition: margin-left 0.25s ease;
        min-height: calc(100vh - var(--navbar-height));
    }

    body.sidebar-open .main-content {
        margin-left: 260px;
    }

    body.sidebar-open #sidebarMenu.offcanvas-280 ~ .main-content,
    body.sidebar-open .offcanvas-280 + .main-content {
        margin-left: 280px;
    }

    .offcanvas-backdrop {
        display: none !important;
    }

}

/* ===================================
   MODAL FIX - Ensure modals work with sidebar
   =================================== */
/* Allow clicks to pass through backdrop to modal */
.modal-backdrop {
    pointer-events: none !important;
}

/* Modal must handle its own clicks */
.modal {
    pointer-events: none !important;
}

/* Modal dialog captures all interactions */
.modal-dialog {
    pointer-events: auto !important;
}

/* Desktop: Disable sidebar interaction when modal is open */
@media (min-width: 768px) {
    body.modal-open #sidebarMenu {
        pointer-events: none !important;
    }
}

/* Mobile - Default offcanvas behavior */
@media (max-width: 767px) {
    #sidebarMenu {
        top: 0 !important;
    }

    .main-content {
        margin-left: 0;
    }

    nav.navbar {
        min-height: 56px;
    }

    .navbar-logo {
        height: 36px;
    }
}

/* ===================================
   SIDEBAR STICKY SCROLL
   =================================== */
.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - var(--navbar-height));
    padding: 0.75rem 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    .sidebar-sticky {
        height: calc(100vh - var(--navbar-height));
    }
}

/* ===================================
   SIDEBAR NAVIGATION - Simple & Clean
   =================================== */
.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary, #3a4a3a);
    padding: 0.65rem 1.25rem;
    margin: 0.15rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: linear-gradient(135deg, #f0f5e8 0%, #e8f0dc 100%);
    color: var(--olive-primary);
    border-color: rgba(107, 142, 35, 0.15);
    box-shadow: 0 2px 4px rgba(107, 142, 35, 0.08);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.15) 0%, rgba(107, 142, 35, 0.1) 100%);
    color: var(--olive-primary);
    font-weight: 600;
    border-color: rgba(107, 142, 35, 0.25);
    box-shadow: 0 2px 6px rgba(107, 142, 35, 0.12);
}

.nav-link i,
.nav-link svg {
    width: 18px;
    margin-right: 10px;
    font-size: 0.95rem;
    opacity: 0.8;
}

.nav-link.active i,
.nav-link.active svg {
    opacity: 1;
}

.nav-link .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* ===================================
   SIDEBAR SECTION HEADINGS
   =================================== */
.sidebar-section-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1.25rem 0.5rem;
    margin-top: 0.75rem;
    color: #5a7a3a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-section-heading i {
    font-size: 0.75rem;
    opacity: 0.8;
    color: var(--olive-primary);
}

/* ===================================
   SIDEBAR DIVIDER
   =================================== */
.sidebar-divider {
    margin: 0.75rem 1rem;
    border-top: 2px solid #e5edd8;
    opacity: 1;
}

/* ===================================
   THEME TOGGLE - Simple
   =================================== */
.theme-toggle {
    cursor: pointer;
    color: white;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-icon {
    transition: opacity 0.2s ease;
}

[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: inline-block; }
[data-theme="dark"] .theme-icon-sun { display: inline-block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

/* ===================================
   BADGES - Enhanced Light Theme
   =================================== */
.badge.bg-warning {
    background: linear-gradient(135deg, #f8e8c8 0%, #f0d8a8 100%) !important;
    color: #7a5a1a !important;
    font-weight: 600;
    border: 1px solid #e8c888 !important;
    box-shadow: 0 1px 3px rgba(200, 160, 64, 0.2);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #fad8d5 0%, #f5c5c0 100%) !important;
    color: #7a2a24 !important;
    border: 1px solid #e8a8a2 !important;
    box-shadow: 0 1px 3px rgba(200, 74, 68, 0.2);
}

.badge.bg-success {
    background: linear-gradient(135deg, #d8f0c8 0%, #c8e5b5 100%) !important;
    color: #2a5a1a !important;
    border: 1px solid #b0d898 !important;
    box-shadow: 0 1px 3px rgba(107, 142, 35, 0.2);
}

.badge.bg-info {
    background: linear-gradient(135deg, #d5e8f0 0%, #c0dce5 100%) !important;
    color: #2a5a6a !important;
    border: 1px solid #a0c8d5 !important;
    box-shadow: 0 1px 3px rgba(74, 138, 154, 0.2);
}

.badge.bg-primary {
    background: linear-gradient(135deg, #d8e8c5 0%, #c5ddb0 100%) !important;
    color: #3a5a1a !important;
    border: 1px solid #a8c888 !important;
    box-shadow: 0 1px 3px rgba(107, 142, 35, 0.2);
}

/* ===================================
   NOTIFICATION STYLES - Enhanced Light Theme
   =================================== */
.notification-badge {
    font-size: 0.6rem;
    padding: 0.2em 0.4em;
    min-width: 18px;
    background: linear-gradient(135deg, #e85a54 0%, #c84a44 100%) !important;
    box-shadow: 0 2px 4px rgba(200, 74, 68, 0.3);
}

.notification-dropdown {
    background: linear-gradient(180deg, #ffffff 0%, #fafcf8 100%);
    border: 2px solid #e0e8d5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(107, 142, 35, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.notification-dropdown .dropdown-item {
    white-space: normal;
    border-bottom: 1px solid #eef3e8;
    padding: 0.75rem 1rem;
    color: #3a4a3a;
    transition: all 0.2s ease;
}

.notification-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.notification-dropdown .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(107, 142, 35, 0.08) 0%, rgba(107, 142, 35, 0.04) 100%);
}

.notification-dropdown .dropdown-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f5f8f0 0%, #eef3e5 100%);
    border-bottom: 2px solid #e0e8d5;
    font-weight: 600;
    color: #3a5a2a;
}

/* ===================================
   MAIN CONTENT AREA
   =================================== */
.main-content {
    background: linear-gradient(135deg, #f5f8f0 0%, #eef4e5 50%, #f8faf5 100%);
    min-height: calc(100vh - var(--navbar-height));
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(107, 142, 35, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(107, 142, 35, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

/* ===================================
   CARDS - Clean Style
   =================================== */
.card {
    border: 2px solid #e0e8d5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    background: linear-gradient(135deg, #ffffff 0%, #fafcf8 100%);
    transition: all 0.25s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(107, 142, 35, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    border-color: #d0dcc0;
}

.card-header {
    background: linear-gradient(135deg, var(--bg-secondary, #f5f8f0) 0%, var(--bg-tertiary, #eef3e8) 100%);
    border-bottom: 2px solid var(--border-color, #e0e8d5);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #2a3a2a);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: linear-gradient(135deg, #f8faf5 0%, #f2f6ec 100%);
    border-top: 2px solid #e0e8d5;
    padding: 0.875rem 1.25rem;
}

/* ===================================
   STAT CARDS (Dashboard) - Enhanced Light Theme
   =================================== */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, transparent 50%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(107, 142, 35, 0.18);
}

.stat-card .card-body {
    padding: 1.25rem;
    position: relative;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stat card variants - Enhanced for Light Theme */
.stat-card.stat-primary {
    background: linear-gradient(135deg, #7a9a28 0%, #5a7a1f 50%, #4a6a18 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(107, 142, 35, 0.25);
}

.stat-card.stat-secondary {
    background: linear-gradient(135deg, #f8f5f0 0%, #f0ebe2 50%, #e8e0d5 100%);
    color: #4a4030;
    border: 2px solid #ddd5c5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card.stat-success {
    background: linear-gradient(135deg, #5a9a5a 0%, #4a8a4a 50%, #3a7a3a 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(74, 138, 74, 0.25);
}

.stat-card.stat-info {
    background: linear-gradient(135deg, #5a9aaa 0%, #4a8a9a 50%, #3a7a8a 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(74, 138, 154, 0.25);
}

.stat-card.stat-warning {
    background: linear-gradient(135deg, #d8b850 0%, #c8a840 50%, #b89830 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(200, 168, 64, 0.25);
}

.stat-card.stat-danger {
    background: linear-gradient(135deg, #d86a64 0%, #c85a54 50%, #b84a44 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(200, 90, 84, 0.25);
}

/* ===================================
   TABLES - Enhanced Light Theme
   =================================== */
.table {
    border-color: #e0e8d5;
    background: #ffffff;
    border-radius: 8px;
    overflow: visible;
}

.table thead th {
    background: linear-gradient(135deg, var(--bg-secondary, #f0f5e8) 0%, var(--bg-tertiary, #e8f0dc) 100%);
    border-bottom: 2px solid var(--border-color, #d0dcc0);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary, #3a5a2a);
    padding: 0.875rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light, #eef3e8);
    color: var(--text-primary, #3a4a3a);
}

.table tbody tr:nth-child(even) {
    background-color: rgba(107, 142, 35, 0.02);
}

.table-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(107, 142, 35, 0.06) 0%, rgba(107, 142, 35, 0.03) 100%);
}

/* ===================================
   FORMS - Theme Aware
   =================================== */
.form-control,
.form-select {
    border: 2px solid var(--beige-dark, #d0dcc5);
    border-radius: 8px;
    padding: 0.6rem 0.875rem;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    background: var(--input-bg, #ffffff);
    color: var(--input-text, #2a3a2a);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--border-dark, #b8caa5);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--olive-primary);
    box-shadow: 0 0 0 4px var(--input-focus-shadow, rgba(107, 142, 35, 0.12));
    background: var(--bg-hover, #fafcf8);
}

.form-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary, #3a4a3a);
    margin-bottom: 0.4rem;
}

.input-group-text {
    background: var(--bg-secondary, #f5f8f0);
    border: 2px solid var(--beige-dark, #d0dcc5);
    border-radius: 8px;
    color: var(--text-secondary, #4a6a3a);
    font-weight: 500;
}

/* ===================================
   BUTTONS - Enhanced Light Theme
   =================================== */
.btn {
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #7a9a28 0%, #6B8E23 50%, #5a7a1f 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(107, 142, 35, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6B8E23 0%, #5a7a1f 50%, #4a6a18 100%);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #5a9a5a 0%, #4a8a4a 50%, #3a7a3a 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(74, 138, 74, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #4a8a4a 0%, #3a7a3a 50%, #2a6a2a 100%);
    box-shadow: 0 4px 12px rgba(74, 138, 74, 0.35);
}

.btn-outline-primary {
    color: var(--olive-primary);
    border: 2px solid var(--olive-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #7a9a28 0%, #6B8E23 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.25);
}

/* ===================================
   SCROLLBAR - Enhanced Light Theme
   =================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(90deg, #f5f8f0 0%, #eef3e5 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b0c8a0 0%, #98b588 100%);
    border-radius: 4px;
    border: 1px solid #a0b890;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #98b588 0%, #7a9a68 100%);
}

/* ===================================
   DARK MODE
   =================================== */
[data-theme="dark"] {
    --sidebar-bg: #151a15;
    --sidebar-text: #c0cac0;
}

[data-theme="dark"] nav.navbar {
    background: #1f2a1f !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] #sidebarMenu {
    background: linear-gradient(180deg, #1a1f1a 0%, #151a15 100%);
    border-right-color: #2a352a;
}

[data-theme="dark"] .offcanvas-header {
    background: linear-gradient(135deg, #1f251f 0%, #1a1f1a 100%);
    border-bottom-color: #2a352a;
}

[data-theme="dark"] .offcanvas-title {
    color: #d0dac0;
}

[data-theme="dark"] .nav-link {
    color: #a0b0a0;
}

[data-theme="dark"] .nav-link:hover {
    background: #1f251f;
    color: #9aba4a;
}

[data-theme="dark"] .nav-link.active {
    background: rgba(107, 142, 35, 0.15);
    color: #9aba4a;
}

[data-theme="dark"] .sidebar-section-heading {
    color: #7a8a7a;
}

[data-theme="dark"] .sidebar-divider {
    border-top-color: #2a352a;
}

[data-theme="dark"] .main-content {
    background: #0f1410;
}

[data-theme="dark"] .card {
    background: linear-gradient(135deg, #1a1f1a 0%, #151a15 100%);
    border-color: #2a352a;
}

[data-theme="dark"] .card-header {
    background: linear-gradient(135deg, #1f251f 0%, #1a1f1a 100%);
    border-bottom-color: #2a352a;
    color: #d0dac0;
}

[data-theme="dark"] .card-footer {
    background: linear-gradient(135deg, #1f251f 0%, #1a1f1a 100%);
    border-top-color: #2a352a;
}

[data-theme="dark"] .table {
    color: #c0cac0;
    border-color: #2a352a;
    background: var(--bg-card, #1a1f1a);
}

[data-theme="dark"] .table thead th {
    background-color: #1f251f;
    border-color: #2a352a;
    color: #a0b0a0;
}

[data-theme="dark"] .table tbody td {
    border-bottom-color: #252a25;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: #1f251f;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #0f1410;
    border-color: #2a352a;
    color: #d0dac0;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    border-color: #7a9a3a;
    box-shadow: 0 0 0 3px rgba(122, 154, 58, 0.15);
    background-color: #151a15;
}

[data-theme="dark"] .form-control::placeholder {
    color: #5a6a5a;
}

[data-theme="dark"] .form-label {
    color: #b0bab0;
}

[data-theme="dark"] .input-group-text {
    background: #1f251f;
    border-color: #2a352a;
    color: #9aa09a;
}

[data-theme="dark"] .text-muted {
    color: #7a8a7a !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #e0e8e0;
}

[data-theme="dark"] .modal-content {
    background-color: #1a1f1a;
    border-color: #2a352a;
    color: #d0dac0;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #2a352a;
}

[data-theme="dark"] .btn-close {
    filter: invert(0.8);
}

[data-theme="dark"] .dropdown-menu {
    background-color: #1a1f1a;
    border-color: #2a352a;
}

[data-theme="dark"] .dropdown-item {
    color: #c0cac0;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #1f251f;
    color: #e0e8e0;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #2a352a;
}

[data-theme="dark"] .list-group-item {
    background-color: #1a1f1a;
    border-color: #2a352a;
    color: #c0cac0;
}

[data-theme="dark"] .list-group-item:hover {
    background-color: #1f251f;
}

[data-theme="dark"] .bg-light {
    background-color: #1f251f !important;
}

[data-theme="dark"] .bg-white {
    background-color: #1a1f1a !important;
}

[data-theme="dark"] .notification-dropdown {
    background: linear-gradient(180deg, #1a1f1a 0%, #151a15 100%);
    border-color: #2a352a;
}

[data-theme="dark"] .notification-dropdown .dropdown-item {
    color: #c0cac0;
    border-bottom-color: #252a25;
}

[data-theme="dark"] .notification-dropdown .dropdown-item:hover {
    background-color: #1f251f;
}

[data-theme="dark"] .notification-dropdown .dropdown-header {
    background: #151a15;
    border-bottom-color: #2a352a;
    color: #d0dac0;
}

[data-theme="dark"] .alert {
    background-color: #1f251f;
    border-color: #2a352a;
    color: #c0cac0;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(107, 142, 35, 0.12);
    border-color: rgba(107, 142, 35, 0.25);
    color: #9aba4a;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(200, 90, 84, 0.12);
    border-color: rgba(200, 90, 84, 0.25);
    color: #e87a6a;
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(200, 160, 60, 0.12);
    border-color: rgba(200, 160, 60, 0.25);
    color: #d8b84a;
}

[data-theme="dark"] .alert-info {
    background-color: rgba(90, 140, 160, 0.12);
    border-color: rgba(90, 140, 160, 0.25);
    color: #7ab0c0;
}

[data-theme="dark"] .pagination .page-link {
    background-color: #1a1f1a;
    border-color: #2a352a;
    color: #c0cac0;
}

[data-theme="dark"] .pagination .page-link:hover {
    background-color: #1f251f;
    color: #9aba4a;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #6a8a2a;
    border-color: #6a8a2a;
    color: white;
}

[data-theme="dark"] .stat-card.stat-secondary {
    background: #1f251f;
    color: #c0cac0;
    border-color: #2a352a;
}

[data-theme="dark"] .badge.bg-warning {
    background: rgba(200, 160, 60, 0.2) !important;
    color: #d8b84a !important;
}

[data-theme="dark"] .badge.bg-danger {
    background: rgba(200, 90, 84, 0.2) !important;
    color: #e87a6a !important;
}

[data-theme="dark"] .badge.bg-success {
    background: rgba(107, 142, 35, 0.2) !important;
    color: #9aba4a !important;
}

[data-theme="dark"] .badge.bg-info {
    background: rgba(13, 202, 240, 0.2) !important;
    color: #6dd5ed !important;
}

[data-theme="dark"] .badge.bg-primary {
    background: rgba(107, 142, 35, 0.2) !important;
    color: #9aba4a !important;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #151a15;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #3a453a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #4a554a;
}

/* ===================================
   LIGHT THEME EXPLICIT OVERRIDES
   =================================== */

/* Theme Toggle Icons */
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: inline-block; }

/* Navbar */
[data-theme="light"] nav.navbar {
    background: linear-gradient(135deg, #6B8E23 0%, #5a7a1f 100%) !important;
    border-bottom-color: #5a7a1f !important;
}

/* Sidebar */
[data-theme="light"] #sidebarMenu {
    background: linear-gradient(180deg, #ffffff 0%, #fafcf8 100%) !important;
    border-right-color: #e0e8d5 !important;
}

[data-theme="light"] .offcanvas-header {
    background: #f5f8f0 !important;
    border-bottom-color: #e0e8d5 !important;
}

[data-theme="light"] .offcanvas-title {
    color: #2c3e50 !important;
}

[data-theme="light"] .nav-link {
    color: #4a5a4a !important;
}

[data-theme="light"] .nav-link:hover {
    color: #6B8E23 !important;
    background-color: #f5f8f0 !important;
}

[data-theme="light"] .nav-link.active {
    color: #6B8E23 !important;
    background-color: rgba(107, 142, 35, 0.1) !important;
}

[data-theme="light"] .sidebar-section-heading {
    color: #7a8a7a !important;
}

[data-theme="light"] .sidebar-divider {
    border-color: #e0e8d5 !important;
}

/* Main Content */
[data-theme="light"] .main-content {
    background-color: #f5f8f0 !important;
}

/* Cards */
[data-theme="light"] .card {
    background-color: #ffffff !important;
    border-color: #e0e8d5 !important;
}

[data-theme="light"] .card-header {
    background: linear-gradient(135deg, #f5f8f0 0%, #eef3e5 100%) !important;
    border-bottom-color: #e0e8d5 !important;
    color: #2c3e50 !important;
}

[data-theme="light"] .card-footer {
    background-color: #fafcf8 !important;
    border-top-color: #e0e8d5 !important;
}

/* Tables */
[data-theme="light"] .table {
    color: #2c3e50 !important;
}

[data-theme="light"] .table thead th {
    background-color: #f5f8f0 !important;
    border-bottom-color: #e0e8d5 !important;
    color: #3a5a2a !important;
}

[data-theme="light"] .table tbody td {
    border-bottom-color: #e5e7eb !important;
}

[data-theme="light"] .table-hover tbody tr:hover {
    background-color: #f5f8f0 !important;
}

/* Forms */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background-color: #ffffff !important;
    border-color: #e0e8d5 !important;
    color: #2c3e50 !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    border-color: #6B8E23 !important;
    box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.15) !important;
}

[data-theme="light"] .form-control::placeholder {
    color: #9ca3af !important;
}

[data-theme="light"] .form-label {
    color: #3a5a2a !important;
}

[data-theme="light"] .input-group-text {
    background-color: #f5f8f0 !important;
    border-color: #e0e8d5 !important;
    color: #5a6c7d !important;
}

/* Text */
[data-theme="light"] .text-muted {
    color: #6c757d !important;
}

[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3,
[data-theme="light"] h4, [data-theme="light"] h5, [data-theme="light"] h6 {
    color: #2c3e50 !important;
}

/* Modals */
[data-theme="light"] .modal-content {
    background-color: #ffffff !important;
    border-color: #e0e8d5 !important;
}

[data-theme="light"] .modal-header,
[data-theme="light"] .modal-footer {
    border-color: #e0e8d5 !important;
}

[data-theme="light"] .btn-close {
    filter: none !important;
}

/* Dropdowns */
[data-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
    border-color: #e0e8d5 !important;
}

[data-theme="light"] .dropdown-item {
    color: #2c3e50 !important;
}

[data-theme="light"] .dropdown-item:hover {
    background-color: #f5f8f0 !important;
    color: #6B8E23 !important;
}

[data-theme="light"] .dropdown-divider {
    border-color: #e0e8d5 !important;
}

/* List Groups */
[data-theme="light"] .list-group-item {
    background-color: #ffffff !important;
    border-color: #e0e8d5 !important;
    color: #2c3e50 !important;
}

[data-theme="light"] .list-group-item:hover {
    background-color: #f5f8f0 !important;
}

/* Backgrounds */
[data-theme="light"] .bg-light {
    background-color: #f5f8f0 !important;
}

[data-theme="light"] .bg-white {
    background-color: #ffffff !important;
}

/* Notification Dropdown */
[data-theme="light"] .notification-dropdown {
    background-color: #ffffff !important;
    border-color: #e0e8d5 !important;
}

[data-theme="light"] .notification-dropdown .dropdown-item {
    color: #2c3e50 !important;
    border-bottom-color: #e0e8d5 !important;
}

[data-theme="light"] .notification-dropdown .dropdown-item:hover {
    background-color: #f5f8f0 !important;
}

[data-theme="light"] .notification-dropdown .dropdown-header {
    background-color: #f5f8f0 !important;
    color: #3a5a2a !important;
    border-bottom-color: #e0e8d5 !important;
}

/* Alerts */
[data-theme="light"] .alert {
    border-width: 1px !important;
}

[data-theme="light"] .alert-success {
    background-color: rgba(107, 142, 35, 0.1) !important;
    border-color: rgba(107, 142, 35, 0.3) !important;
    color: #3a5a2a !important;
}

[data-theme="light"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
    color: #721c24 !important;
}

[data-theme="light"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
    color: #856404 !important;
}

[data-theme="light"] .alert-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
    border-color: rgba(13, 202, 240, 0.3) !important;
    color: #0a7a92 !important;
}

/* Pagination */
[data-theme="light"] .pagination .page-link {
    background-color: #ffffff !important;
    border-color: #e0e8d5 !important;
    color: #5a6c7d !important;
}

[data-theme="light"] .pagination .page-link:hover {
    background-color: #f5f8f0 !important;
    border-color: #c8d8b5 !important;
    color: #6B8E23 !important;
}

[data-theme="light"] .pagination .page-item.active .page-link {
    background-color: #6B8E23 !important;
    border-color: #6B8E23 !important;
    color: #ffffff !important;
}

/* Stat Card Secondary */
[data-theme="light"] .stat-card.stat-secondary {
    border-left-color: #6c757d !important;
}

/* Badges */
[data-theme="light"] .badge.bg-warning {
    background-color: rgba(255, 193, 7, 0.85) !important;
    color: #2c3e50 !important;
}

[data-theme="light"] .badge.bg-danger {
    background-color: rgba(220, 53, 69, 0.85) !important;
    color: #ffffff !important;
}

[data-theme="light"] .badge.bg-success {
    background-color: rgba(107, 142, 35, 0.85) !important;
    color: #ffffff !important;
}

[data-theme="light"] .badge.bg-info {
    background-color: rgba(13, 202, 240, 0.85) !important;
    color: #ffffff !important;
}

[data-theme="light"] .badge.bg-primary {
    background-color: rgba(107, 142, 35, 0.85) !important;
    color: #ffffff !important;
}

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f5f8f0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c8d8b5;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #a8c89a;
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-olive {
    color: var(--olive-primary) !important;
}

.bg-olive {
    background-color: var(--olive-primary) !important;
}

.bg-olive-light {
    background-color: #f5f8f0 !important;
}

.border-olive {
    border-color: var(--olive-primary) !important;
}

/* ===================================
   STANDARDIZED BUTTON CLASSES
   Used across all admin pages
   =================================== */

/* Primary Olive Button */
.btn-olive {
    background: linear-gradient(135deg, #7a9a28 0%, #6B8E23 50%, #5a7a1f 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(107, 142, 35, 0.25);
}

.btn-olive:hover,
.btn-olive:focus {
    background: linear-gradient(135deg, #6B8E23 0%, #5a7a1f 50%, #4a6a18 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.35);
    transform: translateY(-1px);
}

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

/* Outline Olive Button */
.btn-outline-olive {
    background: transparent !important;
    border: 2px solid var(--olive-primary) !important;
    color: var(--olive-primary) !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-outline-olive:hover,
.btn-outline-olive:focus {
    background: rgba(107, 142, 35, 0.1) !important;
    border-color: #5a7a1f !important;
    color: #5a7a1f !important;
}

[data-theme="dark"] .btn-outline-olive {
    border-color: #9aba4a !important;
    color: #9aba4a !important;
}

[data-theme="dark"] .btn-outline-olive:hover {
    background: rgba(154, 186, 74, 0.15) !important;
    border-color: #9aba4a !important;
    color: #9aba4a !important;
}

/* Button with icon alignment */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===================================
   PROFESSIONAL ALERT STYLES
   Consistent alerts across all pages
   =================================== */

/* Success Alert */
.alert-success-professional {
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.1) 0%, rgba(107, 142, 35, 0.05) 100%);
    border: 2px solid rgba(107, 142, 35, 0.25);
    border-left: 4px solid var(--olive-primary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #3a5a2a;
}

.alert-success-professional i {
    color: var(--olive-primary);
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

/* Danger Alert */
.alert-danger-professional {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border: 2px solid rgba(220, 53, 69, 0.25);
    border-left: 4px solid #dc3545;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #721c24;
}

.alert-danger-professional i {
    color: #dc3545;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

/* Warning Alert */
.alert-warning-professional {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.08) 100%);
    border: 2px solid rgba(255, 193, 7, 0.35);
    border-left: 4px solid #ffc107;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #856404;
}

.alert-warning-professional i {
    color: #e0a800;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

/* Info Alert */
.alert-info-professional {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(13, 202, 240, 0.05) 100%);
    border: 2px solid rgba(13, 202, 240, 0.25);
    border-left: 4px solid #0dcaf0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #055160;
}

.alert-info-professional i {
    color: #0dcaf0;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

/* Dark mode professional alerts */
[data-theme="dark"] .alert-success-professional {
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.15) 0%, rgba(107, 142, 35, 0.08) 100%);
    border-color: rgba(107, 142, 35, 0.3);
    color: #9aba4a;
}

[data-theme="dark"] .alert-danger-professional {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.08) 100%);
    border-color: rgba(220, 53, 69, 0.3);
    color: #e87a6a;
}

[data-theme="dark"] .alert-warning-professional {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.08) 100%);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

[data-theme="dark"] .alert-info-professional {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.15) 0%, rgba(13, 202, 240, 0.08) 100%);
    border-color: rgba(13, 202, 240, 0.3);
    color: #6dd5ed;
}

/* ===================================
   STANDARDIZED PAGE HEADER
   =================================== */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-weight: 700;
    color: var(--olive-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    margin-bottom: 0;
}

[data-theme="dark"] .page-header h2 {
    color: #9aba4a;
}

/* ===================================
   STANDARDIZED FILTER CARD
   =================================== */
.filter-card {
    border-left: 4px solid var(--olive-primary) !important;
}

/* ===================================
   LIFT HOVER EFFECT
   =================================== */
.lift-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lift-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

/* ===================================
   ICON CONTAINERS
   =================================== */
.icon-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1rem;
}

.icon-container-lg {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
}

/* ===================================
   BADGE VARIANTS
   =================================== */
.badge-olive {
    background: var(--olive-primary) !important;
    color: white !important;
}

.badge-beige {
    background: var(--beige-primary, #f5f0e8) !important;
    color: var(--olive-darker, #4a5a3a) !important;
    border: 1px solid var(--beige-dark, #e0d8c8) !important;
}

/* ===================================
   FORM LABEL PROFESSIONAL
   =================================== */
.form-label-professional {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--olive-darker, #4a5a3a);
    margin-bottom: 0.5rem;
    display: block;
}

.form-label-professional.required::after {
    content: ' *';
    color: #dc3545;
}

[data-theme="dark"] .form-label-professional {
    color: #b0bab0;
}

/* ===================================
   STANDARDIZED TABLE HEADER
   =================================== */
.table-header-gradient thead th {
    background: linear-gradient(135deg, var(--beige-light, #f8f5f0) 0%, var(--beige-primary, #f0ebe2) 100%) !important;
    border-bottom: 2px solid var(--olive-primary) !important;
    color: var(--olive-darker, #4a5a3a) !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[data-theme="dark"] .table-header-gradient thead th {
    background: linear-gradient(135deg, #1f251f 0%, #1a1f1a 100%) !important;
    border-bottom-color: #3a4a3a !important;
    color: #a0b0a0 !important;
}

/* ===================================
   CARD HEADER VARIANTS
   =================================== */
.card-header-gradient {
    background: linear-gradient(135deg, var(--beige-light, #f8f5f0) 0%, var(--beige-primary, #f0ebe2) 100%) !important;
    border-bottom: 2px solid var(--beige-dark, #e0d8c8) !important;
    padding: 1rem 1.25rem;
    border-radius: 16px 16px 0 0;
}

.card-header-gradient h5,
.card-header-gradient h6 {
    color: var(--olive-primary) !important;
    font-weight: 600;
    margin: 0;
}

[data-theme="dark"] .card-header-gradient {
    background: linear-gradient(135deg, #1f251f 0%, #1a1f1a 100%) !important;
    border-bottom-color: #2a352a !important;
}

[data-theme="dark"] .card-header-gradient h5,
[data-theme="dark"] .card-header-gradient h6 {
    color: #9aba4a !important;
}

/* ===================================
   RESPONSIVE UTILITIES
   =================================== */
@media (max-width: 767px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .page-header .btn-toolbar {
        width: 100%;
    }

    .page-header .btn-toolbar .btn {
        flex: 1;
    }
}
