/* ============================================
   ROOT VARIABLES & BASE STYLES
   ============================================ */
:root {
    --data-table-hover-bg: #273567;
    --data-table-hover-color: #FFFFFF;
    --bs-breadcrumb-divider: '>';
    --offcanvas-horizontal-width: 800px;
    --base-font-size: 13px; /* Reduced base size */
    --primary-color: #273567;
    --primary-hover: #1F2A52;
    --accent-color: #F5C350;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

/* Prevent UI from becoming too large at 100% zoom */
html {
    font-size: var(--base-font-size);
}

body {
    font-family: "Outfit", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 0.95rem; /* Smaller body font */
    line-height: 1.4;
    background-color: #e8e8e8;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: 1400px; /* Increased for better use of space */
    padding-left: 15px;
    padding-right: 15px;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
.navbar-nav {
    gap: 8px; /* Reduced gap */
}

.navbar-collapse {
    justify-content: end;
}

.navbar {
    background-color: var(--primary-color);
    padding: 0.4rem 0.8rem; /* Reduced padding */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-item .nav-link {
    color: var(--accent-color);
    font-size: 0.85rem; /* Smaller font */
    transition: all 0.3s ease;
    padding: 0.4rem 0.8rem; /* Reduced padding */
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .nav-item .nav-link i {
        font-size: 1rem; /* Smaller icons */
        transition: transform 0.3s ease;
    }

.nav-item .dropdown-item {
    font-size: 0.9rem;
}

.atp-logo {
    width: 55px; /* Smaller logo */
    height: auto;
}

/* Hover effect for nav links */
.nav-link:hover {
    color: #FFD700 !important;
    background-color: rgba(245, 195, 80, 0.15);
    transform: translateY(-2px);
}

    .nav-link:hover i {
        transform: scale(1.15);
    }

/* Active state for nav links */
.nav-link.active {
    color: #FFFFFF !important;
    background-color: #362603 !important;
    font-weight: 600;
    box-shadow: 0 0px 3px rgba(245, 195, 80, 0.3);
}

    .nav-link.active i {
        color: #FFFFFF;
    }

/* Focus state */
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Bold text styling in nav */
.nav-link b {
    font-weight: 700;
    margin-left: 4px;
}
/* ============================================
   CLEAN SIDEBAR STYLES - FIXED VERSION
   ============================================ */

/* Sidebar Item Base Styles */
.sidebar-item {
    position: relative !important;
    overflow: visible !important;
    animation: slideInLeft 0.5s ease-out !important;
    animation-fill-mode: both !important;
    margin-bottom: 12px !important;
}

    .sidebar-item:nth-child(1) {
        animation-delay: 0.1s !important;
    }

    .sidebar-item:nth-child(2) {
        animation-delay: 0.2s !important;
    }

    .sidebar-item:nth-child(3) {
        animation-delay: 0.3s !important;
    }

    .sidebar-item:nth-child(4) {
        animation-delay: 0.4s !important;
    }

    /* Link Styles - Clean Button Design */
    .sidebar-item a {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        padding: 16px 24px !important;
        border-radius: 12px !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        color: #273567 !important;
        text-decoration: none !important;
        overflow: hidden !important;
        background: #ffffff !important;
        font-weight: 500 !important;
        font-size: 1rem !important;
        box-shadow: 0 2px 8px rgba(39, 53, 103, 0.1) !important;
    }

        /* Trash Button Special Styling */
        .sidebar-item a.text-danger {
            color: #dc3545 !important;
        }

        /* Background Slide Effect */
        .sidebar-item a::before {
            content: '' !important;
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            width: 0% !important;
            height: 100% !important;
            background: linear-gradient(135deg, #273567 0%, #3a4a7f 100%) !important;
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
            z-index: 0 !important;
            border-radius: 10px !important;
        }

        .sidebar-item a.text-danger::before {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
        }

        /* Hover Effects - Smooth Fill */
        .sidebar-item a:hover::before {
            width: 100% !important;
        }

        .sidebar-item a:hover {
            color: #ffffff !important;
            transform: translateX(8px) scale(1.02) !important;
            box-shadow: 0 8px 24px rgba(39, 53, 103, 0.3) !important;
        }

        .sidebar-item a.text-danger:hover {
            border-color: #dc3545 !important;
            box-shadow: 0 8px 24px rgba(220, 53, 69, 0.3) !important;
        }

        /* Active State */
        .sidebar-item a.active {
            background: linear-gradient(135deg, #273567 0%, #3a4a7f 100%) !important;
            color: #ffffff !important;
            border-color: #F5C350 !important;
            box-shadow: 0 6px 20px rgba(39, 53, 103, 0.4) !important;
        }

            .sidebar-item a.active.text-danger {
                background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
                border-color: #dc3545 !important;
                color: #ffffff !important;
            }

        /* Icon Styles */
        .sidebar-item a i {
            margin-right: 16px !important;
            font-size: 22px !important;
            transition: all 0.3s ease !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            z-index: 1 !important;
            position: relative !important;
            min-width: 24px !important;
        }

        .sidebar-item a:hover i {
            transform: rotate(10deg) scale(1.15) !important;
        }

        /* Text should be above background */
        .sidebar-item a span,
        .sidebar-item a {
            position: relative !important;
            z-index: 1 !important;
        }

            /* Pulsing Glow for Active Items */
            .sidebar-item a.active {
                animation: activeGlow 2s ease-in-out infinite !important;
            }

            /* Shimmer Effect on Hover */
            .sidebar-item a::after {
                content: '' !important;
                position: absolute !important;
                top: 0 !important;
                left: -100% !important;
                width: 50% !important;
                height: 100% !important;
                background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
                transition: left 0.6s ease !important;
                z-index: 2 !important;
                pointer-events: none !important;
            }

            .sidebar-item a:hover::after {
                left: 100% !important;
            }

/* Keyframe Animations */
@keyframes slideInLeft {
    from {
        opacity: 0 !important;
        transform: translateX(-30px) !important;
    }

    to {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
}

@keyframes activeGlow {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(39, 53, 103, 0.4) !important;
    }

    50% {
        box-shadow: 0 8px 28px rgba(39, 53, 103, 0.6), 0 0 0 4px rgba(245, 195, 80, 0.3) !important;
    }
}

/* Remove old animations that cause issues */
@keyframes pulse {
    0%, 100% {
        opacity: 1 !important;
    }

    50% {
        opacity: 0.8 !important;
    }
}

/* Pressed/Click Effect */
.sidebar-item a:active {
    transform: translateX(8px) scale(0.98) !important;
    transition: all 0.1s ease !important;
}

/* Focus State for Accessibility */
.sidebar-item a:focus {
    outline: 3px solid #F5C350 !important;
    outline-offset: 2px !important;
}

/* Disabled State (if needed) */
.sidebar-item a.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
/* ============================================
   UNIFIED BREADCRUMB STYLES
   ============================================ */
.breadcrumb {
    background: linear-gradient(135deg, #414F81 0%, #5A689A 100%) !important;
    padding: 10px 16px !important; /* Reduced padding */
    border-radius: 50px !important;
    box-shadow: 0 4px 15px rgba(39, 53, 103, 0.4) !important;
    margin-bottom: 1rem !important; /* Reduced margin */
    display: flex !important;
    align-items: center !important;
}

.breadcrumb-item {
    display: flex !important;
    align-items: center !important;
}

    .breadcrumb-item a,
    .breadcrumb .breadcrumb-item a {
        color: #FFFFFF !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        font-size: 0.85rem !important; /* Smaller font */
        transition: all 0.3s ease !important;
        padding: 3px 6px !important;
        border-radius: 6px !important;
        display: inline-block !important;
    }

        .breadcrumb-item a:hover,
        .breadcrumb .breadcrumb-item a:hover {
            color: var(--accent-color) !important;
            background-color: rgba(245, 195, 80, 0.15) !important;
            transform: translateX(-2px) !important;
            text-shadow: 0 0 8px rgba(245, 195, 80, 0.5) !important;
        }

        .breadcrumb-item a:active,
        .breadcrumb-item a:focus,
        .breadcrumb .breadcrumb-item a:active,
        .breadcrumb .breadcrumb-item a:focus {
            color: #FFD700 !important;
            outline: none !important;
            background-color: rgba(255, 215, 0, 0.2) !important;
        }

    .breadcrumb-item.active,
    .breadcrumb .breadcrumb-item.active {
        color: var(--accent-color) !important;
        font-weight: 700 !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
        background-color: rgba(245, 195, 80, 0.2) !important;
        padding: 3px 10px !important;
        border-radius: 20px !important;
        border: 2px solid rgba(245, 195, 80, 0.4) !important;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        content: "›" !important;
        color: #FFFFFF !important;
        opacity: 0.6 !important;
        padding: 0 0.4rem !important;
        font-size: 1.1rem !important;
        font-weight: 300 !important;
    }

/* ============================================
   TABS
   ============================================ */
.nav-tabs {
    border-bottom: 2px solid #3d4a7a;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem 0;
    border-radius: 8px 8px 0 0;
}

    .nav-tabs .nav-link {
        color: #5a6a9e;
        border: none;
        border-bottom: 3px solid transparent;
        padding: 0.6rem 1.2rem; /* Reduced padding */
        margin-right: 0.4rem;
        transition: all 0.3s ease;
        font-weight: 500;
        background-color: transparent;
        font-size: 0.9rem; /* Smaller font */
    }

        .nav-tabs .nav-link:hover {
            color: var(--accent-color);
            border-bottom-color: var(--accent-color);
            background-color: rgba(245, 195, 80, 0.1);
        }

        .nav-tabs .nav-link.active {
            color: #FFFFFF !important;
            background-color: var(--primary-color) !important;
            border-bottom-color: var(--accent-color) !important;
            font-weight: 600;
        }

/* ============================================
   CUSTOMER DEFINITION HEADER & CARD HEADERS
   ============================================ */
.customer-definition-header,
.card-header {
    background: linear-gradient(135deg, #3d4a7a 0%, var(--primary-color) 100%);
    color: #FFFFFF;
    padding: 1rem 1.5rem; /* Reduced padding */
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .customer-definition-header h2,
    .customer-definition-header h3,
    .card-header {
        margin: 0;
        color: #FFFFFF;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        font-size: 1.1rem; /* Smaller heading */
        font-weight: 600;
    }

/* ============================================
   FORM ELEMENTS
   ============================================ */
input, select, textarea, label {
    font-size: 0.85rem !important;
}

.form-control, .form-select {
    transition: all 0.2s ease;
    padding: 0.4rem 0.75rem; /* Reduced padding */
    font-size: 0.85rem;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(39, 53, 103, 0.25);
    }

    .form-control.invalid {
        border-color: var(--bs-danger);
        background-color: var(--bs-danger-bg-subtle);
    }

    .form-select.invalid {
        border-color: var(--bs-danger);
        background-color: var(--bs-danger-bg-subtle);
    }

.validation-message {
    color: var(--bs-danger);
    font-size: 0.75rem;
}



/* Slim select */
.ss-main {
    height: 36px; /* Smaller height */
}

.form-control .ss-main {
    border-left: none;
}

/* ============================================
   BUTTONS - COMPACT
   ============================================ */
/* ============================================
   BUTTONS - ENHANCED SIZE
   ============================================ */
.btn {
    border-radius: 6px;
    font-size: 0.95rem !important; /* Increased from 0.85rem */
    padding: 0.65rem 1.25rem !important; /* Increased from 0.4rem 0.75rem */
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    min-height: 42px !important; /* Added minimum height */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1F2A52 100%);
    border: none;
    color: #FFFFFF;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #1F2A52 0%, var(--primary-color) 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(39, 53, 103, 0.4);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

    .btn-secondary:hover {
        background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    }

.btn-w-icon {
    padding-left: 2.8rem !important; /* Increased from 2.2rem */
    position: relative;
    text-align: center;
    min-width: 140px !important; /* Increased from 110px */
}

    .btn-w-icon i {
        position: absolute;
        top: 50%;
        left: 0.75rem !important; /* Increased from 0.5rem */
        transform: translateY(-50%);
        font-size: 1.15rem !important; /* Increased from 1rem */
    }

.btn-sm {
    padding: 0.3rem 0.65rem; /* Smaller */
    font-size: 0.8rem;
}

    .btn-sm.btn-w-icon {
        padding-left: 1.8rem;
        min-width: 95px;
    }

        .btn-sm.btn-w-icon i {
            left: 0.4rem;
            font-size: 0.9rem;
        }

/* ============================================
   DATA TABLE - COMPACT WITH FIXED HOVER
   ============================================ */
.data-table {
    font-size: 0.82rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

    .data-table thead {
        background: linear-gradient(135deg, var(--primary-color) 0%, #1F2A52 100%);
    }

        .data-table thead th {
            color: #FFFFFF;
            font-weight: 600;
            border: none;
            padding: 0.6rem 0.5rem;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
        }

            .data-table thead th:last-child {
                width: 240px;
                text-align: center;
            }

    .data-table tbody tr {
        transition: all 0.2s ease;
        border-bottom: 1px solid #dee2e6;
    }

        /* FIXED HOVER STATE - Light background with subtle shadow */
        .data-table tbody tr:hover {
            background-color: #f0f4ff !important; /* Light blue background */
            box-shadow: 0 2px 6px rgba(39, 53, 103, 0.15);
        }

            /* Keep text dark on hover for readability */
            .data-table tbody tr:hover td {
                color: #212529 !important; /* Dark text color */
            }

            /* Buttons remain visible and styled on hover */
            .data-table tbody tr:hover .btn {
                opacity: 1;
            }

        .data-table tbody tr:last-child {
            border-bottom: none;
        }

    .data-table tbody td {
        padding: 0.5rem 0.5rem;
        vertical-align: middle;
        color: #212529; /* Default dark text */
    }

        .data-table tbody td:last-child {
            text-align: center;
        }

    .data-table i {
        font-size: 1rem;
    }

td, th {
    vertical-align: middle !important;
}

/* ============================================
   ALERT - COMPACT
   ============================================ */
.alert {
    border-radius: 8px;
    border: none;
    padding: 0.75rem 1rem; /* Reduced padding */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ============================================
   CARD COMPONENT
   ============================================ */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 1.2rem; /* Reduced */
}

.card-body {
    padding: 1.2rem; /* Reduced */
}

/* ============================================
   MODAL - COMPACT
   ============================================ */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1F2A52 100%);
    color: #FFFFFF;
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.25rem; /* Reduced */
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
    font-size: 1.05rem; /* Smaller */
}

.modal-body {
    padding: 1.25rem; /* Reduced */
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 0.875rem 1.25rem; /* Reduced */
}

/* ============================================
   OFFCANVAS
   ============================================ */
.offcanvas-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .offcanvas-body ul li {
        margin-bottom: 6px;
        /* REMOVED: padding, border-radius, transition, and hover background */
    }

        .offcanvas-body ul li a {
            text-decoration: none;
            display: block;
            color: var(--primary-color);
            font-size: 0.85rem;
            font-weight: 500;
        }

/* ============================================
   LIST GROUP
   ============================================ */
.list-group-item .btn-group .btn:first-child {
    cursor: grab;
}

.list-group-item {
    transition: all 0.3s ease;
    padding: 0.6rem 1rem; /* Reduced */
}

    .list-group-item:hover {
        background-color: #f8f9fa;
        transform: translateX(5px);
    }

/* ============================================
   FIRST ACCESS PANEL
   ============================================ */
.first-access-panel-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    background-color: var(--primary-color);
    opacity: .5;
}

.first-access-panel {
    position: absolute;
    top: 100px; /* Reduced */
    left: 50%;
    margin-left: -175px; /* Adjusted */
    background-color: white;
    width: 350px; /* Smaller */
    border: solid 2px var(--primary-color);
    z-index: 4;
    padding: 1.25rem; /* Reduced */
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
    position: relative;
    display: flex;
    justify-content: center;
    max-height: 320px; /* Reduced */
    padding: 0.875rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Spacing utilities - smaller */
.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 0.75rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.mt-5 {
    margin-top: 1.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-5 {
    margin-bottom: 1.5rem !important;
}

/* ============================================
   RESPONSIVE DESIGN - ZOOM ADJUSTMENTS
   ============================================ */
@media (min-width: 1920px) {
    :root {
        --base-font-size: 13px;
    }

    .container {
        max-width: 1600px;
    }

    .atp-logo {
        width: 60px;
    }
}

@media (min-width: 1366px) and (max-width: 1919px) {
    :root {
        --base-font-size: 12px;
    }

    .container {
        max-width: 1400px;
    }
}

@media (min-width: 1024px) and (max-width: 1365px) {
    :root {
        --base-font-size: 11px;
    }

    .container {
        max-width: 1200px;
    }

    .navbar-nav {
        gap: 8px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --base-font-size: 11px;
    }

    .container {
        max-width: 100%;
    }

    .navbar-nav {
        gap: 6px;
    }

    .atp-logo {
        width: 50px;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .chart-container {
        max-height: 280px;
    }
}

@media (max-width: 767px) {
    :root {
        --base-font-size: 11px;
    }

    .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .atp-logo {
        width: 48px;
    }

    .btn-w-icon {
        min-width: 80px;
    }

    .data-table thead th:last-child {
        width: 100px;
    }

    .chart-container {
        max-height: 240px;
    }

    .first-access-panel {
        width: 90%;
        left: 5%;
        margin-left: 0;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --base-font-size: 10px;
    }

    .navbar-nav {
        gap: 4px;
    }

    input, select, textarea, label {
        font-size: 0.9rem !important;
    }
}

/* ============================================
   CUSTOM SCROLLBAR - UPDATED DESIGN
   ============================================ */

/* Webkit Browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 14px !important;
    height: 14px !important;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #e8e8e8 0%, #f5f5f5 50%, #e8e8e8 100%) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.08) !important;
    margin: 3px !important;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3a4a7f 0%, #273567 30%, #1F2A52 50%, #273567 70%, #3a4a7f 100%) !important;
    border-radius: 10px !important;
    border: 3px solid #f5f5f5 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(39, 53, 103, 0.3) !important;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #273567 0%, #1F2A52 20%, #F5C350 50%, #1F2A52 80%, #273567 100%) !important;
        border: 3px solid #F5C350 !important;
        box-shadow: 0 0 12px rgba(245, 195, 80, 0.6), 0 4px 10px rgba(39, 53, 103, 0.4) !important;
        transform: scaleX(1.1) !important;
    }

    ::-webkit-scrollbar-thumb:active {
        background: linear-gradient(180deg, #F5C350 0%, #FFD700 30%, #273567 50%, #FFD700 70%, #F5C350 100%) !important;
        border: 3px solid #FFD700 !important;
        box-shadow: 0 0 16px rgba(255, 215, 0, 0.8), 0 6px 14px rgba(39, 53, 103, 0.5) !important;
    }

::-webkit-scrollbar-corner {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
}

/* Firefox */
* {
    scrollbar-width: thin !important;
    scrollbar-color: #273567 #f5f5f5 !important;
}

/* Horizontal Scrollbar */
::-webkit-scrollbar:horizontal {
    height: 14px !important;
}

@keyframes trackShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}
::-webkit-scrollbar-track:hover {
    background: linear-gradient(270deg, #e8e8e8, #f5f5f5, #e8e8e8) !important;
    background-size: 200% 200% !important;
    animation: trackShimmer 3s ease infinite !important;
}

/* Add subtle glow line on top of track */
::-webkit-scrollbar-track::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent 0%, rgba(245, 195, 80, 0.4) 50%, transparent 100%) !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Prevent navbar from re-rendering */
nav.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
    backface-visibility: hidden;
    transform: translateZ(0);
}


/* ============================================
   FIXED INPUT STYLES - NO MOVEMENT, ALIGNED
   ============================================ */

/* Target ALL inputs regardless of class */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select,
.form-control,
.form-select {
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    height: auto !important;
    min-height: 38px !important; /* Fixed height to match labels */
}

    /* HOVER - Blue Border - NO MOVEMENT */
    input[type="text"]:hover,
    input[type="email"]:hover,
    input[type="password"]:hover,
    input[type="number"]:hover,
    input[type="date"]:hover,
    input[type="time"]:hover,
    textarea:hover,
    select:hover,
    .form-control:hover,
    .form-select:hover {
        border-color: #273567 !important;
        box-shadow: 0 0px 3px rgba(39, 53, 103, 0.15) !important;
        transform: none !important; /* REMOVED translateY - No movement! */
    }

    /* FOCUS - Enhanced Blue Glow - NO MOVEMENT */
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    input[type="number"]:focus,
    input[type="date"]:focus,
    input[type="time"]:focus,
    textarea:focus,
    select:focus,
    .form-control:focus,
    .form-select:focus {
        border-color: #273567 !important;
        outline: none !important;
        box-shadow: 0 0px 8px rgba(39, 53, 103, 0.2) !important;
        background-color: #ffffff !important;
        transform: none !important; /* REMOVED translateY - No movement! */
        border-width: 2px !important;
    }
.input-group .form-control.p-0.m-0 select:focus {
    border: none !important;
    box-shadow: none !important;
}

/* Override Bootstrap rounded-0 if present */
.rounded-0 {
    border-radius: 8px !important;
}
.input-group .form-control.p-0.m-0:focus-within {
    border-color: #273567 !important;
    box-shadow: 0 0px 8px rgba(39, 53, 103, 0.2) !important;
    border-width: 2px !important;
}
input.rounded-0,
.form-control.rounded-0,
select.rounded-0,
.form-select.rounded-0 {
    border-radius: 8px !important;
}

/* INPUT GROUP TEXT - FIXED HEIGHT */
.input-group-text {
    min-width: 100px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 0.6rem 1rem !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px 0 0 8px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    color: #273567 !important;
    transition: all 0.3s ease !important;
    height: auto !important;
    min-height: 38px !important; /* Match input height */
    display: flex !important;
    align-items: center !important; /* Vertically center text */
}

    .input-group-text:hover {
        border-color: #273567 !important;
        box-shadow: 0 0px 6px rgba(39, 53, 103, 0.15) !important;
        transform: none !important; /* No movement on hover */
    }

.input-group:focus-within .input-group-text {
    border-color: #273567 !important;
    background: linear-gradient(135deg, #273567 0%, #3a4a7f 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(39, 53, 103, 0.15) !important;
    transform: none !important; /* No movement on focus */
}

/* INPUT GROUP - ENSURE ALIGNMENT */
.input-group {
    display: flex !important;
    align-items: stretch !important; /* Make all children same height */
}

    /* Fix input inside input-group */
    .input-group input,
    .input-group .form-control,
    .input-group select,
    .input-group .form-select {
        border-radius: 0 8px 8px 0 !important;
        border-left: none !important;
        height: auto !important;
        min-height: 38px !important; /* Match label height */
    }

    .input-group:focus-within input,
    .input-group:focus-within .form-control,
    .input-group:focus-within select,
    .input-group:focus-within .form-select {
        border-color: #273567 !important;
        border-left: none !important;
        transform: none !important; /* No movement */
    }

    /* For wrapped selects - FIX DROPDOWN HEIGHT */
    .input-group .form-control.p-0.m-0 {
        border: 2px solid #dee2e6 !important;
        border-left: none !important;
        border-radius: 0 8px 8px 0 !important;
        padding: 0 !important;
        min-height: 38px !important; /* Match height */
        display: flex !important;
        align-items: center !important;
    }

        .input-group .form-control.p-0.m-0 select {
            border: none !important;
            padding: 0.6rem 1rem !important;
            width: 100% !important;
            height: 100% !important;
            min-height: 38px !important;
            background-color: transparent !important;
        }

/* FIX DROPDOWN (SELECT) HEIGHT */
select,
.form-select {
    height: auto !important;
    min-height: 38px !important;
    padding: 0.6rem 2.5rem 0.6rem 1rem !important; /* Extra padding for arrow */
}

/* Slim Select Fix (if you're using it) */
.ss-main {
    height: 38px !important;
    min-height: 38px !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
}

    .ss-main:hover {
        border-color: #273567 !important;
    }

    .ss-main.ss-open-above,
    .ss-main.ss-open-below {
        border-color: #273567 !important;
        box-shadow: 0 0 0 4px rgba(39, 53, 103, 0.2) !important;
    }

/* REMOVE ALL ANIMATIONS THAT CAUSE MOVEMENT */
@keyframes inputPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(39, 53, 103, 0.2), 0 6px 12px rgba(39, 53, 103, 0.25) !important;
    }

    50% {
        box-shadow: 0 0 0 6px rgba(39, 53, 103, 0.15), 0 8px 16px rgba(39, 53, 103, 0.2) !important;
    }
}

/* Apply pulse to focused inputs - ONLY shadow changes, NO movement */
input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    animation: none !important; 
    box-shadow: 0 0px 8px rgba(39, 53, 103, 0.2) !important;
}

/* Disabled State */
input:disabled,
select:disabled,
textarea:disabled,
.form-control:disabled,
.form-select:disabled {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    box-shadow: none !important;
}

/* Invalid State */
.form-control.is-invalid,
.form-select.is-invalid,
input.is-invalid,
select.is-invalid,
.form-control.invalid,
.form-select.invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

/* Valid State */
.form-control.is-valid,
.form-select.is-valid,
input.is-valid,
select.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15) !important;
}

/* Placeholder Styles */
input::placeholder,
textarea::placeholder {
    color: #adb5bd !important;
    opacity: 1 !important;
}

/* Remove test border */
body {
    border-top: none !important;
}

/* ============================================
   ENHANCED INPUT GROUP TEXT STYLES
   ============================================ */

.input-group-text {
    min-width: 100px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.75rem !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px 0 0 8px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    color: #273567 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

    /* Shimmer Effect Background */
    .input-group-text::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(39, 53, 103, 0.1), transparent) !important;
        transition: left 0.5s ease !important;
    }

    /* Hover Effect on Input Group Text */
    .input-group-text:hover::before {
        left: 100% !important;
    }

    .input-group-text:hover {
        border-color: #273567 !important;
        box-shadow: 0 2px 8px rgba(39, 53, 103, 0.15) !important;
        transform: translateX(-2px) !important;
    }

/* Focus Within - When Input is Focused */
.input-group:focus-within .input-group-text {
    border-color: #273567 !important;
    background: linear-gradient(135deg, #273567 0%, #3a4a7f 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(39, 53, 103, 0.2) !important;
    transform: translateX(-3px) !important;
}

/* Pulsing Animation When Focused */
.input-group:focus-within .input-group-text {
    animation: none !important;
}

    /* Glow Effect on Focus */
    .input-group:focus-within .input-group-text::after {
        content: '' !important;
        position: absolute !important;
        top: 50% !important;
        right: 8px !important;
        width: 6px !important;
        height: 6px !important;
        background: #ffffff !important;
        border-radius: 50% !important;
        transform: translateY(-50%) !important;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
        animation: dotPulse 1.5s ease-in-out infinite !important;
    }

/* Make sure input has matching border radius */
.input-group .form-control {
    border-radius: 0 8px 8px 0 !important;
    border-left: none !important;
}

/* When input is focused, ensure borders connect seamlessly */
.input-group:focus-within .form-control {
    border-color: #273567 !important;
    border-left: none !important;
}

/* For input groups with select dropdown */
.input-group .form-control.p-0.m-0.border-0 {
    border: 2px solid #dee2e6 !important;
    border-left: none !important;
    border-radius: 0 8px 8px 0 !important;
}

.input-group:focus-within .form-control.p-0.m-0 {
    border-color: #273567 !important;
    border-left: none !important;
}

/* Select inside input-group wrapper */
.input-group .form-control select {
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 0.6rem 1rem !important;
    background-color: transparent !important;
}

/* Keyframe Animations */
@keyframes labelPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(39, 53, 103, 0.15), 0 4px 12px rgba(39, 53, 103, 0.25) !important;
    }

    50% {
        box-shadow: 0 0 0 5px rgba(39, 53, 103, 0.2), 0 6px 16px rgba(39, 53, 103, 0.3) !important;
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 1 !important;
        transform: translateY(-50%) scale(1) !important;
    }

    50% {
        opacity: 0.6 !important;
        transform: translateY(-50%) scale(1.3) !important;
    }
}

/* Special handling for rounded-0 class if still present */
.input-group-text.rounded-0 {
    border-radius: 8px 0 0 8px !important;
}

.input-group .form-control.rounded-0 {
    border-radius: 0 8px 8px 0 !important;
}

    .input-group .form-control.rounded-0.border-0 {
        border: 2px solid #dee2e6 !important;
        border-left: none !important;
        border-radius: 0 8px 8px 0 !important;
    }

/* Disabled State */
.input-group-text.disabled,
.input-group .form-control:disabled ~ .input-group-text {
    background: #e9ecef !important;
    color: #6c757d !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Invalid State */
.input-group.is-invalid .input-group-text,
.input-group .form-control.is-invalid ~ .input-group-text {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    color: #721c24 !important;
}

.input-group.is-invalid:focus-within .input-group-text {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: #ffffff !important;
}

/* Valid State */
.input-group.is-valid .input-group-text,
.input-group .form-control.is-valid ~ .input-group-text {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    color: #155724 !important;
}

.input-group.is-valid:focus-within .input-group-text {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    color: #ffffff !important;
}

/* Textarea Specific */
textarea.form-control,
textarea {
    min-height: 100px !important;
    resize: vertical !important;
}

/* Select Dropdown Arrow Animation */
.form-select,
select {
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 1rem !important;
}

    .form-select:hover,
    select:hover {
        background-image: none !important;
    }

/* Floating Label Support */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: #273567 !important;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem) !important;
}

/* Input with Icon Support */
.input-icon-wrapper {
    position: relative !important;
}

    .input-icon-wrapper i {
        position: absolute !important;
        left: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: #6c757d !important;
        transition: all 0.3s ease !important;
        pointer-events: none !important;
    }

    .input-icon-wrapper .form-control,
    .input-icon-wrapper input {
        padding-left: 2.5rem !important;
    }

        .input-icon-wrapper .form-control:focus ~ i,
        .input-icon-wrapper input:focus ~ i {
            color: #273567 !important;
            transform: translateY(-50%) scale(1.2) !important;
        }

/* Keyframe Animations */
@keyframes inputPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(39, 53, 103, 0.2), 0 6px 12px rgba(39, 53, 103, 0.25) !important;
    }

    50% {
        box-shadow: 0 0 0 6px rgba(39, 53, 103, 0.15), 0 8px 16px rgba(39, 53, 103, 0.2) !important;
    }
}

@keyframes shimmerInput {
    0% {
        background-position: -200% center !important;
    }

    100% {
        background-position: 200% center !important;
    }
}

/* Loading State (Optional) */
.form-control.loading,
.form-select.loading,
input.loading,
textarea.loading,
select.loading {
    background: linear-gradient(90deg, #ffffff 25%, #f8f9fa 50%, #ffffff 75%) !important;
    background-size: 200% 100% !important;
    animation: shimmerInput 2s infinite !important;
    pointer-events: none !important;
}

/* Search Input Enhancement */
input[type="search"] {
    padding-right: 2.5rem !important;
}

    input[type="search"]::-webkit-search-cancel-button {
        -webkit-appearance: none !important;
        appearance: none !important;
        height: 16px !important;
        width: 16px !important;
        background: #273567 !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        position: relative !important;
    }

/* Number Input Spinner Styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1 !important;
    height: 30px !important;
    cursor: pointer !important;
}

/* File Input Enhancement */
input[type="file"] {
    padding: 0.5rem !important;
    cursor: pointer !important;
}

    input[type="file"]::file-selector-button {
        padding: 0.4rem 0.75rem !important;
        background: linear-gradient(135deg, #273567 0%, #3a4a7f 100%) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        margin-right: 1rem !important;
        transition: all 0.3s ease !important;
    }

        input[type="file"]::file-selector-button:hover {
            background: linear-gradient(135deg, #1F2A52 0%, #273567 100%) !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 4px 12px rgba(39, 53, 103, 0.4) !important;
        }

/* Checkbox and Radio Enhancement */
input[type="checkbox"],
input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    accent-color: #273567 !important;
    transition: all 0.2s ease !important;
}

    input[type="checkbox"]:hover,
    input[type="radio"]:hover {
        transform: scale(1.1) !important;
    }

    input[type="checkbox"]:focus,
    input[type="radio"]:focus {
        outline: 2px solid #273567 !important;
        outline-offset: 2px !important;
    }

/* Range Input Enhancement */
input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    height: 6px !important;
    background: linear-gradient(to right, #273567 0%, #3a4a7f 100%) !important;
    border-radius: 5px !important;
    outline: none !important;
}

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none !important;
        appearance: none !important;
        width: 18px !important;
        height: 18px !important;
        background: #273567 !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }

        input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.3) !important;
            box-shadow: 0 0 0 6px rgba(39, 53, 103, 0.2) !important;
        }

    input[type="range"]::-moz-range-thumb {
        width: 18px !important;
        height: 18px !important;
        background: #273567 !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        border: none !important;
        transition: all 0.3s ease !important;
    }

        input[type="range"]::-moz-range-thumb:hover {
            transform: scale(1.3) !important;
            box-shadow: 0 0 0 6px rgba(39, 53, 103, 0.2) !important;
        }