.navbar-brand-image {
    filter: none !important;
}

.logo-large-login {
    width: 80px;
    height: auto;
}

/* Tom Select — fixes for rendering inside Bootstrap modals */
.modal .ts-wrapper {
    position: relative;
    z-index: auto;
}
.modal .ts-wrapper.ts-focus {
    z-index: 2;
}
.modal .ts-dropdown,
.ts-dropdown {
    z-index: 2000 !important;
    background-color: var(--tblr-bg-surface) !important;
    border: 1px solid var(--tblr-border-color) !important;
    opacity: 1 !important;
}
.modal-body {
    overflow: visible;
}
.ts-wrapper.form-select {
    padding: 0;
    height: auto;
    min-height: calc(2.4rem + 2px);
}
.ts-control {
    background: var(--tblr-bg-forms) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--tblr-border-radius) !important;
    min-height: calc(2.4rem);
}
.ts-control input {
    color: var(--tblr-body-color) !important;
}
.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background-color: var(--tblr-primary);
    color: #fff;
}

/* ==========================================================================
   KR4BAT KOMPOS - REDESIGNED LAYOUT STYLE (FIGMA GREEN THEME)
   ========================================================================== */

:root {
    --kompos-green: #378A46;
    --kompos-green-hover: #2e753b;
    --kompos-green-active: rgba(255, 255, 255, 0.18);
    --kompos-green-text-light: #a3d9ad;
    --kompos-bg-light: #F4FBF6;
    --kompos-border-radius-large: 24px;
    --kompos-card-shadow: 0 8px 24px rgba(55, 138, 70, 0.05);
}

/* Global Admin Layout Wrapper */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--kompos-green);
    overflow: hidden;
}

/* Sidebar Styling */
.admin-sidebar {
    width: 280px;
    min-width: 280px;
    background-color: #ffffff;
    color: #334155;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
}

/* Sidebar Logo / Branding */
.sidebar-brand-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--kompos-green) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.sidebar-brand span {
    color: #2e753b;
}

/* Sidebar Search Bar Pill */
.sidebar-search-box {
    position: relative;
    margin-bottom: 2rem;
}

.sidebar-search-box input {
    width: 100%;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155 !important;
    border-radius: 50px;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.sidebar-search-box input::placeholder {
    color: #94a3b8;
}

.sidebar-search-box input:focus {
    background-color: #ffffff;
    border-color: var(--kompos-green);
    box-shadow: 0 0 0 3px rgba(55, 138, 70, 0.15);
}

.sidebar-search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
}

/* Sidebar Menu Group Title */
.sidebar-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.sidebar-group-title:first-child {
    margin-top: 0;
}

/* Sidebar Menu Links */
.sidebar-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    color: #475569 !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.sidebar-link i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.sidebar-link:hover {
    background-color: #eaf5ec;
    color: var(--kompos-green) !important;
}

.sidebar-link:hover i {
    transform: scale(1.05);
}

.sidebar-link.active {
    background-color: var(--kompos-green);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(55, 138, 70, 0.25);
}

/* Sidebar sub-menu border override for white background */
.admin-sidebar .collapse ul {
    border-left: 1px dashed rgba(55, 138, 70, 0.2) !important;
}

/* Sidebar Logout link specific styles */
.sidebar-link.text-danger {
    color: #ef4444 !important;
}

.sidebar-link.text-danger i {
    color: #ef4444 !important;
}

.sidebar-link.text-danger:hover {
    background-color: #fee2e2;
    color: #ef4444 !important;
}

/* Content Area Wrapper */
.admin-content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding: 1.5rem;
    background-color: var(--kompos-green);
}

/* Large White Rounded Content Card */
.admin-main-card {
    background-color: #ffffff;
    border-radius: var(--kompos-border-radius-large);
    flex-grow: 1;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 3rem);
    max-height: calc(100vh - 3rem);
    position: relative;
    overflow-y: auto;
}

/* Top bar inside the main card for User dropdown, role switcher and theme toggle */
.main-card-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 1rem;
}

/* Hide page-level search elements to avoid duplication with topbar search */
#page-container .table-search-box,
#page-container .ms-auto.text-muted:has(input[id*="search"]),
#page-container .col-md-4:has(input[id*="search"]),
#page-container input[id*="search"] {
    display: none !important;
}

.topbar-action-item {
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.topbar-action-item:hover {
    color: var(--kompos-green);
    text-decoration: none;
}

/* Welcome banner styling on dashboard */
.welcome-banner {
    margin-bottom: 2rem;
}

.welcome-banner h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.welcome-banner p {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

/* Premium Dashboard Metrics Cards */
.metric-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--kompos-card-shadow);
    border-color: #cbd5e1;
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    width: 100%;
}

.metric-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-title-wrapper i {
    font-size: 1.1rem;
}

.metric-badge-right {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    background-color: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.metric-value {
    font-size: 2.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

.metric-subtitle-badge {
    align-self: center;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 30px;
    padding: 0.25rem 0.75rem;
}

.badge-trend-up {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-trend-neutral {
    background-color: #f1f5f9;
    color: #64748b;
}

/* Custom Table Layout inside Cards */
.table-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--kompos-card-shadow);
}

.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.table-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-card-title i {
    color: var(--kompos-green);
}

.table-search-box {
    position: relative;
    width: 200px;
}

.table-search-box input {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    padding: 0.4rem 1rem 0.4rem 2rem;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.table-search-box input:focus {
    background-color: #ffffff;
    border-color: var(--kompos-green);
    box-shadow: 0 0 0 3px rgba(55, 138, 70, 0.15);
}

.table-search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.9rem;
}

.custom-table {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
}

.custom-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.custom-table td {
    font-size: 0.88rem;
    color: #334155;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

/* Badge helpers */
.badge-compost-weight {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
}

.badge-compost-weight.negative {
    background-color: #f1f5f9;
    color: #64748b;
}

.badge-compost-weight.positive {
    background-color: #ffe4e6;
    color: #f43f5e;
}

.badge-status-active {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
}

.link-custom {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

.link-custom:hover {
    color: #1d4ed8;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
    }
    .admin-content-area {
        padding: 1rem;
    }
}

/* ==========================================================================
   KR4BAT KOMPOS - LOGIN REDESIGN
   ========================================================================== */

.login-page-body {
    background-color: #D8D3D3 !important;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1.5rem;
}

.btn-back-home {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.btn-back-home:hover {
    color: var(--kompos-green);
    background-color: #e2e8f0;
    text-decoration: none;
    transform: translateX(-2px);
}

.login-wrapper {
    width: 100%;
    max-width: 1080px;
    display: flex;
    justify-content: center;
}

.login-card {
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    display: flex;
    width: 100%;
    min-height: 560px;
    padding: 2.5rem;
    gap: 2.5rem;
    align-items: stretch;
}

.login-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 2rem;
}

.login-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 2.5rem;
}

.login-input {
    border-radius: 50px !important;
    height: 54px;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease;
    background-color: #ffffff !important;
    color: #1e293b !important;
}

.login-input::placeholder {
    color: #94a3b8;
}

.login-input:focus {
    border-color: var(--kompos-green) !important;
    box-shadow: 0 0 0 3px rgba(55, 138, 70, 0.15) !important;
}

/* Password Toggle Icon placement */
.password-toggle-btn {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: #64748b;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    z-index: 10;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--kompos-green);
}

/* Forgot Password styling */
.forgot-password-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--kompos-green);
}

/* Captcha styling */
.captcha-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.captcha-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    height: 54px;
    padding: 0 1rem 0 1.5rem;
    user-select: none;
}

#captcha-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #334155;
}

.captcha-refresh-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.captcha-refresh-btn:hover {
    background-color: #e2e8f0;
    color: var(--kompos-green);
    transform: rotate(45deg);
}

.captcha-input-field {
    flex: 1;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem !important;
    font-weight: 800;
    letter-spacing: 4px;
}

/* Submit button */
.btn-login-submit {
    width: 100%;
    height: 54px;
    background-color: #103B1E !important; /* Rich Dark Green from Figma */
    color: #ffffff !important;
    border-radius: 50px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    border: none !important;
    transition: all 0.2s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-login-submit:hover {
    background-color: #1A542D !important; /* Slightly lighter on hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 59, 30, 0.2);
}

.btn-login-submit:active {
    transform: translateY(1px);
}

.btn-login-submit:disabled {
    background-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Right Illustration Column */
.login-illustration-side {
    flex: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-container {
    width: 100%;
    height: 100%;
    background-color: #F0F4F1; /* Soft Light Green Background from Figma */
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.illustration-img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .login-card {
        flex-direction: column;
        padding: 2rem;
        max-width: 500px;
        min-height: auto;
    }
    
    .login-illustration-side {
        display: none; /* Hide illustration on tablets and mobiles */
    }
    
    .login-form-side {
        padding: 1rem 0.5rem;
    }
}

/* ==========================================================================
   KR4BAT KOMPOS - DASHBOARD LAYOUT & THEME OVERRIDES
   ========================================================================== */

/* Force Green Brand Theme for Buttons globally */
.btn-primary {
    background-color: var(--kompos-green) !important;
    border-color: var(--kompos-green) !important;
    color: #ffffff !important;
    transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--kompos-green-hover) !important;
    border-color: var(--kompos-green-hover) !important;
}

.btn-outline-primary {
    color: var(--kompos-green) !important;
    border-color: var(--kompos-green) !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--kompos-green) !important;
    border-color: var(--kompos-green) !important;
    color: #ffffff !important;
}

/* Green Theme Form Control Focus Glow */
.form-control:focus,
.form-select:focus,
.ts-wrapper.form-select.ts-focus .ts-control {
    border-color: var(--kompos-green) !important;
    box-shadow: 0 0 0 3px rgba(55, 138, 70, 0.15) !important;
}

/* Active Pagination Links */
.pagination .page-item.active .page-link {
    background-color: var(--kompos-green) !important;
    border-color: var(--kompos-green) !important;
    color: #ffffff !important;
}

.pagination .page-link {
    color: var(--kompos-green);
}

/* Refine Nested Cards in the Main Container (remove duplicate heavy shadows/borders) */
.admin-main-card .card,
.admin-main-card .table-card {
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 4px 12px rgba(55, 138, 70, 0.02) !important;
    border-radius: 16px !important;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    padding: 0 !important;
}

.admin-main-card .card-header,
.admin-main-card .table-card-header {
    background-color: #fafbfc !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1rem 1.25rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Scrollbar customization for a premium feel */
.admin-main-card::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.admin-main-card::-webkit-scrollbar-track {
    background: transparent;
}

.admin-main-card::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.admin-main-card::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Mobile responsive card adjustments & scroll release */
@media (max-width: 991.98px) {
    .admin-content-area {
        height: auto;
        overflow: visible;
        padding: 1rem;
    }
    
    .admin-main-card {
        padding: 1.25rem;
        height: auto;
        max-height: none;
        overflow: visible;
    }
}

/* ==========================================================================
   KR4BAT KOMPOS - PREMIUM NAVY DARK MODE PALETTE
   ========================================================================== */

[data-bs-theme="dark"] {
    /* Page & card variables override */
    --bs-body-bg: #0d1527 !important;
    --bs-card-bg: #152238 !important;
    --bs-border-color: #1e293b !important;
    --bs-body-color: #f1f5f9 !important;
    --bs-secondary-color: #94a3b8 !important;
    
    --tblr-body-bg: #0d1527 !important;
    --tblr-bg-surface: #152238 !important;
    --tblr-border-color: #1e293b !important;
    --tblr-body-color: #f1f5f9 !important;
    --tblr-muted-color: #94a3b8 !important;

    /* Custom Blue Accent Palette to replace Green in Dark Mode */
    --dark-accent-blue: #2563eb;
    --dark-accent-blue-hover: #1d4ed8;
    --dark-accent-blue-focus: rgba(37, 99, 235, 0.25);
    --dark-accent-blue-light: #60a5fa;
    --dark-accent-blue-bg: rgba(37, 99, 235, 0.15);
}

/* Page body, content area, and layout wrappers to solid Black */
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .admin-layout,
[data-bs-theme="dark"] .admin-content-area {
    background-color: #000000 !important;
}

/* Sidebar overrides */
[data-bs-theme="dark"] .admin-sidebar {
    background-color: #152238 !important;
    color: #f1f5f9 !important;
    border-right: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .sidebar-brand {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .sidebar-brand span {
    color: var(--dark-accent-blue-light) !important;
}

[data-bs-theme="dark"] .sidebar-search-box input {
    background-color: #0d1527 !important;
    border: 1px solid #1e293b !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .sidebar-search-box input::placeholder {
    color: #475569 !important;
}

[data-bs-theme="dark"] .sidebar-search-box i {
    color: #475569 !important;
}

[data-bs-theme="dark"] .sidebar-group-title {
    color: #64748b !important;
}

[data-bs-theme="dark"] .sidebar-link {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .sidebar-link.active {
    background-color: var(--dark-accent-blue) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .sidebar-link.text-danger {
    color: #ef4444 !important;
}

[data-bs-theme="dark"] .sidebar-link.text-danger i {
    color: #ef4444 !important;
}

[data-bs-theme="dark"] .sidebar-link.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

[data-bs-theme="dark"] .admin-sidebar .collapse ul {
    border-left: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

/* Card components */
[data-bs-theme="dark"] .admin-main-card {
    background-color: #152238 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .admin-main-card .card,
[data-bs-theme="dark"] .admin-main-card .table-card {
    background-color: #0d1527 !important;
    border: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .admin-main-card .card-header,
[data-bs-theme="dark"] .admin-main-card .table-card-header {
    background-color: #0c1322 !important;
    border-bottom: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .table-card-title {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .welcome-banner h2 {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .welcome-banner p {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .main-card-topbar {
    border-bottom: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .topbar-action-item {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .topbar-action-item:hover {
    color: #ffffff !important;
}

[data-bs-theme="dark"] #navbar-username {
    color: #ffffff !important;
}

/* Metric card overrides in dark mode */
[data-bs-theme="dark"] .metric-card {
    background-color: #0d1527 !important;
    border: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .metric-card:hover {
    border-color: var(--dark-accent-blue) !important;
}

[data-bs-theme="dark"] .metric-title-wrapper {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .metric-value {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .badge-trend-neutral {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .metric-badge-right {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

/* Global button theme overrides in dark mode to replace Green with Blue */
[data-bs-theme="dark"] .btn-primary {
    background-color: var(--dark-accent-blue) !important;
    border-color: var(--dark-accent-blue) !important;
}

[data-bs-theme="dark"] .btn-primary:hover, 
[data-bs-theme="dark"] .btn-primary:focus, 
[data-bs-theme="dark"] .btn-primary:active {
    background-color: var(--dark-accent-blue-hover) !important;
    border-color: var(--dark-accent-blue-hover) !important;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: var(--dark-accent-blue) !important;
    border-color: var(--dark-accent-blue) !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover, 
[data-bs-theme="dark"] .btn-outline-primary:focus, 
[data-bs-theme="dark"] .btn-outline-primary:active {
    background-color: var(--dark-accent-blue) !important;
    border-color: var(--dark-accent-blue) !important;
    color: #ffffff !important;
}

/* Active Pagination Links */
[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--dark-accent-blue) !important;
    border-color: var(--dark-accent-blue) !important;
}

[data-bs-theme="dark"] .pagination .page-link {
    color: var(--dark-accent-blue);
}

/* Form Controls & Inputs */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .ts-control,
[data-bs-theme="dark"] .ts-dropdown {
    background-color: #0d1527 !important;
    border: 1px solid #1e293b !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .form-select::placeholder {
    color: #475569 !important;
}

[data-bs-theme="dark"] .ts-control input::placeholder {
    color: #475569 !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .ts-wrapper.form-select.ts-focus .ts-control {
    border-color: var(--dark-accent-blue) !important;
    box-shadow: 0 0 0 3px var(--dark-accent-blue-focus) !important;
}

/* Tables in dark mode */
[data-bs-theme="dark"] .custom-table th {
    background-color: #0c1322 !important;
    border-bottom: 2px solid #1e293b !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .custom-table td {
    color: #e2e8f0 !important;
    border-bottom: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .badge-compost-weight.negative {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

/* Specific elements to replace green layout highlights in dark mode */
[data-bs-theme="dark"] .ti-leaf {
    color: var(--dark-accent-blue-light) !important;
}

[data-bs-theme="dark"] .table-card-title i {
    color: var(--dark-accent-blue-light) !important;
}

[data-bs-theme="dark"] .badge-status-active {
    background-color: var(--dark-accent-blue-bg) !important;
    color: var(--dark-accent-blue-light) !important;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
}

[data-bs-theme="dark"] .link-custom {
    color: var(--dark-accent-blue-light) !important;
}

/* Login page dark mode styling */
[data-bs-theme="dark"] .login-page-body {
    background-color: #0d1527 !important;
}

[data-bs-theme="dark"] .btn-back-home {
    color: #94a3b8;
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .btn-back-home:hover {
    color: var(--dark-accent-blue-light);
    background-color: #0d1527;
}

[data-bs-theme="dark"] .login-card {
    background-color: #152238 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .login-title {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .login-subtitle {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .login-input {
    background-color: #0d1527 !important;
    border: 1px solid #1e293b !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .login-input::placeholder {
    color: #475569 !important;
}

[data-bs-theme="dark"] .login-input:focus {
    border-color: var(--dark-accent-blue) !important;
    box-shadow: 0 0 0 3px var(--dark-accent-blue-focus) !important;
}

[data-bs-theme="dark"] .forgot-password-link {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .forgot-password-link:hover {
    color: var(--dark-accent-blue-light) !important;
}

[data-bs-theme="dark"] .captcha-box {
    background-color: #0d1527 !important;
    border: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] #captcha-code {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .captcha-refresh-btn {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .captcha-refresh-btn:hover {
    background-color: #1e293b !important;
    color: var(--dark-accent-blue-light) !important;
}

[data-bs-theme="dark"] .captcha-input-field {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .illustration-container {
    background-color: #0d1527 !important;
}

[data-bs-theme="dark"] .password-toggle-btn {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .password-toggle-btn:hover {
    color: var(--dark-accent-blue-light) !important;
}

[data-bs-theme="dark"] .btn-login-submit {
    background-color: var(--dark-accent-blue) !important;
}

[data-bs-theme="dark"] .btn-login-submit:hover {
    background-color: var(--dark-accent-blue-hover) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Modals in dark mode */
[data-bs-theme="dark"] .modal-content {
    background-color: #152238 !important;
    border: 1px solid #1e293b !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .modal-footer {
    border-top: 1px solid #1e293b !important;
}

[data-bs-theme="dark"] .modal-title {
    color: #ffffff !important;
}

/* Force Re-mapping of Success Color Classes to Blue in Dark Mode */
[data-bs-theme="dark"] .bg-success {
    background-color: var(--dark-accent-blue) !important;
}

[data-bs-theme="dark"] .text-success {
    color: var(--dark-accent-blue-light) !important;
}

[data-bs-theme="dark"] .text-success-fg {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(37, 99, 235, 0.1) !important;
    border-color: rgba(37, 99, 235, 0.2) !important;
    color: var(--dark-accent-blue-light) !important;
}

/* Override table search input focus to Blue in Dark Mode */
[data-bs-theme="dark"] .table-search-box input:focus {
    background-color: #0d1527 !important;
    border-color: var(--dark-accent-blue) !important;
    box-shadow: 0 0 0 3px var(--dark-accent-blue-focus) !important;
}

[data-bs-theme="dark"] .badge-trend-up {
    background-color: var(--dark-accent-blue-bg) !important;
    color: var(--dark-accent-blue-light) !important;
}