/* Nòduls · Revisió i mapatge anual */

.review-dashboard {
    margin-top: 30px;
}

.review-dashboard__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
    gap: 34px;
    align-items: end;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(195, 203, 222, 0.12);
}

.review-dashboard__eyebrow,
.review-coverage header span,
.review-map-table header span,
.review-term-balance header span,
.review-checks header > span {
    color: #aaa5ff;
    font-size: 0.61rem;
    font-weight: 760;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.review-dashboard__header h3 {
    margin: 10px 0 0;
    color: #f4f1eb;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: clamp(2rem, 3.4vw, 3.35rem);
    font-weight: 500;
    letter-spacing: -0.045em;
}

.review-dashboard__header p {
    max-width: 690px;
    margin: 13px 0 0;
    color: #929db1;
    font-size: 0.78rem;
    line-height: 1.68;
}

.review-dashboard__context {
    border-top: 1px solid rgba(195, 203, 222, 0.12);
    border-bottom: 1px solid rgba(195, 203, 222, 0.12);
}

.review-dashboard__context > div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
}

.review-dashboard__context > div + div {
    border-top: 1px solid rgba(195, 203, 222, 0.09);
}

.review-dashboard__context span,
.review-dashboard__metrics span {
    color: #748097;
    font-size: 0.58rem;
    font-weight: 720;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.review-dashboard__context strong {
    overflow: hidden;
    color: #dce0e8;
    font-size: 0.7rem;
    font-weight: 660;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-dashboard__context strong.is-ready {
    color: #9fd2ba;
}

.review-dashboard__context strong.is-warning {
    color: #d5b386;
}

.review-dashboard__message {
    margin-top: 24px;
    padding: 25px;
    border: 1px solid rgba(195, 203, 222, 0.12);
    color: #8994a8;
    background: rgba(7, 15, 28, 0.34);
    font-size: 0.72rem;
    text-align: center;
}

.review-dashboard__message.is-warning {
    border-color: rgba(225, 179, 116, 0.22);
    color: #d1b588;
    background: rgba(145, 99, 35, 0.055);
}

.review-dashboard__message[hidden],
.review-dashboard__workspace[hidden],
.review-map-table__empty[hidden] {
    display: none;
}

.review-dashboard__metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 24px;
    border-top: 1px solid rgba(195, 203, 222, 0.12);
    border-bottom: 1px solid rgba(195, 203, 222, 0.12);
}

.review-dashboard__metrics > div {
    padding: 15px 16px 15px 0;
}

.review-dashboard__metrics > div + div {
    padding-left: 16px;
    border-left: 1px solid rgba(195, 203, 222, 0.12);
}

.review-dashboard__metrics span {
    display: block;
}

.review-dashboard__metrics strong {
    display: block;
    margin-top: 7px;
    color: #eceaf2;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: 1.38rem;
    font-weight: 500;
}

.review-dashboard__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
    margin-top: 23px;
}

.review-dashboard__main {
    display: grid;
    gap: 18px;
}

.review-coverage,
.review-map-table,
.review-term-balance,
.review-checks {
    border: 1px solid rgba(195, 203, 222, 0.12);
    border-radius: 2px;
    background:
        linear-gradient(
            135deg,
            rgba(18, 31, 51, 0.56),
            rgba(9, 18, 32, 0.48)
        );
}

.review-coverage,
.review-map-table,
.review-term-balance {
    padding: 21px;
}

.review-coverage > header,
.review-map-table > header,
.review-term-balance > header {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: end;
}

.review-coverage h4,
.review-map-table h4,
.review-term-balance h4,
.review-checks h4 {
    margin: 8px 0 0;
    color: #f0eee9;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.review-coverage > header > strong {
    color: #f0eee9;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: 1.75rem;
    font-weight: 500;
}

.review-map-table header p,
.review-term-balance header p {
    max-width: 340px;
    margin: 0;
    color: #7f8a9e;
    font-size: 0.64rem;
    line-height: 1.5;
    text-align: right;
}

.review-coverage__rows {
    display: grid;
    gap: 15px;
    margin-top: 22px;
}

.review-coverage__rows article > div:first-child,
.review-term > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
}

.review-coverage__rows article > div:first-child span,
.review-term > div:first-child span {
    color: #b9c0cc;
    font-size: 0.67rem;
}

.review-coverage__rows article > div:first-child strong,
.review-term > div:first-child strong {
    color: #8792a7;
    font-size: 0.61rem;
}

.review-coverage__rows article > div:last-child,
.review-term > div:last-child {
    height: 4px;
    margin-top: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.055);
}

.review-coverage__rows article > div:last-child span,
.review-term > div:last-child span {
    display: block;
    width: 0;
    height: 100%;
    background: #938deb;
    transition: width 180ms ease;
}

.review-map-table__scroll {
    margin-top: 20px;
    overflow-x: auto;
}

.review-map-table table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.review-map-table th,
.review-map-table td {
    padding: 12px 11px;
    border-bottom: 1px solid rgba(195, 203, 222, 0.09);
    text-align: left;
}

.review-map-table th {
    color: #748097;
    font-size: 0.56rem;
    font-weight: 720;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.review-map-table td {
    color: #aab3c2;
    font-size: 0.65rem;
}

.review-map-table td:first-child {
    min-width: 210px;
}

.review-map-table td:first-child strong {
    display: block;
    color: #b9b4ff;
    font-size: 0.61rem;
}

.review-map-table td:first-child span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #d9dde6;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-map-table__status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 8px;
    border: 1px solid rgba(225, 179, 116, 0.22);
    border-radius: 999px;
    color: #d1b588;
    background: rgba(145, 99, 35, 0.055);
    font-size: 0.56rem;
    font-weight: 680;
}

.review-map-table__status.is-ready {
    border-color: rgba(114, 184, 153, 0.28);
    color: #9fd2ba;
    background: rgba(80, 157, 122, 0.06);
}

.review-map-table__empty {
    margin-top: 18px;
    padding: 26px;
    border: 1px dashed rgba(195, 203, 222, 0.12);
    color: #707c91;
    font-size: 0.65rem;
    text-align: center;
}

.review-term-balance__items {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.review-checks {
    position: sticky;
    top: 18px;
    padding: 21px;
}

.review-checks__summary {
    margin-top: 17px;
    padding: 12px 13px;
    border-left: 2px solid #c58d62;
    color: #c9a681;
    background: rgba(160, 104, 59, 0.055);
    font-size: 0.64rem;
    line-height: 1.5;
}

.review-checks__summary.is-ready {
    border-left-color: #72b899;
    color: #9fd2ba;
    background: rgba(80, 157, 122, 0.06);
}

.review-checks__items {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.review-check {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(195, 203, 222, 0.08);
}

.review-check__icon {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(225, 179, 116, 0.25);
    border-radius: 50%;
    color: #d1b588;
    font-size: 0.58rem;
}

.review-check.is-ok .review-check__icon {
    border-color: rgba(114, 184, 153, 0.3);
    color: #9fd2ba;
}

.review-check.is-info .review-check__icon {
    border-color: rgba(159, 151, 245, 0.3);
    color: #b9b4ff;
}

.review-check strong {
    color: #d8dce5;
    font-size: 0.66rem;
}

.review-check p {
    margin: 4px 0 0;
    color: #788398;
    font-size: 0.59rem;
    line-height: 1.45;
}

.review-checks__actions {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.review-checks__actions button {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(188, 198, 220, 0.14);
    border-radius: 2px;
    color: #d2d6df;
    background: rgba(5, 12, 23, 0.3);
    font: inherit;
    font-size: 0.62rem;
    cursor: pointer;
}

.review-checks__actions button:hover {
    border-color: rgba(164, 157, 246, 0.38);
    background: rgba(126, 121, 225, 0.08);
}

.review-checks > p {
    margin: 14px 0 0;
    color: #667186;
    font-size: 0.57rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 1040px) {
    .review-dashboard__header,
    .review-dashboard__layout {
        grid-template-columns: 1fr;
    }

    .review-checks {
        position: static;
    }
}

@media (max-width: 760px) {
    .review-dashboard__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-coverage > header,
    .review-map-table > header,
    .review-term-balance > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .review-map-table header p,
    .review-term-balance header p {
        text-align: left;
    }
}

@media (max-width: 500px) {
    .review-dashboard__metrics {
        grid-template-columns: 1fr;
    }

    .review-dashboard__metrics > div {
        padding: 13px 0;
        border-top: 1px solid rgba(195, 203, 222, 0.12);
        border-left: 0 !important;
    }
}

/* Nòduls · correcció de solapament del mapatge */

.review-dashboard {
    container-type: inline-size;
    container-name: review-dashboard;
}

.review-dashboard__layout {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(270px, 300px);
}

.review-dashboard__main,
.review-coverage,
.review-map-table,
.review-term-balance,
.review-map-table__scroll {
    min-width: 0;
    max-width: 100%;
}

.review-dashboard__main {
    overflow: hidden;
}

.review-coverage,
.review-map-table,
.review-term-balance {
    box-sizing: border-box;
    overflow: hidden;
}

.review-map-table__scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.review-map-table table {
    width: max-content;
    min-width: 100%;
}

.review-checks {
    min-width: 0;
    width: auto;
    align-self: start;
    z-index: 1;
}

.review-coverage > header,
.review-map-table > header,
.review-term-balance > header {
    min-width: 0;
}

.review-coverage > header > div,
.review-map-table > header > div,
.review-term-balance > header > div {
    min-width: 0;
}

@container review-dashboard (max-width: 940px) {
    .review-dashboard__layout {
        grid-template-columns: 1fr;
    }

    .review-checks {
        position: static;
        width: 100%;
    }
}

@media (max-width: 1180px) {
    .review-dashboard__layout {
        grid-template-columns: 1fr;
    }

    .review-checks {
        position: static;
        width: 100%;
    }
}

