@charset "UTF-8";

:root {
  color-scheme: light;
  --page: #f5f6f0;
  --surface: #ffffff;
  --ink: #222d25;
  --muted: #677066;
  --line: #e0e5da;
  --green: #304f36;
  --green-dark: #223e2b;
  --lime: #d7ef8e;
  --soft-green: #edf3e3;
  --red: #963e34;
  --radius: 18px;
  font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.55; }
a { color: inherit; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, meter { max-width: 100%; }
img, svg { vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
a, button, input { touch-action: manipulation; }
:focus-visible { outline: 3px solid #56752d; outline-offset: 4px; }
main:focus { outline: none; }
::selection { background: var(--lime); color: var(--ink); }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 20; padding: 12px 20px; border-radius: 10px; background: var(--green); color: white; }
.skip-link:focus { top: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 21px; font-weight: 750; letter-spacing: -.6px; line-height: 1.15; }
.brand img { flex: 0 0 auto; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .35px; }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; line-height: 1.5; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #688641; }
.private-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; color: var(--green); white-space: nowrap; }
.private-badge .icon { width: 16px; height: 16px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-size: 13px; line-height: 1.45; font-weight: 650; transition: background-color .15s, border-color .15s, transform .15s; }
.button .icon { width: 18px; height: 18px; }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.button-secondary:hover { background: var(--soft-green); border-color: #bdc9b1; }
.button-full { width: 100%; }
.text-link { color: var(--green); font-size: 12px; font-weight: 600; text-underline-offset: 4px; }
.soon-badge { padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; color: #68715f; font-size: 9px; font-weight: 600; line-height: 1.4; white-space: nowrap; background: #f8f9f4; }

/* Workspace */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 33px 20px 18px; border-right: 1px solid var(--line); background: #fbfcf8; }
.sidebar .brand { margin: 0 9px 51px; font-size: 20px; }
.sidebar .brand img { width: 37px; height: 37px; }
.navigation-label { margin: 0 17px 13px; color: #92998b; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.main-navigation { display: flex; flex-direction: column; gap: 6px; }
.main-navigation > a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 45px; border-radius: 9px; font-size: 12px; font-weight: 550; text-decoration: none; color: #65705f; }
.main-navigation > a:hover { color: var(--green); background: #f0f3e9; }
.main-navigation > a[aria-current="page"] { color: #28442e; background: #e9efdc; font-weight: 650; }
.main-navigation .icon { width: 19px; height: 19px; }
.nav-soon { margin-left: auto; color: #7d8774; font-size: 8px; font-weight: 500; }
.main-navigation > a.nav-subitem { min-height: 36px; margin: -2px 0 4px 30px; padding: 7px 11px; font-size: 11px; }
.nav-subitem-marker { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #a6bd88; }
.main-navigation .account-navigation { margin-top: 24px; }
.sidebar-bottom { margin-top: auto; padding-top: 40px; }
.private-note { display: flex; align-items: center; gap: 11px; margin: 0 3px 22px; padding: 15px 12px; border: 1px solid var(--line); border-radius: 11px; font-size: 10px; font-weight: 650; color: #56684a; background: #f4f7ec; }
.private-note > .icon { width: 22px; height: 22px; }
.private-note small { display: block; margin-top: 3px; color: #7d8774; font-size: 9px; font-weight: 400; }
.owner-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 20px 5px 0; }
.avatar { display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 11px; color: #455736; background: #e7edda; font-weight: 650; font-size: 15px; }
.owner-name { min-width: 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 650; }
.owner-name small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 400; }
.owner-row form { margin-left: auto; }
.icon-button { width: 36px; height: 36px; display: inline-flex; justify-content: center; align-items: center; padding: 6px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.icon-button:hover { background: #e9efdc; color: var(--green); }
.icon-button .icon { width: 18px; height: 18px; }
.workspace-body { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; padding: 0 44px; border-bottom: 1px solid var(--line); background: #fbfcf8; }
.breadcrumb { color: var(--muted); font-size: 11px; }
.breadcrumb > span { padding: 0 12px; color: #b5bcae; }
.main-content { width: 100%; max-width: 1460px; margin: 0 auto; padding: 36px 44px 42px; flex: 1 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.page-heading .eyebrow { margin-bottom: 9px; }
.page-heading h1 { font-size: clamp(25px, 2.4vw, 37px); font-weight: 650; letter-spacing: -1.2px; }
.page-heading p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.date-label { flex: 0 0 auto; padding-bottom: 3px; color: #849078; font-size: 11px; }
.welcome-panel { min-height: 247px; display: grid; grid-template-columns: minmax(0, 1fr) 240px; position: relative; overflow: hidden; border: 1px solid #d8e5bd; border-radius: var(--radius); background: #e9f1d6; }
.welcome-copy { position: relative; z-index: 1; padding: 30px 35px; }
.panel-kicker { display: flex; align-items: center; gap: 7px; color: #62784b; font-size: 9px; font-weight: 650; letter-spacing: 1.3px; }
.panel-kicker .status-dot { width: 5px; height: 5px; }
.welcome-copy h2 { margin-top: 13px; color: #2d4430; font-size: clamp(24px, 2.1vw, 31px); font-weight: 600; line-height: 1.18; letter-spacing: -.8px; }
.welcome-copy > p { max-width: 450px; margin-top: 13px; color: #657357; font-size: 11px; line-height: 1.75; }
.welcome-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 19px; color: #536a3e; font-size: 9px; font-weight: 550; }
.welcome-tag .icon { width: 14px; height: 14px; }
.server-art { position: relative; min-height: 260px; align-self: center; }
.orbit { position: absolute; border: 1px solid #d0e0b0; border-radius: 50%; }
.orbit-one { width: 263px; height: 263px; top: -2px; left: -2px; }
.orbit-two { width: 195px; height: 195px; top: 32px; left: 32px; }
.server-stack { position: absolute; left: 51px; top: 60px; width: 149px; display: flex; flex-direction: column; gap: 10px; transform: rotate(-9deg); }
.server-unit { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 17px; border: 1px solid #698351; border-radius: 10px; background: #3e5939; box-shadow: 0 5px 0 #a7ba8d, 0 10px 15px #526f3320; }
.server-light { height: 7px; width: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px #e0f4ac55; }
.server-slots { width: 42px; height: 10px; border-top: 2px solid #82956d; border-bottom: 2px solid #82956d; }
.art-badge { position: absolute; right: 23px; bottom: 38px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 5px solid #e9f1d6; border-radius: 50%; color: #354d30; background: var(--lime); }
.art-badge .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.art-spark { position: absolute; color: #9bad7f; font-size: 23px; font-weight: 300; }
.spark-one { top: 38px; left: 34px; }
.spark-two { bottom: 31px; left: 20px; font-size: 15px; }
.health-section { margin-top: 29px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; }
.section-heading h2 { font-size: 16px; font-weight: 650; letter-spacing: -.3px; }
.section-heading p { margin-top: 6px; font-size: 11px; color: var(--muted); }
.subtle-label { display: inline-flex; align-items: center; gap: 6px; color: #818b77; font-size: 9px; }
.subtle-label .status-dot { width: 5px; height: 5px; background: #8a9a70; }
.health-grid, .modules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric-card { padding: 19px 21px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.metric-icon { color: #7d8b70; }
.metric-icon .icon { width: 18px; height: 18px; }
.metric-value { margin-top: 15px; font-size: 31px; font-weight: 600; line-height: 1.3; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.metric-value.uptime-value { font-size: 25px; letter-spacing: -.8px; min-height: 40px; overflow-wrap: anywhere; }
.metric-unit { padding-left: 2px; color: #5f6e55; font-size: 20px; font-weight: 450; }
.metric-caption { margin-left: 9px; color: #8c9484; font-size: 9px; font-weight: 400; letter-spacing: 0; }
.metric-description { margin-top: 8px; font-size: 9px; line-height: 1.6; color: #8b9383; }
.resource-meter { display: block; width: 100%; height: 6px; margin-top: 13px; border: 0; border-radius: 5px; overflow: hidden; background: #edf0e8; appearance: none; }
.resource-meter::-webkit-meter-bar { border: 0; border-radius: 5px; background: #edf0e8; }
.resource-meter::-webkit-meter-optimum-value { border-radius: 5px; background: #94ad70; }
.resource-meter::-moz-meter-bar { border-radius: 5px; background: #94ad70; }
.metric-bottom { display: flex; align-items: center; gap: 5px; margin-top: 17px; color: #70835c; font-size: 9px; }
.metric-bottom .status-dot { height: 5px; width: 5px; }
.modules-section { margin-top: 29px; }
.section-counter { color: #949c8c; font-size: 9px; letter-spacing: 1px; }
.module-card { display: flex; flex-direction: column; padding: 22px 22px 17px; border: 1px solid var(--line); border-radius: 13px; background: #fafbf7; text-decoration: none; transition: border-color .15s, background-color .15s, transform .15s; }
.module-card:hover { transform: translateY(-2px); border-color: #b3c593; background: #fff; }
.module-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.module-icon { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 39px; flex: 0 0 auto; border: 1px solid #dfe5d6; border-radius: 11px; background: #f0f3e8; color: #5f754a; }
.module-icon .icon { width: 20px; height: 20px; }
.module-card h3 { margin-top: 20px; font-size: 15px; font-weight: 650; }
.module-card > p { max-width: 260px; margin-top: 8px; margin-bottom: 19px; color: #88917f; font-size: 10px; line-height: 1.7; }
.module-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px solid #e6eadf; color: #6c8056; font-size: 10px; font-weight: 600; }
.module-link .icon { width: 16px; height: 16px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 20px; padding: 0 44px 23px; color: #8b9381; font-size: 9px; }
.workspace-footer > span > span { margin: 0 6px; }

/* Nodes / inventory. Status is deliberately not inferred from the static list. */
.nodes-panel { max-width: 1100px; overflow: hidden; }
.nodes-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 28px 22px; border-bottom: 1px solid var(--line); }
.nodes-panel-header .eyebrow { margin-bottom: 7px; }
.nodes-panel-header h2 { font-size: 21px; font-weight: 650; letter-spacing: -.45px; }
.nodes-panel-header p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.nodes-count { flex: 0 0 auto; padding: 7px 11px; border-radius: 8px; background: #f1f4ea; color: #617354; font-size: 11px; font-weight: 600; }
.node-list { margin: 0; padding: 0; list-style: none; }
.node-row { display: flex; align-items: center; gap: 17px; min-height: 92px; padding: 16px 28px; }
.node-row + .node-row { border-top: 1px solid #edf0e9; }
.node-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid #dfe6d5; border-radius: 13px; background: #eef3e7; color: #4f6c47; }
.node-icon .icon { width: 24px; height: 24px; }
.node-details { flex: 1 1 auto; min-width: 0; }
.node-details h3 { font-size: 15px; font-weight: 650; }
.node-details p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.node-status { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 7px 11px; border: 1px solid #e3e7dd; border-radius: 999px; background: #f7f8f5; color: #737d70; font-size: 11px; font-weight: 600; white-space: nowrap; }
.node-status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #a7b0a2; }
.nodes-footnote { max-width: 1050px; margin-top: 15px; color: var(--muted); font-size: 11px; line-height: 1.7; }
@media (max-width: 600px) {
  .nodes-panel-header { padding: 21px 18px; }
  .nodes-panel-header h2 { font-size: 18px; }
  .nodes-panel-header p { font-size: 10px; }
  .nodes-count { font-size: 10px; }
  .node-row { min-height: 77px; gap: 12px; padding: 13px 16px; flex-wrap: wrap; }
  .node-icon { flex-basis: 41px; width: 41px; height: 41px; border-radius: 11px; }
  .node-icon .icon { width: 22px; height: 22px; }
  .node-details h3 { font-size: 13px; }
  .node-details p { font-size: 10px; }
  .node-status { margin-left: 53px; padding: 5px 9px; font-size: 10px; }
}


/* Private chat-like notes */
.notes-workspace { max-width: 1050px; margin: 0 auto; }
.notes-page-heading { align-items: center; }
.notes-heading-icon { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 15px; color: #4c6845; background: #e6efd9; }
.notes-heading-icon .icon { width: 26px; height: 26px; }
.notes-chat { overflow: hidden; }
.notes-chat-header { display: flex; align-items: center; gap: 13px; padding: 19px 24px; border-bottom: 1px solid var(--line); background: #fbfcf8; }
.notes-chat-avatar { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; color: #45643c; background: #e8f0df; }
.notes-chat-avatar .icon { width: 23px; height: 23px; }
.notes-chat-header h2 { font-size: 14px; font-weight: 650; }
.notes-chat-header p { margin-top: 3px; font-size: 10px; color: var(--muted); }
.notes-chat-private { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 10px; color: #668058; }
.notes-chat-private .icon { width: 15px; height: 15px; }
.notes-timeline { display: flex; flex-direction: column; gap: 20px; min-height: 260px; padding: 29px 24px 34px; background: #f8faf5; }
.note-message { width: max-content; max-width: min(84%, 730px); margin-left: auto; }
.note-bubble { padding: 15px 18px; border: 1px solid #d6e5c5; border-radius: 16px 16px 4px 16px; background: #e9f2dd; color: #253d27; }
.note-text { font-size: 13px; line-height: 1.68; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.note-meta { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; margin-top: 5px; color: #8a9683; font-size: 9px; font-variant-numeric: tabular-nums; }
.note-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; margin-top: 8px; }
.note-action { display: inline-flex; align-items: center; justify-content: center; min-height: 31px; padding: 5px 10px; border: 1px solid #dfe7d6; border-radius: 7px; background: white; color: #58704d; font-size: 10px; font-weight: 600; text-decoration: none; cursor: pointer; }
.note-action:hover { border-color: #b0c49e; background: #f3f8ee; }
.note-action-danger { color: #9d5148; }
.note-action-danger:hover { background: #fff6f3; border-color: #e6c9c2; }
.notes-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 34px 16px; text-align: center; }
.notes-empty-icon { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 8px; border-radius: 18px; background: #e8efdd; color: #71875d; }
.notes-empty-icon .icon { width: 29px; height: 29px; }
.notes-empty h3 { font-size: 16px; font-weight: 650; }
.notes-empty p { max-width: 330px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.notes-pagination { margin: 0 auto; font-size: 11px; }
.notes-pagination a { color: #547247; text-underline-offset: 3px; }
.note-compose { padding: 21px 24px 23px; border-top: 1px solid var(--line); background: white; }
.note-compose-form > label { display: block; margin-bottom: 10px; color: #43563f; font-size: 11px; font-weight: 650; }
.note-input { display: block; width: 100%; min-height: 100px; padding: 13px 15px; border: 1px solid #d7e1d1; border-radius: 11px; outline: none; resize: vertical; background: #fafbf8; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.6; }
.note-input:focus { outline: 3px solid #d6e6bc; border-color: #839c71; }
.note-compose-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.note-compose-bottom > span { color: #8a9483; font-size: 10px; }
.note-compose-bottom .button { min-height: 41px; }
.notes-storage-hint { margin: 15px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.notes-action-panel { max-width: 850px; padding: 26px; }
.notes-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 19px; }
.note-delete-button { background: #a34138; color: #fff; }
.note-delete-button:hover { background: #85372e; }
.notes-delete-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.notes-delete-preview { margin: 12px 0 0; padding: 15px 17px; border-left: 3px solid #c8d8b8; background: #f7f9f3; color: var(--ink); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-form-errors { margin-top: 9px; color: var(--red); font-size: 12px; }
.note-form-errors ul { margin: 0; padding-left: 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  .notes-timeline { padding: 20px 15px 25px; gap: 18px; }
  .note-message { max-width: 91%; }
  .note-bubble { padding: 12px 14px; }
  .note-text { font-size: 12px; }
  .notes-chat-header { padding: 14px 15px; }
  .note-compose { padding: 18px 15px 20px; }
  .notes-chat-private { font-size: 9px; }
  .notes-action-panel { padding: 19px 17px; }
}
@media (max-width: 480px) {
  .notes-page-heading .notes-heading-icon { display: none; }
  .note-message { max-width: 96%; }
  .note-action { min-height: 33px; }
  .notes-chat-header p { font-size: 9px; }
}


/* Notes: clipboard and file attachments */
.note-image-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.note-image-tools > span { color: var(--muted); font-size: 10px; }
.note-file-label { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 9px 14px; border: 1px solid #b8cda5; border-radius: 10px; background: #e9f2df; color: var(--green); font-size: 12px; font-weight: 650; cursor: pointer; transition: background-color .15s, border-color .15s; }
.note-file-label:hover { background: #dfeecf; border-color: #91ad7a; }
.note-file-label:focus-within { outline: 3px solid #56752d; outline-offset: 3px; }
.note-file-label .icon { width: 17px; height: 17px; }
.note-image-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; }
.note-image-previews { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.note-image-previews:empty { display: none; }
.note-preview-item { display: flex; flex-direction: column; gap: 7px; width: 170px; max-width: 100%; min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf5; }
.note-preview-item img { display: block; width: 100%; height: 128px; object-fit: contain; border-radius: 7px; background: #edf1e8; }
.note-preview-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--muted); }
.note-preview-remove { border: 1px solid #e8c9c1; padding: 5px; border-radius: 6px; background: #fff; color: var(--red); font-size: 10px; }
.note-image-link { display: block; margin-top: 8px; text-decoration: none; }
.note-image-link:first-child { margin-top: 0; }
.note-image { display: block; width: auto; max-width: 100%; max-height: 480px; height: auto; border-radius: 9px; background: #e3e8db; object-fit: contain; }
.note-existing-images { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.note-existing-images legend { font-weight: 600; font-size: 12px; }
.note-existing-image { display: flex; flex-direction: column; gap: 8px; width: min(200px, 100%); font-size: 11px; }
.note-existing-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.note-existing-image span { display: flex; align-items: center; gap: 6px; color: var(--red); }
.note-existing-image input { accent-color: var(--red); }
@media (max-width: 480px) {
  .note-file-label { max-width: 100%; }
  .note-image-tools > span { font-size: 9px; }
}

/* Dashboard: four independent modules */
.modules-grid.modules-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .modules-grid.modules-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .modules-grid.modules-grid-four { grid-template-columns: 1fr; }
}
/* Future Nodes & AI Management module: information only, no invented statuses */
.ai-management-intro { display: flex; align-items: center; gap: 25px; max-width: 1090px; padding: 29px; background: #f6f9f0; }
.ai-management-symbol { display: flex; align-items: center; justify-content: center; width: 82px; height: 82px; flex: 0 0 82px; border-radius: 23px; color: var(--green); background: #e5efd6; }
.ai-management-symbol .icon { width: 41px; height: 41px; }
.ai-management-intro .eyebrow { margin-bottom: 9px; }
.ai-management-intro h2 { font-size: 22px; font-weight: 650; }
.ai-management-intro p { max-width: 670px; margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.ai-management-features { max-width: 1090px; margin-top: 29px; }
.ai-management-features > h2 { margin-bottom: 16px; font-size: 17px; font-weight: 650; }
.ai-management-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.ai-management-feature { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 23px; }
.ai-management-feature h3 { font-size: 15px; font-weight: 650; }
.ai-management-feature p { flex: 1 0 auto; color: var(--muted); font-size: 11px; line-height: 1.75; }
.ai-management-feature .soon-badge { margin-top: 4px; }
@media (max-width: 900px) {
  .ai-management-grid { grid-template-columns: 1fr; }
  .ai-management-intro { align-items: flex-start; gap: 17px; padding: 23px; }
  .ai-management-symbol { flex-basis: 57px; width: 57px; height: 57px; border-radius: 16px; }
  .ai-management-symbol .icon { width: 29px; height: 29px; }
  .ai-management-intro h2 { font-size: 19px; }
}
@media (max-width: 480px) {
  .ai-management-intro { display: block; }
  .ai-management-symbol { margin-bottom: 16px; }
}

/* Forms */
.form-field { margin-bottom: 20px; }
.form-field > label { display: block; margin-bottom: 7px; color: #43533d; font-size: 11px; font-weight: 650; }
.form-field input { display: block; width: 100%; min-height: 45px; padding: 11px 13px; border: 1px solid #dce2d5; border-radius: 8px; color: var(--ink); background: #fbfcf8; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.form-field input:focus { border-color: #728d4c; background: white; box-shadow: 0 0 0 3px #cfdfb333; }
.form-field.has-error input { border-color: #b46c5e; }
.help-text { margin-top: 7px; color: #7a8670; font-size: 10px; line-height: 1.65; }
.help-text ul { margin: 0; padding-left: 17px; }
.help-text li + li { margin-top: 3px; }
.field-errors { margin-top: 6px; color: var(--red); font-size: 11px; }
.field-errors p + p { margin-top: 4px; }
.error-summary { margin-bottom: 23px; padding: 14px 16px; border: 1px solid #e8c8bf; border-radius: 10px; color: #853c31; background: #fff4ef; font-size: 11px; }
.error-summary strong { display: block; margin-bottom: 4px; font-weight: 650; }
.error-summary p + p { margin-top: 5px; }
.error-summary a { text-underline-offset: 3px; }
.message { margin-bottom: 22px; padding: 13px 16px; border: 1px solid #ccdcb6; border-radius: 10px; color: var(--green); background: #edf4e1; font-size: 12px; }
.message.error { color: var(--red); border-color: #e8c8bf; background: #fff4ef; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.account-grid { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.5fr); gap: 24px; max-width: 1040px; align-items: start; }
.account-profile { padding: 30px 25px 25px; }
.avatar-large { width: 62px; height: 62px; margin-bottom: 20px; border-radius: 19px; font-size: 27px; }
.account-profile h2 { font-size: 23px; font-weight: 600; overflow-wrap: anywhere; }
.owner-badge { display: inline-block; margin-top: 10px; padding: 4px 8px; border-radius: 5px; color: #657b4d; background: var(--soft-green); font-size: 9px; }
.account-profile hr { height: 1px; margin: 25px 0; border: 0; background: var(--line); }
.profile-detail { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 27px; }
.profile-detail > .icon { width: 19px; height: 19px; color: #73875b; }
.profile-detail strong { font-size: 11px; font-weight: 600; }
.profile-detail p { margin-top: 5px; font-size: 10px; line-height: 1.7; color: var(--muted); }
.password-panel { padding: 29px 31px; }
.panel-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.panel-heading h2 { font-size: 18px; font-weight: 600; }
.panel-heading p { margin-top: 6px; color: var(--muted); font-size: 11px; }
.account-form .form-field { margin-bottom: 22px; }
.form-actions { padding-top: 2px; }
.soon-badge-large { padding: 7px 12px; font-size: 11px; }
.module-preview { display: flex; flex-direction: column; align-items: center; max-width: 950px; margin-top: 10px; padding: 42px 48px 45px; text-align: center; }
.preview-visual { position: relative; display: flex; align-items: center; justify-content: center; width: 180px; height: 155px; margin-bottom: 12px; }
.preview-orbit { position: absolute; width: 150px; height: 150px; border: 1px solid #e5ecd9; border-radius: 50%; }
.preview-orbit::after { content: ""; position: absolute; inset: 17px; border: 1px solid #e5ecd9; border-radius: 50%; }
.preview-icon { z-index: 1; width: 82px; height: 82px; display: flex; align-items: center; justify-content: center; border-radius: 25px; color: #486436; background: #e5f1ca; transform: rotate(-8deg); }
.preview-icon .icon { width: 38px; height: 38px; stroke-width: 1.3; }
.module-preview > .eyebrow { margin-bottom: 13px; }
.module-preview h2 { max-width: 500px; font-size: 29px; font-weight: 600; letter-spacing: -.8px; }
.preview-description { max-width: 540px; margin-top: 16px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.module-notice { display: flex; align-items: flex-start; gap: 10px; max-width: 480px; margin: 27px 0; padding: 14px 17px; border: 1px solid #e5eadc; border-radius: 10px; color: #748266; background: #f7f9f1; text-align: left; }
.module-notice > .icon { width: 17px; height: 17px; margin-top: 1px; }
.module-notice p { font-size: 10px; line-height: 1.7; }

/* Welcome and sign-in */
.authentication { background: #f6f7f1; }
.auth-shell { display: flex; flex-direction: column; min-height: 100vh; max-width: 1512px; margin: 0 auto; padding: 37px 67px 26px; }
.auth-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.auth-main { flex: 1 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(45px, 7vw, 125px); width: 100%; max-width: 1050px; margin: 64px auto 75px; }
.auth-intro { padding-bottom: 6px; }
.auth-intro .eyebrow { display: flex; align-items: center; gap: 8px; color: #7b8b67; font-size: 9px; }
.auth-intro .eyebrow .status-dot { width: 5px; height: 5px; }
.auth-intro h1 { margin-top: 25px; font-size: clamp(40px, 4.6vw, 62px); font-weight: 550; letter-spacing: -2.8px; line-height: 1.07; }
.auth-intro h1 > span { color: #71864e; }
.auth-intro > p { max-width: 345px; margin-top: 25px; color: #7b8571; font-size: 13px; line-height: 1.9; }
.intro-assurance { display: flex; align-items: center; gap: 13px; margin-top: 42px; }
.assurance-icon { width: 38px; height: 38px; display: flex; justify-content: center; align-items: center; border: 1px solid #dfe7d1; border-radius: 11px; color: #77935a; background: #edf3e2; }
.assurance-icon .icon { width: 19px; height: 19px; }
.intro-assurance strong { display: block; color: #657652; font-size: 11px; font-weight: 600; }
.intro-assurance div > span { display: block; margin-top: 3px; color: #929b87; font-size: 10px; }
.auth-card { padding: 35px 36px 29px; border: 1px solid #e0e6d8; border-radius: 20px; background: #fff; box-shadow: 0 12px 45px #35482905; }
.form-symbol { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; margin-bottom: 24px; border: 1px solid #dde7cf; border-radius: 13px; background: #eef5e2; color: #668149; }
.form-symbol .icon { width: 22px; height: 22px; }
.auth-card > .eyebrow { margin-bottom: 9px; color: #8b9780; font-size: 9px; }
.auth-card h2 { font-size: 24px; font-weight: 600; letter-spacing: -.7px; line-height: 1.25; }
.form-intro { margin-top: 10px; margin-bottom: 28px; color: #89947e; font-size: 11px; line-height: 1.8; }
.auth-form .button { margin-top: 5px; }
.form-footnote { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin-top: 20px; color: #8a967e; font-size: 9px; line-height: 1.7; }
.form-footnote .icon { width: 13px; height: 13px; margin-top: 1px; }
.setup-prompt { display: flex; flex-direction: column; gap: 6px; margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--line); text-align: center; font-size: 10px; color: #8a967e; }
.setup-prompt a { color: var(--green); text-decoration: none; font-weight: 550; }
.setup-prompt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.setup-prompt a > span { padding-left: 4px; }
.back-link { display: block; margin-top: 19px; text-align: center; font-size: 10px; }
.auth-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #939c88; font-size: 9px; }
.auth-footer > span > span { padding: 0 6px; }
.auth-footer a { display: inline-flex; align-items: center; gap: 7px; color: #7a896a; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-footer a .icon { width: 13px; height: 13px; }

@media (min-width: 1500px) {
  .app-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .sidebar { padding-right: 25px; padding-left: 25px; }
  .main-content { padding-top: 43px; }
  .welcome-panel { grid-template-columns: minmax(0, 1fr) 300px; }
  .server-art { width: 260px; }
}

@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 208px minmax(0, 1fr); }
  .sidebar { padding-right: 13px; padding-left: 13px; }
  .sidebar .brand { margin-left: 8px; font-size: 18px; gap: 8px; }
  .sidebar .brand img { width: 34px; height: 34px; }
  .sidebar .brand small { font-size: 9px; }
  .main-navigation > a { font-size: 11px; padding-right: 11px; padding-left: 11px; gap: 9px; }
  .nav-soon { font-size: 7px; }
  .topbar { padding-right: 27px; padding-left: 27px; }
  .main-content { padding: 30px 27px 36px; }
  .workspace-footer { padding-right: 27px; padding-left: 27px; }
  .welcome-panel { grid-template-columns: minmax(0, 1fr) 190px; }
  .welcome-copy { padding: 27px; }
  .server-art { transform: scale(.85); transform-origin: center right; }
  .metric-card { padding: 17px; }
  .metric-value.uptime-value { font-size: 21px; }
  .metric-caption { display: block; margin: 1px 0 0; }
  .metric-description { font-size: 9px; }
  .module-card { padding: 17px 17px 15px; }
  .module-top { gap: 7px; }
  .module-icon { width: 34px; height: 34px; border-radius: 10px; }
  .soon-badge { padding: 4px 6px; font-size: 8px; }
  .account-grid { grid-template-columns: minmax(200px, .75fr) minmax(0, 1.5fr); gap: 18px; }
  .password-panel { padding: 26px 24px; }
  .auth-shell { padding-right: 45px; padding-left: 45px; }
  .auth-main { gap: 55px; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 185px minmax(0, 1fr); }
  .sidebar { padding-right: 9px; padding-left: 9px; }
  .sidebar .brand { gap: 7px; font-size: 16px; }
  .sidebar .brand small { font-size: 8px; }
  .main-navigation > a { font-size: 10px; padding-right: 9px; padding-left: 9px; gap: 8px; }
  .main-navigation .icon { width: 17px; height: 17px; }
  .nav-soon { display: none; }
  .private-note { padding-right: 9px; padding-left: 9px; gap: 7px; font-size: 9px; }
  .private-note small { font-size: 8px; }
  .main-content { padding-right: 23px; padding-left: 23px; }
  .page-heading h1 { font-size: 27px; }
  .date-label { display: none; }
  .welcome-panel { grid-template-columns: minmax(0, 1fr) 155px; }
  .welcome-copy h2 { font-size: 25px; }
  .welcome-copy > p { font-size: 10px; }
  .server-art { transform: scale(.68); transform-origin: center right; }
  .health-grid, .modules-grid { gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-top { font-size: 10px; }
  .metric-icon { display: none; }
  .metric-value.uptime-value { font-size: 19px; }
  .subtle-label { font-size: 8px; }
  .module-card { padding-right: 13px; padding-left: 13px; }
  .module-top { align-items: flex-start; flex-direction: column; }
  .module-card h3 { margin-top: 14px; }
  .module-card > p { font-size: 9px; }
  .workspace-footer { padding-right: 23px; padding-left: 23px; font-size: 8px; }
  .workspace-footer > span:last-child { display: none; }
  .account-grid { grid-template-columns: 1fr; }
  .account-profile { display: grid; grid-template-columns: 62px minmax(0, 1fr); column-gap: 18px; padding: 23px; }
  .account-profile .avatar { grid-row: 1 / 3; margin: 0; }
  .account-profile h2 { align-self: end; }
  .owner-badge { justify-self: start; align-self: start; margin-top: 6px; }
  .account-profile hr { grid-column: 1 / -1; width: 100%; margin: 22px 0; }
  .profile-detail, .account-profile form { grid-column: 1 / -1; }
  .profile-detail { margin-bottom: 20px; }
  .module-preview { padding: 28px 28px 35px; }
  .module-preview h2 { font-size: 25px; }
  .auth-shell { padding: 29px 35px 23px; }
  .auth-main { gap: 35px; margin-top: 55px; margin-bottom: 55px; }
  .auth-intro h1 { font-size: 43px; letter-spacing: -2px; }
  .auth-intro > p { font-size: 12px; }
  .auth-card { padding: 28px 26px 25px; }
  .auth-card h2 { font-size: 22px; }
}

@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; padding: 19px 20px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 0 19px; gap: 9px; font-size: 19px; }
  .sidebar .brand small { font-size: 9px; }
  .sidebar .brand img { width: 36px; height: 36px; }
  .navigation-label { display: none; }
  .main-navigation { flex-direction: row; gap: 5px; overflow-x: auto; margin: 0 -20px; padding: 0 16px 11px; scrollbar-width: thin; }
  .main-navigation > a { flex: 0 0 auto; gap: 7px; padding: 10px 12px; min-height: 40px; font-size: 10px; white-space: nowrap; }
  .main-navigation > a.nav-subitem { min-height: 40px; margin: 0; padding: 10px 12px; font-size: 10px; }
  .main-navigation .account-navigation { margin-top: 0; }
  .sidebar-bottom { position: absolute; right: 20px; top: 20px; padding: 0; }
  .private-note, .owner-name { display: none; }
  .owner-row { padding: 0; gap: 7px; border: 0; }
  .owner-row .avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
  .owner-row .icon-button { width: 32px; height: 32px; }
  .topbar { min-height: 53px; padding: 0 22px; background: var(--page); border-bottom: 0; }
  .breadcrumb { font-size: 9px; }
  .breadcrumb > span { padding: 0 8px; }
  .topbar .private-badge { font-size: 9px; }
  .topbar .private-badge .icon { width: 13px; height: 13px; }
  .main-content { padding: 14px 21px 31px; }
  .page-heading { margin-bottom: 22px; align-items: start; }
  .page-heading h1 { max-width: 460px; font-size: 30px; line-height: 1.14; letter-spacing: -1px; }
  .page-heading p { font-size: 11px; }
  .page-heading .eyebrow { font-size: 9px; }
  .welcome-panel { min-height: 245px; grid-template-columns: minmax(0, 1fr) 155px; }
  .welcome-copy { padding: 25px; }
  .welcome-copy > p { max-width: 290px; }
  .server-art { transform: scale(.7); }
  .section-heading h2 { font-size: 15px; }
  .section-heading p { font-size: 10px; }
  .health-grid { gap: 12px; }
  .metric-top { font-size: 10px; }
  .metric-value { font-size: 27px; }
  .metric-value.uptime-value { font-size: 20px; }
  .metric-description { font-size: 9px; }
  .modules-grid { gap: 12px; }
  .module-top { flex-direction: row; align-items: center; }
  .module-icon { width: 33px; height: 33px; }
  .module-top .soon-badge { font-size: 7px; padding: 3px 5px; }
  .module-card h3 { font-size: 14px; }
  .module-link { font-size: 9px; }
  .workspace-footer { padding-right: 21px; padding-left: 21px; padding-bottom: 22px; }
  .soon-badge-large { margin-top: 29px; padding: 6px 9px; font-size: 9px; }
  .auth-shell { padding: 25px 25px 22px; }
  .auth-header .private-badge { font-size: 10px; }
  .auth-main { display: flex; flex-direction: column; align-items: stretch; gap: 28px; max-width: 450px; margin: 45px auto; }
  .auth-intro { padding: 0 3px; }
  .auth-intro h1 { margin-top: 17px; font-size: 41px; line-height: 1.08; }
  .auth-intro h1 br:last-child { display: none; }
  .auth-intro > p { max-width: 370px; margin-top: 18px; font-size: 11px; }
  .intro-assurance { display: none; }
  .auth-card { padding: 28px; }
  .auth-card h2 { font-size: 24px; }
  .auth-footer { align-items: flex-start; gap: 15px; font-size: 8px; }
  .auth-footer a { white-space: nowrap; }
}

@media (max-width: 480px) {
  .welcome-panel { display: block; }
  .welcome-copy { padding: 24px; }
  .welcome-copy h2 { font-size: 27px; }
  .welcome-copy > p { max-width: 100%; font-size: 11px; }
  .welcome-tag { font-size: 9px; }
  .server-art { display: none; }
  .health-grid { grid-template-columns: 1fr; gap: 11px; }
  .metric-card { position: relative; padding: 17px 19px; }
  .metric-top { font-size: 11px; }
  .metric-icon { display: block; }
  .metric-value { margin-top: 10px; font-size: 30px; }
  .metric-value.uptime-value { min-height: 0; font-size: 26px; }
  .metric-caption { display: inline; margin-left: 8px; }
  .metric-description { margin-top: 7px; font-size: 10px; }
  .metric-bottom { margin-top: 12px; }
  .resource-meter { margin-top: 11px; }
  .section-heading { align-items: flex-start; gap: 10px; }
  .subtle-label { max-width: 125px; text-align: right; font-size: 8px; line-height: 1.5; }
  .subtle-label .status-dot { display: none; }
  .modules-grid { grid-template-columns: 1fr; gap: 12px; }
  .module-card { position: relative; padding: 20px; }
  .module-top .soon-badge { font-size: 9px; padding: 4px 8px; }
  .module-icon { width: 39px; height: 39px; }
  .module-card h3 { margin-top: 17px; font-size: 17px; }
  .module-card > p { max-width: 100%; margin-bottom: 15px; font-size: 11px; }
  .module-link { font-size: 10px; }
  .section-counter { margin-top: 3px; font-size: 8px; white-space: nowrap; }
  .account-grid { gap: 17px; }
  .password-panel { padding: 23px 21px; }
  .panel-heading { gap: 11px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-heading p { font-size: 10px; }
  .form-actions .button { width: 100%; }
  .module-preview { padding: 23px 21px 29px; }
  .module-preview h2 { font-size: 25px; }
  .preview-description { font-size: 12px; }
  .module-preview .eyebrow { font-size: 9px; }
  .auth-shell { padding: 23px 20px 20px; }
  .auth-header .brand { font-size: 19px; }
  .auth-header .brand img { width: 36px; height: 36px; }
  .auth-header .brand small { font-size: 9px; }
  .auth-header .private-badge { width: 29px; height: 29px; overflow: hidden; font-size: 0; }
  .auth-header .private-badge .icon { width: 19px; height: 19px; }
  .auth-main { margin-top: 36px; margin-bottom: 38px; }
  .auth-intro h1 { font-size: 38px; }
  .auth-card { padding: 26px 24px; border-radius: 17px; }
  .auth-card h2 { font-size: 23px; }
  .form-symbol { margin-bottom: 20px; }
  .auth-footer { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
}

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

@media print {
  .sidebar, .topbar, .workspace-footer, .button, .server-art { display: none; }
  .app-shell { display: block; }
  body { background: #fff; }
  .main-content { padding: 0; }
  .welcome-panel { display: block; }
  .metric-card, .module-card { break-inside: avoid; }
}

/* Raspberry Pi CPU telemetry: unknown is visibly distinct from a real 0%. */
.cpu-widget { min-width: 0; color: #53674a; }
.cpu-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 11px; font-weight: 600; }
.cpu-reading { display: inline-flex; align-items: baseline; gap: 3px; font-variant-numeric: tabular-nums; color: #344d31; }
.cpu-reading strong { font-size: 23px; line-height: 1.1; font-weight: 650; letter-spacing: -.7px; }
.cpu-reading small { font-size: 12px; font-weight: 450; }
.cpu-track { display: block; height: 9px; overflow: hidden; margin-top: 9px; border: 1px solid #dce4d3; border-radius: 99px; background: repeating-linear-gradient(115deg,#eef2e9 0px,#eef2e9 8px,#e2e8d9 8px,#e2e8d9 14px); }
.cpu-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #54844b; transition: width .25s ease-out; }
.cpu-status { margin-top: 7px; font-size: 10px; line-height: 1.45; color: #899587; }
.cpu-widget[data-cpu-state="live"] .cpu-track { background: #eaf0e3; }
.cpu-widget[data-cpu-state="unavailable"] .cpu-reading { color: #819080; }
.cpu-widget--card { margin: 0; } /* Card spacing is owned by the shared composition. */
.cpu-widget--node { flex: 0 1 210px; min-width: 155px; }
.cpu-widget--node .cpu-reading strong { font-size: 19px; }
.cpu-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.cpu-panel-intro { flex: 1 1 220px; }
.cpu-panel-intro .eyebrow { margin-bottom: 6px; font-size: 9px; }
.cpu-panel-intro h2 { font-size: 18px; }
.cpu-panel-intro p { max-width: 450px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.cpu-widget--detail { flex: 0 1 330px; min-width: 220px; }
.cpu-widget--detail .cpu-reading strong { font-size: 30px; }
.cpu-widget--detail .cpu-track { height: 12px; }
@media (max-width: 700px) {
  .cpu-widget--node { flex: 1 0 calc(100% - 53px); margin-left: 53px; }
  .cpu-panel { padding: 17px; }
  .cpu-widget--detail { flex: 1 1 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .cpu-fill { transition: none; } }

/* Raspberry Pi RX/TX throughput: striped bars mean unknown, not zero. */
.traffic-widget { min-width: 0; color: #475e50; }
.traffic-widget-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; font-size: 11px; }
.traffic-widget-head strong { font-weight: 650; }
.traffic-activity { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; color: #849088; }
.traffic-activity::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #a8b2a9; }
.traffic-widget[data-traffic-state="active"] .traffic-activity { color: #346a4c; }
.traffic-widget[data-traffic-state="active"] .traffic-activity::before { background: #4d9a69; box-shadow: 0 0 0 3px #e4f3e7; }
.traffic-widget[data-traffic-state="idle"] .traffic-activity { color: #777f78; }
.traffic-widget[data-traffic-state="idle"] .traffic-activity::before { background: #9aada6; }
.traffic-direction + .traffic-direction { margin-top: 11px; }
.traffic-line { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px; margin-bottom: 5px; font-size: 10px; color: #718075; }
.traffic-line strong { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; color: #375f4a; }
.traffic-tx .traffic-line strong { color: #3d6c88; }
.traffic-widget[data-traffic-state="unavailable"] .traffic-line strong { color: #849088; }
.traffic-meter { width: 100%; height: 9px; overflow: hidden; border: 1px solid #dfe7e3; border-radius: 99px; background: repeating-linear-gradient(115deg,#edf1ee 0px,#edf1ee 8px,#e4eae6 8px,#e4eae6 14px); }
.traffic-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #5a9879; transition: width .25s ease; }
.traffic-tx .traffic-fill { background: #6393b6; }
.traffic-widget[data-traffic-state="active"] .traffic-meter,
.traffic-widget[data-traffic-state="idle"] .traffic-meter { background: #e8f0eb; }
.traffic-meta { margin-top: 10px; font-size: 9px; line-height: 1.5; color: #88948a; overflow-wrap: anywhere; }
.traffic-widget--card { margin: 0; } /* Vertical spacing is owned by the parent layout. */
.traffic-widget--card + .module-link { margin-top: auto; }
.traffic-widget--node { flex: 0 1 220px; min-width: 190px; padding: 8px 0; }
.traffic-widget--node .traffic-widget-head { margin-bottom: 7px; }
.traffic-widget--node .traffic-direction + .traffic-direction { margin-top: 7px; }
.traffic-widget--node .traffic-meter { height: 7px; }
.traffic-widget--node .traffic-meta { margin-top: 6px; }
.traffic-panel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 22px 24px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.traffic-panel-intro { flex: 1 1 230px; }
.traffic-panel-intro .eyebrow { margin-bottom: 6px; font-size: 9px; }
.traffic-panel-intro h2 { font-size: 18px; font-weight: 600; }
.traffic-panel-intro p { max-width: 430px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.traffic-widget--detail { flex: 0 1 360px; min-width: 230px; }
.traffic-widget--detail .traffic-meter { height: 12px; }
.traffic-widget--detail .traffic-line strong { font-size: 17px; }
@media (max-width: 1100px) {
  .node-row[data-node-id="raspberry-pi"] { flex-wrap: wrap; }
  .node-row[data-node-id="raspberry-pi"] .cpu-widget--node { flex: 1 1 210px; }
  .node-row[data-node-id="raspberry-pi"] .traffic-widget--node { flex: 1 1 230px; }
}
@media (max-width: 700px) {
  .traffic-panel { padding: 17px; }
  .traffic-widget--detail { flex: 1 1 100%; min-width: 0; }
  .node-row[data-node-id="raspberry-pi"] .traffic-widget--node { flex-basis: calc(100% - 53px); margin-left: 53px; }
}
@media (prefers-reduced-motion: reduce) { .traffic-fill { transition: none; } }


/* Physical Mini PC host telemetry; separate from Raspberry Pi indicators. */
.host-device-card { min-width: 0; }
.host-telemetry { min-width: 0; width: 100%; }
.host-resource-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.host-resource { min-width: 0; } /* Resource appearance is defined once by .telemetry-resource-card. */
.host-resource .cpu-heading { flex-wrap: wrap; gap: 3px 12px; font-size: 10px; }
.host-resource .cpu-reading strong { font-size: 21px; }
.host-resource[data-resource-state="live"] .cpu-track { background: #e9f0e8; }
.host-resource[data-resource-state="unavailable"] .cpu-reading { color: #819080; }
.host-resource .cpu-status { font-size: 9px; }
.host-traffic { margin-top: 0; } /* Same surface and spacing for both device sources. */
.host-telemetry--card { display: grid; gap: 12px; margin-bottom: 18px; }
.host-device-card .module-link { margin-top: auto; }
.host-node-extras { order: 5; flex: 1 1 100%; min-width: 0; padding-left: 65px; }
.node-row[data-node-id="mini-pc"] { flex-wrap: wrap; align-items: flex-start; }
.host-telemetry--node { display: grid; grid-template-columns: minmax(0,1fr) minmax(210px,.85fr); gap: 14px; }
.host-telemetry--node .host-traffic { margin-top: 0; }
.host-telemetry--node .host-resource { padding: 10px; }
.host-detail-link { display: inline-flex; gap: 7px; align-items: center; margin-top: 12px; color: #527149; font-size: 11px; font-weight: 600; text-decoration: none; }
.host-detail-link:hover { text-decoration: underline; }
.host-detail-link .icon { width: 14px; height: 14px; }
.host-monitor { max-width: 1150px; }
.host-monitor-panel { padding: 26px; }
.host-monitor-intro .eyebrow { font-size: 9px; margin-bottom: 6px; }
.host-monitor-intro h2 { font-size: 20px; font-weight: 650; }
.host-monitor-intro > p { max-width: 700px; color: var(--muted); font-size: 12px; margin: 6px 0 22px; }
.host-telemetry--detail { display: grid; grid-template-columns: minmax(0,.9fr) minmax(270px,1.1fr); gap: 19px; }
.host-telemetry--detail .telemetry-widget-card { padding: 20px; }
.host-telemetry--detail .host-resource .cpu-reading strong { font-size: 30px; }
.host-telemetry--detail .cpu-track, .host-telemetry--detail .traffic-meter { height: 12px; }
.host-telemetry--detail .host-traffic { margin-top: 0; }
.host-telemetry--detail .traffic-line strong { font-size: 16px; }
.host-source-note { margin-top: 20px; font-size: 10px; color: #879287; }
@media (max-width: 920px) {
  .host-telemetry--node, .host-telemetry--detail { display: flex; flex-direction: column; }
  .host-telemetry--node .host-traffic, .host-telemetry--detail .host-traffic { margin-top: 0; }
}
@media (max-width: 600px) {
  .host-node-extras { padding-left: 53px; }
  .host-resource { padding: 10px; }
  .host-resource .cpu-reading strong { font-size: 18px; }
  .host-resource .cpu-heading { gap: 4px; }
  .host-monitor-panel { padding: 17px; }
}

/* Raspberry Pi in Devices uses the same framed CPU/traffic card system as the Mini PC.
   Only the layout changes; CPU and traffic still use their independent Pi data hooks. */
.node-row[data-node-id="raspberry-pi"] { flex-wrap: wrap; align-items: flex-start; }
.raspberry-node-extras { min-width: 0; }
.raspberry-node-telemetry { width: 100%; }
.raspberry-node-telemetry .raspberry-resource { min-width: 0; }
.raspberry-node-telemetry .raspberry-resource .cpu-heading { flex-wrap: wrap; gap: 3px 12px; }
.raspberry-node-telemetry .raspberry-resource .cpu-reading strong { font-size: 21px; }
.raspberry-node-telemetry .raspberry-traffic { min-width: 0; }
@media (max-width: 600px) {
  .raspberry-node-telemetry .raspberry-resource .cpu-reading strong { font-size: 18px; }
}

/* IoT landing page: prepared inventory, no unverified telemetry or controls. */
.iot-empty { display: flex; align-items: center; flex-wrap: wrap; gap: 17px 22px; padding: 28px; background: #fbfcf8; }
.iot-empty-icon { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; flex: 0 0 auto; border: 1px solid #dce6d3; border-radius: 17px; background: #eef4e8; color: #507247; }
.iot-empty-icon .icon { width: 29px; height: 29px; }
.iot-empty > div { flex: 1 1 280px; min-width: 0; }
.iot-empty .eyebrow { margin-bottom: 6px; }
.iot-empty h2 { font-size: 20px; font-weight: 650; letter-spacing: -.4px; }
.iot-empty p { max-width: 630px; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.iot-empty-state { flex: 0 0 auto; border: 1px solid #e0e5dc; border-radius: 20px; padding: 6px 11px; color: #768171; background: #f6f8f3; font-size: 10px; }
.iot-future-section { margin-top: 29px; }
.iot-future-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.iot-future-card { min-width: 0; border: 1px solid var(--line); border-radius: 13px; padding: 21px; background: var(--surface); }
.iot-future-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #dce6d4; border-radius: 12px; background: #f1f5eb; color: #55734b; }
.iot-future-icon .icon { width: 21px; height: 21px; }
.iot-future-card h3 { margin-top: 15px; font-size: 14px; font-weight: 650; }
.iot-future-card p { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.65; }
@media (max-width: 950px) {
  .iot-future-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .iot-empty { padding: 19px; gap: 13px; }
  .iot-empty-icon { width: 48px; height: 48px; border-radius: 13px; }
  .iot-empty h2 { font-size: 18px; }
  .iot-empty p { font-size: 11px; }
  .iot-empty-state { margin-left: 0; }
  .iot-future-grid { grid-template-columns: 1fr; gap: 11px; }
  .iot-future-card { padding: 17px; }
}


/* IoT analytics: empty by design until real, timestamped sensor metrics exist. */
.iot-analytics-card-empty { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 13px 12px; border: 1px dashed #dce5d4; border-radius: 10px; background: #f5f8f2; color: #7c8977; font-size: 11px; line-height: 1.5; }
.iot-analytics-card-empty .icon { width: 20px; height: 20px; flex: 0 0 auto; }
.iot-analytics-card .module-link { margin-top: auto; }
.iot-analytics-empty { display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: center; padding: 25px 28px; }
.iot-analytics-empty > div { flex: 1 1 260px; min-width: 0; }
.iot-analytics-empty h2 { font-size: 20px; font-weight: 650; }
.iot-analytics-empty p { max-width: 630px; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.iot-analytics-empty .eyebrow { margin-bottom: 7px; }
.iot-analytics-unavailable { display: inline-flex; margin-top: 16px; padding: 5px 10px; border: 1px solid #e4e9e0; border-radius: 99px; background: #f5f8f2; color: #869182; font-size: 10px; }
.iot-analytics-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; margin-top: 26px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.iot-analytics-footer p { flex: 1 1 280px; color: var(--muted); line-height: 1.6; font-size: 11px; }
.iot-analytics-footer .button { white-space: nowrap; }
@media (max-width: 600px) {
  .iot-analytics-empty { padding: 18px; }
  .iot-analytics-empty h2 { font-size: 18px; }
  .iot-analytics-empty p { font-size: 11px; }
  .iot-analytics-footer { padding: 16px; }
}


/* Server-backed private file storage: responsive Drive-style lists and dropzone. */
.storage-workspace { width: 100%; max-width: 1170px; }
.storage-transfer { padding: 25px; margin-bottom: 20px; }
.storage-transfer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 17px; flex-wrap: wrap; margin-bottom: 18px; }
.storage-transfer-heading h2 { margin-top: 4px; font-size: 21px; font-weight: 650; }
.storage-transfer-heading p { max-width: 660px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.storage-space-label { display: inline-flex; align-items: baseline; gap: 5px; border: 1px solid #dfe7d9; border-radius: 99px; padding: 7px 11px; color: #778674; background: #f7faf4; font-size: 10px; }
.storage-space-label strong { color: #4f704e; }
.storage-picker { display: block; }
.storage-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 205px; padding: 23px 16px; border: 1.5px dashed #b8cba9; border-radius: 13px; background: #f6faf2; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.storage-dropzone:hover, .storage-dropzone--active { border-color: #679655; background: #edf5e6; }
.storage-drop-icon { display: inline-flex; align-items: center; justify-content: center; width: 51px; height: 51px; border-radius: 15px; background: #e4efda; color: #5c8051; }
.storage-drop-icon .icon { width: 26px; height: 26px; }
.storage-dropzone > strong { font-size: 14px; font-weight: 650; }
.storage-dropzone > span:not(.storage-drop-icon):not(.button) { color: var(--muted); font-size: 11px; }
.storage-dropzone .button { min-height: 38px; padding: 9px 17px; margin-top: 4px; font-size: 11px; }
.storage-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.storage-file-input:focus-visible + .storage-dropzone, .storage-dropzone:focus-within { outline: 2px solid #4f864b; outline-offset: 2px; }
.storage-progress { border: 1px solid #dfe7d9; border-radius: 12px; margin-top: 16px; padding: 15px 17px; background: #f8faf6; }
.storage-progress[hidden] { display: none; }
.storage-progress-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; }
.storage-progress-heading strong { overflow-wrap: anywhere; }
.storage-progress-heading span { color: #507a49; font-variant-numeric: tabular-nums; font-weight: 650; }
.storage-progress progress { display: block; width: 100%; height: 12px; margin: 11px 0 7px; accent-color: #5f9153; }
.storage-progress p { margin-bottom: 11px; color: var(--muted); font-size: 10px; }
.storage-progress .button { min-height: 34px; padding: 7px 13px; font-size: 11px; }
.storage-feedback { margin-top: 10px; color: #507a49; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.storage-files { overflow: hidden; margin-bottom: 20px; }
.storage-section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.storage-section-header h2 { font-size: 16px; font-weight: 650; }
.storage-section-header p, .storage-muted { margin-top: 4px; color: var(--muted); font-size: 10px; }
.storage-file-list { width: 100%; }
.storage-file-row { display: flex; align-items: center; gap: 15px; min-width: 0; padding: 15px 23px; border-bottom: 1px solid #edf0e9; }
.storage-file-row:last-child { border-bottom: 0; }
.storage-file-row:hover { background: #f9fbf6; }
.storage-file-icon { display: flex; justify-content: center; align-items: center; width: 39px; height: 39px; border: 1px solid #e0e9d9; border-radius: 11px; background: #eef4e9; color: #638159; flex: 0 0 auto; }
.storage-file-icon .icon { width: 20px; height: 20px; }
.storage-file-details { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; }
.storage-file-details strong { min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: 12px; }
.storage-file-details span { color: var(--muted); font-size: 10px; }
.storage-file-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.storage-file-actions form { display: inline-flex; }
.storage-action { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; border: 1px solid #d9e4d3; border-radius: 8px; padding: 7px 11px; font: inherit; font-size: 10px; color: #52724c; background: #f7faf5; text-decoration: none; cursor: pointer; }
.storage-action:hover { background: #eaf3e4; }
.storage-action-delete { border-color: #eee0dc; color: #98625d; background: #fffafa; }
.storage-action-delete:hover { background: #fdf0ed; }
.storage-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 15px; }
.storage-empty-icon { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 15px; color: #739063; background: #edf3e6; }
.storage-empty-icon .icon { width: 25px; height: 25px; }
.storage-empty strong { font-size: 14px; }
.storage-empty p { max-width: 400px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.storage-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 17px; border-top: 1px solid var(--line); padding: 15px; color: var(--muted); font-size: 11px; }
.storage-pagination a { color: #587d4d; }
@media (max-width: 700px) {
  .storage-transfer { padding: 17px; }
  .storage-dropzone { min-height: 185px; }
  .storage-file-row { padding: 13px; gap: 10px; flex-wrap: wrap; }
  .storage-file-actions { margin-left: 49px; }
  .storage-section-header { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) { .storage-dropzone { transition: none; } }


/* Real NetBird Management states; unavailable telemetry is neutral, never red. */
.node-status--online { color: #36744b; border-color: #c9e2c8; background: #eaf6e9; }
.node-status--online .node-status-dot { background: #3d995e; box-shadow: 0 0 0 3px #d1ebd4; }
.node-status--offline { color: #98584d; border-color: #ecd2c9; background: #fff2ee; }
.node-status--offline .node-status-dot { background: #bc6859; box-shadow: 0 0 0 3px #f6ded8; }
.node-status--unknown { color: #737d70; border-color: #e3e7dd; background: #f7f8f5; }
.node-status--unknown .node-status-dot { background: #a7b0a2; }

/* Additive Device Registry components — legacy node/telemetry selectors unchanged. */
.device-header-actions,.device-actions,.device-detail-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.device-header-actions{justify-content:flex-end}
.device-add-link{min-height:35px;padding:7px 12px;white-space:nowrap}
.device-form-panel,.device-detail-panel{max-width:720px;padding:28px}
.device-form-panel h2{margin-bottom:10px}
.device-helper{margin:12px 0 24px;color:var(--muted);font-size:12px;line-height:1.7}
.device-form .form-field select,.device-form .form-field input[type=text]{
  width:100%;min-height:42px;padding:9px 12px;border:1px solid var(--line);
  border-radius:9px;background:var(--surface);color:var(--ink);
}
.device-form .form-field small{display:block;color:var(--muted);font-size:11px;margin-top:6px}
.device-form .form-field input[type=checkbox]{width:auto;min-height:0;display:inline-block}
.device-form .form-field label[for^="id_capabilities_"]{display:inline-block;margin-left:7px}
.device-form .form-field .errorlist{color:#98584d;font-size:12px}
.device-form .form-field>div[id=id_capabilities] label{display:block;margin:7px 0;font-size:12px}
.device-detail-top{justify-content:space-between;margin-bottom:18px}
.device-detail-panel>p{margin:12px 0;font-size:13px;line-height:1.65}
.node-details .device-inline-link{display:inline-block;margin-top:7px;font-size:11px;color:#4c7654}
.device-inventory{margin:20px 0}
.device-inventory h2{margin-bottom:14px;font-size:18px}
.device-summary-list{list-style:none;margin:0;padding:0}
.device-summary-list li{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;
  padding:13px 0;border-bottom:1px solid var(--line);font-size:12px}
.device-summary-list span{color:var(--muted)}
@media(max-width:640px){.device-form-panel,.device-detail-panel{padding:18px}}

/* One visual shell for CPU, RAM and RX/TX on both device sources/variants.
   Renderers, status hooks and progress colors stay independent. */
.telemetry-widget-card{min-width:0;box-sizing:border-box;padding:12px;border:1px solid #d7e3d5;border-radius:10px;background:#edf5ec;color:#3d6349}
.telemetry-resource-card{min-width:0}
.traffic-panel .telemetry-widget-card{padding:20px}
.host-telemetry--node .telemetry-widget-card{padding:10px}
.cpu-panel .telemetry-resource-card{padding:20px}
.cpu-panel .telemetry-resource-card .cpu-reading strong{font-size:30px}
.cpu-panel .telemetry-resource-card .cpu-track{height:12px}

/* Shared physical RAM values. Only meter color/details differ from CPU. */
.memory-widget{min-width:0}
.memory-widget .cpu-fill{background:#477a9c}
.memory-widget .cpu-track{background:#e4edf1}
.memory-widget .memory-detail{font-size:10px;color:#537264;line-height:1.45;margin-top:5px;overflow-wrap:anywhere}
.memory-widget .memory-available{color:#6c826f}
.memory-widget[data-memory-state="unavailable"] .cpu-reading{color:#879687}
.node-row .memory-device-placeholder{order:5;flex:1 1 100%;min-width:0;padding:9px 12px 9px 65px;font-size:11px;display:flex;gap:12px;flex-wrap:wrap;color:#789078}
.node-row .memory-device-placeholder strong{color:#475f50;font-weight:650}
@media(max-width:700px){.node-row .memory-device-placeholder{padding-left:0}.host-resource-grid{grid-template-columns:minmax(0,1fr)}}


/* Stable value geometry shared by Mini PC and Raspberry Pi telemetry.
   The CARD, rather than the viewport, controls the compact layout.
   Reserve a fixed right-hand track to prevent changing numbers/units from
   triggering flex-wrap and moving the value between rows on each poll. */
.telemetry-widget-card {
  container-type: inline-size;
}
.telemetry-widget-card .cpu-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(58px, 26cqi, 104px);
  align-items: baseline;
  column-gap: 8px;
  row-gap: 0;
}
.telemetry-widget-card .cpu-heading > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.telemetry-widget-card .cpu-heading .cpu-reading {
  min-width: 0;
  width: 100%;
  justify-content: flex-end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.telemetry-widget-card .cpu-heading .cpu-reading strong {
  font-size: clamp(14px, 8cqi, 23px);
  letter-spacing: -.02em;
}
.host-telemetry--detail .telemetry-widget-card .cpu-heading .cpu-reading strong,
.cpu-panel .telemetry-resource-card .cpu-heading .cpu-reading strong {
  font-size: clamp(16px, 9cqi, 30px);
}
.telemetry-widget-card .traffic-widget-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 8px;
  row-gap: 5px;
}
.telemetry-widget-card .traffic-widget-head > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.telemetry-widget-card .traffic-activity {
  min-width: 0;
  white-space: nowrap;
}
.telemetry-widget-card .traffic-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(95px, 42cqi, 180px);
  align-items: baseline;
  column-gap: 8px;
  row-gap: 0;
}
.telemetry-widget-card .traffic-line > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.telemetry-widget-card .traffic-line strong {
  min-width: 0;
  max-width: 100%;
  justify-self: end;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: clamp(11px, 4.5cqi, 16px);
  letter-spacing: -.01em;
}
/* Compact is selected by actual card width, never by the changing reading.
   Both labels and numbers keep fixed positions through 0, kbit, Mbit etc. */
@container (max-width: 290px) {
  .telemetry-widget-card .traffic-widget-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .telemetry-widget-card .traffic-activity {
    justify-self: start;
  }
}
@container (max-width: 235px) {
  .telemetry-widget-card .traffic-line {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1px;
  }
  .telemetry-widget-card .traffic-line strong {
    justify-self: end;
  }
}


/* Raspberry Pi CPU/RAM: explicit intrinsic width for the parent of size-
   contained telemetry cards. Without this, a flex item around cards with
   container-type:inline-size can collapse to the cards' zero intrinsic
   contribution, leaving two vertical text strips and a tall empty panel.
   Layout depends only on the panel width, NEVER on live number length. */
.cpu-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  align-items: center;
}
.cpu-panel > .cpu-panel-intro {
  min-width: 0;
}
.cpu-panel > .host-resource-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  align-items: stretch;
}
.cpu-panel > .host-resource-grid > .telemetry-widget-card {
  width: 100%;
  min-width: 0;
}

/* Sidebar remains scrollable; installer categories are rendered inside their page. */
.main-navigation { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.sidebar-bottom { flex-shrink: 0; }
.installer-empty { max-width: 900px; padding: 28px; }
.installer-empty h2 { margin: 6px 0 8px; font-size: 20px; }
.installer-empty h3 { margin: 20px 0 8px; font-size: 16px; }
.installer-empty p { color: var(--muted); font-size: 13px; line-height: 1.7; }

/* Node-agent inventory is a historical receipt, intentionally separate from ICMP. */
.device-agent-summary { display:flex; flex-wrap:wrap; align-items:center; gap:5px 11px; min-width:0; width:100%; margin-top:9px; padding:9px 12px; border:1px solid #dfe6dc; border-radius:10px; background:#f8faf7; color:#556456; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.device-agent-summary strong { color:#324a37; font-size:12px; }
.device-agent-summary .agent-state { border-radius:20px; padding:2px 8px; background:#eaece7; color:#5a6659; }
.device-agent-summary small { flex-basis:100%; color:var(--muted); font-size:10px; }
