:root {
  color-scheme: dark;
  --bg: #0b1118;
  --panel: #111a23;
  --panel-raised: #151f2a;
  --line: #263541;
  --muted: #8999a7;
  --text: #edf3f5;
  --mint: #77e0c1;
  --orange: #ffb36b;
  --danger: #ff8f83;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
.page-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1b2934; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #315446; border-radius: 10px; color: var(--mint); background: #10251f; }
.brand-mark svg { width: 21px; height: 21px; }
.brand strong { display: block; font-size: 13px; letter-spacing: .16em; }
.brand strong span { color: var(--mint); }
.brand small { display: block; margin-top: 3px; color: #84939e; font-size: 9px; letter-spacing: .18em; }
.topbar-meta { display: flex; align-items: center; gap: 9px; color: #96a6b1; font-size: 11px; letter-spacing: .02em; }
.secure-dot, .log-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px #77e0c166; }
.topbar-divider { width: 1px; height: 14px; margin: 0 5px; background: #31414d; }
.protocol-label { color: #6e7e89; }
.user-menu { display: flex; align-items: center; gap: 10px; margin-left: 8px; padding-left: 14px; border-left: 1px solid #31414d; color: #d5e3e2; }
main { padding: 47px 0 30px; }
.hero { min-height: 198px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; padding: 10px 0 18px; }
.eyebrow, .side-overline { color: var(--mint); font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; }
.eyebrow-line { width: 22px; height: 1px; background: var(--mint); }
h1 { margin: 0; font-size: clamp(34px, 4.4vw, 49px); line-height: 1.15; letter-spacing: -.055em; font-weight: 650; }
h1 span { color: #8ddfc7; }
.hero-description { max-width: 510px; margin: 14px 0 0; color: #91a0ab; font-size: 13px; line-height: 1.8; }
.hero-visual { position: relative; width: 300px; height: 205px; flex: 0 0 300px; margin-right: 38px; }
.orbit { position: absolute; border: 1px solid #2c4147; border-radius: 50%; transform: rotate(-20deg); }
.orbit-one { width: 267px; height: 124px; top: 42px; left: 15px; }
.orbit-two { width: 213px; height: 172px; top: 19px; left: 42px; transform: rotate(38deg); border-color: #20383a; }
.chip-glow { position: absolute; width: 110px; height: 110px; left: 97px; top: 45px; border-radius: 50%; background: #39bc9a22; filter: blur(20px); }
.chip { position: absolute; z-index: 1; width: 112px; height: 112px; top: 47px; left: 96px; padding: 11px; border: 1px solid #50776c; border-radius: 13px; background: linear-gradient(145deg, #1e302f, #111c23 70%); box-shadow: inset 0 0 22px #6fd4b20b, 0 20px 45px #0007; }
.chip-top, .chip-bottom { display: flex; justify-content: space-between; color: #7b938e; font-size: 8px; letter-spacing: .11em; }
.chip-led { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.chip-label { margin: 8px 0 7px; font-size: 13px; line-height: 1.05; letter-spacing: .04em; }
.chip-label b { color: var(--mint); font-size: 21px; }
.chip-bottom { font-size: 6px; letter-spacing: .1em; }
.pin { position: absolute; width: 6px; height: 13px; background: #55746e; }
.pin-left { left: -7px; border-radius: 3px 0 0 3px; }.pin-right { right: -7px; border-radius: 0 3px 3px 0; }
.pin-1 { top: 16px; }.pin-2 { top: 38px; }.pin-3 { top: 61px; }.pin-4 { top: 83px; }
.visual-caption { position: absolute; right: 4px; bottom: 14px; color: #657b79; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(265px, .85fr); gap: 18px; align-items: start; }
.main-column, .side-column { display: grid; gap: 15px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(150deg, #131e28, #101820); box-shadow: 0 14px 30px #00000012; }
.auth-panel { max-width: 650px; margin: 0 auto 24px; padding: 22px; }
.admin-panel { padding: 21px 22px; }
.form-stack { display: grid; gap: 12px; margin-top: 17px; }
.field-label { display: grid; gap: 7px; color: #a9b8bf; font-size: 10px; }
.field-label input, .field-label select { width: 100%; min-height: 39px; padding: 0 11px; border: 1px solid #344650; border-radius: 8px; outline: 0; color: var(--text); background: #0d161d; font-size: 11px; }
.field-label input:focus, .field-label select:focus { border-color: #5b9d89; box-shadow: 0 0 0 2px #77e0c122; }
.field-label input[type="file"] { padding: 7px; }
.form-stack > .button { justify-self: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 12px; }
.form-row > .button { min-height: 39px; }
.form-hint, .form-message { margin: 0; color: #7f919a; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.form-message:not(:empty) { margin-top: 3px; }
.admin-form { padding-top: 16px; border-top: 1px solid #263640; }
.admin-form h3, .users-list h3 { margin: 0; color: #dce7e8; font-size: 12px; font-weight: 600; }
.key-result { display: grid; gap: 10px; margin-top: 14px; padding: 13px; border: 1px solid #69563b; border-radius: 9px; background: #292319; }
.key-result strong { color: #f0c58d; font-size: 10px; }
.key-result code { overflow-wrap: anywhere; color: #f1e2bf; font-size: 11px; user-select: all; }
.key-result .button { justify-self: start; }
.users-list { display: grid; gap: 8px; margin-top: 15px; }
.users-list h3 { margin-bottom: 3px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #263640; border-radius: 8px; background: #0e171f; }
.user-row-info { display: grid; flex: 1; gap: 4px; min-width: 0; }
.user-row-info strong { overflow: hidden; color: #d8e2e5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.user-row-info small { color: #7d8d97; font-size: 9px; }
.danger-text, .danger-text:hover { color: var(--danger); }
.release-picker-label { margin-top: 17px; }
.firmware-empty { margin: 12px 0 0; color: #83939b; font-size: 10px; }
.device-panel, .firmware-panel, .log-panel { padding: 21px 22px; }
.panel-heading { display: flex; align-items: center; gap: 12px; }
.step-number { width: 32px; height: 32px; display: grid; flex: 0 0 32px; place-items: center; border: 1px solid #3d574f; border-radius: 9px; color: var(--mint); background: #182a29; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.heading-copy { min-width: 0; flex: 1; }
.heading-copy h2, .log-heading h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.heading-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
code { color: #a9d8cb; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #31414c; border-radius: 99px; color: #a5b2ba; font-size: 10px; white-space: nowrap; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #6f7f89; }
.status-pill.is-connected { border-color: #3b695d; color: var(--mint); background: #152823; }
.status-pill.is-connected i { background: var(--mint); box-shadow: 0 0 8px #77e0c188; }
.status-pill.is-error { border-color: #694541; color: var(--danger); }.status-pill.is-error i { background: var(--danger); }
.device-row { display: flex; align-items: center; gap: 12px; margin-top: 19px; padding: 13px; border: 1px solid #23323d; border-radius: 11px; background: #0e171f; }
.device-avatar { width: 39px; height: 39px; display: grid; flex: 0 0 39px; place-items: center; border: 1px solid #2a4747; border-radius: 10px; color: #81cdb8; background: #142624; }
.device-avatar svg { width: 21px; height: 21px; }
.device-copy { min-width: 0; flex: 1; }
.device-copy strong, .device-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-copy strong { font-size: 12px; font-weight: 550; }
.device-copy span { margin-top: 5px; color: #72838f; font-size: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 11px; font-weight: 650; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }.button:focus-visible, .text-button:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-secondary { border-color: #344b56; color: #dce7e9; background: #1a2832; }.button-secondary:hover:not(:disabled) { border-color: #52766f; background: #20352f; }
.button-icon { color: var(--mint); font-size: 15px; line-height: 1; }
.panel-footnote { display: flex; align-items: center; gap: 7px; margin: 12px 0 0 2px; color: #788994; font-size: 10px; }
.info-icon { width: 13px; height: 13px; display: grid; place-items: center; border: 1px solid #60727c; border-radius: 50%; font: 9px Georgia, serif; }
.file-type { padding: 5px 7px; border: 1px solid #493d31; border-radius: 6px; color: var(--orange); background: #2a211a; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.firmware-info { display: flex; align-items: center; gap: 10px; margin-top: 13px; padding: 10px 12px; border: 1px solid #3a4c50; border-radius: 10px; background: #13211f; }
.file-icon { display: grid; width: 34px; height: 37px; flex: 0 0 34px; place-items: center; border: 1px solid #775739; border-radius: 6px; color: var(--orange); background: #33271d; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.file-details { min-width: 0; flex: 1; }.file-details strong, .file-details span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.file-details strong { font-size: 11px; font-weight: 550; }.file-details span { margin-top: 4px; color: #92a39f; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.confirm-line { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; color: #a8b4bb; font-size: 10px; line-height: 1.55; cursor: pointer; }
.confirm-line input { position: absolute; width: 1px; height: 1px; opacity: 0; }.checkmark { position: relative; width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; border: 1px solid #52616a; border-radius: 4px; background: #0d151c; }
.confirm-line input:checked + .checkmark { border-color: #5cc6a7; background: #246650; }.confirm-line input:checked + .checkmark::after { position: absolute; top: 1px; left: 4px; width: 4px; height: 8px; border: solid #effff9; border-width: 0 1.5px 1.5px 0; content: ""; transform: rotate(45deg); }
.confirm-line input:focus-visible + .checkmark { outline: 2px solid var(--mint); outline-offset: 2px; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #24333d; }
.integrity-note { display: flex; align-items: center; gap: 8px; color: #80919b; font-size: 9px; line-height: 1.5; }.integrity-note b { color: #c7d3d6; font-weight: 550; }
.integrity-icon { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #36584e; border-radius: 50%; color: var(--mint); font-size: 12px; }
.button-primary { min-width: 137px; min-height: 42px; justify-content: space-between; padding: 0 13px 0 16px; color: #092018; background: var(--mint); }.button-primary:hover:not(:disabled) { background: #91efd2; }.button-primary:disabled { color: #8e9c99; background: #384944; }
.button-arrow { font-size: 16px; }
.progress-wrap { margin-top: 18px; padding-top: 15px; border-top: 1px solid #24333d; }
.progress-caption, .progress-subline { display: flex; justify-content: space-between; gap: 12px; }.progress-caption { color: #bdcbd0; font-size: 10px; }.progress-caption strong { color: var(--mint); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.progress-track { height: 6px; overflow: hidden; margin-top: 9px; border-radius: 6px; background: #25333d; }.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4db995, #a2efd2); box-shadow: 0 0 12px #69d9b666; transition: width .2s ease; }
.progress-subline { margin-top: 7px; color: #71818b; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.log-panel { padding: 17px 19px; }.log-heading, .log-heading > div { display: flex; align-items: center; }.log-heading { justify-content: space-between; }.log-heading > div { gap: 8px; }.log-heading h2 { font-size: 12px; }.log-live-dot { width: 6px; height: 6px; opacity: .45; }.log-live-dot.is-active { opacity: 1; animation: pulse 1.4s infinite; }
.text-button { padding: 4px 0 4px 8px; border: 0; color: #7d8d97; background: transparent; cursor: pointer; font-size: 10px; }.text-button:hover { color: var(--text); }
.log-output { display: flex; flex-direction: column; gap: 6px; max-height: 155px; overflow: auto; margin-top: 12px; padding: 11px 12px; border: 1px solid #202f39; border-radius: 8px; background: #0c141b; scrollbar-color: #34434c transparent; }
.log-line { display: grid; grid-template-columns: 49px 9px minmax(0, 1fr); align-items: start; gap: 7px; color: #a4b3ba; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }.log-time { color: #61727d; }.log-level { color: var(--mint); }.log-line.is-warn .log-level { color: var(--orange); }.log-line.is-error .log-level { color: var(--danger); }.log-placeholder { margin: 0; color: #657680; font-size: 10px; }
.side-column { gap: 14px; }.process-panel { padding: 20px 18px 17px; }.side-heading { display: flex; align-items: center; justify-content: space-between; }.side-overline { color: #91b9aa; font-size: 9px; }.flow-count { color: #687b85; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.flow-list { margin-top: 18px; }.flow-item { display: flex; align-items: center; gap: 11px; }.flow-icon { width: 27px; height: 27px; display: grid; flex: 0 0 27px; place-items: center; border: 1px solid #34444e; border-radius: 8px; color: #8798a1; background: #151f27; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }.flow-icon-done { border-color: #3b665a; color: var(--mint); background: #172a26; font-size: 12px; }.flow-item strong, .flow-item small { display: block; }.flow-item strong { font-size: 10px; font-weight: 550; }.flow-item small { margin-top: 4px; color: #758690; font-size: 9px; }.flow-connector { width: 1px; height: 15px; margin: 3px 0 3px 13px; background: #33434c; }
.capacity-box { margin-top: 20px; padding: 12px; border: 1px solid #293943; border-radius: 9px; background: #0e171f; }.capacity-heading { display: flex; justify-content: space-between; color: #8898a1; font-size: 9px; }.capacity-heading span:last-child { color: #5f8276; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }.capacity-values { display: flex; align-items: center; margin-top: 11px; }.capacity-values > div:not(.capacity-divider) { flex: 1; }.capacity-values b { color: #e5efed; font: 19px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.06em; }.capacity-values b span { margin-left: 2px; color: #91a39f; font-size: 10px; letter-spacing: 0; }.capacity-values small { display: block; margin-top: 4px; color: #71828b; font-size: 8px; }.capacity-divider { width: 1px; height: 34px; margin: 0 11px; background: #30414a; }
.tip-card { display: flex; gap: 10px; padding: 14px; border: 1px solid #51412e; border-radius: 12px; background: linear-gradient(135deg, #29231b, #1c1b18); }.tip-symbol { width: 20px; height: 20px; display: grid; flex: 0 0 20px; place-items: center; border: 1px solid #a8743c; border-radius: 50%; color: var(--orange); font: 11px Georgia, serif; }.tip-card strong { color: #f0c18e; font-size: 10px; font-weight: 600; }.tip-card p { margin: 6px 0 0; color: #a99c8d; font-size: 9px; line-height: 1.7; }
.local-note { display: flex; align-items: center; gap: 9px; padding: 1px 4px; color: #75858e; font-size: 9px; line-height: 1.6; }.local-note b { color: #a9b8ba; font-weight: 550; }.lock-icon { color: #7fc5ad; font-size: 15px; }
.notice { margin: -9px 0 18px; padding: 11px 14px; border: 1px solid #66503a; border-radius: 9px; color: #e5bf91; background: #2a2119; font-size: 11px; line-height: 1.5; }.notice.is-error { border-color: #674543; color: #ffc0b8; background: #2a1e1e; }
.footer { display: flex; justify-content: space-between; padding: 20px 0 28px; border-top: 1px solid #1b2934; color: #566771; font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.hidden { display: none !important; }.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px #77e0c11c, 0 0 12px #77e0c166; } }
@media (max-width: 760px) {
  .page-shell { width: min(100% - 30px, 560px); }.topbar { height: 67px; }.topbar-meta { font-size: 9px; }.protocol-label, .topbar-divider { display: none; }
  main { padding-top: 29px; }.hero { min-height: auto; margin-bottom: 22px; }.hero-copy { padding: 8px 0 12px; }.eyebrow { margin-bottom: 12px; }.hero-description { max-width: 430px; font-size: 11px; }
  .hero-visual { width: 152px; height: 146px; flex-basis: 152px; margin: 0 -14px 0 -10px; transform: scale(.68); transform-origin: center; }.hero-visual .visual-caption { display: none; }
  .workspace-grid { grid-template-columns: 1fr; gap: 14px; }.side-column { grid-template-columns: 1fr 1fr; align-items: stretch; }.process-panel { grid-row: span 2; }.tip-card { align-self: start; }.local-note { align-self: end; }
  .device-panel, .firmware-panel, .admin-panel, .auth-panel { padding: 17px 15px; }.panel-heading { gap: 9px; }.heading-copy h2 { font-size: 14px; }.heading-copy p { font-size: 9px; }.status-pill { padding: 5px 7px; font-size: 9px; }.button-secondary { padding: 0 10px; font-size: 10px; }.device-row { gap: 9px; padding: 10px; }.device-copy strong { font-size: 10px; }.device-copy span { font-size: 8px; }
}
@media (max-width: 460px) {
  .page-shell { width: calc(100% - 24px); }.brand-mark { width: 32px; height: 32px; }.topbar-meta { gap: 6px; font-size: 8px; }.hero-visual { display: none; }.hero { min-height: 0; }
  h1 { font-size: 36px; }.hero-description { max-width: none; }.device-row { flex-wrap: wrap; }.device-copy { min-width: calc(100% - 62px); }.device-row .button { width: 100%; }.panel-footnote { align-items: flex-start; font-size: 9px; }
  .side-column { grid-template-columns: 1fr; }.process-panel { grid-row: auto; }.tip-card { order: 2; }.local-note { order: 3; }.capacity-values b { font-size: 17px; }
  .form-row { grid-template-columns: 1fr; }.user-menu { gap: 6px; margin-left: 1px; padding-left: 8px; }.user-menu #user-label { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .footer { gap: 12px; font-size: 7px; }.footer span:last-child { text-align: right; }
}
