/* Guidance Apps / App Planner — gc-* components (self-hosted, no CDN) */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    height: 100%;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: var(--gc-font);
    font-size: var(--gc-fs);
    font-weight: 400;
    line-height: 1.45;
    color: var(--gc-text);
    background: var(--gc-app-bg);
}

a {
    color: var(--gc-blue1);
    text-decoration-thickness: 0.08em;
}

a:hover {
    color: var(--gc-blue2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gc-blue1);
    outline-offset: 2px;
}

code {
    font-family: var(--gc-font-mono);
    font-size: 0.92em;
}

/* —— AppShell ——
   Canonical desktop chrome (style guide Admin Shell):
   iconnav · subnav · main · details — four columns side-by-side.
   Viewport-locked so iconnav foot stays at the bottom; panes scroll in-place. */
.gc-AppShell {
    display: grid;
    grid-template-columns: 52px var(--gc-sidebar-w) minmax(0, 1fr) minmax(280px, 360px);
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    background: var(--gc-app-bg);
}

.gc-AppShell > * {
    min-height: 0;
}

.gc-AppShell--no-details {
    grid-template-columns: 52px var(--gc-sidebar-w) minmax(0, 1fr);
}

.gc-AppShell--no-details .gc-AppShell__details {
    display: none;
}

/* Mid desktop: keep all four panes, compress subnav/details instead of stacking. */
@media (max-width: 72rem) and (min-width: 48.01rem) {
    .gc-AppShell {
        grid-template-columns: 52px 180px minmax(0, 1fr) minmax(260px, 320px);
    }

    .gc-AppShell--no-details {
        grid-template-columns: 52px 180px minmax(0, 1fr);
    }
}

.gc-AppShell__iconnav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: var(--gc-ink2);
    color: var(--gc-mist3);
    border-right: 1px solid var(--gc-ink4);
    padding: 8px 0;
    gap: 2px;
}

.gc-VisuallyHidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gc-AppShell__iconnav-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 4px auto 12px;
    border-radius: var(--gc-radius-lg);
    background: transparent;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
}

.gc-AppShell__iconnav-brand img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.gc-AppShell__iconnav-brand:hover {
    filter: brightness(1.08);
}

.gc-AppShell__iconnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    margin: 0 4px;
    border: 0;
    border-radius: var(--gc-radius);
    background: transparent;
    color: var(--gc-slate5);
    font: inherit;
    font-size: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
}

.gc-AppShell__iconnav-item i {
    font-size: 14px;
    color: var(--gc-slate4);
}

.gc-AppShell__iconnav-item:hover,
.gc-AppShell__iconnav-item:hover i {
    color: var(--gc-mist4);
    background: rgba(255, 255, 255, 0.06);
}

.gc-AppShell__iconnav-item--active,
.gc-AppShell__iconnav-item--active i {
    color: #fff;
    background: rgba(46, 98, 181, 0.35);
}

.gc-AppShell__iconnav-spacer {
    flex: 1;
}

.gc-AppShell__iconnav-foot {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 4px;
}

.gc-AppShell__subnav {
    display: flex;
    flex-direction: column;
    background: var(--gc-chrome-bg);
    border-right: 1px solid var(--gc-chrome-border);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.gc-AppShell__subnav-header {
    min-height: var(--gc-header-h);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 6px 12px;
    font-size: var(--gc-fs3);
    font-weight: 600;
    color: var(--gc-heading);
    background: var(--gc-nav-header-bg);
    border-bottom: 1px solid var(--gc-chrome-border);
    min-width: 0;
    box-sizing: border-box;
}

.gc-AppShell__subnav-logo {
    display: block;
    height: 18px;
    width: auto;
    max-width: 96px;
    object-fit: contain;
    flex-shrink: 0;
}

.gc-AppShell__subnav-logo--dark {
    display: none;
}

html[data-theme="dark"] .gc-AppShell__subnav-logo--light {
    display: none;
}

html[data-theme="dark"] .gc-AppShell__subnav-logo--dark {
    display: block;
}

.gc-AppShell__subnav-brand-text {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.gc-AppShell__subnav-product {
    font-size: 11px;
    font-weight: 600;
    color: var(--gc-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-AppShell__subnav-body {
    flex: 1;
    overflow: auto;
    padding: 8px 0 16px;
}

.gc-AppShell__subnav-label {
    padding: 10px 12px 4px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gc-chrome-text-muted);
}

.gc-AppShell__subnav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 12px;
    margin: 0 6px;
    border-radius: var(--gc-radius);
    color: var(--gc-chrome-text);
    text-decoration: none;
    font-size: var(--gc-fs);
    font-weight: 500;
}

.gc-AppShell__subnav-item-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-AppShell__subnav-item-badges {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
}

.gc-AppShell__subnav-minibadge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
    border: 1px solid var(--gc-border);
    background: var(--gc-surface);
    color: var(--gc-text-sec);
    white-space: nowrap;
}

.gc-AppShell__subnav-minibadge.is-ok {
    border-color: var(--gc-ok-bdr);
    background: var(--gc-ok-bg);
    color: var(--gc-ok-txt);
}

.gc-AppShell__subnav-minibadge.is-notice {
    border-color: var(--gc-notice-bdr);
    background: var(--gc-notice-bg);
    color: var(--gc-notice-txt);
}

.gc-AppShell__subnav-item:hover {
    background: var(--gc-nav-hover-bg);
    color: var(--gc-nav-active-text);
}

.gc-AppShell__subnav-item--active,
.gc-AppShell__subnav-item[aria-current="page"] {
    background: var(--gc-nav-active-bg);
    color: var(--gc-nav-active-text);
    font-weight: 600;
}

.gc-AppShell__subnav-meta {
    padding: 8px 12px;
    font-size: var(--gc-fs2);
    color: var(--gc-text-sec);
    border-top: 1px solid var(--gc-chrome-border);
}

.gc-AppShell__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--gc-app-bg);
}

.gc-AppShell__main-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    min-height: var(--gc-header-h);
    padding: 8px 16px;
    background: var(--gc-chrome-bg);
    border-bottom: 1px solid var(--gc-chrome-border);
}

.gc-AppShell__main-title {
    font-size: var(--gc-fs4);
    font-weight: 600;
    color: var(--gc-heading);
    line-height: 1.2;
}

.gc-AppShell__main-meta {
    font-size: var(--gc-fs2);
    color: var(--gc-text-sec);
    margin-top: 2px;
}

.gc-AppShell__main-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.gc-AppShell__main-body {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow: auto;
    position: relative;
}

.gc-AppShell__details {
    display: flex;
    flex-direction: column;
    background: var(--gc-chrome-bg);
    border-left: 1px solid var(--gc-chrome-border);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.gc-AppShell__details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--gc-header-h);
    padding: 0 12px;
    border-bottom: 1px solid var(--gc-chrome-border);
    background: var(--gc-nav-header-bg);
}

.gc-AppShell__details-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gc-chrome-text-muted);
}

.gc-AppShell__details-title {
    padding: 10px 12px 0;
    font-size: var(--gc-fs3);
    font-weight: 600;
    color: var(--gc-heading);
}

.gc-AppShell__details-body {
    padding: 10px 12px 16px;
    overflow: auto;
    flex: 1;
    min-height: 0;
    font-size: var(--gc-fs);
    color: var(--gc-text);
}

.gc-AppShell__card {
    background: var(--gc-surface);
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
}

.gc-AppShell__skeleton {
    height: 8px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gc-mist4), var(--gc-mist3), var(--gc-mist4));
    background-size: 200% 100%;
    animation: gc-shimmer 1.2s ease-in-out infinite;
    margin: 6px 0;
}

@keyframes gc-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

/* —— Buttons —— */
.gc-Button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font: inherit;
    font-size: var(--gc-fs);
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 10px;
    border-radius: var(--gc-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    background: var(--gc-mist4);
    color: var(--gc-heading);
}

.gc-Button:hover {
    filter: brightness(0.98);
}

.gc-Button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.gc-Button.primary {
    background: var(--gc-blue1);
    border-color: var(--gc-blue1);
    color: #fff;
}

.gc-Button.primary:hover {
    background: var(--gc-blue2);
    border-color: var(--gc-blue2);
    color: #fff;
}

.gc-Button.secondary {
    background: var(--gc-surface);
    border-color: var(--gc-border-strong);
    color: var(--gc-heading);
}

.gc-Button.default {
    background: var(--gc-mist4);
    border-color: var(--gc-border);
    color: var(--gc-heading);
}

.gc-Button.danger {
    background: var(--gc-red1);
    border-color: var(--gc-red1);
    color: #fff;
}

.gc-Button.ghost {
    background: transparent;
    border-color: transparent;
    color: var(--gc-blue1);
}

.gc-Button.ghost:hover {
    background: var(--gc-nav-hover-bg);
}

.gc-Button.ok {
    background: var(--gc-green1);
    border-color: var(--gc-green1);
    color: #fff;
}

.gc-Button.small {
    padding: 3px 7px;
    font-size: var(--gc-fs2);
}

/* —— Form controls —— */
.gc-Label {
    display: block;
    font-size: var(--gc-fs);
    font-weight: 500;
    color: var(--gc-heading);
    margin-bottom: 4px;
}

.gc-Label .required {
    color: var(--gc-red1);
}

.gc-TextInput,
textarea.gc-TextInput,
select.gc-TextInput {
    width: 100%;
    font: inherit;
    font-size: var(--gc-fs);
    color: var(--gc-text);
    background: var(--gc-input-bg);
    border: 1px solid var(--gc-border-strong);
    border-radius: var(--gc-radius);
    padding: 6px 8px;
}

.gc-TextInput.error {
    border-color: var(--gc-danger-bdr);
    background: var(--gc-danger-bg);
}

/* —— Steps (mother gc-Steps) + Wizard shell —— */
.gc-Steps {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 0 6px;
    margin: 0 0 12px;
    scrollbar-width: thin;
}

.gc-Step {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    margin: 0;
    padding: 2px 4px;
    border: 0;
    border-radius: var(--gc-radius);
    background: transparent;
    color: var(--gc-text-sec);
    font: inherit;
    font-size: var(--gc-fs);
    cursor: pointer;
    text-align: left;
}

.gc-Step:hover {
    background: var(--gc-hover-bg);
}

.gc-Step:focus-visible {
    outline: 2px solid var(--gc-blue2);
    outline-offset: 2px;
}

.gc-Step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    border: 1px solid var(--gc-border-strong);
    background: var(--gc-surface);
    color: var(--gc-slate4);
    font-size: var(--gc-fs1);
    font-weight: 700;
    line-height: 1;
}

.gc-Step-label {
    white-space: nowrap;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-Step.active {
    color: var(--gc-blue1);
    font-weight: 600;
}

.gc-Step.active .gc-Step-dot {
    background: var(--gc-blue1);
    border-color: var(--gc-blue1);
    color: #fff;
}

.gc-Step.done {
    color: var(--gc-text-sec);
}

.gc-Step.done .gc-Step-dot {
    background: var(--gc-green-bg);
    border-color: var(--gc-green-bdr);
    color: var(--gc-green1);
}

.gc-Step-connector {
    flex: 0 0 24px;
    height: 1px;
    background: var(--gc-border-strong);
    align-self: center;
}

.gc-Step-connector.done {
    background: var(--gc-green-bdr);
}

.gc-Wizard {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.gc-Wizard__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.gc-Wizard__header h2 {
    margin: 0;
}

.gc-Wizard__body {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.gc-Wizard__field {
    min-height: 26rem;
    resize: vertical;
    line-height: 1.45;
}

.gc-Wizard textarea.gc-TextInput:not(.gc-Wizard__field) {
    min-height: 26rem;
    resize: vertical;
}

.gc-Wizard__footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--gc-border);
}

.gc-Select {
    position: relative;
    display: inline-block;
}

.gc-Select select {
    appearance: none;
    width: 100%;
    font: inherit;
    font-size: var(--gc-fs);
    color: var(--gc-text);
    background: var(--gc-input-bg);
    border: 1px solid var(--gc-border-strong);
    border-radius: var(--gc-radius);
    padding: 6px 24px 6px 8px;
}

.gc-Select .arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gc-icon-muted);
    font-size: 10px;
}

.gc-ValidationMessage {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 4px;
    font-size: var(--gc-fs2);
    color: var(--gc-danger-txt);
}

.gc-SearchInput {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--gc-input-bg);
    border: 1px solid var(--gc-border-strong);
    border-radius: var(--gc-radius);
}

.gc-SearchInput input {
    flex: 1;
    border: 0;
    background: transparent;
    font: inherit;
    color: var(--gc-text);
    outline: none;
}

.gc-SearchInput .gc-Icon,
.gc-SearchInput i {
    color: var(--gc-icon-muted);
    font-size: var(--gc-icon);
}

/* —— Status / notices —— */
.gc-StatusBadge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--gc-border);
    background: var(--gc-mist5);
    color: var(--gc-text-sec);
    font-size: var(--gc-fs2);
    font-weight: 600;
}

.gc-StatusBadge.ok,
.gc-StatusBadge[data-tone="ok"] {
    background: var(--gc-ok-bg);
    border-color: var(--gc-ok-bdr);
    color: var(--gc-ok-txt);
}

.gc-StatusBadge.notice,
.gc-StatusBadge[data-tone="notice"] {
    background: var(--gc-notice-bg);
    border-color: var(--gc-notice-bdr);
    color: var(--gc-notice-txt);
}

.gc-StatusBadge.danger,
.gc-StatusBadge[data-tone="danger"] {
    background: var(--gc-danger-bg);
    border-color: var(--gc-danger-bdr);
    color: var(--gc-danger-txt);
}

.gc-StatusBadge.info,
.gc-StatusBadge[data-tone="info"] {
    background: var(--gc-blue5);
    border-color: var(--gc-blue3);
    color: var(--gc-blue1);
}

.gc-StatusBadge.muted,
.gc-StatusBadge[data-tone="muted"] {
    background: var(--gc-mist4);
    border-color: var(--gc-border);
    color: var(--gc-text-sec);
}

.gc-NoticeStrip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--gc-radius);
    border: 1px solid var(--gc-border);
    background: var(--gc-surface);
    margin-bottom: 12px;
    font-size: var(--gc-fs);
}

.gc-NoticeStrip.ok {
    background: var(--gc-ok-bg);
    border-color: var(--gc-ok-bdr);
    color: var(--gc-ok-txt);
}

.gc-NoticeStrip.notice {
    background: var(--gc-notice-bg);
    border-color: var(--gc-notice-bdr);
    color: var(--gc-notice-txt);
}

.gc-NoticeStrip.danger {
    background: var(--gc-danger-bg);
    border-color: var(--gc-danger-bdr);
    color: var(--gc-danger-txt);
}

.gc-NoticeStrip.info {
    background: var(--gc-blue5);
    border-color: var(--gc-blue3);
    color: var(--gc-blue1);
}

/* —— Tables / lists —— */
.gc-DataTable,
.gc-Table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--gc-fs);
}

.gc-DataTable th,
.gc-DataTable td,
.gc-Table th,
.gc-Table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gc-border);
    text-align: left;
    vertical-align: top;
}

.gc-DataTable th,
.gc-Table th {
    font-weight: 600;
    color: var(--gc-heading);
    background: var(--gc-surface-sunken);
}

.gc-List {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gc-List > li {
    border-top: 1px solid var(--gc-border);
    padding: 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    justify-content: space-between;
    align-items: baseline;
}

.gc-List > li:first-child {
    border-top: 0;
    padding-top: 0;
}

/* —— Tabs / breadcrumb (mother gc-Tabs; Figma 3023:6397) —— */
.gc-Tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--gc-border);
    margin-bottom: 12px;
}

.gc-Tab {
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 6px 14px;
    font: inherit;
    font-size: var(--gc-fs);
    font-weight: 400;
    color: var(--gc-text-sec);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gc-Tab:hover {
    color: var(--gc-heading);
}

.gc-Tab.active,
.gc-Tab[aria-current="page"],
.gc-Tab[aria-selected="true"] {
    color: var(--gc-blue1);
    border-bottom-color: var(--gc-blue1);
    font-weight: 600;
}

.gc-Breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: var(--gc-fs2);
    color: var(--gc-text-sec);
    margin-bottom: 8px;
}

.gc-Breadcrumb a {
    color: var(--gc-blue1);
    text-decoration: none;
}

.gc-Breadcrumb-current {
    color: var(--gc-heading);
    font-weight: 600;
}

/* —— Progress / loader / modal —— */
.gc-Progress {
    height: 6px;
    border-radius: 999px;
    background: var(--gc-mist4);
    overflow: hidden;
}

.gc-Progress-bar {
    height: 100%;
    background: var(--gc-blue1);
    border-radius: 999px;
}

.gc-Progress--indeterminate .gc-Progress-bar {
    width: 36%;
    animation: gc-progress-slide 1.15s ease-in-out infinite;
}

@keyframes gc-progress-slide {
    from { transform: translateX(-120%); }
    to { transform: translateX(320%); }
}

.gc-Loader {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--gc-mist3);
    border-top-color: var(--gc-blue1);
    border-radius: 50%;
    animation: gc-spin 0.7s linear infinite;
}

@keyframes gc-spin {
    to { transform: rotate(360deg); }
}

.gc-GeneratingIndicator {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.gc-GeneratingIndicator[aria-busy="true"] .gc-Progress {
    opacity: 1;
}

.gc-Modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 16, 23, 0.45);
}

.gc-Modal[hidden] {
    display: none !important;
}

.gc-Modal__dialog {
    width: min(28rem, 100%);
    background: var(--gc-surface);
    color: var(--gc-text);
    border: 1px solid var(--gc-border-strong);
    border-radius: var(--gc-radius-lg);
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 16, 23, 0.12);
}

.gc-Modal__dialog--wide {
    width: min(44rem, 100%);
    max-height: min(90dvh, 56rem);
    overflow: auto;
}

.gc-Modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.gc-Modal__head h2 {
    margin: 0 0 6px;
}

.gc-Modal__head p {
    margin: 0;
}

.gc-Modal__dialog h2 {
    margin: 0 0 6px;
    font-size: var(--gc-fs4);
    color: var(--gc-heading);
}

.gc-Modal__dialog p {
    margin: 0 0 12px;
}

.gc-Modal__head p,
.gc-Modal__dialog .gc-Meta {
    margin: 0;
}

.gc-Modal--in-page {
    position: absolute;
    z-index: 40;
}

.gc-AppShell:has(.is-feature-create-open) .gc-AppShell__main-body {
    overflow: hidden;
}

/* —— App Planner–specific —— */
.gc-RoleToggle {
    display: inline-flex;
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    overflow: hidden;
}

.gc-RoleToggle button {
    font: inherit;
    font-size: var(--gc-fs2);
    font-weight: 500;
    border: 0;
    background: var(--gc-surface);
    color: var(--gc-text-sec);
    padding: 4px 10px;
    cursor: pointer;
}

.gc-RoleToggle button[aria-pressed="true"] {
    background: var(--gc-blue1);
    color: #fff;
    font-weight: 600;
}

.gc-ContextChip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--gc-radius);
    background: var(--gc-mist5);
    border: 1px solid var(--gc-border);
    font-size: var(--gc-fs2);
    color: var(--gc-text-sec);
}

.gc-ContextChip strong {
    color: var(--gc-heading);
    font-weight: 600;
}

.gc-ChapterNav {
    background: var(--gc-surface);
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    padding: 10px;
}

.gc-ChapterNav h2 {
    margin: 0 0 8px;
    font-size: var(--gc-fs3);
    color: var(--gc-heading);
}

.gc-ChapterNav .gc-List > li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.gc-ChapterNav__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.gc-ChapterNav a[aria-current="page"] {
    font-weight: 700;
    color: var(--gc-nav-active-text);
    text-decoration: none;
}

.gc-GapPanel {
    margin-top: 1.75rem;
}

.gc-GapChecks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
    align-items: start;
}

.gc-GapCheck {
    min-width: 0;
}

.gc-GapCheck .gc-GapSectionTitle {
    margin-top: 0;
}

.gc-GapCheck ul {
    margin: 0;
    padding-left: 1.1rem;
}

.gc-GapCheck p {
    margin: 0 0 0.35rem;
}

@media (max-width: 52rem) {
    .gc-GapChecks {
        grid-template-columns: 1fr;
    }
}

.gc-GapSectionTitle {
    margin: 12px 0 6px;
    font-size: var(--gc-fs);
    font-weight: 600;
}

.gc-GapOpenList {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gc-GapOpenList__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--gc-border);
}

.gc-GapOpenList__row:last-child {
    border-bottom: none;
}

.gc-GapOpenList__body {
    flex: 1 1 12rem;
    min-width: 0;
}

.gc-GapOpenList__actions {
    flex: 0 0 auto;
}

.gc-Tab__status {
    font-size: 0.85em;
    width: auto;
}

.gc-Tab__status.is-ok {
    color: var(--gc-ok-txt);
}

.gc-Tab__status.is-open {
    color: var(--gc-notice-txt);
}

.gc-FreezeBar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gc-EmptyState {
    padding: 12px;
    border: 1px dashed var(--gc-border-strong);
    border-radius: var(--gc-radius);
    background: var(--gc-surface);
    color: var(--gc-text-sec);
}

.gc-EmptyState p {
    margin: 0 0 8px;
}

.gc-GuidePane {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: var(--gc-fs);
}

.gc-GuidePane__host:not(:empty) ~ [data-guide-idle],
.gc-GuidePane__host:has([data-studio-guide]) ~ [data-guide-idle] {
    display: none;
}

.gc-GuidePane__live {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.gc-GuidePane__panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.gc-GuidePane__panel > h2 {
    margin: 0;
    font-size: var(--gc-fs3);
    color: var(--gc-heading);
}

.gc-GuidePane__panel .gc-Form {
    max-width: none;
}

.gc-GuidePane__anchor {
    display: none;
}

.gc-Panel {
    background: var(--gc-surface);
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    padding: 12px;
}

.gc-Panel h2 {
    margin: 0 0 8px;
    font-size: var(--gc-fs3);
    color: var(--gc-heading);
}

.gc-Stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gc-PageTitle {
    margin: 0 0 2px;
    font-size: var(--gc-fs5);
    font-weight: 600;
    color: var(--gc-heading);
}

.gc-PageLead {
    margin: 0 0 16px;
    color: var(--gc-text-sec);
    font-size: var(--gc-fs);
}

.gc-Form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 28rem;
}

.gc-Actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.gc-Meta {
    color: var(--gc-text-sec);
    font-size: var(--gc-fs2);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html.studio-is-busy,
html.studio-is-busy body {
    overflow: hidden;
}

/* Narrow only: stack details under main. Never hide subnav — studio is desktop-first. */
@media (max-width: 48rem) {
    .gc-AppShell {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        height: 100%;
        max-height: 100vh;
        max-height: 100dvh;
    }

    .gc-AppShell__iconnav {
        grid-column: 1;
        grid-row: 1 / -1;
        height: auto;
        max-height: 100%;
    }

    .gc-AppShell__subnav {
        grid-column: 2;
        grid-row: 1;
        max-height: 40vh;
        border-right: 0;
        border-bottom: 1px solid var(--gc-chrome-border);
    }

    .gc-AppShell__main {
        grid-column: 2;
        grid-row: 2;
        min-height: 0;
    }

    /* Keep Gids reachable: stack under main instead of hiding the details column. */
    .gc-AppShell__details {
        display: flex;
        grid-column: 2;
        grid-row: 3;
        border-left: 0;
        border-top: 1px solid var(--gc-chrome-border);
        max-height: min(42vh, 24rem);
    }

    .gc-AppShell--no-details {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .gc-AppShell--no-details .gc-AppShell__subnav {
        grid-row: 1;
    }

    .gc-AppShell--no-details .gc-AppShell__main {
        grid-row: 2;
    }

    .gc-AppShell--no-details .gc-AppShell__details {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .gc-Progress--indeterminate .gc-Progress-bar {
        width: 100%;
        transform: none;
    }

    .gc-AppShell__skeleton {
        background: var(--gc-mist4);
    }
}
