/* ---------------------------------------------------------------------- */
/* Design tokens — the onboarding design's shell (dsg-3eaaa1a0f3d6 r1,     */
/* screen-01-client-gallery-a): navy sidebar #101826, orange accent        */
/* #DD6A12, cool-grey canvas #EEF1F4, white cards. Amber/red stay reserved */
/* for semantic states (validation, vacancy).                              */
/* ---------------------------------------------------------------------- */
:root {
    --sa-color-bg: #eef1f4;
    --sa-color-surface: #ffffff;
    --sa-color-surface-alt: #f6f8fa;
    --sa-color-border: #d9dfe6;
    --sa-color-border-strong: #c3cbd6;

    --sa-color-nav: #101826;
    --sa-color-nav-line: #212b3d;
    --sa-color-nav-text: #c7cedc;

    --sa-color-text: #101826;
    --sa-color-text-muted: #3c4658;
    --sa-color-text-faint: #8993a6;

    --sa-color-primary: #dd6a12;
    --sa-color-primary-hover: #c25d0e;
    --sa-color-primary-soft: rgba(221, 106, 18, 0.14);
    --sa-color-link: #2f6fed;

    --sa-color-success: #1f7a4d;
    --sa-color-success-soft: #dff2e7;
    --sa-color-warning: #a4650f;
    --sa-color-warning-soft: #fbf1e2;
    --sa-color-error: #c53030;
    --sa-color-error-soft: #fbeaea;
    --sa-color-info: #2f6fed;
    --sa-color-info-soft: #e6eefd;

    --sa-radius-sm: 6px;
    --sa-radius-md: 9px;
    --sa-radius-lg: 12px;

    --sa-sidebar-width: 224px;
    --sa-topbar-height: 64px;

    --sa-shadow-card: 0 1px 2px rgba(16, 24, 38, 0.05);
    --sa-shadow-card-hover: 0 6px 16px rgba(16, 24, 38, 0.10), 0 2px 4px rgba(16, 24, 38, 0.06);

    --sa-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --sa-font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--sa-color-bg);
    color: var(--sa-color-text);
    font-family: var(--sa-font-family);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-weight: 800;
    color: var(--sa-color-text);
    margin: 0 0 0.5rem 0;
}

h1 {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 0;
}

h1:focus {
    outline: none;
}

a {
    color: var(--sa-color-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.sa-figure {
    font-family: var(--sa-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------- */
/* App shell: fixed navy sidebar + white top bar over the grey canvas      */
/* ---------------------------------------------------------------------- */
.sa-shell {
    display: flex;
    min-height: 100vh;
}

.sa-nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sa-sidebar {
    width: var(--sa-sidebar-width);
    flex: none;
    background: var(--sa-color-nav);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
}

.sa-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 18px 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--sa-color-nav-line);
    color: #fff;
}

.sa-brand:hover {
    text-decoration: none;
}

.sa-brand-text {
    line-height: 1.15;
}

.sa-brand-name {
    font-size: 14.5px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.sa-brand-tag {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sa-color-nav-text);
    opacity: 0.72;
}

.sa-nav-section {
    padding: 14px 26px 6px 26px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #6f7c93;
}

.sa-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 16px;
    margin: 0 10px 2px 10px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    color: var(--sa-color-nav-text);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.sa-nav-link svg {
    flex: none;
    display: block;
    stroke: currentColor;
}

.sa-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
}

.sa-nav-link.active {
    color: #fff;
    background: var(--sa-color-primary-soft);
    border-left-color: var(--sa-color-primary);
    font-weight: 700;
}

.sa-nav-link.disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.sa-nav-soon {
    margin-left: auto;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.8;
}

.sa-sidebar-foot {
    margin-top: auto;
    padding: 16px 20px 0 20px;
}

.sa-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--sa-color-nav-line);
}

.sa-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--sa-color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex: none;
}

.sa-user-text {
    min-width: 0;
}

.sa-user-name,
.sa-user-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-signout {
    margin: 10px 0 0 0;
}

.sa-signout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: var(--sa-radius-sm);
    background: transparent;
    color: var(--sa-color-nav-text);
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.sa-signout-btn:hover,
.sa-signout-btn:focus-visible {
    background: var(--sa-color-nav-line);
    color: #fff;
}

.sa-user-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.sa-user-role {
    font-size: 10.5px;
    color: var(--sa-color-nav-text);
    line-height: 1.2;
}

.sa-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sa-topbar {
    height: var(--sa-topbar-height);
    flex: none;
    border-bottom: 1px solid var(--sa-color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 30px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
}

.sa-topbar-menu {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sa-color-border);
    border-radius: 9px;
    cursor: pointer;
    flex: none;
}

.sa-crumbs {
    font-size: 13px;
    color: var(--sa-color-text-faint);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-crumbs a {
    color: var(--sa-color-text-faint);
}

.sa-crumbs .sa-crumb-current {
    color: var(--sa-color-text);
}

.sa-crumbs .sa-crumb-sep {
    margin: 0 5px;
}

.sa-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sa-content {
    flex: 1;
    max-width: 1800px;
    width: 100%;
    padding: 30px 34px 56px 34px;
}

.sa-content-wide {
    max-width: none;
}

.sa-content-bleed {
    padding: 0;
    max-width: none;
}

.sa-scrim {
    display: none;
}

/* Worksheet pages need the full 1440 width for the one-screen spreadsheet: the sidebar
   collapses to its icon rail (still the onboarding nav) and expands on hover/focus. */
.sa-shell-rail .sa-sidebar {
    width: 64px;
    transition: width 140ms ease;
}

.sa-shell-rail .sa-sidebar:hover,
.sa-shell-rail .sa-sidebar:focus-within {
    width: var(--sa-sidebar-width);
    position: fixed;
    box-shadow: 8px 0 24px rgba(16, 24, 38, 0.25);
}

.sa-shell-rail .sa-main {
    margin-left: 0;
}

.sa-shell-rail .sa-sidebar:hover ~ .sa-main,
.sa-shell-rail .sa-sidebar:focus-within ~ .sa-main {
    margin-left: 64px;
}

.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-brand-text,
.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-nav-link span,
.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-nav-section,
.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-user > div:last-child,
.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-signout-btn span {
    display: none;
}

.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-brand {
    padding-inline: 19px;
}

.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-nav-link {
    padding-inline: 14px;
}

.sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-sidebar-foot {
    padding-inline: 15px;
}

@media (max-width: 900px) {
    .sa-sidebar,
    .sa-shell-rail .sa-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sa-sidebar-width);
        transform: translateX(-100%);
        transition: transform 160ms ease;
    }

    .sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-brand-text,
    .sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-nav-link span,
    .sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-nav-section,
    .sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-user > div:last-child,
    .sa-shell-rail .sa-sidebar:not(:hover):not(:focus-within) .sa-signout-btn span {
        display: revert;
    }

    .sa-nav-toggle:checked ~ .sa-sidebar {
        transform: none;
    }

    .sa-nav-toggle:checked ~ .sa-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(16, 24, 38, 0.45);
        z-index: 35;
    }

    .sa-shell-rail .sa-sidebar:hover ~ .sa-main {
        margin-left: 0;
    }

    .sa-topbar {
        padding: 0 14px;
    }

    .sa-topbar-menu {
        display: inline-flex;
    }

    .sa-content {
        padding: 20px 14px 40px 14px;
    }
}

/* ---------------------------------------------------------------------- */
/* Page header                                                             */
/* ---------------------------------------------------------------------- */
.sa-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.sa-page-header h1 {
    font-size: 22px;
}

.sa-page-header p {
    color: var(--sa-color-text-muted);
    font-size: 13px;
    margin: 3px 0 0 0;
}

.sa-page-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------- */
/* Detail cards (Admin/Plans, Account) — a labeled dt/dd summary block     */
/* inside a bordered card, shared by any page presenting a small set of    */
/* read-only facts.                                                        */
/* ---------------------------------------------------------------------- */
.sa-admin-plan {
    background: var(--sa-color-surface);
    border: 1px solid var(--sa-color-border);
    border-radius: var(--sa-radius-lg);
    box-shadow: var(--sa-shadow-card);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.sa-admin-plan h2 {
    margin-bottom: 0.75rem;
}

.sa-admin-plan-key {
    color: var(--sa-color-text-faint);
    font-weight: 400;
    font-size: 0.85rem;
}

.sa-admin-plan-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem 1.5rem;
    margin: 0 0 1.25rem 0;
}

.sa-admin-plan-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sa-admin-plan-meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--sa-color-text-faint);
}

.sa-admin-plan-meta dd {
    margin: 0;
    color: var(--sa-color-text);
    font-weight: 600;
}

.sa-admin-table-scroll {
    overflow-x: auto;
}

.sa-admin-table {
    width: 100%;
    min-width: 640px; /* scroll (via .sa-admin-table-scroll) rather than squeeze columns unreadably narrow, e.g. on phone width */
    border-collapse: collapse;
}

.sa-admin-table th,
.sa-admin-table td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--sa-color-border);
    font-size: 0.9rem;
    white-space: nowrap;
}

.sa-admin-table td:first-child {
    white-space: normal; /* the Feature name column may still legitimately wrap */
}

.sa-admin-table th {
    color: var(--sa-color-text-faint);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.sa-admin-table code {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .sa-admin-plan {
        padding: 1rem;
    }

    .sa-admin-table th,
    .sa-admin-table td {
        padding: 0.5rem 0.4rem;
    }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.sa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    border-radius: var(--sa-radius-md);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.sa-btn:hover {
    text-decoration: none;
}

.sa-btn-primary {
    background: var(--sa-color-primary);
    color: #ffffff;
}

.sa-btn-primary:hover {
    background: var(--sa-color-primary-hover);
    color: #ffffff;
}

.sa-btn-primary:disabled {
    background: var(--sa-color-border-strong);
    cursor: not-allowed;
}

.sa-btn-secondary {
    background: var(--sa-color-surface);
    border-color: var(--sa-color-border);
    color: var(--sa-color-text);
}

.sa-btn-secondary:hover {
    background: var(--sa-color-surface-alt);
    color: var(--sa-color-text);
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                   */
/* ---------------------------------------------------------------------- */
.sa-form {
    max-width: 640px;
    background: var(--sa-color-surface);
    border: 1px solid var(--sa-color-border);
    border-radius: 16px;
    padding: 1.75rem 1.9rem 1.9rem 1.9rem;
}

.sa-field {
    margin-bottom: 1.25rem;
}

.sa-field label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--sa-color-text);
    margin-bottom: 0.35rem;
}

.sa-field .sa-hint {
    color: var(--sa-color-text-muted);
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

.sa-field input:not([type]),
.sa-field input[type="text"],
.sa-field input[type="email"],
.sa-field input[type="tel"],
.sa-field input[type="number"],
.sa-field input[type="search"],
.sa-field input[type="date"],
.sa-field select,
.sa-field textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--sa-color-border-strong);
    border-radius: var(--sa-radius-md);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--sa-color-text);
    background: var(--sa-color-surface);
}

.sa-field input:focus,
.sa-field select:focus,
.sa-field textarea:focus {
    outline: none;
    border-color: var(--sa-color-primary);
    box-shadow: 0 0 0 3px rgba(221, 106, 18, 0.16);
}

.sa-field input.invalid,
.sa-field select.invalid,
.sa-field textarea.invalid {
    border-color: var(--sa-color-error);
}

.validation-message {
    display: block;
    color: var(--sa-color-error);
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

.sa-hint-inline {
    font-weight: 400;
    color: var(--sa-color-text-muted);
    font-size: 0.8rem;
}

/* Building entry: photo box on the left, fields to its right; stacks on phones. */
.sa-form-building {
    max-width: 1080px;
}

.sa-building-form {
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.sa-building-photo {
    position: sticky;
    top: 1rem;
}

.sa-photo-drop {
    position: relative;
    aspect-ratio: 4 / 3;
    min-height: 280px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed var(--sa-color-border-strong);
    border-radius: var(--sa-radius-lg);
    background: var(--sa-color-surface-alt);
    color: var(--sa-color-text-muted);
    text-align: center;
    transition: border-color 0.12s, background 0.12s;
}

.sa-photo-drop:hover,
.sa-photo-drop:focus-within,
.sa-photo-drop.is-dragover {
    border-color: var(--sa-color-primary);
    background: var(--sa-color-primary-soft);
}

.sa-photo-drop.has-photo {
    border-style: solid;
    border-color: var(--sa-color-border);
    background: var(--sa-color-text);
}

.sa-photo-drop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sa-photo-drop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.5rem;
}

.sa-photo-drop-empty svg {
    color: var(--sa-color-primary);
    margin-bottom: 0.4rem;
}

.sa-photo-drop-empty strong {
    color: var(--sa-color-text);
    font-size: 1rem;
}

.sa-photo-drop-empty small {
    color: var(--sa-color-text-faint);
    margin-top: 0.4rem;
}

/* The real file input covers the whole box, invisible: a click opens the picker, a drop lands on it. */
.sa-photo-drop .sa-photo-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.sa-photo-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.sa-photo-actions .sa-btn {
    cursor: pointer;
}

.sa-photo-preview-name {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    color: var(--sa-color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-photo-optional {
    text-align: center;
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--sa-color-text-muted);
}

/* Photo upload progress: overlays the image area while a file is being read (Create + Edit building). */
.sa-photo-progress {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(16, 24, 38, 0.6);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.sa-photo-progress-bar {
    width: 70%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.sa-photo-progress-bar > span {
    display: block;
    height: 100%;
    background: var(--sa-color-primary);
    transition: width 0.15s linear;
}

/* Upload errors render inside the photo box itself, not below it. */
.sa-photo-error-inline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 0.5rem 0.75rem;
    background: var(--sa-color-error-soft);
    color: var(--sa-color-error);
    font-size: 0.8rem;
    text-align: center;
}

.sa-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6rem 8rem;
    gap: 0.9rem;
}

/* Name + Floors sit side by side once Owner round-2's "Label" field is gone. */
.sa-field-row-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 10rem;
    gap: 0.9rem;
}

.sa-floors-readout {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sa-floors-readout .sa-figure {
    font-weight: 700;
    font-size: 1.05rem;
}

.sa-located {
    margin: -0.7rem 0 1.25rem 0;
    color: var(--sa-color-success);
}

/* Number of floors: a small box with the browser's up/down arrows, not a full-width field. */
.sa-field input[type="number"].sa-input-floors {
    width: 6.5rem;
}

/* Chrome only shows the arrows on hover; keep them visible so the box reads as a stepper. */
.sa-field input[type="number"].sa-input-floors::-webkit-inner-spin-button {
    opacity: 1;
}

.sa-autocomplete {
    position: relative;
}

.sa-autocomplete-list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 0.25rem;
    list-style: none;
    background: var(--sa-color-surface);
    border: 1px solid var(--sa-color-border-strong);
    border-radius: var(--sa-radius-md);
    box-shadow: 0 8px 24px rgba(16, 24, 38, 0.14);
    max-height: 18rem;
    overflow-y: auto;
}

.sa-autocomplete-list li {
    padding: 0.5rem 0.65rem;
    border-radius: var(--sa-radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
}

.sa-autocomplete-list li:hover,
.sa-autocomplete-list li.active {
    background: var(--sa-color-primary-soft);
}

.sa-attribution a {
    color: inherit;
}

@media (max-width: 760px) {
    .sa-building-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .sa-building-photo {
        position: static;
    }

    .sa-photo-drop {
        min-height: 220px;
    }

    .sa-field-row {
        grid-template-columns: 1fr 1fr;
    }

    .sa-field-row > .sa-field:first-child {
        grid-column: 1 / -1;
    }

    .sa-field-row-2 {
        grid-template-columns: minmax(0, 1fr);
    }
}

.sa-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Shared confirm-before-destructive-action modal (method change, floor/drawing removal) — same look as the
   building page's own Publish confirm, kept global here since several pages need it. */
.sa-modal-scrim { position: fixed; inset: 0; background: rgba(16, 24, 38, 0.5); z-index: 60; }
.sa-modal {
    position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
    background: #fff; border-radius: 14px; padding: 24px 26px; box-shadow: 0 24px 60px rgba(16, 24, 38, 0.35);
}
.sa-modal p { color: var(--sa-color-text-muted); }
.sa-modal-warn { color: var(--sa-color-warning); font-weight: 700; }
.sa-modal ul { margin: 0.5rem 0; padding-left: 1.25rem; }
.sa-modal li { margin: 0.2rem 0; }

.sa-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--sa-radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.sa-alert-error {
    background: var(--sa-color-error-soft);
    color: var(--sa-color-error);
    border: 1px solid rgba(197, 48, 48, 0.25);
}

.sa-alert-success {
    background: var(--sa-color-success-soft);
    color: var(--sa-color-success);
    border: 1px solid rgba(31, 138, 82, 0.25);
}

/* ---------------------------------------------------------------------- */
/* Lease status badge — shared by the building page's suite table and the */
/* Leases screens, so one status vocabulary renders identically everywhere */
/* ---------------------------------------------------------------------- */
.ov-status { margin-left: 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ov-status-current { background: var(--sa-color-success-soft); color: var(--sa-color-success); }
.ov-status-monthtomonth { background: var(--sa-color-info-soft); color: var(--sa-color-info); }
.ov-status-future { background: var(--sa-color-warning-soft); color: var(--sa-color-warning); }
.ov-status-past { background: #e8ebf0; color: var(--sa-color-text-muted); }

.ov-lease-warnings { background: var(--sa-color-info-soft); border: 1px solid #a8c3ec; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: #1f3d5c; }
.ov-lease-warnings ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------------------------------------------------------------------- */
/* Capped Load Factor badges — RENTABLE OF RECORD is capped for this suite */
/* (owner rule 2026-09-28), or its cap is not BOMA-compliant (spec 10 §8)  */
/* ---------------------------------------------------------------------- */
.ov-cap-badge { margin-left: 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--sa-color-info-soft); color: var(--sa-color-info); }
.ov-cap-badge-warn { background: var(--sa-color-warning-soft); color: var(--sa-color-warning); }

/* ---------------------------------------------------------------------- */
/* Data table card — the building page's suite table and the Leases       */
/* screens' lease table both render through this (one look, shared).      */
/* ---------------------------------------------------------------------- */
.ov-suites { background: #fff; border: 1px solid var(--sa-color-border); border-radius: 10px; box-shadow: var(--sa-shadow-card); padding: 0; overflow: hidden; }
.ov-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ov-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 840px; }
.ov-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sa-color-text-faint); padding: 9px 14px; background: var(--sa-color-surface-alt); border-top: 1px solid var(--sa-color-border); border-bottom: 1px solid var(--sa-color-border); white-space: nowrap; }
.ov-table td { padding: 9px 14px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
.ov-table .num { text-align: right; white-space: nowrap; }
.ov-table .ov-floor { font-weight: 800; white-space: nowrap; }
.ov-table tr.ov-floor-start td { border-top: 1px solid var(--sa-color-border-strong); }
.ov-table tbody tr:hover td { background: #fafbfc; }
.ov-table tfoot td { font-weight: 800; background: #f1f4f8; border-top: 2px solid var(--sa-color-border-strong); border-bottom: 0; }
.ov-none { color: var(--sa-color-text-faint); }

/* ---------------------------------------------------------------------- */
/* Empty state                                                             */
/* ---------------------------------------------------------------------- */
.sa-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    border: 1px dashed var(--sa-color-border-strong);
    border-radius: var(--sa-radius-lg);
    background: var(--sa-color-surface);
}

.sa-empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: var(--sa-color-bg);
    color: var(--sa-color-text-faint);
}

.sa-empty-state h2 {
    margin-bottom: 0.5rem;
}

.sa-empty-state p {
    color: var(--sa-color-text-muted);
    max-width: 480px;
    margin: 0 0 1.5rem 0;
}

.sa-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 480px) 1fr;
    gap: 2rem;
    align-items: start;
}

.sa-detail-photo {
    width: 100%;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-color-border);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.sa-detail-facts {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.sa-detail-facts dt {
    font-size: 0.78rem;
    color: var(--sa-color-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.sa-detail-facts dd {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .sa-detail-grid {
        grid-template-columns: 1fr;
    }
}

.blazor-error-boundary {
    background: #c53030;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
    border-radius: var(--sa-radius-md);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ---------------------------------------------------------------------- */
/* Gallery toolbar (search)                                                */
/* ---------------------------------------------------------------------- */
.sa-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.sa-search {
    flex: 1;
    max-width: 340px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--sa-color-surface);
    border: 1px solid var(--sa-color-border);
    border-radius: var(--sa-radius-md);
    padding: 9px 12px;
    color: var(--sa-color-text-faint);
}

.sa-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 13px;
    color: var(--sa-color-text);
}

.sa-search:focus-within {
    border-color: var(--sa-color-primary);
}

.sa-no-match {
    color: var(--sa-color-text-muted);
}

/* Offline notice (js/offline-banner.js toggles body.sa-offline). */
.sa-offline-banner {
    display: none;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #5c3d08;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    text-align: center;
}

body.sa-offline .sa-offline-banner {
    display: block;
}

body.sa-offline [data-needs-online] {
    opacity: 0.5;
    pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Sign-in landing / signed-out (no shell: the visitor has no session yet)  */
/* ---------------------------------------------------------------------- */
.sa-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--sa-color-bg);
}

.sa-auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: var(--sa-color-surface);
    border: 1px solid var(--sa-color-border);
    border-radius: var(--sa-radius-lg);
    box-shadow: var(--sa-shadow-card);
}

.sa-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sa-color-border);
}

.sa-auth-brand-name {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.sa-auth-brand-tag {
    font-size: 12px;
    color: var(--sa-color-text-faint);
}

.sa-auth-lead {
    margin: 6px 0 22px 0;
    color: var(--sa-color-text-muted);
}

.sa-auth-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: var(--sa-radius-md);
    background: var(--sa-color-error-soft);
    color: var(--sa-color-error);
    font-size: 0.9rem;
}

.sa-auth-submit {
    width: 100%;
    justify-content: center;
}

/* ---------------------------------------------------------------------- */
/* Floors, drawing upload, validation and the interactive floor plan       */
/* (owner spec 2026-09-25).                                                */
/* ---------------------------------------------------------------------- */
.sa-step { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--sa-color-primary-soft); color: var(--sa-color-primary-hover); font-size: 12px; font-weight: 600; }
.sa-alert-list { margin: 0; padding-left: 18px; }
.sa-alert-warning { background: var(--sa-color-warning-soft); color: var(--sa-color-warning); border: 1px solid #ecd3a6; padding: 10px 14px; border-radius: var(--sa-radius-md); margin-bottom: 14px; }
.sa-alert-info { background: var(--sa-color-info-soft); color: var(--sa-color-info); border: 1px solid #a8c3ec; padding: 10px 14px; border-radius: var(--sa-radius-md); margin-bottom: 14px; }

.sa-floors-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.sa-floors { background: var(--sa-color-surface); border: 1px solid var(--sa-color-border); border-radius: var(--sa-radius-lg); box-shadow: var(--sa-shadow-card); overflow: hidden; max-width: 880px; }
.sa-floors-head, .sa-floor-row { display: grid; grid-template-columns: 28px 110px minmax(160px, 1fr) 130px 118px; gap: 10px; align-items: center; padding: 8px 14px; }
.sa-floors-head { background: var(--sa-color-surface-alt); color: var(--sa-color-text-faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--sa-color-border); }
.sa-floor-row { border-bottom: 1px solid var(--sa-color-border); background: var(--sa-color-surface); }
.sa-floor-row:last-child { border-bottom: 0; }
.sa-floor-row input { width: 100%; padding: 7px 9px; border: 1px solid var(--sa-color-border-strong); border-radius: var(--sa-radius-sm); font: inherit; background: #fff; }
.sa-floor-row input:focus { outline: 2px solid var(--sa-color-primary-soft); border-color: var(--sa-color-primary); }
.sa-floor-row.sa-dragging { opacity: .45; }
.sa-floor-row.sa-drop-target { box-shadow: inset 0 3px 0 var(--sa-color-primary); }
.sa-drag-handle { cursor: grab; color: var(--sa-color-text-faint); letter-spacing: -3px; user-select: none; text-align: center; }
.sa-floor-actions { display: flex; gap: 4px; justify-content: flex-end; }
.sa-icon-btn { width: 30px; height: 30px; border: 1px solid var(--sa-color-border-strong); border-radius: var(--sa-radius-sm); background: #fff; color: var(--sa-color-text-muted); cursor: pointer; font: inherit; line-height: 1; }
.sa-icon-btn:hover:not(:disabled) { background: var(--sa-color-surface-alt); }
.sa-icon-btn:disabled { opacity: .35; cursor: default; }
.sa-icon-btn-danger:hover:not(:disabled) { background: var(--sa-color-error-soft); color: var(--sa-color-error); border-color: var(--sa-color-error); }
@media (max-width: 720px) {
    .sa-floors-head { display: none; }
    .sa-floor-row { grid-template-columns: 24px 74px 1fr; }
    .sa-floor-row .sa-floor-elevation { grid-column: 2 / 3; }
    .sa-floor-row .sa-floor-actions { grid-column: 3 / 4; justify-content: flex-start; }
}

/* Upload table */
.sa-upload-drop { border: 2px dashed var(--sa-color-border-strong); border-radius: var(--sa-radius-lg); background: var(--sa-color-surface); padding: 22px; text-align: center; color: var(--sa-color-text-muted); margin-bottom: 14px; }
.sa-upload-drop input[type=file] { margin-top: 8px; }
.sa-table { width: 100%; border-collapse: collapse; background: var(--sa-color-surface); border: 1px solid var(--sa-color-border); border-radius: var(--sa-radius-lg); overflow: hidden; }
.sa-table th, .sa-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--sa-color-border); font-size: 14px; vertical-align: middle; }
.sa-table th { background: var(--sa-color-surface-alt); color: var(--sa-color-text-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.sa-table tr:last-child td { border-bottom: 0; }
.sa-table select { padding: 6px 8px; border: 1px solid var(--sa-color-border-strong); border-radius: var(--sa-radius-sm); font: inherit; background: #fff; max-width: 100%; }
.sa-num { text-align: right; font-variant-numeric: tabular-nums; }
.sa-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sa-badge-ok { background: var(--sa-color-success-soft); color: var(--sa-color-success); }
.sa-badge-warn { background: var(--sa-color-warning-soft); color: var(--sa-color-warning); }
.sa-badge-bad { background: var(--sa-color-error-soft); color: var(--sa-color-error); }
.sa-badge-info { background: var(--sa-color-info-soft); color: var(--sa-color-info); }
.sa-badge-muted { background: var(--sa-color-surface-alt); color: var(--sa-color-text-faint); border: 1px solid var(--sa-color-border); }

/* Floor plan: viewer + right-hand list */
.sa-plan { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; height: calc(100vh - var(--sa-topbar-height) - 128px); min-height: 460px; }
.sa-plan-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sa-plan-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sa-plan-tab { padding: 4px 11px; border: 1px solid var(--sa-color-border-strong); border-radius: 999px; background: #fff; color: var(--sa-color-text-muted); font-size: 13px; text-decoration: none; }
.sa-plan-tab.active { background: var(--sa-color-nav); color: #fff; border-color: var(--sa-color-nav); }
.sa-plan-tab.warn::after { content: " ●"; color: var(--sa-color-primary); }
.sa-viewer-wrap { position: relative; flex: 1; min-height: 0; border: 1px solid var(--sa-color-border); border-radius: var(--sa-radius-lg); background: #fff; overflow: hidden; }
.sa-viewer { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; outline: none; background: #fbfcfd; }
.sa-viewer.is-panning { cursor: grabbing; }
.sa-stage { position: absolute; inset: 0; }
.sa-bg { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.sa-overlay { position: absolute; left: 0; top: 0; overflow: visible; }
.sa-overlay-markers { pointer-events: none; }
.sa-overlay-markers .sa-marker { pointer-events: all; cursor: pointer; }
.sa-tip { position: absolute; left: 0; top: 0; z-index: 3; padding: 3px 8px; border-radius: 5px; background: rgba(16,24,38,.92); color: #fff; font-size: 12px; pointer-events: none; white-space: nowrap; }
.sa-viewer-controls { position: absolute; right: 10px; top: 10px; z-index: 4; display: flex; flex-direction: column; gap: 4px; }
.sa-viewer-controls button { width: 32px; height: 32px; border: 1px solid var(--sa-color-border-strong); background: #fff; border-radius: 6px; cursor: pointer; font-size: 16px; }
.sa-viewer-legend { position: absolute; left: 10px; bottom: 10px; z-index: 4; background: rgba(255,255,255,.94); border: 1px solid var(--sa-color-border); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--sa-color-text-muted); display: flex; gap: 12px; flex-wrap: wrap; max-width: 90%; }
.sa-viewer-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* Space polygons (interactive layer). Shapes are styled by class only — no inline handlers or styles. */
.sa-overlay .sa-space { fill: rgba(47, 111, 237, .10); stroke: #2f6fed; stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; pointer-events: all; }
.sa-overlay .sa-space[data-area-type] { fill: rgba(47, 111, 237, .22); }
/* One fill per AreaClassification (StackAccess.Infrastructure.AreaTypes.AreaClassificationPalette is the
   single source of truth for these colours — Office=blue and InterBuilding=green come straight from the
   BOMA standard's own colour-coded worked-example spreadsheets; the rest are a StackAccess extension). */
.sa-overlay .sa-space.sa-cls-office { fill: rgba(47, 111, 237, .38); stroke: #2f6fed; }
.sa-overlay .sa-space.sa-cls-storeretail { fill: rgba(0, 150, 170, .38); stroke: #00909f; }
.sa-overlay .sa-space.sa-cls-industrial { fill: rgba(166, 106, 46, .38); stroke: #a66a2e; }
.sa-overlay .sa-space.sa-cls-parking { fill: rgba(102, 112, 133, .32); stroke: #667085; }
.sa-overlay .sa-space.sa-cls-service { fill: rgba(125, 71, 196, .38); stroke: #7d47c4; }
.sa-overlay .sa-space.sa-cls-common { fill: rgba(166, 124, 0, .38); stroke: #a67c00; }
.sa-overlay .sa-space.sa-cls-amenity { fill: rgba(194, 65, 122, .38); stroke: #c2417a; }
.sa-overlay .sa-space.sa-cls-ancillary { fill: rgba(106, 90, 205, .38); stroke: #6a5acd; }
.sa-overlay .sa-space.sa-cls-verticalpenetration { fill: rgba(75, 85, 99, .32); stroke: #4b5563; }
.sa-overlay .sa-space.sa-cls-exclusion { fill: rgba(156, 163, 175, .28); stroke: #9ca3af; }
.sa-overlay .sa-space.sa-cls-interbuilding { fill: rgba(46, 139, 87, .38); stroke: #2e8b57; }
.sa-overlay .sa-space.sa-untyped { fill: rgba(140, 150, 165, .12); stroke: #8993a6; stroke-dasharray: 5 3; }
.sa-overlay .sa-space.sa-fixed { fill: rgba(31, 122, 77, .30); stroke: #1f7a4d; }
.sa-overlay .sa-space.is-hover { fill: rgba(221, 106, 18, .22); stroke: #dd6a12; stroke-width: 2; }
.sa-overlay .sa-space.is-selected { fill: rgba(221, 106, 18, .38); stroke: #dd6a12; stroke-width: 3; stroke-dasharray: none; }
.sa-overlay .sa-marker path { stroke: #d61f1f; stroke-width: 3; fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sa-overlay .sa-marker.is-selected path { stroke: #7a0000; stroke-width: 5; }

.sa-plan-side { display: flex; flex-direction: column; min-height: 0; background: var(--sa-color-surface); border: 1px solid var(--sa-color-border); border-radius: var(--sa-radius-lg); box-shadow: var(--sa-shadow-card); }
.sa-plan-side header { padding: 12px 14px; border-bottom: 1px solid var(--sa-color-border); }
.sa-plan-side h2 { margin: 0 0 2px; font-size: 16px; }
.sa-plan-side .sa-plan-total { font-size: 12px; color: var(--sa-color-text-faint); }
.sa-space-list { overflow: auto; flex: 1; }
.sa-space-item { padding: 9px 14px; border-bottom: 1px solid var(--sa-color-border); cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.sa-space-item:hover, .sa-space-item.is-hover { background: var(--sa-color-surface-alt); }
.sa-space-item.is-selected { background: var(--sa-color-primary-soft); box-shadow: inset 3px 0 0 var(--sa-color-primary); }
.sa-space-item .sa-space-name { font-weight: 600; font-size: 14px; }
.sa-space-item .sa-space-area { font-variant-numeric: tabular-nums; color: var(--sa-color-text-muted); font-size: 13px; }
.sa-space-item select { grid-column: 1 / -1; width: 100%; padding: 6px 8px; border: 1px solid var(--sa-color-border-strong); border-radius: var(--sa-radius-sm); font: inherit; font-size: 13px; background: #fff; }
.sa-space-item select.untyped { border-color: var(--sa-color-warning); background: var(--sa-color-warning-soft); }
.sa-space-item .sa-space-name-input { grid-column: 1 / -1; font-weight: 600; font-size: 14px; border: 1px solid transparent; border-radius: var(--sa-radius-sm); padding: 3px 6px; background: transparent; font: inherit; }
.sa-space-item .sa-space-name-input:hover, .sa-space-item .sa-space-name-input:focus { border-color: var(--sa-color-border-strong); background: #fff; }
.sa-space-item .sa-badge-suggested { grid-column: 1 / -1; background: var(--sa-color-warning-soft); color: var(--sa-color-warning); justify-self: start; }
.sa-space-item .sa-badge-info { grid-column: 1 / -1; justify-self: start; }
.sa-btn-small { padding: 3px 10px; font-size: 12px; grid-column: 1 / -1; justify-self: start; }
.sa-suggest-bar { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sa-suggest-bar label { font-size: 12px; color: var(--sa-color-text-muted); display: flex; align-items: center; gap: 6px; }
.sa-suggest-bar input[type="text"] { padding: 5px 8px; border: 1px solid var(--sa-color-border-strong); border-radius: var(--sa-radius-sm); font: inherit; font-size: 13px; }
.sa-plan-empty { padding: 20px; color: var(--sa-color-text-muted); }

.ov-error { background: var(--sa-color-error-soft); border: 1px solid #e8b4b4; border-radius: var(--sa-radius-md); padding: 16px 18px; margin-bottom: 16px; }
.ov-error h2 { margin: 0 0 6px; font-size: 16px; color: var(--sa-color-error); }
.ov-error ul { margin: 8px 0 0; padding-left: 20px; }
.ov-error li { margin: 3px 0; }
.gsa-unassigned-list { list-style: none; margin: 10px 0 0; padding: 0; text-align: left; }
.gsa-unassigned-list li { padding: 4px 0; border-bottom: 1px solid var(--sa-color-border); }
@media (max-width: 980px) { .sa-plan { grid-template-columns: 1fr; height: auto; } .sa-viewer-wrap { height: 60vh; flex: none; } .sa-plan-side { max-height: 60vh; } }

/* Validation review */
.sa-review { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; height: calc(100vh - var(--sa-topbar-height) - 160px); min-height: 460px; }
.sa-issue { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; padding: 9px 14px; border-bottom: 1px solid var(--sa-color-border); cursor: pointer; }
.sa-issue:hover, .sa-issue.is-selected { background: var(--sa-color-error-soft); }
.sa-issue .sa-x { color: #d61f1f; font-weight: 800; grid-row: 1 / 3; }
.sa-issue .sa-issue-kind { font-weight: 600; font-size: 13px; }
.sa-issue .sa-issue-where { font-size: 12px; color: var(--sa-color-text-faint); font-variant-numeric: tabular-nums; }
.sa-change { padding: 9px 14px; border-bottom: 1px solid var(--sa-color-border); font-size: 13px; }
.sa-change strong { display: block; }
.sa-review-actions { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--sa-color-border); flex-wrap: wrap; }
@media (max-width: 980px) { .sa-review { grid-template-columns: 1fr; height: auto; } }
.sa-section-title { font-size: 16px; margin: 22px 0 10px; }

/* legend swatches mirror the .sa-cls-* space fills */
.sa-viewer-legend i.sa-space { background: rgba(59, 130, 246, .45); border: 1px solid #3b82f6; }
.sa-viewer-legend i.sa-cls-office { background: rgba(47,111,237,.45); border: 1px solid rgb(47,111,237); }
.sa-viewer-legend i.sa-cls-storeretail { background: rgba(0,150,170,.45); border: 1px solid rgb(0,150,170); }
.sa-viewer-legend i.sa-cls-industrial { background: rgba(166,106,46,.45); border: 1px solid rgb(166,106,46); }
.sa-viewer-legend i.sa-cls-parking { background: rgba(102,112,133,.45); border: 1px solid rgb(102,112,133); }
.sa-viewer-legend i.sa-cls-service { background: rgba(125,71,196,.45); border: 1px solid rgb(125,71,196); }
.sa-viewer-legend i.sa-cls-common { background: rgba(166,124,0,.45); border: 1px solid rgb(166,124,0); }
.sa-viewer-legend i.sa-cls-amenity { background: rgba(194,65,122,.45); border: 1px solid rgb(194,65,122); }
.sa-viewer-legend i.sa-cls-ancillary { background: rgba(106,90,205,.45); border: 1px solid rgb(106,90,205); }
.sa-viewer-legend i.sa-cls-verticalpenetration { background: rgba(75,85,99,.45); border: 1px solid rgb(75,85,99); }
.sa-viewer-legend i.sa-cls-exclusion { background: rgba(156,163,175,.45); border: 1px solid rgb(156,163,175); }
.sa-viewer-legend i.sa-cls-interbuilding { background: rgba(46,139,87,.45); border: 1px solid rgb(46,139,87); }
.sa-viewer-legend i.sa-untyped { background: rgba(140,150,165,.2); border: 1px dashed #8993a6; }
.sa-viewer-legend i.sa-fixed { background: rgba(31, 122, 77, .4); border: 1px solid #1f7a4d; }
/* Floating tooltip for the interactive charts (js/chart-tooltip.js). */
.sa-chart-tip {
    position: fixed; z-index: 80; pointer-events: none; opacity: 0; transition: opacity 0.08s ease;
    background: var(--sa-color-nav); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3;
    padding: 6px 10px; border-radius: 6px; max-width: 280px; box-shadow: 0 6px 18px rgba(16, 24, 38, 0.3);
}
.sa-chart-tip.on { opacity: 1; }

/* Printouts keep the area-classification colours on floor plans and charts. */
@media print {
    .sa-overlay .sa-space, .sa-viewer-legend i, .ov-pie-card svg, .ov-pie-card .sa-swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
