:root {
    /* Brand & core */
    --brand: #00093D;
    --brand-hover: #001060;
    --accent: #FFBA08;

    /* Extended color palette */
    --brand-light: rgba(0, 9, 61, 0.1);
    --brand-medium: rgba(0, 9, 61, 0.5);
    --accent-light: rgba(255, 186, 8, 0.1);

    /* Spacing */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows — neutral iOS-style */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-md: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.10);
}

/* ===============================
   GLOBAL OVERRIDES
   =============================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus styles */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: var(--accent-light);
    color: var(--brand);
}

/* ===============================
   BUTTONS & FORMS ENHANCEMENTS
   =============================== */

/* Form controls */
.form-select,
.form-control,
.form-range {
    border-radius: var(--radius-md);
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus,
.form-range:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.25rem var(--brand-light);
    transform: translateY(-1px);
}

.form-control:disabled,
.form-select:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
}

/* Input groups */
.input-group-text {
    background-color: var(--brand-light);
    color: var(--brand);
    border-color: rgba(0, 9, 61, 0.2);
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
}

.input-group>.form-control:not(:first-child) {
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand);
    background-image: linear-gradient(to bottom, var(--brand), var(--brand-hover));
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
    background-image: linear-gradient(to bottom, var(--brand-hover), var(--brand));
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--brand);
    font-weight: 600;
}

.btn-accent:hover {
    background-color: #ffd75e;
    border-color: #ffd75e;
    color: var(--brand);
}

/* Action — brand navy, used for primary CTAs across the app */
.btn-action {
    background: var(--brand);
    color: #fff;
    border: 1.5px solid var(--brand);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 9, 61, 0.25);
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-action:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 9, 61, 0.35);
}

/* Secondary — neutral slate, not Bootstrap grey */
.btn-secondary,
.btn-outline-secondary {
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary {
    background-color: #f3f4f6;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #111827;
}

.btn-outline-secondary:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

/* Success — keep meaningful green but match app's shade */
.btn-success {
    background-color: #16a34a;
    border-color: #15803d;
}

.btn-success:hover {
    background-color: #15803d;
    border-color: #166534;
}

.btn-outline-success {
    color: #16a34a;
    border-color: #16a34a;
}

.btn-outline-success:hover {
    background-color: #16a34a;
    border-color: #15803d;
}

/* Danger — consistent red */
.btn-danger {
    background-color: #dc2626;
    border-color: #b91c1c;
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #991b1b;
}

.btn-outline-danger {
    color: #dc2626;
    border-color: #dc2626;
}

.btn-outline-danger:hover {
    background-color: #dc2626;
    border-color: #b91c1c;
}

/* Warning — amber, dark text for readability */
.btn-warning {
    background-color: #f59e0b;
    border-color: #d97706;
    color: #111827;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #b45309;
    color: #111827;
}

/* ===============================
   CARDS & CONTAINERS
   =============================== */

.card {
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.07);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-weight: 600;
    color: #1a1a2e;
}

.card-footer {
    background-color: #fafafa;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.card-title {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #374151;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 1.1rem !important;
}

/* ===============================
   NAV PILLS & TABS
   =============================== */

.nav-pills .nav-link {
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    color: var(--brand);
    margin-right: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
}

.nav-pills .nav-link:hover {
    background-color: var(--brand-light);
    border-color: var(--brand-medium);
    transform: translateY(-1px);
}

.nav-pills .nav-link.active {
    background-color: var(--brand) !important;
    color: white !important;
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
}

/* Tab content animation */
.tab-pane {
    animation: fadeIn 0.3s ease-out;
}

/* Remove browser focus outline on tab panels (Bootstrap focuses them on tab switch) */
.tab-pane:focus,
.tab-pane:focus-visible {
    outline: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
   TABLES ENHANCEMENT
   =============================== */

.table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.table th,
.table td {
    padding: 0.45rem 0.75rem;
    vertical-align: middle;
}

.table th {
    background-color: #f7f8fa;
    color: #374151;
    font-weight: 700;
    font-size: 0.69rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.table td {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: #1a1a2e;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
    transition: background-color 0.12s ease;
}

.table-sm th,
.table-sm td {
    padding: 0.3rem 0.6rem;
}

/* ===============================
   BADGES & ALERTS
   =============================== */

.badge {
    border-radius: 20px;
    padding: 0.35em 0.65em;
    font-weight: 500;
}

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

.badge.bg-warning {
    background-color: var(--accent) !important;
    color: var(--brand) !important;
}

.alert {
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}

.alert-primary {
    background-color: var(--brand-light);
    border-color: var(--brand-medium);
    color: var(--brand);
}

.alert-warning {
    background-color: var(--accent-light);
    border-color: var(--accent);
    color: #856404;
}

/* ===============================
   PROGRESS BARS
   =============================== */

.progress {
    border-radius: 10px;
    overflow: hidden;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, var(--brand), var(--brand-hover));
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(-45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    background-size: 20px 20px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 20px 0;
    }
}

/* ===============================
   RESPONSIVE ADJUSTMENTS
   =============================== */

@media (max-width: 768px) {
    .nav-pills {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-pills .nav-link {
        flex: 1;
        min-width: 140px;
        margin-right: 0;
        text-align: center;
    }

    .card {
        border-radius: var(--radius-md);
    }

    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: var(--radius-md);
    }
}

/* ===============================
   UTILITY CLASSES
   =============================== */

/* Hover effects */
.hover-lift {
    transition: box-shadow 0.2s ease;
}

.hover-lift:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10) !important;
}

/* ===============================
   PROGRESS COLOURS
   =============================== */

.bg-orange  { background-color: #f97316 !important; }
.text-orange { color: #f97316 !important; }

/* ===============================
   PAGINATION
   =============================== */

.pagination {
    gap: 4px;
}

.page-item .page-link {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px !important;
    color: #374151;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    min-width: 34px;
    text-align: center;
    box-shadow: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.page-item .page-link:hover {
    background: #f7f8fa;
    border-color: rgba(0,0,0,0.14);
    color: #111827;
}

.page-item.active .page-link {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255,193,7,0.35);
}

.page-item.disabled .page-link {
    background: #f7f8fa;
    border-color: rgba(0,0,0,0.06);
    color: #adb5bd;
    pointer-events: none;
}

