:root {
    --ink: #17202a;
    --ink-2: #273441;
    --nav: #17242c;
    --nav-soft: #22323c;
    --paper: #f4f1ea;
    --surface: #fbfaf6;
    --white: #fffefd;
    --line: #dcd8ce;
    --line-dark: #c8c3b8;
    --muted: #6f777c;
    --blue: #2c5df6;
    --blue-deep: #1945cc;
    --blue-soft: #e9eeff;
    --amber: #d98a14;
    --amber-soft: #fff3d8;
    --red: #c84d48;
    --red-soft: #fceae7;
    --green: #177d63;
    --green-soft: #e2f3eb;
    --shadow: 0 22px 60px rgba(23, 32, 42, .13);
    --radius: 14px;
    --sidebar: 248px;
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; background: var(--paper); }
body { margin: 0; min-height: 100vh; overflow-x: clip; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 24px 16px 18px; color: #eaf0f1; background: var(--nav); border-right: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; }
.brand-mark { width: 36px; height: 36px; display: flex; gap: 3px; align-items: end; padding: 7px; border: 1px solid rgba(255,255,255,.22); }
.brand-mark i { display: block; width: 5px; background: #f7f4ec; }
.brand-mark i:nth-child(1) { height: 10px; }
.brand-mark i:nth-child(2) { height: 20px; background: #7f9bff; }
.brand-mark i:nth-child(3) { height: 15px; }
.brand strong { font-size: 18px; letter-spacing: .08em; display: block; }
.brand small, .sidebar-footer small { display: block; color: #9caaaf; font-size: 11px; margin-top: 2px; letter-spacing: .04em; }
.environment { margin: 0 8px 20px; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); color: #cbd4d7; font-size: 11px; letter-spacing: .05em; }
.environment b { margin-left: auto; font-size: 9px; color: #8fa7ff; letter-spacing: .12em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #49d1a3; box-shadow: 0 0 0 4px rgba(73,209,163,.11); }
.sidebar-app-selector { display: block; margin: 0 8px 22px; color: #87979d; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.sidebar-app-control { height: 45px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 14px; align-items: center; gap: 7px; margin-top: 7px; padding: 0 9px; color: #edf2f3; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.13); }
.sidebar-app-control b { width: 28px; height: 28px; display: grid; place-items: center; color: #17242c; background: #d8deef; font-size: 8px; letter-spacing: 0; }
.sidebar-app-control select { min-width: 0; width: 100%; height: 100%; padding: 0; overflow: hidden; color: #edf2f3; background: transparent; border: 0; outline: 0; appearance: none; text-overflow: ellipsis; font-size: 11px; font-weight: 700; }
.sidebar-app-control .icon { color: #84949a; transform: rotate(90deg); }
.primary-nav p { padding: 0 12px; margin: 18px 0 8px; color: #718289; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nav-link { height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 12px; margin: 3px 0; color: #aab7bb; font-size: 13px; border: 1px solid transparent; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-link.is-active { color: #fff; background: var(--nav-soft); border-color: rgba(127,155,255,.22); box-shadow: inset 3px 0 #7993ff; }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; color: #fff; font-size: 10px; background: #c26442; border-radius: 10px; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer strong { display: block; font-size: 12px; }
.sidebar-footer .icon-button { margin-left: auto; color: #8c9ba0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #17242c; background: #d8deef; font-size: 11px; font-weight: 800; }

.workspace { min-width: 0; min-height: 100vh; margin-left: var(--sidebar); }
.topbar { height: 66px; display: flex; align-items: center; gap: 14px; padding: 0 34px; background: rgba(244,241,234,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 25; }
.top-search { width: min(420px, 45vw); display: flex; align-items: center; gap: 9px; padding: 0 11px; height: 36px; color: #778087; background: rgba(255,255,255,.58); border: 1px solid var(--line); }
.top-search input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 12px; }
.top-search kbd { padding: 2px 5px; color: #8b8f91; background: #eeeae1; border: 1px solid #d8d3c8; font-size: 10px; box-shadow: none; }
.top-search-submit { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; color: var(--blue); background: transparent; border: 0; cursor: pointer; }
.top-search-submit:hover, .top-search-submit:focus-visible { color: #fff; background: var(--blue); outline: 0; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.icon-button:hover { color: var(--ink); background: rgba(23,32,42,.055); }
.notice-button { margin-left: auto; position: relative; }
.notice-button span { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); border: 1px solid var(--paper); }
.date-stamp { color: #7f8588; font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; }
.mobile-menu { display: none; }

.main-content { width: min(1460px, 100%); min-width: 0; margin: 0 auto; padding: 40px 42px 70px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-heading h1 { margin: 6px 0 5px; font-size: clamp(28px, 3vw, 39px); line-height: 1.07; letter-spacing: -.045em; }
.page-heading p:not(.breadcrumb) { margin: 0; color: var(--muted); font-size: 13px; }
.breadcrumb { margin: 0; color: #7b8387; font-size: 10px; font-weight: 650; }
.breadcrumb span { padding: 0 5px; color: #a4a39f; }
.section-label { margin: 0; color: #667079; font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.section-label b { color: var(--blue); }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; cursor: pointer; font-size: 12px; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button-primary:hover { background: var(--blue-deep); }
.button-secondary { background: var(--surface); border-color: var(--line-dark); }
.button-secondary:hover { background: #fff; }
.button-danger { color: var(--red); background: var(--red-soft); border-color: #ecc6c1; }
.button-danger:hover { background: #f7dedb; }
.full-width { width: 100%; }
.flash { padding: 11px 13px; margin: -12px 0 18px; border: 1px solid currentColor; font-size: 11px; }
.flash-success { color: var(--green); background: var(--green-soft); }
.flash-error, .form-error { color: var(--red); background: var(--red-soft); }

.posture-band { min-height: 240px; display: grid; grid-template-columns: minmax(280px, .86fr) 1.45fr; gap: 40px; padding: 35px 38px; color: #f6f5ef; background: var(--ink-2); border-top: 3px solid var(--blue); box-shadow: 0 14px 32px rgba(23,32,42,.1); }
.posture-copy { align-self: center; max-width: 470px; }
.posture-copy .section-label { color: #9ca9b0; }
.posture-copy h2 { margin: 13px 0 13px; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -.04em; }
.posture-copy h2 em { color: #91a8ff; font-style: normal; }
.posture-copy p { margin: 0; color: #b8c1c6; font-size: 12px; line-height: 1.8; }
.posture-numbers { display: grid; grid-template-columns: repeat(2, 1fr); align-self: stretch; border: 1px solid rgba(255,255,255,.11); }
.posture-numbers > div { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; min-height: 84px; }
.posture-numbers > div:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.11); }
.posture-numbers > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.11); }
.posture-numbers span { color: #9faab0; font-size: 10px; }
.posture-numbers strong { margin: 4px 0; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.posture-numbers .word-value { font-size: 18px; }
.posture-numbers small { color: #7f8f96; font-size: 9px; }
.data-command { min-height: 58px; display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 9px; background: #e9e5dc; border: 1px solid var(--line); }
.data-command form { min-width: 260px; flex: 1; height: 38px; display: flex; align-items: center; gap: 9px; padding-left: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--line-dark); }
.data-command form:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44,93,246,.1); }
.data-command input[type="search"] { min-width: 0; flex: 1; height: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; }
.data-command form .button { flex: 0 0 auto; align-self: stretch; min-height: 36px; }

.dashboard-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 18px; margin-top: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); }
.panel-heading { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.025em; }
.panel-heading > a { display: flex; align-items: center; gap: 5px; color: var(--blue); font-size: 11px; font-weight: 700; }
.queue-item { min-height: 73px; display: flex; align-items: center; gap: 13px; padding: 13px 18px; border-bottom: 1px solid #e7e3da; transition: background .15s ease; }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #fff; }
.queue-index { width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); font: 700 10px/1 ui-monospace, monospace; }
.queue-main { min-width: 0; flex: 1; }
.queue-main strong, .queue-main small { display: block; }
.queue-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.queue-main small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.record-date { color: var(--muted); font: 600 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.queue-item > .icon { color: #979da0; }
.queue-empty { min-height: 145px; display: grid; place-items: center; padding: 22px; color: var(--muted); text-align: center; font-size: 10px; }
.status { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 0 8px; font-size: 9px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; border: 1px solid transparent; }
.status-review { color: #9b620d; background: var(--amber-soft); border-color: #f0d49a; }
.status-live { color: var(--green); background: var(--green-soft); border-color: #c7e3d7; }
.daily-summary-list a { min-height: 56px; display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid #e7e3da; transition: background .15s ease; }
.daily-summary-list a:last-child { border-bottom: 0; }
.daily-summary-list a:hover { background: #fff; }
.daily-summary-list strong, .daily-summary-list small { display: block; }
.daily-summary-list strong { font-size: 11px; }
.daily-summary-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.daily-summary-list b { color: var(--blue); font-size: 10px; }
.daily-summary-list .icon { color: #92999d; }
.toolbar { min-height: 58px; display: flex; align-items: center; gap: 10px; padding: 10px; background: #e9e5dc; border: 1px solid var(--line); border-bottom: 0; }
.field, .select-field { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--line-dark); }
.field { width: min(340px, 48%); }
.field input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }
.select-field select { border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.toolbar-count { margin-left: auto; padding-right: 8px; color: var(--muted); font-size: 10px; }
.table-panel { width: 100%; max-width: 100%; overflow-x: auto; contain: inline-size; background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th { height: 43px; padding: 0 15px; color: #737a7e; background: #f1eee7; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; letter-spacing: .06em; }
td { height: 73px; padding: 11px 15px; border-bottom: 1px solid #e7e3da; font-size: 11px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fff; }
.device-day-row td { height: 37px; padding: 0 15px; color: #586269; background: #e9e5dc; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line); }
.device-day-row:first-child td { border-top: 0; }
.device-day-row:hover td { background: #e9e5dc; }
.device-day-row strong { font-size: 10px; }
.device-day-row span { margin-left: 9px; color: var(--muted); font-size: 9px; }
.activity-time { font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
td code { color: #4f5d65; font: 600 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.device-cell { display: flex; align-items: center; gap: 11px; }
.device-glyph { width: 35px; height: 35px; display: grid; place-items: center; color: #465661; background: #ebe8e0; border: 1px solid #d8d4ca; }
.device-glyph.large { width: 48px; height: 48px; }
.device-cell strong, .device-cell small, .muted-id { display: block; }
.device-cell strong, .plain-strong { font-size: 11px; }
.device-cell small, .muted-id { margin-top: 4px; color: var(--muted); font-size: 9px; }
.row-action { margin-left: auto; }
.empty-state { display: none; padding: 42px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.is-empty + .empty-state, .is-empty ~ .empty-state { display: block; }

.app-management { min-width: 0; background: var(--surface); border: 1px solid var(--line); }
.app-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--ink-2); font-size: 9px; font-weight: 850; letter-spacing: .04em; }
.app-mark-large { width: 50px; height: 50px; font-size: 12px; }
.app-console { min-width: 0; }
.app-console-head { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.selected-app-title { min-width: 0; display: flex; align-items: center; gap: 14px; }
.selected-app-title > div { min-width: 0; }
.app-title-line { display: flex; align-items: center; gap: 10px; }
.app-title-line h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.selected-app-title > div > code { display: block; margin-top: 7px; color: var(--muted); font: 600 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.app-head-actions { display: flex; align-items: center; gap: 8px; }
.app-head-actions form { margin: 0; }
.integration-body { display: grid; gap: 18px; padding: 20px 24px 26px; }
.gateway-config, .identity-guide, .endpoint-ledger { background: #fff; border: 1px solid var(--line); }
.config-heading, .endpoint-ledger-head { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.config-heading h3, .endpoint-ledger-head h3 { margin: 0; font-size: 13px; }
.config-heading p, .endpoint-ledger-head p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.config-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; padding: 18px 16px; }
.config-fields label, .modal-fields label { display: block; color: var(--muted); font-size: 9px; }
.config-fields input, .modal-fields input, .modal-fields select { width: 100%; height: 36px; margin-top: 6px; padding: 0 9px; outline: 0; color: #47545b; background: #f5f2ec; border: 1px solid var(--line-dark); font: 500 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.config-fields input:focus, .modal-fields input:focus, .modal-fields select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44,93,246,.1); }
.input-with-action { display: grid; grid-template-columns: 1fr 34px; margin-top: 6px; }
.input-with-action input { margin-top: 0; border-right: 0; }
.input-with-action .icon-button { width: 34px; height: 36px; background: #eeeae2; border: 1px solid var(--line-dark); }
.config-footer { min-height: 53px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; background: #f3f0e9; border-top: 1px solid var(--line); }
.config-footer > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.identity-row { min-height: 58px; display: grid; grid-template-columns: 130px minmax(220px, 1fr) minmax(180px, .7fr); align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.identity-row:last-child { border-bottom: 0; }
.identity-row code { color: var(--blue); font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.identity-row span { color: var(--muted); font-size: 10px; }
.identity-row strong { text-align: right; font-size: 10px; }
.endpoint-ledger-head > span { color: var(--muted); font-size: 9px; }
.endpoint-columns, .managed-endpoint-row { display: grid; grid-template-columns: minmax(225px, 1.1fr) minmax(180px, 1fr) 34px; align-items: center; gap: 12px; padding: 0 14px; }
.endpoint-columns { min-height: 36px; color: var(--muted); background: #f3f0e9; border-bottom: 1px solid var(--line); font-size: 8px; letter-spacing: .05em; }
.managed-endpoint-row { min-height: 57px; border-bottom: 1px solid #e8e4dc; }
.managed-endpoint-row:last-child { border-bottom: 0; }
.managed-endpoint-row > span:first-child { min-width: 0; display: flex; align-items: center; gap: 9px; }
.managed-endpoint-row code { color: #4f5d65; font: 600 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.managed-endpoint-row > span:nth-child(2) { color: var(--muted); font-size: 9px; }
.method { width: 52px; min-height: 22px; display: grid; place-items: center; font: 800 8px ui-monospace, monospace; border: 1px solid currentColor; }
.method-get { color: var(--green); background: var(--green-soft); }
.method-post { color: var(--blue); background: var(--blue-soft); }
.method-put { color: #9b620d; background: var(--amber-soft); }
.method-delete { color: var(--red); background: var(--red-soft); }
.modal-fields { display: grid; gap: 13px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(17,24,30,.33); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.detail-drawer { position: fixed; inset: 0 0 0 auto; z-index: 80; width: min(430px, 92vw); padding: 26px; overflow-y: auto; visibility: hidden; background: var(--surface); box-shadow: var(--shadow); transform: translateX(104%); transition: transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s linear .24s; }
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.detail-drawer.is-open { visibility: visible; transform: translateX(0); transition-delay: 0s; }
.drawer-head { display: flex; align-items: start; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 8px 0 0; font-size: 24px; letter-spacing: -.04em; }
.drawer-state { display: flex; align-items: center; gap: 13px; padding: 22px 0; }
.drawer-state > div { flex: 1; }
.drawer-state strong { display: block; margin-bottom: 7px; font: 700 10px ui-monospace, monospace; }
.detail-list { margin: 0; border-top: 1px solid var(--line); }
.detail-list div { min-height: 54px; display: grid; grid-template-columns: 120px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 9px; }
.detail-list dd { margin: 0; text-align: right; font-size: 10px; font-weight: 700; }
.drawer-callout { padding: 14px; margin: 20px 0; background: var(--blue-soft); border: 1px solid #ced8ff; border-top-color: var(--blue); }
.drawer-callout strong { font-size: 10px; }
.drawer-callout p { margin: 5px 0 0; color: #53617b; font-size: 9px; line-height: 1.55; }
.detail-list-privacy { margin-top: 20px; }
.detail-list-privacy code { display: block; max-width: 230px; max-height: 110px; margin-left: auto; overflow: auto; color: #4f5d65; font: 600 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(17,24,30,.38); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(430px, 100%); padding: 27px; background: var(--surface); box-shadow: var(--shadow); position: relative; transform: translateY(12px); transition: transform .18s ease; }
.modal.is-open .modal-card { transform: none; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-card h2 { margin: 9px 0 7px; font-size: 22px; }
.modal-card > p { margin: 0 0 20px; color: var(--muted); font-size: 10px; }
.radio-row { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.radio-row input { accent-color: var(--blue); }
.radio-row strong, .radio-row small { display: block; }
.radio-row strong { font-size: 11px; }
.radio-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.modal-confirm, #exportCsvButton { margin-top: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; padding: 11px 15px; color: #fff; background: var(--ink); box-shadow: 0 8px 24px rgba(23,32,42,.2); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; font-size: 11px; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--paper); }
.login-shell { width: min(920px, 100%); min-height: 560px; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-brand { display: flex; flex-direction: column; justify-content: flex-end; padding: 46px; color: #fff; background: var(--ink-2); border-top: 3px solid var(--blue); }
.login-brand .brand-mark { margin-bottom: auto; }
.login-brand p { margin: 0 0 12px; color: #aebbc0; font-size: 11px; }
.login-brand h1 { max-width: 420px; margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.04; letter-spacing: -.04em; }
.login-card { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 54px; }
.login-card h2 { margin: 7px 0 8px; font-size: 25px; letter-spacing: -.035em; }
.login-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.login-card label { color: var(--muted); font-size: 10px; }
.login-card input { width: 100%; height: 42px; margin-top: 7px; padding: 0 11px; color: var(--ink); background: #f5f2ec; border: 1px solid var(--line-dark); outline: 0; }
.login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44,93,246,.1); }
.form-error { padding: 10px 12px; border: 1px solid #ecc6c1; font-size: 10px; }

@media (max-width: 1050px) {
    :root { --sidebar: 220px; }
    .main-content { padding: 32px 28px 60px; }
    .posture-band { grid-template-columns: 1fr; }
    .posture-copy { max-width: 680px; }
    .app-console-head { align-items: flex-start; }
    .app-head-actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 780px) {
    .login-page { padding: 16px; }
    .login-shell { min-height: 0; grid-template-columns: 1fr; }
    .login-brand { min-height: 230px; padding: 28px; }
    .login-card { padding: 32px 28px; }
    .sidebar { width: min(286px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
    .sidebar.is-open { transform: translateX(0); }
    .workspace { margin-left: 0; }
    .topbar { height: 60px; padding: 0 15px; }
    .mobile-menu { display: grid; }
    .top-search { width: auto; flex: 1; }
    .top-search kbd, .date-stamp { display: none; }
    .main-content { padding: 25px 16px 48px; }
    .page-heading { align-items: start; margin-bottom: 22px; }
    .page-heading h1 { font-size: 29px; }
    .page-heading > .button { padding: 0 11px; }
    .posture-band { padding: 26px 22px; gap: 26px; }
    .posture-numbers > div { padding: 17px; }
    .data-command { align-items: stretch; flex-wrap: wrap; }
    .data-command form { min-width: 100%; }
    .data-command > .button { flex: 1; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .toolbar { flex-wrap: wrap; }
    .field { width: 100%; }
    .toolbar-count { display: none; }
    table { min-width: 0; table-layout: fixed; }
    #devicesTable th:nth-child(2), #devicesTable td:nth-child(2),
    #devicesTable th:nth-child(3), #devicesTable td:nth-child(3),
    #devicesTable th:nth-child(4), #devicesTable td:nth-child(4) { display: none; }
    #devicesTable th:first-child { width: 85%; }
    #devicesTable th:last-child { width: 15%; }
    #devicesTable td { padding-inline: 9px; }
    #devicesTable .device-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-console-head { align-items: center; flex-wrap: wrap; }
    .app-head-actions { flex-wrap: wrap; }
    .config-fields { grid-template-columns: 1fr; }
    .endpoint-ledger { overflow-x: auto; }
    .endpoint-columns, .managed-endpoint-row { min-width: 520px; }
    .identity-row { grid-template-columns: 105px 1fr; }
    .identity-row strong { grid-column: 2; text-align: left; }
}

@media (max-width: 480px) {
    .notice-button { display: none; }
    .page-heading { display: block; }
    .page-heading > .button { margin-top: 16px; }
    .posture-numbers { grid-template-columns: 1fr 1fr; }
    .queue-item .record-date { display: none; }
    .app-console-head { align-items: flex-start; flex-direction: column; padding: 18px; }
    .app-head-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
    .app-head-actions form, .app-head-actions .button { width: 100%; }
    .integration-body { padding: 15px; }
    .config-footer { align-items: flex-start; flex-direction: column; }
    .config-footer .button { width: 100%; }
    .identity-row { grid-template-columns: 1fr; gap: 5px; padding-block: 13px; }
    .identity-row strong { grid-column: 1; text-align: left; }
    .endpoint-columns { display: none; }
    .managed-endpoint-row { min-width: 0; grid-template-columns: minmax(0, 1fr) 34px; gap: 8px 12px; padding-block: 12px; }
    .managed-endpoint-row > span:nth-child(2) { grid-column: 1 / -1; }
    .managed-endpoint-row > .icon-button { grid-column: 2; grid-row: 1; }
}

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