.monthly-report-page {
    --report-green: #12507f;
    --report-green-dark: #0d3a5d;
    --report-ink-dark: #102331;
    --report-teal: #2c6591;
    --report-blue: #4b7da5;
    --report-amber: #c58a28;
    --report-red: #c94c55;
    direction: rtl;
    color: var(--ink);
}

.monthly-report-header {
    position: relative;
    min-height: 310px;
    padding: 30px 34px 74px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 8% 15%, rgba(79, 224, 178, .2), transparent 25%),
        radial-gradient(circle at 88% 90%, rgba(50, 160, 165, .22), transparent 28%),
        linear-gradient(135deg, #102535 0%, #0d3858 56%, #0d4977 100%);
    box-shadow: 0 24px 60px rgba(12, 62, 54, .18);
}

.monthly-report-hero-grid {
    position: absolute;
    inset: 0;
    opacity: .17;
    background-image:
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to left, #000, transparent 74%);
}

.monthly-report-hero-orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.monthly-report-hero-orbit::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #62abe3;
    box-shadow: 0 0 25px rgba(98, 227, 184, .8);
}

.monthly-report-hero-orbit.orbit-one {
    width: 260px;
    height: 260px;
    left: -90px;
    bottom: -145px;
}

.monthly-report-hero-orbit.orbit-one::after {
    top: 22px;
    right: 46px;
}

.monthly-report-hero-orbit.orbit-two {
    width: 150px;
    height: 150px;
    left: 22%;
    top: -102px;
}

.monthly-report-hero-orbit.orbit-two::after {
    right: 3px;
    bottom: 31px;
}

.monthly-report-brand-row,
.monthly-report-hero-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.monthly-report-identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

.monthly-report-identity img {
    display: block;
    width: min(275px, 48vw);
    height: 67px;
    object-fit: contain;
    object-position: right center;
}

.monthly-report-identity > span {
    padding-right: 18px;
    border-right: 1px solid rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .3px;
    white-space: nowrap;
}

.monthly-report-print-button {
    display: inline-flex;
    min-height: 45px;
    padding: 0 16px;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(12px);
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
    transition:
        transform .2s ease,
        background-color .2s ease;
}

.monthly-report-print-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .16);
    transform: translateY(-2px);
}

.monthly-report-print-button span {
    font-size: 17px;
}

.monthly-report-hero-body {
    margin-top: 36px;
    align-items: flex-end;
}

.monthly-report-hero-copy {
    max-width: 710px;
}

.monthly-report-kicker {
    display: inline-flex;
    padding: 7px 11px;
    border: 1px solid rgba(100, 226, 187, .25);
    border-radius: 999px;
    color: #8dc6f1;
    background: rgba(31, 132, 105, .16);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1px;
}

.monthly-report-hero-copy h1 {
    margin: 12px 0 8px;
    color: #fff;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.16;
}

.monthly-report-hero-copy p {
    max-width: 610px;
    margin: 0;
    color: rgba(233, 246, 242, .73);
    font-size: 13px;
    line-height: 1.75;
}

.monthly-report-hero-snapshot {
    display: flex;
    min-width: 360px;
    padding: 17px 19px;
    align-items: center;
    gap: 19px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 18px;
    background: rgba(255, 255, 255, .085);
    backdrop-filter: blur(14px);
}

.monthly-report-hero-snapshot > div {
    flex: 1;
}

.monthly-report-hero-snapshot span,
.monthly-report-hero-snapshot strong {
    display: block;
}

.monthly-report-hero-snapshot span {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .6);
    font-size: 9px;
}

.monthly-report-hero-snapshot strong {
    color: #fff;
    font-size: 12px;
}

.monthly-report-hero-snapshot i {
    width: 1px;
    height: 35px;
    background: rgba(255, 255, 255, .18);
}

.monthly-report-toolbar {
    position: relative;
    z-index: 2;
    display: grid;
    margin: -44px 28px 24px;
    padding: 20px 22px 15px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 20px 28px;
    border: 1px solid rgba(17, 83, 70, .1);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 45px rgba(24, 55, 49, .13);
    backdrop-filter: blur(18px);
}

.monthly-report-toolbar-title {
    display: flex;
    min-width: 205px;
    align-items: center;
    gap: 12px;
}

.monthly-report-toolbar-title strong,
.monthly-report-toolbar-title small {
    display: block;
}

.monthly-report-toolbar-title strong {
    font-size: 13px;
}

.monthly-report-toolbar-title small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.monthly-report-toolbar-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, var(--report-green), #1a639a);
    box-shadow: 0 10px 22px rgba(18, 127, 96, .2);
    font-size: 21px;
}

.monthly-report-toolbar-controls {
    display: grid;
    grid-template-columns:
        minmax(150px, 1.25fr)
        minmax(125px, .8fr)
        minmax(105px, .62fr)
        auto;
    align-items: end;
    gap: 12px;
}

.monthly-report-filter {
    min-width: 0;
}

.monthly-report-filter label {
    display: block;
    margin: 0 3px 7px;
    color: #384651;
    font-size: 9px;
    font-weight: 800;
}

.monthly-report-filter .form-select,
.monthly-report-readonly-value {
    min-height: 47px;
    border: 1px solid #d8dfe5;
    border-radius: 12px;
    background-color: #f8fafb;
    box-shadow: none;
    font-size: 11px;
    font-weight: 700;
}

.monthly-report-filter .form-select {
    direction: rtl;
    padding: 0 14px 0 44px !important;
    appearance: none;
    -webkit-appearance: none;
    text-align: right;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%23102c31' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center !important;
    background-size: 13px 9px;
}

.monthly-report-filter .form-select:focus {
    border-color: rgba(18, 127, 96, .55);
    box-shadow: 0 0 0 4px rgba(18, 127, 96, .08);
}

.monthly-report-filter option:disabled {
    color: #a9b6b2;
}

.monthly-report-readonly-value {
    display: flex;
    padding: 11px 13px;
    align-items: center;
    font-weight: 700;
}

.monthly-report-submit {
    display: inline-flex;
    min-height: 47px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--report-green), var(--report-green-dark));
    box-shadow: 0 10px 24px rgba(18, 127, 96, .2);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.monthly-report-submit:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(18, 127, 96, .27);
}

.monthly-report-submit span {
    font-size: 17px;
}

.monthly-report-period-note {
    display: flex;
    padding-top: 13px;
    align-items: center;
    gap: 7px;
    grid-column: 1 / -1;
    border-top: 1px solid #edf0f2;
    color: var(--muted);
    font-size: 9px;
}

.monthly-report-period-note span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    color: var(--report-green);
    background: rgba(18, 127, 96, .09);
    font-size: 10px;
    font-weight: 850;
}

.monthly-report-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin: 20px 0 0;
}

.monthly-report-stat {
    position: relative;
    min-height: 146px;
    padding: 23px;
    overflow: hidden;
    border: 1px solid rgba(31, 87, 76, .1);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(247, 251, 249, .94));
    box-shadow: 0 12px 34px rgba(23, 55, 48, .07);
}

.monthly-report-stat::before {
    content: "";
    position: absolute;
    width: 48px;
    height: 5px;
    right: 23px;
    top: 0;
    border-radius: 0 0 10px 10px;
    background: var(--report-teal);
}

.monthly-report-stat::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    left: -50px;
    bottom: -50px;
    border-radius: 50%;
    background: currentColor;
    opacity: .045;
}

.monthly-report-stat.completed {
    color: var(--report-green);
}

.monthly-report-stat.duration {
    color: var(--report-blue);
}

.monthly-report-stat.overdue {
    color: var(--report-red);
}

.monthly-report-stat.completed::before {
    background: var(--report-green);
}

.monthly-report-stat.duration::before {
    background: var(--report-blue);
}

.monthly-report-stat.overdue::before {
    background: var(--report-red);
}

.monthly-report-stat span,
.monthly-report-stat strong,
.monthly-report-stat small {
    display: block;
}

.monthly-report-stat span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}

.monthly-report-stat strong {
    margin: 8px 0 5px;
    color: var(--report-ink-dark);
    font-size: 38px;
    line-height: 1.15;
}

.monthly-report-stat small {
    color: var(--muted);
    font-size: 10px;
}

.monthly-report-primary-grid,
.monthly-report-secondary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .7fr);
    gap: 20px;
    margin-top: 20px;
}

.monthly-report-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monthly-report-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.monthly-report-section-head span,
.monthly-report-section-head h2 {
    display: block;
}

.monthly-report-section-head > div > span {
    color: var(--report-green);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.2px;
}

.monthly-report-section-head h2 {
    margin: 4px 0 0;
    font-size: 18px;
}

.monthly-report-section-head > strong {
    font-size: 27px;
}

.monthly-report-section-head > small {
    color: var(--muted);
    font-size: 10px;
}

.monthly-report-chart-key {
    display: flex;
    gap: 13px;
    color: var(--muted);
    font-size: 10px;
}

.monthly-report-chart-key span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.monthly-report-chart-key i {
    width: 18px;
    height: 3px;
    border-radius: 20px;
}

.monthly-report-chart-key i.received {
    background: var(--report-teal);
}

.monthly-report-chart-key i.completed {
    background: var(--report-green);
}

.monthly-report-week-chart {
    display: grid;
    height: 255px;
    grid-template-columns: repeat(4, minmax(65px, 1fr));
    gap: 16px;
    padding: 10px 8px 0;
    align-items: end;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(to top, transparent 32%, rgba(227, 233, 230, .7) 33%, transparent 34%),
        linear-gradient(to top, transparent 65%, rgba(227, 233, 230, .7) 66%, transparent 67%);
}

.monthly-report-week {
    display: grid;
    height: 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    text-align: center;
}

.monthly-report-week-bars {
    display: flex;
    height: 100%;
    align-items: end;
    justify-content: center;
    gap: 7px;
}

.monthly-report-week-bar {
    position: relative;
    display: block;
    width: min(34%, 34px);
    min-height: 7px;
    border-radius: 7px 7px 2px 2px;
}

.monthly-report-week-bar.received {
    background: linear-gradient(to top, #235073, var(--report-teal));
}

.monthly-report-week-bar.completed {
    background: linear-gradient(to top, var(--report-green-dark), #226ca5);
}

.monthly-report-week-bar b {
    position: absolute;
    top: -21px;
    left: 50%;
    color: var(--ink);
    font-size: 10px;
    transform: translateX(-50%);
}

.monthly-report-week > small {
    padding-bottom: 7px;
    color: var(--muted);
    font-size: 9px;
}

.monthly-report-ranking {
    display: grid;
    gap: 14px;
}

.monthly-report-rank > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.monthly-report-rank span {
    font-size: 11px;
}

.monthly-report-rank strong {
    font-size: 12px;
}

.monthly-report-track {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 50px;
    background: #edf0f2;
}

.monthly-report-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--report-green-dark), #236ca3);
}

.status-ranking .monthly-report-rank:nth-child(2) i {
    background: var(--report-teal);
}

.status-ranking .monthly-report-rank:nth-child(3) i {
    background: var(--report-blue);
}

.status-ranking .monthly-report-rank:nth-child(4) i {
    background: var(--report-amber);
}

.status-ranking .monthly-report-rank:nth-child(5) i {
    background: var(--report-red);
}

.monthly-report-company-rule {
    display: flex;
    margin-bottom: 17px;
    padding: 12px 14px;
    gap: 4px;
    flex-direction: column;
    border-right: 4px solid var(--report-green);
    border-radius: 8px;
    background: rgba(18, 127, 96, .055);
}

.monthly-report-company-rule strong {
    font-size: 11px;
}

.monthly-report-company-rule span {
    color: var(--muted);
    font-size: 10px;
}

.monthly-report-table-panel {
    margin-top: 20px;
}

.monthly-report-table {
    direction: rtl;
}

.monthly-report-table th,
.monthly-report-table td {
    text-align: right;
}

.monthly-report-danger {
    color: var(--report-red);
    font-weight: 800;
}

.monthly-report-overdue-pill {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 20px;
    color: #ab3039;
    background: rgba(201, 76, 85, .11);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.monthly-report-empty {
    padding: 34px 15px;
    border: 1px dashed #cad1d6;
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}

.monthly-report-executive-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    margin-top: 20px;
    padding: 22px 24px;
    align-items: start;
    border: 1px solid rgba(18, 127, 96, .22);
    border-radius: 15px;
    background:
        linear-gradient(90deg, rgba(18, 127, 96, .075), rgba(255, 255, 255, .88));
}

.monthly-report-summary-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--report-green);
    font-weight: 850;
}

.monthly-report-executive-summary strong {
    font-size: 13px;
}

.monthly-report-executive-summary p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.monthly-report-footer {
    display: flex;
    margin-top: 16px;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 9px;
}

@media (max-width: 1100px) {
    .monthly-report-header {
        padding-bottom: 94px;
    }

    .monthly-report-hero-body {
        align-items: flex-start;
        flex-direction: column;
    }

    .monthly-report-hero-snapshot {
        width: 100%;
        min-width: 0;
    }

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

    .monthly-report-toolbar-title {
        min-width: 0;
    }

    .monthly-report-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .monthly-report-header {
        min-height: 0;
        padding: 24px 22px 84px;
        border-radius: 22px;
    }

    .monthly-report-brand-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .monthly-report-identity {
        width: 100%;
        justify-content: space-between;
    }

    .monthly-report-identity > span {
        display: none;
    }

    .monthly-report-hero-body {
        margin-top: 28px;
    }

    .monthly-report-hero-snapshot {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .monthly-report-hero-snapshot i {
        width: 100%;
        height: 1px;
    }

    .monthly-report-print-button {
        align-self: flex-end;
    }

    .monthly-report-toolbar {
        margin: -42px 12px 22px;
        padding: 18px;
    }

    .monthly-report-toolbar-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monthly-report-toolbar-controls .monthly-report-filter:first-child {
        grid-column: 1 / -1;
    }

    .monthly-report-submit {
        grid-column: 1 / -1;
    }

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

@media (max-width: 520px) {
    .monthly-report-identity img {
        width: 225px;
        max-width: 100%;
        height: 58px;
    }

    .monthly-report-print-button {
        width: 100%;
    }

    .monthly-report-toolbar-controls {
        grid-template-columns: 1fr;
    }

    .monthly-report-toolbar-controls .monthly-report-filter:first-child,
    .monthly-report-submit {
        grid-column: auto;
    }

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

    .monthly-report-week-chart {
        gap: 7px;
    }

    .monthly-report-chart-key {
        display: none;
    }

    .monthly-report-footer {
        flex-direction: column;
    }
}

@media print {
    body {
        background: #fff;
    }

    .sidebar,
    .topbar,
    .main-area > footer,
    .monthly-report-toolbar,
    .monthly-report-header-actions {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .main-area main {
        max-width: none;
        padding: 0;
    }

    .monthly-report-header,
    .monthly-report-stat,
    .panel,
    .monthly-report-executive-summary {
        box-shadow: none;
        break-inside: avoid;
    }

    .monthly-report-header {
        min-height: 250px;
        padding-bottom: 28px;
    }

    .monthly-report-print-button {
        display: none !important;
    }
}
