/* Skyroof's dark canvas, navy surfaces and gold accents. Print uses the document styles. */
@media screen {
    :root[data-theme="skyroof"] {
        color-scheme: dark;
        --bg: #080c18;
        --surface: #0f1729;
        --secondary: #1a2338;
        --ink: #fff;
        --muted: #cbd5e1;
        --line: rgb(255 255 255 / 8%);
        --primary: #f0c040;
        --accent: #d4a017;
        --soft: rgb(212 160 23 / 10%);
        --accent-soft: rgb(212 160 23 / 15%);
        --wf-on-primary: #080c18;
        --nav: #0f1729;
        --nav-end: #0f1729;
        --nav-active: rgb(212 160 23 / 8%);
        --nav-text: #f0c040;
        --available: #34d399;
        --avail-bg: rgb(52 211 153 / 12%);
        --reserved: #fbbf24;
        --res-bg: rgb(245 158 11 / 12%);
        --sold: #f87171;
        --sold-bg: rgb(248 113 113 / 12%);
        --chart-out: #60a5fa;
        --radius: 20px;
        --shadow: none;
        --sky-edge: rgb(212 160 23 / 32%);
        --sky-lift: 0 4px 16px rgb(0 0 0 / 40%);
        --sky-gold-fill: linear-gradient(135deg, #f0c040, #d4a017 65%, #bd911e);
        scrollbar-color: #354461 var(--surface);
    }

    :root[data-theme="skyroof"]:not(.workflow-embed) body {
        background-color: #111b2e;
    }

    :root[data-theme="skyroof"] .side {
        --side-top: #1a2338;
        --side-bg: #0f1729;
        --side-accent: #f0c040;
        --side-accent-rgb: 212, 160, 23;
        --side-text: #f8fafc;
        --side-muted: #cbd5e1;
        --side-line: var(--line);
        background: var(--side-bg);
    }
    :root[data-theme="skyroof"] .side-emblem {
        background: linear-gradient(135deg, #44391c, #28261e);
        border-color: var(--sky-edge);
        box-shadow: 0 0 18px rgb(212 160 23 / 14%);
    }
    :root[data-theme="skyroof"] .side-brand-copy strong { color: var(--primary); }
    :root[data-theme="skyroof"] .side .nav-item.active {
        color: var(--primary);
        background: var(--nav-active);
    }
    :root[data-theme="skyroof"] .side .nav-item.active::before { background: var(--accent); }
    :root[data-theme="skyroof"] .toolbar {
        position: sticky;
        inset-block-start: 0;
        z-index: 15;
        background: rgb(15 23 41 / 95%);
        backdrop-filter: blur(20px);
    }
    :root[data-theme="skyroof"] .crumbs b { color: var(--ink); }
    :root[data-theme="skyroof"] .themes { background: var(--bg); border-radius: 10px; }
    :root[data-theme="skyroof"] .themes button[aria-pressed="true"] {
        background: var(--accent-soft);
        border-color: var(--sky-edge);
        color: var(--primary);
    }
    :root[data-theme="skyroof"] .profile-icon { color: var(--primary); background: var(--accent-soft); }
    :root[data-theme="skyroof"] .eyeline { color: var(--primary); }
    :root[data-theme="skyroof"] :target { scroll-margin-block-start: 80px; }

    :root[data-theme="skyroof"] .showcase-control {
        background: #05213d;
        border-color: rgb(212 194 176 / 20%);
        border-radius: 12px;
    }
    :root[data-theme="skyroof"] .showcase-control button {
        color: var(--ink);
        background: rgb(212 194 176 / 12%);
        border-color: rgb(212 194 176 / 28%);
    }
    :root[data-theme="skyroof"] .metrics {
        container: sky-metrics / inline-size;
        grid-template-columns: repeat(3,minmax(0,1fr));
        gap: clamp(12px,1.45vw,20px);
        margin-bottom: 24px;
    }
    :root[data-theme="skyroof"] .metric {
        --stat-color: #d4a017;
        --stat-tint: rgb(212 160 23 / 15%);
        grid-template-columns: 52px minmax(0,1fr);
        grid-template-areas: "icon label" "icon amount" ". note";
        align-content: center;
        align-items: center;
        gap: 4px 16px;
        min-height: 140px;
        padding: 20px clamp(16px,1.55vw,24px);
        isolation: isolate;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: var(--surface);
        transition: border-color .22s, transform .22s, box-shadow .22s;
    }
    :root[data-theme="skyroof"] .metric.blue { --stat-color: #34d399; --stat-tint: rgb(52 211 153 / 12%); }
    :root[data-theme="skyroof"] .metric.amber { --stat-color: #60a5fa; --stat-tint: rgb(96 165 250 / 12%); }
    :root[data-theme="skyroof"] .metric::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset-block-start: -40px;
        inset-inline-end: -40px;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: var(--stat-color);
        opacity: .08;
        pointer-events: none;
    }
    :root[data-theme="skyroof"] .metric-head { display: contents; }
    :root[data-theme="skyroof"] .metric-ico {
        grid-area: icon;
        align-self: start;
        width: 52px;
        height: 52px;
        border-radius: 14px;
        color: var(--stat-color);
        background: var(--stat-tint);
    }
    :root[data-theme="skyroof"] .metric-ico svg { width: 24px; height: 24px; }
    :root[data-theme="skyroof"] .currency-tag {
        position: absolute;
        display: block;
        inset-inline-start: 13px;
        inset-block-start: 9px;
        color: var(--stat-color);
        font-size: .69rem;
    }
    :root[data-theme="skyroof"] .metric-label {
        grid-area: label;
        font-size: .875rem;
        color: var(--muted);
        line-height: 1.55;
    }
    :root[data-theme="skyroof"] .metric-value {
        grid-area: amount;
        justify-self: start;
        font-size: clamp(1.55rem,2vw,1.85rem);
        line-height: 1.2;
        font-weight: 900;
        letter-spacing: -.025em;
    }
    :root[data-theme="skyroof"] .metric > small {
        grid-area: note;
        display: block;
        font-size: .765rem;
        line-height: 1.5;
        color: var(--muted);
    }
    :root[data-theme="skyroof"] .panel {
        border-radius: 20px;
        border-color: var(--line);
        background: var(--surface);
        transition: border-color .22s;
    }
    :root[data-theme="skyroof"] .panel-heading { padding: 15px 20px; gap: 12px; }
    :root[data-theme="skyroof"] .panel-heading > div { gap: 10px; }
    :root[data-theme="skyroof"] .square-icon { color: var(--accent); }
    :root[data-theme="skyroof"] .panel-heading h2 { font-size: 1.075rem; font-weight: 750; }
    :root[data-theme="skyroof"] .text-link { color: var(--primary); }
    :root[data-theme="skyroof"] :is(.dash-project-choice select,.floor-title select) {
        background: var(--secondary);
        border-radius: 8px;
    }
    :root[data-theme="skyroof"] .dash-project-choice button {
        background: var(--accent-soft);
        border-color: var(--sky-edge);
        color: var(--primary);
    }
    :root[data-theme="skyroof"] .project-photo { border-radius: 12px; }
    :root[data-theme="skyroof"] .unit-tile {
        border-color: color-mix(in srgb,var(--status) 25%,transparent);
        border-radius: 12px;
    }
    :root[data-theme="skyroof"] .unit-no svg { color: var(--status); }
    :root[data-theme="skyroof"] .stock-legend {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 3px 24px;
    }
    :root[data-theme="skyroof"] .stock-legend::before {
        content: "";
        grid-column: 2;
        grid-row: 1 / span 3;
        width: 74px;
        aspect-ratio: 1;
        border-radius: 50%;
        --ring-center: radial-gradient(closest-side, var(--surface) 68%, transparent 71%);
        background: var(--ring-center), conic-gradient(var(--available) 0 var(--available-stop), var(--reserved) var(--available-stop) var(--reserved-stop), var(--sold) var(--reserved-stop) 100%);
    }
    :root[data-theme="skyroof"] .stock-legend[data-total="0"]::before { background: var(--ring-center), var(--secondary); }
    :root[data-theme="skyroof"] .stock-legend > span { grid-column: 1; gap: 8px; }
    :root[data-theme="skyroof"] .stock-legend b { margin-inline-start: auto; }
    :root[data-theme="skyroof"] .budget-exceeded { color: var(--sold); background: var(--sold-bg); }
    :root[data-theme="skyroof"] .budget-committed { color: var(--reserved); background: var(--res-bg); }
    :root[data-theme="skyroof"] .recent-register th { background: #0a0f1c; color: var(--ink); }
    :root[data-theme="skyroof"] .recent-register td { border-bottom-color: var(--line); }
    :root[data-theme="skyroof"] .recent-register tr:hover td { background: rgb(255 255 255 / 3%); }
    :root[data-theme="skyroof"] .balance-foot {
        padding: 12px 16px;
        border: 1px solid var(--line);
        background: var(--surface);
        border-radius: 12px;
    }
}

@media screen and (hover: hover) {
    :root[data-theme="skyroof"] .metric[href]:hover {
        border-color: var(--sky-edge);
        transform: translateY(-3px);
        box-shadow: var(--sky-lift);
    }
    :root[data-theme="skyroof"] .panel:hover { border-color: var(--sky-edge); }
    :root[data-theme="skyroof"] .unit-tile[href]:hover { border-color: var(--status); }
}

@media screen {
    @container sky-metrics (max-width: 850px) {
        :root[data-theme="skyroof"] .metric {
            grid-template-columns: 36px minmax(0,1fr);
            grid-template-areas: "icon label" "amount amount" "note note";
            gap: 9px;
            padding: 20px 14px 14px;
        }
        :root[data-theme="skyroof"] .metric-ico { width: 36px; height: 36px; border-radius: 10px; }
        :root[data-theme="skyroof"] .metric-ico svg { width: 20px; height: 20px; }
    }
}
@media screen and (max-width: 650px) {
    :root[data-theme="skyroof"] .metrics { grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
    :root[data-theme="skyroof"] .metric {
        grid-template-columns: 48px minmax(0,1fr);
        grid-template-areas: "icon label" "icon amount" ". note";
        min-height: 0;
        gap: 3px 14px;
        padding: 14px 18px;
        border-radius: 16px;
    }
    :root[data-theme="skyroof"] .metric-ico { width: 48px; height: 48px; border-radius: 12px; }
    :root[data-theme="skyroof"] .metric-ico svg { width: 22px; height: 22px; }
    :root[data-theme="skyroof"] .panel-heading { padding: 13px 15px; }
}
@media (prefers-reduced-motion: reduce) {
    :root[data-theme="skyroof"] :is(.panel,.metric) { transition: none; }
    :root[data-theme="skyroof"] .metric[href]:hover { transform: none; }
}
