/* ConsulenzaPro Legal V1.2 - Client Portal Preview
   Synthetic public showcase only. No real account, upload, messaging or auth. */

.client-portal-view {
    padding-bottom: 48px;
}

.client-portal-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.client-portal-heading h1 {
    margin: 8px 0 12px;
}

.client-portal-heading p {
    max-width: 760px;
    margin: 0;
}

.client-portal-boundary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px 17px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.client-portal-boundary > span {
    display: grid;
    place-items: center;
    min-width: 54px;
    height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--surface);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
}

.client-portal-boundary strong,
.client-portal-boundary p {
    display: block;
}

.client-portal-boundary p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.client-portal-boundary b {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.client-portal-frame {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #f7f5f1;
    box-shadow: 0 18px 45px rgba(40, 32, 28, .08);
}

.client-portal-framebar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.client-portal-framebar-left,
.client-portal-framebar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-portal-logo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #2c2927;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
}

.client-portal-framebar strong,
.client-portal-framebar small {
    display: block;
}

.client-portal-framebar small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.client-portal-session-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf5ef;
    color: #376848;
    font-size: 10px;
    font-weight: 900;
}

.client-portal-session-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #4f8b62;
}

.client-portal-shell {
    display: grid;
    grid-template-columns: 205px minmax(0, 1fr);
    min-height: 690px;
}

.client-portal-side {
    padding: 20px 14px;
    border-right: 1px solid var(--border);
    background: #2c2927;
    color: #ffffff;
}

.client-portal-profile {
    padding: 4px 7px 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.client-portal-profile-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: #8b2432;
    color: #ffffff;
    font-weight: 900;
}

.client-portal-profile strong,
.client-portal-profile span {
    display: block;
}

.client-portal-profile span {
    margin-top: 4px;
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
}

.client-portal-tab {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin-bottom: 4px;
    padding: 0 11px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: rgba(255, 255, 255, .68);
    text-align: left;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.client-portal-tab span:first-child {
    display: grid;
    place-items: center;
    width: 24px;
    font-size: 10px;
    font-weight: 900;
}

.client-portal-tab:hover,
.client-portal-tab.active {
    background: rgba(255, 255, 255, .11);
    color: #ffffff;
}

.client-portal-tab.active {
    box-shadow: inset 3px 0 0 #d7a6ae;
}

.client-portal-main {
    min-width: 0;
    padding: 24px;
}

.client-portal-pane {
    display: none;
}

.client-portal-pane.active {
    display: block;
}

.client-portal-greeting {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.client-portal-greeting h2 {
    margin: 4px 0 7px;
    font-size: 27px;
    letter-spacing: -.035em;
}

.client-portal-greeting p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.client-portal-greeting-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.client-portal-mini-button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.client-portal-mini-button.primary {
    border-color: #8b2432;
    background: #8b2432;
    color: #ffffff;
}

.client-portal-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.client-portal-kpi {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #ffffff;
}

.client-portal-kpi span,
.client-portal-kpi small {
    display: block;
    color: var(--muted);
}

.client-portal-kpi strong {
    display: block;
    margin: 6px 0 4px;
    font-size: 21px;
}

.client-portal-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 14px;
}

.client-portal-card {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
}

.client-portal-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.client-portal-card-head h3 {
    margin: 3px 0 0;
    font-size: 17px;
}

.client-portal-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1eee9;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
}

.client-portal-chip.good {
    background: #edf5ef;
    color: #376848;
}

.client-portal-matter-title {
    margin-bottom: 14px;
}

.client-portal-matter-title strong,
.client-portal-matter-title span {
    display: block;
}

.client-portal-matter-title strong {
    font-size: 18px;
}

.client-portal-matter-title span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.client-portal-progress {
    height: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #eeeae4;
}

.client-portal-progress > span {
    display: block;
    width: 68%;
    height: 100%;
    border-radius: inherit;
    background: #8b2432;
}

.client-portal-timeline {
    display: grid;
    gap: 0;
}

.client-portal-step {
    position: relative;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    min-height: 58px;
}

.client-portal-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 28px;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.client-portal-step-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 999px;
    background: #f1eee9;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
}

.client-portal-step.done .client-portal-step-dot {
    background: #376848;
    color: #ffffff;
}

.client-portal-step.current .client-portal-step-dot {
    background: #8b2432;
    color: #ffffff;
}

.client-portal-step strong,
.client-portal-step span {
    display: block;
}

.client-portal-step span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.client-portal-event {
    padding: 13px;
    border-radius: 13px;
    background: #f7f4ef;
}

.client-portal-event + .client-portal-event {
    margin-top: 10px;
}

.client-portal-event span,
.client-portal-event strong,
.client-portal-event small {
    display: block;
}

.client-portal-event span {
    color: #8b2432;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
}

.client-portal-event strong {
    margin-top: 5px;
}

.client-portal-event small {
    margin-top: 4px;
    color: var(--muted);
}

.client-portal-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.client-portal-section-heading h2 {
    margin: 4px 0 0;
}

.client-portal-section-heading p {
    max-width: 590px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.client-portal-doc-grid {
    display: grid;
    gap: 10px;
}

.client-portal-doc {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
}

.client-portal-doc-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #f1eee9;
    color: #6b625b;
    font-size: 9px;
    font-weight: 900;
}

.client-portal-doc strong,
.client-portal-doc small {
    display: block;
}

.client-portal-doc small {
    margin-top: 4px;
    color: var(--muted);
}

.client-portal-doc-status {
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    background: #edf5ef;
    color: #376848;
    font-size: 9px;
    font-weight: 900;
    line-height: 25px;
    white-space: nowrap;
}

.client-portal-doc-status.requested {
    background: #fff1e5;
    color: #9a5b1e;
}

.client-portal-message-layout {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 12px;
}

.client-portal-message-list,
.client-portal-message-detail {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #ffffff;
}

.client-portal-message-row {
    display: block;
    width: 100%;
    padding: 14px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.client-portal-message-row:last-child {
    border-bottom: 0;
}

.client-portal-message-row:hover,
.client-portal-message-row.selected {
    background: #f7f4ef;
}

.client-portal-message-row.selected {
    box-shadow: inset 3px 0 0 #8b2432;
}

.client-portal-message-row strong,
.client-portal-message-row span,
.client-portal-message-row small {
    display: block;
}

.client-portal-message-row span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.client-portal-message-row small {
    margin-top: 7px;
    color: #8b2432;
    font-size: 9px;
    font-weight: 900;
}

.client-portal-message-detail {
    padding: 18px;
}

.client-portal-message-detail h3 {
    margin: 4px 0 10px;
}

.client-portal-message-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 10px;
}

.client-portal-message-detail p {
    margin: 0;
    color: #5d5651;
    font-size: 13px;
    line-height: 1.6;
}

.client-portal-message-note {
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    background: #fff3f4;
    color: #7a2a36;
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 1120px) {
    .client-portal-shell {
        grid-template-columns: 175px minmax(0, 1fr);
    }

    .client-portal-overview-grid,
    .client-portal-message-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .client-portal-heading,
    .client-portal-greeting {
        flex-direction: column;
        align-items: stretch;
    }

    .client-portal-boundary {
        grid-template-columns: auto 1fr;
    }

    .client-portal-boundary b {
        grid-column: 1 / -1;
    }

    .client-portal-shell {
        display: block;
    }

    .client-portal-side {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .client-portal-profile {
        grid-column: 1 / -1;
    }

    .client-portal-tab {
        justify-content: center;
        padding: 0 7px;
    }

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

@media (max-width: 560px) {
    .client-portal-main {
        padding: 16px;
    }

    .client-portal-framebar {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 14px;
    }

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

    .client-portal-profile {
        display: none;
    }

    .client-portal-doc {
        grid-template-columns: auto 1fr;
    }

    .client-portal-doc-status {
        grid-column: 1 / -1;
        width: fit-content;
    }
}
/* Client Portal visual micro-fix V2 - icon alignment and modern navigation. */

.client-portal-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    overflow: hidden;
}

.client-portal-profile-avatar svg {
    display: block;
    width: 23px;
    height: 23px;
    color: #ffffff;
}

.client-portal-tab {
    grid-template-columns: 28px minmax(0, 1fr);
}

.client-portal-tab-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    color: currentColor;
}

.client-portal-tab-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.client-portal-tab:hover .client-portal-tab-icon,
.client-portal-tab.active .client-portal-tab-icon {
    background: rgba(255, 255, 255, .08);
}

.client-portal-step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    overflow: hidden;
    border: 1px solid rgba(72, 65, 61, .12);
}

.client-portal-step-dot svg {
    display: block;
    width: 16px;
    height: 16px;
}

.client-portal-step.done .client-portal-step-dot,
.client-portal-step.current .client-portal-step-dot {
    border-color: transparent;
}

.client-portal-step:not(.done):not(.current) .client-portal-step-dot {
    background: #ffffff;
    color: #726a64;
    border-color: #d8d1c9;
}
/* Client Portal visual correction V3
   Restore original avatar/timeline content, center it correctly,
   and use a neutral modern selected-navigation style. */

.client-portal-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .02em;
    text-align: center;
}

.client-portal-step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.client-portal-step.done .client-portal-step-dot {
    font-size: 13px;
}

.client-portal-tab:hover {
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
}

.client-portal-tab.active {
    background: #f4f0ea;
    color: #2c2927;
    border: 1px solid #ded7cf;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}

.client-portal-tab.active .client-portal-tab-icon {
    background: #2c2927;
    color: #ffffff;
}

.client-portal-tab.active:hover {
    background: #f4f0ea;
    color: #2c2927;
}

.client-portal-tab.active::before {
    content: none;
}
/* Client Portal exact centering micro-fix V4
   Menu selection is approved and intentionally untouched.
   Reset inherited span margins that were displacing MR/check/numbers. */

.client-portal-profile .client-portal-profile-avatar {
    display: grid !important;
    place-items: center !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    line-height: 44px !important;
    text-align: center !important;
    vertical-align: middle !important;
    transform: none !important;
}

.client-portal-step .client-portal-step-dot {
    display: grid !important;
    place-items: center !important;
    width: 29px !important;
    height: 29px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    line-height: 29px !important;
    text-align: center !important;
    vertical-align: middle !important;
    transform: none !important;
    align-self: start !important;
}

.client-portal-step.done .client-portal-step-dot,
.client-portal-step.current .client-portal-step-dot,
.client-portal-step:not(.done):not(.current) .client-portal-step-dot {
    margin-top: 0 !important;
}
