@charset "UTF-8";

:root {
  --ink: #172b36;
  --muted: #667085;
  --green: #087f72;
  --green-dark: #06685e;
  --pale: #eaf6f3;
  --line: #dfe5eb;
  --paper: #fff;
  --bg: #f4f6f8;
  --red: #b42318;
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
button, input { outline: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #087f72; outline-offset: 3px; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #087f7220; }
input { min-width: 0; background: #fff; border: 1px solid #cbd5df; border-radius: 7px; padding: 11px 13px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #667085; }
svg { display: block; width: 18px; height: 18px; flex-shrink: 0; }
button svg { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.eyebrow { display: block; color: #667085; font-size: 12px; letter-spacing: 1.5px; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 6px; padding: 8px 13px; font-weight: 600; font-size: 13px; white-space: nowrap; line-height: 1.5; min-height: 36px; }
.button.primary { color: #fff; background: var(--green); }
.button.primary:hover:not(:disabled) { background: var(--green-dark); }
.button.secondary { background: #fff; border-color: #cbd5df; color: #344054; }
.button.secondary:hover:not(:disabled) { background: #f0f7f5; border-color: #8eaaa5; }
.button.danger { background: #b42318; color: #fff; }
.button.danger:hover:not(:disabled) { background: #912018; }
.icon-button { border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 7px; border-radius: 6px; color: #667085; width: 34px; height: 34px; }
.icon-button:hover { background: #eaf6f3; color: var(--green); }

/* Brand bar */
.brand { display: flex; gap: 11px; align-items: center; font-size: 21px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }
.brand b { font-size: 20px; letter-spacing: 0; margin-left: 3px; }
.brand-mark { position: relative; display: grid; place-items: center; background: var(--green); color: #fff; width: 37px; height: 37px; border-radius: 10px; font-size: 25px; font-weight: 800; font-family: Arial, sans-serif; font-style: italic; letter-spacing: -2px; padding-right: 3px; flex-shrink: 0; }
.brand-mark > span { position: absolute; right: 7px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: #c7efca; }
.app-screen { display: block; min-height: 100vh; }
.sidebar { width: 100%; min-height: 72px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 36px; display: flex; flex-direction: row; align-items: center; gap: 42px; position: relative; z-index: 10; }
.sidebar .brand { margin: 0; padding: 0; }
.nav-caption, .sidebar-note, .topbar { display: none; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 6px; font-size: 14px; font-weight: 600; }
.nav-item.active { color: #06685e; background: #eaf6f3; }
.nav-count { margin-left: 5px; border-radius: 4px; background: #d0eae4; font-size: 12px; padding: 1px 6px; min-width: 24px; text-align: center; }
.sidebar-bottom { margin-left: auto; flex-shrink: 0; }
.account { display: flex; align-items: center; gap: 10px; padding: 0; }
.avatar { display: grid; place-items: center; background: #edf2f6; border: 1px solid #dfe5eb; color: #475467; font-size: 13px; border-radius: 50%; width: 34px; height: 34px; flex-shrink: 0; }
.account > div { min-width: 0; }
.account strong { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.account small { font-size: 12px; color: #667085; display: block; }
.account .icon-button { margin-left: 5px; }
.account svg { width: 18px; height: 18px; }
.main-area { margin: 0; min-width: 0; }

/* Page overview */
.page-content { max-width: 1500px; margin: auto; padding: 28px 36px 22px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading .eyebrow { font-size: 11px; margin-bottom: 5px; color: #667085; }
.page-heading h1 { font-size: 27px; font-weight: 700; letter-spacing: -.5px; display: flex; gap: 10px; align-items: center; line-height: 1.4; }
.heading-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; margin-top: 5px; }
.page-heading p { font-size: 13px; color: #667085; margin-top: 6px; }
.page-heading .button { min-height: 38px; padding: 8px 13px; }
.page-heading svg { width: 16px; height: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 16px 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-label { font-size: 13px; color: #475467; }
.stat-value { display: flex; align-items: baseline; gap: 7px; margin: 3px 0 1px; }
.stat-value strong { font-size: 29px; letter-spacing: -.6px; font-weight: 650; line-height: 1.2; }
.stat-value small { font-size: 12px; color: #667085; }
.stat-description { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #667085; }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid; border-radius: 9px; }
.stat-icon svg { width: 19px; height: 19px; }
.stat-icon.neutral { color: #475467; background: #f2f5f8; border-color: #e2e8ef; }
.stat-icon.green { color: #087f72; background: #eaf6f3; border-color: #d4eae4; }
.stat-icon.amber { color: #946200; background: #fff7e6; border-color: #f4e7c8; }
.status-dot, .tiny-dot, .auto-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--green); }
.status-dot.green { background: var(--green); }

/* List controls */
.device-section { background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.section-heading { padding: 18px 21px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-title { display: flex; align-items: center; gap: 9px; }
.section-title h2 { font-size: 17px; font-weight: 650; }
.count-pill { font-size: 12px; color: #475467; border: 1px solid #dfe5eb; background: #f2f5f8; line-height: 21px; padding: 0 7px; border-radius: 5px; min-width: 25px; text-align: center; }
.updated-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #667085; }
.auto-dot { width: 5px; height: 5px; }
.list-toolbar { padding: 0 21px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.filter-tabs { display: flex; align-items: center; gap: 3px; background: #f2f4f7; border: 1px solid #e4e7ec; padding: 3px; border-radius: 7px; }
.filter-tab { border: 1px solid transparent; background: none; color: #475467; border-radius: 5px; padding: 6px 12px; white-space: nowrap; font-size: 13px; line-height: 1.5; }
.filter-tab.active { color: #06685e; background: #fff; border-color: #d0d8df; box-shadow: 0 1px 2px #172b3610; font-weight: 600; }
.filter-tab:hover:not(.active) { background: #e7edea; }
.list-tools { display: flex; gap: 10px; align-items: center; }
.search-field { display: flex; align-items: center; gap: 8px; border: 1px solid #cbd5df; border-radius: 6px; padding-left: 11px; height: 39px; color: #667085; background: #fff; }
.search-field svg { width: 16px; height: 16px; }
.search-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px #087f7218; }
.search-field input { width: 220px; border: 0; box-shadow: none !important; padding: 8px 9px 8px 0; background: none; font-size: 13px; }
.search-field input::placeholder { color: #667085; }
.view-toggle { display: flex; align-items: center; border: 1px solid #cbd5df; padding: 3px; border-radius: 6px; height: 39px; gap: 3px; }
.view-toggle button { border: none; border-radius: 4px; background: none; display: grid; place-items: center; width: 31px; height: 29px; padding: 6px; color: #667085; line-height: 1; }
.view-toggle svg { width: 17px; height: 17px; }
.view-toggle button.active { color: #06685e; background: #e0f1eb; }
.view-toggle button:hover { background: #edf3f0; }

/* Device cards */
.device-grid { padding: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; background: #fafbfc; min-height: 210px; }
.device-card { background: #fff; border: 1px solid #dce3e9; border-radius: 8px; overflow: hidden; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.device-card:hover { border-color: #9ebdb5; box-shadow: 0 3px 12px #172b3608; }
.device-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 16px 16px; }
.device-icon { width: 36px; height: 36px; background: #edf5f2; color: #087f72; border: 1px solid #d8e8e2; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.device-icon svg { width: 19px; height: 19px; }
.device-identity { min-width: 0; flex: 1; }
.device-name-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.device-name-line h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-weight: 650; color: #172b36; }
.edit-remark { width: 24px; height: 24px; padding: 4px; border-radius: 4px; color: #667085; }
.edit-remark svg { width: 13px; height: 13px; }
.device-id { font-size: 12px; color: #667085; margin-top: 3px; font-family: Consolas, monospace; letter-spacing: .1px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 7px; border-radius: 5px; line-height: 1.4; white-space: nowrap; margin-top: 1px; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-pill.online { background: #eaf6ee; color: #217045; border: 1px solid #d4e9dc; }
.status-pill.tunnel { background: #fff6e3; color: #8f6100; border: 1px solid #f1e1ba; }
.status-pill.stopped { background: #f2f4f7; color: #667085; border: 1px solid #e1e5eb; }
.device-details { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.detail-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.detail-label { color: #667085; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.detail-label svg { width: 14px; height: 14px; }
.detail-value { color: #344054; max-width: 65%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-value { font-variant-numeric: tabular-nums; color: #475467; }
.node-value strong { font-weight: 600; color: #217045; }
.node-value .dead-nodes { color: #b54708; }
.node-bar { height: 3px; border-radius: 2px; background: #e9edf1; margin-top: -4px; overflow: hidden; }
.node-bar span { display: block; height: 100%; background: #26866f; border-radius: 2px; transition: width .2s; }
.device-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 13px 14px; border-top: 1px solid #e5e9ef; background: #fafbfc; }
.device-actions .button { font-size: 13px; min-height: 35px; padding: 6px 8px; gap: 5px; border-radius: 5px; }
.device-actions .button svg { width: 14px; height: 14px; }
.device-tools { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 0 15px 13px; background: #fafbfc; }
.checked-at { font-size: 12px; color: #667085; display: flex; align-items: center; gap: 5px; min-width: 0; }
.checked-at svg { width: 12px; height: 12px; }
.channel-action { display: inline-flex; gap: 5px; border: 0; background: none; color: #08756a; font-size: 12px; padding: 4px 0; align-items: center; white-space: nowrap; }
.channel-action svg { width: 13px; height: 13px; }
.channel-action:hover:not(:disabled) { color: #055d54; text-decoration: underline; }
.channel-action.stop { color: #667085; }
.channel-action.stop:hover:not(:disabled) { color: #b42318; }
.device-card.is-busy { opacity: .72; }

/* Table: primary desktop view */
.device-table-wrap { padding: 0; display: block; overflow: auto; background: #fff; }
.device-table { border-collapse: collapse; width: 100%; min-width: 1060px; text-align: left; font-size: 14px; }
.device-table th { background: #f5f7fa; font-size: 12px; font-weight: 600; white-space: nowrap; color: #475467; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.device-table td { padding: 10px 18px; border-bottom: 1px solid #e9edf1; color: #344054; vertical-align: middle; }
.device-table tr:last-child td { border-bottom: 0; }
.device-table tbody tr:hover { background: #f6faf9; }
.device-table .table-identity { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.device-table .device-icon { width: 33px; height: 33px; border-radius: 7px; }
.device-table .device-icon svg { width: 18px; height: 18px; }
.device-table .device-name-line h3 { font-size: 15px; max-width: 220px; }
.device-table .device-id { font-size: 12px; }
.device-table .table-actions { display: flex; gap: 7px; }
.device-table .button { padding: 6px 10px; font-size: 13px; min-height: 34px; gap: 5px; border-radius: 5px; }
.device-table .button svg { height: 14px; width: 14px; }
.device-table .table-channel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.device-table .checked-at { margin-top: 5px; }
.device-table .channel-action { font-size: 12px; }

.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 21px; color: #667085; font-size: 12px; border-top: 1px solid var(--line); }
.list-footer > span:last-child { display: flex; align-items: center; gap: 6px; }
.tiny-dot { width: 5px; height: 5px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; color: #667085; font-size: 12px; padding: 20px 1px 2px; }
.error-banner { background: #fff3ed; color: #9c3b10; font-size: 13px; border-bottom: 1px solid #f1d8c9; padding: 12px 21px; }
.loading-state, .empty-state { grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 47px 20px; color: #667085; min-height: 195px; }
.empty-state svg { height: 30px; width: 30px; color: #667085; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: #344054; }
.empty-state p { font-size: 13px; }
.spinner { display: inline-block; width: 21px; height: 21px; border: 2px solid #d3e8e1; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Authentication */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 46% 54%; background: #fff; }
.auth-story { background: #124b42; position: relative; overflow: hidden; padding: 48px 56px; color: #fff; min-height: 100vh; display: flex; flex-direction: column; }
.brand.light { color: #fff; }
.brand.light .brand-mark { background: #ffffff14; border: 1px solid #ffffff40; }
.auth-story-copy { margin: auto 0; z-index: 1; padding: 55px 0 70px; }
.auth-story-copy .eyebrow { color: #b6d5c6; font-size: 12px; margin-bottom: 24px; letter-spacing: 2px; }
.auth-story-copy h1 { font-size: clamp(25px, 3vw, 42px); line-height: 1.5; letter-spacing: 1px; font-weight: 600; }
.auth-story-copy p { color: #c2ddcf; font-size: 14px; line-height: 2.1; margin-top: 22px; }
.auth-footnote { font-size: 12px; color: #b6d5c6; z-index: 1; }
.auth-network { position: absolute; width: 390px; height: 390px; border: 1px solid #ffffff14; border-radius: 50%; bottom: -50px; right: -125px; transform: rotate(-15deg); }
.auth-network:before, .auth-network:after { content: ""; position: absolute; inset: 48px; border: 1px solid #ffffff18; border-radius: 50%; }
.auth-network:after { inset: 100px; }
.network-hub { position: absolute; left: 164px; top: 166px; border: 1px solid #ffffff30; background: #ffffff06; border-radius: 14px; transform: rotate(15deg); width: 62px; height: 62px; display: grid; place-items: center; font: 600 13px Consolas, monospace; letter-spacing: 2px; color: #ffffff80; }
.auth-network i { position: absolute; width: 8px; height: 8px; border-radius: 50%; border: 1px solid #ffffff40; background: #b5d3b530; top: 43px; left: 70px; }
.auth-network i:nth-of-type(2) { top: 125px; left: 329px; }
.auth-network i:nth-of-type(3) { top: 280px; left: 85px; }
.auth-network i:nth-of-type(4) { top: 90px; left: 170px; }
.auth-network i:nth-of-type(5) { top: 224px; left: 320px; }
.auth-main { display: grid; place-items: center; padding: 45px; }
.login-form { width: min(100%, 360px); margin-top: -12px; }
.login-form > .eyebrow { color: #667085; letter-spacing: 1px; font-size: 12px; }
.login-form h2 { font-size: 28px; letter-spacing: .5px; margin-top: 10px; font-weight: 650; }
.login-form > p { color: #667085; font-size: 14px; margin: 11px 0 30px; }
.login-form label, .dialog label { display: block; font-size: 14px; color: #344054; font-weight: 500; margin-bottom: 8px; }
.login-form > input { width: 100%; height: 46px; font-size: 14px; margin-bottom: 22px; background: #fff; }
.password-field { position: relative; margin-bottom: 27px; }
.password-field input { width: 100%; padding-right: 42px; height: 46px; font-size: 14px; background: #fff; }
.password-field .icon-button { position: absolute; right: 6px; top: 6px; }
.password-field svg { width: 17px; height: 17px; color: #667085; }
.login-submit { width: 100%; height: 46px; border-radius: 7px; font-size: 14px; justify-content: space-between; padding: 10px 15px; }
.login-form .login-security { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #667085; margin: 20px 0 0; }
.login-security svg { width: 13px; height: 13px; }
.form-error { color: #b42318; background: #fef3f2; border: 1px solid #f1cfcc; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; overflow-wrap: anywhere; }
.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.boot-screen > .brand-mark { margin-bottom: 10px; width: 48px; height: 48px; font-size: 30px; }
.boot-screen p { color: #667085; font-size: 14px; }

/* Dialogs and notifications */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 1000; background: #173e36; color: #fff; font-size: 14px; padding: 12px 18px; border-radius: 8px; box-shadow: 0 6px 25px #172b3625; max-width: 90vw; overflow-wrap: anywhere; }
.toast.error { background: #a12820; }
.dialog { border: 1px solid #d5dde5; border-radius: 11px; padding: 25px; width: min(450px, calc(100vw - 30px)); background: #fff; color: var(--ink); box-shadow: 0 20px 80px #142d2325; }
.dialog::backdrop { background: #12232d70; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.dialog-heading .eyebrow { font-size: 12px; margin-bottom: 7px; letter-spacing: 1px; }
.dialog h2 { font-size: 19px; font-weight: 650; }
.dialog-subtitle { font: 12px Consolas, monospace; color: #667085; margin: -5px 0 21px; }
.dialog input { width: 100%; font-size: 14px; }
.field-help { font-size: 12px; line-height: 1.8; color: #667085; margin-top: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.dialog-actions .button { font-size: 14px; }
.dialog-description { font-size: 14px; color: #475467; line-height: 1.9; overflow-wrap: anywhere; }
.dialog .form-error { margin: 16px 0 0; }

/* SSH terminal */
.terminal-dialog { width: min(1020px, calc(100vw - 30px)); padding: 0; background: #10231d; border-color: #2f4c3d; border-radius: 10px; color: #d8e9da; }
.terminal-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid #365245; background: #192f25; gap: 12px; }
.terminal-heading > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.terminal-heading h2 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.terminal-led { width: 6px; height: 6px; background: #a2c687; border-radius: 50%; flex-shrink: 0; }
.terminal-heading > div > span:last-child { font-size: 12px; color: #b6cdb3; margin-left: 4px; white-space: nowrap; }
.terminal-heading .icon-button { color: #b6cdb3; height: 28px; width: 28px; padding: 5px; }
.terminal-heading .icon-button:hover { background: #2c4735; }
.terminal-heading svg { width: 17px; height: 17px; }
#terminal-container { padding: 14px 12px 8px; height: min(62vh, 560px); min-height: 220px; }
.terminal-footer { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 10px 15px; color: #b6cdb3; border-top: 1px solid #365245; }
.terminal-fallback { height: 100%; width: 100%; overflow: auto; white-space: pre-wrap; color: #d8e8ce; font: 13px/1.6 Consolas, monospace; outline: none; margin: 0; }
.terminal-plain-input { position: fixed; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; z-index: -1; }
.xterm { height: 100%; }
.xterm-viewport { border-radius: 3px; }

@media (max-width: 1200px) {
  .sidebar { padding: 0 26px; gap: 30px; }
  .page-content { padding: 26px; }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field input { width: 190px; }
  .auth-story { padding: 38px; }
  .auth-story-copy h1 { font-size: 30px; }
}

@media (max-width: 900px) {
  .list-toolbar { flex-wrap: wrap; }
  .list-tools { flex: 1; justify-content: flex-end; }
  .auth-story { padding: 32px; }
  .auth-main { padding: 32px; }
  .auth-story-copy h1 { font-size: 26px; }
}

@media (max-width: 700px) {
  .sidebar { min-height: 64px; gap: 12px; padding: 0 18px; }
  .sidebar .brand { font-size: 18px; gap: 8px; }
  .sidebar .brand b { font-size: 17px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 8px; font-size: 23px; }
  .sidebar .nav-item { display: none; }
  .account { gap: 6px; }
  .account > .avatar, .account > div { display: none; }
  .account .icon-button { width: 34px; height: 34px; margin: 0; }
  .page-content { padding: 22px 16px 16px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; gap: 10px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading .eyebrow { font-size: 11px; letter-spacing: 1px; margin-bottom: 5px; }
  .page-heading p { font-size: 12px; max-width: 220px; }
  .page-heading .button { min-height: 35px; font-size: 12px; padding: 7px 9px; gap: 5px; margin-top: 21px; }
  .page-heading .button svg { width: 14px; height: 14px; }
  .stats-grid { gap: 9px; margin-bottom: 18px; }
  .stat-card { padding: 13px 11px; border-radius: 7px; }
  .stat-label { font-size: 12px; }
  .stat-value { margin: 6px 0 0; gap: 4px; }
  .stat-value strong { font-size: 26px; }
  .stat-value small { font-size: 12px; }
  .stat-description, .stat-icon { display: none; }
  .section-heading { padding: 16px 14px 13px; gap: 8px; }
  .section-title h2 { font-size: 16px; }
  .updated-label { font-size: 12px; gap: 5px; }
  .list-toolbar { padding: 0 14px 14px; gap: 12px; display: flex; flex-direction: column; align-items: stretch; }
  .filter-tabs { align-self: flex-start; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto; }
  .filter-tab { font-size: 12px; padding: 6px 10px; }
  .list-tools { justify-content: space-between; gap: 10px; }
  .search-field { flex: 1; height: 38px; min-width: 0; }
  .search-field input { width: 100%; font-size: 13px; }
  .view-toggle { height: 38px; flex-shrink: 0; }
  .device-grid { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .device-head { padding: 17px 15px 15px; }
  .device-head > .status-pill { margin: 1px 0 0; }
  .device-name-line h3 { font-size: 15px; }
  .device-id { font-size: 12px; }
  .device-details { padding: 0 15px 15px; }
  .device-actions { padding: 12px; }
  .device-actions .button { font-size: 13px; min-height: 37px; padding: 6px; }
  .device-tools { padding: 0 14px 12px; }
  .device-table-wrap { padding: 0; }
  .device-table th, .device-table td { padding-left: 14px; padding-right: 14px; }
  .list-footer { padding: 12px 14px; font-size: 12px; gap: 10px; flex-wrap: wrap; }
  .page-footer { font-size: 12px; padding: 18px 1px 2px; }
  .page-footer > span:last-child { display: none; }
  .dialog { padding: 21px; }
  .auth-screen { display: block; }
  .auth-story { min-height: auto; padding: 22px 24px; }
  .auth-story .brand { font-size: 18px; }
  .auth-story-copy { padding: 32px 0 24px; margin: 0; }
  .auth-story-copy .eyebrow { font-size: 12px; margin-bottom: 12px; letter-spacing: 1px; }
  .auth-story-copy h1 { font-size: 25px; line-height: 1.6; letter-spacing: .5px; }
  .auth-story-copy h1 br, .auth-story-copy p br { display: none; }
  .auth-story-copy p { font-size: 13px; margin-top: 11px; line-height: 1.9; }
  .auth-footnote { display: none; }
  .auth-network { width: 300px; height: 300px; bottom: -90px; right: -130px; }
  .network-hub { display: none; }
  .auth-main { padding: 32px 26px 42px; }
  .login-form { margin: 0; max-width: 370px; }
  .login-form h2 { font-size: 25px; }
  .login-form > p { font-size: 14px; margin: 9px 0 25px; }
  .login-form > input { margin-bottom: 18px; }
  .password-field { margin-bottom: 24px; }
  .terminal-dialog { width: calc(100vw - 14px); padding: 0; }
  .terminal-heading { padding: 11px 10px; }
  .terminal-heading > div { gap: 6px; }
  .terminal-heading h2 { font-size: 13px; }
  .terminal-heading > div > span:last-child { font-size: 12px; }
  .terminal-footer { font-size: 12px; padding: 9px 10px; }
  .terminal-footer > span:last-child { display: none; }
  #terminal-container { padding: 10px 7px 7px; height: 58vh; }
  .toast { font-size: 13px; bottom: 18px; max-width: 94vw; }
}

@media (max-width: 390px) {
  .page-content { padding: 20px 12px 14px; }
  .page-heading h1 { font-size: 21px; }
  .page-heading .button { font-size: 12px; padding: 7px; }
  .stat-card { padding: 12px 9px; }
  .filter-tab { padding: 6px 8px; }
  .section-heading { padding-right: 12px; padding-left: 12px; }
  .list-toolbar { padding-right: 12px; padding-left: 12px; }
  .device-grid:not(.device-table-wrap) { padding: 12px; }
  .device-head { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .device-head > .device-icon { width: 31px; height: 31px; }
  .device-details { padding-left: 12px; padding-right: 12px; }
  .device-actions .button { font-size: 12px; }
  .status-pill { font-size: 12px; padding: 3px 5px; }
  .updated-label .auto-dot { display: none; }
}

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

/* Device connection details */
.server-info { display: flex; flex-direction: column; gap: 3px; color: #344054; line-height: 1.4; }
.server-info .server-address { display: block; color: #667085; font: 12px/1.4 Consolas, monospace; white-space: nowrap; }
.detail-node-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.device-table th:first-child { min-width: 280px; }
.device-table .table-identity { min-width: 250px; }
.device-table .device-name-line h3 { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }

.table-node-controls { justify-content: flex-start; }

@media (min-width: 701px) {
  .stat-card { padding: 10px 19px; }
  .stat-label { display: block; line-height: 1.45; }
  .stat-value { margin: 2px 0 0; }
  .stat-value strong { font-size: 27px; line-height: 1.15; }
}