﻿
/* 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: 999;
    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;
}

.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; /* IMPORTANT: prevents body/page scrolling */
}

/* Make it always visible by NOT being inside the scroll container */
.project-topbar {
    flex: 0 0 auto;
    position: relative; /* or static */
    z-index: 100;
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* The only thing that scrolls */
.project-scroll {
    flex: 1 1 auto;
    min-height: 0; /* critical */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* left stays left */
.pt-left {
    justify-self: start;
    min-width: 0;
}

/* buttons truly centered */
.pt-center {
    justify-self: center;
    display: flex;
    align-items: center;
}

/* total pinned right */
.pt-right {
    justify-self: end;
    display: flex;
    align-items: center;
}

/* simple text styling */
.pt-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.pt-sub {
    font-size: 12px;
    opacity: .7;
    margin-top: 2px;
}

.pt-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: rgba(0,0,0,.04);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 999px;
}

.pt-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    color: rgba(0,0,0,.75);
    transition: background .12s ease, color .12s ease, box-shadow .12s ease;
    white-space: nowrap;
}

    .pt-btn:hover {
        background: rgba(0,0,0,.06);
        color: rgba(0,0,0,.9);
    }

    .pt-btn.is-active {
        background: #fff;
        color: rgba(0,0,0,.92);
        box-shadow: 0 1px 6px rgba(0,0,0,.10);
    }

/* Total badge */
.pt-total {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 10px 14px 10px 16px;
    border-radius: 14px;
    /* more contrast than before */
    background: linear-gradient(180deg, rgba(37,99,235,.10), rgba(255,255,255,1));
    border: 1px solid rgba(37,99,235,.28);
    box-shadow: 0 14px 32px rgba(15,23,42,.12), 0 0 0 4px rgba(37,99,235,.12);
    line-height: 1.05;
    white-space: nowrap;
}

    /* left accent bar */
    .pt-total::before {
        content: "";
        position: absolute;
        left: 8px;
        top: 10px;
        bottom: 10px;
        width: 4px;
        border-radius: 999px;
        background: rgba(37,99,235,.80);
        box-shadow: 0 0 0 3px rgba(37,99,235,.18);
    }

.pt-total__label {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(15,23,42,.70);
    margin-bottom: 4px;
    padding-left: 10px; /* to visually clear the accent bar */
}

.pt-total__value {
    font-size: 16px; /* bigger */
    font-weight: 900; /* bolder */
    color: rgba(15,23,42,.95);
    padding-left: 10px; /* to visually clear the accent bar */

    font-variant-numeric: tabular-nums;
}

/* Optional: tiny “pop” on hover */
.pt-total:hover {
    border-color: rgba(37,99,235,.38);
    box-shadow: 0 18px 40px rgba(15,23,42,.14), 0 0 0 5px rgba(37,99,235,.14);
}

/* nice mobile behavior */
@media (max-width: 520px) {
    .project-topbar {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        justify-items: start;
        gap: 10px;
    }

    .pt-center {
        justify-self: start;
    }

    .pt-right {
        justify-self: start;
    }

    .pt-title {
        font-size: 15px;
    }

    .pt-actions {
        gap: 6px;
        padding: 3px;
    }

    .pt-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .pt-total {
        padding: 9px 12px 9px 14px;
    }

    .pt-total__value {
        font-size: 18px;
    }

    .pt-total__label {
        font-size: 10px;
    }
}

.rooms-panel {
    position: sticky;
    top: 56px; /* adjust to your topbar height */
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    padding: 10px 16px;
}

.rooms-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rooms-item {
    border: 1px solid rgba(0,0,0,.15);
    background: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
}

    .rooms-item:hover {
        background: rgba(0,0,0,.04);
    }

.rooms-empty {
    font-size: 13px;
    opacity: .7;
}

.modal-step {
    font-size: 12px;
    opacity: .6;
    margin-left: 10px;
}

.section-title {
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 13px;
    opacity: .8;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.rooms-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.rooms-panel-title {
    font-size: 13px;
    font-weight: 800;
    color: rgba(0,0,0,.85);
}

.rooms-add-btn {
    border: 1px solid rgba(0,0,0,.14);
    background: #fff;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

    .rooms-add-btn:hover {
        background: rgba(0,0,0,.03);
    }


.rooms-list--inline {
    list-style: none;
    padding: 10px 12px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .rooms-list--inline li {
        margin: 0;
    }

.rooms-item {
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

    .rooms-item:hover {
        background: rgba(0,0,0,.03);
    }



.rooms-item--add {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

    .rooms-item--add:hover {
        background: #111;
        border-color: #111;
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(0,0,0,.35);
    }

    .rooms-item--add:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0,0,0,.35);
    }


.scan-meta {
    margin: 8px 0 12px 0;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    background: rgba(0,0,0,.02);
}

.scan-meta-title {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 6px;
}

.scan-meta-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(0,0,0,.06);
}

.scan-meta-time {
    font-size: 12px;
    opacity: .65;
}

.scan-meta-warn {
    margin-top: 8px;
    font-size: 12px;
    opacity: .8;
}

.scan-map {
    margin: 10px 0 14px 0;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.8);
}

.scan-map-title {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 8px;
}

/* Breadcrumb Navigation */
.project-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-room {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .breadcrumb-room:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .breadcrumb-room:active {
        background: #e5e7eb;
    }

/* Make the empty breadcrumb look like a CTA */
.breadcrumb-room--empty {
    font-style: normal; /* remove italic */
    color: rgba(15, 23, 42, 0.92);
    font-weight: 700;
    background: linear-gradient(180deg, rgba(37,99,235,.10), rgba(37,99,235,.04));
    border: 1px solid rgba(37,99,235,.30);
    border-radius: 12px;
    padding: 10px 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.08), 0 0 0 4px rgba(37,99,235,.12);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}

    .breadcrumb-room--empty:hover {
        transform: translateY(-1px);
        border-color: rgba(37,99,235,.42);
        background: linear-gradient(180deg, rgba(37,99,235,.14), rgba(37,99,235,.06));
        box-shadow: 0 16px 36px rgba(15,23,42,.12), 0 0 0 4px rgba(37,99,235,.16);
    }

    .breadcrumb-room--empty:active {
        transform: translateY(0);
        box-shadow: 0 10px 24px rgba(15,23,42,.10), 0 0 0 3px rgba(37,99,235,.14);
    }

    /* Boost icon + chevron for empty state */
    .breadcrumb-room--empty .breadcrumb-icon {
        color: rgba(37,99,235,.95);
    }

    .breadcrumb-room--empty .breadcrumb-chevron {
        color: rgba(37,99,235,.65);
    }

    /* Make the count read like a badge */
    .breadcrumb-room--empty .breadcrumb-count {
        margin-left: 6px;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(37,99,235,.12);
        border: 1px solid rgba(37,99,235,.22);
        color: rgba(15,23,42,.85);
        font-weight: 700;
        font-size: 12px;
    }


.breadcrumb-icon {
    font-size: 16px;
    color: #6b7280;
}

.breadcrumb-room-name {
    flex: 1;
    text-align: left;
}

.breadcrumb-chevron {
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.breadcrumb-room:hover .breadcrumb-chevron {
    transform: translateY(1px);
}

.breadcrumb-count {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    margin-left: 4px;
}

/* ====== Non-empty (selected room) pill ====== */
.breadcrumb-room:not(.breadcrumb-room--empty) {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    padding: 10px 16px;
    min-height: 40px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    color: rgba(15, 23, 42, 0.92);
    font-weight: 650;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}

    .breadcrumb-room:not(.breadcrumb-room--empty):hover {
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, 0.22);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
        background: linear-gradient(180deg, rgba(15,23,42,.02), rgba(15,23,42,0));
    }

    .breadcrumb-room:not(.breadcrumb-room--empty):active {
        transform: translateY(0);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
    }

    .breadcrumb-room:not(.breadcrumb-room--empty):focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 14px 28px rgba(15, 23, 42, 0.10);
    }

    /* Icon: slightly more “primary” */
    .breadcrumb-room:not(.breadcrumb-room--empty) .breadcrumb-icon {
        color: rgba(37, 99, 235, 0.90);
        font-size: 15px;
    }

/* Room name: stronger and cleaner */
.breadcrumb-room-name {
    font-weight: 700;
    letter-spacing: .01em;
}

/* Chevron: nicer motion */
.breadcrumb-room:not(.breadcrumb-room--empty) .breadcrumb-chevron {
    color: rgba(15, 23, 42, 0.38);
    transition: transform .14s ease, color .14s ease;
}

.breadcrumb-room:not(.breadcrumb-room--empty):hover .breadcrumb-chevron {
    transform: translateY(1px);
    color: rgba(15, 23, 42, 0.55);
}

/* Count as a chip (instead of plain text) */
.breadcrumb-room:not(.breadcrumb-room--empty) .breadcrumb-count {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: rgba(15, 23, 42, 0.72);
    font-weight: 700;
    font-size: 12px;
}


/* Enhanced Rooms Panel */
.rooms-panel {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rooms-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.rooms-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

    .rooms-item:hover {
        background: #f3f4f6;
        border-color: #2563eb;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
    }

.rooms-item--active {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1e40af;
}

.rooms-item--add {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

    .rooms-item--add:hover {
        background: #1d4ed8;
        border-color: #1d4ed8;
    }

.rooms-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rooms-item-badge {
    font-size: 12px;
    color: #059669;
    flex-shrink: 0;
}

.rooms-empty {
    text-align: center;
    padding: 24px;
    color: #6b7280;
    font-style: italic;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .project-breadcrumb {
        padding: 10px 12px;
        position: sticky;
        top: 0;
        z-index: 50;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .breadcrumb-room {
        width: 100%;
        padding: 10px 14px;
        font-size: 15px;
    }

    .breadcrumb-icon {
        font-size: 18px;
    }

    .rooms-panel {
        padding: 12px;
        max-height: 60vh;
        overflow-y: auto;
    }

    .rooms-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .rooms-item {
        padding: 14px 16px;
        font-size: 15px;
    }

    .rooms-item--add {
        order: -1; /* Always show "Add room" first on mobile */
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .rooms-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .project-breadcrumb {
        padding: 10px 24px;
    }

    .breadcrumb-room {
        max-width: 400px;
    }

    .rooms-panel {
        padding: 20px 24px;
    }
}







/* =========================================================
   Phase 3: Chat + Estimate two-column layout
   ========================================================= */

/* Grid wrapper: keeps your Bootstrap markup but enforces the clean gutter */
.z-project-grid {
    margin: 0;
}

/* On desktop: force 2 equal columns with a real 32px gutter */
@media (min-width: 992px) {
    .z-project-grid {
        display: grid;
        grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
        gap: var(--s-6); /* 32px */
        align-items: start;
    }

        /* Neutralize Bootstrap column padding in grid mode */
        .z-project-grid > [class*="col-"] {
            padding: 0 !important;
            width: auto !important;
            max-width: none !important;
        }
}

/* On mobile: stacked with comfy spacing */
@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);
        }
}

/* Column panels (the big “cards” in the screenshot) */
.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); /* 24px */
    min-width: 0;
}

    /* If a child already draws its own “card”, remove double borders */
    .z-panel > .room-coach,
    .z-panel > .proposal-card {
        border: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    /* Make panels feel airy */
    .z-panel .section-title,
    .z-panel .z-section-label {
        margin-top: 0;
    }


/* =========================================================
   Project header + room selector (match new mock)
   ========================================================= */

/* =========================================================
   Project Topbar: match RoomData card + segmented tabs + total pill
   ========================================================= */

.project-topbar {
    /* RoomData outer card feel */
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    /* Layout */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    /* If something is forcing full-width + hard edges, keep it sane */
    margin: 14px auto 0 auto;
}

.pt-left {
    min-width: 0;
}

.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);
}

/* Center segmented control (RoomData tabs vibe) */
.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);
}

/* Tab buttons */
.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;
}

    .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-btn:active {
        transform: translateY(1px);
    }

/* Right total pill (RoomData total pill vibe) */
.pt-right {
    display: flex;
    justify-content: flex-end;
}

.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;
}

/* =========================================================
   Responsive: stack nicely on mobile (like RoomData behavior)
   ========================================================= */
@media (max-width: 768px) {

    .project-topbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pt-right {
        justify-content: flex-start;
    }

    /* Make segmented tabs full width + evenly spaced */
    .pt-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pt-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 9px 12px;
    }
}


/* =========================================================
   Room selector breadcrumb pill
   ========================================================= */

.project-breadcrumb {
    padding: 14px 22px;
    background: transparent;
}

.breadcrumb-room {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

    .breadcrumb-room:hover {
        background: var(--bg-surface-2);
        border-color: var(--border-strong);
    }

    .breadcrumb-room:active {
        transform: translateY(1px);
    }

.breadcrumb-icon {
    color: var(--brand-primary);
}

.breadcrumb-room-name {
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

.breadcrumb-chevron {
    color: var(--text-secondary);
    font-size: 12px;
}

.breadcrumb-count {
    color: var(--text-secondary);
    font-weight: var(--fw-semibold);
    margin-left: 2px;
}

/* Mobile tweaks */
@media (max-width: 991.98px) {
    .project-topbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 14px;
    }

    .pt-center {
        justify-self: start;
    }

    .pt-right {
        justify-self: start;
    }

    .project-breadcrumb {
        padding: 12px 14px;
    }

    .pt-total {
        min-width: 0;
        width: 100%;
    }
}

/* =========================================================
   Rooms selector panel
   ========================================================= */

.rooms-panel {
    margin: 10px 22px 0 22px;
    padding: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-16);
    box-shadow: var(--shadow-sm);
}

/* Inline room list */
.rooms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Room buttons */
.rooms-item {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: var(--fw-semibold);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

    .rooms-item:hover {
        background: var(--bg-surface-2);
        border-color: var(--border-strong);
    }

    .rooms-item:active {
        transform: translateY(1px);
    }

/* Active room */
.rooms-item--active {
    background: rgba(0,102,204,0.10);
    border-color: rgba(0,102,204,0.35);
    color: var(--text-primary);
}

/* Add room pill */
.rooms-item--add {
    background: transparent;
    border-style: dashed;
    color: var(--text-secondary);
}

    .rooms-item--add:hover {
        background: rgba(0,0,0,0.04);
        color: var(--text-primary);
    }

/* Room name text */
.rooms-item-name {
    white-space: nowrap;
}

/* Measurement badge icon */
.rooms-item-badge {
    font-size: 13px;
    color: var(--brand-primary);
}

/* Empty state */
.rooms-empty {
    padding: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Mobile spacing */
@media (max-width: 991.98px) {
    .rooms-panel {
        margin: 8px 14px 0 14px;
    }
}

