
:root {
    color-scheme: light;
    --bg: #f2efe8;
    --panel: rgba(255, 252, 248, 0.9);
    --panel-strong: #fffdf9;
    --surface: #fffdf9;
    --surface-muted: #f6f1e8;
    --surface-gradient-start: #fffdf8;
    --surface-gradient-end: #f5f0e9;
    --shell-chrome: rgba(255, 250, 244, 0.92);
    --shell-sidebar: rgba(255, 250, 244, 0.82);
    --ink: #1f2933;
    --muted: #5f6c76;
    --line: rgba(31, 41, 51, 0.12);
    --accent: #0f766e;
    --accent-soft: #dff4f1;
    --warning: #b7791f;
    --warning-soft: #fff3d6;
    --success: #15803d;
    --success-soft: #dcfce7;
    --danger: #b83232;
    --danger-soft: #ffe2de;
    --shadow: 0 20px 40px rgba(39, 48, 58, 0.08);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111418;
    --panel: rgba(25, 30, 35, 0.92);
    --panel-strong: #1f252b;
    --surface: #20262c;
    --surface-muted: #171c21;
    --surface-gradient-start: #242b31;
    --surface-gradient-end: #171c21;
    --shell-chrome: rgba(21, 25, 30, 0.94);
    --shell-sidebar: rgba(22, 27, 32, 0.88);
    --ink: #eef2f4;
    --muted: #aab5bd;
    --line: rgba(238, 242, 244, 0.15);
    --accent: #4fc3b7;
    --accent-soft: rgba(79, 195, 183, 0.18);
    --warning: #f1c36d;
    --warning-soft: rgba(241, 195, 109, 0.16);
    --success: #86efac;
    --success-soft: rgba(134, 239, 172, 0.16);
    --danger: #ff8a7a;
    --danger-soft: rgba(255, 138, 122, 0.16);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Aptos", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(183, 121, 31, 0.15), transparent 24%),
        linear-gradient(180deg, #f7f3ec 0%, var(--bg) 100%);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(79, 195, 183, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(241, 195, 109, 0.1), transparent 24%),
        linear-gradient(180deg, #181d22 0%, var(--bg) 100%);
}

a {
    color: inherit;
}

/* Dev environment banner */
.dev-banner {
    position: sticky;
    top: 0;
    z-index: 200;
    padding: 8px 16px;
    background: var(--warning-soft);
    border-bottom: 1px solid var(--warning);
    color: var(--warning);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

/* Preview mode banner */
.preview-banner {
    padding: 10px 16px;
    background: var(--warning-soft);
    border: 1px solid var(--warning);
    border-radius: 6px;
    color: var(--warning);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-banner-link {
    background: none;
    border: none;
    color: var(--link);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    transition: grid-template-columns 0.25s ease;
}

.shell.shell-nav-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

/* Global top bar */
.shell-topbar {
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 95;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    background: var(--shell-chrome);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.shell-hamburger-topbar {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--ink);
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.shell-hamburger-topbar:hover {
    background: var(--accent-soft);
}

.topbar-search-area {
    position: relative;
    flex: 1;
    max-width: 520px;
}

.topbar-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 12px;
    font-size: 0.88rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    transition: border-color 0.15s;
}

.topbar-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.topbar-search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 4px;
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--line);
    min-width: 380px;
}

/* Plus button & context menu */
.topbar-plus-area {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shell-organization-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 360px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle-icon {
    width: 1em;
    line-height: 1;
    text-align: center;
}

.topbar-plus-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.topbar-bootstrap-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--fg-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.topbar-bootstrap-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.topbar-plus-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.topbar-plus-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    margin-top: 4px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--line);
}

.topbar-plus-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-size: 0.88rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.topbar-plus-menu-item:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.shell-sidebar {
    padding: 32px 24px;
    border-right: 1px solid var(--line);
    background: var(--shell-sidebar);
    backdrop-filter: blur(12px);
    overflow: hidden;
    overflow-y: auto;
    transition: width 0.25s ease, padding 0.25s ease;
    display: flex;
    flex-direction: column;
}

.shell-nav-collapsed .shell-sidebar {
    padding: 12px 4px;
}

.shell-brand {
    transition: opacity 0.2s ease;
}

.shell-nav-collapsed .shell-brand {
    display: none;
}

.shell-main {
    padding: 32px;
}

.shell-nav {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.shell-nav a,
.shell-footer-action,
.shell-nav-group-toggle {
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.15s, color 0.15s, padding 0.25s ease;
}

.shell-footer-action,
.shell-nav-group-toggle {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
}

.shell-nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    border-left: 3px solid var(--accent);
    padding-left: 11px;
}

.shell-nav a:hover,
.shell-footer-action:hover,
.shell-nav-group-toggle:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.shell-nav-group {
    display: grid;
    gap: 4px;
}

.shell-nav-group-toggle {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.shell-nav-group-active .shell-nav-group-toggle {
    color: var(--accent);
}

.shell-nav-group-chevron {
    margin-left: auto;
    font-size: 0.72rem;
    transition: transform 0.15s ease;
}

.shell-nav-group-expanded .shell-nav-group-chevron {
    transform: rotate(180deg);
}

.shell-nav-group-items {
    display: grid;
    gap: 4px;
    padding-left: 8px;
}

.shell-nav-group-items a {
    font-size: 0.92rem;
}

.bootstrap-org-sidebar-heading {
    cursor: default;
}

.bootstrap-org-sidebar-empty {
    padding: 9px 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.bootstrap-org-create-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bootstrap-org-create-link:hover,
.bootstrap-org-create-link:focus-visible {
    background: var(--accent-soft);
    color: var(--accent);
    outline: none;
}

.shell-context-panel {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.shell-context-title {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shell-context-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
}

.shell-context-panel a:hover,
.shell-context-panel a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.shell-footer-action {
    font-size: 0.9rem;
}

.nav-icon {
    flex-shrink: 0;
    width: 1.2em;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1;
}

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease, max-width 0.25s ease;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 800;
}

.host-nav-count {
    background: var(--accent-soft);
    color: var(--accent);
}

.host-nav-items {
    padding-left: 4px;
}

.host-nav-empty {
    padding: 9px 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.host-nav-host {
    display: grid;
    gap: 4px;
}

.host-nav-host-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.host-nav-host-toggle:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.host-nav-resource-items {
    display: grid;
    gap: 3px;
    padding-left: 12px;
}

.host-nav-resource-items a {
    min-width: 0;
    padding: 8px 10px;
}

.host-status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 999px;
    background: var(--muted);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 16%, transparent);
}

.host-status-green {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
}

.host-status-yellow {
    background: var(--warning);
    box-shadow: 0 0 0 3px var(--warning-soft);
}

.host-status-red {
    background: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}

.host-status-gray {
    background: var(--muted);
}

.organization-host-hero {
    align-items: center;
}

.organization-host-status,
.host-resource-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.organization-host-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.organization-host-detail,
.organization-host-summary {
    display: grid;
    gap: 16px;
}

.host-resource-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.host-resource-card {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
}

.host-resource-card:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.host-resource-card .muted {
    grid-column: 3;
}

.host-resource-detail {
    display: grid;
    gap: 12px;
}

.host-metadata-list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px 16px;
    margin: 0;
}

.host-metadata-list dt {
    color: var(--muted);
    font-weight: 700;
}

.host-metadata-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

/* Collapsed: icon-only rail */
.shell-nav-collapsed .shell-nav {
    margin-top: 12px;
    gap: 2px;
}

.shell-nav-collapsed .shell-nav a {
    justify-content: center;
    padding: 10px 8px;
    border-radius: 10px;
}

.shell-nav-collapsed .bootstrap-org-create-link {
    justify-content: center;
    padding: 10px 8px;
}

.shell-nav-collapsed .nav-label,
.shell-nav-collapsed .shell-nav-group-chevron {
    display: none;
}

.shell-nav-collapsed .shell-nav-group-toggle,
.shell-nav-collapsed .shell-footer-action {
    justify-content: center;
    padding: 10px 8px;
}

.shell-nav-collapsed .shell-nav-group-items {
    padding-left: 0;
}

.shell-nav-collapsed .shell-context-panel {
    display: none;
}

/* Tooltip on hover when collapsed */
.shell-nav-collapsed .shell-nav a {
    position: relative;
}

.shell-nav-collapsed .shell-nav-group-toggle,
.shell-nav-collapsed .shell-footer-action {
    position: relative;
}

.shell-nav-collapsed .shell-nav a:hover::after,
.shell-nav-collapsed .shell-nav-group-toggle:hover::after,
.shell-nav-collapsed .shell-footer-action:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--ink);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Shell sidebar actions */
.shell-sidebar-actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 4px;
}

/* Wiki edge tag — fixed right-edge tab */
.wiki-edge-tag {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 89;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 14px 8px;
    border: 1px solid var(--line);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: var(--shell-chrome);
    backdrop-filter: blur(10px);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.06);
    transition: background 0.15s, color 0.15s, transform 0.2s ease, opacity 0.2s ease;
}

.wiki-edge-tag:hover {
    background: var(--accent-soft);
    color: var(--accent);
    transform: translateY(-50%) translateX(-2px);
}

.wiki-edge-tag-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(100%);
}

/* Hamburger toggle (hidden on desktop) */
.shell-hamburger {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 110;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--shell-chrome);
    backdrop-filter: blur(8px);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--ink);
    transition: background 0.15s;
}

.shell-hamburger:hover {
    background: var(--accent-soft);
}

/* Desktop collapse toggle */
.shell-collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    width: 100%;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.shell-collapse-toggle:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.shell-nav-collapsed .shell-collapse-toggle {
    padding: 6px 8px;
    font-size: 0.95rem;
}

/* Mobile nav backdrop */
.shell-nav-backdrop {
    display: none;
}

/* Global wiki sidebar overlay */
.global-wiki-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.15);
}

.global-wiki-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 91;
    width: 360px;
    max-width: 90vw;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.15s ease-out;
}

.global-wiki-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 92;
    background: rgba(0, 0, 0, 0.18);
}

.settings-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 93;
    width: 360px;
    max-width: 92vw;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px;
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 0.15s ease-out;
}

.settings-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.settings-drawer-header h2 {
    margin: 0;
}

.settings-drawer-section {
    display: grid;
    gap: 6px;
}

.settings-drawer-label {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-drawer-section a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
}

.settings-drawer-section a:hover,
.settings-drawer-section a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.settings-drawer-subgroup {
    display: grid;
    gap: 4px;
}

.settings-drawer-subgroup p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px 4px;
    color: var(--ink);
    font-weight: 700;
}

.settings-drawer-subgroup a {
    margin-left: 28px;
    padding: 8px 12px;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@media (max-width: 600px) {
    .global-wiki-panel {
        width: 100vw;
        max-width: 100vw;
    }
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--accent);
}

.muted {
    color: var(--muted);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.panel.subtle {
    background: var(--panel-strong);
    box-shadow: none;
}

.hero {
    margin-bottom: 24px;
}

.bootstrap-intro {
    display: grid;
    gap: 18px;
}

.bootstrap-intro .toolbar {
    margin-bottom: 0;
}

.bootstrap-intro-minimal {
    max-width: 760px;
}

.bootstrap-intro-minimal h2 {
    margin-bottom: 8px;
}

.bootstrap-intro-subtitle {
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0 0 16px;
}

.bootstrap-intro-warning {
    color: #b45309;
    font-weight: 700;
    margin-bottom: 0;
}

html[data-theme="dark"] .bootstrap-intro-warning {
    color: #facc15;
}

.bootstrap-intro-expanded {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 18px;
    padding-top: 18px;
}

.bootstrap-intro-expanded h3 {
    margin-bottom: 8px;
}

.bootstrap-intro-dismissed .toolbar {
    margin-bottom: 0;
}

.button-secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.metric-grid,
.card-grid,
.content-grid {
    display: grid;
    gap: 16px;
}

.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-top: 20px;
}

.content-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.projects-page {
    display: grid;
    gap: 20px;
}

.settings-hero {
    margin-bottom: 18px;
}

.settings-grid {
    align-items: start;
}

.settings-organization-card {
    grid-column: span 2;
}

.settings-description-editor {
    min-height: 120px;
}

.organization-naming-preview {
    display: grid;
    gap: 10px;
}

.organization-naming-preview h4 {
    margin: 0;
}

.backup-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.backup-hero h2 {
    margin-top: 0;
}

.backup-actions-grid {
    align-items: start;
}

.projects-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.projects-hero h2 {
    margin-top: 0;
}

.project-system-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 600;
}

.project-system-toggle input {
    width: auto;
}

.projects-empty-state {
    display: grid;
    justify-items: start;
    gap: 12px;
    padding: 34px;
}

.project-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.4rem;
}

.project-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.project-card {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.project-card-system {
    background: var(--surface-muted);
    border-style: dashed;
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.project-card-header h3 {
    margin: 0 0 6px;
}

.project-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0;
}

.project-card-stats div {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-strong);
}

.project-card-stats dt {
    color: var(--muted);
    font-size: 0.78rem;
}

.project-card-stats dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.project-card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.project-card-footer div {
    display: grid;
    gap: 3px;
}

.project-card-link {
    justify-self: start;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.project-card-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.system-projects-section {
    display: grid;
    gap: 16px;
}

.project-detail-grid {
    align-items: start;
}

.tasks-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.tasks-hero h2 {
    margin-top: 0;
}

.tasks-lanes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.tasks-lane {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.tasks-lane-high {
    border-top: 4px solid var(--danger);
}

.tasks-lane-medium {
    border-top: 4px solid var(--warning);
}

.tasks-lane-low {
    border-top: 4px solid var(--accent);
}

.tasks-lane-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tasks-lane-header h3 {
    margin: 0 0 6px;
}

.task-card,
.task-empty-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.task-card {
    cursor: pointer;
}

.task-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.task-card-high {
    background: linear-gradient(180deg, var(--danger-soft), var(--surface));
}

.task-card-medium {
    background: linear-gradient(180deg, var(--warning-soft), var(--surface));
}

.task-card-header,
.task-card-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.task-card-header h4 {
    margin: 0;
}

.task-context {
    margin: 0;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .tasks-lanes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tasks-hero,
    .task-card-footer {
        display: grid;
    }
}

@media (max-width: 760px) {
    .projects-hero {
        display: grid;
    }

    .project-card-stats,
    .project-card-footer {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--surface-gradient-start), var(--surface-gradient-end));
    border: 1px solid var(--line);
}

.metric-card span {
    display: block;
    color: var(--muted);
}

.metric-card strong {
    font-size: 2rem;
}

.toolbar,
.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.toolbar {
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input,
textarea,
select,
button {
    font: inherit;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 10px 12px;
}

input,
textarea,
select {
    background: var(--surface);
    color: var(--ink);
}

button {
    cursor: pointer;
    background: var(--accent);
    color: white;
    border-color: transparent;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    filter: grayscale(0.35);
}

.stack {
    display: grid;
    gap: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.bootstrap-environment-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -6px -6px 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
}

.bootstrap-environment-tab {
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
}

.bootstrap-environment-tab:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.bootstrap-environment-tab-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.bootstrap-tab-attention {
    background: #fef3c7;
    border-color: #d97706;
    color: #92400e;
    animation: pulse-attention 2s ease-in-out infinite;
}

.bootstrap-tab-attention:hover {
    background: #fde68a;
    border-color: #d97706;
    color: #92400e;
}

html[data-theme="dark"] .bootstrap-tab-attention {
    background: rgba(250, 204, 21, 0.15);
    border-color: #facc15;
    color: #facc15;
}

html[data-theme="dark"] .bootstrap-tab-attention:hover {
    background: rgba(250, 204, 21, 0.25);
    border-color: #facc15;
    color: #facc15;
}

/* Environment host settings header */
.bootstrap-environment-host-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    border: 1px solid var(--accent);
    border-radius: 12px;
    margin-bottom: 20px;
}

.host-settings-title-section h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: var(--accent);
}

.host-settings-title-section p {
    margin: 0;
}

.host-settings-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pill-provider-key {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

/* Environment switcher */
.bootstrap-environment-switcher {
    padding: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 20px;
}

.switcher-label {
    display: block;
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.bootstrap-environment-switcher-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-environment-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-environment-switch:hover:not(:disabled) {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-environment-switch.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
}

.btn-environment-switch .env-name {
    font-weight: 600;
}

.btn-environment-switch .env-host {
    font-size: 0.85rem;
    opacity: 0.8;
}

.btn-environment-switch.active .env-host {
    opacity: 1;
}

/* Environment context summary */
.bootstrap-environment-context-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    padding: 14px 18px;
    background: var(--warning-soft);
    border: 1px solid var(--warning);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.bootstrap-environment-context-summary strong {
    color: var(--warning);
    font-weight: 600;
}

.bootstrap-environment-context-summary code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88rem;
}

html[data-theme="dark"] .bootstrap-environment-context-summary code {
    background: rgba(255, 255, 255, 0.12);
}

@keyframes pulse-attention {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.bootstrap-next-step-prompt {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bootstrap-next-step-prompt p {
    margin: 0;
    color: var(--accent);
}

.bootstrap-next-step-prompt button {
    align-self: flex-start;
}

.bootstrap-environment-panel {
    display: grid;
    gap: 16px;
}

.bootstrap-page-tabs,
.bootstrap-wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bootstrap-page-tab,
.bootstrap-wizard-step {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 14px;
    font-weight: 600;
}

.bootstrap-wizard-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bootstrap-step-marker,
.bootstrap-required-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
    border: 1px solid currentColor;
}

.bootstrap-step-marker-ready,
.bootstrap-required-marker-ready {
    background: var(--success);
    color: var(--success);
}

.bootstrap-step-marker-attention,
.bootstrap-required-marker-attention {
    background: var(--warning);
    color: var(--warning);
}

.bootstrap-required-marker {
    display: none;
}

.bootstrap-field:has(.bootstrap-required-marker) input,
.bootstrap-field:has(.bootstrap-required-marker) textarea,
.bootstrap-field:has(.bootstrap-required-marker) select {
    background: #fef3c7;
    border-color: #d97706;
}

html[data-theme="dark"] .bootstrap-field:has(.bootstrap-required-marker) input,
html[data-theme="dark"] .bootstrap-field:has(.bootstrap-required-marker) textarea,
html[data-theme="dark"] .bootstrap-field:has(.bootstrap-required-marker) select {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
}

.bootstrap-page-tab:hover,
.bootstrap-wizard-step:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.bootstrap-page-tab-active,
.bootstrap-wizard-step-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.bootstrap-page-tab.bootstrap-tab-attention {
    background: #fef3c7;
    border-color: #d97706;
    color: #92400e;
}

.bootstrap-page-tab.bootstrap-tab-attention:hover {
    background: #fde68a;
    border-color: #d97706;
    color: #92400e;
}

html[data-theme="dark"] .bootstrap-page-tab.bootstrap-tab-attention {
    background: rgba(250, 204, 21, 0.15);
    border-color: #facc15;
    color: #facc15;
}

html[data-theme="dark"] .bootstrap-page-tab.bootstrap-tab-attention:hover {
    background: rgba(250, 204, 21, 0.25);
    border-color: #facc15;
    color: #facc15;
}

.bootstrap-wizard-step-next {
    background: #fef3c7;
    border-color: #d97706;
    color: #92400e;
}

.bootstrap-wizard-step-next:hover {
    background: #fde68a;
    border-color: #d97706;
    color: #92400e;
}

html[data-theme="dark"] .bootstrap-wizard-step-next {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
    color: #fde68a;
}

html[data-theme="dark"] .bootstrap-wizard-step-next:hover {
    background: rgba(250, 204, 21, 0.3);
    border-color: #facc15;
    color: #fde68a;
}

.bootstrap-environment-card,
.bootstrap-checklist-row,
.bootstrap-secret-row {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.bootstrap-provider-card {
    display: grid;
    gap: 1rem;
    align-content: space-between;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-organizations-hero,
.bootstrap-organization-context {
    margin-bottom: 18px;
}

.bootstrap-organization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.bootstrap-organization-card,
.bootstrap-empty-state {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-workspace-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.bootstrap-workspace-nav a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
}

.bootstrap-workspace-nav a.active,
.bootstrap-workspace-nav a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.bootstrap-organization-workspace-summary {
    margin-top: 14px;
}

.bootstrap-organization-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 18px;
}

.bootstrap-organization-dashboard .panel {
    min-width: 0;
    border-radius: 8px;
    box-shadow: none;
}

.bootstrap-organization-summary-panel {
    align-content: start;
}

.bootstrap-mini-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.bootstrap-mini-metrics div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-strong);
}

.bootstrap-mini-metrics strong {
    overflow-wrap: anywhere;
}

.compact-json-editor {
    min-height: 132px;
}

@media (max-width: 1100px) {
    .bootstrap-organization-dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .bootstrap-mini-metrics {
        grid-template-columns: 1fr;
    }
}

.bootstrap-environment-card {
    align-content: space-between;
}

.bootstrap-overview-architecture {
    order: -2;
}

.bootstrap-gear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--accent);
    font-size: 1rem;
}

.bootstrap-gear-button:hover,
.bootstrap-gear-button:focus {
    border-color: var(--accent);
    background: var(--accent-soft);
    outline: none;
}

.bootstrap-flow-diagram {
    display: grid;
    gap: 0;
}

.bootstrap-flow-stage {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    position: relative;
}

.bootstrap-flow-stage:not(:last-child) {
    padding-bottom: 18px;
}

.bootstrap-flow-stage:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 44px;
    bottom: 0;
    left: 21px;
    width: 2px;
    background: var(--line);
}

.bootstrap-flow-marker {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.bootstrap-flow-marker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}

.bootstrap-flow-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-flow-stage-collapsed .bootstrap-flow-card {
    padding-block: 10px;
}

.bootstrap-flow-stage-expanded .bootstrap-flow-card {
    border-color: var(--accent);
}

.bootstrap-flow-stage-next .bootstrap-flow-card {
    background: #fef3c7;
    border-color: #d97706;
}

.bootstrap-flow-stage-next .bootstrap-flow-card-header {
    color: #92400e;
}

.bootstrap-flow-stage-next .bootstrap-flow-marker span {
    background: #fef3c7;
    border-color: #d97706;
    color: #92400e;
}

html[data-theme="dark"] .bootstrap-flow-stage-next .bootstrap-flow-card {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
}

html[data-theme="dark"] .bootstrap-flow-stage-next .bootstrap-flow-card-header,
html[data-theme="dark"] .bootstrap-flow-stage-next .bootstrap-flow-marker span {
    color: #fde68a;
}

html[data-theme="dark"] .bootstrap-flow-stage-next .bootstrap-flow-marker span {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
}

.bootstrap-flow-card-header {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.bootstrap-flow-card-header:hover {
    color: var(--accent);
}

.bootstrap-flow-card h4 {
    margin: 0;
}

.bootstrap-architecture-svg-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-diagram-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.bootstrap-diagram-view-toggle select {
    min-height: 34px;
    border-radius: 8px;
}

.bootstrap-architecture-svg-wrap svg {
    display: block;
    min-width: 860px;
    width: 100%;
    height: auto;
    color: var(--ink);
}

.bootstrap-arch-bg {
    fill: var(--surface);
}

.bootstrap-arch-box rect:first-child,
.bootstrap-arch-node {
    fill: var(--panel-strong);
    stroke: var(--line);
    stroke-width: 2;
}

.bootstrap-arch-box {
    cursor: default;
}

.bootstrap-arch-box[role="button"] {
    cursor: pointer;
}

.bootstrap-arch-next-step rect:first-child {
    fill: #fef3c7;
    stroke: #d97706;
    stroke-width: 3;
}

.bootstrap-arch-inner.bootstrap-arch-inner-next-step,
.bootstrap-arch-env.bootstrap-arch-inner-next-step {
    fill: #fef3c7;
    stroke: #d97706;
    stroke-width: 3;
}

.bootstrap-arch-next-step .bootstrap-arch-title {
    fill: #92400e;
}

html[data-theme="dark"] .bootstrap-arch-next-step rect:first-child {
    fill: rgba(250, 204, 21, 0.22);
    stroke: #facc15;
}

html[data-theme="dark"] .bootstrap-arch-inner.bootstrap-arch-inner-next-step,
html[data-theme="dark"] .bootstrap-arch-env.bootstrap-arch-inner-next-step {
    fill: rgba(250, 204, 21, 0.22);
    stroke: #facc15;
}

html[data-theme="dark"] .bootstrap-arch-next-step .bootstrap-arch-title {
    fill: #fde68a;
}

.bootstrap-arch-inner,
.bootstrap-arch-env {
    fill: var(--surface-muted);
    stroke: var(--line);
    stroke-width: 1.5;
}

.bootstrap-arch-provider-boundary rect {
    fill: transparent;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 8 6;
}

.bootstrap-arch-provider-boundary text {
    fill: var(--accent);
    font-weight: 700;
}

.bootstrap-arch-env {
    fill: var(--panel);
}

.bootstrap-arch-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
}

.bootstrap-architecture-pretty-svg {
    min-width: 1240px;
    background:
        radial-gradient(circle at 48% 20%, color-mix(in srgb, var(--accent-soft), transparent 45%), transparent 24%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface), #f7f4ed 28%), var(--surface));
}

.bootstrap-architecture-pretty-svg .bootstrap-arch-github-panel {
    fill: color-mix(in srgb, var(--panel-strong), #f8e6a0 38%);
    stroke: #d8a728;
    stroke-width: 2;
}

.bootstrap-arch-provider-svg > rect:first-child {
    fill: var(--panel);
    stroke-width: 2;
    stroke-dasharray: 8 6;
}

.bootstrap-arch-provider-hetzner > rect:first-child {
    fill: color-mix(in srgb, var(--panel), #dff5e9 40%);
    stroke: #2f9e78;
}

.bootstrap-arch-provider-hyperv > rect:first-child {
    fill: color-mix(in srgb, var(--panel), #e0f0fa 42%);
    stroke: #3587b8;
}

.bootstrap-arch-provider-svg.bootstrap-arch-next-step > rect:first-child {
    fill: #fef3c7;
    stroke: #d97706;
    stroke-width: 3;
}

html[data-theme="dark"] .bootstrap-arch-provider-svg.bootstrap-arch-next-step > rect:first-child {
    fill: rgba(250, 204, 21, 0.22);
    stroke: #facc15;
}

.bootstrap-arch-runner-card {
    fill: color-mix(in srgb, var(--panel-strong), var(--accent-soft) 22%);
    stroke: color-mix(in srgb, var(--accent), var(--line) 35%);
}

.bootstrap-arch-muted-node {
    opacity: 0.55;
}

.bootstrap-arch-runner-disabled {
    fill: color-mix(in srgb, var(--surface-muted), transparent 12%);
    stroke-dasharray: 5 5;
}

.bootstrap-arch-flow path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
}

.bootstrap-arch-flow-dashed path {
    stroke-dasharray: 7 6;
}

.bootstrap-arch-flow-dr path {
    stroke: #3587b8;
    fill: none;
}

.bootstrap-arch-flow-dr text {
    fill: #1f6f9d;
}

.bootstrap-architecture-structured {
    display: grid;
    grid-template-columns: repeat(6, minmax(190px, 1fr));
    gap: 16px;
    min-width: 1280px;
    padding: 18px;
    background: var(--surface);
}

.bootstrap-architecture-structured-column {
    position: relative;
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 320px;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.bootstrap-architecture-structured-column:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -18px;
    top: 48%;
    color: var(--accent);
    font-weight: 900;
}

.bootstrap-architecture-structured-column h4 {
    margin: 0;
    color: var(--accent);
}

.bootstrap-architecture-structured-column span {
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.bootstrap-architecture-clickable {
    cursor: pointer;
    transition: all 0.18s ease;
}

.bootstrap-architecture-clickable:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.bootstrap-architecture-clickable:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.bootstrap-architecture-provider-item {
    display: grid;
    gap: 4px;
    padding: 12px;
}

.bootstrap-architecture-provider-item strong {
    color: var(--text);
}

.bootstrap-architecture-provider-item small {
    font-size: 0.78rem;
}

.bootstrap-architecture-provider-item small.muted {
    color: var(--muted);
}

.bootstrap-architecture-next {
    background: #fef3c7;
    border-color: #d97706;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.18);
}

.bootstrap-architecture-mermaid {
    display: grid;
    gap: 12px;
    min-width: 860px;
    padding: 16px;
}

.bootstrap-architecture-mermaid pre {
    margin: 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.bootstrap-architecture-mermaid code {
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.86rem;
    white-space: pre;
}

.bootstrap-provision-flow {
    display: grid;
    gap: 12px;
    margin: 12px 0;
}

.bootstrap-provision-flow h5 {
    margin: 0;
    font-size: 1rem;
}

.bootstrap-provision-svg-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-provision-svg {
    display: block;
    min-width: 980px;
    width: 100%;
    height: auto;
}

.bootstrap-provision-bg {
    fill: var(--surface);
}

.bootstrap-provision-title {
    fill: var(--ink);
    font-size: 26px;
    font-weight: 700;
}

.bootstrap-provision-subtitle,
.bootstrap-provision-meta {
    fill: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.bootstrap-provision-group {
    fill: var(--surface-muted);
    stroke: var(--line);
    stroke-width: 1.4;
}

.bootstrap-provision-group-label {
    fill: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.bootstrap-provision-connector {
    fill: none;
    stroke: var(--line-strong, var(--line));
    stroke-width: 2.2;
    marker-end: url(#coolify-provision-arrow);
}

.bootstrap-provision-svg marker path {
    fill: var(--line-strong, var(--line));
}

.bootstrap-provision-node rect,
.bootstrap-provision-node polygon {
    fill: color-mix(in srgb, var(--surface), #f8fafc 45%);
    stroke: #94a3b8;
    stroke-width: 2;
}

.bootstrap-provision-node.active rect,
.bootstrap-provision-node.active polygon {
    fill: #eff6ff;
    stroke: #2563eb;
}

.bootstrap-provision-node.done rect,
.bootstrap-provision-node.done polygon {
    fill: #ecfdf5;
    stroke: #059669;
}

.bootstrap-provision-node.error rect,
.bootstrap-provision-node.error polygon {
    fill: #fef2f2;
    stroke: #dc2626;
}

.bootstrap-provision-node.skipped rect,
.bootstrap-provision-node.skipped polygon {
    fill: var(--surface-muted);
    stroke: var(--muted);
    stroke-dasharray: 6 4;
}

.bootstrap-provision-node.decision.pending polygon {
    fill: #fff7ed;
    stroke: #ea580c;
}

.bootstrap-provision-label {
    fill: var(--ink);
    font-size: 13px;
    font-weight: 650;
}

.bootstrap-provision-mermaid {
    min-width: 0;
    padding: 0;
}

.bootstrap-arch-arrow-head {
    fill: var(--accent);
}

.bootstrap-arch-person {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
}

.bootstrap-arch-gear {
    cursor: pointer;
}

.bootstrap-arch-gear circle {
    fill: var(--surface);
    stroke: var(--accent);
    stroke-width: 1.5;
}

.bootstrap-arch-gear text {
    fill: var(--accent);
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
}

.bootstrap-arch-gear:hover circle,
.bootstrap-arch-gear:focus circle {
    fill: var(--accent-soft);
    stroke-width: 2;
}

.bootstrap-architecture-overlay {
    display: grid;
    gap: 16px;
}

.bootstrap-guide-overlay {
    max-height: min(86vh, 920px);
    overflow: auto;
}

.bootstrap-secrets-json-overlay {
    display: grid;
    gap: 16px;
    max-height: min(86vh, 920px);
    overflow: auto;
    width: min(900px, calc(100vw - 32px));
}

.bootstrap-major-steps {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.bootstrap-sequence-host-selector {
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-top: 16px;
    padding: 12px;
}

.bootstrap-sequence-host-selector h3 {
    margin: 0 0 4px;
}

.bootstrap-sequence-host-controls {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.bootstrap-sequence-host-controls .bootstrap-field {
    min-width: min(320px, 100%);
}

.bootstrap-major-step-list {
    display: grid;
    gap: 10px;
}

.bootstrap-major-step {
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
}

.bootstrap-major-step h4 {
    margin: 0 0 4px;
}

.bootstrap-major-step .toolbar-actions {
    margin-top: 8px;
}

.bootstrap-major-step-index {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.bootstrap-major-step-complete {
    border-color: color-mix(in srgb, var(--success) 45%, var(--line));
}

.bootstrap-major-step-complete .bootstrap-major-step-index {
    background: color-mix(in srgb, var(--success) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--success) 45%, var(--line));
    color: var(--success);
}

.bootstrap-provision-host-targets {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.bootstrap-provision-host-target {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 12px;
}

.bootstrap-provision-host-target-summary {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
}

.bootstrap-provision-host-target-summary::-webkit-details-marker {
    display: none;
}

.bootstrap-provision-host-target-summary::before {
    color: var(--muted);
    content: "›";
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 2px;
    transform: rotate(0deg);
    transition: transform 0.15s ease;
}

.bootstrap-provision-host-target[open] .bootstrap-provision-host-target-summary::before {
    transform: rotate(90deg);
}

.bootstrap-provision-host-target-summary > div:first-of-type {
    flex: 1 1 18rem;
}

.bootstrap-provision-host-target-summary > .bootstrap-provision-host-state:first-of-type {
    align-items: flex-start;
    text-align: left;
}

.bootstrap-provision-host-state {
    align-items: flex-end;
    display: flex;
    flex: 1 1 16rem;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.bootstrap-provision-host-state small {
    color: var(--muted);
}

.bootstrap-provision-host-target-body {
    display: grid;
    gap: 12px;
}

.bootstrap-provision-host-target-header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.bootstrap-provision-host-credentials .bootstrap-field {
    min-width: min(18rem, 100%);
}

.bootstrap-provision-host-preview {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    padding-top: 10px;
}

.bootstrap-provision-host-preview-summary {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 10px;
    list-style: none;
}

.bootstrap-provision-host-preview-summary::-webkit-details-marker {
    display: none;
}

.bootstrap-provision-host-preview-summary::before {
    color: var(--muted);
    content: "+";
    flex: 0 0 auto;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
}

.bootstrap-provision-host-preview[open] .bootstrap-provision-host-preview-summary::before {
    content: "-";
}

.bootstrap-provision-host-preview-summary > span {
    display: grid;
    gap: 4px;
}

.bootstrap-provision-host-preview-summary .eyebrow {
    margin: 0;
}

.bootstrap-provision-host-preview-body {
    display: grid;
    gap: 10px;
}

.bootstrap-provision-tabs {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bootstrap-provision-tabs button {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
    padding: 8px 10px;
}

.bootstrap-provision-tabs button.active {
    border-bottom-color: var(--accent);
    color: var(--ink);
}

.bootstrap-provision-live-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bootstrap-provision-step-list {
    display: grid;
    gap: 8px;
}

.bootstrap-provision-step-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.bootstrap-provision-step-detail summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
    padding: 10px 12px;
}

.bootstrap-provision-step-detail summary span {
    font-weight: 700;
}

.bootstrap-provision-step-detail summary small {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    overflow-wrap: anywhere;
}

.bootstrap-provision-step-body {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    padding: 12px;
}

.bootstrap-provision-step-body h5 {
    margin: 0 0 6px;
}

.bootstrap-provision-key-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bootstrap-provision-key-list code {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 3px 6px;
}

.bootstrap-provision-script-preview pre {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 0;
    max-height: 24rem;
    overflow: auto;
    padding: 12px;
    white-space: pre;
}

.bootstrap-live-links {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 8px;
}

.bootstrap-live-link-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 10px;
}

.bootstrap-header-utilities {
    margin-top: 12px;
}

.bootstrap-header-utilities summary {
    color: var(--muted);
    cursor: pointer;
    font-weight: 650;
}

.bootstrap-header-utilities .toolbar-actions {
    margin-top: 10px;
}

.bootstrap-architecture-svg-wrap text {
    fill: var(--ink);
    font-family: "Segoe UI", "Aptos", sans-serif;
    font-size: 15px;
    font-weight: 600;
}

.bootstrap-architecture-svg-wrap .bootstrap-arch-title {
    fill: var(--accent);
    font-size: 17px;
    font-weight: 700;
}

.bootstrap-architecture-svg-wrap .bootstrap-arch-small {
    fill: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.bootstrap-arch-env-details {
    color: var(--muted);
    display: grid;
    gap: 3px;
    font-family: "Segoe UI", "Aptos", sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bootstrap-arch-env-details a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bootstrap-checklist-row,
.bootstrap-secret-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.bootstrap-secret-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.bootstrap-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.bootstrap-field > span {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.bootstrap-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.3;
}

.bootstrap-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.bootstrap-secret-badge {
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.7rem;
}

.bootstrap-guidance-block {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-guidance-block h4 {
    margin: 0 0 6px;
}

.bootstrap-github-private-key-next-step {
    background: #fef3c7;
    border-color: #d97706;
}

html[data-theme="dark"] .bootstrap-github-private-key-next-step {
    background: rgba(250, 204, 21, 0.18);
    border-color: #facc15;
}

.bootstrap-next-step-instructions {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 8px;
}

.bootstrap-next-step-instructions li {
    color: var(--text);
}

.bootstrap-next-step-instructions a {
    font-weight: 700;
}

.bootstrap-provider-guidance {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.bootstrap-runner-guidance {
    background: color-mix(in srgb, var(--surface), #eef6ee 34%);
}

.bootstrap-hetzner-guidance {
    align-self: stretch;
}

.bootstrap-provider-guidance-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.bootstrap-provider-guidance-steps section {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 8px 14px;
    align-items: start;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-provider-guidance-steps h5 {
    margin: 0;
    font-size: 0.9rem;
}

.bootstrap-provider-guidance-steps p {
    margin: 0;
    color: var(--muted);
}

.bootstrap-provider-step-content {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.bootstrap-provider-copy-field {
    margin-top: 2px;
}

.bootstrap-provider-copy-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.bootstrap-provider-copy-control input {
    width: 100%;
    min-width: 0;
    font-family: "Cascadia Code", "Consolas", monospace;
}

.bootstrap-provider-copy-inline {
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
}

.bootstrap-provider-provisioning-grid {
    margin-bottom: 0;
}

.bootstrap-provider-full-width {
    grid-column: 1 / -1;
}

.bootstrap-provider-tabs {
    justify-content: flex-start;
    margin-bottom: 12px;
}

.bootstrap-provider-scope-select {
    max-width: 420px;
    margin-bottom: 12px;
}

.bootstrap-environment-host-context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 16px;
    align-items: center;
    padding: 16px;
    margin-bottom: 14px;
    border: 2px solid color-mix(in srgb, var(--accent), var(--line) 35%);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface), var(--accent-soft) 34%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.bootstrap-environment-host-context-copy {
    min-width: 0;
}

.bootstrap-environment-host-context-copy h3 {
    margin: 2px 0 4px;
    font-size: 1.15rem;
}

.bootstrap-environment-host-context-copy p {
    margin: 0;
    color: var(--muted);
}

.bootstrap-environment-host-context-copy code {
    font-weight: 700;
}

.bootstrap-environment-host-switcher {
    margin: 0;
}

.bootstrap-environment-host-switcher select {
    min-height: 44px;
    font-weight: 700;
}

.bootstrap-environment-host-switcher small {
    color: var(--muted);
}

@media (max-width: 760px) {
    .bootstrap-environment-host-context {
        grid-template-columns: 1fr;
    }
}

.bootstrap-provider-settings-tabs {
    display: grid;
    gap: 12px;
}

.bootstrap-provider-section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-provider-section-panel {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-provider-section-panel > h5 {
    margin: 0;
}

.bootstrap-provider-identity-fields {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.bootstrap-provider-type-indicator {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-provider-type-indicator span,
.bootstrap-provider-type-indicator small {
    color: var(--muted);
}

.bootstrap-provider-type-indicator strong {
    color: var(--text);
}

.bootstrap-provider-behavior {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-provider-behavior p {
    margin: 4px 0 0;
    max-width: 720px;
}

.bootstrap-provider-behavior-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.btn-secondary.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-secondary.danger:hover {
    background: var(--danger-soft);
}

.bootstrap-provider-add {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface);
}

.bootstrap-provider-add summary {
    cursor: pointer;
    font-weight: 700;
}

.bootstrap-provider-add[open] summary {
    margin-bottom: 12px;
}

.bootstrap-provider-advanced {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-provider-advanced h4 {
    margin: 0 0 6px;
}

.bootstrap-provider-environment-list {
    display: grid;
    gap: 10px;
}

.bootstrap-provider-environment-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.bootstrap-local-ssh-key {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-local-ssh-key .toolbar {
    align-items: start;
}

.bootstrap-local-ssh-key p {
    margin: 4px 0 0;
}

.bootstrap-dns-guidance {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-dns-guidance h5 {
    margin: 0 0 4px;
}

.bootstrap-dns-guidance p {
    margin: 0;
}

.bootstrap-dns-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.bootstrap-provider-token-link {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 0.84rem;
}

.bootstrap-provider-token-link a {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.bootstrap-provider-test {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.bootstrap-provider-test-result {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.bootstrap-provider-test-result span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bootstrap-provider-validation-message {
    color: var(--danger);
    font-size: 0.84rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.bootstrap-next-step-banner {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eff6ff;
}

.bootstrap-next-step-highlight {
    background: #fef3c7;
    border-color: #f59e0b;
}

.bootstrap-ready-highlight {
    background: #dcfce7;
    border-color: #22c55e;
}

.bootstrap-next-step-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.bootstrap-next-step-icon {
    min-width: 2rem;
    font-weight: 700;
    color: #92400e;
}

.bootstrap-ready-highlight .bootstrap-next-step-icon {
    color: #166534;
}

.bootstrap-next-step-text {
    flex: 1;
}

.bootstrap-next-step-host {
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #78350f;
}

.bootstrap-next-step-text p {
    margin: 0.25rem 0;
}

.bootstrap-next-step-errors {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: #991b1b;
}

.bootstrap-next-step-action {
    display: flex;
    align-items: center;
}

.bootstrap-primary-action-btn {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.btn-secondary.bootstrap-next-step-button {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    font-weight: 700;
}

.btn-secondary.bootstrap-next-step-button:hover {
    background: #fde68a;
    border-color: #d97706;
    color: #78350f;
}

html[data-theme="dark"] .btn-secondary.bootstrap-next-step-button {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fcd34d;
}

html[data-theme="dark"] .btn-secondary.bootstrap-next-step-button:hover {
    background: rgba(245, 158, 11, 0.28);
    border-color: #fbbf24;
    color: #fde68a;
}

.bootstrap-provider-guidance-steps code {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-provider-guidance-steps a {
    overflow-wrap: normal;
    word-break: normal;
    font-weight: 700;
    white-space: normal;
}

.bootstrap-provider-field-map {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bootstrap-provider-field-map span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.82rem;
}

.bootstrap-provider-field-map code {
    overflow-wrap: anywhere;
    padding: 3px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.bootstrap-url-guidance-list {
    display: grid;
    gap: 8px;
}

.bootstrap-url-guidance-row {
    display: grid;
    grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.bootstrap-url-guidance-row span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.bootstrap-url-guidance-row code {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-url-guidance-row a {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.bootstrap-permission-guidance {
    display: grid;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.bootstrap-permission-guidance h4,
.bootstrap-permission-guidance h5 {
    margin: 0 0 6px;
}

.bootstrap-permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bootstrap-permission-grid article,
.bootstrap-permission-errors,
.bootstrap-future-permissions {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-permission-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bootstrap-permission-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
    color: var(--muted);
}

.bootstrap-permission-item strong {
    font-size: 0.82rem;
}

.bootstrap-permission-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.74rem;
    font-weight: 800;
}

.bootstrap-permission-required .bootstrap-permission-icon {
    background: var(--success-soft);
    color: var(--success);
}

.bootstrap-permission-required strong {
    color: var(--success);
}

.bootstrap-permission-not-required {
    color: var(--muted);
}

.bootstrap-permission-not-required .bootstrap-permission-icon {
    background: var(--surface-muted);
    color: var(--muted);
}

.bootstrap-future-permissions summary {
    cursor: pointer;
    font-weight: 700;
}

.bootstrap-future-permissions .row-badges {
    margin-top: 10px;
}

.bootstrap-permission-errors ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.bootstrap-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.bootstrap-info:hover,
.bootstrap-info:focus {
    border-color: var(--accent);
    background: var(--accent-soft);
    outline: none;
}

@media (max-width: 700px) {
    .bootstrap-checklist-row,
    .bootstrap-secret-row {
        grid-template-columns: 1fr;
    }

    .bootstrap-url-guidance-row {
        grid-template-columns: 1fr;
    }

    .bootstrap-provider-guidance-steps section {
        grid-template-columns: 1fr;
    }

    .bootstrap-provider-copy-control {
        grid-template-columns: 1fr;
    }

    .bootstrap-provider-copy-inline {
        grid-template-columns: 1fr;
    }

    .bootstrap-permission-grid {
        grid-template-columns: 1fr;
    }
}

.json-editor,
.result-console {
    width: 100%;
    min-height: 180px;
    margin-bottom: 16px;
}

.result-console {
    white-space: pre-wrap;
    background: var(--surface);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.knowledge-editor-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.knowledge-editor {
    min-height: 420px;
}

.wiki-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wiki-editor-toolbar button {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.markdown-viewer {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    min-height: 420px;
}

.markdown-viewer p,
.markdown-viewer h1,
.markdown-viewer h2,
.markdown-viewer h3,
.markdown-viewer ul,
.markdown-viewer ol,
.markdown-viewer pre,
.markdown-viewer table,
.markdown-viewer blockquote {
    margin: 0 0 12px;
}

.markdown-viewer table {
    width: 100%;
    border-collapse: collapse;
}

.markdown-viewer th,
.markdown-viewer td {
    border: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
}

.markdown-viewer pre,
.markdown-viewer code {
    font-family: "Cascadia Code", "Consolas", monospace;
}

.markdown-viewer pre {
    overflow-x: auto;
    background: var(--surface-muted);
    border-radius: 12px;
    padding: 12px;
}

.markdown-image {
    max-width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin-top: 8px;
}

.markdown-mermaid-block {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.markdown-mermaid {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--surface), var(--surface-muted));
    padding: 16px;
    overflow-x: auto;
}

.markdown-mermaid-error {
    color: var(--danger);
    font-weight: 600;
}

.markdown-mermaid-fallback {
    margin: 0;
}

.row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 0.82rem;
}

.pill.success {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.pill.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.pill.secret-exists {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill.secret-exists-env {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid var(--accent);
}

.pill.secret-missing {
    background: var(--danger-soft);
    color: var(--danger);
}

.pill.secret-unchecked {
    background: var(--surface-muted);
    color: var(--ink-muted);
}

.bootstrap-secrets-overview {
    display: grid;
    gap: 12px;
}

.bootstrap-secret-progress {
    height: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.bootstrap-secret-progress span {
    display: block;
    height: 100%;
    background: var(--accent);
}

.bootstrap-secrets-list {
    display: grid;
    gap: 12px;
}

.bootstrap-bulk-secret-import {
    display: grid;
    gap: 12px;
}

.bootstrap-bulk-secret-results {
    display: grid;
    gap: 8px;
}

.bootstrap-secret-json-password-field {
    -webkit-text-security: disc;
    text-security: disc;
}

.bootstrap-bulk-secret-result {
    display: grid;
    grid-template-columns: auto minmax(120px, 0.4fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-current-version-prompt,
.bootstrap-bitwarden-current-version-prompt {
    border-color: color-mix(in srgb, var(--accent), var(--line) 55%);
}

.bootstrap-current-version-grid,
.bootstrap-bitwarden-current-version-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 16px;
    min-width: 0;
}

.bootstrap-current-version-grid span,
.bootstrap-bitwarden-current-version-grid span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bootstrap-secret-overview-row {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.bootstrap-secret-overview-row h4 {
    margin: 0;
}

.bootstrap-secret-next-step-input {
    background: #fef3c7;
    border-color: #d97706;
}

.bootstrap-coolify-application-guidance-attention {
    background: #fef3c7;
    border-color: #d97706;
}

.bootstrap-coolify-application-guidance-attention summary {
    color: #92400e;
    font-weight: 700;
}

.bootstrap-secret-next-step-input:focus {
    outline: 2px solid #d97706;
    outline-offset: 1px;
}

html[data-theme="dark"] .bootstrap-secret-next-step-input {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
}

html[data-theme="dark"] .bootstrap-coolify-application-guidance-attention {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
}

html[data-theme="dark"] .bootstrap-coolify-application-guidance-attention summary {
    color: #facc15;
}

html[data-theme="dark"] .bootstrap-secret-next-step-input:focus {
    outline-color: #facc15;
}

.bootstrap-secret-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bootstrap-secret-meta span {
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* Bootstrap Provisioning Status Bar */
.bootstrap-provisioning-status-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--shell-chrome);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.bootstrap-provisioning-status-bar.collapsed {
    max-height: 60px;
}

.bootstrap-provisioning-status-bar.expanded {
    max-height: 80vh;
    overflow-y: auto;
}

.status-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    user-select: none;
}

.status-bar-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .status-bar-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.status-bar-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.status-bar-summary strong {
    font-weight: 600;
}

.status-bar-summary small {
    color: var(--muted);
    font-size: 0.85rem;
}

.status-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--ink);
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: var(--surface-muted);
    border-color: var(--accent);
}

.btn-icon:active {
    transform: scale(0.95);
}

.status-bar-details {
    padding: 0 20px 16px;
    border-top: 1px solid var(--line);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-bar-info {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.info-item strong {
    font-weight: 600;
    color: var(--muted);
}

.status-bar-steps {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.status-bar-step {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    background: var(--surface);
}

.status-bar-step summary {
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.status-bar-step summary small {
    margin-left: auto;
    color: var(--muted);
}

.status-bar-step summary strong {
    flex: 1;
    min-width: 0;
}

.status-bar-step .content-grid {
    margin-top: 10px;
}

.status-bar-step .json-editor {
    font-size: 0.8rem;
    max-height: 120px;
}

.bootstrap-provisioning-reports {
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.4fr);
}

.bootstrap-report-list,
.bootstrap-report-steps {
    display: grid;
    gap: 12px;
}

.bootstrap-report-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
    text-align: left;
    align-items: center;
}

.bootstrap-report-list-item small,
.bootstrap-report-step summary small {
    color: var(--muted);
}

.bootstrap-report-list-item-active {
    outline: 2px solid rgba(59, 130, 246, 0.35);
}

.bootstrap-report-step {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.bootstrap-report-step summary {
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

.bootstrap-report-step summary small {
    margin-left: auto;
}

@media (max-width: 900px) {
    .bootstrap-provisioning-reports {
        grid-template-columns: 1fr;
    }
}

.status-banner.danger {
    border-color: var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
}

/* Agents and MCP tools */
.agents-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 24px;
    align-items: end;
}

.agents-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    gap: 12px;
}

.agents-search {
    min-width: 0;
}

.agents-workspace {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(320px, 420px);
    gap: 18px;
    align-items: start;
}

.agents-category-tree,
.agents-inspector {
    position: sticky;
    top: 24px;
}

.agents-category-tree {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.agents-category-group {
    display: grid;
    gap: 8px;
}

.agents-category,
.agents-subcategory {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    box-shadow: none;
    text-align: left;
}

.agents-category {
    padding: 10px 12px;
    font-weight: 800;
}

.agents-category span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.agents-category strong,
.agents-subcategory span {
    color: var(--muted);
    font-size: 0.8rem;
}

.agents-category:hover,
.agents-category-active,
.agents-subcategory:hover,
.agents-subcategory-active {
    border-color: var(--line);
    background: var(--accent-soft);
    color: var(--accent);
}

.agents-subcategory-list {
    display: grid;
    gap: 6px;
    padding-left: 12px;
}

.agents-subcategory {
    padding: 8px 10px;
    font-size: 0.9rem;
}

.agents-main-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.agents-results-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.agents-results-header h3 {
    margin: 0;
}

.agents-tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.agent-tool-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.agent-tool-card:hover,
.agent-tool-card-selected {
    border-color: var(--accent);
    background: var(--panel-strong);
    transform: translateY(-1px);
}

.agent-tool-card-header,
.agent-tool-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.agent-tool-card h4 {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.agent-tool-card p {
    margin: 0;
}

.agent-tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.agent-tool-tags span {
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.agent-apple-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 0;
}

.agent-apple-metadata div {
    min-width: 0;
}

.agent-apple-metadata dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.agent-apple-metadata dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 0.86rem;
}

.agent-pairing-list {
    display: grid;
    gap: 10px;
}

.agent-pairing-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.agent-pairing-card h4,
.agent-pairing-card p {
    margin: 0;
}

.agents-inspector {
    display: grid;
    gap: 16px;
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.agents-inspector-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.agents-inspector-header h3 {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.agents-inspector-empty {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.agents-inspector-empty i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.2rem;
}

.agents-inspector-empty h3 {
    margin: 0;
}

.agents-tool-facts {
    display: grid;
    gap: 8px;
    margin: 0;
}

.agents-tool-facts div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.agents-tool-facts dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.agents-tool-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
}

.agents-execution-form {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.agents-execution-form h4 {
    margin: 0;
}

.agents-arguments-editor {
    min-height: 220px;
}

.agents-result-console {
    min-height: 140px;
}

@media (max-width: 920px) {
    .agents-hero,
    .agents-topbar,
    .agents-workspace {
        grid-template-columns: 1fr;
    }

    .agents-category-tree {
        position: static;
    }

    .agents-inspector {
        position: static;
        max-height: none;
        order: 2;
    }

    .agents-main-panel {
        order: 1;
    }

    .agents-results-header,
    .agent-tool-card-header,
    .agent-tool-card-footer,
    .agents-inspector-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.plain-list {
    margin: 0;
    padding-left: 20px;
}

.selectable-row {
    cursor: pointer;
    border-radius: 14px;
    padding: 10px 12px;
}

.selected-row {
    background: var(--accent-soft);
}

.wiki-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(31, 41, 51, 0.35);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 1000;
}

.wiki-dialog {
    width: min(880px, 100%);
    max-height: min(80vh, 720px);
    overflow: auto;
}

.wiki-link-search {
    min-width: min(420px, 100%);
}

.wiki-link-results {
    margin-top: 16px;
}

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

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

    .shell-hamburger {
        display: none;
    }

    .shell-hamburger-topbar {
        display: flex;
    }

    .topbar-search-area {
        max-width: none;
    }

    .topbar-search-overlay {
        min-width: 0;
        left: -40px;
        right: -12px;
    }

    .theme-toggle {
        width: 34px;
        padding: 7px;
    }

    .theme-toggle-label {
        display: none;
    }

    .shell-sidebar {
        position: fixed;
        inset: 0;
        z-index: 105;
        width: 300px;
        max-width: 85vw;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        opacity: 1;
        pointer-events: auto;
        padding: 32px 24px;
    }

    .shell-sidebar.shell-sidebar-open {
        transform: translateX(0);
    }

    /* Override collapsed styles on mobile — always show full sidebar when open */
    .shell-nav-collapsed .shell-sidebar {
        padding: 32px 24px;
    }

    .shell-nav-collapsed .shell-brand {
        display: block;
    }

    .shell-nav-collapsed .nav-label {
        display: inline;
    }

    .shell-nav-collapsed .shell-nav-group-chevron {
        display: inline-block;
    }

    .shell-nav-collapsed .shell-nav a,
    .shell-nav-collapsed .shell-nav-group-toggle,
    .shell-nav-collapsed .shell-footer-action {
        justify-content: flex-start;
        padding: 10px 14px;
    }

    .shell-nav-collapsed .shell-nav-group-items {
        padding-left: 8px;
    }

    .shell-nav-collapsed .shell-nav a:hover::after,
    .shell-nav-collapsed .shell-nav-group-toggle:hover::after,
    .shell-nav-collapsed .shell-footer-action:hover::after {
        display: none;
    }

    .shell-nav-collapsed .shell-sidebar-actions {
        border-top: 1px solid var(--line);
        padding-top: 16px;
    }

    .shell-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100;
        background: rgba(0, 0, 0, 0.2);
    }

    .shell-collapse-toggle {
        display: none;
    }

    .shell-main {
        padding: 20px;
    }

    .knowledge-editor-grid {
        grid-template-columns: 1fr;
    }

    .wiki-link-search {
        min-width: 0;
        width: 100%;
    }
}

/* ── Spinner ── */
.spinner {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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

/* ── Wiki Workspace ── */
.wiki-workspace {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
    min-height: calc(100vh - 96px);
}

.wiki-sidebar {
    position: sticky;
    top: 32px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wiki-sidebar-header {
    display: grid;
    gap: 8px;
}

.wiki-sidebar-header h2 {
    margin: 0;
}

.wiki-sidebar-header select {
    flex: 1;
    min-width: 0;
}

.wiki-btn-icon {
    padding: 8px 10px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Search area (always visible) */
.wiki-search-area {
    position: relative;
}

.wiki-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 0.88rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    transition: border-color 0.15s;
}

.wiki-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Categorized search overlay */
.wiki-search-overlay-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
}

.wiki-search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 4px;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--line);
}

.wiki-search-category {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wiki-search-category-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0;
    padding: 4px 0;
}

.wiki-search-overlay-item {
    padding: 6px 8px;
    font-size: 0.88rem;
    border-radius: 6px;
}

.wiki-search-overlay-item strong {
    font-size: 0.88rem;
}

.wiki-search-show-more {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 4px 0;
    text-align: left;
}

.wiki-search-show-more:hover {
    text-decoration: underline;
}

.wiki-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem;
}

/* Tree */
.wiki-tree {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wiki-tree-node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: background 0.12s;
}

.wiki-tree-node:hover {
    background: var(--accent-soft);
}

.wiki-tree-node-active {
    background: var(--accent-soft);
    font-weight: 600;
}

.wiki-tree-node-draft {
    opacity: 0.7;
    font-style: italic;
}

.wiki-tree-folder {
    cursor: default;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wiki-tree-icon {
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 0.78rem;
}

.wiki-tree-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wiki-tree-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
}

/* Main area */
.wiki-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tabs */
.wiki-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--line);
    padding-bottom: 0;
}

.wiki-tab {
    background: transparent;
    color: var(--muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 18px;
    margin-bottom: -2px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.wiki-tab:hover {
    color: var(--ink);
}

.wiki-tab-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.wiki-tab:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Preview panel */
.wiki-preview-panel {
    display: grid;
    gap: 16px;
}

.wiki-action-bar {
    padding: 8px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.wiki-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 300px;
}

/* Edit panel */
.wiki-edit-panel {
    display: grid;
    gap: 16px;
}

.wiki-commit-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Draft capture (collapsible at bottom) */
.wiki-draft-capture {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 16px;
}

.wiki-draft-capture summary {
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

.wiki-draft-capture .panel {
    margin-top: 12px;
    box-shadow: none;
}

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

    .wiki-sidebar {
        position: static;
        max-height: none;
    }

    .knowledge-editor-grid {
        grid-template-columns: 1fr;
    }
}
.bootstrap-timeline-line {
    stroke: var(--line);
    stroke-width: 2;
}

.bootstrap-timeline-dot-outer {
    fill: #fff;
    stroke-width: 4;
}

    .bootstrap-timeline-dot-outer.status-completed {
        stroke: #22c55e;
        opacity: 0.5;
        fill: #22c55e;
    }

.bootstrap-timeline-dot-outer.status-failed {
    stroke: #ef4444;
}

.bootstrap-timeline-dot-outer.status-active-next {
    stroke: #facc15;
    stroke-width: 8;
}

.bootstrap-timeline-dot-outer.status-blocked,
.bootstrap-timeline-dot-outer.status-pending,
.bootstrap-timeline-dot-outer.status-running,
.bootstrap-timeline-dot-outer.status-awaiting-external {
    stroke: #94a3b8;
}

.bootstrap-timeline-point.is-blocked .bootstrap-timeline-dot-outer,
.bootstrap-timeline-point.is-blocked .bootstrap-timeline-dot-circle {
    opacity: 0.55;
}

.bootstrap-timeline-dot-circle {
    stroke-width: 2.2;
}

.bootstrap-timeline-dot-circle.is-major {
    stroke-width: 2.5;
}

.bootstrap-timeline-dot-circle.is-minor {
    stroke: #fff;
}

.bootstrap-timeline-dot-circle.is-major.category-form-input {
    fill: #3b82f6;
}

.bootstrap-timeline-dot-circle.is-major.category-manual-external {
    fill: #8b5cf6;
}

.bootstrap-timeline-dot-circle.is-major.category-provision-button {
    fill: #f97316;
}

.bootstrap-timeline-dot-circle.is-major.category-provisioning-task {
    fill: #06b6d4;
}

.bootstrap-timeline-dot-circle.is-major.category-awaiting-external {
    fill: #eab308;
}

.bootstrap-timeline-dot-circle.is-major.category-validation {
    fill: #22c55e;
}

.bootstrap-timeline-dot-circle.is-major.category-secret-upload {
    fill: #ec4899;
}

.bootstrap-timeline-dot-circle.is-major.category-reporting {
    fill: #64748b;
}

.bootstrap-timeline-dot-circle.is-major.category-complete {
    fill: #16a34a;
}

.bootstrap-timeline-dot-circle.subsystem-organization {
    stroke: #2563eb;
}

.bootstrap-timeline-dot-circle.subsystem-github {
    stroke: #111827;
}

.bootstrap-timeline-dot-circle.subsystem-hetzner {
    stroke: #dc2626;
}

.bootstrap-timeline-dot-circle.subsystem-coolify-server {
    stroke: #22c55e;
}

.bootstrap-timeline-dot-circle.subsystem-coolify-application {
    stroke: #15803d;
}

.bootstrap-timeline-dot-circle.subsystem-dns {
    stroke: #a16207;
}

.bootstrap-timeline-dot-circle.subsystem-database {
    stroke: #7c3aed;
}

.bootstrap-timeline-dot-circle.subsystem-registry {
    stroke: #0f766e;
}

.bootstrap-timeline-dot-circle.subsystem-github-actions {
    stroke: #374151;
}

.bootstrap-timeline-dot-circle.subsystem-control-room {
    stroke: #0ea5e9;
}

.bootstrap-timeline-dot-circle.subsystem-reporting {
    stroke: #475569;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-organization {
    fill: #2563eb;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-github {
    fill: #111827;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-hetzner {
    fill: #dc2626;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-coolify-server {
    fill: #22c55e;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-coolify-application {
    fill: #15803d;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-dns {
    fill: #a16207;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-database {
    fill: #7c3aed;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-registry {
    fill: #0f766e;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-github-actions {
    fill: #374151;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-control-room {
    fill: #0ea5e9;
}

.bootstrap-timeline-dot-circle.is-minor.subsystem-reporting {
    fill: #475569;
}

.bootstrap-timeline-label {
    fill: var(--text-muted);
    font-size: 12px;
}

.bootstrap-timeline-major-label {
    font-weight: 600;
}

.bootstrap-timeline-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bootstrap-timeline-legend-dot {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: block;
}
