/* static/css/jazzmin_custom.css */

/* Your brand's primary color from base.html */
:root {
    --brand-primary: #003b6f !important;
    --brand-light: #e6edf4 !important;
    /* Light version of your primary color */
}


/* Pagination */
.page-item.active .page-link {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.page-link {
    color: var(--brand-primary) !important;
}

/* Links */
a,
a:hover {
    color: var(--brand-primary) !important;
}

/* Table header links should stay black */
.table thead th a {
    color: #343a40 !important;
}

/* ----- SIDEBAR ----- */
/* Light sidebar background */
.sidebar {
    background-color: #f8f9fa !important;
    border-right: 1px solid #dee2e6 !important;
}

/* Sidebar active item */
.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: var(--brand-primary) !important;
}

/* Sidebar hover effect */
.nav-sidebar .nav-link:hover {
    background-color: var(--brand-light) !important;
}

/* Sidebar text color */
.nav-sidebar .nav-link p,
.nav-sidebar .nav-link i {
    color: #495057 !important;
}

/* Sidebar active text color */
.nav-sidebar .nav-link.active p,
.nav-sidebar .nav-link.active i {
    color: white !important;
}

/* ----- NAVBAR ----- */
.main-header {
    background-color: white !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* Ensure navbar items are visible */
.navbar-nav .nav-item {
    display: block !important;
    visibility: visible !important;
}

/* Make sure user dropdown icon is visible */
.navbar-nav .nav-item .nav-link {
    display: flex !important;
    align-items: center !important;
    color: #495057 !important;
}

/* User dropdown styling */
.navbar-nav .nav-item.dropdown .nav-link i {
    font-size: 18px !important;
    color: var(--brand-primary) !important;
}

/* ----- CONTENT ----- */
.content-header {
    background-color: white !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* ----- CARD STYLING ----- */
.card {
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04) !important;
}

/* ----- TOP BRANDING AREA ----- */
.main-sidebar .brand-link {
    background-color: white !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* Fix logo in sidebar */
.brand-link img {
    width: auto !important;
    height: 40px !important;
    max-width: 180px !important;
    padding: 5px 10px !important;
    border-radius: 0 !important;
    object-fit: contain !important;
}

/* Adjust the brand link container */
.brand-link {
    color: var(--brand-primary) !important;
    font-weight: 600;
    height: auto !important;
    padding: 10px !important;
    text-align: left !important;
}

/* Fix the positioning of brand text */
.brand-text {
    margin-left: 10px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* ----- USER PANEL (TOP OF SIDEBAR) ----- */
.user-panel {
    border-bottom: 1px solid #dee2e6 !important;
}

.user-panel .info {
    color: #495057 !important;
}

.user-panel .info a:hover {
    color: var(--brand-primary) !important;
}

/* ----- SIDEBAR FOOTER ----- */
.sidebar-footer {
    background-color: white !important;
    border-top: 1px solid #dee2e6 !important;
}

/* Push footer to bottom */
.wrapper .sidebar {
    display: flex !important;
    flex-direction: column !important;
}

.wrapper .sidebar .nav-sidebar {
    flex-grow: 1 !important;
}

/* static/css/jazzmin_custom.css */

/* Change Add button color */
.btn-success,
.btn-success:hover {
    background-color: #003b6f !important;
    /* Your primary color */
    border-color: #003b6f !important;
    color: white !important;
}

/* Change Delete button color */
.btn-danger,
.btn-danger:hover {
    background-color: #dc3545 !important;
    /* Keep red or change it */
    border-color: #dc3545 !important;
    color: white !important;
}

/* Style all admin buttons consistently */
.btn {
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    color: white !important;
}

/* Main color overrides */
.btn-primary,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: white !important;
}

/* Login page fixes */
.login-page .login-box {
    width: 360px;
    margin: 7% auto;
}

.login-page .login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-page .login-logo img {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.login-page .login-logo a {
    display: block;
    text-align: center;
}

/* Center the login card */
.login-page .card {
    margin: 0 auto;
}

/* Fix logo size in login page */
.login-logo img,
.brand-link img {
    max-height: 60px !important;
    width: auto !important;
}

/* Force center the login logo */
.login-page .login-box-msg,
.login-page .login-logo {
    text-align: center !important;
}

.login-page .login-logo a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.login-page .login-logo img {
    max-width: 500px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Ensure login box is centered */
.login-page .login-box {
    margin: 5% auto !important;
    width: 400px !important;
}

.login-page .card {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important;
}

/* Hide the dots/particles background if present */
.login-page {
    background: #f4f6f9 !important;
}

/* Login page title styling */
.login-page .login-title {
    margin-top: -10px;
    margin-bottom: 20px;
}

.login-page .login-title h4 {
    color: var(--brand-primary) !important;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.login-page .login-title p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Force light mode for import-export tables */
@media (prefers-color-scheme: dark) {
    table.import-preview tr.skip {
        background-color: #f5f5f5 !important;  /* Light gray */
    }
    
    table.import-preview tr.new {
        background-color: #d4edda !important;  /* Light green */
    }
    
    table.import-preview tr.update {
        background-color: #fff3cd !important;  /* Light yellow */
    }
    
    table.import-preview tr.delete {
        background-color: #f8d7da !important;  /* Light red */
    }
    
    .validation-error-container {
        background-color: #f8d7da !important;  /* Light red */
    }
    
    table.import-preview td ins {
        background-color: #d4edda !important;  /* Light green */
        color: #155724 !important;
    }
    
    table.import-preview td del {
        background-color: #f8d7da !important;  /* Light red */
        color: #721c24 !important;
    }
}

