:root {
    --gh-ink-950: #15111f;
    --gh-ink-800: #30293d;
    --gh-ink-650: #5a5267;
    --gh-ink-500: #746c80;
    --gh-surface: #fffdfb;
    --gh-surface-soft: #f8f5f3;
    --gh-border: #e8e1dc;
    --gh-gold-700: #9b5f07;
    --gh-gold-600: #b87308;
    --gh-gold-500: #d89524;
    --gh-gold-300: #f4cb77;
    --gh-gold-100: #fff2d5;
    --gh-green-700: #2e6c55;
    --gh-green-100: #e6f3ed;
    --gh-danger-700: #9d3131;
    --gh-danger-100: #fff0ed;
    --gh-shadow-sm: 0 8px 28px rgba(39, 27, 21, .07);
    --gh-shadow-lg: 0 28px 80px rgba(28, 19, 14, .16);
    --gh-radius-sm: .75rem;
    --gh-radius-md: 1.1rem;
    --gh-radius-lg: 1.75rem;
    --gh-focus: 0 0 0 3px rgba(216, 149, 36, .28);
}

html {
    background: var(--gh-surface-soft);
}

body {
    margin: 0;
    color: var(--gh-ink-950);
    background: var(--gh-surface-soft);
    font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: none;
    box-shadow: var(--gh-focus);
}

.button {
    min-height: 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .75rem 1.1rem;
    border: 1px solid transparent;
    border-radius: .8rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--gh-gold-700), var(--gh-gold-500));
    box-shadow: 0 10px 24px rgba(184, 115, 8, .23);
}

.button-primary:hover {
    color: #fff;
    box-shadow: 0 14px 30px rgba(184, 115, 8, .3);
}

.button-quiet {
    color: var(--gh-ink-800);
    background: #fff;
    border-color: var(--gh-border);
}

.button-full {
    width: 100%;
}

.brand-mark {
    width: 2.45rem;
    height: 2.45rem;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: .8rem .8rem .8rem .25rem;
    color: #fff;
    background: linear-gradient(145deg, var(--gh-gold-300), var(--gh-gold-700));
    box-shadow: 0 10px 28px rgba(184, 115, 8, .28);
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 800;
}

.brand-mark-large {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem 1rem 1rem .3rem;
    font-size: 1.4rem;
}

.login-layout {
    min-height: 100vh;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(26rem, 1.05fr) minmax(30rem, .95fr);
    background: var(--gh-surface);
}

.login-story {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 4vw, 4.5rem);
    color: #fff;
    background:
        radial-gradient(circle at 18% 16%, rgba(244, 203, 119, .25), transparent 28rem),
        radial-gradient(circle at 95% 82%, rgba(216, 149, 36, .16), transparent 24rem),
        linear-gradient(145deg, #21182c 0%, #33243b 52%, #231825 100%);
}

.login-story::before,
.login-story::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.login-story::before {
    width: 34rem;
    height: 34rem;
    right: -18rem;
    top: -10rem;
}

.login-story::after {
    width: 25rem;
    height: 25rem;
    left: -13rem;
    bottom: -14rem;
}

.login-brand,
.workspace-brand {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    color: inherit;
    text-decoration: none;
}

.login-brand strong,
.workspace-brand strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    letter-spacing: .01em;
}

.login-brand small,
.workspace-brand small {
    display: block;
    margin-top: .12rem;
    opacity: .7;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-story-copy {
    max-width: 42rem;
    margin-block: 5rem;
}

.login-kicker,
.workspace-eyebrow {
    display: block;
    color: var(--gh-gold-600);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.login-story .login-kicker {
    color: var(--gh-gold-300);
}

.login-story h2 {
    max-width: 12ch;
    margin: 1rem 0 1.3rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.65rem, 5vw, 5.5rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.045em;
}

.login-story-copy > p {
    max-width: 37rem;
    color: rgba(255, 255, 255, .72);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.75;
}

.login-proof-grid {
    max-width: 40rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 3rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--gh-radius-md);
    background: rgba(255, 255, 255, .1);
}

.login-proof-grid div {
    min-height: 6.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, .045);
}

.login-proof-grid strong,
.login-proof-grid span {
    display: block;
}

.login-proof-grid strong {
    margin-bottom: .45rem;
    font-size: .92rem;
}

.login-proof-grid span,
.login-story-footer {
    color: rgba(255, 255, 255, .56);
    font-size: .77rem;
    line-height: 1.5;
}

.login-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1.5rem, 5vw, 5rem);
    background:
        radial-gradient(circle at 80% 4%, rgba(244, 203, 119, .16), transparent 20rem),
        var(--gh-surface);
}

.login-card {
    width: min(100%, 28rem);
}

.login-card-heading {
    margin-bottom: 2.1rem;
}

.mobile-brand-mark {
    display: none;
    margin-bottom: 2rem;
}

.login-card h1,
.status-card h1 {
    margin: .55rem 0 .65rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.25rem, 4vw, 3.15rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -.035em;
}

.login-card-heading p,
.status-card p {
    margin: 0;
    color: var(--gh-ink-650);
    line-height: 1.7;
}

.login-form {
    display: grid;
    gap: .7rem;
}

.login-form > label,
.password-label-row label {
    color: var(--gh-ink-800);
    font-size: .84rem;
    font-weight: 750;
}

.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .6rem;
}

.password-label-row span {
    color: var(--gh-ink-500);
    font-size: .72rem;
}

.login-form > input {
    width: 100%;
    min-height: 3.2rem;
    box-sizing: border-box;
    padding: .85rem 1rem;
    color: var(--gh-ink-950);
    border: 1px solid var(--gh-border);
    border-radius: .85rem;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.login-form > input:hover {
    border-color: #cfc4bc;
}

.login-form > input:focus {
    outline: none;
    border-color: var(--gh-gold-500);
    box-shadow: var(--gh-focus);
}

.login-form > input::placeholder {
    color: #a49ca8;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 2.75rem;
    margin: .25rem 0 .55rem;
    color: var(--gh-ink-650) !important;
    cursor: pointer;
}

.remember-option input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--gh-gold-600);
}

.form-alert {
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    color: var(--gh-danger-700);
    border: 1px solid #f2c9c1;
    border-radius: .8rem;
    background: var(--gh-danger-100);
    font-size: .84rem;
    line-height: 1.5;
}

.login-help {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 1.5rem;
    color: var(--gh-ink-500);
    font-size: .72rem;
    line-height: 1.5;
}

.security-dot {
    width: .48rem;
    height: .48rem;
    flex: 0 0 auto;
    display: inline-block;
    border-radius: 50%;
    background: #55a67f;
    box-shadow: 0 0 0 4px rgba(85, 166, 127, .13);
}

.status-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: linear-gradient(145deg, #f8f3ec, #fff);
}

.status-card {
    width: min(100%, 34rem);
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-lg);
    background: #fff;
    box-shadow: var(--gh-shadow-lg);
}

.status-card .login-kicker {
    margin-top: 1.6rem;
}

.status-card .button {
    margin-top: 1.5rem;
}

.workspace-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    background: #f7f4f1;
}

.workspace-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.1rem;
    color: #f8f2ec;
    background: linear-gradient(180deg, #201726, #2d2130);
}

.workspace-brand {
    padding: .35rem .45rem 1.7rem;
}

.workspace-nav {
    display: grid;
    gap: .35rem;
}

.workspace-nav-label {
    margin: 1.35rem .75rem .4rem;
    color: rgba(255, 255, 255, .38);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.workspace-nav-link {
    width: 100%;
    min-height: 2.85rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .8rem;
    color: rgba(255, 255, 255, .67);
    border: 0;
    border-radius: .75rem;
    background: transparent;
    font-size: .86rem;
    text-align: left;
    text-decoration: none;
}

.workspace-nav-link > span {
    width: 1.2rem;
    color: var(--gh-gold-300);
    font-size: 1.05rem;
    text-align: center;
}

.workspace-nav-link small {
    margin-left: auto;
    color: rgba(255, 255, 255, .28);
    font-size: .62rem;
    text-transform: uppercase;
}

.workspace-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 3px 0 0 var(--gh-gold-300);
}

.workspace-nav-link:disabled {
    opacity: .8;
}

.workspace-sidebar-footer {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: auto;
    padding: 1rem .6rem .35rem;
    color: rgba(255, 255, 255, .48);
    font-size: .7rem;
}

.workspace-main {
    min-width: 0;
}

.workspace-topbar {
    min-height: 4.9rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1.2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--gh-border);
    background: rgba(255, 253, 251, .9);
    backdrop-filter: blur(16px);
}

.workspace-topbar strong,
.workspace-topbar span {
    display: block;
}

.workspace-topbar strong {
    margin-top: .2rem;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
}

.workspace-content {
    max-width: 90rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.organization-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 15rem;
    box-sizing: border-box;
    padding: clamp(2rem, 5vw, 4rem);
    color: #fff;
    border-radius: var(--gh-radius-lg);
    background:
        radial-gradient(circle at 80% 15%, rgba(244, 203, 119, .22), transparent 18rem),
        linear-gradient(135deg, #251a2b, #3b2a3e);
    box-shadow: var(--gh-shadow-lg);
}

.organization-hero::after {
    content: "";
    position: absolute;
    width: 19rem;
    height: 19rem;
    right: -8rem;
    bottom: -12rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.organization-hero .workspace-eyebrow {
    color: var(--gh-gold-300);
}

.organization-hero h1 {
    margin: .65rem 0 .8rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.04em;
}

.organization-hero p {
    max-width: 42rem;
    margin: 0;
    color: rgba(255, 255, 255, .65);
    line-height: 1.7;
}

.organization-monogram {
    position: relative;
    z-index: 1;
    width: clamp(6rem, 12vw, 9rem);
    height: clamp(6rem, 12vw, 9rem);
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 2rem 2rem 2rem .65rem;
    background: linear-gradient(145deg, rgba(244, 203, 119, .26), rgba(184, 115, 8, .12));
    font-family: Georgia, serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
}

.organization-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0 2.5rem;
}

.organization-meta-card,
.setup-card,
.member-welcome {
    border: 1px solid var(--gh-border);
    background: #fff;
    box-shadow: var(--gh-shadow-sm);
}

.organization-meta-card {
    padding: 1.25rem 1.4rem;
    border-radius: var(--gh-radius-md);
}

.organization-meta-card > span,
.organization-meta-card > strong,
.organization-meta-card > small {
    display: block;
}

.organization-meta-card > span {
    color: var(--gh-ink-500);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.organization-meta-card > strong {
    margin: .45rem 0 .25rem;
    font-family: Georgia, serif;
    font-size: 1.3rem;
}

.organization-meta-card > small {
    color: var(--gh-ink-500);
    font-size: .72rem;
}

.status-ready {
    color: var(--gh-green-700);
}

.status-ready i {
    width: .55rem;
    height: .55rem;
    display: inline-block;
    margin-right: .35rem;
    border-radius: 50%;
    background: #55a67f;
}

.workspace-section {
    margin-top: 2rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2,
.member-welcome h2 {
    margin: .3rem 0 0;
    font-family: Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -.025em;
}

.section-progress {
    padding: .45rem .7rem;
    color: var(--gh-gold-700);
    border-radius: 2rem;
    background: var(--gh-gold-100);
    font-size: .72rem;
    font-weight: 750;
}

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

.setup-card {
    min-height: 8.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 1rem;
    padding: 1.4rem;
    border-radius: var(--gh-radius-md);
}

.setup-card.complete {
    border-color: #cfe5da;
    background: linear-gradient(135deg, #fff, #f3faf6);
}

.setup-number {
    color: var(--gh-gold-600);
    font-family: Georgia, serif;
    font-size: 1.1rem;
}

.setup-card strong {
    display: block;
    margin-bottom: .35rem;
}

.setup-card p {
    margin: 0;
    color: var(--gh-ink-500);
    font-size: .8rem;
    line-height: 1.55;
}

.setup-state {
    padding: .3rem .55rem;
    color: var(--gh-green-700);
    border-radius: 1rem;
    background: var(--gh-green-100);
    font-size: .65rem;
    font-weight: 800;
}

.setup-state.muted {
    color: var(--gh-ink-500);
    background: var(--gh-surface-soft);
}

.member-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1.4rem;
    border-radius: var(--gh-radius-md);
}

.member-avatar {
    width: 3.3rem;
    height: 3.3rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 1rem;
    background: linear-gradient(145deg, var(--gh-gold-500), var(--gh-gold-700));
    font-family: Georgia, serif;
    font-size: 1.4rem;
}

.member-welcome h2 {
    font-size: 1.3rem;
}

.member-welcome p {
    margin: .25rem 0 0;
    color: var(--gh-ink-500);
    font-size: .78rem;
}

.role-badge {
    margin-left: auto;
    padding: .5rem .75rem;
    color: var(--gh-gold-700);
    border: 1px solid #efd5a4;
    border-radius: 2rem;
    background: var(--gh-gold-100);
    font-size: .72rem;
    font-weight: 750;
}

.route-loading,
.organization-loading {
    min-height: 50vh;
    display: grid;
    place-items: center;
    color: var(--gh-ink-500);
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 920px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-story {
        display: none;
    }

    .mobile-brand-mark {
        display: grid;
    }

    .login-panel {
        min-height: 100vh;
    }

    .workspace-shell {
        grid-template-columns: 1fr;
    }

    .workspace-sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: .75rem 1rem;
    }

    .workspace-brand {
        padding: 0;
    }

    .workspace-brand small,
    .workspace-sidebar-footer,
    .workspace-nav-label,
    .workspace-nav-link:not(.active) {
        display: none;
    }

    .workspace-nav {
        margin-left: auto;
    }

    .workspace-nav-link.active {
        min-height: 2.5rem;
    }

    .organization-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .login-panel {
        align-items: start;
        padding: 2rem 1.2rem;
    }

    .login-card {
        margin-top: 2rem;
    }

    .workspace-topbar {
        min-height: 4.4rem;
    }

    .workspace-topbar > div {
        display: none;
    }

    .workspace-topbar form {
        margin-left: auto;
    }

    .workspace-content {
        padding: 1rem;
    }

    .organization-hero {
        min-height: 18rem;
        align-items: end;
        padding: 1.5rem;
    }

    .organization-monogram {
        position: absolute;
        right: 1.2rem;
        top: 1.2rem;
        width: 4rem;
        height: 4rem;
        border-radius: 1.1rem 1.1rem 1.1rem .35rem;
        font-size: 2rem;
    }

    .organization-hero h1 {
        font-size: 2.45rem;
    }

    .setup-grid {
        grid-template-columns: 1fr;
    }

    .setup-card {
        grid-template-columns: auto 1fr;
    }

    .setup-state {
        grid-column: 2;
        justify-self: start;
    }

    .member-welcome {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .role-badge {
        width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        text-align: center;
    }
}

/* Phase 7: premium 3D brand assets and dimensional module controls. */
.brand-mark-3d {
    overflow: visible;
    border: 0;
    background: transparent;
}

.brand-mark-3d img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(157, 90, 12, .24));
}

.login-story-copy {
    position: relative;
    z-index: 2;
    max-width: 58%;
}

.login-story h2 {
    font-size: clamp(2.55rem, 4vw, 4.6rem);
}

.login-story-visual {
    position: absolute;
    z-index: 1;
    top: 13%;
    right: -2%;
    bottom: 2%;
    width: 48%;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.login-story-visual::before,
.login-story-visual::after {
    content: "";
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--gh-gold) 38%, transparent);
    border-radius: 50%;
}

.login-story-visual::before {
    width: 90%;
    aspect-ratio: 1;
    transform: rotate(-15deg);
}

.login-story-visual::after {
    width: 68%;
    aspect-ratio: 1;
    transform: rotate(18deg);
}

.login-story-visual img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    filter: drop-shadow(0 28px 38px rgba(139, 74, 7, .2));
}

.login-proof-grid {
    grid-template-columns: 1fr;
}

.login-proof-grid div {
    min-height: 4.4rem;
    padding: .85rem 1rem;
}

.login-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gh-border);
}

.login-platforms span {
    padding: .38rem .58rem;
    color: var(--gh-muted);
    border: 1px solid var(--gh-border);
    border-radius: 999px;
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.login-platforms .is-current {
    color: var(--gh-red);
    border-color: var(--gh-red);
    background: var(--gh-red-soft);
}

.organization-module-card,
.setup-card,
.organization-meta-card {
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.organization-module-card:hover,
.setup-card:hover,
.organization-meta-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--gh-gold) 70%, var(--gh-border));
    box-shadow: 0 16px 34px rgba(129, 72, 11, .12);
}

.organization-module-icon {
    position: relative;
    transform: perspective(160px) rotateX(7deg) rotateY(-7deg);
    border-color: color-mix(in srgb, var(--gh-gold) 58%, var(--gh-border));
    box-shadow:
        inset 1px 1px 0 color-mix(in srgb, var(--gh-text-strong) 8%, transparent),
        inset -2px -2px 0 color-mix(in srgb, var(--gh-gold) 10%, transparent),
        0 12px 22px rgba(133, 76, 13, .12);
}

/* Reference-led login composition: one rounded shell, illustration left, form right. */
.login-page {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: clamp(1rem, 4vw, 4.5rem);
    overflow: hidden;
}

.login-page::before,
.login-page::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 32rem;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.login-page::before {
    top: -19rem;
    left: -13rem;
    background: radial-gradient(circle, color-mix(in srgb, var(--gh-red) 18%, transparent), transparent 70%);
}

.login-page::after {
    right: -15rem;
    bottom: -20rem;
    background: radial-gradient(circle, color-mix(in srgb, var(--gh-gold) 22%, transparent), transparent 70%);
}

.login-shell-card {
    width: min(92rem, 100%);
    min-height: min(50rem, calc(100vh - clamp(2rem, 8vw, 9rem)));
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(27rem, .92fr);
    overflow: hidden;
    border: 1px solid var(--gh-border-strong);
    border-radius: clamp(1.5rem, 3vw, 3.25rem);
    background: var(--gh-surface);
    box-shadow: 0 34px 90px rgba(65, 35, 8, .16);
}

.login-shell-card .login-story,
.login-shell-card .login-panel {
    min-height: 0;
}

.login-shell-card .login-story {
    padding: clamp(1.6rem, 3vw, 3rem);
    border-right: 1px solid var(--gh-border);
    background:
        radial-gradient(circle at 24% 74%, color-mix(in srgb, var(--gh-gold) 12%, transparent), transparent 36%),
        var(--gh-surface);
}

.login-shell-card .login-story-copy {
    display: none;
}

.login-shell-card .login-story-copy h2 {
    max-width: 11ch;
    font-size: clamp(2rem, 3vw, 3.25rem);
}

.login-shell-card .login-story-copy > p,
.login-shell-card .login-proof-grid {
    display: none;
}

.login-shell-card .login-story-visual {
    inset: 7% 1% 1% 8%;
    width: auto;
}

.login-shell-card .login-story-visual img {
    width: 92%;
    max-height: 42rem;
}

.login-shell-card .login-story-footer {
    position: relative;
    z-index: 3;
    max-width: 20rem;
}

.login-shell-card .login-panel {
    padding: clamp(2rem, 5vw, 5rem);
    background: var(--gh-surface);
}

@media (max-width: 920px) {
    .login-page {
        padding: 0;
    }

    .login-shell-card {
        width: 100%;
        min-height: 100vh;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

.login-shell-card .login-story {
        display: none;
    }
}

/* Phase 8 dashboard: organizations, add-ons, app drafts, and publishing. */
.dashboard-hero {
    position: relative;
    min-height: 15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid var(--gh-border-strong);
    border-radius: var(--gh-radius-lg);
    background: var(--gh-surface);
    box-shadow: var(--gh-shadow);
}

.dashboard-hero > div:first-child {
    position: relative;
    z-index: 1;
}

.dashboard-hero h1 {
    margin: .65rem 0 .8rem;
    color: var(--gh-text-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: 1;
}

.dashboard-hero p {
    max-width: 46rem;
    margin: 0;
    color: var(--gh-muted);
    line-height: 1.7;
}

.dashboard-hero-mark {
    width: clamp(7rem, 13vw, 11rem);
    height: clamp(7rem, 13vw, 11rem);
    flex: 0 0 auto;
}

.dashboard-hero-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 22px 28px rgba(151, 83, 8, .22));
}

.dashboard-message {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border: 1px solid;
    border-radius: .9rem;
    font-size: .82rem;
}

.dashboard-message.is-success {
    color: var(--gh-success);
    border-color: var(--gh-success);
    background: var(--gh-success-soft);
}

.dashboard-message.is-error {
    color: var(--gh-danger);
    border-color: var(--gh-danger);
    background: var(--gh-danger-soft);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    margin: 1rem 0 2.5rem;
}

.dashboard-stats article {
    padding: 1.2rem;
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    background: var(--gh-surface);
    box-shadow: var(--gh-shadow-sm);
}

.dashboard-stats span,
.dashboard-stats strong,
.dashboard-stats small {
    display: block;
}

.dashboard-stats span {
    color: var(--gh-muted);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-stats strong {
    margin: .35rem 0;
    color: var(--gh-text-strong);
    font-family: Georgia, serif;
    font-size: 2rem;
}

.dashboard-stats small {
    color: var(--gh-muted);
    font-size: .69rem;
}

.dashboard-section {
    margin-top: 2.5rem;
    scroll-margin-top: 1rem;
}

.dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-section-heading h2 {
    margin: .3rem 0 0;
    color: var(--gh-text-strong);
    font-family: Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 500;
}

.dashboard-active-chip,
.published-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .7rem;
    color: var(--gh-success);
    border: 1px solid var(--gh-success);
    border-radius: 999px;
    background: var(--gh-success-soft);
    font-size: .68rem;
    font-weight: 800;
}

.dashboard-split {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr);
    gap: 1rem;
    align-items: start;
}

.dashboard-list,
.dashboard-app-list {
    display: grid;
    gap: .7rem;
}

.dashboard-list-card,
.dashboard-app-card {
    min-height: 5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--gh-text);
    border: 1px solid var(--gh-border);
    border-radius: 1rem;
    background: var(--gh-surface);
    text-decoration: none;
    box-shadow: var(--gh-shadow-sm);
}

.dashboard-list-card.is-selected {
    border-color: var(--gh-gold);
    box-shadow: inset 3px 0 0 var(--gh-red), var(--gh-shadow-sm);
}

.dashboard-list-card > span:nth-child(2),
.dashboard-app-card > div {
    min-width: 0;
    flex: 1;
}

.dashboard-list-card strong,
.dashboard-list-card small,
.dashboard-app-card strong,
.dashboard-app-card small {
    display: block;
}

.dashboard-list-card strong,
.dashboard-app-card strong,
.dashboard-addon-card strong {
    color: var(--gh-text-strong);
}

.dashboard-list-card small,
.dashboard-app-card small {
    margin-top: .25rem;
    color: var(--gh-muted);
    font-size: .7rem;
}

.dashboard-card-icon {
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--gh-red);
    border: 1px solid color-mix(in srgb, var(--gh-gold) 58%, var(--gh-border));
    border-radius: .8rem;
    background: var(--gh-surface);
    box-shadow: 0 10px 22px rgba(133, 76, 13, .11);
}

.dashboard-action-card {
    display: grid;
    gap: .7rem;
    padding: 1.35rem;
    border: 1px solid var(--gh-border);
    border-radius: 1.1rem;
    background: var(--gh-surface);
    box-shadow: var(--gh-shadow-sm);
}

.dashboard-action-card h3 {
    margin: 0 0 .5rem;
    color: var(--gh-text-strong);
    font-family: Georgia, serif;
    font-size: 1.45rem;
    font-weight: 500;
}

.dashboard-action-card label {
    margin-top: .2rem;
    color: var(--gh-text);
    font-size: .75rem;
    font-weight: 750;
}

.dashboard-action-card input {
    min-height: 3rem;
    width: 100%;
    padding: .75rem .9rem;
    color: var(--gh-text);
    border: 1px solid var(--gh-border);
    border-radius: .8rem;
    background: var(--gh-surface);
}

.dashboard-action-card input:focus {
    border-color: var(--gh-red);
    outline: 3px solid var(--gh-red-soft);
}

.dashboard-action-card .button {
    margin-top: .5rem;
}

.dashboard-addon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
}

.dashboard-addon-card {
    min-height: 15rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--gh-border);
    border-radius: 1rem;
    background: var(--gh-surface);
    box-shadow: var(--gh-shadow-sm);
}

.dashboard-addon-card.is-installed {
    border-color: var(--gh-success);
}

.dashboard-addon-card p,
.dashboard-empty-state p {
    margin: .4rem 0 0;
    color: var(--gh-muted);
    font-size: .75rem;
    line-height: 1.55;
}

.dashboard-addon-card button,
.dashboard-app-card button {
    min-height: 2.65rem;
    margin-top: auto;
    padding: .6rem .8rem;
    color: var(--gh-text);
    border: 1px solid var(--gh-border);
    border-radius: .75rem;
    background: var(--gh-surface);
    cursor: pointer;
    font-size: .72rem;
    font-weight: 800;
}

.dashboard-addon-card button:not(:disabled):hover,
.dashboard-app-card button:hover {
    color: #fff;
    border-color: var(--gh-red);
    background: var(--gh-red);
}

.dashboard-addon-card button:disabled {
    color: var(--gh-success);
    border-color: var(--gh-success);
    cursor: default;
}

.dashboard-app-builder {
    grid-template-columns: minmax(18rem, .7fr) minmax(0, 1.3fr);
}

.dashboard-empty-state {
    min-height: 16rem;
    display: grid;
    place-content: center;
    justify-items: center;
    padding: 2rem;
    color: var(--gh-red);
    border: 1px dashed var(--gh-border-strong);
    border-radius: 1rem;
    background: var(--gh-surface);
    text-align: center;
}

.dashboard-empty-state strong {
    margin-top: .7rem;
    color: var(--gh-text-strong);
}

@media (max-width: 1100px) {
    .dashboard-stats,
    .dashboard-addon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-hero {
        align-items: flex-end;
        min-height: 18rem;
        padding: 1.5rem;
    }

    .dashboard-hero-mark {
        position: absolute;
        align-self: flex-start;
        right: 2rem;
        width: 5rem;
        height: 5rem;
    }

    .dashboard-hero p {
        max-width: 80%;
    }

    .dashboard-split,
    .dashboard-app-builder {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dashboard-stats,
    .dashboard-addon-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-hero p {
        max-width: 100%;
    }
}

/* Phase M03 visual refinement: Goldenheart-native views, signals, and icon language. */
.dashboard-view-tabs,
.admin-view-tabs {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-bottom: .75rem;
    padding: .28rem;
    overflow-x: auto;
    border: 1px solid var(--gh-border);
    border-radius: 999px;
    background: var(--gh-surface);
    scrollbar-width: none;
}

.dashboard-view-tabs::-webkit-scrollbar,
.admin-view-tabs::-webkit-scrollbar {
    display: none;
}

.dashboard-view-tabs a,
.admin-view-tabs a {
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .45rem .8rem;
    color: var(--gh-muted);
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.dashboard-view-tabs a:hover,
.admin-view-tabs a:hover {
    color: var(--gh-text-strong);
    background: var(--gh-surface-muted);
}

.dashboard-view-tabs a.is-active,
.admin-view-tabs a.is-active {
    color: #fff;
    background: var(--gh-text-strong);
}

.dashboard-pulse {
    scroll-margin-top: 6rem;
}

.dashboard-pulse .dashboard-live-label {
    margin: 0;
}

.dashboard-pulse-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(14rem, .8fr);
    gap: .75rem;
}

.dashboard-pulse-grid > article {
    min-width: 0;
    min-height: 11.5rem;
    padding: 1rem;
    border: 1px solid var(--gh-border);
    border-radius: 1rem;
    background: var(--gh-surface);
}

.dashboard-pulse-score {
    display: flex;
    align-items: center;
    gap: 1rem;
    background:
        radial-gradient(circle at 15% 50%, color-mix(in srgb, var(--gh-red) 8%, transparent), transparent 10rem),
        var(--gh-surface) !important;
}

.dashboard-progress-ring {
    position: relative;
    width: 7.6rem;
    height: 7.6rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--gh-red) 0 var(--gh-progress-angle), var(--gh-border) var(--gh-progress-angle) 360deg);
}

.dashboard-progress-ring::after {
    position: absolute;
    inset: .75rem;
    content: "";
    border: 1px solid var(--gh-border);
    border-radius: 50%;
    background: var(--gh-surface);
}

.dashboard-progress-ring > span {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
}

.dashboard-progress-ring strong {
    color: var(--gh-text-strong);
    font-size: 1.45rem;
}

.dashboard-progress-ring small {
    color: var(--gh-muted);
    font-size: .6rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-pulse-score h3,
.dashboard-next-action h3 {
    margin: .25rem 0 .35rem;
    color: var(--gh-text-strong);
    font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 760;
}

.dashboard-pulse-score p,
.dashboard-next-action p {
    margin: 0;
    color: var(--gh-muted);
    font-size: .65rem;
    line-height: 1.55;
}

.dashboard-signal-bars {
    display: grid;
    align-content: start;
    gap: .65rem;
}

.dashboard-signal-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--gh-border);
}

.dashboard-signal-heading span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--gh-text-strong);
    font-size: .72rem;
    font-weight: 800;
}

.dashboard-signal-heading strong {
    color: var(--gh-red);
    font-size: .72rem;
}

.dashboard-signal-bars label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .3rem .65rem;
    color: var(--gh-muted);
    font-size: .62rem;
}

.dashboard-signal-bars label strong {
    color: var(--gh-text-strong);
}

.dashboard-signal-bars progress {
    grid-column: 1 / -1;
    width: 100%;
    height: .45rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--gh-border);
    accent-color: var(--gh-red);
}

.dashboard-signal-bars progress::-webkit-progress-bar {
    background: var(--gh-border);
}

.dashboard-signal-bars progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gh-red), var(--gh-gold));
}

.dashboard-next-action {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--gh-gold) 23%, transparent), transparent 10rem),
        var(--gh-surface) !important;
}

.dashboard-next-icon {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    margin-bottom: .8rem;
    color: var(--gh-red);
    border: 1px solid color-mix(in srgb, var(--gh-gold) 60%, var(--gh-border));
    border-radius: .85rem;
    background: var(--gh-gold-soft);
}

.dashboard-next-action a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .8rem;
    color: var(--gh-red);
    font-size: .66rem;
    font-weight: 850;
    text-decoration: none;
}

.dashboard-addon-card .dashboard-card-icon {
    position: relative;
    overflow: hidden;
}

.dashboard-addon-card .dashboard-card-icon::after {
    position: absolute;
    right: .22rem;
    bottom: .18rem;
    width: .28rem;
    height: .28rem;
    content: "";
    border-radius: 50%;
    background: var(--gh-gold);
    box-shadow: 0 0 0 2px var(--gh-surface);
}

@media (max-width: 1280px) {
    .dashboard-pulse-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-next-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .dashboard-view-tabs {
        margin-inline: -.1rem;
        border-radius: 1rem;
    }

    .dashboard-view-tabs a {
        min-width: max-content;
    }

    .dashboard-pulse-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-next-action {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .dashboard-pulse-score {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-progress-ring {
        width: 6.5rem;
        height: 6.5rem;
    }
}

.published-app-shell {
    min-height: calc(100vh - 12rem);
    overflow: hidden;
    border: 1px solid var(--gh-border-strong);
    border-radius: var(--gh-radius-lg);
    background: var(--gh-surface);
    box-shadow: var(--gh-shadow);
}

.published-app-brand {
    min-height: 5rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gh-border);
}

.published-app-brand img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.published-app-brand strong,
.published-app-brand small {
    display: block;
}

.published-app-brand strong {
    color: var(--gh-text-strong);
    font-family: Georgia, serif;
}

.published-app-brand small {
    margin-top: .15rem;
    color: var(--gh-muted);
    font-size: .68rem;
}

.published-app-content {
    min-height: 32rem;
    display: grid;
    place-content: center;
    justify-items: start;
    padding: clamp(2rem, 7vw, 7rem);
    background:
        radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--gh-gold) 15%, transparent), transparent 28rem),
        var(--gh-surface);
}

.published-app-content h1 {
    margin: .6rem 0 .8rem;
    color: var(--gh-text-strong);
    font-family: Georgia, serif;
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: 500;
    letter-spacing: -.05em;
}

.published-app-content > p {
    max-width: 42rem;
    margin: 0;
    color: var(--gh-muted);
    line-height: 1.7;
}

.published-app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin: 2rem 0;
}

.published-app-meta span {
    padding: .65rem .8rem;
    color: var(--gh-muted);
    border: 1px solid var(--gh-border);
    border-radius: .75rem;
    font-size: .72rem;
}

.published-app-meta strong {
    margin-left: .3rem;
    color: var(--gh-text-strong);
}

.organization-module-icon::after {
    content: "";
    position: absolute;
    inset: 4px;
    pointer-events: none;
    border-top: 1px solid color-mix(in srgb, white 72%, transparent);
    border-radius: .55rem;
}

@media (max-width: 1220px) and (min-width: 921px) {
    .login-story-copy {
        max-width: 62%;
    }

    .login-story h2 {
        font-size: 3.15rem;
    }

    .login-story-visual {
        right: -8%;
        width: 46%;
        opacity: .88;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Goldenheart semantic theme layer: pure-white light and pure-black dark. */
:root {
    --gh-ink-950: var(--gh-text-strong);
    --gh-ink-800: var(--gh-text);
    --gh-ink-650: var(--gh-muted);
    --gh-ink-500: var(--gh-muted);
    --gh-surface-soft: var(--gh-canvas);
    --gh-gold-700: var(--gh-gold-strong);
    --gh-gold-600: var(--gh-gold-strong);
    --gh-gold-500: var(--gh-gold);
    --gh-gold-300: var(--gh-gold);
    --gh-gold-100: var(--gh-gold-soft);
    --gh-green-700: var(--gh-success);
    --gh-green-100: var(--gh-success-soft);
    --gh-danger-700: var(--gh-danger);
    --gh-danger-100: var(--gh-danger-soft);
    --gh-shadow-sm: var(--gh-shadow);
    --gh-shadow-lg: var(--gh-shadow);
}

html,
body,
.login-page,
.login-panel,
.workspace-shell,
.workspace-main,
.workspace-content,
.status-page {
    color: var(--gh-text);
    background: var(--gh-canvas);
}

.button-primary {
    color: #fff;
    background: var(--gh-red);
    box-shadow: none;
}

.button-primary:hover {
    color: #fff;
    background: var(--gh-red-strong);
    box-shadow: none;
}

.button-quiet,
.login-form > input,
.status-card,
.organization-meta-card,
.setup-card,
.member-welcome {
    color: var(--gh-text);
    border-color: var(--gh-border);
    background: var(--gh-surface);
}

.brand-mark {
    color: var(--gh-red);
    border: 1px solid var(--gh-gold);
    border-radius: .8rem;
    background: var(--gh-surface);
    box-shadow: none;
}

.login-story,
.workspace-sidebar,
.organization-hero {
    color: var(--gh-text);
    border-color: var(--gh-border);
    background: var(--gh-surface);
    box-shadow: var(--gh-shadow);
}

.login-story {
    border-right: 1px solid var(--gh-border);
}

.login-story::before,
.login-story::after,
.organization-hero::after {
    border-color: var(--gh-border);
}

.login-brand,
.workspace-brand,
.login-story h2,
.organization-hero h1 {
    color: var(--gh-text-strong);
}

.login-brand small,
.workspace-brand small,
.login-story-copy > p,
.login-proof-grid span,
.login-story-footer,
.organization-hero p {
    color: var(--gh-muted);
}

.login-story .login-kicker,
.organization-hero .workspace-eyebrow,
.login-kicker,
.workspace-eyebrow {
    color: var(--gh-red);
}

.login-proof-grid {
    border-color: var(--gh-border);
    background: var(--gh-border);
}

.login-proof-grid div {
    color: var(--gh-text);
    background: var(--gh-surface);
}

.login-panel {
    position: relative;
}

.login-panel-toolbar {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
}

.login-form > input:focus {
    border-color: var(--gh-red);
}

.login-form > input::placeholder {
    color: var(--gh-muted);
    opacity: .72;
}

.remember-option input {
    accent-color: var(--gh-red);
}

.workspace-sidebar {
    border-right: 1px solid var(--gh-border);
}

.workspace-nav-label,
.workspace-sidebar-footer,
.workspace-nav-link,
.workspace-nav-link small {
    color: var(--gh-muted);
}

.workspace-nav-link .gh-icon {
    color: var(--gh-gold-strong);
}

.workspace-nav-link.active {
    color: var(--gh-text-strong);
    background: var(--gh-red-soft);
    box-shadow: inset 3px 0 0 var(--gh-red);
}

.workspace-topbar {
    background: var(--gh-surface);
    backdrop-filter: none;
}

.workspace-topbar-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.organization-hero {
    border: 1px solid var(--gh-border-strong);
}

.organization-monogram,
.member-avatar {
    color: var(--gh-red);
    border: 1px solid var(--gh-gold);
    border-radius: 1.4rem;
    background: var(--gh-gold-soft);
}

.setup-card.complete {
    border-color: var(--gh-success);
    background: var(--gh-surface);
}

.organization-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.organization-module-card {
    min-height: 11.5rem;
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    background: var(--gh-surface);
    box-shadow: var(--gh-shadow-sm);
}

.organization-module-card.is-active {
    border-color: var(--gh-gold);
}

.organization-module-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    color: var(--gh-red);
    border: 1px solid var(--gh-border);
    border-radius: .75rem;
    background: var(--gh-surface);
}

.organization-module-card strong {
    display: block;
    margin-top: 1rem;
    color: var(--gh-text-strong);
    font-size: .9rem;
}

.organization-module-card p {
    margin: .35rem 0 .8rem;
    color: var(--gh-muted);
    font-size: .75rem;
    line-height: 1.5;
}

.organization-module-state {
    margin-top: auto;
    color: var(--gh-muted);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.organization-module-card.is-active .organization-module-state {
    color: var(--gh-success);
}

@media (max-width: 1100px) {
    .organization-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .login-panel-toolbar {
        top: 1rem;
        right: 1rem;
    }

    .workspace-topbar > .workspace-topbar-actions {
        display: flex;
        margin-left: auto;
    }

    .organization-module-grid {
        grid-template-columns: 1fr;
    }

    .workspace-topbar-actions .gh-theme-toggle span,
    .workspace-topbar-actions .button-quiet .gh-icon {
        display: none;
    }
}

/* Keep dimensional asset overrides after the semantic theme layer. */
.brand-mark.brand-mark-3d {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.organization-module-icon {
    border-color: color-mix(in srgb, var(--gh-gold) 58%, var(--gh-border));
    box-shadow:
        inset 1px 1px 0 color-mix(in srgb, var(--gh-text-strong) 8%, transparent),
        inset -2px -2px 0 color-mix(in srgb, var(--gh-gold) 10%, transparent),
        0 12px 22px rgba(133, 76, 13, .12);
}

/* Phase M03 visual refinement: reference-led full-display command center. */
.workspace-shell {
    min-height: 100dvh;
    grid-template-columns: 15.5rem minmax(0, 1fr);
    background: var(--gh-canvas);
}

.workspace-sidebar {
    z-index: 20;
    width: 15.5rem;
    padding: 1.1rem .9rem;
    border-right: 1px solid var(--gh-border);
    background: var(--gh-surface);
    box-shadow: none;
}

.workspace-brand {
    min-height: 3.5rem;
    padding: .35rem .45rem 1.25rem;
}

.workspace-nav-link {
    min-height: 3rem;
    padding: .72rem .85rem;
    border-radius: .85rem;
}

.workspace-main {
    min-height: 100dvh;
    background: var(--gh-canvas);
}

.workspace-topbar {
    position: sticky;
    z-index: 15;
    top: 0;
    min-height: 4.65rem;
    padding: .75rem 1.25rem;
    background: color-mix(in srgb, var(--gh-surface) 94%, transparent);
    backdrop-filter: blur(18px);
}

.workspace-search {
    width: min(38rem, 52vw);
    min-height: 2.9rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 0 .85rem;
    color: var(--gh-muted);
    border: 1px solid var(--gh-border);
    border-radius: .9rem;
    background: var(--gh-surface);
}

.workspace-search:focus-within {
    border-color: var(--gh-red);
    box-shadow: var(--gh-focus);
}

.workspace-search input {
    min-width: 0;
    flex: 1;
    color: var(--gh-text);
    border: 0;
    outline: 0;
    background: transparent;
    font-size: .78rem;
}

.workspace-search input::placeholder {
    color: var(--gh-muted);
    opacity: .72;
}

.workspace-search > span {
    padding: .2rem .4rem;
    color: var(--gh-muted);
    border: 1px solid var(--gh-border);
    border-radius: .35rem;
    font-size: .58rem;
}

.workspace-icon-button {
    width: 2.65rem;
    height: 2.65rem;
    display: grid;
    place-items: center;
    color: var(--gh-text);
    border: 1px solid var(--gh-border);
    border-radius: .75rem;
    background: var(--gh-surface);
    text-decoration: none;
}

.workspace-icon-button:hover {
    color: var(--gh-red);
    border-color: var(--gh-red);
}

.workspace-content {
    max-width: none;
    margin: 0;
    padding: 1.1rem 1.25rem 2rem;
}

.workspace-mobile-nav {
    display: none;
}

.dashboard-workspace {
    width: 100%;
}

.dashboard-command-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19.5rem;
    gap: 1rem;
    align-items: start;
}

.dashboard-primary-column {
    min-width: 0;
}

.dashboard-hero-compact {
    min-height: 13.5rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 1.3rem;
    background:
        radial-gradient(circle at 78% 28%, color-mix(in srgb, var(--gh-gold) 15%, transparent), transparent 21rem),
        radial-gradient(circle at 12% 105%, color-mix(in srgb, var(--gh-red) 8%, transparent), transparent 20rem),
        var(--gh-surface);
}

.dashboard-hero-compact h1 {
    max-width: 15ch;
    margin: .55rem 0 .65rem;
    font-size: clamp(2.35rem, 4vw, 4.25rem);
}

.dashboard-hero-compact p {
    max-width: 48rem;
    font-size: .84rem;
}

.dashboard-live-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1rem;
    color: var(--gh-success);
    font-size: .65rem;
    font-weight: 800;
}

.dashboard-live-label i,
.dashboard-active-chip i {
    width: .48rem;
    height: .48rem;
    display: inline-block;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.35rem;
}

.dashboard-hero-actions .button {
    min-height: 2.65rem;
    padding: .65rem .85rem;
    font-size: .72rem;
}

.dashboard-hero-compact .dashboard-hero-mark {
    width: clamp(7rem, 10vw, 9.5rem);
    height: clamp(7rem, 10vw, 9.5rem);
}

.dashboard-stats {
    gap: .7rem;
    margin: .75rem 0 0;
}

.dashboard-stats article {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem;
    border-radius: 1rem;
    box-shadow: none;
}

.dashboard-stats article > div {
    min-width: 0;
}

.dashboard-stat-icon {
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    display: grid !important;
    place-items: center;
    color: var(--gh-red) !important;
    border: 1px solid color-mix(in srgb, var(--gh-gold) 60%, var(--gh-border));
    border-radius: .72rem;
    background: var(--gh-gold-soft);
}

.dashboard-stats article small {
    color: var(--gh-muted);
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dashboard-stats article strong {
    margin: .1rem 0;
    font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 1.6rem;
    font-weight: 780;
}

.dashboard-stats article div > span {
    overflow: hidden;
    color: var(--gh-muted);
    font-size: .6rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-panel,
.dashboard-insight-card {
    border: 1px solid var(--gh-border);
    background: var(--gh-surface);
    box-shadow: none;
}

.dashboard-panel {
    padding: 1.1rem;
    border-radius: 1.2rem;
}

.dashboard-primary-column > .dashboard-section {
    margin-top: .8rem;
}

.dashboard-section-heading {
    align-items: center;
    margin-bottom: .85rem;
}

.dashboard-section-heading h2 {
    margin-top: .15rem;
    font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 1.35rem;
    font-weight: 720;
    letter-spacing: -.025em;
}

.dashboard-active-chip {
    color: var(--gh-success);
}

.dashboard-list-card,
.dashboard-app-card,
.dashboard-action-card {
    box-shadow: none;
}

.dashboard-list-card,
.dashboard-app-card {
    min-height: 4.5rem;
    padding: .85rem;
    border-radius: .9rem;
}

.dashboard-list-card:hover,
.dashboard-app-card:hover {
    border-color: var(--gh-gold);
}

.dashboard-action-card {
    padding: 1rem;
    border-radius: .95rem;
}

.dashboard-action-card h3 {
    font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 1.12rem;
    font-weight: 720;
}

.dashboard-action-card-accent {
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--gh-gold) 14%, transparent), transparent 12rem),
        var(--gh-surface);
}

.dashboard-app-builder {
    grid-template-columns: minmax(17rem, .75fr) minmax(0, 1.25fr);
}

.dashboard-empty-state {
    min-height: 14rem;
}

.dashboard-insight-rail {
    position: sticky;
    top: 5.75rem;
    display: grid;
    gap: .75rem;
}

.dashboard-insight-card {
    padding: 1rem;
    border-radius: 1.05rem;
}

.dashboard-identity-card {
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--gh-gold) 18%, transparent), transparent 9rem),
        var(--gh-surface);
}

.dashboard-identity-mark {
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: .65rem;
}

.dashboard-identity-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dashboard-identity-card h2 {
    margin: .35rem 0 .2rem;
    color: var(--gh-text-strong);
    font-family: Georgia, serif;
    font-size: 1.45rem;
    font-weight: 500;
}

.dashboard-identity-card p {
    margin: 0;
    color: var(--gh-muted);
    font-size: .7rem;
}

.dashboard-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .85rem;
    padding: .4rem .55rem;
    color: var(--gh-success);
    border: 1px solid color-mix(in srgb, var(--gh-success) 35%, var(--gh-border));
    border-radius: 999px;
    background: var(--gh-success-soft);
    font-size: .62rem;
    font-weight: 800;
}

.dashboard-user-line {
    display: block;
    margin-top: .65rem;
    color: var(--gh-muted);
    font-size: .61rem;
}

.dashboard-rail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.dashboard-rail-heading h2 {
    margin: 0;
    color: var(--gh-text-strong);
    font-size: .78rem;
    font-weight: 800;
}

.dashboard-rail-heading > span {
    color: var(--gh-red);
    font-size: .7rem;
    font-weight: 850;
}

.dashboard-progress-list {
    display: grid;
    gap: .8rem;
    margin-top: .85rem;
}

.dashboard-progress-list label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .35rem .65rem;
    color: var(--gh-muted);
    font-size: .65rem;
}

.dashboard-progress-list strong {
    color: var(--gh-text-strong);
}

.dashboard-progress-list progress {
    grid-column: 1 / -1;
    width: 100%;
    height: .36rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--gh-border);
    accent-color: var(--gh-red);
}

.dashboard-progress-list progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--gh-border);
}

.dashboard-progress-list progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gh-red), var(--gh-gold));
}

.dashboard-activity-list {
    display: grid;
    gap: .8rem;
    margin: .9rem 0 0;
    padding: 0;
    list-style: none;
}

.dashboard-activity-list li {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
}

.dashboard-activity-list li > span {
    width: 1.8rem;
    height: 1.8rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--gh-red);
    border-radius: .55rem;
    background: var(--gh-red-soft);
}

.dashboard-activity-list strong,
.dashboard-activity-list small {
    display: block;
}

.dashboard-activity-list strong {
    color: var(--gh-text-strong);
    font-size: .67rem;
}

.dashboard-activity-list small {
    margin-top: .12rem;
    color: var(--gh-muted);
    font-size: .59rem;
    line-height: 1.45;
}

.dashboard-status-dot {
    color: var(--gh-success) !important;
}

.dashboard-health-list {
    margin-top: .7rem;
}

.dashboard-health-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .58rem 0;
    border-top: 1px solid var(--gh-border);
    font-size: .62rem;
}

.dashboard-health-list span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--gh-muted);
}

.dashboard-health-list strong {
    max-width: 8rem;
    overflow: hidden;
    color: var(--gh-text-strong);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-addon-panel {
    margin-top: 1rem;
}

.dashboard-addon-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-addon-card {
    min-height: 13.5rem;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: none;
}

.dashboard-addon-card:hover {
    transform: translateY(-2px);
    border-color: var(--gh-gold);
}

.dashboard-addon-card.is-installed {
    border-color: color-mix(in srgb, var(--gh-success) 55%, var(--gh-border));
}

.dashboard-addon-heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.dashboard-installed-check {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    color: var(--gh-success);
    font-size: .6rem;
    font-weight: 800;
}

@media (min-width: 1680px) {
    .dashboard-addon-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) {
    .dashboard-command-grid {
        grid-template-columns: minmax(0, 1fr) 17.5rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-addon-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1040px) {
    .workspace-shell {
        grid-template-columns: 5rem minmax(0, 1fr);
    }

    .workspace-sidebar {
        width: 5rem;
        align-items: center;
        padding-inline: .55rem;
    }

    .workspace-brand > span:last-child,
    .workspace-nav-label,
    .workspace-nav-link:not(.active) span:not(.gh-icon),
    .workspace-nav-link {
        font-size: 0;
    }

    .workspace-nav-link {
        justify-content: center;
        padding-inline: .7rem;
    }

    .workspace-sidebar-footer {
        justify-content: center;
        font-size: 0;
    }

    .dashboard-command-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-insight-rail {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .workspace-shell {
        display: block;
        padding-bottom: 4.75rem;
    }

    .workspace-sidebar {
        display: none;
    }

    .workspace-topbar {
        min-height: 4.2rem;
        padding: .65rem .75rem;
    }

    .workspace-search {
        width: auto;
        min-width: 0;
        flex: 1;
    }

    .workspace-search > span,
    .workspace-topbar-actions form,
    .workspace-topbar-actions .gh-theme-toggle span {
        display: none;
    }

    .workspace-content {
        padding: .7rem .7rem 1.5rem;
    }

    .workspace-mobile-nav {
        position: fixed;
        z-index: 50;
        right: .65rem;
        bottom: max(.65rem, env(safe-area-inset-bottom));
        left: .65rem;
        min-height: 4rem;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
        padding: .35rem;
        border: 1px solid var(--gh-border);
        border-radius: 1.2rem;
        background: var(--gh-surface);
        box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
    }

    .workspace-mobile-nav a {
        min-height: 3.25rem;
        display: grid;
        place-content: center;
        justify-items: center;
        gap: .18rem;
        color: var(--gh-muted);
        border-radius: .9rem;
        font-size: .58rem;
        font-weight: 750;
        text-decoration: none;
    }

    .workspace-mobile-nav a.active {
        color: #fff;
        background: var(--gh-red);
    }

    .dashboard-hero-compact {
        min-height: 18rem;
        align-items: flex-end;
        padding: 1.25rem;
    }

    .dashboard-hero-compact .dashboard-hero-mark {
        top: .8rem;
        right: .8rem;
        width: 3.25rem;
        height: 3.25rem;
    }

    .dashboard-hero-compact h1 {
        max-width: 11ch;
        font-size: 2.55rem;
    }

    .dashboard-hero-compact p {
        max-width: 100%;
    }

    .dashboard-hero-actions .button {
        flex: 1 1 9rem;
    }

    .dashboard-split,
    .dashboard-app-builder {
        grid-template-columns: 1fr;
    }

    .dashboard-insight-rail,
    .dashboard-addon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .workspace-topbar-actions {
        gap: .35rem;
    }

    .workspace-icon-button,
    .gh-theme-toggle {
        width: 2.55rem;
        padding-inline: 0;
    }

    .dashboard-stats,
    .dashboard-insight-rail {
        grid-template-columns: 1fr;
    }

    .dashboard-panel {
        padding: .85rem;
    }

    .dashboard-addon-grid {
        display: flex;
        gap: .75rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: .35rem;
    }

    .dashboard-addon-card {
        min-width: min(78vw, 19rem);
        scroll-snap-align: start;
    }

    .dashboard-section-heading {
        align-items: flex-start;
    }

    .section-progress {
        font-size: .62rem;
    }
}
