:root { color-scheme: light; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; color: #1d2630; background: #f4f7f9; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { min-height: 38px; padding: 0 14px; border: 1px solid #08756e; border-radius: 5px; color: #fff; background: #08756e; cursor: pointer; }
button:hover { background: #075e59; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #f0b64a; outline-offset: 2px; }
button.secondary { color: #21313d; background: #fff; border-color: #b9c5cc; }
button.secondary:hover { background: #edf2f4; }
button.danger { color: #a52a2a; background: #fff; border-color: #d8a2a2; }
button.danger:hover { background: #fff2f2; }
.shell { min-height: 100vh; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #e8f1ef; }
.login-form { width: min(100%, 370px); padding: 32px; border: 1px solid #cbd7d6; border-radius: 7px; background: #fff; box-shadow: 0 12px 28px rgba(31, 51, 61, .10); }
.login-form h1, .topbar h1, .panel-heading h2, .config-heading h2, .dialog-heading h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 0; }
.eyebrow { margin: 0 0 5px; color: #39706c; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
label { display: grid; gap: 7px; margin-top: 20px; color: #435360; font-size: 14px; font-weight: 600; }
input, select { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #aebcc4; border-radius: 4px; color: #1d2630; background: #fff; }
.login-form button[type="submit"] { width: 100%; margin-top: 24px; }
.error { min-height: 19px; margin: 12px 0 0; color: #ad3030; font-size: 13px; }
.app-view { min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 82px; padding: 16px max(24px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid #ccd7da; background: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.network { color: #50707c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 24px; width: min(1440px, 100%); margin: 0 auto; padding: 28px 24px; }
.device-panel, .config-panel { border: 1px solid #cbd7dc; border-radius: 7px; background: #fff; }
.panel-heading, .config-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 77px; padding: 18px 20px; border-bottom: 1px solid #dce5e8; }
.panel-heading h2, .config-heading h2 { font-size: 17px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 14px 20px; border-bottom: 1px solid #e2e9eb; text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: #667780; font-size: 12px; font-weight: 700; }
tbody tr:hover { background: #f7fbfa; }
.monospace { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: #667780; font-size: 13px; }
.status { display: inline-block; min-width: 54px; padding: 4px 8px; border-radius: 4px; text-align: center; font-size: 12px; font-weight: 700; }
.status.active { color: #086b45; background: #e4f4eb; }.status.disabled { color: #7a5c23; background: #fff3d9; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }.row-actions button { min-height: 32px; padding: 0 9px; font-size: 12px; }
.empty-state { margin: 0; padding: 34px 20px; color: #687881; text-align: center; }
.config-panel { align-self: start; position: sticky; top: 22px; overflow: hidden; }
.config-placeholder { display: grid; min-height: 410px; place-items: center; padding: 30px; color: #697982; text-align: center; font-size: 14px; }
#config-content { padding: 22px; }.qr-code { display: block; width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto 18px; image-rendering: pixelated; }
.device-status { margin: 0 0 12px; color: #576872; font-size: 13px; }.device-status:not(:empty) { min-height: 18px; }
textarea { width: 100%; min-height: 185px; resize: vertical; padding: 12px; border: 1px solid #b6c3c9; border-radius: 4px; background: #f8fafb; color: #25333b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; }
dialog { width: min(100% - 32px, 430px); padding: 0; border: 1px solid #b7c4c9; border-radius: 7px; box-shadow: 0 20px 60px rgba(20, 40, 52, .26); }dialog::backdrop { background: rgba(20, 35, 43, .42); }dialog form { padding: 22px; }.dialog-heading { display: flex; align-items: center; justify-content: space-between; }.icon-button { width: 34px; min-height: 34px; padding: 0; color: #41515b; background: #fff; border-color: #b7c4c9; font-size: 19px; line-height: 1; }.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 1020px) { .workspace { grid-template-columns: 1fr; }.config-panel { position: static; }.config-placeholder { min-height: 190px; } }
@media (max-width: 620px) { .topbar { align-items: flex-start; padding: 16px; }.topbar-actions { flex-direction: column; align-items: flex-end; gap: 8px; }.workspace { padding: 16px; }.panel-heading, .config-heading { padding: 16px; } th, td { padding: 12px 14px; }.row-actions { min-width: 185px; } }
