/* SIGFAD_DOCUMENTOS_REDESIGN_V2 */

#documentChecklistModal .modal-dialog {
    max-width: min(1160px, calc(100vw - 2rem));
}

#documentChecklistModal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 1.15rem;
    box-shadow: 0 1.5rem 4rem rgba(15, 32, 56, 0.24);
}

#documentChecklistModal .modal-header {
    padding: 1.15rem 1.4rem;
    border-bottom-color: #e4eaf1;
}

#documentChecklistModal .modal-body {
    padding: 1.2rem;
    background: #f4f7fb;
}

#documentChecklistModal .modal-footer {
    padding: .85rem 1.2rem;
    background: #fff;
    border-top-color: #e4eaf1;
}

.document-redesign-shell {
    display: grid;
    gap: 1rem;
}

.document-summary-v2 {
    padding: 1.2rem;
    background:
        radial-gradient(
            circle at top right,
            rgba(13, 110, 253, .11),
            transparent 36%
        ),
        #fff;
    border: 1px solid #dfe7f0;
    border-radius: 1rem;
    box-shadow: 0 .35rem 1.1rem rgba(21, 55, 91, .06);
}

.document-summary-top {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
}

.document-summary-kicker {
    display: block;
    margin-bottom: .25rem;
    color: #517096;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.document-summary-top h5 {
    margin: 0;
    color: #102d55;
    font-weight: 800;
}

.document-summary-top p {
    margin: .3rem 0 0;
    color: #6b7c91;
    font-size: .88rem;
}

.document-summary-percentage {
    display: grid;
    min-width: 88px;
    place-items: center;
    padding: .65rem .9rem;
    color: #9a6300;
    background: #fff4d6;
    border: 1px solid #f2d58b;
    border-radius: .9rem;
}

.document-summary-percentage strong {
    font-size: 1.25rem;
    line-height: 1;
}

.document-summary-percentage span {
    margin-top: .25rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.document-summary-percentage.is-complete {
    color: #12653d;
    background: #e8f7ef;
    border-color: #b7e3cb;
}

.document-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .7rem;
    margin-top: 1.1rem;
}

.document-summary-metric {
    display: flex;
    min-width: 0;
    gap: .65rem;
    align-items: center;
    padding: .75rem;
    background: #f8fafc;
    border: 1px solid #e4eaf1;
    border-radius: .8rem;
}

.document-summary-metric-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    color: #315b8f;
    background: #e8f0fa;
    border-radius: .7rem;
}

.document-summary-metric strong,
.document-summary-metric small {
    display: block;
}

.document-summary-metric strong {
    color: #162d4d;
    font-size: 1.05rem;
}

.document-summary-metric small {
    color: #758499;
    font-size: .72rem;
}

.document-summary-metric.tone-success
.document-summary-metric-icon {
    color: #147347;
    background: #e6f5ed;
}

.document-summary-metric.tone-danger
.document-summary-metric-icon {
    color: #c52b39;
    background: #fdebed;
}

.document-summary-metric.tone-warning
.document-summary-metric-icon {
    color: #a65d00;
    background: #fff0d9;
}

.document-summary-metric.tone-waived
.document-summary-metric-icon {
    color: #6a5bb1;
    background: #efecff;
}

.document-progress-v2 {
    height: .55rem;
    margin-top: 1rem;
    background: #e8edf3;
    border-radius: 999px;
}

.document-summary-message {
    display: flex;
    gap: .45rem;
    align-items: center;
    margin-top: .7rem;
    font-size: .82rem;
    font-weight: 650;
}

.document-toolbar-v2 {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    gap: .75rem;
    align-items: center;
    padding: .8rem;
    background: #fff;
    border: 1px solid #dfe7f0;
    border-radius: .95rem;
}

.document-search-v2 {
    position: relative;
}

.document-search-v2 > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: .85rem;
    color: #8190a2;
    transform: translateY(-50%);
}

.document-search-v2 .form-control {
    padding-left: 2.3rem;
    border-radius: .75rem;
}

.document-filter-pills {
    display: flex;
    gap: .3rem;
    padding: .25rem;
    background: #f0f3f7;
    border-radius: .75rem;
}

.document-filter-pills .btn {
    padding: .38rem .68rem;
    color: #53657a;
    border: 0;
    border-radius: .58rem;
    font-size: .78rem;
    font-weight: 700;
}

.document-filter-pills .btn.active {
    color: #0d5bd3;
    background: #fff;
    box-shadow: 0 .15rem .5rem rgba(24, 57, 93, .1);
}

.document-required-toggle {
    display: flex;
    gap: .5rem;
    align-items: center;
    white-space: nowrap;
    color: #4d5e72;
    font-size: .8rem;
    font-weight: 650;
}

.document-category-stack {
    display: grid;
    gap: .8rem;
}

.document-category-v2 {
    overflow: hidden;
    margin: 0 !important;
    background: #fff;
    border: 1px solid #dfe7f0;
    border-radius: .95rem;
    box-shadow: 0 .25rem .85rem rgba(20, 48, 82, .045);
}

.document-category-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .85rem 1rem;
    color: inherit;
    text-align: left;
    background: #fff;
    border: 0;
}

.document-category-heading {
    display: flex;
    min-width: 0;
    gap: .7rem;
    align-items: center;
}

.document-category-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    color: #1264d7;
    background: #eaf2ff;
    border-radius: .7rem;
}

.document-category-heading strong,
.document-category-heading small {
    display: block;
}

.document-category-heading strong {
    color: #17375f;
    font-size: .93rem;
}

.document-category-heading small {
    margin-top: .15rem;
    color: #758499;
    font-size: .74rem;
}

.document-category-end {
    display: flex;
    gap: .65rem;
    align-items: center;
    color: #6e7d8f;
}

.document-category-header[aria-expanded="true"]
.document-category-end > i {
    transform: rotate(180deg);
}

.document-category-end > i {
    transition: transform .2s ease;
}

.document-category-content {
    padding: 0 .75rem .75rem;
    border-top: 1px solid #edf1f5;
}

.document-list {
    gap: .65rem;
    padding-top: .75rem;
}

.document-item-v2 {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    padding: .9rem;
    border-left-width: 4px;
    border-radius: .8rem;
    box-shadow: none;
}

.document-item-v2 .document-state {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    margin-top: .05rem;
    background: #f2f5f8;
    border-radius: 50%;
}

.document-item-v2.document-complementary {
    border-left-color: #8b98a8;
    background: #fbfcfd;
}

.document-item-v2.document-complementary
.document-state {
    color: #69788b;
}

.document-title-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.document-title-row h6 {
    margin: 0;
    color: #182e4b;
    font-size: .93rem;
    font-weight: 800;
}

.document-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .35rem;
}

.document-badge-row .badge {
    font-size: .66rem;
}

.document-situation-badge.status-delivered {
    color: #12653d;
    background: #e8f7ef;
    border: 1px solid #b7e3cb;
}

.document-situation-badge.status-pending {
    color: #a32331;
    background: #fdebed;
    border: 1px solid #f4c7cd;
}

.document-situation-badge.status-expired {
    color: #9a5100;
    background: #fff0d9;
    border: 1px solid #f2d2a4;
}

.document-situation-badge.status-waived {
    color: #5d4aa8;
    background: #efecff;
    border: 1px solid #d7cff9;
}

.document-complementary
.document-situation-badge.status-pending {
    color: #59697d;
    background: #eef1f5;
    border-color: #dce2e9;
}

.document-description {
    margin: .55rem 0 0;
    color: #69788a;
    font-size: .82rem;
    line-height: 1.45;
}

.document-file-panel {
    display: flex;
    gap: .65rem;
    align-items: center;
    margin-top: .7rem;
    padding: .65rem .7rem;
    background: #f7f9fc;
    border: 1px solid #e4eaf1;
    border-radius: .72rem;
}

.document-file-icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    color: #1762c2;
    background: #e7f0fc;
    border-radius: .6rem;
}

.document-file-main {
    min-width: 0;
    flex: 1;
}

.document-file-main strong,
.document-file-main small {
    display: block;
}

.document-file-main strong {
    overflow: hidden;
    color: #2a3f5c;
    font-size: .79rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-file-main small {
    margin-top: .12rem;
    color: #7d8a9a;
    font-size: .69rem;
}

.document-file-status {
    padding: .24rem .45rem;
    color: #52647a;
    background: #fff;
    border: 1px solid #dce3eb;
    border-radius: .45rem;
    font-size: .66rem;
    font-weight: 700;
}

.document-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: .5rem;
    color: #6f7e90;
    font-size: .72rem;
}

.document-meta-row i {
    margin-right: .2rem;
}

.document-actions {
    align-items: center;
}

.document-actions .btn {
    white-space: nowrap;
}

.document-more-button {
    width: 34px;
    height: 34px;
    padding: 0;
}

.document-observation {
    margin-top: .55rem;
    padding: .55rem .65rem;
    color: #5c6c7f;
    background: #f7f9fb;
    border-radius: .6rem;
    font-size: .76rem;
}

.document-complementary-action {
    display: flex;
    justify-content: flex-end;
}

.document-complementary-action .btn {
    border-radius: .75rem;
}

@media (max-width: 991.98px) {
    .document-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .document-toolbar-v2 {
        grid-template-columns: 1fr;
    }

    .document-filter-pills {
        overflow-x: auto;
    }

    .document-required-toggle {
        justify-self: start;
    }
}

@media (max-width: 620px) {
    #documentChecklistModal .modal-dialog {
        max-width: calc(100vw - 1rem);
        margin: .5rem;
    }

    #documentChecklistModal .modal-body {
        padding: .75rem;
    }

    .document-summary-top {
        display: grid;
    }

    .document-summary-percentage {
        width: 100%;
    }

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

    .document-title-row {
        display: grid;
    }

    .document-title-row .document-actions {
        justify-content: flex-start;
    }

    .document-actions .btn:not(.document-more-button) {
        flex: 1;
    }

    .document-file-status {
        display: none;
    }
}

[data-bs-theme="dark"] #documentChecklistModal .modal-body,
body.dark-mode #documentChecklistModal .modal-body {
    background: #101a28;
}

[data-bs-theme="dark"] .document-summary-v2,
[data-bs-theme="dark"] .document-toolbar-v2,
[data-bs-theme="dark"] .document-category-v2,
[data-bs-theme="dark"] .document-category-header,
body.dark-mode .document-summary-v2,
body.dark-mode .document-toolbar-v2,
body.dark-mode .document-category-v2,
body.dark-mode .document-category-header {
    background: #172334;
    border-color: #2b3b50;
}

[data-bs-theme="dark"] .document-summary-top h5,
[data-bs-theme="dark"] .document-category-heading strong,
[data-bs-theme="dark"] .document-title-row h6,
body.dark-mode .document-summary-top h5,
body.dark-mode .document-category-heading strong,
body.dark-mode .document-title-row h6 {
    color: #e4edf8;
}

[data-bs-theme="dark"] .document-summary-metric,
[data-bs-theme="dark"] .document-file-panel,
body.dark-mode .document-summary-metric,
body.dark-mode .document-file-panel {
    background: #111d2b;
    border-color: #2a3a4e;
}

[data-bs-theme="dark"] .document-item-v2,
body.dark-mode .document-item-v2 {
    background: #182536;
    border-color: #304158;
}

[data-bs-theme="dark"] .document-item-v2.document-complementary,
body.dark-mode .document-item-v2.document-complementary {
    background: #15202f;
}
