/* =====================================================
   DASHBOARD HEADER - COMPACT
===================================================== */

.dashboard-header {
    width: 100%;

    background: linear-gradient(135deg, #2448A6, #3C67DD);

    border-radius: 14px;

    padding: 16px 20px;

    color: #fff;

    margin-bottom: 14px;

    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);

    box-sizing: border-box;
}


/* =====================================================
   TOP
===================================================== */

.header-top {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 14px;
}


/* TITLE */

.header-title {
    display: flex;

    align-items: center;

    gap: 10px;
}


.header-title h2 {
    display: flex;

    align-items: center;

    gap: 8px;

    margin: 0;

    font-size: 22px;
    font-weight: 700;

    line-height: 1.2;
}


.header-title h2 i {
    font-size: 22px;

    margin: 0;
}


/* SUBTITLE */

.header-title p {
    margin: 2px 0 0 10px;

    font-size: 12px;

    color: rgba(255, 255, 255, .85);

    white-space: nowrap;
}


/* =====================================================
   LAST UPDATE
===================================================== */

.header-right {
    text-align: right;

    flex-shrink: 0;
}


.header-right small {
    display: block;

    color: rgba(255, 255, 255, .75);

    font-size: 10px;

    line-height: 1.2;
}


.header-right strong {
    display: block;

    margin-top: 2px;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.2;
}


/* =====================================================
   FILTER
===================================================== */

.header-filter {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px 20px;

    width: 100%;
}


/* FILTER ITEM */

.filter-item {
    min-width: 0;
}


.filter-item label {
    display: block;

    margin-bottom: 5px;

    font-size: 12px;
    font-weight: 500;

    line-height: 1.2;

    color: #fff;
}


/* =====================================================
   DATE GROUP
===================================================== */

.date-group {
    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        18px
        minmax(0, 1fr);

    gap: 6px;

    align-items: center;
}


.date-group > span {
    text-align: center;

    font-size: 12px;
    font-weight: 700;

    color: rgba(255, 255, 255, .9);
}


/* =====================================================
   INPUT
===================================================== */

.dashboard-input {
    width: 100%;
    min-width: 0;

    height: 36px;

    background: rgba(255, 255, 255, .15);

    border: none;

    border-radius: 8px;

    color: #fff;

    padding: 0 10px;

    font-size: 12px;

    box-sizing: border-box;

    outline: none;
}


.dashboard-input::placeholder {
    color: rgba(255, 255, 255, .7);
}


.dashboard-input:focus {
    outline: none;

    background: rgba(255, 255, 255, .20);
}


/* DATE ICON */

.dashboard-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;

    opacity: .85;

    width: 14px;
    height: 14px;
}


/* =====================================================
   NORMAL SELECT
===================================================== */

.dashboard-select {
    width: 100%;
    min-width: 0;

    height: 36px;

    background: rgba(255, 255, 255, .15);

    border: none;

    border-radius: 8px;

    color: #fff;

    padding: 0 10px;

    font-size: 12px;

    box-sizing: border-box;

    outline: none;
}


.dashboard-select:focus {
    outline: none;
}


/* =====================================================
   SELECT2
===================================================== */

.dashboard-header .select2-container {
    width: 100% !important;
}


/* SELECT BOX */

.dashboard-header
.select2-container--default
.select2-selection--single {

    height: 36px;

    background: rgba(255, 255, 255, .15);

    border: none;

    border-radius: 8px;

    outline: none;
}


/* SELECT TEXT */

.dashboard-header
.select2-container--default
.select2-selection--single
.select2-selection__rendered {

    height: 36px;

    line-height: 36px !important;

    padding-left: 10px !important;
    padding-right: 28px !important;

    color: #fff !important;

    font-size: 12px;
}


/* PLACEHOLDER */

.dashboard-header
.select2-container--default
.select2-selection--single
.select2-selection__placeholder {

    color: rgba(255, 255, 255, .65) !important;
}


/* SELECT ARROW */

.dashboard-header
.select2-container--default
.select2-selection--single
.select2-selection__arrow {

    height: 36px !important;

    right: 5px;
}


/* CLEAR BUTTON */

.dashboard-header
.select2-container--default
.select2-selection--single
.select2-selection__clear {

    color: #fff;

    margin-right: 5px;
}


/* =====================================================
   SELECT2 DROPDOWN
===================================================== */

.select2-dropdown {
    background: #23365E;

    border: none;

    border-radius: 8px;

    overflow: hidden;
}


.select2-results__option {
    color: #fff;

    font-size: 12px;

    padding: 7px 10px;
}


.select2-results__option--highlighted {
    background: #3C67DD !important;

    color: #fff !important;
}


/* SEARCH */

.select2-search--dropdown {
    padding: 6px;
}


.select2-search--dropdown .select2-search__field {
    height: 32px;

    border: 1px solid #475569;

    border-radius: 6px;

    padding: 0 8px;

    font-size: 12px;

    outline: none;
}


/* =====================================================
   ACTION BUTTON
===================================================== */

.header-action {
    display: flex;

    justify-content: flex-end;
    align-items: center;

    gap: 8px;

    margin-top: 12px;
}


/* BUTTON */

.btn-header {
    min-width: 105px;

    height: 34px;

    border: none;

    border-radius: 8px;

    display: flex;

    justify-content: center;
    align-items: center;

    gap: 6px;

    padding: 0 12px;

    font-size: 12px;
    font-weight: 500;

    cursor: pointer;

    transition:
        transform .15s ease,
        background .15s ease,
        opacity .15s ease;
}


.btn-header i {
    font-size: 11px;
}


.btn-header:hover {
    transform: translateY(-1px);
}


.btn-header:active {
    transform: translateY(0);
}


/* =====================================================
   REFRESH
===================================================== */

.btn-refresh {
    background: #64748B;

    color: #fff;
}


.btn-refresh:hover {
    background: #475569;
}


/* =====================================================
   EXPORT
===================================================== */

.btn-export {
    background: #22C55E;

    color: #fff;
}


.btn-export:hover {
    background: #16A34A;
}


/* =====================================================
   AI
===================================================== */

.btn-ai {
    background: linear-gradient(
        135deg,
        #7C3AED,
        #5B5EF7
    );

    color: #fff;
}


.btn-ai:hover {
    background: linear-gradient(
        135deg,
        #6D28D9,
        #4F46E5
    );
}


/* =====================================================
   DISABLED
===================================================== */

.btn-header:disabled {
    opacity: .6;

    cursor: not-allowed;

    transform: none;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1200px) {

    .dashboard-header {
        padding: 14px 16px;
    }


    .header-filter {
        gap: 10px 14px;
    }


    .header-title h2 {
        font-size: 20px;
    }


    .header-title h2 i {
        font-size: 20px;
    }

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 992px) {

    .header-top {
        flex-direction: column;

        gap: 8px;
    }


    .header-right {
        width: 100%;

        text-align: left;
    }


    .header-filter {
        grid-template-columns: 1fr;
    }


    .header-action {
        justify-content: flex-start;

        flex-wrap: wrap;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

    .dashboard-header {
        padding: 12px;

        border-radius: 10px;
    }


    .header-title {
        display: block;
    }


    .header-title h2 {
        font-size: 18px;
    }


    .header-title h2 i {
        font-size: 18px;
    }


    .header-title p {
        margin-left: 0;

        margin-top: 4px;

        white-space: normal;
    }


    .date-group {
        grid-template-columns: 1fr;
    }


    .date-group > span {
        display: none;
    }


    .header-action {
        display: grid;

        grid-template-columns: repeat(3, 1fr);

        width: 100%;
    }


    .btn-header {
        width: 100%;

        min-width: 0;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 576px) {

    .header-action {
        grid-template-columns: 1fr;
    }

}