/* Designer portal scaffolds use existing app tokens and UI card primitives. */

.designer-portal-shell {
    display: grid;
    gap: 1rem;
    /* Visual-aid highlight — light: soft terracotta. */
    --platform-visual-aid-outline: rgba(168, 79, 36, 0.85);
    --platform-visual-aid-ring: rgba(168, 79, 36, 0.5);
    --platform-visual-aid-halo: rgba(168, 79, 36, 0.16);
    --platform-visual-aid-glow: rgba(168, 79, 36, 0.3);
}

#designer-proposals-workspace {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    width: 100%;
}

.designer-portal-hero {
    padding: 1rem 1.1rem;
}

.designer-portal-eyebrow,
.designer-portal-state-kicker {
    color: var(--text-color-muted);
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.designer-portal-description,
.designer-portal-state-message,
.designer-portal-state-action {
    color: var(--text-color-muted);
    margin-bottom: 0;
}

.designer-portal-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.designer-portal-state {
    border-left: 4px solid var(--color-slate-dark, #6E868D);
    display: grid;
    gap: 0.45rem;
    padding-left: 0.85rem;
}

.designer-portal-state-title {
    font-size: var(--font-size-h5);
    margin-bottom: 0;
}

.designer-portal-state-action {
    font-weight: var(--font-weight-medium);
}

.designer-portal-fixture-component {
    display: grid;
    gap: 0.75rem;
}

.designer-portal-fixture-banner {
    align-items: center;
    border: 1px solid var(--color-beige-dark, #BBA998);
    border-radius: 999px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
}

.designer-portal-fixture-label {
    color: var(--color-brown-dark, #75695F);
    font-weight: var(--font-weight-bold);
}

.designer-portal-fixture-detail {
    color: var(--text-color-muted);
    font-size: var(--font-size-small);
}

.designer-portal-data-state {
    border-left: 4px solid var(--color-brown-light, #BBA998);
    display: grid;
    gap: 0.4rem;
    padding-left: 0.85rem;
}

.designer-portal-metric-grid,
.designer-portal-profile-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.designer-portal-metric-card,
.designer-portal-profile-field {
    border: 1px solid var(--color-beige-dark, #BBA998);
    border-radius: 8px;
    min-width: 0;
    overflow: hidden;
    padding: 0.75rem;
}

.designer-portal-metric-label,
.designer-portal-profile-label {
    color: var(--text-color-muted);
    font-size: var(--font-size-small);
    margin-bottom: 0.25rem;
}

.designer-portal-metric-value,
.designer-portal-profile-value {
    color: var(--text-color);
    font-weight: var(--font-weight-bold);
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.designer-profile-ready-view,
.designer-profile-onboarding-view {
    display: grid;
    gap: 1rem;
}

.designer-profile-page {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
}

.designer-profile-identity-summary {
    align-items: center;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(187, 169, 152, 0.42);
    border-radius: 8px;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1rem;
}

.designer-profile-avatar {
    align-items: center;
    background: rgba(110, 134, 141, 0.18);
    border: 1px solid rgba(151, 184, 193, 0.42);
    border-radius: 8px;
    color: var(--text-color);
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    height: 44px;
    justify-content: center;
    letter-spacing: 0;
    width: 44px;
}

.designer-profile-identity-text {
    min-width: 0;
}

.designer-profile-name {
    color: var(--text-color);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.designer-profile-email,
.designer-profile-panel-subtitle,
.designer-profile-sync-note {
    color: var(--text-color-muted);
}

.designer-profile-email {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.designer-profile-sync-note {
    font-size: 0.9rem;
}

.designer-profile-badge-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.designer-profile-badge {
    align-items: center;
    border: 1px solid rgba(117, 105, 95, 0.26);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    min-height: 24px;
    padding: 0.28rem 0.62rem;
    box-shadow: 0 1px 2px rgba(117, 105, 95, 0.12);
    white-space: nowrap;
}

.designer-profile-badge-success {
    background: #4e6b3f;
    border-color: rgba(55, 79, 43, 0.78);
    color: #fffbed;
}

.designer-profile-badge-info {
    background: #5f7f87;
    border-color: rgba(70, 98, 105, 0.78);
    color: #f6fbfc;
}

.designer-profile-badge-warning {
    background: #b35f29;
    border-color: rgba(141, 70, 27, 0.76);
    color: #fff7ed;
}

.designer-profile-badge-danger {
    background: #a33b3b;
    border-color: rgba(126, 38, 38, 0.72);
    color: #fff5f5;
}

.designer-profile-badge-muted {
    background: rgba(187, 169, 152, 0.3);
    border-color: rgba(117, 105, 95, 0.34);
    color: var(--text-color);
}

.designer-profile-panel-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.designer-profile-panel,
.designer-profile-security-panel {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(187, 169, 152, 0.42);
    border-radius: 8px;
    min-width: 0;
    padding: 1rem;
}

.designer-profile-panel-heading {
    border-bottom: 1px solid rgba(187, 169, 152, 0.26);
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
}

.designer-profile-panel-title {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.designer-profile-panel-subtitle {
    font-size: 0.84rem;
    margin-top: 0.18rem;
}

.designer-profile-field-row {
    align-items: start;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
    padding: 0.48rem 0;
}

.designer-profile-field-row + .designer-profile-field-row {
    border-top: 1px solid rgba(187, 169, 152, 0.18);
}

.designer-profile-value-row {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    justify-content: flex-end;
    min-width: 0;
    text-align: right;
}

.designer-profile-value-row .designer-portal-profile-value {
    font-family: inherit;
    min-width: 0;
    overflow-wrap: anywhere;
}

.designer-profile-copy {
    flex: 0 0 auto;
    opacity: 0.72;
}

.designer-profile-copy:hover {
    opacity: 1;
}

.designer-profile-technical-card {
    display: grid;
    gap: 0.95rem;
    padding: 1.05rem 1.2rem 1.15rem;
}

.designer-profile-technical-heading {
    align-items: start;
    border-bottom: 1px solid rgba(187, 169, 152, 0.22);
    display: grid;
    gap: 0.8rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-bottom: 0.9rem;
}

.designer-profile-technical-copy {
    min-width: 0;
}

.designer-profile-toggle-ids {
    flex: 0 0 auto;
    min-width: 104px;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.designer-profile-technical-rows {
    display: grid;
    border-top: 1px solid rgba(187, 169, 152, 0.12);
}

.designer-profile-technical-card .designer-profile-field-row {
    grid-template-columns: minmax(160px, 0.5fr) minmax(0, 1fr);
    padding: 0.62rem 0;
}

.designer-profile-technical-card .designer-profile-field-row:first-child {
    padding-top: 0.72rem;
}

.designer-profile-technical-card .designer-profile-field-row:last-child {
    padding-bottom: 0.35rem;
}

.designer-profile-id-value {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.designer-profile-id-hidden {
    color: var(--text-color-muted);
    font-weight: 600;
}

.designer-profile-id-value-row {
    align-items: center;
}

.designer-profile-security-panel {
    display: grid;
    gap: 0.3rem;
    width: 100%;
}

.designer-profile-visual-aid-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.designer-profile-visual-aid-switch {
    margin-bottom: 0;
    min-width: 0;
}

.designer-profile-visual-aid-switch .ui-switch-description {
    display: block;
    max-width: 36rem;
}

.designer-profile-security-panel .form-control {
    border-radius: 8px;
    min-height: 42px;
}

.designer-profile-page .form-control {
    color: var(--text-color);
    background-color: var(--input-bg, #fff);
    border-color: var(--input-border, #ced4da);
}

.dark-theme .designer-profile-page .form-control {
    color: var(--text-color);
    background-color: #2f2f2f;
    border-color: rgba(255, 255, 255, 0.24);
}

.dark-theme .designer-profile-page .form-control::placeholder {
    color: rgba(224, 224, 224, 0.58);
}

.dark-theme .designer-profile-badge {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.dark-theme .designer-profile-badge-success {
    background: rgba(78, 107, 63, 0.22);
    border-color: rgba(126, 173, 101, 0.4);
    color: #cde8bd;
}

.dark-theme .designer-profile-badge-info {
    background: rgba(110, 134, 141, 0.24);
    border-color: rgba(151, 184, 193, 0.42);
    color: #d5ecf2;
}

.dark-theme .designer-profile-badge-warning {
    background: rgba(181, 89, 28, 0.22);
    border-color: rgba(220, 130, 72, 0.44);
    color: #ffd4b8;
}

.dark-theme .designer-profile-badge-danger {
    background: rgba(176, 54, 54, 0.2);
    border-color: rgba(255, 110, 110, 0.44);
    color: #ffc4c4;
}

.dark-theme .designer-profile-badge-muted {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-color-muted);
}

/* === DESIGNER REFERENCE MATERIALS (DON-35/DON-36) === */
.designer-reference-materials-page {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
}

.designer-reference-materials-content {
    min-width: 0;
}

.designer-reference-reader {
    background: rgba(255, 253, 250, 0.84);
    border: 1px solid rgba(187, 169, 152, 0.62);
    border-radius: 8px;
    box-shadow: var(--proposal-surface-shadow, 0 14px 30px rgba(45, 31, 20, 0.1));
    overflow: hidden;
}

.designer-reference-toolbar {
    align-items: end;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(260px, 420px) auto;
    padding: 1rem 1.1rem 0.9rem;
}

.designer-reference-doc-field {
    margin: 0;
}

.designer-reference-doc-select {
    min-width: 0;
}

.designer-reference-actions {
    display: flex;
    justify-content: flex-end;
}

.designer-reference-open-link {
    white-space: nowrap;
}

.designer-reference-details {
    border-top: 1px solid rgba(141, 66, 37, 0.12);
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
}

.designer-reference-doc-title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.designer-reference-doc-meta {
    color: var(--text-color-muted);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.designer-reference-doc-description {
    color: var(--text-color);
    margin: 0.35rem 0 0;
    max-width: 76ch;
}

.designer-reference-viewer-wrap {
    background: rgba(141, 66, 37, 0.045);
    border-top: 1px solid rgba(141, 66, 37, 0.12);
    padding: 0.8rem;
}

.designer-reference-pdf-source {
    display: none;
}

.designer-reference-pdf-frame {
    background: #f8f8f8;
    border: 1px solid rgba(117, 105, 95, 0.24);
    border-radius: 8px;
    display: block;
    height: min(82vh, 920px);
    min-height: 680px;
    overflow: auto;
    padding: 1rem;
    width: 100%;
}

.designer-reference-pdf-pages {
    display: grid;
    gap: 1rem;
    justify-items: center;
}

.designer-reference-pdf-page {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    width: 100%;
}

.designer-reference-pdf-page-label {
    align-self: start;
    background: rgba(47, 47, 47, 0.82);
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.35rem 0.65rem;
}

.designer-reference-pdf-canvas-wrap {
    align-items: center;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    color: #5b5b5b;
    display: flex;
    justify-content: center;
    min-height: 18rem;
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
}

.designer-reference-pdf-canvas-wrap canvas {
    display: block;
    max-width: 100%;
}

.designer-reference-empty-state {
    background: rgba(255, 253, 250, 0.78);
    border: 1px dashed rgba(187, 169, 152, 0.72);
    border-radius: 8px;
}

.designer-reference-empty-state .card-body {
    display: grid;
    gap: 0.35rem;
    padding: 1.2rem 1.25rem;
}

.designer-reference-empty-title {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.designer-reference-empty-copy {
    color: var(--text-color-muted);
    margin: 0;
    max-width: 68ch;
}

.dark-theme .designer-reference-empty-state {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.16);
}

.dark-theme .designer-reference-reader {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.dark-theme .designer-reference-details,
.dark-theme .designer-reference-viewer-wrap {
    border-color: rgba(255, 255, 255, 0.12);
}

.dark-theme .designer-reference-viewer-wrap {
    background: rgba(0, 0, 0, 0.16);
}

.dark-theme .designer-reference-doc-title,
.dark-theme .designer-reference-doc-description {
    color: #eadfd2;
}

.dark-theme .designer-reference-doc-meta {
    color: #cfe6c2;
}

.dark-theme .designer-reference-pdf-frame {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.28);
    color: #eadfd2;
}

.dark-theme .designer-reference-pdf-page-label {
    background: rgba(234, 223, 210, 0.14);
    color: #eadfd2;
}

.dark-theme .designer-reference-pdf-canvas-wrap {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}

@media (max-width: 900px) {
    .designer-reference-toolbar {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .designer-reference-actions {
        justify-content: flex-start;
    }

    .designer-reference-pdf-frame {
        height: 72vh;
        min-height: 520px;
    }

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

    .designer-profile-identity-summary,
    .designer-profile-panel-grid,
    .designer-profile-field-row {
        grid-template-columns: 1fr;
    }

    .designer-profile-badge-row,
    .designer-profile-value-row {
        justify-content: flex-start;
        text-align: left;
    }

    .designer-profile-technical-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .designer-profile-name,
    .designer-profile-email {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 560px) {
    .designer-profile-technical-heading,
    .designer-profile-technical-card .designer-profile-field-row {
        grid-template-columns: 1fr;
    }

    .designer-profile-toggle-ids {
        justify-self: start;
    }

    .designer-profile-visual-aid-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* === DESIGNER MATERIALS & VENDORS (read-only hierarchical catalog table) === */
.designer-materials-table-wrap {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--color-beige-dark, #BBA998);
    border-radius: 12px;
}

.designer-materials-table {
    width: 100%;
    min-width: 720px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.designer-materials-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-color-muted);
    padding: 0.55rem 0.85rem;
    background-color: rgba(235, 220, 203, 0.35);
    border-bottom: 1px solid var(--color-beige-dark, #BBA998);
    white-space: nowrap;
}

.designer-materials-th-req {
    margin-left: 0.4rem;
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-slate-dark, #6E868D);
}

.designer-materials-table td {
    padding: 0.45rem 0.85rem;
    vertical-align: top;
    color: var(--text-color);
    border-top: 1px solid rgba(187, 169, 152, 0.4);
    border-left: 1px solid rgba(187, 169, 152, 0.28);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.designer-materials-table td:first-child {
    border-left: none;
}

.designer-materials-table tbody tr:first-child td {
    border-top: none;
}

/* Spanned parent cells read as the branch nodes of the cascade. */
.designer-materials-table td[rowspan]:not([rowspan="1"]) {
    font-weight: 600;
    background-color: rgba(235, 220, 203, 0.18);
}

.designer-materials-cell-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    min-width: 0;
}

.designer-materials-cell-inner > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.designer-materials-td-empty {
    color: var(--text-color-muted);
}

.designer-materials-swatch {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.25);
    flex: 0 0 auto;
}

/* ── MAT-READ-1: catalog summary, states, chips, disclosures ─────────────── */
.designer-materials-catalog { display: flex; flex-direction: column; gap: 0.9rem; }
.designer-materials-vendor-field { max-width: 520px; }

.designer-materials-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: rgba(255, 253, 250, 0.9);
    border: 1px solid var(--color-beige-dark, #BBA998);
    border-left: 5px solid var(--color-olive, #4E6B3F);
    border-radius: 12px;
}
.designer-materials-summary-main { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; }
.designer-materials-summary-name { font-size: 1.1rem; }
.designer-materials-summary-type {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem; border-radius: 999px;
    background: rgba(139, 121, 105, 0.18); color: var(--color-brown-dark, #75695F);
}
.designer-materials-summary-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.designer-materials-chip {
    font-size: 0.78rem; padding: 0.2rem 0.55rem; border-radius: 8px;
    background: rgba(139, 121, 105, 0.1); color: var(--text-color);
}
.designer-materials-chip-label { color: var(--text-color-muted); font-weight: 600; }

.designer-materials-state {
    text-align: center;
    padding: 2rem 1.25rem;
    border: 1px dashed rgba(187, 169, 152, 0.6);
    border-radius: 12px;
    background: rgba(255, 253, 250, 0.6);
}
.designer-materials-state-error { border-color: rgba(203, 91, 48, 0.5); background: rgba(203, 91, 48, 0.06); }
.designer-materials-state-title { font-size: 1.05rem; font-weight: 700; color: var(--text-color); }
.designer-materials-state-message { margin: 0.4rem 0 0.2rem; color: var(--text-color); }
.designer-materials-state-hint { margin: 0; font-size: 0.85rem; color: var(--text-color-muted); }

/* (i) reference button + popover (MAT-READ-1; wired to data later) */
.designer-materials-cell-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.designer-materials-info { display: inline-flex; }
.designer-materials-info > summary {
    list-style: none;
    width: 1.05rem; height: 1.05rem; line-height: 1rem; text-align: center;
    border-radius: 50%; cursor: pointer;
    font-size: 0.7rem; font-style: italic; font-weight: 700; font-family: Georgia, serif;
    border: 1px solid rgba(146, 183, 194, 0.6); color: var(--color-slate-dark, #6E868D);
    background: transparent; opacity: 0.45; transition: opacity 0.15s ease, background 0.15s ease;
}
.designer-materials-info > summary::-webkit-details-marker { display: none; }
.designer-materials-info > summary::marker { content: ""; }
.designer-materials-info.has-refs > summary { opacity: 1; background: rgba(146, 183, 194, 0.2); }
.designer-materials-info > summary:hover,
.designer-materials-info[open] > summary { opacity: 1; background: rgba(146, 183, 194, 0.28); }
.designer-materials-info-pop {
    flex-basis: 100%;
    margin-top: 0.3rem;
    display: flex; flex-direction: column; gap: 0.25rem;
    padding: 0.4rem 0.55rem; border-radius: 8px;
    background: rgba(139, 121, 105, 0.1); border: 1px solid rgba(187, 169, 152, 0.5);
}
.designer-materials-info-link { font-size: 0.8rem; }
.designer-materials-info-empty { font-size: 0.78rem; color: var(--text-color-muted); }
.dark-theme .designer-materials-info > summary { border-color: rgba(146, 183, 194, 0.5); color: #cfe6ee; }
.dark-theme .designer-materials-info-pop { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }

.designer-materials-disclosure {
    border: 1px solid rgba(187, 169, 152, 0.45);
    border-radius: 10px;
    background: rgba(255, 253, 250, 0.6);
    padding: 0.25rem 0.85rem;
}
.designer-materials-disclosure > summary {
    cursor: pointer; font-weight: 700; font-size: 0.85rem;
    padding: 0.45rem 0; color: var(--text-color);
}
.designer-materials-disclosure-count {
    display: inline-block; margin-left: 0.35rem;
    background: rgba(139, 121, 105, 0.18); color: var(--color-brown-dark, #75695F);
    border-radius: 999px; padding: 0 0.45rem; font-size: 0.72rem;
}
.designer-materials-unavailable-body { padding-bottom: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.designer-materials-unavailable-field {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-color-muted); font-weight: 700; margin-bottom: 0.25rem;
}
.designer-materials-unavailable-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.designer-materials-unavailable-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.78rem; padding: 0.2rem 0.5rem; border-radius: 8px;
    background: rgba(139, 121, 105, 0.1); color: var(--text-color-muted);
    text-decoration: line-through;
}

/* Dark theme parity */
.dark-theme .designer-materials-summary { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); }
.dark-theme .designer-materials-summary-type,
.dark-theme .designer-materials-chip { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.85); }
.dark-theme .designer-materials-chip-label { color: rgba(255, 255, 255, 0.6); }
.dark-theme .designer-materials-state { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.16); }
.dark-theme .designer-materials-state-error { background: rgba(203, 91, 48, 0.16); border-color: rgba(203, 91, 48, 0.5); }
.dark-theme .designer-materials-state-title,
.dark-theme .designer-materials-state-message { color: rgba(255, 255, 255, 0.9); }
.dark-theme .designer-materials-disclosure { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.dark-theme .designer-materials-disclosure > summary { color: rgba(255, 255, 255, 0.9); }
.dark-theme .designer-materials-ref-chip {
    background: rgba(146, 183, 194, 0.18); border-color: rgba(146, 183, 194, 0.4); color: #cfe6ee;
}
.dark-theme .designer-materials-unavailable-chip { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.6); }

/* --- Onboarding proposal authoring (DON-2) --- */

/* Hero — refined with a terracotta accent rail */
.designer-portal-shell .designer-portal-hero {
    padding: 1.7rem 1.75rem 1.6rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(233, 220, 203, 0.18));
    border: 1px solid rgba(141, 66, 37, 0.22);
    border-left: 4px solid var(--color-terracotta-dark, #8d4225);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(117, 105, 95, 0.07);
}

.designer-portal-shell .designer-portal-hero .designer-portal-eyebrow {
    color: var(--color-terracotta-dark, #8d4225);
    margin-bottom: 0.35rem;
}

.designer-portal-shell .designer-portal-hero h1 {
    font-size: 2.2rem;
    line-height: 1.08;
    margin-bottom: 0.65rem;
}

.designer-portal-shell .designer-portal-hero .designer-portal-description {
    max-width: 58ch;
    color: var(--text-color-secondary);
    line-height: 1.48;
}

.designer-portal-shell #designer-proposals-submit {
    display: inline-flex;
    width: auto;
    min-width: 15rem;
    justify-content: center;
}

/* Connected progress stepper (circles + connectors) */
.onboarding-stepper {
    display: flex;
    align-items: flex-start;
    padding: 0 0.5rem;
}

.onboarding-step2 {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.onboarding-step2 .onboarding-step-marker {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--bg-color, #fbefe0);
    border: 2px solid var(--color-beige-dark, #bba998);
    color: var(--text-color-muted);
    z-index: 1;
}

.onboarding-step2:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 0.9rem;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--color-beige-dark, #bba998);
    z-index: 0;
}

.onboarding-step-label {
    margin-top: 0.45rem;
    font-size: 0.76rem;
    color: var(--text-color-muted);
    line-height: 1.15;
}

.onboarding-step2-done .onboarding-step-marker {
    background: var(--olive);
    border-color: var(--olive);
    color: #fff;
}

.onboarding-step2-done::before,
.onboarding-step2-current::before {
    background: var(--olive);
}

.onboarding-step2-current .onboarding-step-marker {
    background: var(--color-terracotta-dark, #8d4225);
    border-color: var(--color-terracotta-dark, #8d4225);
    color: #fff;
}

.onboarding-step2-done .onboarding-step-label {
    color: var(--text-color);
}

.onboarding-step2-current .onboarding-step-label {
    color: var(--text-color);
    font-weight: 700;
}

/* Assigned-manufacturer callout */
.onboarding-vendor {
    display: flex;
    align-items: center;
    gap: 1.05rem;
    padding: 1rem 1.25rem;
    background: var(--olive-soft);
    border: 1px solid var(--color-beige-dark, #bba998);
    border-left: 4px solid var(--olive);
    border-radius: 12px;
    box-shadow: var(--proposal-surface-shadow);
}

.onboarding-vendor-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--olive), #8a944f);
    flex: 0 0 auto;
}

/* White "manufacturer" (factory) glyph, masked so it stays crisp on the olive box */
.onboarding-vendor-glyph {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    background-color: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Olive accents spread for warm/cool contrast --- */

/* Secondary / "Add" actions take the olive tone (terracotta stays primary) */
.designer-portal-shell .btn-dd-secondary {
    background-color: var(--olive-soft);
    border-color: rgba(107, 115, 57, 0.45);
    color: var(--olive-dark);
}

.designer-portal-shell .btn-dd-secondary:hover,
.designer-portal-shell .btn-dd-secondary:focus {
    background-color: var(--olive);
    border-color: var(--olive);
    color: #fff;
}

/* Eyebrows pick up the olive */
.designer-portal-shell .designer-portal-eyebrow {
    color: var(--olive-dark);
}

/* Dropzones turn olive on hover */
.designer-portal-shell .ui-upload-dropzone:hover,
.designer-portal-shell .custom-upload:hover {
    border-color: var(--olive);
    background: rgba(107, 115, 57, 0.07);
}

.onboarding-vendor-label {
    font-size: 0.66rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--olive-dark);
    margin-bottom: 0.25rem;
}

.onboarding-vendor-body {
    min-width: 0;
    padding: 0.05rem 0;
}

.onboarding-vendor-name {
    font-size: 1.05rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    line-height: 1.2;
}

.onboarding-vendor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.onboarding-vendor-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 0.45rem;
    padding: 0.24rem 0.44rem 0.24rem 0.68rem;
    border: 1px solid rgba(79, 86, 42, 0.72);
    border-radius: 999px;
    background: #697239;
    color: #fffbed;
    font-size: 0.92rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.25;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(79, 86, 42, 0.18);
    overflow-wrap: anywhere;
}

.onboarding-vendor-pill-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.onboarding-vendor-info .ui-info-pop {
    right: 0;
    left: auto;
    min-width: 14rem;
    text-align: left;
}

.onboarding-vendor-info.ui-info-btn {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 251, 237, 0.62);
    color: #fffbed;
    opacity: 1;
}

.onboarding-vendor-info.ui-info-btn:hover,
.onboarding-vendor-info.ui-info-btn:focus {
    background: rgba(255, 255, 255, 0.24);
    border-color: #fffbed;
}

.onboarding-vendor-meta {
    font-size: 0.8rem;
    color: var(--text-color-muted);
}

.designer-portal-shell .designer-proposals-status-sections {
    --proposal-section-rail-target: clamp(8rem, 12vw, 10.5rem);
    /* Keep the left rail inside the safe gap between the fixed sidebar and content. */
    --proposal-section-rail-safe: max(0rem, calc(((100vw - 250px - 40px - 1120px) / 2) + 0.75rem));
    --proposal-section-rail: min(var(--proposal-section-rail-target), var(--proposal-section-rail-safe));
    display: grid;
    gap: 1.05rem;
    margin-left: calc(-1 * var(--proposal-section-rail));
    margin-top: 0.35rem;
    width: calc(100% + var(--proposal-section-rail));
}

.designer-portal-shell .proposal-page-section {
    display: grid;
    gap: 0.85rem;
}

.designer-portal-shell .proposal-page-section-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0.35rem 0 0.05rem;
    min-height: 2rem;
}

.designer-portal-shell .proposal-page-section-summary::-webkit-details-marker {
    display: none;
}

.designer-portal-shell .proposal-page-section-label {
    align-items: center;
    background: var(--bg-color, #fbefe0);
    border: 1px solid rgba(203, 91, 48, 0.45);
    border-radius: 999px;
    color: var(--text-color);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    gap: 0.42rem;
    justify-content: center;
    line-height: 1;
    min-height: 1.7rem;
    padding: 0.28rem 0.82rem;
    white-space: nowrap;
}

.designer-portal-shell .proposal-page-section-count {
    align-items: center;
    background: rgba(203, 91, 48, 0.12);
    border: 1px solid rgba(203, 91, 48, 0.24);
    border-radius: 999px;
    color: #a84e2c;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-width: 1.18rem;
    padding: 0.15rem 0.34rem;
}

.designer-portal-shell .proposal-page-section-arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid rgba(203, 91, 48, 0.72);
    flex: 0 0 auto;
    height: 0;
    transform: rotate(0deg);
    transition: transform 0.16s ease;
    width: 0;
}

.designer-portal-shell .proposal-page-section:not([open]) .proposal-page-section-arrow {
    transform: rotate(-90deg);
}

.designer-portal-shell .proposal-page-section-rule {
    align-self: center;
    background: rgba(203, 91, 48, 0.42);
    flex: 1 1 auto;
    height: 1px;
    min-width: 2rem;
}

.designer-portal-shell .proposal-page-section-body {
    display: grid;
    gap: 0.9rem;
    margin-left: var(--proposal-section-rail, 0);
}

.designer-portal-shell .proposal-page-section-body > .designer-deliverables-card {
    margin-bottom: 0 !important;
}

@media (max-width: 900px) {
    .designer-portal-shell .designer-proposals-status-sections {
        --proposal-section-rail: 0rem;
        margin-left: 0;
        width: 100%;
    }

    .designer-portal-shell .proposal-page-section-label {
        max-width: min(100%, 14rem);
    }
}

/* Category / type tag */
.onboarding-category-tag {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--color-terracotta-dark, #8d4225), #b5613d);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* --- Layered, stratified proposal authoring (DON-2) ---
   Warm tonal layers (cream page → sand block → paper cards), per-vector
   accent rails, and compact rows for filled files. No cold white. */

:root {
    --vec-variant: #8d4225;   /* terracotta */
    --olive: #6b7339;         /* olive-green — cool counter-tone */
    --olive-dark: #525a2b;
    --olive-soft: rgba(107, 115, 57, 0.1);
    --vec-stl: var(--olive);  /* 3D files = olive-green */
    --vec-extra: #8a7f6d;     /* clay / taupe */
    --proposal-surface-shadow: 0 18px 36px rgba(92, 66, 42, 0.12), 0 4px 12px rgba(92, 66, 42, 0.08);
    --proposal-surface-shadow-strong: 0 22px 42px rgba(141, 66, 37, 0.15), 0 5px 14px rgba(92, 66, 42, 0.1);
}

/* Level 1: each product is a warm sand block */
.designer-portal-shell .designer-portal-card {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.4rem 1.55rem;
    background: #f3e7d6;
    border: 1px solid var(--color-beige-dark, #bba998);
    border-radius: 16px;
    box-shadow: var(--proposal-surface-shadow);
}

.designer-portal-shell .proposal-product-header {
    align-items: center;
    border-bottom: 1px solid rgba(141, 66, 37, 0.14);
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
    padding-bottom: 0.7rem;
}

.designer-portal-shell .proposal-product-name {
    font-size: 1.1rem;
    line-height: 1.25;
}

.designer-portal-shell .proposal-product-header .onboarding-category-tag {
    vertical-align: middle;
}

.designer-portal-shell .proposal-product-header + .override-section-title {
    margin-top: 0.2rem;
}

/* Numbered section headers — colored per vector, left rail */
.designer-portal-shell .override-section-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 1.02rem;
    font-weight: var(--font-weight-bold);
    gap: 0.5rem;
    color: var(--text-color);
    padding: 0.1rem 0 0.1rem 0.7rem;
    margin-top: 0.9rem;
    border-top: none;
    border-left: 3px solid var(--color-beige-dark, #bba998);
}

.designer-portal-shell .proposal-requirement-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.66rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.055em;
    line-height: 1;
    padding: 0.18rem 0.55rem;
}

.designer-portal-shell .proposal-requirement-required {
    background: rgba(203, 91, 48, 0.14);
    color: #b4532d;
}

.designer-portal-shell .proposal-requirement-optional {
    background: rgba(107, 115, 57, 0.15);
    color: #68713a;
}

.designer-portal-shell .proposal-head-variant { color: var(--vec-variant); border-left-color: var(--vec-variant); }
.designer-portal-shell .proposal-head-stl { color: var(--vec-stl); border-left-color: var(--vec-stl); }
.designer-portal-shell .proposal-head-extra { color: var(--vec-extra); border-left-color: var(--vec-extra); }

.designer-portal-shell .proposal-step-copy {
    color: var(--text-color-muted);
    font-size: 0.94rem;
    line-height: 1.45;
    margin: -0.15rem 0 0.6rem;
    max-width: 78ch;
}

.designer-portal-shell .proposal-add-action {
    justify-self: start;
    margin-top: 0;
}

.designer-portal-shell .proposal-submit-row {
    align-items: center;
    border-top: 1px solid rgba(141, 66, 37, 0.14);
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: end;
    margin-top: 0.05rem;
    min-height: 3.9rem;
    padding: 0.5rem 0;
}

.designer-portal-shell .proposal-submit-button {
    grid-column: 2;
    justify-content: center;
    min-width: min(100%, 16rem);
}

.designer-portal-shell .proposal-submit-row .text-danger,
.designer-portal-shell .proposal-submit-row .small {
    grid-column: 1 / -1;
    justify-self: stretch;
    margin-top: 0 !important;
}

.designer-portal-shell .proposal-submit-row .small:empty {
    display: none;
}

.designer-portal-shell .proposal-basics-heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.designer-portal-shell .proposal-basics-heading .override-section-title {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.designer-portal-shell .proposal-body-actions {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.designer-portal-shell .proposal-expandable-card {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.designer-portal-shell .proposal-expandable-summary {
    align-items: start;
    cursor: pointer;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(12rem, 1fr) auto auto auto;
    list-style: none;
    min-height: 3.5rem;
    padding: 1.05rem 1.25rem;
}

.designer-portal-shell .proposal-expandable-summary::-webkit-details-marker {
    display: none;
}

.designer-portal-shell .proposal-summary-main,
.designer-portal-shell .proposal-summary-flags,
.designer-portal-shell .proposal-summary-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.designer-portal-shell .proposal-summary-title {
    font-size: 1.05rem;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
}

.designer-portal-shell .proposal-summary-slot {
    color: var(--text-color-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.designer-portal-shell .proposal-status-pill {
    font-size: 0.7rem;
}

.designer-portal-shell .proposal-status-empty {
    background: rgba(139, 121, 105, 0.18);
    color: #5f5347;
}

.designer-portal-shell .proposal-status-draft,
.designer-portal-shell .proposal-status-review,
.designer-portal-shell .proposal-status-warning {
    background: rgba(203, 91, 48, 0.18);
    color: #b4532d;
}

.designer-portal-shell .proposal-status-success {
    background: rgba(107, 115, 57, 0.18);
    color: #68713a;
}

.designer-portal-shell .proposal-summary-flag {
    border: 1px solid rgba(187, 169, 152, 0.45);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.25rem 0.55rem;
    white-space: nowrap;
}

.designer-portal-shell .proposal-summary-flag-ready {
    background: rgba(107, 115, 57, 0.14);
    border-color: rgba(107, 115, 57, 0.42);
    color: #68713a;
}

.designer-portal-shell .proposal-summary-flag-empty {
    background: rgba(203, 91, 48, 0.16);
    border-color: rgba(203, 91, 48, 0.5);
    color: #b4532d;
}

/* Draw attention to still-missing sections while the card is collapsed: a gentle,
   staggered bounce. Stops once the card is expanded (the designer is working on it)
   and respects reduced-motion preferences. */
.designer-portal-shell .proposal-expandable-card:not([open]) .proposal-summary-flag-empty {
    animation: proposal-flag-bounce 1.4s ease-in-out infinite;
}
.designer-portal-shell .proposal-expandable-card:not([open]) .proposal-summary-flags .proposal-summary-flag-empty:nth-child(2) {
    animation-delay: 0.15s;
}
.designer-portal-shell .proposal-expandable-card:not([open]) .proposal-summary-flags .proposal-summary-flag-empty:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes proposal-flag-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
    .designer-portal-shell .proposal-summary-flag-empty,
    .designer-portal-shell .proposal-expandable-warning:not([open]),
    .designer-deliverable-row .proposal-status-warning,
    .designer-deliverable-row .proposal-status-empty,
    .designer-deliverable-row .proposal-status-draft {
        animation: none;
    }
}

.designer-portal-shell .proposal-summary-meta {
    color: var(--text-color-muted);
    font-size: 0.82rem;
    justify-content: flex-end;
}

.designer-portal-shell .proposal-summary-toggle {
    color: var(--text-color-muted);
    font-size: 0.78rem;
    font-weight: 700;
    justify-self: end;
}

.designer-portal-shell .proposal-expandable-card[open] .proposal-summary-toggle {
    color: var(--text-color);
}

.designer-portal-shell .proposal-expandable-body {
    border-top: 1px solid rgba(141, 66, 37, 0.14);
    display: grid;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem 0;
}

.designer-portal-shell .proposal-details-opening > .proposal-expandable-body,
.designer-portal-shell .proposal-details-opening > .proposal-subcard-body {
    animation: proposal-details-expand 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    transform-origin: top;
    will-change: max-height, opacity, transform;
}

.designer-portal-shell .proposal-details-closing > .proposal-expandable-body,
.designer-portal-shell .proposal-details-closing > .proposal-subcard-body {
    animation: proposal-details-collapse 260ms cubic-bezier(0.4, 0, 1, 1) forwards;
    overflow: hidden;
    transform-origin: top;
    will-change: max-height, opacity, transform;
}

@keyframes proposal-details-expand {
    from {
        max-height: 0;
        opacity: 0.35;
        transform: translateY(-8px);
    }
    to {
        max-height: var(--proposal-details-motion-height, 1600px);
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes proposal-details-collapse {
    from {
        max-height: var(--proposal-details-motion-height, 1600px);
        opacity: 1;
        transform: translateY(0);
    }
    to {
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
    }
}

.designer-portal-shell .proposal-expandable-warning {
    border-color: rgba(203, 91, 48, 0.45);
}

/* Compact-mode state shading: only when the card is collapsed, so the expanded
   authoring/review body stays neutral. */
.designer-portal-shell .proposal-expandable-warning:not([open]) {
    background: rgba(203, 91, 48, 0.20);
    animation: proposal-card-bounce 1.8s ease-in-out infinite;
    box-shadow: var(--proposal-surface-shadow-strong);
}

/* Whole changes-requested card nudges to draw attention while collapsed. */
@keyframes proposal-card-bounce {
    0%, 55%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.designer-portal-shell .proposal-expandable-success {
    border-color: rgba(107, 115, 57, 0.42);
}

.designer-portal-shell .proposal-expandable-success:not([open]) {
    background: rgba(107, 115, 57, 0.22);
}

.designer-portal-shell .proposal-review-context {
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(187, 169, 152, 0.48);
    border-radius: 12px;
    display: grid;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
}

.designer-portal-shell .proposal-review-context-changes_requested {
    background: rgba(203, 91, 48, 0.08);
    border-color: rgba(203, 91, 48, 0.34);
}

/* Flat review summary: review stages use this as the whole card body, so it
   carries no card chrome of its own (avoids a card-in-card look). The padded
   body has no bottom padding (editable cards rely on the submit row), so add
   our own so the last file row isn't flush against the card edge. */
.designer-portal-shell .proposal-review-context-flat {
    display: grid;
    gap: 0.7rem;
    padding-bottom: 1.1rem;
}

.designer-portal-shell .proposal-context-heading,
.designer-portal-shell .proposal-context-grid,
.designer-portal-shell .proposal-context-files {
    display: grid;
    gap: 0.65rem;
}

.designer-portal-shell .proposal-context-heading {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.designer-portal-shell .proposal-context-title {
    font-weight: 700;
}

.designer-portal-shell .proposal-context-copy {
    color: var(--text-color-muted);
    margin: 0;
}

.designer-portal-shell .proposal-context-kicker {
    color: var(--text-color-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.designer-portal-shell .proposal-context-warning {
    background: rgba(203, 91, 48, 0.12);
    border-radius: 10px;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
}

.designer-portal-shell .proposal-context-reason {
    font-weight: 700;
}

/* Per-variant / per-file admin review note rendered on the designer card. */
.designer-portal-shell .proposal-context-issue {
    margin-top: 0.3rem;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: rgba(203, 91, 48, 0.12);
    border-left: 3px solid rgba(203, 91, 48, 0.55);
    color: #b4532d;
    font-size: 0.85rem;
}
.dark-theme .designer-portal-shell .proposal-context-issue {
    background: rgba(203, 91, 48, 0.18);
    color: #f0b294;
}

.designer-portal-shell .proposal-context-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.designer-portal-shell .proposal-context-variant,
.designer-portal-shell .proposal-context-file {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(187, 169, 152, 0.42);
    border-radius: 10px;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
}

.designer-portal-shell .proposal-context-empty {
    color: var(--text-color-muted);
}

@media (max-width: 860px) {
    .designer-portal-shell .proposal-expandable-summary {
        grid-template-columns: 1fr;
    }

    .designer-portal-shell .proposal-summary-meta,
    .designer-portal-shell .proposal-summary-toggle {
        justify-self: start;
        justify-content: flex-start;
    }

    .designer-portal-shell .proposal-context-heading {
        grid-template-columns: 1fr;
    }
}

/* Level 2: cards = warm paper with a per-vector accent rail */
.designer-portal-shell .proposal-card {
    padding: 0.9rem 1rem;
    background: #fdf8f0;
    border: 1px solid #e8dac6;
    border-left-width: 4px;
    border-radius: 12px;
    transition: box-shadow 0.15s ease;
}

.designer-portal-shell .proposal-card-variant { border-left-color: var(--vec-variant); }
.designer-portal-shell .proposal-card-stl { border-left-color: var(--vec-stl); }
.designer-portal-shell .proposal-card-extra { border-left-color: var(--vec-extra); }

.designer-portal-shell .proposal-card:hover {
    box-shadow: 0 3px 12px rgba(120, 80, 40, 0.1);
}

.designer-portal-shell .proposal-subcard-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    list-style: none;
}

.designer-portal-shell .proposal-subcard-summary::-webkit-details-marker {
    display: none;
}

.designer-portal-shell .proposal-subcard-toggle {
    color: var(--text-color-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.designer-portal-shell .proposal-subcard[open] .proposal-subcard-summary {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0.55rem;
}

.designer-portal-shell .proposal-subcard-body {
    padding-top: 0.75rem;
}

.designer-portal-shell .proposal-subcard-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.65rem;
}

.designer-portal-shell .proposal-variant-vendor-select {
    max-width: 24rem;
}

.designer-portal-shell .proposal-variant-catalog-empty {
    align-items: center;
    background: rgba(255, 255, 255, 0.44);
    border: 1px dashed rgba(117, 105, 95, 0.35);
    border-radius: 8px;
    color: var(--text-color-muted);
    display: flex;
    min-height: 2.75rem;
    padding: 0.7rem 0.85rem;
}

/* Level 3: dropzones recessed inside the paper card */
.designer-portal-shell .custom-upload,
.designer-portal-shell .ui-upload-dropzone {
    background: rgba(141, 66, 37, 0.045);
    border-radius: 10px;
}

/* Compact row for a filled (collapsed) file/extra */
.designer-portal-shell .proposal-compact {
    padding: 0.15rem 0;
    font-size: 0.92rem;
}

.designer-portal-shell .proposal-compact-check { font-weight: 700; color: var(--vec-variant); }
.designer-portal-shell .proposal-card-stl .proposal-compact-check { color: var(--vec-stl); }
.designer-portal-shell .proposal-card-extra .proposal-compact-check { color: var(--vec-extra); }
.designer-portal-shell .proposal-compact-kind { font-weight: var(--font-weight-bold); }

.designer-portal-shell .proposal-compact-tag {
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 0.82rem;
}

.designer-portal-shell .proposal-compact-meta {
    color: var(--text-color-muted);
    font-size: 0.8rem;
}

/* Dark theme: elevated translucent cards instead of paper */
.dark-theme .designer-portal-shell {
    --proposal-surface-shadow: 0 18px 38px rgba(0, 0, 0, 0.32), 0 4px 14px rgba(0, 0, 0, 0.22);
    --proposal-surface-shadow-strong: 0 22px 46px rgba(0, 0, 0, 0.38), 0 5px 18px rgba(203, 91, 48, 0.16);
}

.dark-theme .designer-portal-shell .designer-portal-hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(212, 116, 79, 0.045));
    border-color: rgba(212, 116, 79, 0.28);
    border-left-color: #d4744f;
    box-shadow: none;
}

.dark-theme .designer-portal-shell .designer-portal-hero .designer-portal-eyebrow {
    color: #f2b48f;
}

.dark-theme .designer-portal-shell .designer-portal-hero .designer-portal-description {
    color: #d7d0c8;
}

.dark-theme .designer-portal-shell .designer-portal-card { background: rgba(255, 255, 255, 0.03); }
.dark-theme .designer-portal-shell .proposal-page-section-label {
    background: #222;
    border-color: rgba(212, 116, 79, 0.58);
    color: #eadfd2;
}
.dark-theme .designer-portal-shell .proposal-page-section-count {
    background: rgba(212, 116, 79, 0.18);
    border-color: rgba(212, 116, 79, 0.34);
    color: #f0b294;
}
.dark-theme .designer-portal-shell .proposal-page-section-rule {
    background: rgba(212, 116, 79, 0.5);
}
.dark-theme .designer-portal-shell .proposal-page-section-arrow {
    border-top-color: rgba(212, 116, 79, 0.82);
}
.dark-theme .designer-portal-shell .proposal-card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
.dark-theme .designer-portal-shell .override-section-title { color: #e7dccb; }
.dark-theme .designer-portal-shell .proposal-requirement-required { background: rgba(203, 91, 48, 0.24); color: #f0b294; }
.dark-theme .designer-portal-shell .proposal-requirement-optional { background: rgba(132, 165, 115, 0.22); color: #d3e8c8; }
.dark-theme .designer-portal-shell .designer-portal-eyebrow { color: #cfe6c2; }
.dark-theme .designer-portal-shell .proposal-status-draft,
.dark-theme .designer-portal-shell .proposal-status-review,
.dark-theme .designer-portal-shell .proposal-status-warning {
    background: rgba(203, 91, 48, 0.28);
    color: #ffd0b8;
}
.dark-theme .designer-portal-shell .proposal-status-success {
    background: rgba(132, 165, 115, 0.25);
    color: #d3e8c8;
}
.dark-theme .designer-portal-shell .proposal-status-empty {
    background: rgba(255, 255, 255, 0.12);
    color: #d8ccbd;
}
.dark-theme .designer-portal-shell .proposal-expandable-warning:not([open]) {
    background: rgba(203, 91, 48, 0.20);
}
.dark-theme .designer-portal-shell .proposal-expandable-success:not([open]) {
    background: rgba(132, 165, 115, 0.20);
}
.dark-theme .designer-portal-shell .proposal-summary-flag-ready {
    background: rgba(132, 165, 115, 0.2);
    border-color: rgba(132, 165, 115, 0.5);
    color: #d3e8c8;
}
.dark-theme .designer-portal-shell .proposal-summary-flag-empty {
    background: rgba(203, 91, 48, 0.24);
    border-color: rgba(203, 91, 48, 0.5);
    color: #f0b294;
}
.dark-theme .designer-portal-shell .proposal-review-context,
.dark-theme .designer-portal-shell .proposal-context-variant,
.dark-theme .designer-portal-shell .proposal-context-file {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.13);
}
.dark-theme .designer-portal-shell .proposal-review-context-changes_requested,
.dark-theme .designer-portal-shell .proposal-context-warning {
    background: rgba(203, 91, 48, 0.14);
    border-color: rgba(203, 91, 48, 0.34);
}

.dark-theme .designer-portal-shell .btn-dd-secondary {
    background-color: rgba(132, 165, 115, 0.22);
    border-color: rgba(132, 165, 115, 0.75);
    color: #e6f1df;
}

.dark-theme .designer-portal-shell .btn-dd-secondary:hover,
.dark-theme .designer-portal-shell .btn-dd-secondary:focus {
    background-color: #84a573;
    border-color: #84a573;
    color: #172016;
}

/* ── Designer deliverables panel — spacing/padding (DON-7) ─────────────────── */
.designer-deliverables-card {
    box-shadow: var(--proposal-surface-shadow);
    padding: 1rem 1.25rem;
}
.designer-deliverables-card .override-section-title {
    margin-bottom: 0.5rem;
}
.designer-deliverable-list {
    display: flex;
    flex-direction: column;
}
.designer-deliverable-row {
    padding: 0.3rem 0;
    border-top: 1px solid rgba(141, 66, 37, 0.12);
}
.designer-deliverable-row:first-child {
    border-top: none;
    padding-top: 0;
}
.designer-deliverable-title {
    font-weight: 600;
    min-width: 230px;
    white-space: nowrap;
}
.designer-deliverable-meta {
    margin-left: auto;
}

.designer-portal-shell .platform-visual-aid-trigger {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}

.designer-portal-shell .platform-visual-aid-trigger:hover {
    filter: brightness(1.08);
}

.designer-portal-shell .platform-visual-aid-trigger:focus-visible {
    outline: 3px solid var(--platform-visual-aid-outline);
    outline-offset: 3px;
}

.designer-portal-shell [data-visual-aid-anchor] {
    scroll-margin-top: 1.25rem;
    transition: box-shadow 0.6s ease;
}

/* Soft, premium glow held on the card itself — the card clips its children, so
   a pseudo-element halo would be cut off. Same structure in both themes; only
   the color vars differ. Blooms in from transparent (no hard pop) and fades to
   none on removal via the transition above. */
.designer-portal-shell .platform-visual-aid-target {
    box-shadow:
        0 0 0 2px var(--platform-visual-aid-ring),
        0 0 0 7px var(--platform-visual-aid-halo),
        0 0 28px 4px var(--platform-visual-aid-glow),
        var(--proposal-surface-shadow-strong);
    animation: platform-visual-aid-pulse 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) 1;
}

.dark-theme .designer-portal-shell {
    /* Visual-aid highlight — dark: brighter yellow, same structure. */
    --platform-visual-aid-outline: rgba(255, 244, 112, 1);
    --platform-visual-aid-ring: rgba(255, 244, 112, 0.7);
    --platform-visual-aid-halo: rgba(255, 244, 112, 0.22);
    --platform-visual-aid-glow: rgba(255, 244, 112, 0.52);
}

@keyframes platform-visual-aid-pulse {
    /* Bloom in from nothing, a gentle overshoot, then settle. */
    0% {
        box-shadow:
            0 0 0 2px rgba(255, 255, 255, 0),
            0 0 0 0 rgba(255, 255, 255, 0),
            0 0 0 0 rgba(255, 255, 255, 0),
            var(--proposal-surface-shadow-strong);
    }
    45% {
        box-shadow:
            0 0 0 2px var(--platform-visual-aid-ring),
            0 0 0 9px var(--platform-visual-aid-halo),
            0 0 34px 6px var(--platform-visual-aid-glow),
            var(--proposal-surface-shadow-strong);
    }
    100% {
        box-shadow:
            0 0 0 2px var(--platform-visual-aid-ring),
            0 0 0 7px var(--platform-visual-aid-halo),
            0 0 28px 4px var(--platform-visual-aid-glow),
            var(--proposal-surface-shadow-strong);
    }
}

@media (prefers-reduced-motion: reduce) {
    .designer-portal-shell .platform-visual-aid-target {
        animation: none;
    }

    .designer-portal-shell .proposal-details-opening > .proposal-expandable-body,
    .designer-portal-shell .proposal-details-opening > .proposal-subcard-body,
    .designer-portal-shell .proposal-details-closing > .proposal-expandable-body,
    .designer-portal-shell .proposal-details-closing > .proposal-subcard-body {
        animation: none;
    }

    .designer-portal-shell [data-visual-aid-anchor] {
        transition: none;
    }
}

/* Bounce the deliverable status pills that still need designer action:
   changes-requested (warning), awaiting (empty) and draft. received (review) and
   validated (success) stay still. Scoped to the deliverables panel so the product
   card header pills (same proposal-status-* classes) are unaffected. */
.designer-deliverable-row .proposal-status-warning,
.designer-deliverable-row .proposal-status-empty,
.designer-deliverable-row .proposal-status-draft {
    animation: proposal-flag-bounce 1.4s ease-in-out infinite;
}

/* === MY DESIGNS — product status rail modifiers (MYD-1) === */
.product-card-status-active::before     { background-color: var(--color-olive, #4E6B3F); }
.product-card-status-draft::before      { background-color: var(--color-brown-light, #BBA998); }
.product-card-status-pending_review::before { background-color: #b3591c; }
.product-card-status-archived::before   { background-color: #adb5bd; }

.product-card-sku {
    font-size: 0.78rem;
    font-family: monospace;
}

.product-card-price {
    font-size: 0.82rem;
}

.product-card-price-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    background-color: transparent;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Hide shared DataTable machinery when inside the designer portal shell */
.designer-portal-shell #products-table-wrapper  { display: none !important; }
.designer-portal-shell #products-action-buttons { display: none !important; }
.designer-portal-shell #products-readonly-notice { display: none !important; }
