/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-red: #D30000;
    --primary-red-hover: #A30000;
    --bg-light: #ECF0F3;
    --text-dark: #333333;
    --text-muted: #7A869A;
    --input-border: #D1D8E0;
    --input-focus: #D30000;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    font-family: var(--font-sans);
    height: 100%;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

html {
    overflow-x: clip;
}

html.dashboard-html {
    overflow-y: auto;
    overflow-x: clip;
    height: auto;
    min-height: 100vh;
}

body.dashboard-body {
    overflow: visible;
    height: auto;
    min-height: 100vh;
}

/* Main Split Container */
.login-wrapper {
    min-height: 100vh;
    display: flex;
}

/* Left Panel - Image Background & Centered Logo Overlay */
.left-panel {
    flex: 1;
    position: relative;
    background-image: url('../Images/imageloginpage.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Overlay "J" Trademark Logo */
.logo-overlay {
    max-width: 45%;
    height: auto;
    z-index: 10;
    filter: drop-shadow(0px 8px 24px rgba(0, 0, 0, 0.35));
    animation: fadeInScale 0.8s ease-out;
}

/* Right Panel - Form Container */
.right-panel {
    flex: 1;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* Login Card Container */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    animation: slideUpFade 0.6s ease-out;
}

/* Brand Logo (Right side) */
.brand-logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo {
    max-width: 200px;
    height: auto;
}

/* Custom Styled Input Groups */
.custom-input-group {
    position: relative;
    margin-bottom: 24px;
}

.custom-input-group .form-control {
    font-family: var(--font-sans);
    font-size: 15px;
    height: 52px;
    padding: 12px 50px 12px 20px;
    /* Spacing for icon on the right */
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background-color: #FFFFFF;
    color: var(--text-dark);
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.custom-input-group .form-control::placeholder {
    color: var(--text-muted);
}

.custom-input-group .form-control:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(211, 0, 0, 0.15);
    outline: none;
}

/* Custom Validation Styling */
.custom-input-group .form-control.is-invalid {
    border-color: var(--primary-red) !important;
    background-image: none !important;
    padding-right: 50px !important;
}

.custom-input-group .form-control.is-invalid~.input-icon {
    color: var(--primary-red) !important;
}

/* Icon positioning inside input fields */
.custom-input-group .input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
    /* Make icon unclickable except for toggle */
    transition: color 0.3s ease;
}

/* Enable pointer events specifically for the password toggle icon */
.custom-input-group .password-toggle-btn {
    pointer-events: auto;
    cursor: pointer;
}

.custom-input-group .password-toggle-btn:hover {
    color: var(--text-dark);
}

/* Forgot Password Link Styling */
.forgot-password-container {
    text-align: right;
    margin-top: -12px;
    margin-bottom: 30px;
}

.forgot-password-link {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

/* Premium Login Button */
.btn-login {
    width: 100%;
    height: 52px;
    background-color: var(--primary-red);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(211, 0, 0, 0.2);
}

.btn-login:hover {
    background-color: var(--primary-red-hover);
    box-shadow: 0 6px 16px rgba(211, 0, 0, 0.3);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(1px);
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive Media Queries */
@media (max-width: 991.98px) {
    .left-panel {
        display: none;
        /* Hide decorative panel on tablets and mobile */
    }

    .right-panel {
        flex: 1;
        width: 100%;
        padding: 24px;
        position: relative;
        z-index: 1;
    }

    /* High transparency background image for mobile/tablet screen */
    .right-panel::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('../Images/imageloginpage.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 5;
        /* Very high transparency (8% opacity) to prevent visibility issues */
        z-index: -1;
    }

    .login-container {
        max-width: 440px;
        padding: 40px 30px;
        background-color: rgba(255, 255, 255, 0.9);
        /* Slightly transparent card */
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

@media (max-width: 575.98px) {
    .right-panel {
        padding: 15px;
    }

    .login-container {
        padding: 30px 20px;
        /* Keep translucent card background on small mobile devices for legibility */
    }
}

/* Browser autofill compatibility styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-dark) !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Shake animation for invalid validation */
.shake-animation {
    -webkit-animation: shake 0.4s ease-in-out;
    -moz-animation: shake 0.4s ease-in-out;
    animation: shake 0.4s ease-in-out;
}

@-webkit-keyframes shake {

    0%,
    100% {
        -webkit-transform: translateX(0);
    }

    20%,
    60% {
        -webkit-transform: translateX(-6px);
    }

    40%,
    80% {
        -webkit-transform: translateX(6px);
    }
}

@-moz-keyframes shake {

    0%,
    100% {
        -moz-transform: translateX(0);
    }

    20%,
    60% {
        -moz-transform: translateX(-6px);
    }

    40%,
    80% {
        -moz-transform: translateX(6px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

/* ==========================================
   DASHBOARD SPECIFIC STYLES
   ========================================== */

:root {
    --sidebar-bg: #0A111A;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active-bg: #FFFFFF;
    --sidebar-active-text: #0A111A;
    --sidebar-text: #A5B4FC;
    --sidebar-text-muted: #64748B;
    --body-bg: #F4F6F9;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --kpi-blue: #0066FF;
    --kpi-blue-bg: #E6F0FF;
    --kpi-green: #00B36B;
    --kpi-green-bg: #E6F8F0;
    --kpi-purple: #8B5CF6;
    --kpi-purple-bg: #F3E8FF;
    --kpi-orange: #FF8800;
    --kpi-orange-bg: #FFF2E6;
    --kpi-teal: #00B3B3;
    --kpi-teal-bg: #E6F8F8;
    --kpi-pink: #EC4899;
    --kpi-pink-bg: #FDF2F8;
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--body-bg);
    overflow: visible;
}

/* Sidebar panel */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    -webkit-transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -moz-transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

/* Sidebar logo filter hack */
.sidebar-header .brand-logo {
    max-height: 32px;
    height: auto;
    width: auto;
    filter: invert(1) hue-rotate(180deg) saturate(3);
    -webkit-filter: invert(1) hue-rotate(180deg) saturate(3);
}

.sidebar-header .brand-icon {
    display: none;
    max-width: 32px;
    height: auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.1));
}

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
}

/* Custom Scrollbar for Sidebar - hidden */
.sidebar-menu-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.menu-group-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--sidebar-text-muted);
    padding: 20px 24px 8px;
    display: block;
    opacity: 0.8;
}

.menu-item {
    margin-bottom: 4px;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.menu-item a i {
    font-size: 18px;
    margin-right: 14px;
    width: 20px;
    text-align: center;
    color: #8F9CAE;
    -webkit-transition: margin 0.3s;
    -moz-transition: margin 0.3s;
    transition: margin 0.3s;
}

.menu-item a:hover {
    background-color: var(--sidebar-hover);
    color: #FFFFFF;
}

.menu-item a:hover i {
    color: #FFFFFF;
}

/* Active Dashboard Card (White capsule styling as per figma) */
.menu-item.active a {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text) !important;
    border-radius: 8px;
    margin: 4px 16px;
    padding: 10px 16px;
    border-left: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.menu-item.active a i {
    color: var(--sidebar-active-text) !important;
}

/* Collapsed Sidebar Styles */
.sidebar.collapsed {
    width: 70px !important;
}

.sidebar.collapsed .sidebar-header .brand-full {
    display: none !important;
}

.sidebar.collapsed .sidebar-header .brand-icon {
    display: block !important;
}

.sidebar.collapsed .menu-group-title {
    display: none !important;
}

.sidebar.collapsed .menu-item a {
    justify-content: center;
    padding: 12px 0;
    border-left: none;
}

.sidebar.collapsed .menu-item a i {
    margin-right: 0;
}

.sidebar.collapsed .menu-item a .menu-text {
    display: none !important;
}

.sidebar.collapsed .menu-item.active a {
    margin: 4px 10px;
    padding: 10px 0;
    border-radius: 8px;
    width: 50px;
    display: flex;
    justify-content: center;
}

/* Main panel containing header and content */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

/* Top Nav bar */
.topnav {
    height: 70px;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 30px;
    justify-content: space-between;
    flex-shrink: 0;
}

.topnav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #1E293B;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.toggle-btn:hover {
    background-color: #F1F5F9;
}

/* Logout Button */
.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748B;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.logout-btn i {
    font-size: 18px;
    color: #EF4444; /* Matches red tone in reference image */
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.logout-btn:hover {
    background-color: #FEF2F2;
    color: #991B1B;
    border-color: #FEE2E2;
}

.logout-btn:hover i {
    transform: translateX(-3px); /* Interactive visual shift on hover */
}

.content-header-title {
    font-size: 26px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}

.content-header-subtitle {
    font-size: 13px;
    color: #64748B;
    margin: 4px 0 0;
}

/* Top Nav Controls (Filters) */
.topnav-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-select, .control-btn {
    height: 40px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px;
    background-color: #FFFFFF;
    color: #334155;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-select:focus, .control-btn:focus {
    border-color: #0066FF;
}

.control-btn {
    cursor: pointer;
}

.control-btn:hover {
    background-color: #F8FAFC;
}

/* Content wrapper */
.dashboard-content {
    padding: 30px;
    background-color: var(--body-bg);
    flex: 1;
}

.dashboard-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(244, 246, 249, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dashboard-loader.active {
    display: flex;
}

.dashboard-loader-box {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
    padding: 18px 20px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.dashboard-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #E2E8F0;
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: dashboardSpin 0.8s linear infinite;
    flex-shrink: 0;
}

.dashboard-loader-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
}

.dashboard-loader-text {
    margin-top: 2px;
    font-size: 12px;
    color: #64748B;
}

.dashboard-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #FECACA;
    border-radius: 8px;
    background: #FEF2F2;
    color: #991B1B;
    font-size: 13px;
    font-weight: 600;
}

@keyframes dashboardSpin {
    to {
        transform: rotate(360deg);
    }
}

/* KPI Cards Layout */
.kpi-row {
    margin-bottom: 24px;
}

.kpi-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.kpi-icon.blue {
    background-color: var(--kpi-blue-bg);
    color: var(--kpi-blue);
}

.kpi-icon.green {
    background-color: var(--kpi-green-bg);
    color: var(--kpi-green);
}

.kpi-icon.purple {
    background-color: var(--kpi-purple-bg);
    color: var(--kpi-purple);
}

.kpi-icon.orange {
    background-color: var(--kpi-orange-bg);
    color: var(--kpi-orange);
}

.kpi-icon.teal {
    background-color: var(--kpi-teal-bg);
    color: var(--kpi-teal);
}

.kpi-icon.pink {
    background-color: var(--kpi-pink-bg);
    color: var(--kpi-pink);
}

.kpi-details {
    flex: 1;
}

.kpi-title {
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
    margin: 0;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
    margin: 4px 0 0;
}

.kpi-trend {
    font-size: 12px;
    font-weight: 600;
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-trend.up {
    color: var(--kpi-green);
}

.kpi-trend.down {
    color: #D30000;
}

.kpi-trend-label {
    color: #64748B;
    font-weight: 400;
}

/* Dashboard Cards (For charts and grids) */
.dashboard-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.dashboard-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    margin: 0;
}

.dashboard-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container {
    position: relative;
    flex: 1;
    min-height: 250px;
    width: 100%;
}

/* Sales Details Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    height: 100%;
}

.summary-item {
    background-color: #F8FAFC;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.summary-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.summary-item-icon.blue { background-color: var(--kpi-blue-bg); color: var(--kpi-blue); }
.summary-item-icon.green { background-color: var(--kpi-green-bg); color: var(--kpi-green); }
.summary-item-icon.purple { background-color: var(--kpi-purple-bg); color: var(--kpi-purple); }
.summary-item-icon.orange { background-color: var(--kpi-orange-bg); color: var(--kpi-orange); }

.summary-item-title {
    font-size: 12px;
    font-weight: 500;
    color: #64748B;
    margin: 0;
}

.summary-item-value {
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
    margin: 8px 0 0;
}

/* Quarter Table Styles */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.quarter-table {
    width: 100%;
    margin: 0;
}

.quarter-table th {
    background-color: #F8FAFC;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748B;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
}

.quarter-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid var(--border-color);
}

.quarter-table tr:last-child td {
    border-bottom: none;
}

.text-success-green {
    color: var(--kpi-green) !important;
    font-weight: 600;
}

/* Sidebar overlay background on mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 99;
    display: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Responsive Overrides */
@media (max-width: 1400px) {
    .sidebar {
        width: 240px;
    }
    .sidebar-header {
        padding: 0 15px;
    }
    .menu-item a {
        padding: 10px 20px;
    }
    .menu-item.active a {
        margin: 4px 12px;
        padding: 10px 12px;
    }
    .topnav {
        padding: 0 20px;
    }
    .dashboard-content {
        padding: 20px;
    }
    .kpi-card {
        padding: 16px;
        gap: 12px;
    }
    .kpi-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .kpi-value {
        font-size: 20px;
    }
    .dashboard-card {
        padding: 20px;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }
    .menu-item a {
        padding: 10px 16px;
        font-size: 13px;
    }
    .menu-item.active a {
        margin: 4px 8px;
    }
    .dashboard-content {
        padding: 16px;
    }
    .kpi-card {
        padding: 12px;
        gap: 10px;
    }
    .kpi-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .kpi-value {
        font-size: 18px;
    }
    .kpi-title {
        font-size: 12px;
    }
    .kpi-trend {
        font-size: 11px;
    }
    .dashboard-card {
        padding: 16px;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        width: 260px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-backdrop.active {
        display: block;
    }
    
    .topnav {
        padding: 0 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kpi-row > div {
        margin-bottom: 16px;
    }
    .kpi-row > div:last-child {
        margin-bottom: 0;
    }
    
    .chart-row > div {
        margin-bottom: 24px;
    }
    .chart-row > div:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .content-header-controls {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .content-header-controls select,
    .content-header-controls button {
        flex: 1;
        font-size: 13px;
        padding: 0 8px;
        height: 38px;
        min-width: 120px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1600px) {
    .kpi-col {
        flex: 0 0 16.666667% !important;
        width: 16.666667% !important;
        max-width: 16.666667% !important;
    }
}

/* ==========================================
   SELECT2 DASHBOARD CUSTOMIZATION
   ========================================== */
.select2-container {
    display: block !important;
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    min-height: 40px !important;
    padding: 0px 8px !important;
    background-color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #0066FF !important;
    box-shadow: none !important;
}

.select2-container .select2-search--inline .select2-search__field {
    font-family: var(--font-sans) !important;
    font-size: 14px !important;
    margin-top: 0 !important;
    color: #334155 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 6px !important;
    padding: 2px 6px !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    margin-right: 6px !important;
    font-size: 13px !important;
    color: #334155 !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: row-reverse !important;
    gap: 6px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #64748B !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    background: transparent !important;
    font-weight: 500 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #EF4444 !important;
    background: transparent !important;
}

