* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #101828;
    font-family: Arial, sans-serif;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 16px;
}

.card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.04);
}

h1 {
    margin: 0 0 18px;
    font-size: 22px;
}

h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

input[type="text"],
input[type="month"],
select,
input[type="file"] {
    width: 100%;
    min-height: 45px;
    border: 1px solid #d6dfeb;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    font-size: 14px;
}

input[type="file"] {
    padding: 11px 12px;
}

.form-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.form-grid.three {
    grid-template-columns: repeat(3, 1fr);
}

.upload-grid {
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #eef2f6;
    color: #101828;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.btn.primary {
    background: #147a64;
    color: #ffffff;
}

.btn.small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.hidden {
    display: none;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 700;
}

.alert.error {
    background: #fff1f3;
    color: #b42318;
    border: 1px solid #fecdd6;
}

.alert.success {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid #e4e7ec;
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.badge.success {
    background: #ecfdf3;
    color: #027a48;
}

.missing-text {
    color: #b42318;
    font-size: 13px;
}

.muted {
    color: #667085;
    font-size: 14px;
}

.top-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.report-header h1 {
    margin-bottom: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.summary-grid div {
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.summary-grid span {
    display: block;
    color: #667085;
    font-size: 13px;
    margin-bottom: 6px;
}

.summary-grid strong {
    display: block;
    font-size: 18px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.status-item {
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #e4e7ec;
}

.status-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.status-item span {
    font-size: 13px;
    font-weight: 700;
}

.status-item.done {
    background: #ecfdf3;
    border-color: #abefc6;
}

.status-item.done span {
    color: #027a48;
}

.status-item.missing {
    background: #fff1f3;
    border-color: #fecdd6;
}

.status-item.missing span {
    color: #b42318;
}

.file-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    color: #475467;
    font-size: 14px;
}

.data-table th,
.data-table td {
    white-space: nowrap;
    font-size: 13px;
}

@media (max-width: 900px) {
    .form-grid.three,
    .summary-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .page {
        max-width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .no-print {
        display: none !important;
    }
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn.danger {
    background: #d92d20;
    color: #ffffff;
}

.delete-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(16, 24, 40, 0.65);
}

.delete-modal:target {
    display: flex;
}

.delete-modal-box {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 14px;
    padding: 26px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(16, 24, 40, 0.30);
}

.delete-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fff1f3;
    color: #d92d20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
}

.delete-modal-box h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #101828;
}

.delete-modal-box p {
    margin: 0 0 12px;
    color: #475467;
    font-size: 14px;
    line-height: 1.6;
}

.delete-warning {
    padding: 10px 12px;
    background: #fff1f3;
    border: 1px solid #fecdd6;
    border-radius: 8px;
    color: #b42318 !important;
    font-weight: 700;
}

.delete-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.delete-modal-actions form {
    margin: 0;
}

@media (max-width: 520px) {
    .delete-modal-actions {
        flex-direction: column;
    }

    .delete-modal-actions .btn {
        width: 100%;
    }
}

@media print {
    .delete-modal {
        display: none !important;
    }
}

.client-report-page {
    max-width: 1220px;
}

.client-hero {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 22px;
    padding: 28px;
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(16, 24, 40, 0.16);
}

.client-hero h1 {
    margin: 8px 0 10px;
    font-size: 34px;
    color: #ffffff;
}

.client-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.eyebrow {
    display: inline-block;
    color: #99f6e4;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-score-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
}

.hero-score-card span {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
}

.hero-score-card strong {
    display: block;
    margin-bottom: 14px;
    font-size: 42px;
    color: #ffffff;
}

.hero-score-card small {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.80);
}

.completion-bar {
    width: 100%;
    height: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 999px;
}

.completion-bar span {
    display: block;
    height: 100%;
    background: #ffffff;
    border-radius: 999px;
}

.client-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.client-summary-card {
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.05);
}

.client-summary-card span {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.client-summary-card strong {
    display: block;
    color: #101828;
    font-size: 22px;
}

.section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title-row h2 {
    margin-bottom: 6px;
}

.client-status-grid .status-item {
    border-radius: 12px;
}

.client-report-block {
    margin-bottom: 24px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.05);
}

.client-report-block-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.client-report-block-header h2 {
    margin: 6px 0 0;
    font-size: 24px;
}

.report-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.report-pill.uploaded {
    background: #ecfdf3;
    color: #027a48;
}

.report-pill.missing {
    background: #fff1f3;
    color: #b42318;
}

.client-file-meta {
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
}

.client-sheet-card {
    margin-top: 18px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
}

.client-sheet-card:first-of-type {
    margin-top: 0;
}

.client-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.client-sheet-header h3 {
    margin: 4px 0 0;
    color: #101828;
    font-size: 20px;
}

.sheet-label {
    color: #147a64;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.row-count {
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    color: #475467;
    font-size: 12px;
    font-weight: 800;
}

.visual-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.visual-kpi-card {
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
}

.visual-kpi-card span {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.visual-kpi-card strong {
    display: block;
    color: #101828;
    font-size: 24px;
}

.top-performer-box {
    padding: 16px;
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
}

.mini-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mini-section-heading h4 {
    margin: 0;
    color: #101828;
    font-size: 16px;
}

.mini-section-heading span {
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.performer-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f6;
}

.performer-row:last-child {
    border-bottom: 0;
}

.performer-info strong {
    display: block;
    margin-bottom: 5px;
    color: #101828;
    font-size: 14px;
    word-break: break-word;
}

.performer-info span {
    color: #667085;
    font-size: 13px;
}

.performer-bar {
    height: 12px;
    overflow: hidden;
    background: #eef2f6;
    border-radius: 999px;
}

.performer-bar span {
    display: block;
    height: 100%;
    background: #147a64;
    border-radius: 999px;
}

.client-note-box {
    padding: 16px;
    margin-bottom: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
}

.client-note-box h4 {
    margin: 0 0 10px;
    color: #92400e;
    font-size: 16px;
}

.client-note-box ul {
    margin: 0;
    padding-left: 20px;
}

.client-note-box li {
    margin-bottom: 8px;
    color: #78350f;
    line-height: 1.6;
    font-size: 14px;
}

.client-note-box li:last-child {
    margin-bottom: 0;
}

.details-panel {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    overflow: hidden;
}

.details-panel summary {
    padding: 14px 16px;
    color: #147a64;
    font-weight: 800;
    cursor: pointer;
}

.details-panel .table-wrap {
    padding: 0 16px 16px;
}

.empty-report-box {
    padding: 28px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    text-align: center;
}

.empty-report-box.small {
    padding: 18px;
}

.empty-report-box h3 {
    margin: 0 0 8px;
    color: #101828;
}

.empty-report-box p {
    margin: 0;
    color: #667085;
}
.client-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 20px 0;
    padding: 16px;
    background: #f8fbfc;
    border: 1px solid #e5edf2;
    border-radius: 16px;
}

.client-filter-form label {
    display: block;
    color: #526276;
    font-size: 13px;
    font-weight: 800;
}

.client-filter-form select {
    min-width: 280px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d8e2ea;
    border-radius: 12px;
    background: #ffffff;
    font-size: 15px;
}

.empty-table-message {
    padding: 24px;
    text-align: center;
    color: #667085;
    font-weight: 700;
}

.client-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 20px 0;
    padding: 16px;
    background: #f8fbfc;
    border: 1px solid #e5edf2;
    border-radius: 16px;
}

.client-filter-form label {
    display: block;
    color: #526276;
    font-size: 13px;
    font-weight: 800;
}

.client-filter-form select {
    min-width: 280px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d8e2ea;
    border-radius: 12px;
    background: #ffffff;
    font-size: 15px;
}

.empty-table-message {
    padding: 24px;
    text-align: center;
    color: #667085;
    font-weight: 700;
}

@media (max-width: 1000px) {
    .client-hero,
    .client-summary-grid,
    .visual-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .performer-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .client-hero,
    .client-summary-grid,
    .visual-kpi-grid {
        grid-template-columns: 1fr;
    }

    .client-hero {
        padding: 22px;
    }

    .client-hero h1 {
        font-size: 28px;
    }

    .client-report-block-header,
    .client-sheet-header,
    .mini-section-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media print {
    .client-hero {
        background: #ffffff !important;
        color: #101828 !important;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .client-hero h1,
    .hero-score-card strong {
        color: #101828 !important;
    }

    .client-hero p,
    .hero-score-card span,
    .hero-score-card small {
        color: #475467 !important;
    }

    .hero-score-card {
        border: 1px solid #ddd;
        background: #ffffff !important;
    }

    .details-panel {
        display: none;
    }
}

.report-note-editor-card {
    margin-top: 24px;
}

.report-note-form {
    margin-top: 18px;
}

.report-note-form textarea {
    min-height: 220px;
}

.note-saved-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 14px;
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.ck-editor__editable {
    min-height: 220px;
}