﻿/* Header */
.projects-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 6px 0 14px 0;
}

.projects-add-btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
}

/* Card list */
.project-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 520px;
}

.project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: background-color .12s ease, transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}

    .project-card:hover {
        background: #f8fafc;
        border-color: #dfe3e8;
        box-shadow: 0 6px 18px rgba(0,0,0,.06);
    }

    .project-card:active {
        transform: translateY(1px);
    }

    .project-card:focus {
        outline: none;
    }

    .project-card:focus-visible {
        box-shadow: 0 0 0 3px rgba(13,110,253,.20);
        border-color: rgba(13,110,253,.35);
    }

/* Text hierarchy */
.pc-left {
    flex: 1;
    min-width: 0;
}

.pc-address {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.pc-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

/* Chevron */
.pc-right {
    flex: 0 0 auto;
}

.pc-chevron {
    font-size: 22px;
    color: #9ca3af;
    transition: transform .12s ease, color .12s ease;
}

.project-card:hover .pc-chevron {
    transform: translateX(2px);
    color: #6b7280;
}

.pc-badge-row {
    margin-top: 10px;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin .7s linear infinite;
    opacity: .85;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Badge */
.z-proj-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid transparent;
    max-width: 100%;
    flex-wrap: nowrap;
}

    .z-proj-badge .badge-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 360px;
    }

    .z-proj-badge.working {
        background: #f6f7ff;
        border-color: #d6dbff;
        color: #243b80;
    }

    .z-proj-badge.done {
        background: #f2fbf5;
        border-color: #ccefd9;
        color: #0f5132;
    }

/* Empty state */
.empty-state {
    border: 1px dashed #d0d7de;
    border-radius: 14px;
    padding: 18px;
    background: #fbfdff;
    max-width: 520px;
}

.empty-title {
    font-weight: 700;
    color: #111827;
}

.empty-sub {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}


.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1020;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-card {
    width: 520px;
    max-width: 100%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    margin-top: 0;
    position: relative; 
    z-index: 1021;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    flex: 0 0 auto;
}

.modal-title {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.modal-x {
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
}

.modal-body {
    padding: 14px 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    touch-action: pan-y;
}

.modal-body-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    touch-action: pan-y;
}

.modal-step {
    font-weight: 600;
    opacity: .6;
    font-size: 13px;
}

.field {
    display: block;
    margin-bottom: 12px;
}

.label {
    font-size: 12px;
    font-weight: 700;
    opacity: .75;
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.15);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}


.modal-actions {
    padding: 14px 16px;
    border-top: 1px solid rgba(0,0,0,.08);
    flex: 0 0 auto;
    background: #fff;
}

/* ===== Mobile: bottom-sheet modal ===== */
@media (max-width: 600px) {
    .modal-backdrop {
        padding: 0;
        align-items: flex-end;
        justify-content: center;
        overflow: hidden;
    }

    .modal-card {
        width: 100%;
        max-width: 100%;
        max-height: 85dvh;
        border-radius: 16px 16px 0 0;
        margin-top: 0;
        margin-bottom: 74px;
    }

    .modal-header {
        padding: 12px 14px;
    }

    .modal-body {
        padding: 12px 14px;
    }

    .modal-actions {
        padding: 12px 14px;
        position: sticky;
        bottom: 0;
        background: #fff;
    }
}
/* iOS/Android safe area support (won't hurt elsewhere) */
.modal-card {
    padding-bottom: env(safe-area-inset-bottom);
}


.btn {
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
}

    .btn.primary {
    }

.project-view {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* ProjectView hides the shared top nav, so keep its first card close to the viewport top. */
.z-content:has(> .project-view) {
    padding-top: var(--s-2);
}

.z-mobile-content:has(> .project-view) {
    padding-top: 6px;
}

/* Only this region scrolls */
.project-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* =========================================================
   Grid / panel layout
   ========================================================= */
.z-project-grid {
    margin: 0;
}

.project-room-workspace {
    --project-room-workspace-offset: 190px;
    --project-room-panel-height: max(360px, calc(100dvh - var(--project-room-workspace-offset)));
}

@media (min-width: 992px) and (max-width: 1100px) {
    .project-room-workspace {
        --project-room-workspace-offset: 230px;
    }
}

@supports not (height: 100dvh) {
    .project-room-workspace {
        --project-room-panel-height: max(360px, calc(100vh - var(--project-room-workspace-offset)));
    }
}

@media (min-width: 992px) {
    .z-project-grid {
        display: grid;
        grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
        gap: var(--s-6);
        align-items: start;
    }

    .z-project-grid.project-room-workspace {
        align-items: stretch;
        min-height: 0;
    }

        .z-project-grid > [class*="col-"] {
            padding: 0 !important;
            width: auto !important;
            max-width: none !important;
        }

    .project-room-column {
        display: flex;
        min-height: 0;
    }

    .project-room-panel {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        height: var(--project-room-panel-height);
        max-height: var(--project-room-panel-height);
        min-height: 360px;
        overflow: hidden;
    }

        .project-room-panel > .room-coach,
        .project-room-panel > .room-info-data {
            flex: 1 1 auto;
            height: 100%;
            min-height: 0;
        }

        .project-room-panel > .room-coach {
            --room-coach-body-max-height: calc(var(--project-room-panel-height) - var(--room-coach-header-height) - 2px);
        }

            .project-room-panel > .room-coach .room-coach-body {
                flex: 1 1 auto;
                max-height: none !important;
                min-height: 0;
                overscroll-behavior: contain;
            }

        .project-room-panel > .room-info-data .room-info-data__panel {
            display: flex;
            flex-direction: column;
            height: 100%;
            min-height: 0;
        }

        .project-room-panel > .room-info-data .room-info-data__header {
            flex: 0 0 auto;
        }

        .project-room-panel > .room-info-data .room-info-data__body {
            flex: 1 1 auto;
            min-height: 0;
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
        }
}

@media (max-width: 991.98px) {
    .z-project-grid > [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

        .z-project-grid > [class*="col-"] + [class*="col-"] {
            margin-top: var(--s-4);
        }
}

.z-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-16);
    box-shadow: var(--shadow-sm);
    padding: var(--s-5);
    min-width: 0;
}

    .z-panel > .room-coach,
    .z-panel > .proposal-card {
        border: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

/* =========================================================
   Project contacts and loan details
   ========================================================= */
.project-contacts-loan-shell {
    margin-bottom: var(--s-5);
}

.project-details-content.project-contacts-loan-shell {
    margin: 0 auto var(--s-6);
    max-width: 1480px;
}

.project-contacts-loan-card {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .09);
    padding: 16px;
    min-width: 0;
}

.project-details-content .project-contacts-loan-card {
    padding: 20px;
}

.project-details-content .project-contacts-loan-card.sb-card {
    background: var(--sb-card-bg);
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    box-shadow: var(--sb-shadow);
    overflow: hidden;
    padding: 0;
}

.pcl-header,
.pcl-panel-head,
.pcl-contact-row,
.pcl-contact-title,
.pcl-contact-meta,
.pcl-actions,
.pcl-row-actions,
.pcl-contact-side {
    display: flex;
    align-items: center;
}

.pcl-header {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(226, 232, 240, .9);
}

.project-contacts-loan-card .pcl-header.sb-gradient-header {
    background: linear-gradient(135deg, var(--sb-blue-start) 0%, var(--sb-blue-end) 100%);
    border-bottom: 0;
    color: #fff;
    margin: 0;
    padding: 14px 16px;
}

.pcl-eyebrow {
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.project-contacts-loan-card .sb-gradient-header .pcl-eyebrow {
    color: rgba(255, 255, 255, .76);
}

.pcl-header h2,
.pcl-panel-head h3 {
    margin: 0;
    color: #0f172a;
}

.pcl-header h2 {
    font-size: 18px;
    font-weight: 850;
    letter-spacing: 0;
}

.pcl-header p,
.pcl-panel-head p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 12px;
}

.project-contacts-loan-card .sb-gradient-header .sb-card-title {
    color: inherit;
    letter-spacing: 0;
}

.project-contacts-loan-card .sb-gradient-header .sb-card-subtitle {
    color: rgba(255, 255, 255, .82);
}

.pcl-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pcl-top-action {
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.pcl-top-action--primary {
    box-shadow: 0 6px 14px rgba(37, 99, 235, .16);
}

.pcl-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
    gap: 14px;
    align-items: start;
}

.project-details-content .pcl-layout {
    gap: 18px;
}

.pcl-panel {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(148, 163, 184, .30);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
    padding: 14px;
    min-width: 0;
}

.project-contacts-loan-card .pcl-panel.sb-card {
    background: var(--sb-card-bg);
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
    overflow: hidden;
    padding: 0;
}

.pcl-panel-head {
    justify-content: space-between;
    margin: -4px -4px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .75);
    padding: 10px 12px;
}

.project-contacts-loan-card .pcl-panel-head.sb-gradient-header {
    background: linear-gradient(135deg, var(--sb-blue-start) 0%, var(--sb-blue-end) 100%);
    border: 0;
    border-radius: calc(var(--sb-radius) - 1px) calc(var(--sb-radius) - 1px) 0 0;
    color: #fff;
    margin: 0;
    padding: 11px 14px;
}

.project-contacts-loan-card > .sb-card-body,
.project-contacts-loan-card .pcl-panel-body.sb-card-body {
    background: var(--sb-card-bg);
    padding: 14px;
}

.pcl-panel-head h3 {
    font-size: 14px;
    font-weight: 800;
}

.pcl-loading,
.pcl-empty,
.pcl-alert {
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
}

.pcl-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}

.pcl-empty {
    border: 1px dashed rgba(148, 163, 184, .55);
    background: #f8fafc;
    color: #64748b;
}

.pcl-alert {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    margin-bottom: 10px;
}

.pcl-contact-groups {
    display: grid;
    gap: 14px;
}

.pcl-contact-group {
    display: grid;
    gap: 8px;
}

.pcl-role-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pcl-role-label span:last-child {
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    padding: 1px 7px;
    font-size: 10px;
    letter-spacing: 0;
}

.pcl-contact-list {
    display: grid;
    gap: 9px;
}

.pcl-contact-row {
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid rgba(203, 213, 225, .85);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.pcl-contact-row:hover {
    border-color: rgba(96, 165, 250, .55);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}

.pcl-contact-main {
    flex: 1 1 auto;
    min-width: 0;
}

.pcl-contact-title {
    gap: 6px;
    flex-wrap: wrap;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.pcl-contact-company {
    margin-top: 3px;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

.pcl-contact-meta {
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
}

.pcl-contact-meta span,
.pcl-contact-meta a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.pcl-contact-meta a {
    color: #2563eb;
    text-decoration: none;
}

.pcl-contact-meta a:hover {
    text-decoration: underline;
}

.pcl-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .45);
    background: #f8fafc;
    color: #475569;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
}

.pcl-badge--primary {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.pcl-contact-side {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.pcl-row-actions {
    flex: 0 0 auto;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pcl-row-action {
    border: 1px solid rgba(203, 213, 225, .95);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 8px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.pcl-row-action:hover,
.pcl-row-action:focus-visible {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.pcl-row-action--danger {
    color: #991b1b;
}

.pcl-row-action--danger:hover,
.pcl-row-action--danger:focus-visible {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}

.pcl-row-action:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.project-contacts-loan-card .pcl-top-action.sb-action-btn,
.project-contacts-loan-card .pcl-row-action.sb-action-btn {
    align-items: center;
    border-radius: var(--sb-radius);
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 30px;
    text-decoration: none;
}

.project-contacts-loan-card .pcl-top-action.sb-action-btn {
    padding: 6px 10px;
}

.project-contacts-loan-card .pcl-row-action.sb-action-btn {
    padding: 6px 8px;
}

.project-contacts-loan-card .pcl-top-action.sb-action-btn:not(.sb-action-btn-secondary),
.project-contacts-loan-card .pcl-row-action.sb-action-btn:not(.sb-action-btn-secondary):not(.sb-action-btn-danger) {
    background: var(--sb-navy);
    border-color: var(--sb-navy);
    color: #fff;
}

.project-contacts-loan-card .pcl-top-action.sb-action-btn-secondary,
.project-contacts-loan-card .pcl-row-action.sb-action-btn-secondary {
    background: #fff;
    border-color: rgba(30, 58, 138, .35);
    color: var(--sb-navy);
}

.project-contacts-loan-card .pcl-top-action.sb-action-btn-secondary:hover,
.project-contacts-loan-card .pcl-top-action.sb-action-btn-secondary:focus-visible,
.project-contacts-loan-card .pcl-row-action.sb-action-btn-secondary:hover,
.project-contacts-loan-card .pcl-row-action.sb-action-btn-secondary:focus-visible {
    background: #eff6ff;
    border-color: rgba(14, 165, 233, .72);
    color: var(--sb-navy);
}

.project-contacts-loan-card .pcl-row-action.sb-action-btn-danger {
    background: #fff;
    border-color: rgba(185, 28, 28, .35);
    color: #991b1b;
}

.project-contacts-loan-card .pcl-row-action.sb-action-btn-danger:hover,
.project-contacts-loan-card .pcl-row-action.sb-action-btn-danger:focus-visible {
    background: #fef2f2;
    border-color: rgba(185, 28, 28, .55);
    color: #7f1d1d;
}

.pcl-loan-sections {
    display: grid;
    gap: 10px;
}

.pcl-loan-section {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 13px;
    background: #fbfdff;
    padding: 10px;
}

.pcl-loan-section h4 {
    margin: 0 0 8px;
    color: #334155;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pcl-loan-section--stack {
    display: grid;
    gap: 8px;
}

.pcl-loan-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.pcl-loan-summary > div,
.pcl-loan-address,
.pcl-loan-notes {
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, .82);
    background: #fff;
    padding: 8px 9px;
}

.project-contacts-loan-card .pcl-loan-summary > .sb-summary-tile,
.project-contacts-loan-card .pcl-loan-address.sb-summary-tile,
.project-contacts-loan-card .pcl-loan-notes.sb-summary-tile {
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
    padding: 9px 10px;
}

.pcl-loan-summary span,
.pcl-loan-address span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.pcl-loan-summary strong,
.pcl-loan-address strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.pcl-value-muted {
    color: #94a3b8 !important;
    font-weight: 700 !important;
}

.pcl-loan-address,
.pcl-loan-notes {
    margin-top: 0;
}

.pcl-loan-notes {
    margin-top: 10px;
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
}

.pcl-modal-card {
    width: 720px;
}

.pcl-modal-card--wide {
    width: 840px;
}

.pcl-form-section {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 14px;
    background: #f8fafc;
    padding: 12px;
    margin-bottom: 12px;
}

.pcl-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pcl-form-grid .field,
.pcl-form-section .field {
    margin-bottom: 0;
}

.pcl-textarea {
    resize: vertical;
    min-height: 72px;
}

.pcl-check-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.pcl-lookup {
    display: grid;
    gap: 10px;
}

.pcl-lookup-head,
.pcl-lookup-search,
.pcl-lookup-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pcl-lookup-head {
    justify-content: space-between;
}

.pcl-lookup-head strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
}

.pcl-lookup-head span,
.pcl-lookup-message {
    color: #64748b;
    font-size: 12px;
}

.pcl-lookup-search .input {
    flex: 1;
}

.pcl-lookup-results {
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 8px;
    max-height: 220px;
    overflow: auto;
}

.pcl-lookup-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    background: #fff;
    padding: 8px 10px;
    color: #475569;
    font-size: 12px;
    text-align: left;
}

.pcl-lookup-row:last-child {
    border-bottom: 0;
}

.pcl-lookup-row:hover,
.pcl-lookup-row:focus-visible {
    background: #eff6ff;
}

.pcl-lookup-row span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.pcl-lookup-name {
    color: #0f172a;
    font-weight: 700;
}

.pcl-lookup-message--error {
    color: #991b1b;
}

@media (max-width: 991.98px) {
    .pcl-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .pcl-header,
    .pcl-contact-row {
        align-items: stretch;
        flex-direction: column;
    }

    .pcl-actions,
    .pcl-row-actions {
        justify-content: flex-start;
    }

    .pcl-contact-side {
        align-items: flex-start;
        width: 100%;
    }

    .pcl-loan-summary,
    .pcl-form-grid {
        grid-template-columns: 1fr;
    }

    .pcl-lookup-head,
    .pcl-lookup-search,
    .pcl-lookup-row {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   Project top bar
   ========================================================= */
.project-topbar {
    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 6px auto 0 auto;
    overflow: visible; /* prevent nav clipping */
    flex: 0 0 auto;
    z-index: 100;
    width: 100%;
}

.pt-left {
    min-width: 0;
    justify-self: start;
}

.pt-center {
    justify-self: center;
    display: flex;
    align-items: center;
    min-width: 0;
}

.pt-right {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.pt-title {
    font-weight: 900;
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-sub {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 650;
    color: rgba(0, 0, 0, .55);
}

.pt-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.06);
    border: 1px solid rgba(2, 6, 23, 0.08);
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .pt-actions::-webkit-scrollbar {
        display: none;
    }

.pt-btn {
    border: 0;
    background: transparent;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    color: rgba(15, 23, 42, 0.70);
    transition: background 140ms ease, color 140ms ease, transform 120ms ease, box-shadow 140ms ease;
    flex: 0 0 auto;
    white-space: nowrap;
}

    .pt-btn:hover {
        background: rgba(255, 255, 255, .65);
        color: rgba(15, 23, 42, 0.90);
    }

    .pt-btn.is-active {
        background: #fff;
        color: rgba(15, 23, 42, 0.95);
        font-weight: 900;
        box-shadow: 0 1px 2px rgba(2, 6, 23, 0.14);
    }

.pt-total {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .03);
    border: 1px solid rgba(0, 0, 0, .08);
}

.pt-total__label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, .55);
}

.pt-total__value {
    font-size: 16px;
    font-weight: 900;
    color: rgba(0, 0, 0, .92);
    font-variant-numeric: tabular-nums;
}

/* Optional short label support for long tabs */
.pt-label-short {
    display: none;
}

/* =========================================================
   Room selector breadcrumb
   ========================================================= */
.project-breadcrumb {
    padding: 10px 22px 8px;
    background: transparent;
}

.breadcrumb-room {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(100%, 560px);
    min-height: 72px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #eef6ff 100%);
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 80ms ease;
}

    .breadcrumb-room:hover {
        background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 50%, #e7f1ff 100%);
        border-color: rgba(37, 99, 235, .34);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .11);
    }

    .breadcrumb-room:active {
        transform: translateY(1px);
    }

    .breadcrumb-room:focus-visible {
        outline: 3px solid rgba(37, 99, 235, .22);
        outline-offset: 3px;
    }

.breadcrumb-room--empty {
    border-style: dashed;
}

.breadcrumb-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(37, 99, 235, .14), rgba(14, 165, 233, .12));
    border: 1px solid rgba(37, 99, 235, .18);
}

.breadcrumb-icon {
    color: currentColor;
    font-size: 18px;
}

.breadcrumb-room-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    gap: 2px;
}

.breadcrumb-label {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.1;
    text-transform: uppercase;
    color: #64748b;
}

.breadcrumb-room-main {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.breadcrumb-room-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.18;
    color: #0f172a;
    letter-spacing: .01em;
}

.breadcrumb-helper {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 13px;
    line-height: 1.25;
}

.breadcrumb-chevron-wrap {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(148, 163, 184, .35);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.breadcrumb-chevron {
    color: #475569;
    font-size: 12px;
}

.breadcrumb-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, .18);
    background: rgba(219, 234, 254, .72);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

/* =========================================================
   Rooms panel
   ========================================================= */
.rooms-panel {
    margin: 8px 22px 0 22px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
}

.rooms-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, .20);
}

.rooms-panel-title {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #334155;
}

.rooms-panel-helper {
    margin-top: 2px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.3;
}

.rooms-panel-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef6ff;
    border: 1px solid rgba(37, 99, 235, .18);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 850;
}

.rooms-list,
.rooms-list--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rooms-item {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, .28);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 760;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
    transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

    .rooms-item:hover {
        background: #f8fafc;
        border-color: rgba(37, 99, 235, .25);
        box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
    }

    .rooms-item:active {
        transform: translateY(1px);
    }

    .rooms-item:focus-visible {
        outline: 3px solid rgba(37, 99, 235, .20);
        outline-offset: 2px;
    }

.rooms-item--active {
    background: linear-gradient(135deg, rgba(219, 234, 254, .95), rgba(239, 246, 255, .95));
    border-color: rgba(37, 99, 235, .42);
    color: #1e3a8a;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
}

.rooms-item--add {
    background: #f8fafc;
    border-style: dashed;
    color: #1d4ed8;
    font-weight: 850;
}

    .rooms-item--add:hover {
        background: #eff6ff;
        color: #1e40af;
    }

.rooms-item-name {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rooms-item-badge {
    font-size: 13px;
    color: #1d4ed8;
}

.rooms-item-active-icon {
    font-size: 12px;
    color: #16a34a;
}

.rooms-empty {
    padding: 14px 4px 4px;
    font-size: 13px;
    color: #64748b;
}

/* =========================================================
   Loading
   ========================================================= */
.project-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.project-loading__spinner {
    color: var(--bs-primary, #0d6efd);
    margin-bottom: 1.5rem;
}

    .project-loading__spinner i {
        opacity: 0.8;
    }

.project-loading__text {
    font-size: 1.125rem;
    color: var(--bs-secondary, #6c757d);
    font-weight: 500;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 991.98px) {
    .project-topbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 14px;
    }

    .pt-center,
    .pt-right {
        justify-self: start;
    }

    .pt-total {
        min-width: 0;
        width: 100%;
    }

    .project-breadcrumb {
        padding: 10px 14px;
    }

    .rooms-panel {
        margin: 8px 14px 0 14px;
    }

    .pt-label-full {
        display: none;
    }

    .pt-label-short {
        display: inline;
    }
}

@media (max-width: 768px) {
    .project-view.is-home-with-room-chip .pt-right {
        display: none;
    }

    .breadcrumb-room {
        width: 100%;
        padding: 10px 14px;
        font-size: 15px;
    }

    .breadcrumb-room-name {
        font-size: 18px;
    }

    .breadcrumb-room-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .breadcrumb-count {
        max-width: 100%;
    }

    .breadcrumb-helper {
        white-space: normal;
    }

    .breadcrumb-icon {
        font-size: 18px;
    }

    .rooms-panel-header {
        flex-direction: column;
        gap: 8px;
    }

    .rooms-panel-count {
        align-self: flex-start;
    }

    .rooms-item-name {
        max-width: min(62vw, 240px);
    }
}

@media (max-width: 520px) {
    .breadcrumb-room {
        gap: 9px;
        padding: 10px 11px;
    }

    .breadcrumb-icon-wrap {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .breadcrumb-chevron-wrap {
        width: 30px;
        height: 30px;
    }

    .breadcrumb-room-name {
        font-size: 17px;
    }

    .breadcrumb-label,
    .breadcrumb-helper,
    .breadcrumb-count {
        font-size: 11px;
    }

    .rooms-panel {
        padding: 12px;
    }

    .rooms-list,
    .rooms-list--inline {
        gap: 7px;
    }

    .rooms-item {
        width: 100%;
        justify-content: flex-start;
    }

    .rooms-item-name {
        max-width: none;
    }
}

/* =========================================================
   Topbar nav clipping fix (append near end of file)
   ========================================================= */

.project-topbar {
    overflow: visible; /* prevent segmented control clipping */
}

.pt-center {
    min-width: 0;
}

.pt-actions {
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .pt-actions::-webkit-scrollbar {
        display: none;
    }

.pt-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* optional short/long label swap for narrow widths */
.pt-label-short {
    display: none;
}

@media (max-width: 1024px) {
    .project-topbar {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 12px;
    }

    .pt-right {
        justify-self: start;
    }

    .pt-total {
        width: 100%;
    }

    .pt-label-full {
        display: none;
    }

    .pt-label-short {
        display: inline;
    }
}

/* =========================================================
   FINAL OVERRIDES: topbar nav must never clip
   (keep this at the very end of the file)
   ========================================================= */

.project-view .project-topbar {
    box-sizing: border-box;
    overflow: visible !important;
}

    .project-view .project-topbar .pt-center {
        min-width: 0;
        width: 100%;
    }

    .project-view .project-topbar .pt-actions {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 6px;
        padding: 6px;
    }

        .project-view .project-topbar .pt-actions::-webkit-scrollbar {
            display: none;
        }

    .project-view .project-topbar .pt-btn {
        flex: 0 0 auto !important;
        min-width: max-content;
        white-space: nowrap;
    }

/* Collapse topbar layout sooner so tabs get full row */
@media (max-width: 1100px) {
    .project-view .project-topbar {
        grid-template-columns: 1fr !important;
        gap: 8px;
        padding: 10px 12px;
    }

        .project-view .project-topbar .pt-left,
        .project-view .project-topbar .pt-center,
        .project-view .project-topbar .pt-right {
            justify-self: stretch !important;
        }

        .project-view .project-topbar .pt-right {
            justify-content: flex-start !important;
        }

        .project-view .project-topbar .pt-total {
            width: 100%;
        }

        .project-view .project-topbar .pt-label-full {
            display: none;
        }

        .project-view .project-topbar .pt-label-short {
            display: inline;
        }
}

/* Extra-tight phones */
@media (max-width: 420px) {
    .project-view .project-topbar .pt-btn {
        font-size: 12px;
        padding: 7px 10px;
    }
}


/* =========================================================
   ProjectView mobile/collapsible header (single source of truth)
   ========================================================= */

.project-view--mobile-header {
    --pv-sticky-offset: 0px;
    --pv-tab-h: 36px;
    --pv-tab-gap: 6px;
    --pv-expand-size: 36px;
    --pv-expand-gap: 6px;
}

    /* Desktop/tablet baseline: always hide expand/collapse controls */
    .project-view--mobile-header .pt-nav-expand,
    .project-view--mobile-header .pt-header-toggle {
        display: none;
    }

/* Mobile only */
@media (max-width: 768px) {
    .project-view--mobile-header .project-topbar {
        position: sticky;
        top: var(--pv-sticky-offset);
        z-index: 230;
        transition: padding 140ms ease, gap 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
    }

    /* ---------- Expanded ---------- */
    .project-view--mobile-header.project-view--header-expanded .project-topbar {
        border: 1px solid rgba(0, 0, 0, 0.10);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
        margin-top: 4px;
        padding: 9px 10px;
        gap: 8px;
        grid-template-columns: 1fr;
    }

    .project-view--mobile-header.project-view--header-expanded .pt-left,
    .project-view--mobile-header.project-view--header-expanded .pt-center,
    .project-view--mobile-header.project-view--header-expanded .pt-right {
        justify-self: stretch;
    }

    .project-view--mobile-header.project-view--header-expanded .pt-right {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .project-view--mobile-header.project-view--header-expanded .pt-center-inner {
        width: 100%;
        display: block;
    }

    .project-view--mobile-header.project-view--header-expanded .pt-actions {
        width: 100%;
        display: flex;
        align-items: center;
        gap: var(--pv-tab-gap);
        padding: 6px;
        border-radius: 999px;
        background: rgba(2, 6, 23, 0.06);
        border: 1px solid rgba(2, 6, 23, 0.08);
        box-shadow: none;
        overflow: visible;
        white-space: normal;
    }

    .project-view--mobile-header.project-view--header-expanded .pt-btn {
        min-height: var(--pv-tab-h);
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 750;
        flex: 0 0 auto;
    }

    .project-view--mobile-header.project-view--header-expanded .pt-header-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: var(--pv-tab-h);
        height: var(--pv-tab-h);
        padding: 0 10px;
        border: 0;
        background: transparent;
        color: rgba(15, 23, 42, 0.90);
        border-radius: 999px;
        line-height: 1;
        box-shadow: none;
        flex: 0 0 auto;
    }

        .project-view--mobile-header.project-view--header-expanded .pt-header-toggle i {
            font-size: 14px;
        }

    .project-view--mobile-header.project-view--header-expanded .pt-nav-expand {
        display: none !important;
    }

    /* ---------- Collapsed ---------- */
    .project-view--mobile-header.project-view--header-collapsed .project-topbar {
        margin-top: 0;
        padding: 4px 0;
        gap: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        display: block;
    }

    .project-view--mobile-header.project-view--header-collapsed .pt-left,
    .project-view--mobile-header.project-view--header-collapsed .pt-right {
        display: none !important;
    }

    .project-view--mobile-header.project-view--header-collapsed .pt-center {
        width: 100%;
        min-width: 0;
        display: block;
    }

    .project-view--mobile-header.project-view--header-collapsed .pt-center-inner {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: stretch;
        column-gap: 0;
        border-radius: 999px;
        background: rgba(2, 6, 23, 0.06);
        border: 1px solid rgba(2, 6, 23, 0.08);
        box-shadow: none;
        overflow: hidden;
    }

    .project-view--mobile-header.project-view--header-collapsed .pt-actions {
        min-width: 0;
        width: 100%;
        display: flex !important;
        align-items: center;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: var(--pv-tab-gap);
        padding: 6px;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

        .project-view--mobile-header.project-view--header-collapsed .pt-actions::-webkit-scrollbar {
            display: none;
        }

    .project-view--mobile-header.project-view--header-collapsed .pt-btn {
        min-height: var(--pv-tab-h);
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 750;
        color: rgba(15, 23, 42, 0.70);
        background: transparent;
        border-radius: 999px;
        box-shadow: none;
        flex: 0 0 auto;
    }

        .project-view--mobile-header.project-view--header-collapsed .pt-btn.is-active {
            background: #fff;
            color: rgba(15, 23, 42, 0.95);
            font-weight: 900;
            box-shadow: 0 1px 2px rgba(2, 6, 23, 0.14);
        }

    .project-view--mobile-header.project-view--header-collapsed .pt-nav-expand {
        display: none !important;
    }

        .project-view--mobile-header.project-view--header-collapsed .pt-nav-expand.is-visible {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 100%;
            padding: 0;
            border: 0;
            border-left: 1px solid rgba(2, 6, 23, 0.08);
            background: transparent;
            color: rgba(15, 23, 42, 0.95);
            border-radius: 0;
            line-height: 1;
            box-shadow: none;
        }

            .project-view--mobile-header.project-view--header-collapsed .pt-nav-expand.is-visible i {
                font-size: 14px;
            }

    .project-view--mobile-header.project-view--header-collapsed .pt-header-toggle {
        display: none !important;
    }
}

/* Explicitly hide controls above mobile */
@media (min-width: 769px) {
    .project-view--mobile-header .pt-nav-expand,
    .project-view--mobile-header .pt-header-toggle {
        display: none !important;
    }
}

/* =========================================================
   ScopeBuilder Theme Polish: Homeowner Home + Room Selector
   Scoped to ProjectView's homeowner-facing home workspace.
   ========================================================= */

.project-view .project-breadcrumb {
    padding: 10px 22px 10px;
}

.project-view .breadcrumb-room.sb-card {
    width: min(100%, 620px);
    min-height: 68px;
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    background:
        linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, rgba(14, 165, 233, 0.08) 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .075);
}

.project-view .breadcrumb-room.sb-card:hover {
    border-color: rgba(14, 165, 233, .42);
    background:
        linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, rgba(14, 165, 233, 0.12) 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}

.project-view .breadcrumb-label {
    color: var(--sb-muted);
}

.project-view .breadcrumb-room-name {
    color: var(--sb-text);
    font-size: 19px;
    letter-spacing: 0;
}

.project-view .breadcrumb-count.sb-summary-tile,
.project-view .rooms-panel-count.sb-summary-tile {
    border-color: rgba(14, 165, 233, .26);
    border-radius: var(--sb-inner-radius);
    background: #eff6ff;
    color: var(--sb-navy);
    box-shadow: none;
    padding: 5px 9px;
}

.project-view .breadcrumb-icon-wrap,
.project-view .breadcrumb-chevron-wrap {
    border-radius: var(--sb-inner-radius);
}

.project-view .breadcrumb-chevron-wrap {
    background: #ffffff;
    color: var(--sb-navy);
}

.project-view .rooms-panel.sb-card {
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    background: var(--sb-card-bg);
    box-shadow: var(--sb-shadow);
}

.project-view .rooms-panel-header.sb-card-header {
    border-bottom-color: var(--sb-card-border);
    margin: -2px -2px 12px;
    padding: 8px 8px 12px;
}

.project-view .rooms-item {
    border-radius: var(--sb-inner-radius);
}

.project-view .rooms-item--active {
    border-color: rgba(14, 165, 233, .44);
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    color: var(--sb-navy);
    box-shadow: 0 8px 18px rgba(14, 165, 233, .10);
}

.project-view .project-home-dashboard.sb-section-shell {
    margin: 0 22px 16px;
    padding: 14px;
    border-radius: var(--sb-radius);
    background: var(--sb-page-bg);
    gap: 16px;
}

.project-view .project-room-panel.sb-card {
    border-color: transparent;
    border-radius: var(--sb-radius);
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.project-view .project-room-panel.sb-card > .room-coach,
.project-view .project-room-panel.sb-card > .room-info-data {
    margin-top: 0;
}

@media (max-width: 991.98px) {
    .project-view .project-home-dashboard.sb-section-shell {
        margin: 0 14px 14px;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .project-view .project-breadcrumb {
        padding: 10px 14px;
    }

    .project-view .breadcrumb-room.sb-card {
        min-height: 64px;
    }
}

/* =========================================================
   ScopeBuilder Theme Refinement: Switch Room Picker
   Keeps room selection/create behavior classes intact.
   ========================================================= */

.project-view .rooms-panel.sb-card {
    padding: 0;
    overflow: hidden;
}

.project-view .rooms-panel-header.sb-card-header {
    align-items: center;
    margin: 0;
    padding: 13px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.project-view .rooms-panel-title {
    color: var(--sb-text);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
}

.project-view .rooms-panel-helper {
    color: var(--sb-muted);
    font-size: 12px;
}

.project-view .rooms-list,
.project-view .rooms-list--inline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 10px;
    padding: 14px;
}

.project-view .rooms-item.sb-card {
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 54px;
    border-color: var(--sb-card-border);
    border-radius: var(--sb-radius);
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .045);
    color: var(--sb-text);
    padding: 10px 12px;
    white-space: normal;
}

.project-view .rooms-item.sb-card:hover {
    border-color: rgba(14, 165, 233, .34);
    background: #f8fbff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .075);
}

.project-view .rooms-item.sb-card.rooms-item--active {
    border-color: rgba(14, 165, 233, .52);
    background: linear-gradient(90deg, rgba(14, 165, 233, .12), #ffffff 42%);
    box-shadow: inset 4px 0 0 var(--sb-blue-start), 0 10px 24px rgba(14, 165, 233, .12);
}

.project-view .rooms-item.sb-card.rooms-item--add {
    border-style: dashed;
    background: #f8fbff;
    color: var(--sb-navy);
    font-weight: 850;
}

.project-view .rooms-item.sb-card.rooms-item--add:hover {
    background: #eff6ff;
}

.project-view .rooms-item-name {
    color: inherit;
    font-weight: 850;
}

.project-view .rooms-item-badge {
    color: #075985;
}

.project-view .rooms-item-active-icon {
    color: var(--sb-blue-start);
}

@media (max-width: 520px) {
    .project-view .rooms-list,
    .project-view .rooms-list--inline {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}

/* =========================================================
   ScopeBuilder Theme Polish: Project Header + Room Selector
   Scoped to ProjectView top navigation and room picker only.
   ========================================================= */

.project-view .project-topbar.project-topbar-shell.sb-card {
    margin: 10px 14px 0;
    padding: 12px 14px;
    grid-template-columns: minmax(220px, 1fr) minmax(0, auto) minmax(180px, .75fr);
    gap: 14px;
    border-color: rgba(14, 165, 233, .18);
    border-radius: var(--sb-radius);
    background:
        radial-gradient(circle at 0% 0%, rgba(14, 165, 233, .13), transparent 18rem),
        radial-gradient(circle at 100% 0%, rgba(30, 58, 138, .10), transparent 16rem),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--sb-shadow);
}

.project-view .project-topbar .pt-left {
    display: grid;
    min-height: 54px;
    align-content: center;
    padding: 10px 12px;
    border: 1px solid rgba(14, 165, 233, .16);
    border-radius: var(--sb-inner-radius);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.project-view .project-topbar .pt-title {
    color: var(--sb-text);
    font-size: clamp(.98rem, 1.25vw, 1.12rem);
    font-weight: 950;
    letter-spacing: -.015em;
}

.project-view .project-topbar .pt-sub {
    color: var(--sb-muted);
    font-size: 12px;
    font-weight: 750;
}

.project-view .project-topbar .pt-center-inner {
    max-width: 100%;
}

.project-view .project-topbar .pt-actions {
    border-color: rgba(14, 165, 233, .20);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(239, 246, 255, .92), rgba(224, 242, 254, .72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), 0 8px 20px rgba(15, 23, 42, .045);
}

.project-view .project-topbar .pt-btn {
    min-height: 34px;
    padding: 8px 13px;
    color: #334155;
    font-weight: 800;
}

.project-view .project-topbar .pt-btn:hover {
    background: rgba(255, 255, 255, .82);
    color: var(--sb-navy);
}

.project-view .project-topbar .pt-btn:focus-visible {
    outline: 3px solid rgba(14, 165, 233, .18);
    outline-offset: 2px;
}

.project-view .project-topbar .pt-btn.is-active {
    background: #ffffff;
    color: var(--sb-navy);
    box-shadow: 0 8px 18px rgba(30, 58, 138, .13), inset 0 -2px 0 var(--sb-blue-start);
}

.project-view .project-topbar .pt-right {
    gap: 8px;
}

.project-view .project-topbar .pt-total.sb-summary-tile {
    min-height: 54px;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border-color: rgba(14, 165, 233, .24);
    border-radius: var(--sb-inner-radius);
    background:
        linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    color: var(--sb-navy);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.project-view .project-topbar .pt-total__label {
    color: #475569;
    font-size: 10px;
    font-weight: 900;
}

.project-view .project-topbar .pt-total__value {
    color: var(--sb-navy);
    font-size: clamp(1rem, 1.3vw, 1.22rem);
    font-weight: 950;
}

.project-view .project-topbar .pt-header-toggle,
.project-view .project-topbar .pt-nav-expand {
    border: 1px solid rgba(14, 165, 233, .22);
    background: #ffffff;
    color: var(--sb-navy);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
}

.project-view .project-breadcrumb {
    padding: 12px 22px 10px;
}

.project-view .breadcrumb-room.sb-card {
    position: relative;
    width: min(100%, 660px);
    min-height: 72px;
    padding: 13px 14px;
    border-color: rgba(14, 165, 233, .22);
    border-radius: var(--sb-radius);
    background:
        linear-gradient(135deg, #ffffff 0%, #f8fbff 56%, rgba(14, 165, 233, .11) 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.project-view .breadcrumb-room.sb-card::before {
    content: "";
    position: absolute;
    inset: 12px auto 12px 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg, var(--sb-blue-start), var(--sb-blue-end));
}

.project-view .breadcrumb-room.sb-card:hover {
    border-color: rgba(14, 165, 233, .46);
    background:
        linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, rgba(14, 165, 233, .16) 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .105);
}

.project-view .breadcrumb-icon-wrap {
    width: 46px;
    height: 46px;
    border-color: rgba(14, 165, 233, .24);
    background: linear-gradient(135deg, rgba(14, 165, 233, .16), rgba(30, 58, 138, .10));
    color: var(--sb-navy);
}

.project-view .breadcrumb-label {
    color: #475569;
}

.project-view .breadcrumb-room-name {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 950;
}

.project-view .breadcrumb-helper {
    color: var(--sb-muted);
    font-weight: 650;
}

.project-view .breadcrumb-count.sb-summary-tile,
.project-view .rooms-panel-count.sb-summary-tile {
    min-height: 28px;
    border-color: rgba(14, 165, 233, .24);
    background: #eff6ff;
    color: var(--sb-navy);
    font-size: 11px;
    font-weight: 850;
}

.project-view .breadcrumb-chevron-wrap {
    width: 36px;
    height: 36px;
    border-color: rgba(14, 165, 233, .20);
    background: #ffffff;
    color: var(--sb-navy);
}

.project-view .rooms-panel.sb-card {
    margin: 6px 22px 0;
    border-color: rgba(14, 165, 233, .20);
    border-radius: var(--sb-radius);
    background:
        radial-gradient(circle at 0% 0%, rgba(14, 165, 233, .08), transparent 18rem),
        var(--sb-card-bg);
    box-shadow: var(--sb-shadow);
}

.project-view .rooms-panel-header.sb-card-header {
    padding: 15px 16px;
    border-bottom-color: var(--sb-card-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.project-view .rooms-panel-title {
    color: var(--sb-text);
    font-size: 13px;
    letter-spacing: .07em;
}

.project-view .rooms-panel-helper {
    margin-top: 4px;
    color: var(--sb-muted);
    font-size: 12px;
    font-weight: 650;
}

.project-view .rooms-list,
.project-view .rooms-list--inline {
    grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
    gap: 11px;
    padding: 15px;
}

.project-view .rooms-item.sb-card {
    min-height: 58px;
    border-color: rgba(15, 23, 42, .09);
    border-radius: var(--sb-inner-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .045);
}

.project-view .rooms-item.sb-card:hover {
    border-color: rgba(14, 165, 233, .38);
    background: #f8fbff;
    transform: translateY(-1px);
}

.project-view .rooms-item.sb-card.rooms-item--active {
    border-color: rgba(14, 165, 233, .58);
    background:
        linear-gradient(90deg, rgba(14, 165, 233, .15), #ffffff 46%);
    box-shadow: inset 4px 0 0 var(--sb-blue-start), 0 12px 24px rgba(14, 165, 233, .13);
}

.project-view .rooms-item.sb-card.rooms-item--add {
    border-color: rgba(14, 165, 233, .28);
    background: #f8fbff;
}

.project-view .rooms-item.sb-card.rooms-item--add i {
    color: var(--sb-blue-start);
}

.project-view .rooms-item-active-icon {
    margin-left: auto;
    color: var(--sb-blue-start);
}

@media (max-width: 1100px) {
    .project-view .project-topbar.project-topbar-shell.sb-card {
        grid-template-columns: 1fr !important;
        gap: 10px;
        padding: 12px;
    }

    .project-view .project-topbar .pt-left,
    .project-view .project-topbar .pt-center,
    .project-view .project-topbar .pt-right {
        justify-self: stretch !important;
    }

    .project-view .project-topbar .pt-left {
        min-height: 0;
    }

    .project-view .project-topbar .pt-total.sb-summary-tile {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .project-view--mobile-header.project-view--header-expanded .project-topbar.project-topbar-shell.sb-card {
        border-color: rgba(14, 165, 233, .18);
        border-radius: var(--sb-inner-radius);
        background:
            radial-gradient(circle at 0% 0%, rgba(14, 165, 233, .10), transparent 13rem),
            linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    }

    .project-view--mobile-header.project-view--header-expanded .pt-actions,
    .project-view--mobile-header.project-view--header-collapsed .pt-center-inner {
        border-color: rgba(14, 165, 233, .20);
        background: linear-gradient(180deg, rgba(239, 246, 255, .92), rgba(224, 242, 254, .72));
    }

    .project-view--mobile-header.project-view--header-collapsed .pt-btn.is-active {
        color: var(--sb-navy);
        box-shadow: 0 8px 18px rgba(30, 58, 138, .13), inset 0 -2px 0 var(--sb-blue-start);
    }

    .project-view .project-breadcrumb {
        padding: 10px 14px;
    }

    .project-view .breadcrumb-room.sb-card {
        min-height: 66px;
    }

    .project-view .rooms-panel.sb-card {
        margin: 6px 14px 0;
    }
}

@media (max-width: 520px) {
    .project-view .project-topbar .pt-title,
    .project-view .project-topbar .pt-sub {
        white-space: normal;
    }

    .project-view .breadcrumb-room.sb-card {
        align-items: flex-start;
        gap: 10px;
    }

    .project-view .breadcrumb-room-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-view .breadcrumb-helper {
        white-space: normal;
    }

    .project-view .rooms-list,
    .project-view .rooms-list--inline {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}

/* =========================================================
   ScopeBuilder Theme Polish: Expanded Room Selector Details
   Differentiates create-room action and tightens room tiles.
   ========================================================= */

.project-view .rooms-panel-header.sb-card-header {
    position: relative;
    align-items: center;
    padding: 14px 16px 13px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 68%, #eef7ff 100%);
}

.project-view .rooms-panel-header.sb-card-header::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: 0;
    left: 16px;
    height: 1px;
    background: linear-gradient(90deg, rgba(14, 165, 233, .34), rgba(30, 58, 138, .12), transparent);
}

.project-view .rooms-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--sb-navy);
    font-size: 12px;
    font-weight: 950;
}

.project-view .rooms-panel-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--sb-blue-start);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, .14);
}

.project-view .rooms-panel-helper {
    margin-top: 5px;
    max-width: 560px;
    line-height: 1.35;
}

.project-view .rooms-panel-count.sb-summary-tile {
    min-height: 30px;
    padding: 5px 10px;
    border-color: rgba(14, 165, 233, .30);
    background: #ffffff;
}

.project-view .rooms-list,
.project-view .rooms-list--inline {
    grid-template-columns: repeat(auto-fill, minmax(174px, 1fr));
    gap: 9px;
    padding: 13px;
}

.project-view .rooms-item.sb-card {
    min-height: 50px;
    padding: 8px 10px;
    gap: 7px;
    border-radius: var(--sb-inner-radius);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
}

.project-view .rooms-item-name {
    font-size: 12px;
    line-height: 1.2;
}

.project-view .rooms-item-badge,
.project-view .rooms-item-active-icon {
    font-size: 11px;
}

.project-view .rooms-item.sb-card.rooms-item--add {
    position: relative;
    min-height: 50px;
    border: 1px dashed rgba(14, 165, 233, .52);
    background:
        linear-gradient(135deg, rgba(14, 165, 233, .12), rgba(255, 255, 255, .96) 54%),
        #f0f9ff;
    color: var(--sb-navy);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .68), 0 6px 16px rgba(14, 165, 233, .08);
}

.project-view .rooms-item.sb-card.rooms-item--add::before {
    content: "";
    position: absolute;
    inset: 9px auto 9px 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: var(--sb-blue-start);
}

.project-view .rooms-item.sb-card.rooms-item--add i {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--sb-navy);
    color: #ffffff;
    font-size: 11px;
    box-shadow: 0 6px 12px rgba(16, 42, 92, .18);
}

.project-view .rooms-item.sb-card.rooms-item--add span {
    font-weight: 900;
}

.project-view .rooms-item.sb-card.rooms-item--add:hover {
    border-color: rgba(14, 165, 233, .70);
    background:
        linear-gradient(135deg, rgba(14, 165, 233, .16), rgba(255, 255, 255, .98) 54%),
        #eff6ff;
}

@media (max-width: 520px) {
    .project-view .rooms-panel-header.sb-card-header {
        align-items: flex-start;
        padding: 13px 14px 12px;
    }

    .project-view .rooms-list,
    .project-view .rooms-list--inline {
        gap: 8px;
        padding: 12px;
    }
}
