/* ==========================================================
   Francherry Manager Portal
   Reports Module
   Version: 1.0.0
========================================================== */


/* ==========================================================
   PAGE WRAPPER
========================================================== */

.fb-reports-wrapper {

    width: 100%;

    margin: 0;

    padding: 34px 28px 42px;

    box-sizing: border-box;

    background: #F6F7F8;

    color: #171717;

}


/* ==========================================================
   HEADER
========================================================== */

.fb-reports-header {

    width: 100%;

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 28px;

    margin-bottom: 28px;

}


.fb-reports-header-left {

    min-width: 0;

}


.fb-reports-title {

    margin: 0 0 7px !important;

    padding: 0 !important;

    color: #171717 !important;

    font-family: inherit !important;

    font-size: 32px !important;

    font-weight: 700 !important;

    line-height: 1.15 !important;

}


.fb-reports-subtitle {

    margin: 0 !important;

    padding: 0 !important;

    color: #737373 !important;

    font-family: inherit !important;

    font-size: 15px !important;

    font-weight: 400 !important;

    line-height: 1.5 !important;

}


/* ==========================================================
   PERIOD CARD
========================================================== */

.fb-reports-header-period {

    min-width: 210px;

    min-height: 82px;

    padding: 14px 18px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    background: #FFFFFF;

    border: 1px solid #E1E1E1;

    border-radius: 14px;

}


.fb-reports-period-label {

    display: block;

    margin-bottom: 6px;

    color: #888888;

    font-size: 10px;

    font-weight: 700;

    line-height: 1.2;

    text-transform: uppercase;

    letter-spacing: .05em;

}


.fb-reports-period-value {

    color: #171717;

    font-size: 13px;

    font-weight: 700;

    line-height: 1.35;

    text-align: center;

}


/* ==========================================================
   FILTER BAR
========================================================== */

.fb-reports-filters {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(5, minmax(150px, 1fr))
        auto
        auto;

    gap: 12px;

    align-items: end;

    padding: 16px;

    margin-bottom: 18px;

    box-sizing: border-box;

    background: #FFFFFF;

    border: 1px solid #E1E1E1;

    border-radius: 14px;

}


.fb-reports-filter {

    min-width: 0;

}


.fb-reports-filter label {

    display: block;

    margin: 0 0 6px;

    padding: 0;

    color: #666666;

    font-size: 10px;

    font-weight: 700;

    line-height: 1.3;

    text-transform: uppercase;

    letter-spacing: .04em;

}


/* ==========================================================
   FILTER INPUTS
========================================================== */

body .fb-reports-wrapper
.fb-reports-filter-input,

body .fb-reports-wrapper
.fb-reports-filter-select {

    width: 100% !important;

    height: 43px !important;

    margin: 0 !important;

    padding: 0 12px !important;

    box-sizing: border-box !important;

    background: #FFFFFF !important;

    color: #171717 !important;

    border: 1px solid #D8D8D8 !important;

    border-radius: 8px !important;

    outline: none !important;

    box-shadow: none !important;

    font-family: inherit !important;

    font-size: 12px !important;

    font-weight: 400 !important;

    line-height: normal !important;

}


body .fb-reports-wrapper
.fb-reports-filter-input:focus,

body .fb-reports-wrapper
.fb-reports-filter-select:focus {

    border-color: #C89B3C !important;

    box-shadow:
        0 0 0 3px
        rgba(200, 155, 60, .12) !important;

}


/* ==========================================================
   FILTER ACTIONS
========================================================== */

.fb-reports-filter-action {

    display: flex;

    align-items: flex-end;

}


/* Apply */

body .fb-reports-wrapper
button.fb-reports-primary-button {

    height: 43px !important;

    min-width: 92px !important;

    margin: 0 !important;

    padding: 0 18px !important;

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    background: #C89B3C !important;

    color: #000000 !important;

    border: 1px solid #C89B3C !important;

    border-radius: 7px !important;

    box-shadow: none !important;

    font-family: inherit !important;

    font-size: 12px !important;

    font-weight: 700 !important;

    line-height: 1 !important;

    cursor: pointer !important;

}


body .fb-reports-wrapper
button.fb-reports-primary-button:hover {

    background: #000000 !important;

    color: #C89B3C !important;

    border-color: #000000 !important;

}


/* Reset */

body .fb-reports-wrapper
button.fb-reports-secondary-button {

    height: 43px !important;

    min-width: 92px !important;

    margin: 0 !important;

    padding: 0 18px !important;

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    background: #000000 !important;

    color: #C89B3C !important;

    border: 1px solid #000000 !important;

    border-radius: 7px !important;

    box-shadow: none !important;

    font-family: inherit !important;

    font-size: 12px !important;

    font-weight: 600 !important;

    cursor: pointer !important;

}


body .fb-reports-wrapper
button.fb-reports-secondary-button:hover {

    background: #C89B3C !important;

    color: #000000 !important;

    border-color: #C89B3C !important;

}


/* Disabled */

body .fb-reports-wrapper
button:disabled {

    opacity: .55 !important;

    cursor: not-allowed !important;

}


/* ==========================================================
   MESSAGE
========================================================== */

.fb-reports-message {

    width: 100%;

    margin: 0 0 18px;

    padding: 12px 14px;

    box-sizing: border-box;

    border-radius: 8px;

    font-size: 12px;

    line-height: 1.45;

}


.fb-reports-message.error {

    background: #FFF2F2;

    color: #A92A2A;

    border: 1px solid #F0CACA;

}


.fb-reports-message.success {

    background: #EFFAF2;

    color: #287A3B;

    border: 1px solid #CDEBD4;

}


/* ==========================================================
   KPI SUMMARY GRID
========================================================== */

.fb-reports-summary-grid {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 14px;

    margin-bottom: 18px;

}


/* ==========================================================
   SUMMARY CARD
========================================================== */

.fb-report-summary-card {

    min-height: 118px;

    padding: 18px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    box-sizing: border-box;

    background: #FFFFFF;

    border: 1px solid #E1E1E1;

    border-radius: 14px;

    box-shadow:
        0 3px 10px
        rgba(0, 0, 0, .02);

}


.fb-report-summary-label {

    display: block;

    margin-bottom: 8px;

    color: #777777;

    font-size: 10px;

    font-weight: 700;

    line-height: 1.3;

    text-transform: uppercase;

    letter-spacing: .04em;

}


.fb-report-summary-value {

    display: block;

    margin-bottom: 6px;

    color: #171717;

    font-size: 25px;

    font-weight: 700;

    line-height: 1.15;

}


.fb-report-summary-note {

    color: #999999;

    font-size: 10px;

    font-weight: 400;

    line-height: 1.35;

}


/* ==========================================================
   MAIN REPORT GRID
========================================================== */

.fb-reports-main-grid {

    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);

    gap: 16px;

    margin-bottom: 16px;

}


/* ==========================================================
   PERFORMANCE GRID
========================================================== */

.fb-reports-performance-grid {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 16px;

}


/* ==========================================================
   REPORT PANEL
========================================================== */

.fb-report-panel {

    width: 100%;

    box-sizing: border-box;

    background: #FFFFFF;

    border: 1px solid #E1E1E1;

    border-radius: 16px;

    overflow: hidden;

}


.fb-report-panel-header {

    width: 100%;

    padding: 18px 20px;

    box-sizing: border-box;

    border-bottom: 1px solid #ECECEC;

}


.fb-report-panel-header h2 {

    margin: 0 0 4px !important;

    padding: 0 !important;

    color: #171717 !important;

    font-family: inherit !important;

    font-size: 15px !important;

    font-weight: 700 !important;

    line-height: 1.3 !important;

}


.fb-report-panel-header p {

    margin: 0 !important;

    padding: 0 !important;

    color: #888888 !important;

    font-family: inherit !important;

    font-size: 11px !important;

    line-height: 1.45 !important;

}


/* ==========================================================
   CHART AREA
========================================================== */

.fb-report-chart-area {

    min-height: 270px;

    padding: 18px 20px;

    box-sizing: border-box;

}


/* ==========================================================
   REVENUE TREND
========================================================== */

.fb-report-trend-list {

    display: grid;

    gap: 12px;

}


.fb-report-trend-row {

    display: grid;

    grid-template-columns:
        95px
        minmax(0, 1fr)
        130px;

    gap: 14px;

    align-items: center;

}


.fb-report-trend-date {

    color: #666666;

    font-size: 11px;

    font-weight: 600;

}


.fb-report-trend-track {

    width: 100%;

    height: 9px;

    overflow: hidden;

    background: #EEEEEE;

    border-radius: 999px;

}


.fb-report-trend-bar {

    height: 100%;

    min-width: 2px;

    background: #C89B3C;

    border-radius: 999px;

}


.fb-report-trend-value {

    display: flex;

    flex-direction: column;

    align-items: flex-end;

}


.fb-report-trend-value strong {

    color: #171717;

    font-size: 11px;

    font-weight: 700;

}


.fb-report-trend-value span {

    margin-top: 2px;

    color: #999999;

    font-size: 9px;

}


/* ==========================================================
   STATUS BREAKDOWN
========================================================== */

.fb-report-status-list {

    min-height: 270px;

    padding: 18px 20px;

    box-sizing: border-box;

}


.fb-report-status-row {

    margin-bottom: 18px;

}


.fb-report-status-row:last-child {

    margin-bottom: 0;

}


.fb-report-status-row-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 7px;

}


.fb-report-status-name {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #555555;

    font-size: 11px;

    font-weight: 600;

}


.fb-report-status-row-top strong {

    color: #171717;

    font-size: 12px;

    font-weight: 700;

}


/* Dot */

.fb-report-status-dot {

    width: 8px;

    height: 8px;

    min-width: 8px;

    border-radius: 50%;

    background: #999999;

}


/* Track */

.fb-report-status-track {

    width: 100%;

    height: 7px;

    overflow: hidden;

    background: #EEEEEE;

    border-radius: 999px;

}


.fb-report-status-progress {

    height: 100%;

    border-radius: 999px;

    background: #999999;

}


.fb-report-status-percentage {

    display: block;

    margin-top: 5px;

    color: #999999;

    font-size: 9px;

    text-align: right;

}


/* ==========================================================
   STATUS COLORS
========================================================== */

.status-approved {

    background: #198754 !important;

}


.status-pending {

    background: #C89B3C !important;

}


.status-cancelled,
.status-canceled {

    background: #B42318 !important;

}


.status-rejected {

    background: #8A3B3B !important;

}


/* ==========================================================
   RANKING LIST
========================================================== */

.fb-report-ranking-list {

    padding: 6px 18px 12px;

}


.fb-report-ranking-row {

    display: grid;

    grid-template-columns:
        30px
        minmax(0, 1fr)
        auto;

    gap: 12px;

    align-items: center;

    min-height: 62px;

    padding: 10px 0;

    border-bottom: 1px solid #EEEEEE;

}


.fb-report-ranking-row:last-child {

    border-bottom: none;

}


.fb-report-ranking-number {

    width: 28px;

    height: 28px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    background: #C89B3C;

    color: #000000;

    border-radius: 50%;

    font-size: 10px;

    font-weight: 700;

}


.fb-report-ranking-main {

    min-width: 0;

    display: flex;

    flex-direction: column;

}


.fb-report-ranking-main strong {

    overflow: hidden;

    color: #171717;

    font-size: 12px;

    font-weight: 700;

    line-height: 1.35;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.fb-report-ranking-main span {

    margin-top: 3px;

    color: #888888;

    font-size: 10px;

}


.fb-report-ranking-value {

    color: #C89B3C;

    font-size: 12px;

    font-weight: 700;

    white-space: nowrap;

}


/* ==========================================================
   LOADING / EMPTY STATES
========================================================== */

.fb-report-loading,
.fb-report-empty {

    min-height: 150px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    color: #888888;

    font-size: 11px;

    text-align: center;

}


/* ==========================================================
   APPOINTMENT REPORT PANEL
========================================================== */

.fb-report-appointments-panel {

    margin-top: 0;

}


.fb-report-table-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

}


.fb-report-table-meta {

    color: #777777;

    font-size: 11px;

    font-weight: 500;

    white-space: nowrap;

}


/* ==========================================================
   TABLE WRAPPER
========================================================== */

.fb-report-table-wrapper {

    width: 100%;

    overflow-x: auto;

}


/* ==========================================================
   TABLE
========================================================== */

.fb-report-table {

    width: 100%;

    min-width: 850px;

    margin: 0;

    border-collapse: collapse;

    background: #FFFFFF;

}


.fb-report-table thead {

    background: #FAFAFA;

}


.fb-report-table th {

    padding: 12px 14px;

    color: #777777;

    border-bottom: 1px solid #E6E6E6;

    font-size: 9px;

    font-weight: 700;

    line-height: 1.3;

    text-align: left;

    text-transform: uppercase;

    letter-spacing: .04em;

}


.fb-report-table td {

    padding: 14px;

    color: #555555;

    border-bottom: 1px solid #EEEEEE;

    font-size: 11px;

    line-height: 1.45;

    vertical-align: middle;

}


.fb-report-table tbody tr:last-child td {

    border-bottom: none;

}


.fb-report-table tbody tr:hover {

    background: #FCFCFC;

}


.fb-report-table-service {

    color: #171717;

    font-size: 11px;

    font-weight: 700;

}


.fb-report-table-revenue {

    color: #C89B3C;

    font-size: 11px;

    font-weight: 700;

}


/* ==========================================================
   STATUS BADGES
========================================================== */

.fb-report-status-badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 5px 8px;

    border-radius: 5px;

    font-size: 8px;

    font-weight: 700;

    line-height: 1;

    text-transform: uppercase;

}


/*
|--------------------------------------------------------------------------
| Override generic status backgrounds
|--------------------------------------------------------------------------
*/

.fb-report-status-badge.status-approved {

    background: #EAF7EF !important;

    color: #198754 !important;

}


.fb-report-status-badge.status-pending {

    background: #FFF7E6 !important;

    color: #9A6D12 !important;

}


.fb-report-status-badge.status-cancelled,
.fb-report-status-badge.status-canceled {

    background: #FBECEC !important;

    color: #B42318 !important;

}


.fb-report-status-badge.status-rejected {

    background: #F6EDEE !important;

    color: #8A3B3B !important;

}


/* ==========================================================
   TABLE LOADING / EMPTY
========================================================== */

.fb-report-table-loading,
.fb-report-table-empty {

    height: 130px;

    color: #888888 !important;

    text-align: center !important;

}


/* ==========================================================
   PAGINATION
========================================================== */

.fb-report-pagination {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 12px;

    padding: 16px 18px;

    box-sizing: border-box;

    border-top: 1px solid #EEEEEE;

}


body .fb-reports-wrapper
button.fb-report-pagination-button {

    min-width: 90px !important;

    height: 38px !important;

    margin: 0 !important;

    padding: 0 14px !important;

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    background: #FFFFFF !important;

    color: #171717 !important;

    border: 1px solid #D9D9D9 !important;

    border-radius: 7px !important;

    box-shadow: none !important;

    font-family: inherit !important;

    font-size: 11px !important;

    font-weight: 600 !important;

    cursor: pointer !important;

}


body .fb-reports-wrapper
button.fb-report-pagination-button:hover:not(:disabled) {

    background: #000000 !important;

    color: #C89B3C !important;

    border-color: #000000 !important;

}


body .fb-reports-wrapper
button.fb-report-pagination-button:disabled {

    background: #F5F5F5 !important;

    color: #AAAAAA !important;

    border-color: #E5E5E5 !important;

}


.fb-report-page-info {

    min-width: 90px;

    color: #777777;

    font-size: 10px;

    font-weight: 600;

    text-align: center;

}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1200px) {

    .fb-reports-summary-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }


    .fb-reports-filters {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }


    .fb-reports-filter-action {

        align-items: stretch;

    }


    body .fb-reports-wrapper
    .fb-reports-primary-button,

    body .fb-reports-wrapper
    .fb-reports-secondary-button {

        width: 100% !important;

    }

}


/* ==========================================================
   TABLET / SMALL DESKTOP
========================================================== */

@media (max-width: 950px) {

    .fb-reports-main-grid {

        grid-template-columns: 1fr;

    }


    .fb-reports-performance-grid {

        grid-template-columns: 1fr;

    }


    .fb-report-trend-row {

        grid-template-columns:
            85px
            minmax(0, 1fr)
            110px;

    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 700px) {

    .fb-reports-wrapper {

        padding: 24px 16px 32px;

    }


    .fb-reports-header {

        flex-direction: column;

        gap: 16px;

    }


    .fb-reports-title {

        font-size: 27px !important;

    }


    .fb-reports-subtitle {

        font-size: 13px !important;

    }


    .fb-reports-header-period {

        width: 100%;

        min-width: 0;

        min-height: 68px;

        align-items: flex-start;

    }


    .fb-reports-period-value {

        text-align: left;

    }


    .fb-reports-filters {

        grid-template-columns: 1fr;

    }


    .fb-reports-summary-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .fb-report-summary-card {

        min-height: 105px;

        padding: 15px;

    }


    .fb-report-summary-value {

        font-size: 22px;

    }


    .fb-report-trend-row {

        grid-template-columns: 1fr;

        gap: 5px;

    }


    .fb-report-trend-value {

        align-items: flex-start;

    }


    .fb-report-table-header {

        flex-direction: column;

        align-items: flex-start;

    }


    .fb-report-pagination {

        justify-content: space-between;

    }

}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 480px) {

    .fb-reports-summary-grid {

        grid-template-columns: 1fr;

    }


    .fb-report-summary-card {

        min-height: 95px;

    }


    .fb-report-pagination {

        display: grid;

        grid-template-columns:
            1fr
            1fr;

    }


    .fb-report-page-info {

        grid-column: 1 / -1;

        grid-row: 1;

        width: 100%;

        margin-bottom: 4px;

    }


    body .fb-reports-wrapper
    button.fb-report-pagination-button {

        width: 100% !important;

    }

}