.weekly-dashboard {
    background: #edf1f4;
    color: #203d52;
    font-family: Roboto, Arial, sans-serif;
    min-height: calc(100vh - 64px);
    padding: 12px;
    position: relative;
}

.weekly-filter-band {
    align-items: flex-end;
    background: #fff;
    border: 1px solid #cfd9e0;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(170px, 1.15fr) minmax(170px, 1.15fr) minmax(145px, .85fr) minmax(145px, .85fr) minmax(180px, 1fr) auto;
    padding: 12px;
    position: relative;
    z-index: 12;
}

.weekly-filter-field,
.weekly-filter-search {
    min-width: 0;
    position: relative;
}

.weekly-filter-field label,
.weekly-filter-search label {
    color: #27495f;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 5px;
}

.weekly-filter-button,
.weekly-filter-search > div {
    align-items: center;
    background: #fff;
    border: 1px solid #bccbd5;
    display: flex;
    height: 38px;
    min-width: 0;
    width: 100%;
}

.weekly-filter-button {
    color: #29485e;
    justify-content: space-between;
    padding: 0 10px;
    text-align: left;
}

.weekly-filter-button:hover,
.weekly-filter-button:focus {
    border-color: #3182b6;
    box-shadow: 0 0 0 2px rgba(49, 130, 182, .12);
    outline: 0;
}

.weekly-filter-button span {
    display: block;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-filter-button i {
    flex: 0 0 auto;
    margin-left: 8px;
}

.weekly-filter-menu {
    background: #fff;
    border: 1px solid #b9c8d2;
    box-shadow: 0 10px 24px rgba(35, 57, 73, .18);
    left: 0;
    max-height: 330px;
    min-width: 260px;
    overflow-y: auto;
    position: absolute;
    top: 64px;
    width: 100%;
    z-index: 30;
}

.weekly-filter-menu.right {
    left: auto;
    right: 0;
}

.weekly-filter-menu-head {
    align-items: center;
    background: #edf4f8;
    border-bottom: 1px solid #d7e0e6;
    display: flex;
    justify-content: space-between;
    min-height: 38px;
    padding: 7px 10px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.weekly-filter-menu-head strong {
    color: #20465f;
    font-size: 12px;
}

.weekly-filter-menu-head button {
    background: transparent;
    border: 0;
    color: #12699e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px;
}

.weekly-filter-option {
    align-items: center;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    color: #2d4a5f;
    display: flex;
    font-size: 13px;
    min-height: 37px;
    padding: 7px 10px;
    text-align: left;
    width: 100%;
}

.weekly-filter-option:hover,
.weekly-filter-option:focus {
    background: #eef6fa;
    outline: 0;
}

.weekly-filter-option i {
    color: #1976b1;
    flex: 0 0 18px;
    font-size: 16px;
    margin-right: 7px;
}

.weekly-filter-option span {
    line-height: 1.35;
}

.weekly-filter-empty {
    color: #6b7e8c;
    font-size: 12px;
    padding: 18px 10px;
    text-align: center;
}

.weekly-filter-search > div {
    padding: 0 9px;
}

.weekly-filter-search i {
    color: #6d8798;
    margin-right: 8px;
}

.weekly-filter-search input {
    border: 0;
    color: #203d52;
    flex: 1 1 auto;
    font-size: 13px;
    min-width: 0;
    outline: 0;
    width: 100%;
}

.weekly-filter-actions {
    display: flex;
    gap: 6px;
}

.weekly-button {
    align-items: center;
    border: 1px solid transparent;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    height: 38px;
    justify-content: center;
    padding: 0 12px;
    white-space: nowrap;
}

.weekly-button.primary {
    background: #176fa7;
    color: #fff;
}

.weekly-button.secondary {
    background: #fff;
    border-color: #b9c8d2;
    color: #31566f;
}

.weekly-button.icon-only {
    background: #eef3f6;
    border-color: #d0dae1;
    color: #31566f;
    padding: 0;
    width: 38px;
}

.weekly-button:hover,
.weekly-button:focus {
    filter: brightness(.96);
    outline: 0;
}

.weekly-error {
    background: #fff0ef;
    border: 1px solid #e8b6b3;
    color: #a03f3a;
    font-size: 13px;
    margin-top: 10px;
    padding: 10px 12px;
}

.weekly-kpi-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    margin-top: 10px;
}

.weekly-kpi {
    background: #fff;
    border: 1px solid #cfd9e0;
    border-top: 4px solid #315f83;
    min-height: 118px;
    padding: 12px 14px;
}

.weekly-kpi.green { border-top-color: #2b956e; }
.weekly-kpi.amber { border-top-color: #df982c; }
.weekly-kpi.teal { border-top-color: #187d80; }
.weekly-kpi.red { border-top-color: #c94f55; }

.weekly-kpi-label {
    align-items: center;
    color: #415d70;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
}

.weekly-kpi strong {
    color: #173d58;
    display: block;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-kpi small {
    color: #687f8f;
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.weekly-help {
    color: #1775ad;
    cursor: help;
    display: inline-flex;
    position: relative;
}

.weekly-help::after {
    background: #153b55;
    bottom: calc(100% + 7px);
    color: #fff;
    content: attr(data-tooltip);
    display: none;
    font-size: 12px;
    font-weight: 400;
    left: 50%;
    line-height: 1.45;
    padding: 8px 10px;
    position: absolute;
    transform: translateX(-50%);
    width: 265px;
    z-index: 50;
}

.weekly-help:hover::after,
.weekly-help:focus::after {
    display: block;
}

.weekly-chart-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 10px;
}

.weekly-band {
    background: #fff;
    border: 1px solid #cfd9e0;
    margin-top: 10px;
    min-width: 0;
}

.weekly-chart-grid .weekly-band {
    grid-column: span 1;
    margin-top: 0;
}

.weekly-chart-grid .weekly-chart-wide {
    grid-column: span 2;
}

.weekly-section-head {
    border-bottom: 1px solid #dfe6eb;
    min-height: 64px;
    padding: 11px 14px;
}

.weekly-section-head.split {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.weekly-section-head h2 {
    color: #173f5d;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.weekly-section-head p {
    color: #6b7f8e;
    font-size: 12px;
    line-height: 1.4;
    margin: 4px 0 0;
}

.weekly-count {
    background: #e9f1f6;
    color: #245c80;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    margin-left: 14px;
    padding: 6px 9px;
}

.weekly-chart {
    min-height: 285px;
    padding: 2px 8px 6px;
}

.weekly-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.weekly-table {
    border-collapse: collapse;
    color: #2c475b;
    font-size: 13px;
    table-layout: fixed;
    width: 100%;
}

.weekly-table th {
    background: #e9f0f5;
    border: 1px solid #c6d3dd;
    color: #24475f;
    font-size: 12px;
    font-weight: 700;
    height: 40px;
    padding: 7px 9px;
    vertical-align: middle;
}

.weekly-table td {
    background: #fff;
    border: 1px solid #d4dee5;
    height: 45px;
    overflow-wrap: break-word;
    padding: 7px 9px;
    vertical-align: middle;
}

.weekly-table tbody tr:hover td {
    background: #f4f8fa;
}

.weekly-table .number {
    text-align: center;
    width: 54px;
}

.weekly-table .status {
    text-align: center;
    width: 125px;
}

.weekly-table .action {
    text-align: center;
    width: 62px;
}

.weekly-table .action button {
    align-items: center;
    background: #e7f1f7;
    border: 0;
    color: #176fa7;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 30px;
}

.weekly-table .action button:hover,
.weekly-table .action button:focus {
    background: #176fa7;
    color: #fff;
    outline: 0;
}

.weekly-table.reports th:nth-child(2) { width: 145px; }
.weekly-table.reports th:nth-child(3) { width: 125px; }
.weekly-table.reports th:nth-child(4) { width: 165px; }
.weekly-table.reports th:nth-child(5) { width: 145px; }
.weekly-table.reports th:nth-child(6) { width: 125px; }
.weekly-table.reports th:nth-child(7) { width: 110px; }
.weekly-table.reports th:nth-child(8) { width: 130px; }

.weekly-status,
.weekly-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 100%;
    padding: 4px 7px;
    white-space: normal;
}

.weekly-status-sent {
    background: #dff2e9;
    color: #19724f;
}

.weekly-status-draft {
    background: #fff0d4;
    color: #98620b;
}

.weekly-status-missing {
    background: #f9dddd;
    color: #a73c42;
}

.weekly-type-1 {
    background: #e3eef8;
    color: #286b9d;
}

.weekly-type-2 {
    background: #daf1e8;
    color: #28765d;
}

.weekly-type-3 {
    background: #fcebcf;
    color: #98620b;
}

.weekly-empty {
    color: #6b7f8e;
    font-size: 13px;
    padding: 34px 14px;
    text-align: center;
}

.weekly-loading {
    align-items: center;
    background: rgba(255, 255, 255, .9);
    bottom: 0;
    color: #245d80;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    gap: 9px;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 100;
}

@media (max-width: 1399.98px) {
    .weekly-filter-band {
        grid-template-columns: repeat(4, minmax(145px, 1fr));
    }

    .weekly-filter-search {
        grid-column: span 2;
    }

    .weekly-filter-actions {
        grid-column: span 2;
        justify-content: flex-end;
    }

    .weekly-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weekly-chart-grid .weekly-chart-wide {
        grid-column: span 2;
    }
}

@media (max-width: 991.98px) {
    .weekly-filter-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weekly-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weekly-chart-grid .weekly-band,
    .weekly-chart-grid .weekly-chart-wide {
        grid-column: span 2;
    }
}

@media (max-width: 575.98px) {
    .weekly-dashboard {
        padding: 8px;
    }

    .weekly-filter-band,
    .weekly-kpi-strip,
    .weekly-chart-grid {
        display: block;
    }

    .weekly-filter-field,
    .weekly-filter-search,
    .weekly-filter-actions,
    .weekly-kpi,
    .weekly-chart-grid .weekly-band {
        margin-bottom: 8px;
        width: 100%;
    }

    .weekly-filter-actions {
        justify-content: stretch;
    }

    .weekly-filter-actions .weekly-button:not(.icon-only) {
        flex: 1 1 auto;
    }

    .weekly-filter-menu {
        min-width: 100%;
        top: 63px;
    }

    .weekly-section-head.split {
        align-items: flex-start;
    }

    .weekly-section-head h2 {
        font-size: 16px;
    }
}
