/* =========================================
   BIBLE GROWTH SYSTEM
   REPORTS & PROGRESS
   Lemon-green theme
========================================= */

.reports-page {
    width: min(1250px, 94%);
    margin: 0 auto;
    padding: 32px 0;
    color: #26321A;
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.reports-eyebrow {
    margin: 0 0 8px;
    color: #709800;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.reports-header h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 38px);
    color: #26321A;
}

.reports-header p:not(.reports-eyebrow) {
    margin: 0;
    color: #69735D;
    line-height: 1.6;
}

.reports-back-link {
    padding: 11px 16px;
    border: 1px solid #DDE9C5;
    border-radius: 10px;
    text-decoration: none;
    color: #456500;
    font-weight: 700;
    white-space: nowrap;
}

.reports-back-link:hover {
    background: #F2F9E4;
}

.report-filter-card,
.report-card {
    background: #FFFFFF;
    border: 1px solid #E6EDDA;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(44, 64, 15, 0.045);
}

.report-filter-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 22px;
    margin-bottom: 22px;
}

.report-filter-card h2,
.report-card h2 {
    margin: 0 0 7px;
    color: #2C3B20;
    font-size: 19px;
}

.report-filter-card p,
.report-card-heading p {
    margin: 0;
    color: #78816C;
    font-size: 13px;
    line-height: 1.6;
}

.report-filter-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.report-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.report-filter-field label {
    color: #475438;
    font-size: 12px;
    font-weight: 700;
}

.report-filter-field input {
    box-sizing: border-box;
    min-width: 155px;
    padding: 11px;
    border: 1px solid #DCE5CE;
    border-radius: 9px;
    background: #FFFFFF;
    color: #26321A;
    font: inherit;
    font-size: 13px;
}

.report-filter-field input:focus {
    outline: 2px solid #B7E432;
    outline-offset: 1px;
}

.report-button,
.report-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    box-sizing: border-box;
    padding: 11px 17px;
    border-radius: 9px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.report-button {
    border: 1px solid #B7E432;
    background: #B7E432;
    color: #26321A;
}

.report-button:hover {
    background: #A6D322;
    transform: translateY(-1px);
}

.report-outline-button {
    border: 1px solid #D6E3C3;
    background: #FFFFFF;
    color: #456500;
}

.report-outline-button:hover {
    background: #F3F9E9;
}

.report-period {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 22px 2px 14px;
    color: #78816C;
    font-size: 13px;
}

.report-period strong {
    color: #3C4D2A;
}

.report-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.report-stat-card {
    min-width: 0;
    padding: 22px;
    background: #FFFFFF;
    border: 1px solid #E6EDDA;
    border-radius: 15px;
    box-shadow: 0 6px 22px rgba(44, 64, 15, 0.045);
}

.report-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    margin-bottom: 17px;
    border-radius: 12px;
    background: #F0F9D9;
    font-size: 21px;
}

.report-stat-card p {
    margin: 0 0 9px;
    color: #69735D;
    font-size: 13px;
    font-weight: 600;
}

.report-stat-card strong {
    display: block;
    margin-bottom: 7px;
    color: #29391B;
    font-size: 32px;
    line-height: 1.1;
}

.report-stat-card span {
    color: #89917E;
    font-size: 12px;
}

.report-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.report-card {
    min-width: 0;
    padding: 24px;
}

.report-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 22px;
}

.report-percent {
    flex-shrink: 0;
    color: #587A13;
    font-size: 25px;
    font-variant-numeric: tabular-nums;
}

.report-progress-track {
    height: 11px;
    overflow: hidden;
    border-radius: 20px;
    background: #EDF2E5;
}

.report-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: #B7E432;
    transition: width 0.3s ease;
}

.time-fill {
    background: #8DBF00;
}

.report-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.report-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #69735D;
    font-size: 12px;
}

.legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.completed-dot {
    background: #8DBF00;
}

.pending-dot {
    background: #E6C45A;
}

.skipped-dot {
    background: #B8BDB0;
}

.report-time-summary {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 22px;
}

.report-time-summary div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-time-summary span {
    color: #78816C;
    font-size: 12px;
}

.report-time-summary strong {
    color: #354627;
    font-size: 17px;
}

.daily-report-card {
    margin-bottom: 22px;
}

.daily-heading {
    align-items: center;
}

.report-date-count {
    padding: 7px 11px;
    border-radius: 8px;
    background: #F0F9D9;
    color: #56751A;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.report-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.report-table th {
    padding: 14px 12px;
    background: #F6FAEF;
    color: #566447;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.report-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #EDF1E7;
    color: #43513A;
    white-space: nowrap;
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

.report-table tbody tr:hover {
    background: #FCFDF8;
}

.table-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-progress > span {
    min-width: 35px;
    font-size: 12px;
    font-weight: 700;
}

.table-progress-track {
    width: 65px;
    height: 6px;
    overflow: hidden;
    border-radius: 10px;
    background: #EAF0DF;
}

.table-progress-track div {
    height: 100%;
    border-radius: inherit;
    background: #8DBF00;
}

.report-summary-card {
    margin-bottom: 22px;
    line-height: 1.8;
}

.report-summary-card p {
    color: #5E6954;
    font-size: 14px;
}

.report-summary-card strong {
    color: #344526;
}

.report-encouragement {
    margin-bottom: 0;
    padding: 14px 16px;
    border-left: 4px solid #B7E432;
    border-radius: 0 8px 8px 0;
    background: #F7FBEF;
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.report-message {
    padding: 15px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
    line-height: 1.6;
}

.report-warning {
    border: 1px solid #EAD6A1;
    background: #FFF9E8;
    color: #795B13;
}

.report-warning ul {
    margin-bottom: 0;
}

.reports-footer {
    padding: 20px 0 5px;
    text-align: center;
    color: #89917E;
    font-size: 12px;
}

@media (max-width: 1000px) {
    .report-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-filter-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .reports-page {
        width: 92%;
        padding-top: 22px;
    }

    .reports-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-progress-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-form {
        width: 100%;
    }

    .report-filter-field {
        flex: 1;
        min-width: 130px;
    }

    .report-filter-field input {
        width: 100%;
        min-width: 0;
    }

    .report-filter-form .report-button {
        width: 100%;
    }
}

@media (max-width: 450px) {
    .report-stat-grid {
        grid-template-columns: 1fr;
    }

    .report-stat-card {
        padding: 18px;
    }

    .report-card {
        padding: 18px;
    }

    .report-period {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-time-summary {
        flex-direction: column;
    }

    .report-actions {
        flex-direction: column;
    }

    .report-actions > * {
        width: 100%;
    }
}

@media print {
    body {
        background: #FFFFFF !important;
        color: #222222 !important;
    }

    .reports-page {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .reports-header,
    .report-filter-card,
    .report-actions,
    .reports-back-link {
        display: none !important;
    }

    .report-card,
    .report-stat-card {
        box-shadow: none;
        break-inside: avoid;
        border: 1px solid #CCCCCC;
    }

    .report-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .report-progress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-table-wrapper {
        overflow: visible;
    }

    .report-table {
        font-size: 10px;
    }

    .report-table th,
    .report-table td {
        padding: 7px 5px;
    }

    .reports-footer {
        margin-top: 15px;
    }
}
