/* 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;
    }
}

/* S57: «Photos & files» the office shares: a grid of previews (3 a row on a phone, more on a wider screen), rows for the rest,
   and a full view over the page */
.cabinet-body .sf-lead {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 22px;
    color: var(--static-text);
}

.cabinet-body .sf-grid {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 576px) {
    .cabinet-body .sf-grid {
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
        gap: 10px;
    }
}

.cabinet-body .sf-cell {
    min-width: 0;
}

.cabinet-body .sf-tile {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--gray);
    border: 1px solid var(--line-color);
}

.cabinet-body .sf-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-body .sf-tile:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.cabinet-body .sf-tile-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--static-text);
}

.cabinet-body .sf-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.55);
}

.cabinet-body .sf-play::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 11px;
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent #fff;
}

.cabinet-body .sf-tile-video.sf-tile-none .sf-tile-label {
    align-items: flex-end;
    padding-bottom: 8px;
}

.cabinet-body .sf-list {
    margin-top: 8px;
}

.cabinet-body .sf-viewer {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    background-color: #0d0f14;
    color: #fff;
}

.cabinet-body .sf-viewer:focus {
    outline: none;
}

.cabinet-body .sf-viewer-bar,
.cabinet-body .sf-viewer-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
}

.cabinet-body .sf-viewer-bar {
    justify-content: space-between;
}

.cabinet-body .sf-viewer-foot {
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.cabinet-body .sf-viewer-foot .link-text {
    color: #fff;
    text-decoration: underline;
    font-size: 16px;
}

.cabinet-body .sf-viewer-count {
    font-size: 15px;
}

.cabinet-body .sf-viewer-close,
.cabinet-body .sf-viewer-step {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 28px;
    line-height: 44px;
    padding: 0;
}

.cabinet-body .sf-viewer-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.cabinet-body .sf-viewer-stage img,
.cabinet-body .sf-viewer-stage video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cabinet-body .sf-viewer-note {
    max-width: 320px;
    text-align: center;
    font-size: 16px;
}

.cabinet-body .sf-viewer-step {
    font-size: 30px;
    line-height: 40px;
}

.cabinet-body .sf-viewer-step:disabled {
    opacity: 0.35;
}

.cabinet-body .sf-viewer-close:focus-visible,
.cabinet-body .sf-viewer-step:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}
