.client-zone-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) 0;
}

.client-zone-auth {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: var(--rv-radius, 16px);
    background: var(--rv-card, #fff);
    box-shadow: 0 22px 70px rgba(15, 23, 42, .10);
}

.client-zone-auth--compact {
    max-width: 560px;
    text-align: center;
}

.client-zone-auth__head {
    margin-bottom: 28px;
}

.client-zone-auth__head h1,
.client-zone-dashboard__head h1 {
    margin: 7px 0 10px;
}

.client-zone-auth__head p,
.client-zone-dashboard__head p,
.client-zone-panel p {
    margin: 0;
    color: var(--rv-muted, #64748b);
    line-height: 1.65;
}

.client-zone-kicker {
    color: var(--rv-teal, #0f8199);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.client-zone-form {
    display: grid;
    gap: 18px;
}

.client-zone-field {
    display: grid;
    gap: 7px;
    text-align: left;
}

.client-zone-field > label {
    font-size: .9rem;
    font-weight: 800;
}

.client-zone-control {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--rv-line, #cbd5e1);
    border-radius: 10px;
    background: var(--rv-bg, #fff);
    color: var(--rv-text, #1e293b);
    font: inherit;
}

.client-zone-control:focus {
    border-color: var(--rv-teal, #0f8199);
    outline: 3px solid color-mix(
        in srgb,
        var(--rv-teal, #0f8199) 18%,
        transparent
    );
}

.client-zone-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.client-zone-checkbox {
    margin-top: 4px;
}

.client-zone-error,
.client-zone-error ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #b91c1c;
    font-size: .84rem;
}

.client-zone-help {
    color: var(--rv-muted, #64748b);
    font-size: .82rem;
}

.client-zone-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 10px;
    background: color-mix(
        in srgb,
        var(--rv-teal, #0f8199) 12%,
        transparent
    );
    line-height: 1.5;
}

.client-zone-alert--error {
    background: rgba(185, 28, 28, .1);
    color: #b91c1c;
}

.client-zone-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid var(--rv-teal, #0f8199);
    border-radius: 10px;
    background: var(--rv-teal, #0f8199);
    color: #fff;
    font: inherit;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.client-zone-button--secondary {
    background: transparent;
    color: var(--rv-text, #1e293b);
    border-color: var(--rv-line, #cbd5e1);
}

.client-zone-button--link {
    margin-top: 12px;
}

.client-zone-auth__footer {
    margin: 22px 0 0;
    text-align: center;
    color: var(--rv-muted, #64748b);
}

.client-zone-auth__footer a {
    color: var(--rv-teal, #0f8199);
    font-weight: 800;
}

.client-zone-status-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--rv-teal, #0f8199);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
}

.client-zone-dashboard {
    display: grid;
    gap: 28px;
}

.client-zone-dashboard__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.client-zone-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.client-zone-card,
.client-zone-panel {
    padding: 22px;
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: var(--rv-radius, 14px);
    background: var(--rv-card, #fff);
}

.client-zone-card {
    display: grid;
    gap: 8px;
}

.client-zone-card span,
.client-zone-card small {
    color: var(--rv-muted, #64748b);
}

.client-zone-card strong {
    overflow-wrap: anywhere;
    font-size: 1.25rem;
}

.client-zone-panel h2 {
    margin-top: 0;
}

@media (max-width: 860px) {
    .client-zone-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .client-zone-shell {
        width: min(100% - 20px, 1120px);
        padding: 32px 0 54px;
    }

    .client-zone-auth {
        padding: 22px 18px;
    }

    .client-zone-dashboard__head {
        flex-direction: column;
    }

    .client-zone-dashboard__head form,
    .client-zone-dashboard__head button {
        width: 100%;
    }

    .client-zone-grid {
        grid-template-columns: 1fr;
    }
}


/* CLIENT ZONE V1A.1 CONTRAST FIX */
.client-zone-auth__head h1,
.client-zone-dashboard__head h1,
.client-zone-panel h2,
.client-zone-card strong {
    color: var(--rv-text, #0f172a);
}

html[data-theme="dark"] .client-zone-auth,
html[data-theme="dark"] .client-zone-card,
html[data-theme="dark"] .client-zone-panel {
    background: rgba(15, 23, 42, .72);
    border-color: rgba(148, 163, 184, .22);
}

html[data-theme="dark"] .client-zone-auth__head h1,
html[data-theme="dark"] .client-zone-dashboard__head h1,
html[data-theme="dark"] .client-zone-panel h2,
html[data-theme="dark"] .client-zone-card strong {
    color: #f8fafc;
}

html[data-theme="dark"] .client-zone-auth__head p,
html[data-theme="dark"] .client-zone-dashboard__head p,
html[data-theme="dark"] .client-zone-panel p,
html[data-theme="dark"] .client-zone-card span,
html[data-theme="dark"] .client-zone-card small,
html[data-theme="dark"] .client-zone-auth__footer {
    color: #cbd5e1;
}

html[data-theme="dark"] .client-zone-button--secondary {
    color: #f8fafc;
    border-color: rgba(148, 163, 184, .35);
    background: rgba(15, 23, 42, .35);
}

html[data-theme="dark"] .client-zone-control {
    background: rgba(15, 23, 42, .68);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, .26);
}

html[data-theme="dark"] .client-zone-control::placeholder {
    color: #94a3b8;
}

/* CLIENT ZONE V1B */
.client-zone-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: 14px;
    background: var(--rv-card, #fff);
}

.client-zone-nav a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--rv-text, #0f172a);
    font-weight: 800;
    text-decoration: none;
}

.client-zone-nav a:hover,
.client-zone-nav a:focus-visible {
    background: rgba(15, 129, 153, .12);
}

.client-zone-card--link {
    color: inherit;
    text-decoration: none;
    transition:
        transform .15s ease,
        border-color .15s ease;
}

.client-zone-card--link:hover,
.client-zone-card--link:focus-visible {
    transform: translateY(-2px);
    border-color: var(--rv-teal, #0f8199);
}

.client-zone-email {
    font-size: 1rem !important;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.client-zone-panel__head,
.client-zone-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.client-zone-panel__head h2,
.client-zone-detail__head h2 {
    margin: 5px 0 0;
}

.client-zone-counter {
    min-width: 42px;
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(15, 129, 153, .12);
    color: var(--rv-teal, #0f8199);
}

.client-zone-text-link,
.client-zone-back {
    color: var(--rv-teal, #0f8199);
    font-weight: 800;
    text-decoration: none;
}

.client-zone-records {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.client-zone-record {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 18px;
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: 12px;
    color: var(--rv-text, #0f172a);
    text-decoration: none;
}

.client-zone-record:hover,
.client-zone-record:focus-visible {
    border-color: var(--rv-teal, #0f8199);
}

.client-zone-record > div:first-child,
.client-zone-record__meta {
    display: grid;
    gap: 5px;
}

.client-zone-record > div:first-child span,
.client-zone-record__meta small {
    color: var(--rv-muted, #64748b);
}

.client-zone-record__meta {
    min-width: 170px;
    text-align: right;
}

.client-zone-empty {
    padding: 30px 20px;
    border: 1px dashed var(--rv-line, #cbd5e1);
    border-radius: 12px;
    color: var(--rv-muted, #64748b);
    text-align: center;
}

.client-zone-badge {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 129, 153, .12);
    color: var(--rv-teal, #0f8199);
    font-size: .86rem;
    font-weight: 850;
}

.client-zone-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0 0;
}

.client-zone-detail-grid > div {
    padding: 15px;
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: 11px;
}

.client-zone-detail-grid dt {
    margin-bottom: 5px;
    color: var(--rv-muted, #64748b);
    font-size: .82rem;
    font-weight: 800;
}

.client-zone-detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.client-zone-detail-text {
    margin-top: 24px;
}

.client-zone-detail-text h3 {
    margin: 0 0 8px;
}

.client-zone-detail-text p {
    margin: 0;
    color: var(--rv-muted, #64748b);
    line-height: 1.7;
}

html[data-theme="dark"] .client-zone-nav,
html[data-theme="dark"] .client-zone-record,
html[data-theme="dark"] .client-zone-detail-grid > div {
    background: rgba(15, 23, 42, .55);
    border-color: rgba(148, 163, 184, .22);
}

html[data-theme="dark"] .client-zone-nav a,
html[data-theme="dark"] .client-zone-record {
    color: #f8fafc;
}

html[data-theme="dark"] .client-zone-detail-text h3 {
    color: #f8fafc;
}

html[data-theme="dark"] .client-zone-detail-text p,
html[data-theme="dark"] .client-zone-record > div:first-child span,
html[data-theme="dark"] .client-zone-record__meta small,
html[data-theme="dark"] .client-zone-detail-grid dt {
    color: #cbd5e1;
}

@media (max-width: 700px) {
    .client-zone-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-zone-nav a {
        justify-content: center;
    }

    .client-zone-record {
        display: grid;
        gap: 12px;
    }

    .client-zone-record__meta {
        min-width: 0;
        text-align: left;
    }

    .client-zone-detail__head,
    .client-zone-panel__head {
        display: grid;
    }

    .client-zone-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .client-zone-nav {
        grid-template-columns: 1fr;
    }
}

/* CLIENT ZONE V1C */
.client-zone-nav__link.is-active {
    background: rgba(15, 129, 153, .16);
    color: var(--rv-teal, #0f8199);
}

.client-zone-nav__link.is-active::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-radius: 999px;
    background: currentColor;
}

.client-zone-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.client-zone-document-items {
    margin-top: 28px;
}

.client-zone-document-items h3 {
    margin: 0 0 12px;
}

.client-zone-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: 12px;
}

.client-zone-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.client-zone-table th,
.client-zone-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--rv-line, #dbe2ea);
    text-align: left;
    vertical-align: top;
}

.client-zone-table th {
    color: var(--rv-muted, #64748b);
    font-size: .78rem;
    font-weight: 850;
}

.client-zone-table td {
    color: var(--rv-text, #0f172a);
}

.client-zone-table tbody tr:last-child td {
    border-bottom: 0;
}

html[data-theme="dark"] .client-zone-nav__link.is-active {
    background: rgba(15, 129, 153, .2);
    color: #22d3ee;
}

html[data-theme="dark"] .client-zone-table-wrap {
    border-color: rgba(148, 163, 184, .22);
}

html[data-theme="dark"] .client-zone-table th,
html[data-theme="dark"] .client-zone-table td {
    border-color: rgba(148, 163, 184, .18);
}

html[data-theme="dark"] .client-zone-table th {
    color: #cbd5e1;
}

html[data-theme="dark"] .client-zone-table td {
    color: #f8fafc;
}

@media (max-width: 700px) {
    .client-zone-detail-toolbar {
        align-items: stretch;
    }

    .client-zone-detail-toolbar
    .client-zone-button {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .client-zone-detail-toolbar {
        display: grid;
    }
}


/* =========================================================
   CLIENT ZONE V1E-A - PROFILE + ADDRESSES
   ========================================================= */

.client-zone-profile-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.client-zone-profile-info > div,
.client-zone-address-card,
.client-zone-readonly-note,
.client-zone-delete-box {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 1rem;
}

.client-zone-profile-info span,
.client-zone-profile-info small {
    display: block;
}

.client-zone-profile-info strong {
    display: block;
    margin: 0.2rem 0;
    overflow-wrap: anywhere;
}

.client-zone-profile-form {
    margin-top: 1.25rem;
}

.client-zone-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.client-zone-field {
    min-width: 0;
}

.client-zone-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.client-zone-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.client-zone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.client-zone-address-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.client-zone-address-card {
    min-width: 0;
}

.client-zone-address-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.client-zone-address-card__head span {
    display: block;
    margin-top: 0.15rem;
}

.client-zone-address-card address,
.client-zone-delete-box address {
    font-style: normal;
    line-height: 1.65;
}

.client-zone-address-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.client-zone-text-link--danger {
    text-decoration: underline;
}

.client-zone-readonly-note {
    margin: 1rem 0;
}

.client-zone-button--danger {
    cursor: pointer;
}

@media (max-width: 760px) {
    .client-zone-profile-info,
    .client-zone-form-grid,
    .client-zone-address-list {
        grid-template-columns: 1fr;
    }

    .client-zone-address-card__head {
        flex-direction: column;
    }

    .client-zone-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .client-zone-actions .client-zone-button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* =========================================================
   CLIENT ZONE V1E-B - PRIVATE FILES
   ========================================================= */

.client-zone-file-intro {
    margin: 0 0 1.25rem;
}

.client-zone-file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.client-zone-file-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
}

.client-zone-file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.client-zone-file-preview img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.client-zone-file-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 112px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.client-zone-file-card__body {
    padding: 1rem;
}

.client-zone-file-card__body h3 {
    margin: 0.35rem 0 0.65rem;
    overflow-wrap: anywhere;
}

.client-zone-file-card__body p {
    overflow-wrap: anywhere;
}

.client-zone-file-meta {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

.client-zone-file-meta span {
    overflow-wrap: anywhere;
}

.client-zone-file-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1rem;
}

.client-zone-upload-info {
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
}

.client-zone-upload-info p:last-child {
    margin-bottom: 0;
}

.client-zone-field--full {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .client-zone-file-grid {
        grid-template-columns: 1fr;
    }

    .client-zone-file-preview {
        min-height: 180px;
    }

    .client-zone-file-preview img {
        height: 220px;
    }

    .client-zone-file-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .client-zone-file-actions .client-zone-button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}
