:root {
    --paper: #f7f7f5;
    --ink: #16181b;
    --muted: #6a7076;
    --line: #e6e6e1;
    --card: #ffffff;
    --accent: #16181b;
    --accent-soft: #f0f0ec;
    --hover: #f3f3f0;
    --copper: #e7a15a;
    --copper-soft: #fcf1e5;
    --copper-ink: #b96a24;
    --good: #0f7a45;
    --good-soft: #e5f6ee;
    --warn: #8a5a00;
    --warn-soft: #fff4df;
    --bad: #9b2c2c;
    --bad-soft: #fdecec;
    --shadow: 0 1px 2px rgba(16, 24, 32, 0.03);
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-family: "Figtree", sans-serif;
    color: var(--ink);
}

body {
    margin: 0;
    font-family: "Figtree", sans-serif;
    background: var(--paper);
    color: var(--ink);
}

body.home {
    position: relative;
    background: #fff;
    color: #141414;
    overflow-x: hidden;
}
.home-cluster {
    position: absolute;
    z-index: 0;
    top: 6.5rem;
    right: -1.5rem;
    width: min(420px, 36vw);
    height: auto;
    pointer-events: none;
    user-select: none;
    mix-blend-mode: multiply;
    opacity: 0.72;
}
.home-bar,
body.home main,
.home-foot { position: relative; z-index: 1; }
.home-bar { background: #fff; }
.home-bar, .home-hero, .home-section, .home-foot {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
.home-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.25rem;
    border-bottom: 1px solid #ececec;
}
.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #141414;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}
.home-logo { width: 2rem; height: 2rem; display: block; }
.home-mark { width: 5.5rem; height: 5.5rem; margin: 0 auto 0.85rem; }
.home-domain { margin: 0.4rem 0 0; color: #5c656c; font-weight: 600; letter-spacing: 0.01em; }
.home-product { margin: 1.35rem 0 0; font-size: clamp(1.7rem, 3.2vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.home-nav { display: flex; align-items: center; gap: 1.15rem; margin-left: auto; }
.home-nav .theme-toggle { margin-left: 0.15rem; }
.home-github { display: inline-flex; align-items: center; gap: 0.35rem; }
.home-nav a { color: #3a3a3a; text-decoration: none; font-weight: 600; }
.home-nav a:hover { color: #000; }
.home-nav-strong {
    border: 1px solid #141414;
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
}
.home-hero { padding-top: 4.5rem; padding-bottom: 2.5rem; text-align: center; }
.home-hero h1 {
    margin: 0;
    font-size: clamp(2.3rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
}
.home-lede {
    max-width: 38rem;
    margin: 0.45rem auto 1.4rem;
    color: #4b4b4b;
    font-size: 1.15rem;
}
.home-code {
    max-width: 34rem;
    margin: 0 auto;
    padding: 1rem 1.15rem;
    background: #1c1c1c;
    color: #f4f4f4;
    border-radius: 8px;
    text-align: left;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
}
.home-code code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}
.home-code-command {
    margin-top: 0.8rem;
    max-width: 48rem;
    font-size: 0.86rem;
    white-space: pre;
    overflow-x: auto;
}
.home-note { margin: 1rem 0 0; color: #4b4b4b; }
.home-note a { color: #141414; }
.home-section { padding-top: 2.2rem; padding-bottom: 2.4rem; }
.home-section h2 {
    margin: 0 0 1.4rem;
    text-align: center;
    font-size: 1.85rem;
    letter-spacing: -0.03em;
}
.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
}
.home-grid h3 { margin: 0 0 0.45rem; font-size: 1.08rem; }
.home-grid p, .home-steps { margin: 0; color: #3f3f3f; line-height: 1.55; }
.home-boards {
    margin: 1.6rem auto 0;
    max-width: 40rem;
    text-align: center;
    color: #4b4b4b;
    line-height: 1.55;
}
.home-robots { text-align: center; }
.home-robots-figure { margin: 0; background: #fff; }
.home-robots-figure img {
    display: block;
    width: min(760px, 100%);
    height: auto;
    margin: 0 auto;
    mix-blend-mode: multiply;
    opacity: 0.85;
}
.home-robots-figure figcaption {
    max-width: 38rem;
    margin: 0.6rem auto 0;
    color: #4b4b4b;
    line-height: 1.55;
}
.home-start { padding-bottom: 3.5rem; }
.home-steps {
    max-width: 40rem;
    margin: 0 auto;
    padding-left: 1.2rem;
}
.home-steps li + li { margin-top: 0.7rem; }
.home-cta { margin: 1.6rem 0 0; text-align: center; }
.home-button {
    display: inline-block;
    background: #141414;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    padding: 0.7rem 1rem;
}
.home-button:hover { background: #000; color: #fff; }
.home-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-top: 1px solid #ececec;
    padding-top: 1.2rem;
    padding-bottom: 1.6rem;
    color: #6b6b6b;
}
.home-arch { padding-top: 1rem; }
.home-arch-figure {
    margin: 0;
    background: #e4ead4;
    border-radius: 16px;
    padding: 0.85rem 0.85rem 1.1rem;
}
.home-arch-wide {
    display: block;
    width: 100%;
    height: auto;
    font-family: "Figtree", sans-serif;
}
.home-arch-wide .arch-card { fill: #fff; stroke: #e3e3e3; stroke-width: 1.25; }
.home-arch-wide .arch-card-dashed { fill: #f7f8f2; stroke: #141414; stroke-dasharray: 5 4; }
.home-arch-wide .arch-group { fill: #fff; stroke: #dedede; stroke-width: 1.25; }
.home-arch-wide .arch-mini { fill: #eef2e4; stroke: #e0e6d4; stroke-width: 1; }
.home-arch-wide .arch-fleet { fill: #fff; stroke: #e3e3e3; stroke-width: 1.25; }
.home-arch-wide .arch-line { stroke: #141414; stroke-width: 1.4; fill: none; }
.home-arch-wide .arch-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    fill: #6a6a6a;
}
.home-arch-wide .arch-title {
    font-size: 18px;
    font-weight: 700;
    fill: #141414;
    text-anchor: middle;
}
.home-arch-wide .arch-title-sm { font-size: 15px; }
.home-arch-wide .arch-sub { font-size: 12px; fill: #5c5c5c; text-anchor: middle; }
.home-arch-wide .arch-sub-start { text-anchor: start; }
.home-arch-wide .arch-label { font-size: 12px; fill: #5c5c5c; text-anchor: middle; }
.home-arch-wide .arch-label-end { text-anchor: end; }
.home-arch-wide .arch-tunnel { fill: #141414; }
.home-arch-wide .arch-tunnel-title {
    font-size: 15px;
    font-weight: 700;
    fill: #fff;
    text-anchor: middle;
}
.home-arch-wide .arch-tunnel-sub { font-size: 12px; fill: #e4e4e4; text-anchor: middle; }
.home-arch-wide .arch-mesh-line { stroke: #0f7a45; stroke-width: 1.8; fill: none; }
.home-arch-wide .arch-mesh-dot { fill: #0f7a45; }
.home-arch-wide .arch-mesh-title {
    font-size: 14px;
    font-weight: 700;
    fill: #0f7a45;
    text-anchor: middle;
}
.home-arch-wide .arch-bar { fill: #141414; }
.home-arch-wide .arch-bar-soft { fill: #cfcfcf; }
.home-arch-stack { display: none; }
.home-arch figcaption {
    max-width: 44rem;
    margin: 0.95rem auto 0;
    color: #4b4b4b;
    text-align: center;
    line-height: 1.55;
}
@media (max-width: 800px) {
    .home-cluster { display: none; }
    .home-boards { margin-left: 0; margin-right: 0; text-align: left; }
    .home-hero { padding-top: 2.8rem; }
    .home-bar { flex-wrap: wrap; row-gap: 0.35rem; }
    .home-grid { grid-template-columns: 1fr; }
    .home-arch-wide { display: none; }
    .home-arch-stack { display: flex; flex-direction: column; gap: 0.45rem; }
    .home-node {
        background: #fff;
        border: 1px solid #e3e3e3;
        border-radius: 12px;
        padding: 0.75rem 0.9rem;
    }
    .home-node strong { display: block; }
    .home-node span { color: #5c5c5c; font-size: 0.9rem; }
    .home-node-group { background: #fff; }
    .home-builders, .home-devices {
        display: grid;
        gap: 0.45rem;
        margin-top: 0.65rem;
    }
    .home-builders { grid-template-columns: 1fr 1fr; }
    .home-devices { grid-template-columns: 1fr 1fr; }
    .home-node-dashed { border-style: dashed; border-color: #141414; }
    .home-arch-arrow {
        margin: 0;
        text-align: center;
        color: #5c5c5c;
        font-size: 0.82rem;
    }
    .home-tunnel {
        border: 1px solid #141414;
        border-radius: 14px;
        background: #141414;
        color: #fff;
        text-align: center;
        padding: 0.75rem 0.9rem;
    }
    .home-tunnel strong { display: block; }
    .home-tunnel-bits {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.15rem 0.35rem;
        margin-top: 0.25rem;
    }
    .home-tunnel-bits span { color: #e4e4e4; font-size: 0.82rem; }
    .home-tunnel-bits span:not(:last-child)::after { content: " ·"; color: #bdbdbd; }
    .home-mesh {
        border: 1px solid #0f7a45;
        border-radius: 12px;
        background: #f3faf6;
        padding: 0.75rem 0.9rem;
    }
    .home-mesh strong { display: block; color: #0f7a45; }
    .home-mesh span { color: #3f3f3f; }
}

.shell { display: flex; min-height: 100vh; }
.side {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 256px;
    height: 100vh;
    flex: none;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 1.15rem 0.85rem 0.9rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.1rem 0.4rem 1rem;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-logo { width: 2.1rem; height: 2.1rem; display: block; border-radius: 8px; }
.side-org {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0.15rem 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.side-org i { color: var(--muted); }
.side-org span { overflow: hidden; text-overflow: ellipsis; }
.side-label {
    margin: 1.1rem 0.75rem 0.35rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.side-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.1rem 0;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}
.side-link i { width: 1.1rem; color: var(--muted); text-align: center; }
.side-link:hover { background: var(--hover); color: var(--ink); }
.side-link.active { background: var(--copper-soft); color: var(--ink); font-weight: 600; }
.side-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 3px;
    border-radius: 3px;
    background: var(--copper);
}
.side-link.active i { color: var(--copper-ink); }
.side-foot {
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}
.side-user { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.35rem; }
.side-avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--hover);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.85rem;
}
.side-email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; color: var(--muted); }
.side-user .theme-toggle { flex: none; width: 2rem; height: 2rem; border-color: var(--line); color: var(--ink); border-radius: 8px; }
.side-foot form { margin: 0.55rem 0 0; }
.side-logout {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-weight: 500;
    text-align: left;
}
.side-logout i { width: 1.1rem; color: var(--muted); }
.side-logout:hover { background: var(--hover); }

.main { flex: 1; min-width: 0; }
.topbar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.1rem 2rem 0;
}
.menu-button {
    display: none;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    border-radius: 10px;
    width: 2.4rem;
    height: 2.4rem;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.crumbs li { padding: 0; }
.crumbs li::before { padding: 0 !important; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: #c9c9c4; float: none; }
.crumbs .active { color: var(--ink); font-weight: 500; }
.page { max-width: 1240px; margin: 0 auto; padding: 0.6rem 2rem 3rem; }
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.35rem 0 1.4rem;
}
.page-head-text { min-width: 0; }
.page-head h1 {
    margin: 0;
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.page-subtitle { margin: 0.4rem 0 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }
.page-actions:empty { display: none; }
.page-actions form { margin: 0; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 1.1rem;
}
.card > .card-body.p-0 { overflow-x: auto; border-radius: 0 0 14px 14px; }
#devices td:first-child { white-space: nowrap; }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; }
.card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.card-title i, .section-icon { color: var(--muted); font-size: 0.95em; }
.card-body { padding: 1.1rem 1.25rem; }
.card-header.d-flex .card-title { float: none; }

.setup-methods {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: var(--line);
    --bs-accordion-btn-bg: transparent;
    --bs-accordion-active-bg: transparent;
    --bs-accordion-btn-color: var(--ink);
    --bs-accordion-active-color: var(--ink);
    --bs-accordion-btn-focus-box-shadow: none;
    --bs-accordion-border-radius: 14px;
}
.setup-methods .accordion-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.setup-methods .accordion-item:not(:first-of-type) { border-top: 1px solid var(--line); }
.setup-methods .accordion-button {
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    font-weight: 700;
    box-shadow: none;
}
.setup-methods .accordion-button::after { display: none; }
.setup-methods .accordion-button:focus { box-shadow: none; }
.setup-methods .accordion-button:not(.collapsed) { border-bottom: 1px solid var(--line); }
.setup-methods .setup-method-text { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 0.15rem; min-width: 0; }
.setup-methods .setup-method-title { font-size: 1.08rem; line-height: 1.2; }
.setup-methods .setup-method-summary { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.setup-methods .setup-chevron { margin-left: auto; color: var(--muted); transition: transform 0.2s ease; }
.setup-methods .accordion-button:not(.collapsed) .setup-chevron { transform: rotate(180deg); }
.setup-methods .accordion-body { padding: 1rem 1.25rem 1.15rem; }
.setup-methods .accordion-button > .fas:first-child { color: var(--muted); width: 1.1rem; text-align: center; }

.table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--hover); margin: 0; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: transparent; }
.table > :not(caption) > * > * { border-color: var(--line); padding: 0.85rem 1.25rem; vertical-align: middle; }
.table > tbody > tr:last-child > * { border-bottom: 0; }
.table thead th {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    background: transparent;
    white-space: nowrap;
}
.table a { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a:hover { text-decoration: underline; }

.form-control, .form-select {
    border-color: #dcdcd6;
    border-radius: 10px;
    background: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(22, 24, 27, 0.08);
}
.form-label { font-weight: 500; }
.text-muted, .form-text, .login-box-msg { color: var(--muted) !important; }
code {
    background: #f1f1ed;
    color: var(--ink);
    padding: 0.12em 0.35em;
    border-radius: 6px;
}
.guide-shot { display: block; width: 320px; max-width: 100%; height: auto; margin-top: 0.85rem; border: 1px solid var(--line); border-radius: 10px; }
.guide .sample + .sample {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.guide .sample > .card:first-child .card-title { font-size: 1.2rem; }
.guide pre {
    position: relative;
    background: #1c1917;
    color: #f5f1ea;
    border-radius: 12px;
    padding: 1rem 2.8rem 1rem 1.1rem;
    overflow: auto;
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 0;
}
.code-copy {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: rgba(245, 241, 234, 0.1);
    color: #f5f1ea;
}
.code-copy:hover, .code-copy:focus {
    background: rgba(245, 241, 234, 0.2);
    color: #fff;
}
.code-copy.is-copied { color: #86efac; }
.guide pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}
.install-command pre {
    font-size: 1rem;
    white-space: pre-wrap;
    word-break: break-all;
}
.invite { display: inline-block; word-break: break-all; font-size: 0.95rem; }

.btn { border-radius: 10px; font-weight: 600; padding: 0.5rem 0.95rem; }
.btn-sm { padding: 0.28rem 0.65rem; border-radius: 8px; }
.btn i { margin-right: 0.15rem; }
.row-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.45rem; }
.row-actions form { margin: 0; }
.cell-actions { white-space: nowrap; }
.cell-actions form + form { margin-left: 0.45rem; }
.builder-list { display: flex; flex-direction: column; }
.builder-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.95rem 1.1rem;
    border-top: 1px solid var(--line);
}
.builder-row:first-child { border-top: 0; }
.builder-main { min-width: min(100%, 18rem); flex: 1; }
.builder-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.builder-name strong { font-size: 1rem; }
.builder-meta { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.88rem; }
.builder-job { margin: 0.35rem 0 0; font-size: 0.9rem; }
.builder-job i { color: var(--warn); margin-right: 0.25rem; }
.icon-btn {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
}
a.icon-btn:hover, button.icon-btn:hover, a.icon-btn:focus-visible, button.icon-btn:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.icon-btn.is-warn { color: var(--warn); border-color: #e6d3a8; background: var(--warn-soft); }
.icon-btn.is-warn:hover, .icon-btn.is-warn:focus-visible { color: var(--warn); border-color: var(--warn); }
.icon-btn.is-danger:hover, .icon-btn.is-danger:focus-visible { color: var(--bad); border-color: var(--bad); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: #000; border-color: #000; color: #fff; }
.btn-outline-primary, .btn-outline-secondary { border-color: #d6d6d0; color: var(--ink); background: var(--card); }
.btn-outline-primary:hover, .btn-outline-primary:focus,
.btn-outline-secondary:hover, .btn-outline-secondary:focus { border-color: var(--ink); background: var(--hover); color: var(--ink); }
.btn-link { color: var(--ink); font-weight: 600; }
.btn i, .side-link i, .brand i { pointer-events: none; }

.device-network-live {
    color: var(--good);
    font-size: 0.65rem;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.badge[class*="status-"], .build-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 8px;
    padding: 0.3em 0.6em;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}
.badge.status-online, .badge.status-succeeded, .build-status.status-succeeded { background: var(--good-soft); color: var(--good); }
.badge.status-pending,
.badge.status-queued,
.badge.status-running,
.badge.status-re-provisioning,
.build-status.status-queued,
.build-status.status-building { background: var(--warn-soft); color: var(--warn); }
.badge.status-offline { background: var(--accent-soft); color: var(--muted); }
.build-status.status-cloud { background: #eaf3fb; color: #2b6aa3; }
.badge.status-idle { background: var(--good-soft); color: var(--good); }
.badge.status-busy { background: var(--warn-soft); color: var(--warn); }
.badge.status-free { background: #eef1f4; color: var(--muted); }
.badge.status-basic { background: #eaf3fb; color: #2b6aa3; }
.badge.status-pro { background: var(--good-soft); color: var(--good); }
.badge.status-enterprise { background: var(--warn-soft); color: var(--warn); }
#members .cell-actions { vertical-align: middle; }
#members .row-actions { flex-wrap: nowrap; }
#members tr.member-main > td:not(.cell-actions) { border-bottom: 0; padding-bottom: 0.15rem; }
#members tr.member-detail > td { border-top: 0; padding-top: 0; }
#members tbody.member > tr > * { --bs-table-bg-type: transparent; }
#members tbody.member:hover > tr > * {
    --bs-table-color-state: var(--bs-table-hover-color);
    --bs-table-bg-state: var(--bs-table-hover-bg);
}
.member-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding-bottom: 0.35rem; }
.member-fact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ink);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
}
.member-fact i { font-size: 0.95rem; }
.member-ip { color: var(--muted); font-weight: 500; }
#sessions .table { table-layout: fixed; width: 100%; }
#sessions .table > :not(caption) > * > * { padding-left: 0.7rem; padding-right: 0.7rem; }
#sessions th:nth-child(1),
#sessions td:nth-child(1) { width: 26%; }
.session-browser { white-space: nowrap; }
.session-browser-icon { font-size: 1.15rem; vertical-align: middle; }
#sessions td:nth-child(2) { overflow-wrap: anywhere; }
#sessions th:nth-child(3),
#sessions td:nth-child(3) { width: 11.5rem; white-space: nowrap; }
#sessions th:nth-child(4),
#sessions td:nth-child(4) { width: 6.2rem; padding-left: 0.35rem; padding-right: 0.35rem; text-align: right; }
.badge.session-current {
    margin-left: 0.5rem;
    background: var(--accent-soft);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.15em 0.6em;
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1.4;
    vertical-align: middle;
}
.badge.branch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.35rem;
    background: #fff4e5;
    color: #9a3412;
    border-radius: 999px;
    padding: 0.28em 0.65em;
    font-weight: 700;
    font-size: 0.75rem;
    vertical-align: middle;
}
.badge.status-disabled,
.badge.status-rejected,
.badge.status-removing,
.badge.status-failed,
.build-status.status-failed { background: var(--bad-soft); color: var(--bad); }

.summary-band, .fact, .meter, .stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.4rem;
}
.stat { position: relative; padding: 0.95rem 1.1rem 1rem; min-width: 0; }
.stat-label { margin: 0; color: var(--muted); font-size: 0.86rem; }
.stat-value {
    margin: 0.3rem 0 0;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.stat-value.fleet-phase { font-size: 1.25rem; }
.stat-icon { position: absolute; top: 1rem; right: 1.05rem; color: var(--copper); font-size: 1.15rem; }
.stat-dot { display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.35rem; border-radius: 50%; background: #b5b5ae; vertical-align: middle; }
.stat-dot.is-on { background: #16a34a; }
.release-line { margin: -0.6rem 0 1.4rem; color: var(--muted); }
.status-pip { display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.55rem; border-radius: 50%; background: #b5b5ae; vertical-align: middle; }
.status-pip.pip-online { background: #16a34a; }
.status-pip.pip-pending, .status-pip.pip-re-provisioning { background: #d97706; }
.status-pip.pip-rejected, .status-pip.pip-disabled, .status-pip.pip-removing { background: #dc2626; }
.summary-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
}
.summary-identity, .summary-actions { display: flex; align-items: center; gap: 0.85rem; }
.summary-kicker {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.summary-kicker a { color: inherit; text-decoration: none; }
.summary-stat { margin: 0.15rem 0 0; font-size: 1.02rem; }
.fleet-phase.phase-building,
.fleet-phase.phase-deploying,
td.is-pulling { color: var(--warn); font-weight: 700; }
.fleet-phase.phase-running { color: var(--good); font-weight: 700; }
.age-month { color: #c2410c; font-weight: 700; }
.age-quarter { color: var(--bad); font-weight: 700; }
.summary-release { min-width: min(100%, 28rem); }
.live-mark { margin: 0.25rem 0 0; color: var(--good); font-size: 0.85rem; font-weight: 700; }
.live-mark::before {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: #14a35a;
    box-shadow: 0 0 0 0 rgba(20, 163, 90, 0.55);
    animation: live-pulse 1.8s ease-out infinite;
}
.live-mark.is-quiet { color: var(--muted); }
.live-mark.is-quiet::before { background: #b0a89c; animation: none; box-shadow: none; }
@keyframes live-pulse {
    70% { box-shadow: 0 0 0 6px rgba(20, 163, 90, 0); }
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
}
.fact { margin: 0; padding: 0.8rem 0.95rem; }
.fact dt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.fact dd { margin: 0.3rem 0 0; word-break: break-word; }

.meter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.meter { padding: 0.85rem 0.95rem; }
.meter-label {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.meter-value { color: var(--ink); letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
.meter-track { height: 0.45rem; background: #ececE7; border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.meter-fill-warm { background: var(--copper); }

.service-list { border-top: 1px solid var(--line); }
.service-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    padding: 0.75rem 1rem;
}
.service-row + .service-row { border-top: 1px solid var(--line); }
.service-name { font-weight: 700; }
.service-name i { color: var(--accent); margin-right: 0.35rem; }
.service-row code { font-size: 0.82rem; }
.service-log {
    min-height: 9rem;
    max-height: 22rem;
    margin: 0;
    overflow: auto;
    background: #fafaf8;
    color: var(--ink);
    padding: 0.9rem 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.84rem;
    line-height: 1.45;
    border-radius: 0 0 14px 14px;
}
.service-log.log-pane {
    min-height: 12rem;
    max-height: 36rem;
}

.build-table { table-layout: fixed; width: 100%; }
.build-table th:nth-child(1),
.build-table td:nth-child(1) { width: 17rem; }
.build-table th:nth-child(2),
.build-table td:nth-child(2) { width: 8.5rem; }
.build-table th:nth-child(3),
.build-table td:nth-child(3) { width: 12rem; white-space: nowrap; }
.build-table th:nth-child(4),
.build-table td:nth-child(4) { width: 24rem; }
.build-table td:nth-child(5) { overflow-wrap: anywhere; }
.build-ref, .build-image { display: flex; align-items: center; gap: 0.45rem; min-width: 0; white-space: nowrap; }
.build-image code { white-space: nowrap; }
.build-ref .branch-label { margin-left: 0; }
.build-table tr.is-link { cursor: pointer; }
.build-table tr.is-link:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.build-num { font-weight: 700; color: inherit; text-decoration: none; }
.build-ref i, .build-image i { color: var(--accent); }
.build-reason { margin: 0.35rem 0 0; overflow-wrap: anywhere; font-size: 0.86rem; }
.nav-tabs { border-bottom: 1px solid var(--line); gap: 1.6rem; margin-bottom: 1.25rem !important; }
.nav-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: -1px;
    padding: 0.6rem 0.15rem 0.7rem;
    color: var(--muted);
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    font-weight: 500;
}
.nav-tabs .nav-link i { display: none; }
.nav-tabs .nav-link:hover { color: var(--ink); border-bottom-color: #d6d6d0; }
.nav-tabs .nav-link.active { color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--copper); font-weight: 600; }

.alert-success { background: var(--good-soft); color: var(--good); border-color: #b7e4c7; }
.alert-danger { background: var(--bad-soft); color: var(--bad); border-color: #f3c1c1; }
.alert-warning { background: #fff6d8; color: #6b4e00; border-color: #ead48a; }
tr.firewall-locked td { color: #6b7280; background: #f3f4f6; }
tr.firewall-locked .fa-lock { margin-right: 0.35rem; }
.firewall-shield { margin-right: 0.45rem; }
.firewall-shield.is-on { color: var(--good); }
.firewall-shield.is-off { color: var(--bad); }
.firewall-shield.is-paused { color: var(--bad); }
a + .firewall-shield.is-paused { margin-left: 0.45rem; }
.alert-success, .alert-danger, .alert-warning { border-radius: 12px; }
.update-log { max-height: 32rem; overflow: auto; background: #fafaf8; color: var(--ink); padding: 0.8rem; white-space: pre-wrap; border-radius: 12px; }
.shell-terminal { height: 32rem; background: #000; border: 1px solid #2a2a2a; border-radius: 12px; padding: 0.85rem 0.7rem 0.6rem; }
.shell-terminal .xterm { height: 100%; }
.shell-terminal .xterm-viewport { background-color: #000 !important; }

.app-login { min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(40, 32, 22, 0.06);
    padding: 1.5rem 1.4rem 1.3rem;
}
.login-brand { margin-bottom: 0.8rem; font-size: 1.4rem; }
.login-code {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    line-height: 1;
}
.theme-toggle:hover,
.theme-toggle:focus-visible { background: rgba(20, 20, 20, 0.06); }

html[data-theme="dark"] body.home {
    background: #121417;
    color: #f3f4f5;
    color-scheme: dark;
}
html[data-theme="dark"] body.home .home-bar { background: #121417; }
html[data-theme="dark"] body.home .home-cluster,
html[data-theme="dark"] body.home .home-robots-figure img {
    mix-blend-mode: screen;
    filter: invert(1);
    opacity: 0.55;
}
html[data-theme="dark"] body.home .home-robots-figure { background: #121417; }
html[data-theme="dark"] body.home .home-robots-figure figcaption { color: #c4c8cc; }
html[data-theme="dark"] body.home .home-bar,
html[data-theme="dark"] body.home .home-foot { border-color: #2a2e33; }
html[data-theme="dark"] body.home .home-brand,
html[data-theme="dark"] body.home .home-note a,
html[data-theme="dark"] body.home .theme-toggle { color: #f3f4f5; }
html[data-theme="dark"] body.home .home-nav a { color: #d5d8dc; }
html[data-theme="dark"] body.home .home-nav a:hover { color: #fff; }
html[data-theme="dark"] body.home .home-nav-strong { border-color: #f3f4f5; }
html[data-theme="dark"] body.home .home-lede,
html[data-theme="dark"] body.home .home-note,
html[data-theme="dark"] body.home .home-boards,
html[data-theme="dark"] body.home .home-grid p,
html[data-theme="dark"] body.home .home-steps,
html[data-theme="dark"] body.home .home-arch figcaption,
html[data-theme="dark"] body.home .home-foot { color: #c4c8cc; }
html[data-theme="dark"] body.home .home-domain { color: #b7bdc2; }
html[data-theme="dark"] body.home .home-product { color: #f3f4f5; }
html[data-theme="dark"] body.home .home-code { background: #0c0d0f; }
html[data-theme="dark"] body.home .home-button { background: #f3f4f5; color: #121417; }
html[data-theme="dark"] body.home .home-button:hover { background: #fff; color: #121417; }
html[data-theme="dark"] body.home .theme-toggle:hover,
html[data-theme="dark"] body.home .theme-toggle:focus-visible { background: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] body.home .home-arch-figure { background: #2a3324; }
html[data-theme="dark"] body.home .home-arch-wide .arch-card,
html[data-theme="dark"] body.home .home-arch-wide .arch-group,
html[data-theme="dark"] body.home .home-arch-wide .arch-fleet { fill: #1b1e22; stroke: #3a4148; }
html[data-theme="dark"] body.home .home-arch-wide .arch-card-dashed { fill: #23281c; stroke: #d7d7d7; }
html[data-theme="dark"] body.home .home-arch-wide .arch-mini { fill: #31382a; stroke: #3d4634; }
html[data-theme="dark"] body.home .home-arch-wide .arch-line,
html[data-theme="dark"] body.home .home-arch-wide #home-arrow path { stroke: #e8e8e8; }
html[data-theme="dark"] body.home .home-arch-wide .arch-kicker { fill: #b5b5b5; }
html[data-theme="dark"] body.home .home-arch-wide .arch-title { fill: #f4f4f4; }
html[data-theme="dark"] body.home .home-arch-wide .arch-sub,
html[data-theme="dark"] body.home .home-arch-wide .arch-label { fill: #b0b0b0; }
html[data-theme="dark"] body.home .home-arch-wide .arch-tunnel { fill: #0c0d0f; }
html[data-theme="dark"] body.home .home-arch-wide .arch-mesh-line { stroke: #8fd4ae; }
html[data-theme="dark"] body.home .home-arch-wide .arch-mesh-dot,
html[data-theme="dark"] body.home .home-arch-wide .arch-mesh-title { fill: #8fd4ae; }
html[data-theme="dark"] body.home .home-mesh { background: #14241c; border-color: #8fd4ae; }
html[data-theme="dark"] body.home .home-mesh strong { color: #8fd4ae; }
html[data-theme="dark"] body.home .home-mesh span { color: #c4c8cc; }
html[data-theme="dark"] body.home .home-arch-wide .arch-bar { fill: #e8e8e8; }
html[data-theme="dark"] body.home .home-arch-wide .arch-bar-soft { fill: #6d6d6d; }
html[data-theme="dark"] body.home .home-node,
html[data-theme="dark"] body.home .home-node-group { background: #1b1e22; border-color: #3a4148; }
html[data-theme="dark"] body.home .home-node span,
html[data-theme="dark"] body.home .home-arch-arrow { color: #b0b0b0; }
html[data-theme="dark"] body.home .home-node-dashed { border-color: #d7d7d7; }
html[data-theme="dark"] body.home .home-tunnel { background: #0c0d0f; border-color: #0c0d0f; }

html[data-theme="dark"] body.app-shell {
    --paper: #14171b;
    --ink: #e8eaed;
    --muted: #a7b0ba;
    --line: #2c3238;
    --card: #1c2127;
    --accent: #e8eaed;
    --accent-soft: #252a30;
    --hover: #22272d;
    --copper-soft: #33261a;
    --copper-ink: #f0b679;
    --good: #8fd4ae;
    --good-soft: #143226;
    --warn: #e4c07a;
    --warn-soft: #3a2e14;
    --bad: #f0b0b0;
    --bad-soft: #3a1c1c;
    --shadow: none;
    color-scheme: dark;
    background: var(--paper);
    color: var(--ink);
}
html[data-theme="dark"] body.app-shell .side,
html[data-theme="dark"] body.app-shell .menu-button,
html[data-theme="dark"] body.app-shell .fact,
html[data-theme="dark"] body.app-shell .stat,
html[data-theme="dark"] body.app-shell .summary-band,
html[data-theme="dark"] body.app-shell .meter { background: var(--card); color: var(--ink); }
html[data-theme="dark"] body.app-shell .btn-primary { background: #f3f4f5; border-color: #f3f4f5; color: #121417; }
html[data-theme="dark"] body.app-shell .btn-primary:hover,
html[data-theme="dark"] body.app-shell .btn-primary:focus { background: #fff; border-color: #fff; color: #121417; }
html[data-theme="dark"] body.app-shell .btn-outline-primary,
html[data-theme="dark"] body.app-shell .btn-outline-secondary { border-color: #3a424a; }
html[data-theme="dark"] body.app-shell .side-avatar { background: #2a3036; }
html[data-theme="dark"] body.app-shell .side-user .theme-toggle { border-color: var(--line); }
html[data-theme="dark"] body.app-shell .crumbs li + li::before { color: #5c656e; }
html[data-theme="dark"] body.app-shell .theme-toggle:hover,
html[data-theme="dark"] body.app-shell .theme-toggle:focus-visible { background: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] body.app-shell .table {
    --bs-table-color: var(--ink);
    --bs-table-bg: transparent;
    --bs-table-striped-color: var(--ink);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
    --bs-table-hover-color: var(--ink);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.07);
    --bs-table-border-color: var(--line);
}
html[data-theme="dark"] body.app-shell .table thead th { background: transparent; }
html[data-theme="dark"] body.app-shell .form-control,
html[data-theme="dark"] body.app-shell .form-select {
    border-color: #3a424a;
    background: #14181c;
    color: var(--ink);
}
html[data-theme="dark"] body.app-shell .form-control::placeholder { color: #8b969f; }
html[data-theme="dark"] body.app-shell code { background: #2a3036; color: var(--ink); }
html[data-theme="dark"] body.app-shell .guide pre code { background: transparent; color: inherit; }
html[data-theme="dark"] body.app-shell .badge.branch-label { background: #3a2414; color: #fdba74; }
html[data-theme="dark"] body.app-shell tr.firewall-locked td { color: #9aa3ad; background: #1a1e23; }
html[data-theme="dark"] body.app-shell .badge.status-free { background: #2a3036; color: var(--muted); }
html[data-theme="dark"] body.app-shell .nav-tabs .nav-link.active { background: transparent; border-bottom-color: var(--copper); }
html[data-theme="dark"] body.app-shell .meter-track { background: #2a3036; }
html[data-theme="dark"] body.app-shell .service-log,
html[data-theme="dark"] body.app-shell .update-log { background: #12161a; color: var(--ink); }
html[data-theme="dark"] body.app-shell .alert-success { border-color: #245c3a; }
html[data-theme="dark"] body.app-shell .alert-danger { border-color: #6e3030; }
html[data-theme="dark"] body.app-shell .alert-warning { background: #3a3118; color: #f3d48a; border-color: #6b5420; }

@media (max-width: 992px) {
    .meter-row, .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
    .menu-button { display: inline-grid; place-items: center; }
    .side {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 20;
        transform: translateX(-100%);
        transition: transform 0.18s ease;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    }
    .shell.nav-open .side { transform: none; }
    .page, .topbar { padding-left: 1rem; padding-right: 1rem; }
    .nav-tabs { gap: 1rem; flex-wrap: nowrap; overflow-x: auto; }
    .nav-tabs .nav-link { white-space: nowrap; }
}

.arm-bar {
    position: fixed;
    z-index: 1050;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem 1.25rem;
    width: min(820px, calc(100% - 2rem));
    padding: 1rem 1.15rem;
    background: #fff;
    color: #141414;
    border: 1px solid #e3e3df;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    font-family: "Figtree", sans-serif;
}
.arm-bar[hidden], .arm-prefs[hidden] { display: none !important; }
.arm-bar-text { margin: 0; flex: 1; font-size: 0.92rem; line-height: 1.45; color: #3a3a3a; }
.arm-bar-text a, .arm-prefs-more a { color: #141414; font-weight: 600; }
.arm-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: none; }
.arm-button {
    min-width: 6.5rem;
    padding: 0.55rem 1rem;
    border: 1px solid #141414;
    border-radius: 8px;
    background: #141414;
    color: #fff;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.arm-button:hover, .arm-button:focus-visible { background: #000; border-color: #000; color: #fff; }
.arm-button-quiet { background: transparent; color: #141414; border-color: #d0d0ca; }
.arm-button-quiet:hover, .arm-button-quiet:focus-visible { background: #f3f3f0; color: #141414; border-color: #141414; }
.arm-prefs {
    position: fixed;
    z-index: 1060;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(16, 20, 24, 0.45);
    font-family: "Figtree", sans-serif;
}
.arm-prefs-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.3rem 1.4rem 1.2rem;
    background: #fff;
    color: #141414;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.arm-prefs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.arm-prefs-head h2 { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.arm-prefs-close { width: 2.1rem; height: 2.1rem; border: 0; border-radius: 8px; background: transparent; color: #141414; font-size: 1.1rem; }
.arm-prefs-close:hover { background: #f3f3f0; }
.arm-prefs-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 0;
    border-top: 1px solid #ececE8;
}
.arm-prefs-name { margin: 0; font-weight: 700; }
.arm-prefs-note { margin: 0.2rem 0 0; color: #5c656c; font-size: 0.9rem; line-height: 1.45; }
.arm-prefs-more { margin: 0.2rem 0 0.9rem; font-size: 0.9rem; }
.arm-prefs-actions { justify-content: flex-end; }
.arm-switch { position: relative; flex: none; display: inline-flex; align-items: center; cursor: pointer; margin-top: 0.1rem; }
.arm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.arm-switch span {
    position: relative;
    width: 2.75rem;
    height: 1.55rem;
    border-radius: 999px;
    background: #cfcfca;
    transition: background 0.15s ease;
}
.arm-switch span::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}
.arm-switch input:checked + span { background: #141414; }
.arm-switch input:checked + span::after { transform: translateX(1.2rem); }
.arm-switch input:focus-visible + span { outline: 2px solid #e7a15a; outline-offset: 2px; }
.arm-switch.is-locked { cursor: default; }
.arm-switch.is-locked input:checked + span { background: #8a8f94; }
.arm-switch em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.home-foot a { color: inherit; }
.home-foot-sep { color: #b5b5b5; }
.home-foot { flex-wrap: wrap; }
.home-foot-legal { flex-basis: 100%; margin: 0.4rem 0 0; text-align: center; font-size: 0.78rem; color: #8a8a8a; }
.side-cookies { display: block; margin: 0.45rem 0.75rem 0; color: var(--muted); font-size: 0.8rem; text-decoration: none; }
.side-cookies:hover { color: var(--ink); text-decoration: underline; }
.cookie-page .login-card { width: min(780px, 100%); }
.cookie-statement h2 { margin: 1.6rem 0 0.5rem; font-size: 1.15rem; font-weight: 700; }
.cookie-title { margin: 0 0 0.6rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.cookie-statement .table { margin: 0.4rem 0 0.8rem; font-size: 0.92rem; }
.cookie-statement .table > :not(caption) > * > * { padding: 0.6rem 0.7rem; }
.cookie-statement .arm-actions { margin-top: 0.4rem; }
.cookie-back { margin: 1.6rem 0 0; }
html[data-theme="dark"] .arm-bar, html[data-theme="dark"] .arm-prefs-card { background: #1c2127; color: #e8eaed; border-color: #2c3238; }
html[data-theme="dark"] .arm-bar-text, html[data-theme="dark"] .arm-prefs-note { color: #c4c8cc; }
html[data-theme="dark"] .arm-bar-text a, html[data-theme="dark"] .arm-prefs-more a, html[data-theme="dark"] .arm-prefs-close { color: #f3f4f5; }
html[data-theme="dark"] .arm-prefs-row { border-color: #2c3238; }
html[data-theme="dark"] .arm-button { background: #f3f4f5; border-color: #f3f4f5; color: #121417; }
html[data-theme="dark"] .arm-button-quiet { background: transparent; color: #f3f4f5; border-color: #4a525a; }
html[data-theme="dark"] .arm-switch input:checked + span { background: #f3f4f5; }
html[data-theme="dark"] .arm-switch input:checked + span::after { background: #121417; }
@media (max-width: 640px) {
    .arm-bar { flex-direction: column; align-items: stretch; }
    .arm-actions .arm-button { flex: 1; }
}

.visit-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.visit-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.visit-bar span { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--copper); }
.visit-bar:hover span { background: var(--ink); }
.visit-axis { display: flex; justify-content: space-between; margin-top: 0.45rem; color: var(--muted); font-size: 0.8rem; }
.visit-flag { font-size: 1.05rem; }

.feedback-tab {
    position: fixed;
    right: 0;
    bottom: 7rem;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 1.05rem 0.7rem;
    border: 1px solid #c9d2b4;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #e4ead4;
    color: #141414;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    writing-mode: vertical-rl;
    box-shadow: -2px 2px 12px rgba(16, 24, 32, 0.12);
    cursor: pointer;
    transition: background 0.15s ease, padding 0.15s ease;
}
.feedback-tab:hover,
.feedback-tab:focus-visible { background: #d4dcc0; padding-right: 0.9rem; outline: none; }
.feedback-tab i { transform: rotate(90deg); color: #141414; }
.feedback-tab[aria-expanded="true"] { opacity: 0; pointer-events: none; }
.feedback-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1045;
    background: rgba(8, 10, 12, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.feedback-backdrop.is-open { opacity: 1; }
.feedback-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    background: var(--card);
    color: var(--ink);
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.22s ease;
}
.feedback-panel.is-open { transform: translateX(0); }
.feedback-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem 0.9rem;
    border-bottom: 1px solid var(--line);
}
.feedback-head h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.feedback-head p { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0; }
.feedback-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--muted);
}
.feedback-close:hover { color: var(--ink); }
.feedback-body { padding: 1.1rem 1.25rem; overflow-y: auto; }
.feedback-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
html[data-theme="dark"] .feedback-tab {
    background: #2a3324;
    border-color: #3d4a32;
    color: #e8eaed;
}
html[data-theme="dark"] .feedback-tab:hover,
html[data-theme="dark"] .feedback-tab:focus-visible { background: #35402d; }
html[data-theme="dark"] .feedback-tab i { color: #e8eaed; }
@media (max-width: 575.98px) {
    .feedback-tab { bottom: 5rem; padding: 0.85rem 0.55rem; font-size: 0.8rem; }
}

/* Signed-in app and login: compact console scale. The public homepage stays as it is. */
body.app-shell,
body.app-login {
    font-size: 13px;
    line-height: 1.45;
}
body.app-shell .side {
    width: 216px;
    padding: 0.7rem 0.55rem 0.6rem;
}
body.app-shell .brand {
    gap: 0.45rem;
    margin: 0.15rem 0.35rem 0.55rem;
    font-size: 0.95rem;
}
body.app-shell .brand-logo { width: 1.5rem; height: 1.5rem; border-radius: 6px; }
body.app-shell .side-org {
    gap: 0.45rem;
    margin: 0 0.15rem 0.35rem;
    padding: 0.32rem 0.55rem;
    border-radius: 8px;
    font-size: 12.5px;
}
body.app-shell .side-label {
    margin: 0.75rem 0.6rem 0.15rem;
    font-size: 0.62rem;
}
body.app-shell .side-link {
    gap: 0.5rem;
    padding: 0.32rem 0.55rem;
    border-radius: 7px;
    font-size: 13px;
}
body.app-shell .side-link.active::before { top: 0.28rem; bottom: 0.28rem; }
body.app-shell .side-avatar { width: 1.55rem; height: 1.55rem; font-size: 0.72rem; }
body.app-shell .side-email { font-size: 11.5px; }
body.app-shell .side-user { gap: 0.4rem; }
body.app-shell .side-user .theme-toggle { width: 1.55rem; height: 1.55rem; border-radius: 6px; font-size: 0.72rem; }
body.app-shell .side-foot { padding-top: 0.55rem; }
body.app-shell .side-foot form { margin: 0; }
body.app-shell .side-foot-links { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; margin-top: 0.25rem; }
body.app-shell .side-logout { padding: 0.28rem 0.5rem; border-radius: 7px; font-size: 12.5px; }
body.app-shell .side-cookies { margin: 0 0.5rem 0 0; font-size: 11.5px; }
body.app-shell .topbar { padding: 0; border-bottom: 1px solid var(--line); background: var(--card); }
body.app-shell .topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 1240px;
    margin: 0 auto;
    min-height: 44px;
    padding: 0.35rem 1.25rem;
}
body.app-shell .topbar-trail { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
body.app-shell .topbar-meta {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.app-shell .crumbs { font-size: 12px; }
body.app-shell .page { padding: 0.85rem 1.25rem 2rem; }
body.app-shell .page-head { align-items: center; margin: 0 0 0.75rem; }
body.app-shell .page-head h1 { font-size: 1.35rem; letter-spacing: -0.02em; }
body.app-shell .page-head-aside:empty { display: none; }
body.app-shell .page-subtitle { margin: 0.15rem 0 0; font-size: 12.5px; }
body.app-shell .page-actions .btn { white-space: nowrap; }
body.app-shell h2, body.app-shell .h2 { font-size: 1.05rem; }
body.app-shell h3, body.app-shell .h3, body.app-shell .card-title { font-size: 13px; font-weight: 650; }
body.app-shell p, body.app-shell li, body.app-shell label, body.app-shell .form-label { font-size: 13px; }
body.app-shell .form-label { margin-bottom: 0.25rem; }
body.app-shell .form-text, body.app-shell .text-muted, body.app-shell .login-box-msg { font-size: 12.5px; }
body.app-shell .card, body.app-shell .stat, body.app-shell .fact, body.app-shell .meter, body.app-shell .summary-band {
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
body.app-shell .card-header { padding: 0.55rem 0.8rem; }
body.app-shell .card-fold > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    cursor: pointer;
    list-style: none;
}
body.app-shell .card-fold > summary::-webkit-details-marker { display: none; }
body.app-shell .card-fold > summary::marker { content: ""; }
body.app-shell .card-fold > summary .card-title { margin: 0; }
body.app-shell .card-fold > summary:hover { background: var(--hover); }
body.app-shell .card-fold-chevron { color: var(--muted); font-size: 0.75rem; transition: transform 0.15s ease; }
body.app-shell .card-fold[open] > summary .card-fold-chevron { transform: rotate(180deg); }
body.app-shell .card-body { padding: 0.7rem 0.8rem; }
body.app-shell .table > :not(caption) > * > * { padding: 0.4rem 0.7rem; font-size: 12.5px; }
body.app-shell .table thead th { font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; font-weight: 650; }
body.app-shell code, body.app-shell .mono { font-family: var(--mono); font-size: 12px; }
body.app-shell .btn {
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.32rem 0.65rem;
}
body.app-shell .btn-sm { padding: 0.18rem 0.45rem; border-radius: 5px; font-size: 12px; }
body.app-shell .form-control,
body.app-shell .form-select,
body.app-login .form-control,
body.app-login .form-select {
    min-height: 0;
    height: 32px;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.3;
}
body.app-shell textarea.form-control,
body.app-login textarea.form-control { height: auto; }
body.app-shell input[type="password"].form-control,
body.app-login input[type="password"].form-control { padding-right: 1.8rem; }
body.app-shell input[type="password"]::-ms-reveal,
body.app-shell input[type="password"]::-ms-clear,
body.app-shell input[type="password"]::reveal-icon,
body.app-shell input[type="password"]::-webkit-reveal,
body.app-login input[type="password"]::-ms-reveal,
body.app-login input[type="password"]::-ms-clear,
body.app-login input[type="password"]::reveal-icon,
body.app-login input[type="password"]::-webkit-reveal { display: none; }
body.app-shell .var-table {
    display: grid;
    grid-template-columns: 14rem 14rem max-content max-content;
    column-gap: 0.55rem;
    row-gap: 0.4rem;
    align-items: center;
    justify-content: start;
    margin-bottom: 0.75rem;
}
body.app-shell .var-table .form-control {
    height: 32px;
    padding: 0.25rem 1.8rem 0.25rem 0.55rem;
}
body.app-shell .var-row,
body.app-shell .var-add,
body.app-shell .var-actions,
body.app-shell .var-remove { display: contents; }
body.app-shell .var-name { min-width: 0; }
body.app-shell .var-name .text-muted { margin-left: 0.35rem; }
body.app-shell .var-value-slot,
body.app-shell .var-field { min-width: 0; }
body.app-shell .var-value-slot .form-control,
body.app-shell .var-field .form-control { width: 100%; }
body.app-shell .var-row:not(.is-editing) .var-value { display: none; }
body.app-shell .var-row.is-editing .var-mask { display: none; }
body.app-shell .var-mask {
    display: flex;
    align-items: center;
    color: var(--muted);
    letter-spacing: 0.14em;
    user-select: none;
}
body.app-shell .var-table .btn { height: 32px; margin: 0; }
body.app-shell form:not(.row) > .mb-3 > .form-control,
body.app-shell form:not(.row) > .mb-3 > .form-select,
body.app-shell form:not(.row) > .mb-3 > .form-widget .form-control,
body.app-shell form:not(.row) > .mb-3 > .form-widget .form-select { max-width: 22rem; }
body.app-shell .alert { padding: 0.45rem 0.7rem; border-radius: 8px; font-size: 12.5px; }
body.app-shell .badge, body.app-shell .build-status { border-radius: 999px; padding: 0.12em 0.5em; font-size: 11px; font-weight: 650; }
body.app-shell .nav-tabs { gap: 1rem; margin-bottom: 0.75rem !important; }
body.app-shell .nav-tabs .nav-link { padding: 0.35rem 0.05rem 0.45rem; font-size: 13px; }
body.app-shell .stat { padding: 0.55rem 0.7rem 0.6rem; }
body.app-shell .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 650; }
body.app-shell .stat-value { margin-top: 0.1rem; font-size: 1.05rem; font-weight: 650; }
body.app-shell .stat-value.fleet-phase { font-size: 0.95rem; }
body.app-shell .stat-icon { top: 0.6rem; right: 0.7rem; font-size: 0.85rem; }
body.app-shell .kpi {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0.75rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
body.app-shell .kpi-cell { padding: 0.45rem 0.75rem 0.5rem; min-width: 0; }
body.app-shell .kpi-cell + .kpi-cell { border-left: 1px solid var(--line); }
body.app-shell .kpi-label {
    margin: 0;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
body.app-shell .kpi-value { margin: 0.1rem 0 0; font-size: 13px; font-weight: 650; }
body.app-shell .fact { padding: 0.45rem 0.6rem; }
body.app-shell .fact dt { font-size: 10.5px; }
body.app-shell .fact dd { margin-top: 0.12rem; font-size: 12.5px; }
body.app-shell .meter { padding: 0.45rem 0.6rem; }
body.app-shell .meter-label { margin-bottom: 0.3rem; font-size: 10.5px; }
body.app-shell .meter-track { height: 0.28rem; }
body.app-shell .summary-band { padding: 0.55rem 0.7rem; }
body.app-shell .summary-kicker { font-size: 10.5px; }
body.app-shell .summary-stat { font-size: 12.5px; }
body.app-shell .icon-btn { width: 1.7rem; height: 1.7rem; border-radius: 6px; }
body.app-shell .row-menu { position: relative; display: inline-block; text-align: left; }
body.app-shell .row-menu > summary {
    display: inline-grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
    color: var(--muted);
    list-style: none;
    cursor: pointer;
}
body.app-shell .row-menu > summary::-webkit-details-marker { display: none; }
body.app-shell .row-menu-panel {
    position: absolute;
    z-index: 6;
    right: 0;
    top: calc(100% + 4px);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 11rem;
    padding: 0.3rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 32, 0.12);
}
body.app-shell .row-menu-panel .btn { justify-content: flex-start; width: 100%; text-align: left; background: transparent; border-color: transparent; }
body.app-shell .row-menu-panel .btn:hover { background: var(--hover); }
body.app-shell .inspector {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
    gap: 0.75rem;
    align-items: start;
}
body.app-shell .inspector-side .card:last-child { margin-bottom: 0; }
body.app-shell .prop-list { display: grid; gap: 0; margin: 0; }
body.app-shell .prop {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.32rem 0;
    border-top: 1px solid var(--line);
}
body.app-shell .prop:first-child { border-top: 0; padding-top: 0; }
body.app-shell .prop dt { margin: 0; color: var(--muted); font-size: 11.5px; font-weight: 600; }
body.app-shell .prop dd { margin: 0; font-size: 12.5px; word-break: break-word; }
body.app-shell .log-card .service-log { border-radius: 0 0 8px 8px; background: #14171b; color: #d7dbdf; }
body.app-shell .lifecycle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin-top: 0.25rem;
}
body.app-shell .lifecycle form { margin: 0; }
body.app-shell .setting-list { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.75rem; }
body.app-shell .setting-row {
    display: grid;
    grid-template-columns: minmax(12rem, 0.85fr) minmax(0, 1.4fr);
    gap: 0.75rem 1.25rem;
    align-items: center;
    padding: 0.7rem 0.9rem;
}
body.app-shell .setting-row + .setting-row { border-top: 1px solid var(--line); }
body.app-shell .setting-row h3 { margin: 0; font-size: 13px; }
body.app-shell .setting-row p { margin: 0.15rem 0 0; }
body.app-shell .setting-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
body.app-shell .setting-controls .form-control,
body.app-shell .setting-controls .form-select { width: min(100%, 16rem); max-width: 16rem; }
body.app-shell .setup-methods .accordion-button { padding: 0.6rem 0.8rem; }
body.app-shell .setup-methods .setup-method-title { font-size: 13px; }
body.app-shell .setup-methods .setup-method-summary { font-size: 12px; }
body.app-login .login-card { width: min(400px, 100%); border-radius: 12px; padding: 1.15rem 1.15rem 1rem; }
body.app-login .login-brand { margin-bottom: 0.55rem; font-size: 1.05rem; }
body.app-login .login-brand img { width: 1.5rem; height: 1.5rem; }
body.app-login .login-box-msg { font-size: 13px; margin-bottom: 0.85rem; }
body.app-login .form-label { font-size: 12.5px; margin-bottom: 0.25rem; }
body.app-login .btn { height: 32px; padding: 0.3rem 0.7rem; border-radius: 6px; font-size: 13px; font-weight: 650; }
body.app-login .login-code { height: 40px; font-size: 1.15rem; letter-spacing: 0.16em; }
body.app-login a { color: var(--ink); font-weight: 600; }
body.app-login .auth-divider { display: flex; align-items: center; gap: 0.6rem; margin: 0.85rem 0 0.7rem; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
body.app-login .auth-divider::before, body.app-login .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
html[data-theme="dark"] body.app-shell .topbar,
html[data-theme="dark"] body.app-shell .kpi,
html[data-theme="dark"] body.app-shell .row-menu-panel,
html[data-theme="dark"] body.app-shell .setting-list { background: var(--card); }
html[data-theme="dark"] body.app-shell .log-card .service-log { background: #0c0e11; color: #d7dbdf; }
@media (max-width: 992px) {
    body.app-shell .kpi, body.app-shell .inspector, body.app-shell .setting-row { grid-template-columns: 1fr 1fr; }
    body.app-shell .kpi-cell:nth-child(n + 3) { border-top: 1px solid var(--line); }
    body.app-shell .kpi-cell:nth-child(odd) { border-left: 0; }
}
@media (max-width: 800px) {
    body.app-shell .topbar-meta { display: none; }
    body.app-shell .kpi, body.app-shell .inspector, body.app-shell .setting-row { grid-template-columns: 1fr; }
    body.app-shell .kpi-cell + .kpi-cell { border-left: 0; border-top: 1px solid var(--line); }
}
