:root {
    --rack-950: #0f151c;
    --rack-900: #151d26;
    --rack-800: #1d2834;
    --rack-700: #293746;
    --paper: #f3f1e9;
    --paper-cool: #e7edf1;
    --paper-blue: #d8e8f1;
    --paper-amber: #f2d27a;
    --ink: #17202a;
    --ink-muted: #5e6973;
    --line-dark: #354454;
    --line-paper: #c8d0d5;
    --signal-blue: #3f8db8;
    --signal-green: #238565;
    --signal-red: #c94d4a;
    --signal-amber: #bb7619;
    --focus: #7bc7ee;
    --sidebar-width: 254px;
    --topbar-height: 78px;
    --radius: 14px;
    --shadow: 0 12px 34px rgba(4, 10, 16, 0.24);
    font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--rack-950);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper-cool);
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input {
    outline: none;
}

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

.login-page {
    min-height: 100vh;
    background: var(--rack-950);
    color: #eef4f7;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(390px, 0.75fr);
}

.login-context {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(48px, 8vw, 118px);
    overflow: hidden;
}

.login-context::after {
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: var(--line-dark);
    content: "";
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: clamp(48px, 8vh, 88px);
}

.login-brand p {
    margin: 0;
    color: #dbe6ed;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.brand-mark {
    display: inline-grid;
    grid-template-columns: repeat(3, 6px);
    gap: 3px;
    align-items: end;
    width: 24px;
    height: 24px;
    padding: 4px 2px;
}

.brand-mark span {
    display: block;
    width: 6px;
    background: var(--signal-blue);
}

.brand-mark span:nth-child(1) {
    height: 9px;
}

.brand-mark span:nth-child(2) {
    height: 16px;
    background: #8fc5df;
}

.brand-mark span:nth-child(3) {
    height: 12px;
    background: var(--paper-amber);
}

.brand-mark-large {
    transform: scale(1.25);
    transform-origin: left center;
}

.login-context h1 {
    max-width: 760px;
    margin: 0;
    color: #f5f8fa;
    font-size: clamp(3rem, 6.4vw, 6rem);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 0.98;
    text-wrap: balance;
}

.login-lead {
    max-width: 700px;
    margin: 30px 0 52px;
    color: #b9c7d1;
    font-size: clamp(1rem, 1.6vw, 1.22rem);
    line-height: 1.75;
}

.dispatch-rack {
    display: grid;
    max-width: 820px;
    padding: 10px;
    gap: 7px;
    border-radius: var(--radius);
    background: #080d12;
    box-shadow: var(--shadow);
}

.dispatch-strip {
    display: grid;
    grid-template-columns: 54px minmax(160px, 0.7fr) minmax(170px, 1fr) 34px;
    align-items: center;
    min-height: 60px;
    padding: 9px 15px 9px 9px;
    gap: 14px;
    border-radius: 7px;
    color: var(--ink);
    background: var(--paper);
}

.dispatch-strip.strip-blue {
    background: var(--paper-blue);
}

.dispatch-strip.strip-amber {
    background: var(--paper-amber);
}

.dispatch-strip .strip-code {
    align-self: stretch;
    display: grid;
    place-items: center;
    border-right: 1px solid rgba(23, 32, 42, 0.25);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.dispatch-strip strong {
    font-size: 0.93rem;
}

.dispatch-strip > span:not(.strip-code) {
    color: #46525e;
    font-size: 0.82rem;
}

.dispatch-strip > i {
    font-size: 1.12rem;
    text-align: right;
}

.login-panel {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: clamp(28px, 5vw, 74px);
    background: var(--rack-900);
}

.password-change-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.7fr);
}

.password-change-context {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(42px, 8vw, 112px);
}

.password-change-context .brand-lockup {
    width: fit-content;
    margin-bottom: clamp(42px, 7vh, 76px);
    padding-left: 0;
}

.password-change-context h1 {
    max-width: 760px;
    margin: 0;
    color: #f5f8fa;
    font-size: clamp(2.7rem, 5.2vw, 5.2rem);
    font-weight: 730;
    letter-spacing: -0.035em;
    line-height: 1.03;
}

.password-change-context > p {
    max-width: 680px;
    margin: 27px 0 42px;
    color: #b9c7d1;
    line-height: 1.7;
}

.password-steps {
    display: grid;
    max-width: 760px;
    margin: 0;
    padding: 9px;
    gap: 6px;
    border-radius: var(--radius);
    background: #080d12;
    list-style: none;
}

.password-steps li {
    display: grid;
    grid-template-columns: 42px minmax(140px, 0.8fr) minmax(150px, 1fr);
    align-items: center;
    min-height: 54px;
    padding: 8px 14px 8px 8px;
    gap: 14px;
    border-radius: 7px;
    color: var(--ink);
    background: #dfe4e6;
}

.password-steps li.is-complete {
    background: var(--paper-blue);
}

.password-steps li.is-active {
    background: var(--paper-amber);
}

.password-steps li > span {
    align-self: stretch;
    display: grid;
    place-items: center;
    border-right: 1px solid rgba(23, 32, 42, 0.22);
    font-size: 0.76rem;
    font-weight: 800;
}

.password-steps li strong {
    font-size: 0.82rem;
}

.password-steps li small {
    color: #59656f;
    font-size: 0.7rem;
}

.login-panel-inner {
    width: min(100%, 410px);
}

.login-panel-heading {
    margin-bottom: 38px;
}

.login-panel-heading h2 {
    margin: 0 0 9px;
    color: #f6f8fa;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.login-panel-heading p,
.login-help {
    margin: 0;
    color: #a8b7c1;
    font-size: 0.9rem;
    line-height: 1.6;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 14px 15px;
    gap: 12px;
    border: 1px solid #6a7c8b;
    border-radius: 10px;
    color: #e9f0f4;
    background: #202c37;
    font-size: 0.86rem;
    line-height: 1.45;
}

.form-alert.is-error {
    border-color: #a95351;
    background: #392222;
}

.form-alert.is-success {
    border-color: #3b806b;
    background: #1c342d;
}

.form-alert strong {
    display: block;
}

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

.login-form {
    display: grid;
    gap: 22px;
}

.field-group label,
.role-fieldset legend {
    margin: 0;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.field-control {
    position: relative;
    display: flex;
    align-items: center;
}

.field-control > i {
    position: absolute;
    left: 15px;
    color: #9eacb6;
}

.field-control input,
.stacked-form input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #4b5b69;
    border-radius: 10px;
    color: #f4f7f9;
    background: #10171e;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.field-control input {
    padding-left: 44px;
}

.field-control input:focus,
.stacked-form input:focus {
    border-color: var(--focus);
    background: #0c1218;
}

.field-control input::placeholder,
.stacked-form input::placeholder {
    color: #82919c;
}

.password-toggle {
    position: absolute;
    right: 8px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    color: #bdc8cf;
    background: transparent;
}

.password-toggle:hover {
    color: #fff;
    background: #26333e;
}

.remember-control,
.account-switches label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c4ced5;
    font-size: 0.87rem;
    cursor: pointer;
}

.remember-control input,
.account-switches input,
.role-fieldset input {
    width: 17px;
    height: 17px;
    accent-color: var(--signal-blue);
}

.primary-action,
.secondary-action,
.icon-button {
    border: 0;
    transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}

.primary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 12px 16px 12px 18px;
    border-radius: 10px;
    color: #081118;
    background: var(--paper-amber);
    font-weight: 750;
}

.primary-action:hover {
    background: #ffe090;
    transform: translateY(-1px);
}

.primary-action.compact {
    display: inline-flex;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    gap: 9px;
    font-size: 0.88rem;
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    gap: 7px;
    border: 1px solid var(--line-paper);
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
    font-size: 0.82rem;
    font-weight: 650;
}

.secondary-action:hover {
    border-color: #81909a;
    background: var(--paper-cool);
}

.login-help {
    display: flex;
    align-items: flex-start;
    margin-top: 30px;
    gap: 9px;
}

.app-page {
    min-height: 100vh;
    background: var(--paper-cool);
}

.app-sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    padding: 24px 16px 18px;
    color: #dbe4ea;
    background: var(--rack-950);
}

.brand-lockup {
    display: flex;
    align-items: center;
    padding: 5px 8px 25px;
    gap: 12px;
    color: #eef4f7;
    text-decoration: none;
}

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

.brand-lockup strong {
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.brand-lockup small {
    margin-top: 2px;
    color: #8395a2;
    font-size: 0.72rem;
}

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

.primary-nav a {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    min-height: 44px;
    padding: 9px 11px;
    gap: 10px;
    border-radius: 9px;
    color: #adbbc4;
    text-decoration: none;
    font-size: 0.86rem;
}

.primary-nav a:hover {
    color: #f1f5f7;
    background: var(--rack-800);
}

.primary-nav a.active {
    color: var(--ink);
    background: var(--paper-blue);
    font-weight: 700;
}

.primary-nav a.is-pending {
    cursor: default;
}

.primary-nav a.is-pending small {
    color: #728490;
    font-size: 0.65rem;
}

.primary-nav a.is-pending:hover {
    color: #adbbc4;
    background: transparent;
}

.sidebar-status {
    display: grid;
    margin-top: auto;
    padding: 15px 10px 4px;
    gap: 11px;
    border-top: 1px solid var(--line-dark);
    color: #9fadb7;
    font-size: 0.73rem;
}

.sidebar-status > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.status-lamp {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #687986;
}

.status-lamp.is-live {
    background: #50c295;
}

.status-lamp.is-amber {
    background: var(--paper-amber);
}

.app-topbar {
    position: fixed;
    z-index: 20;
    inset: 0 0 auto var(--sidebar-width);
    display: flex;
    align-items: center;
    min-height: var(--topbar-height);
    padding: 12px clamp(22px, 4vw, 54px);
    gap: 14px;
    border-bottom: 1px solid #cbd4d9;
    background: rgba(231, 237, 241, 0.96);
}

.app-topbar h1 {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 760;
    letter-spacing: -0.015em;
}

.app-topbar p {
    margin: 2px 0 0;
    color: var(--ink-muted);
    font-size: 0.72rem;
}

.operator {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 10px;
}

.operator form {
    margin: 0;
}

.operator-avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: #fff;
    background: var(--rack-800);
    font-size: 0.77rem;
    font-weight: 800;
}

.operator-name {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 650;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    color: var(--ink-muted);
    background: transparent;
}

.icon-button:hover {
    color: var(--ink);
    background: #d7e0e5;
}

.sidebar-toggle {
    display: none;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-size: 1.35rem;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: calc(var(--topbar-height) + 30px) clamp(22px, 4vw, 54px) 54px;
}

.safety-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    margin-bottom: 18px;
    padding: 10px 14px;
    gap: 18px;
    border: 1px solid #9fb0bc;
    border-radius: 11px;
    color: #193247;
    background: var(--paper-blue);
}

.safety-banner.is-live-write {
    color: #4c2519;
    border-color: #d0a565;
    background: #f4ddad;
}

.safety-banner > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.safety-banner > div > i {
    font-size: 1.25rem;
}

.safety-banner strong,
.safety-banner small {
    display: block;
}

.safety-banner strong {
    font-size: 0.88rem;
}

.safety-banner small {
    margin-top: 2px;
    color: inherit;
    font-size: 0.73rem;
    opacity: 0.78;
}

.mode-chip,
.status-badge,
.role-token {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 720;
    white-space: nowrap;
}

.mode-chip {
    padding: 6px 10px;
    color: #284558;
    background: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
}

.status-band {
    display: grid;
    grid-template-columns: repeat(6, minmax(112px, 1fr));
    margin-bottom: 22px;
    overflow: hidden;
    border: 1px solid #bdc8cf;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 8px 24px rgba(26, 43, 56, 0.08);
}

.status-band article {
    min-height: 112px;
    padding: 17px 16px;
    border-right: 1px solid #cbd2d5;
}

.status-band article:last-child {
    border-right: 0;
}

.status-band article > span,
.status-band article > strong,
.status-band article > small {
    display: block;
}

.status-band article > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.status-band article > strong {
    margin: 7px 0 5px;
    font-size: clamp(1.6rem, 2.7vw, 2.25rem);
    font-weight: 780;
    letter-spacing: -0.03em;
    line-height: 1;
}

.status-band article > small {
    color: #75808a;
    font-size: 0.66rem;
    line-height: 1.35;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
    gap: 18px;
}

.workspace-panel {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 9px 28px rgba(26, 43, 56, 0.1);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 78px;
    padding: 18px 20px 15px;
    gap: 18px;
    border-bottom: 1px solid var(--line-paper);
}

.panel-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 760;
    letter-spacing: -0.01em;
}

.panel-heading p {
    margin: 4px 0 0;
    color: var(--ink-muted);
    font-size: 0.72rem;
}

.node-strips {
    display: grid;
    padding: 9px;
    gap: 6px;
    background: var(--rack-900);
}

.node-strip {
    display: grid;
    grid-template-columns: 9px minmax(110px, 0.8fr) minmax(170px, 1.1fr) 86px 82px;
    align-items: center;
    min-height: 62px;
    overflow: hidden;
    border-radius: 7px;
    color: var(--ink);
    background: var(--paper);
}

.node-strip.is-healthy {
    background: #e4eee9;
}

.node-strip.is-warning {
    background: #f3dfad;
}

.node-strip.is-down {
    color: #391b1b;
    background: #efd0ce;
}

.node-strip.is-unknown {
    background: #e5e8e9;
}

.node-strip-state {
    align-self: stretch;
    background: #85939d;
}

.node-strip.is-healthy .node-strip-state {
    background: var(--signal-green);
}

.node-strip.is-warning .node-strip-state {
    background: var(--signal-amber);
}

.node-strip.is-down .node-strip-state {
    background: var(--signal-red);
}

.node-strip > div {
    min-width: 0;
    padding: 10px 14px;
    border-right: 1px solid rgba(23, 32, 42, 0.16);
}

.node-strip > div:last-child {
    border-right: 0;
}

.node-strip strong,
.node-strip small {
    display: block;
}

.node-strip strong {
    overflow: hidden;
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-strip small {
    margin-top: 3px;
    overflow: hidden;
    color: #5e6973;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-strip .latency-value {
    font-size: 0.86rem;
    font-weight: 760;
}

.status-badge {
    padding: 5px 8px;
    color: #3c4852;
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.64rem;
}

.event-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.event-list li {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px 18px;
    gap: 11px;
    border-bottom: 1px solid var(--line-paper);
}

.event-list li:last-child {
    border-bottom: 0;
}

.event-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #365c72;
    background: var(--paper-blue);
}

.event-content strong,
.event-content small {
    display: block;
}

.event-content strong {
    font-size: 0.78rem;
}

.event-content p {
    margin: 3px 0 4px;
    color: var(--ink-muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

.event-content small {
    color: #7c8790;
    font-size: 0.64rem;
}

.latency-board,
.provider-board {
    min-height: 300px;
}

.chart-wrap {
    position: relative;
    min-height: 230px;
    padding: 18px;
}

.empty-copy,
.empty-row {
    color: var(--ink-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.empty-copy {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(80%, 320px);
    margin: 0;
    text-align: center;
    transform: translate(-50%, -50%);
}

.provider-list {
    display: grid;
}

.provider-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    padding: 14px 18px;
    gap: 10px;
    border-bottom: 1px solid var(--line-paper);
}

.provider-row:last-child {
    border-bottom: 0;
}

.provider-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: #365c72;
    background: var(--paper-blue);
}

.provider-row strong,
.provider-row small {
    display: block;
}

.provider-row strong {
    font-size: 0.78rem;
}

.provider-row small {
    margin-top: 3px;
    color: var(--ink-muted);
    font-size: 0.66rem;
}

.loading-row {
    display: flex;
    align-items: center;
    min-height: 74px;
    padding: 18px;
    gap: 10px;
    color: var(--ink-muted);
    background: var(--paper);
    font-size: 0.78rem;
}

.page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 0 2px;
    gap: 24px;
}

.page-intro h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.6vw, 2.25rem);
    font-weight: 760;
    letter-spacing: -0.03em;
}

.page-intro p {
    margin: 7px 0 0;
    color: var(--ink-muted);
    font-size: 0.84rem;
}

.user-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    align-items: start;
    gap: 18px;
}

.user-editor {
    position: sticky;
    top: calc(var(--topbar-height) + 24px);
}

.user-list {
    display: grid;
    padding: 8px;
    gap: 5px;
    background: var(--rack-900);
}

.user-row {
    display: grid;
    grid-template-columns: 9px minmax(130px, 0.9fr) minmax(150px, 1.25fr) minmax(150px, 1fr) 96px;
    align-items: stretch;
    min-height: 66px;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    color: var(--ink);
    background: var(--paper);
    text-align: left;
}

.user-row:hover {
    background: var(--paper-blue);
}

.user-row.is-selected {
    background: var(--paper-amber);
}

.user-row-state {
    background: var(--signal-green);
}

.user-row.is-locked .user-row-state {
    background: var(--signal-red);
}

.user-row.is-disabled .user-row-state {
    background: #7c8790;
}

.user-cell {
    min-width: 0;
    padding: 12px 13px;
    border-right: 1px solid rgba(23, 32, 42, 0.15);
}

.user-cell:last-child {
    border-right: 0;
}

.user-cell strong,
.user-cell small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-cell strong {
    font-size: 0.78rem;
}

.user-cell small {
    margin-top: 4px;
    color: var(--ink-muted);
    font-size: 0.66rem;
}

.role-tokens {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.role-token {
    padding: 4px 7px;
    color: #334d5d;
    background: rgba(255, 255, 255, 0.62);
    font-size: 0.58rem;
}

.stacked-form {
    display: grid;
    padding: 20px;
    gap: 18px;
}

.stacked-form input {
    min-height: 43px;
    border-color: #aebbc4;
    color: var(--ink);
    background: #fff;
}

.stacked-form input:focus {
    background: #fff;
}

.stacked-form .field-group > small {
    color: var(--ink-muted);
    font-size: 0.67rem;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.role-fieldset {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 6px;
    border: 0;
}

.role-fieldset legend {
    margin-bottom: 3px;
}

.role-fieldset label {
    display: grid;
    grid-template-columns: 18px minmax(100px, 0.8fr) minmax(120px, 1fr);
    align-items: center;
    min-height: 40px;
    padding: 8px 10px;
    gap: 9px;
    border-radius: 8px;
    background: #e5eaed;
    cursor: pointer;
}

.role-fieldset label:hover {
    background: var(--paper-blue);
}

.role-fieldset label span {
    font-size: 0.76rem;
    font-weight: 700;
}

.role-fieldset label small {
    color: var(--ink-muted);
    font-size: 0.64rem;
}

.account-switches {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 12px;
    border-radius: 9px;
    background: #e5eaed;
}

.account-switches label {
    color: var(--ink);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.password-reset-panel {
    display: grid;
    padding: 14px;
    gap: 14px;
    border: 1px solid #c7a556;
    border-radius: 10px;
    background: #f4e3b6;
}

.password-reset-panel[hidden] {
    display: none;
}

.editor-reset {
    background: #e2e8eb;
}

.app-toast {
    position: fixed;
    z-index: 80;
    right: 24px;
    bottom: 24px;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 16px;
    border-radius: 10px;
    color: #f5f8fa;
    background: var(--rack-800);
    box-shadow: var(--shadow);
    font-size: 0.82rem;
}

.app-toast.is-error {
    background: #692d2b;
}

.button-row,
.record-actions,
.switch-row,
.tab-row,
.inline-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.8fr);
    align-items: start;
    gap: 18px;
}

.management-editor {
    position: sticky;
    top: calc(var(--topbar-height) + 24px);
}

.record-list,
.endpoint-strips {
    display: grid;
    gap: 6px;
    padding: 8px;
    background: var(--rack-900);
}

.node-manifest {
    overflow: hidden;
    border: 1px solid #bec9cf;
    border-left: 3px solid var(--signal-blue);
    border-radius: 9px;
    background: var(--paper);
}

.node-manifest.is-selected {
    border-left-color: var(--signal-amber);
    background: #f4e3b6;
}

.manifest-header,
.management-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 12px 14px;
    gap: 12px;
}

.manifest-header strong,
.manifest-header small,
.record-main strong,
.record-main small {
    display: block;
}

.manifest-header small,
.record-main small {
    margin-top: 4px;
    color: var(--ink-muted);
    font-size: 0.67rem;
}

.endpoint-strips {
    padding-top: 0;
    background: rgba(15, 21, 28, 0.08);
}

.management-record {
    border: 0;
    border-left: 5px solid #85929b;
    border-radius: 7px;
    color: var(--ink);
    background: var(--paper);
    text-align: left;
}

button.management-record {
    width: 100%;
}

.management-record.is-healthy,
.management-record.is-success {
    border-left-color: var(--signal-green);
}

.management-record.is-warning {
    border-left-color: var(--signal-amber);
}

.management-record.is-down,
.management-record.is-failure {
    border-left-color: var(--signal-red);
}

.management-record.is-selected {
    background: var(--paper-amber);
}

.record-main {
    min-width: 0;
    flex: 1;
    font-size: 0.77rem;
}

.record-actions {
    justify-content: flex-end;
}

.record-actions button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.66rem;
}

.stacked-form h3,
.result-console h3 {
    margin: 0;
    font-size: 0.92rem;
}

.stacked-form select,
.stacked-form textarea,
.inline-form select,
.inline-form input {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid #aebbc4;
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
}

.stacked-form textarea {
    resize: vertical;
}

.switch-row {
    align-items: stretch;
}

.switch-row label,
.check-line {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    gap: 8px;
    border-radius: 8px;
    background: #e5eaed;
    font-size: 0.73rem;
    font-weight: 700;
}

.switch-row input,
.check-line input,
.role-fieldset input {
    width: 17px;
    min-height: 17px;
}

.panel-divider {
    margin: 0 20px;
    border: 0;
    border-top: 1px solid var(--line-paper);
}

.full-action {
    width: calc(100% - 40px);
    margin: 20px;
    justify-content: center;
}

.result-console {
    margin-top: 18px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    padding: 12px;
    gap: 8px;
    background: var(--rack-900);
}

.result-card {
    padding: 13px;
    border-left: 3px solid var(--signal-blue);
    border-radius: 8px;
    background: var(--paper);
}

.result-card.is-success {
    border-left-color: var(--signal-green);
}

.result-card.is-failure {
    border-left-color: var(--signal-red);
}

.result-card strong,
.result-card span,
.result-card small {
    display: block;
}

.result-card p {
    margin: 8px 0;
    font-size: 0.72rem;
}

.result-card small {
    color: var(--ink-muted);
    font-size: 0.64rem;
}

.tab-row {
    padding: 12px;
    border-bottom: 1px solid var(--line-paper);
}

.tab-row button {
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 7px;
    color: var(--ink-muted);
    background: #dde4e8;
    font-size: 0.7rem;
    font-weight: 800;
}

.tab-row button.is-active {
    color: #fff;
    background: var(--rack-700);
}

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

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

.settings-grid > :last-child {
    grid-column: 1 / -1;
}

.inline-form {
    align-items: end;
    padding: 18px;
}

.inline-form .field-group {
    min-width: 170px;
}

.inline-form .grow {
    flex: 1;
}

.issue-list {
    display: grid;
    padding: 0 14px;
    gap: 6px;
}

.issue {
    margin: 0;
    padding: 9px 11px;
    border-left: 3px solid var(--signal-amber);
    background: #f5e5b9;
    font-size: 0.7rem;
}

.issue.is-error {
    border-left-color: var(--signal-red);
    background: #f2d1cf;
}

.table-scroll {
    overflow: auto;
    max-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
}

.data-table th,
.data-table td {
    min-width: 140px;
    padding: 7px;
    border: 1px solid var(--line-paper);
    text-align: left;
}

.data-table th {
    background: #d6dfe4;
}

.data-table input {
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #afbbc2;
    background: #fff;
}

@media (max-width: 1120px) {
    .status-band {
        grid-template-columns: repeat(3, 1fr);
    }

    .status-band article:nth-child(3) {
        border-right: 0;
    }

    .status-band article:nth-child(-n + 3) {
        border-bottom: 1px solid #cbd2d5;
    }

    .workspace-grid,
    .user-workspace,
    .management-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .user-editor,
    .management-editor {
        position: static;
    }

    .settings-grid > :last-child {
        grid-column: auto;
    }

    .login-shell {
        grid-template-columns: 1fr 420px;
    }

    .login-context {
        padding: 54px;
    }
}

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

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

    .password-change-context {
        min-height: auto;
        padding: 42px 24px 36px;
    }

    .login-context {
        min-height: auto;
        padding: 42px 24px 36px;
    }

    .login-context::after {
        display: none;
    }

    .login-brand {
        margin-bottom: 38px;
    }

    .login-context h1 {
        font-size: clamp(2.7rem, 14vw, 4.2rem);
    }

    .login-lead {
        margin: 22px 0 34px;
    }

    .login-panel {
        min-height: auto;
        padding: 48px 24px 64px;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .app-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 16px 0 36px rgba(4, 10, 16, 0.28);
    }

    .app-topbar {
        left: 0;
        padding-inline: 18px;
    }

    .sidebar-toggle {
        display: block;
    }

    .app-main {
        margin-left: 0;
        padding-inline: 16px;
    }

    .workspace-grid {
        gap: 14px;
    }
}

@media (max-width: 620px) {
    .dispatch-strip {
        grid-template-columns: 42px 1fr 28px;
    }

    .dispatch-strip > span:not(.strip-code) {
        display: none;
    }

    .operator-name,
    .app-topbar p {
        display: none;
    }

    .safety-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-band {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-band article,
    .status-band article:nth-child(3) {
        border-right: 1px solid #cbd2d5;
        border-bottom: 1px solid #cbd2d5;
    }

    .status-band article:nth-child(even) {
        border-right: 0;
    }

    .status-band article:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .node-strip {
        grid-template-columns: 8px minmax(110px, 1.2fr) minmax(110px, 1fr) 72px;
    }

    .node-strip > div:nth-last-child(2) {
        display: none;
    }

    .user-row {
        grid-template-columns: 8px minmax(120px, 1fr) minmax(130px, 1fr) 86px;
    }

    .user-row .user-cell:nth-of-type(3) {
        display: none;
    }

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

    .role-fieldset label {
        grid-template-columns: 18px 1fr;
    }

    .role-fieldset label small {
        grid-column: 2;
    }

    .page-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .manifest-header,
    .management-record,
    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .record-actions {
        justify-content: flex-start;
    }

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

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