/* docs-office (29.10.2026): customer documents, sign-in and the account links. Linked only while documents are on,
   so the other portals and the other pages stay as they were. Phone first: 320–390 px wide without side scrolling. */

.cabinet-body .docs-section {
    padding: 24px 0 40px;
}

.cabinet-body .docs-page {
    max-width: 880px;
}

.cabinet-body .docs-narrow {
    max-width: 520px;
}

.cabinet-body .docs-title {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.cabinet-body .docs-h2 {
    font-size: 22px;
    line-height: 30px;
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

.cabinet-body .docs-h3 {
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    margin-bottom: 0;
}

.cabinet-body .docs-lead {
    font-size: 18px;
    line-height: 26px;
}

.cabinet-body .docs-help {
    font-size: 16px;
    line-height: 24px;
}

.cabinet-body .docs-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.cabinet-body .docs-code {
    letter-spacing: 6px;
    font-size: 24px;
    text-align: center;
}

.cabinet-body .docs-link-button,
.cabinet-body .portal-nav-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--link-text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.cabinet-body .docs-link-button:disabled {
    color: var(--static-text);
    cursor: default;
}

.cabinet-body .docs-resend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

/* /s/<token> while js/link.js opens the link (owner 31.10 «sign-direct»): a spinner and «Opening your document…» */
.cabinet-body .link-opening {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cabinet-body .link-spinner {
    flex: none;
    width: 30px;
    height: 30px;
    border: 3px solid var(--line-color);
    border-top-color: var(--link-text);
    border-radius: 50%;
    animation: link-spin 0.9s linear infinite;
}

@keyframes link-spin {
    to {
        transform: rotate(360deg);
    }
}

/* nothing opens by itself without scripts, nor once this tab posted the link already: the button only */
@media (scripting: none) {
    .cabinet-body .link-opening {
        display: none;
    }
}

.cabinet-body .link-idle .link-opening {
    display: none;
}

/* account links under the brand header */
.cabinet-body .portal-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px 20px;
    margin-top: 12px;
    font-size: 16px;
    line-height: 24px;
}

.cabinet-body .portal-nav-form {
    display: inline;
    margin: 0;
}

/* a work order and its documents */
.cabinet-body .doc-wo .card-body {
    padding: 24px;
}

.cabinet-body .doc-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.cabinet-body .doc-item {
    padding: 14px 0;
    border-top: 1px solid var(--line-color);
}

.cabinet-body .doc-item:first-child {
    border-top: 0;
    padding-top: 6px;
}

.cabinet-body .doc-item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    font-size: 17px;
    line-height: 24px;
}

.cabinet-body .doc-kind {
    color: var(--static-text);
}

.cabinet-body .doc-number {
    overflow-wrap: anywhere;
}

.cabinet-body .doc-money {
    font-weight: 600;
    white-space: nowrap;
}

.cabinet-body .doc-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 6px;
    font-size: 15px;
    line-height: 22px;
}

.cabinet-body .doc-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    background-color: var(--gray);
    color: var(--dark-gray-text);
}

.cabinet-body .doc-chip-waiting {
    background-color: #fff4d6;
    color: #6b4e00;
}

.cabinet-body .doc-chip-ok {
    background-color: var(--assigned-bg);
    color: #0b5394;
}

.cabinet-body .doc-chip-declined {
    background-color: #fbe3e7;
    color: #8a1c2c;
}

.cabinet-body .doc-item-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 8px;
    font-size: 16px;
    line-height: 24px;
}

.cabinet-body .doc-action {
    margin: 12px 0 0;
}

.cabinet-body .doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cabinet-body .doc-actions .doc-action {
    margin: 0;
}

.cabinet-body .doc-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 24px;
}

.cabinet-body .doc-lines li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-top: 1px solid var(--line-color);
}

.cabinet-body .doc-lines li > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.cabinet-body .doc-lines .doc-lines-total {
    font-weight: 700;
}

.cabinet-body .doc-appliance p {
    overflow-wrap: anywhere;
}

@media (max-width: 576px) {
    .cabinet-body .docs-title {
        font-size: 26px;
        line-height: 34px;
    }

    .cabinet-body .docs-lead {
        font-size: 16px;
        line-height: 24px;
    }

    .cabinet-body .doc-wo .card-body {
        padding: 16px !important;
    }

    /* full-width buttons: easy to hit, and long labels never push the page sideways */
    .cabinet-body .doc-action,
    .cabinet-body .doc-action .btn,
    .cabinet-body .doc-actions {
        width: 100%;
    }

    .cabinet-body .doc-action .btn {
        padding: 14px 16px !important;
    }

    .cabinet-body .portal-nav {
        justify-content: center;
    }
}
