/* =========================================================
   TARGET VS ACTUAL
========================================================= */

.target-actual-component {
    width: 100%;
    margin-top: 24px;
    color: #ffffff;
}


/* =========================================================
   HEADER
========================================================= */

.target-actual-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.target-actual-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.target-actual-subtitle {
    margin-top: 5px;
    color: #8faed4;
    font-size: 13px;
}


/* =========================================================
   FILTER
========================================================= */

.target-actual-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.target-actual-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.target-actual-filter-group label {
    font-size: 9px;
    font-weight: 600;
    color: #8faed4;
    text-transform: uppercase;
}

.target-actual-filter-group select {
    min-width: 120px;
    height: 34px;

    padding: 0 10px;

    background: #1d385f;
    border: 1px solid #365783;
    border-radius: 7px;

    color: #ffffff;
    font-size: 12px;
    font-weight: 600;

    outline: none;
}

.target-actual-filter-group select:focus {
    border-color: #5c9cff;
}


/* =========================================================
   SUMMARY
========================================================= */

.target-actual-summary {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 24px;
}


.target-summary-card {
    position: relative;

    min-height: 105px;

    padding: 18px 20px;

    background: #1d385f;

    border: 1px solid #31547f;

    border-radius: 7px;

    overflow: hidden;
}


.target-summary-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 3px;

    background: #4e8cff;
}


.target-summary-card.actual::before {
    background: #16c7a1;
}


.target-summary-card.achievement::before {
    background: #9b6cff;
}


.target-summary-label {
    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    color: #8faed4;

    letter-spacing: .5px;
}


.target-summary-value {
    margin-top: 8px;

    font-size: 22px;

    font-weight: 700;

    color: #ffffff;
}


.target-summary-description {
    margin-top: 5px;

    font-size: 10px;

    color: #7799c4;
}


/* =========================================================
   ACHIEVEMENT
========================================================= */

.target-achievement-status {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    margin-top: 5px;

    padding: 3px 8px;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;
}


.target-achievement-status.success {
    color: #29d3a2;

    background: rgba(
        41,
        211,
        162,
        .12
    );
}


.target-achievement-status.warning {
    color: #f5b94c;

    background: rgba(
        245,
        185,
        76,
        .12
    );
}


.target-achievement-status.danger {
    color: #ff6b81;

    background: rgba(
        255,
        107,
        129,
        .12
    );
}


/* =========================================================
   SECTION
========================================================= */

.target-actual-section {
    margin-top: 25px;
}


.target-actual-section-title {
    font-size: 15px;

    font-weight: 700;

    color: #ffffff;

    margin-bottom: 3px;
}


.target-actual-section-subtitle {
    color: #7fa4d1;

    font-size: 11px;

    margin-bottom: 12px;
}


/* =========================================================
   MONTHLY
========================================================= */

/* =====================================================
   MONTHLY PERFORMANCE
===================================================== */

.target-monthly {

    width: 100%;

    overflow-x: auto;

    overflow-y: hidden;

    padding-bottom: 8px;

    margin-top: 8px;

}


/* scrollbar */

.target-monthly::-webkit-scrollbar {

    height: 6px;

}

.target-monthly::-webkit-scrollbar-track {

    background: #0f2038;

    border-radius: 10px;

}

.target-monthly::-webkit-scrollbar-thumb {

    background: #355a87;

    border-radius: 10px;

}

.target-monthly::-webkit-scrollbar-thumb:hover {

    background: #4b73a4;

}


/* =====================================================
   MONTHLY TABLE
===================================================== */

.target-monthly-table {

    width: 100%;

    min-width: 760px;

    border-collapse: separate;

    border-spacing: 0;

    background: #172f50;

    border: 1px solid #294b76;

    border-radius: 8px;

    overflow: hidden;

}


/* =====================================================
   HEADER
===================================================== */

.target-monthly-table thead th {

    padding: 11px 14px;

    background: #132945;

    border-bottom: 1px solid #294b76;

    color: #86a8d3;

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .4px;

    text-align: left;

    white-space: nowrap;

}


/* =====================================================
   BODY
===================================================== */

.target-monthly-table tbody td {

    padding: 12px 14px;

    border-bottom: 1px solid #233f62;

    color: #d5e3f3;

    font-size: 10px;

    white-space: nowrap;

}


.target-monthly-table tbody tr:last-child td {

    border-bottom: 0;

}


/* hover */

.target-monthly-table tbody tr:hover {

    background: #1c3b63;

}


/* =====================================================
   MONTH
===================================================== */

.target-month-name-cell {

    font-weight: 600;

    color: #ffffff !important;

}


/* =====================================================
   TARGET / ACTUAL
===================================================== */

.target-month-money {

    font-weight: 600;

    color: #c9daf0;

}


/* =====================================================
   ACHIEVEMENT
===================================================== */

.target-month-achievement-cell {

    font-weight: 700;

}


/* =====================================================
   PROGRESS
===================================================== */

.target-month-progress-wrapper {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 150px;

}


.target-month-progress {

    width: 100px;

    height: 5px;

    background: #0e213b;

    border-radius: 20px;

    overflow: hidden;

    flex-shrink: 0;

}


.target-month-progress-bar {

    height: 100%;

    border-radius: 20px;

    transition: width .3s ease;

}


.target-month-progress-bar.success {

    background: #29d3a2;

}


.target-month-progress-bar.warning {

    background: #f5b94c;

}


.target-month-progress-bar.danger {

    background: #ff687e;

}


/* =====================================================
   STATUS BADGE
===================================================== */

.target-month-status {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 4px 8px;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;

}


.target-month-status.success {

    color: #29d3a2;

    background: rgba(
        41,
        211,
        162,
        .10
    );

}


.target-month-status.warning {

    color: #f5b94c;

    background: rgba(
        245,
        185,
        76,
        .10
    );

}


.target-month-status.danger {

    color: #ff687e;

    background: rgba(
        255,
        104,
        126,
        .10
    );

}


.target-month-card {
    min-width: 85px;

    padding: 10px;

    background: #172f50;

    border: 1px solid #294b76;

    border-radius: 6px;
}


.target-month-name {
    font-size: 10px;

    font-weight: 700;

    color: #9db9db;
}


.target-month-achievement {
    margin-top: 5px;

    font-size: 14px;

    font-weight: 700;

    color: #ffffff;
}


.target-month-progress {
    height: 4px;

    margin-top: 8px;

    background: #10233e;

    border-radius: 10px;

    overflow: hidden;
}


.target-month-progress-bar {
    height: 100%;

    border-radius: 10px;

    transition: width .3s ease;
}


.target-month-progress-bar.success {
    background: #20c997;
}


.target-month-progress-bar.warning {
    background: #f5b94c;
}


.target-month-progress-bar.danger {
    background: #ff6078;
}


/* =========================================================
   GROUP
========================================================= */

.target-groups {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.target-group {
    background: #172f50;

    border: 1px solid #294b76;

    border-radius: 8px;

    overflow: hidden;
}


.target-group-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 16px 18px;

    cursor: pointer;

    transition: background .2s ease;
}


.target-group-header:hover {
    background: #1c3b64;
}


.target-group-left {
    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;
}


.target-group-arrow {
    width: 20px;

    color: #8fb5e8;

    font-size: 12px;

    transition: transform .2s ease;
}


.target-group.open
.target-group-arrow {
    transform: rotate(90deg);
}


.target-group-name {
    font-size: 14px;

    font-weight: 700;

    color: #ffffff;
}


.target-group-customer-count {
    margin-top: 3px;

    color: #7799c4;

    font-size: 10px;
}


.target-group-summary {
    display: flex;

    align-items: center;

    gap: 28px;
}


.target-group-metric {
    min-width: 110px;

    text-align: right;
}


.target-group-metric-label {
    display: block;

    color: #7799c4;

    font-size: 9px;

    text-transform: uppercase;
}


.target-group-metric-value {
    display: block;

    margin-top: 3px;

    color: #ffffff;

    font-size: 12px;

    font-weight: 700;
}


/* =========================================================
   GROUP BODY
========================================================= */

.target-group-body {
    display: none;

    border-top: 1px solid #294b76;
}


.target-group.open
.target-group-body {
    display: block;
}


/* =========================================================
   CUSTOMER
========================================================= */

.target-customer {
    border-bottom: 1px solid #223f64;
}


.target-customer:last-child {
    border-bottom: 0;
}


.target-customer-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 12px 18px 12px 42px;

    cursor: pointer;
}


.target-customer-header:hover {
    background: rgba(
        255,
        255,
        255,
        .025
    );
}


.target-customer-left {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;
}


.target-customer-arrow {
    color: #6f9ed4;

    font-size: 10px;
}


.target-customer-name {
    font-size: 12px;

    font-weight: 600;

    color: #dce9fa;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.target-customer-summary {
    display: flex;

    align-items: center;

    gap: 22px;
}


.target-customer-summary span {
    font-size: 10px;

    color: #ffffff;
}


.target-customer-summary strong {
    font-size: 11px;
}


/* =========================================================
   CUSTOMER MONTHS
========================================================= */

.target-customer-months {
    display: none;

    padding: 0 18px 15px 70px;
}


.target-customer.open
.target-customer-months {
    display: block;
}


.target-customer-month-table {
    width: 100%;

    border-collapse: collapse;
}


.target-customer-month-table th {
    padding: 7px 10px;

    background: #132945;

    color: #789ac3;

    font-size: 9px;

    text-transform: uppercase;

    text-align: left;
}


.target-customer-month-table td {
    padding: 8px 10px;

    border-bottom: 1px solid #223f64;

    color: #cbdcf2;

    font-size: 10px;
}


.target-customer-month-table tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .target-actual-summary {
        grid-template-columns:
            1fr;
    }


    .target-actual-header {
        flex-direction: column;
    }


    .target-group-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .target-group-summary {
        width: 100%;

        justify-content: space-between;
    }

}


@media (max-width: 600px) {

    .target-group-summary {
        flex-wrap: wrap;

        gap: 12px;
    }


    .target-customer-header {
        padding-left: 25px;
    }


    .target-customer-months {
        padding-left: 25px;
    }

}


/* =====================================================
   MONTH SECTION
===================================================== */

.target-month-section {

    margin-bottom: 12px;

    border: 1px solid #294b76;

    border-radius: 10px;

    overflow: hidden;

    background: #172f50;

}


/* =====================================================
   MONTH HEADER
===================================================== */

.target-month-section-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 24px;

    background: #203f68;

    cursor: pointer;

    border-bottom: 1px solid transparent;

}


.target-month-section-header:hover {

    background: #264a78;

}


.target-month-section-left {

    display: flex;

    align-items: center;

    gap: 14px;

}


.target-month-section-arrow {

    width: 20px;

    color: #8bb8ed;

    transition: transform .2s ease;

}


.target-month-section.open
.target-month-section-arrow {

    transform: rotate(90deg);

}


.target-month-section-name {

    color: #ffffff;

    font-size: 18px;

    font-weight: 700;

}


.target-month-section-count {

    margin-top: 3px;

    color: #80a4d2;

    font-size: 11px;

}


/* =====================================================
   MONTH SUMMARY
===================================================== */

.target-month-section-summary {

    display: flex;

    align-items: center;

    gap: 45px;

}


.target-month-section-body {

    display: none;

    padding: 10px 12px;

}


.target-month-section.open
.target-month-section-body {

    display: block;

}


/* =====================================================
   GROUP INSIDE MONTH
===================================================== */

.target-month-group {

    margin-bottom: 8px;

}


.target-month-group:last-child {

    margin-bottom: 0;

}


/* =====================================================
   CUSTOMER INSIDE MONTH
===================================================== */

.target-month-customer {

    border-top: 1px solid #294b76;

}


.target-month-customer
.target-customer-header {

    padding-left: 55px;

}


.target-month-customer
.target-customer-name {

    font-size: 12px;

}