:root {
    --primary-color: #0d47a1;
    --secondary-color: #1565c0;
    --accent-color: #42a5f5;
    --danger-color: #776d77;
    --success-color: #323b67;
    --warning-color: #6f6bab;

    /* Bootstrap CSS variable overrides */
    --bs-success: #323b67;
    --bs-success-rgb: 50, 59, 103;
    --bs-danger: #776d77;
    --bs-danger-rgb: 119, 109, 119;
    --bs-warning: #6f6bab;
    --bs-warning-rgb: 111, 107, 171;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVBAR STYLING ===== */
.navbar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    font-size: 2rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

/* ===== MAIN CONTAINER ===== */
main {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
}

/* ===== FOOTER STYLING ===== */
footer {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== CARD STYLING ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card-header {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    padding: 1.5rem;
    border: none;
}

.card-body {
    padding: 2rem;
}

/* ===== FORM STYLING ===== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 71, 161, 0.25);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* ===== BUTTON STYLING ===== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 71, 161, 0.3);
    color: white;
}

.btn-danger {
    background: #776d77 !important;
    border-color: #776d77 !important;
    color: white;
}

.btn-danger:hover {
    background: #665c66 !important;
    border-color: #665c66 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(119, 109, 119, 0.3);
    color: white;
}

.btn-success {
    background: #323b67 !important;
    border-color: #323b67 !important;
    color: white;
}

.btn-success:hover {
    background: #272e52 !important;
    border-color: #272e52 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(50, 59, 103, 0.3);
    color: white;
}

.btn-lg {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* ===== ALERT STYLING ===== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1.25rem;
    animation: slideIn 0.3s ease;
}

.alert-danger {
    background: rgba(119, 109, 119, 0.12) !important;
    color: #776d77 !important;
    border-color: rgba(119, 109, 119, 0.3) !important;
}

.alert-success {
    background: rgba(50, 59, 103, 0.12) !important;
    color: #323b67 !important;
    border-color: rgba(50, 59, 103, 0.3) !important;
}

.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
}

.alert-warning {
    background: rgba(111, 107, 171, 0.12) !important;
    color: #6f6bab !important;
    border-color: rgba(111, 107, 171, 0.3) !important;
}

/* ===== BADGE STYLING ===== */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

/* ===== TEXT UTILITIES ===== */
.text-muted {
    color: #666 !important;
}

.text-center {
    text-align: center;
}

/* ===== ICON STYLING ===== */
i {
    margin-right: 0.5rem;
}

/* ===== UTILITY CLASSES ===== */
.min-vh-100 {
    min-height: 100vh;
}

.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* ===== VALIDATION FEEDBACK ===== */
.invalid-feedback,
.text-danger {
    display: block;
    color: #776d77 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.is-invalid {
    border-color: #776d77 !important;
}

.is-invalid:focus {
    border-color: #776d77 !important;
    box-shadow: 0 0 0 0.2rem rgba(119, 109, 119, 0.25) !important;
}

/* ===== ANIMATIONS ===== */
@@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FOOTER STYLING ===== */
footer {
    margin-top: auto;
    border-top: 3px solid rgba(255, 255, 255, 0.1);
}

footer img {
    max-width: 100%;
    height: auto;
    max-height: 40px;
    width: auto;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

footer a:hover {
    color: #42a5f5;
    text-decoration: none;
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.5);
}

footer .text-white-50:hover {
    color: rgba(255, 255, 255, 0.9);
}

footer .btn-outline-light {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

footer .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
    color: #42a5f5;
    transform: translateY(-2px);
}

footer .btn-outline-light.rounded-circle {
    border-radius: 50%;
}

footer h6 {
    color: #42a5f5;
    font-weight: 700;
    border-bottom: 2px solid #42a5f5;
    padding-bottom: 0.5rem;
}

footer hr {
    background: rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 0;
}

/* ===== NAVBAR LOGO STYLING ===== */
.navbar-brand img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    width: auto;
}

/* ===== NAVBAR STYLING ===== */
.navbar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    font-size: 2rem;
}

@media (max-width: 576px) {
    .navbar-brand span {
        display: none;
    }

    footer .col-md-6 {
        text-align: center !important;
    }

    footer .d-flex.gap-2 {
        justify-content: flex-start;
    }
}
    }

    .display-4 {
        font-size: 2.5rem !important;
    }
}

/* ===== BOOTSTRAP COLOR OVERRIDES (success, danger, warning) ===== */

/* --- Background classes --- */
.bg-success { background-color: #323b67 !important; }
.bg-danger { background-color: #776d77 !important; }
.bg-warning { background-color: #6f6bab !important; color: white !important; }

/* --- Background opacity variants --- */
.bg-success.bg-opacity-10, .bg-opacity-10.bg-success { background-color: rgba(50, 59, 103, 0.1) !important; }
.bg-danger.bg-opacity-10, .bg-opacity-10.bg-danger { background-color: rgba(119, 109, 119, 0.1) !important; }
.bg-warning.bg-opacity-10, .bg-opacity-10.bg-warning { background-color: rgba(111, 107, 171, 0.1) !important; }

/* --- Text classes --- */
.text-success { color: #323b67 !important; }
.text-danger { color: #776d77 !important; }
.text-warning { color: #6f6bab !important; }

/* --- Border classes --- */
.border-success { border-color: #323b67 !important; }
.border-danger { border-color: #776d77 !important; }
.border-warning { border-color: #6f6bab !important; }

/* --- Badge classes --- */
.badge.bg-success { background-color: #323b67 !important; color: white !important; }
.badge.bg-danger { background-color: #776d77 !important; color: white !important; }
.badge.bg-warning { background-color: #6f6bab !important; color: white !important; }
.badge.bg-warning.text-dark { color: white !important; }

/* --- Outline button variants --- */
.btn-outline-success {
    color: #323b67 !important;
    border-color: #323b67 !important;
    background: transparent !important;
}
.btn-outline-success:hover {
    background: #323b67 !important;
    color: white !important;
}

.btn-outline-danger {
    color: #776d77 !important;
    border-color: #776d77 !important;
    background: transparent !important;
}
.btn-outline-danger:hover {
    background: #776d77 !important;
    color: white !important;
}

.btn-outline-warning {
    color: #6f6bab !important;
    border-color: #6f6bab !important;
    background: transparent !important;
}
.btn-outline-warning:hover {
    background: #6f6bab !important;
    color: white !important;
}

/* --- Warning button --- */
.btn-warning {
    background: #6f6bab !important;
    border-color: #6f6bab !important;
    color: white !important;
}
.btn-warning:hover {
    background: #5c589a !important;
    border-color: #5c589a !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(111, 107, 171, 0.3);
}

/* --- Info button (keep as-is but for consistency) --- */
.btn-info {
    background: #0d47a1 !important;
    border-color: #0d47a1 !important;
    color: white !important;
}
.btn-info:hover {
    background: #0b3d8a !important;
    border-color: #0b3d8a !important;
    color: white !important;
}

/* --- Progress bar --- */
.progress-bar.bg-success { background-color: #323b67 !important; }
.progress-bar.bg-danger { background-color: #776d77 !important; }
.progress-bar.bg-warning { background-color: #6f6bab !important; }

/* --- List group items --- */
.list-group-item-success { background-color: rgba(50, 59, 103, 0.12) !important; color: #323b67 !important; }
.list-group-item-danger { background-color: rgba(119, 109, 119, 0.12) !important; color: #776d77 !important; }
.list-group-item-warning { background-color: rgba(111, 107, 171, 0.12) !important; color: #6f6bab !important; }

/* --- Table variants --- */
.table-success { --bs-table-bg: rgba(50, 59, 103, 0.1); --bs-table-border-color: rgba(50, 59, 103, 0.2); }
.table-danger { --bs-table-bg: rgba(119, 109, 119, 0.1); --bs-table-border-color: rgba(119, 109, 119, 0.2); }
.table-warning { --bs-table-bg: rgba(111, 107, 171, 0.1); --bs-table-border-color: rgba(111, 107, 171, 0.2); }

/* --- Card header variants --- */
.card-header.bg-success { background-color: #323b67 !important; color: white !important; }
.card-header.bg-danger { background-color: #776d77 !important; color: white !important; }
.card-header.bg-warning { background-color: #6f6bab !important; color: white !important; }

/* --- Modal header variants --- */
.modal-header.bg-success { background-color: #323b67 !important; }
.modal-header.bg-danger { background-color: #776d77 !important; }
.modal-header.bg-warning { background-color: #6f6bab !important; color: white !important; }
.modal-header.bg-warning .btn-close { filter: invert(1); }

/* ===== TOASTR COLOR OVERRIDES ===== */
.toast-success {
    background-color: #323b67 !important;
}
.toast-error {
    background-color: #776d77 !important;
}
.toast-warning {
    background-color: #6f6bab !important;
}
.toast-info {
    background-color: #0d47a1 !important;
}

/* Toastr progress bar */
.toast-success .toast-progress { background-color: rgba(255, 255, 255, 0.4) !important; }
.toast-error .toast-progress { background-color: rgba(255, 255, 255, 0.4) !important; }
.toast-warning .toast-progress { background-color: rgba(255, 255, 255, 0.4) !important; }
.toast-info .toast-progress { background-color: rgba(255, 255, 255, 0.4) !important; }

/* ===== SWEETALERT2 COLOR OVERRIDES ===== */
.swal2-confirm.swal2-styled { background-color: #323b67 !important; }
.swal2-deny.swal2-styled { background-color: #776d77 !important; }
.swal2-cancel.swal2-styled { background-color: #6c757d !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: #323b67 !important; }
.swal2-icon.swal2-success [class^='swal2-success-line'] { background-color: #323b67 !important; }
.swal2-icon.swal2-error { border-color: #776d77 !important; }
.swal2-icon.swal2-error .swal2-x-mark-line-left,
.swal2-icon.swal2-error .swal2-x-mark-line-right { background-color: #776d77 !important; }
.swal2-icon.swal2-warning { border-color: #6f6bab !important; color: #6f6bab !important; }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.btn-pulse {
    animation: pulse 1.5s infinite;
}
