
/* ======================================================
   MAKE - MONTHLY COMMISSION REPORT STYLESHEET
   ====================================================== */


/* ------------------------------------------------------
   1. COMMISSION REPORT FILTERS
   ------------------------------------------------------ */

.commission-report-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.commission-report-filters label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}


/* ------------------------------------------------------
   2. COMMISSION REPORT TOTAL
   ------------------------------------------------------ */

.commission-report-total {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;

    background: #edf3ee;
    border: 1px solid #dbe5dd;
    border-radius: 10px;

    padding: 20px;
    margin: 18px 0;

    font-size: 17px;
}


/* ------------------------------------------------------
   3. MONTHLY REPORT BASE STYLES
   ------------------------------------------------------ */

.monthly-report {
    font: 14px Arial, sans-serif;
    color: #20382c;
    max-width: 1100px;
    margin: 30px auto;
    padding: 24px;
}

.monthly-report table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.monthly-report th,
.monthly-report td {
    border: 1px solid #ddd;
    padding: 9px;
    text-align: left;
}

.monthly-report th {
    background: #edf3ee;
}

.monthly-report h1 {
    font-size: 25px;
}

.monthly-report .num {
    text-align: right;
}

.monthly-report .toolbar {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}


/* ------------------------------------------------------
   4. INITIAL PRINT SETTINGS
   ------------------------------------------------------ */

@media print {

    .monthly-report .toolbar {
        display: none;
    }

    .monthly-report {
        margin: 0;
        padding: 0;
        max-width: none;
    }

    thead {
        display: table-header-group;
    }

    tr {
        break-inside: avoid;
    }

    @page {
        size: A4 landscape;
        margin: 12mm;
    }
}


/* ======================================================
   BRANDED COMMISSION STATEMENT AND DASHBOARD REPORT
   ====================================================== */


/* ------------------------------------------------------
   5. COMMISSION MODAL BRANDING
   ------------------------------------------------------ */

.commission-modal-brand {
    display: flex;
    align-items: center;
    gap: 22px;

    border-bottom: 2px solid #b28b4c;

    padding: 8px 0 20px;
    margin-bottom: 22px;
}

.commission-modal-brand img {
    width: 180px;
    max-height: 80px;
    object-fit: contain;
}

.commission-modal-brand strong,
.commission-modal-brand span {
    display: block;
}

.commission-modal-brand strong {
    font-size: 22px;
    color: #153e33;
}

.commission-modal-brand span {
    font-size: 13px;
    color: #718278;
    margin-top: 6px;
}


/* ------------------------------------------------------
   6. COMMISSION FILTER OVERRIDES
   ------------------------------------------------------ */

.commission-report-filters {
    background: #f5f7f3;
    padding: 18px;
    border: 1px solid #e0e6dd;
    border-radius: 12px;
}

.commission-report-total {
    background: #153e33;
    color: white;
    border: 0;
}

.commission-report-total strong {
    font-size: 22px;
}

.commission-report-total span {
    color: #d9e6dc;
}

.commission-report-filters input,
.commission-report-filters select {
    min-height: 44px;
}

.commission-report-filters button {
    min-height: 44px;
}


/* ------------------------------------------------------
   7. BRANDED MONTHLY REPORT PAGE
   ------------------------------------------------------ */

body.monthly-report {
    margin: 0;
    padding: 30px 24px;
    max-width: none;

    background: #eef2ee;
    font: 14px/1.5 Arial, sans-serif;
    color: #20382c;
}


/* ------------------------------------------------------
   8. REPORT TOOLBAR
   ------------------------------------------------------ */

.monthly-report .toolbar {
    max-width: 1140px;
    margin: 0 auto 20px;
}

.monthly-report .toolbar button,
.monthly-report .toolbar a {
    display: inline-block;

    background: #153e33;
    color: #fff;

    border: 1px solid #153e33;
    padding: 11px 18px;
    border-radius: 7px;

    text-decoration: none;
    font: 14px Arial, sans-serif;
    cursor: pointer;
}

.monthly-report .toolbar a {
    background: #fff;
    color: #153e33;
    border-color: #d4dfd5;
}


/* ------------------------------------------------------
   9. COMMISSION REPORT SHEET
   ------------------------------------------------------ */

.commission-sheet {
    max-width: 1140px;
    margin: auto;

    background: #fff;
    padding: 42px;

    border: 1px solid #e1e7df;
    border-radius: 14px;

    box-shadow: 0 8px 32px rgba(21, 62, 51, 0.07);
}


/* ------------------------------------------------------
   10. REPORT HEADER
   ------------------------------------------------------ */

.commission-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    border-bottom: 2px solid #b28b4c;
    padding-bottom: 26px;
}

.commission-logo {
    width: 230px;
    max-width: 38%;
    max-height: 100px;
    object-fit: contain;
}

.commission-report-header > div {
    text-align: right;
}


/* ------------------------------------------------------
   11. REPORT TITLE AND PERIOD
   ------------------------------------------------------ */

.report-kicker {
    font-size: 10px;
    letter-spacing: 2px;
    color: #8a743f;
    margin: 0 0 9px;
}

.monthly-report h1 {
    font-size: 30px;
    line-height: 1.2;
    margin: 0;
    color: #153e33;
}

.report-period {
    font-size: 17px;
    margin: 10px 0 0;
    color: #637669;
}


/* ------------------------------------------------------
   12. REPORT METADATA
   ------------------------------------------------------ */

.report-metadata {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;

    color: #718278;
    font-size: 12px;
    padding: 18px 0;
}


/* ------------------------------------------------------
   13. REPORT METRICS
   ------------------------------------------------------ */

.report-metrics {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1.4fr;
    gap: 16px;
    margin: 4px 0 22px;
}

.report-metrics > div {
    padding: 20px;
    background: #f4f7f2;

    border: 1px solid #e1e8dd;
    border-radius: 10px;

    min-width: 0;
}

.report-metrics span {
    display: block;
    font-size: 12px;
    color: #637669;
    margin-bottom: 9px;
}

.report-metrics strong {
    display: block;
    font-size: 25px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}


/* ------------------------------------------------------
   14. HIGHLIGHTED COMMISSION METRIC
   ------------------------------------------------------ */

.report-metrics .commission-highlight {
    background: #153e33;
    color: white;
    border-color: #153e33;
}

.commission-highlight span {
    color: #d5e3d8;
}


/* ------------------------------------------------------
   15. REPORT NOTES AND SECTION HEADINGS
   ------------------------------------------------------ */

.report-note {
    font-size: 12px;
    color: #718278;
}

.monthly-report h2 {
    font-size: 18px;
    margin: 28px 0 12px;
    color: #153e33;
}


/* ------------------------------------------------------
   16. REPORT TABLES
   ------------------------------------------------------ */

.monthly-report table {
    margin: 0 0 22px;
    font-size: 12px;
}

.monthly-report th {
    background: #153e33;
    color: #fff;
    font-size: 11px;
    font-weight: 600;

    padding: 12px 10px;
    border-color: #153e33;
}

.monthly-report td {
    padding: 11px 10px;

    border: 0;
    border-bottom: 1px solid #e4e9e0;

    overflow-wrap: anywhere;
}

.monthly-report tbody tr:nth-child(even) {
    background: #f7f9f5;
}

.monthly-report td:nth-last-child(-n+2) {
    font-variant-numeric: tabular-nums;
}


/* ------------------------------------------------------
   17. TOTAL MONTHLY COMMISSION
   ------------------------------------------------------ */

.report-total {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;

    background: #edf3e9;
    border-top: 2px solid #b28b4c;

    padding: 20px;
    margin: 24px 0;
}

.report-total strong {
    font-size: 24px;
    color: #153e33;
}


/* ------------------------------------------------------
   18. REPORT FOOTER
   ------------------------------------------------------ */

.commission-report-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;

    padding-top: 18px;
    border-top: 1px solid #dde5d9;

    font-size: 12px;
    color: #718278;
}

.commission-report-footer small {
    flex-basis: 100%;
    font-size: 10px;
}


/* ======================================================
   19. RESPONSIVE DESIGN - MOBILE DEVICES
   ====================================================== */

@media (max-width: 700px) {

    body.monthly-report {
        padding: 16px 10px;
    }

    .commission-sheet {
        padding: 20px;
    }

    .report-metrics {
        grid-template-columns: 1fr;
    }

    .commission-report-header {
        gap: 16px;
    }

    .monthly-report h1 {
        font-size: 23px;
    }

    .commission-logo {
        width: 160px;
    }

    .monthly-report table {
        font-size: 10px;
    }

    .monthly-report th,
    .monthly-report td {
        padding: 8px 5px;
    }

    .report-total {
        flex-wrap: wrap;
    }

    .commission-modal-brand {
        gap: 12px;
    }

    .commission-modal-brand img {
        width: 140px;
    }
}


/* ======================================================
   20. PRINT STYLES - A4 LANDSCAPE
   ====================================================== */

@media print {

    body.monthly-report {
        background: #fff;
        padding: 0;
        font-size: 11px;
    }

    .commission-sheet {
        max-width: none;
        padding: 0;

        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .commission-report-header {
        padding-bottom: 18px;
    }

    .commission-logo {
        width: 200px;
    }

    .report-metrics {
        grid-template-columns: 1fr 1.4fr 1.4fr;
        break-inside: avoid;
    }

    .report-metrics > div {
        padding: 14px;
    }

    .report-metrics strong {
        font-size: 21px;
    }

    .monthly-report table {
        font-size: 10px;
    }

    .monthly-report th,
    .monthly-report td {
        padding: 8px;
    }

    .report-total,
    .commission-report-footer {
        break-inside: avoid;
    }

    .report-total strong {
        font-size: 21px;
    }

    h2 {
        break-after: avoid;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
