:root { color-scheme: light; font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; color: #202621; background: #f5f7f6; font-synthesis: none; --muted: #59685e; --line: #e3e8e4; --green: #16734b; --sidebar: #19201c; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid #268961; }
button svg, .lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; }
a { color: var(--green); text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #abb6ae; padding: 30px 16px 18px; display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; color: #fff; font-size: 18px; font-weight: 650; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; background: #cee9d6; color: #244d35; border-radius: 7px; }
.brand small { display: block; font-size: 10px; color: #84968a; font-weight: 500; margin-top: 4px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 43px; border: 0; border-radius: 6px; background: transparent; color: #aeb9b1; padding: 11px 14px; text-align: left; font-size: 13px; }
.nav-button:hover { color: #fff; background: #242f28; }
.nav-button.active { background: #303d34; color: #e6f7eb; }
.nav-button.active svg { color: #9bd7b0; }
.sidebar-bottom { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid #354038; font-size: 11px; line-height: 1.8; color: #87988c; }
.workspace { padding: 0 34px 32px; min-width: 0; }
.topbar { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.breadcrumb { color: #8a948d; font-size: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.breadcrumb strong { color: #4d5a51; font-weight: 500; }
.account { display: flex; align-items: center; gap: 9px; color: #4c5a50; font-size: 12px; }
.account .avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #e2e8e3; font-weight: 600; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 31px 0 24px; }
h1 { margin: 5px 0 0; font-size: 26px; line-height: 1.35; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; margin: 0; }
h3 { font-size: 13px; margin: 0; font-weight: 600; }
p { line-height: 1.65; }
.eyebrow { font-size: 10px; font-weight: 650; color: #829087; text-transform: uppercase; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dbe2dc; border-radius: 5px; background: #fff; padding: 9px 13px; min-height: 36px; font-size: 12px; font-weight: 550; line-height: 1.35; transition: background .15s, border-color .15s; }
.button:hover, .icon-button:hover { background: #f1f5f2; border-color: #bdcbbf; }
.button.primary { background: var(--green); border-color: var(--green); color: #fff; }
.button.primary:hover { background: #115e3c; border-color: #115e3c; }
.button.danger { color: #b13d39; border-color: #e9ccc9; background: #fff; }
.button.danger:hover { background: #fff2f0; border-color: #dcb6b1; }
.icon-button { width: 34px; min-height: 34px; height: 34px; padding: 7px; flex-shrink: 0; }
.icon-button svg { width: 16px; height: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 27px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.stat { padding: 18px 21px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.stat-label svg { width: 14px; height: 14px; }
.stat-value { font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-value small { font-size: 11px; font-weight: 400; margin-left: 7px; color: var(--muted); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 25px; align-items: start; }
.service-area { min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.search { position: relative; display: flex; align-items: center; gap: 8px; min-width: 140px; max-width: 260px; flex: 1; color: #89958c; }
.search > svg { position: absolute; left: 10px; width: 15px; height: 15px; pointer-events: none; }
.search input { width: 100%; min-height: 35px; padding: 8px 10px 8px 32px; border: 1px solid #dfe5e0; border-radius: 5px; background: #fff; font-size: 12px; }
.filters { display: flex; gap: 2px; flex-wrap: wrap; }
.filters button { min-height: 31px; border: 0; border-radius: 4px; padding: 7px 10px; font-size: 11px; color: #77847b; background: transparent; }
.filters button:hover { background: #edf1ee; color: #2e4235; }
.filters button.active { color: #2a5038; background: #e1eae3; font-weight: 600; }
.table-wrapper, .table-wrap, .table-scroll { max-width: 100%; overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.service-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.service-table th { padding: 12px 15px; background: #fafbfa; color: #829087; font-size: 10px; font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--line); }
.service-table td { padding: 17px 15px; border-bottom: 1px solid #edf0ed; vertical-align: middle; }
.service-table tbody tr:last-child td { border-bottom: 0; }
.service-table tbody tr { cursor: pointer; }
.service-table tbody tr:hover { background: #f7faf8; }
.service-table tbody tr.selected { background: #f0f7f2; }
.service-table tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 #278154; }
.service-name { display: block; color: #263a2d; font-weight: 600; overflow-wrap: anywhere; }
button.service-name { border: 0; background: transparent; padding: 0; text-align: left; font-size: inherit; }
.device-name { display: block; color: #69786f; font-size: 11px; margin-top: 5px; line-height: 1.4; overflow-wrap: anywhere; }
.service-table code { font-size: 10px; color: #63746a; white-space: nowrap; }
.status { display: inline-flex; gap: 5px; align-items: center; font-size: 10px; white-space: nowrap; line-height: 1; padding: 6px 7px; border-radius: 4px; background: #edf0ee; color: #778379; }
.status svg { width: 13px; height: 13px; }
.status.running { color: #207449; background: #e4f2e8; }
.status.stopped { color: #7a837c; background: #edf0ee; }
.status.starting, .status.stopping { color: #936d22; background: #faf0d9; }
.status.offline { color: #737c83; background: #eceff1; }
.status.error { color: #ae4b44; background: #fcece9; }
.detail-panel { min-width: 0; border-left: 1px solid var(--line); padding-left: 25px; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.detail-header h2 { overflow-wrap: anywhere; line-height: 1.5; }
.detail-header .eyebrow { margin-bottom: 6px; }
.detail-body { padding-top: 16px; }
.detail-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 11px; line-height: 1.6; }
.detail-row > :first-child { flex-shrink: 0; color: #819087; }
.detail-row > :last-child { color: #3f5547; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.detail-row code { font-size: 11px; }
.session-box { margin: 17px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; }
.session-countdown { margin: 16px 0 9px; color: #176b48; font-variant-numeric: tabular-nums; font-size: 30px; line-height: 1.2; font-weight: 550; }
.session-countdown.expiring { color: #a56614; }
.session-box strong { font-size: 11px; font-weight: 550; font-variant-numeric: tabular-nums; }
.session-box p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.session-box progress { width: 100%; height: 4px; margin: 12px 0 0; accent-color: var(--green); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.detail-actions .button { flex: 1; min-width: 110px; }
.detail-actions .field { width: 100%; }
.field { display: grid; gap: 6px; margin-top: 12px; font-size: 11px; color: #63756a; }
.field select, .field input { width: 100%; padding: 9px 10px; border: 1px solid #dbe2dc; border-radius: 5px; background: #fff; color: #34493b; font-size: 12px; }
.activity { margin-top: 31px; border-top: 1px solid var(--line); padding-top: 20px; }
.activity > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.activity h2 { margin-bottom: 15px; }
.activity > header h2 { margin: 0; }
.event { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #e9edea; }
.event:last-child { border-bottom: 0; }
.event-icon { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border-radius: 5px; background: #e7eee9; color: #6d8474; }
.event-icon svg { width: 13px; height: 13px; }
.event-icon.error { background: #fbece9; color: #b6584e; }
.event-body { min-width: 0; flex: 1; color: #405348; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.event-body p { margin: 3px 0 0; font-size: 10px; color: #8a978e; }
.event-time { flex-shrink: 0; font-size: 10px; color: #95a197; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 2px; }
.empty-state { padding: 47px 22px; text-align: center; color: #8a968e; font-size: 12px; line-height: 1.8; }
.empty-state > svg { width: 28px; height: 28px; margin-bottom: 10px; }
.empty-state h2 { color: #415447; margin-bottom: 7px; }
.empty-state .button { margin-top: 14px; }
.notice { padding: 11px 13px; margin: 14px 0; font-size: 11px; line-height: 1.7; color: #8a6d32; background: #faf2df; border-radius: 5px; overflow-wrap: anywhere; }
.notice.error { color: #a5423b; background: #fff0ed; }
.demo-badge { display: inline-flex; align-items: center; gap: 5px; color: #a27929; background: #fff1d2; border: 1px solid #eedbb1; padding: 4px 7px; border-radius: 4px; font-size: 10px; white-space: nowrap; }
.connection-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 16px 0 0; padding: 11px 13px; border: 1px solid #efd2c9; background: #fff4ee; color: #a25842; border-radius: 5px; font-size: 12px; line-height: 1.6; }
.connection-banner .button { margin-left: auto; }
.modal { width: 470px; max-width: 90vw; max-height: 90vh; padding: 0; border: 1px solid #dce4de; border-radius: 8px; color: #293b2f; box-shadow: 0 24px 80px #1227192b; }
.modal::backdrop { background: #13251ac2; backdrop-filter: blur(2px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 16px; }
.modal-header .icon-button { border-color: transparent; background: transparent; }
.modal-body { padding: 22px; overflow-wrap: anywhere; }
.modal-body > p:first-child { margin-top: 0; }
.modal-body p { font-size: 12px; color: #75877b; }
.modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fafbfa; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 14px; }
.form-field { min-width: 0; display: grid; gap: 7px; font-size: 12px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #526859; font-size: 11px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-width: 0; min-height: 37px; padding: 9px 10px; border: 1px solid #dbe3dd; border-radius: 5px; background: #fff; color: #2b4133; font-size: 12px; }
.form-field textarea { resize: vertical; min-height: 75px; line-height: 1.6; }
.form-field small { font-size: 10px; color: #87968b; line-height: 1.5; }
.form-field input:disabled, .form-field select:disabled { background: #f0f3f1; color: #86938a; }
.toast-stack { position: fixed; bottom: 23px; right: 25px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); z-index: 100; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 13px 16px; border: 1px solid #cadfd0; border-radius: 6px; box-shadow: 0 5px 22px #28362b16; background: #f1fbf4; color: #2b6b41; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.toast.error { color: #a7443b; background: #fff5f2; border-color: #eccfc8; }
.toast svg { margin-top: 1px; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.countdown { font-variant-numeric: tabular-nums; white-space: nowrap; }
.loading { color: #7e8e82; }
.sidebar-label { margin: -3px 12px -24px; color: #8d9b92; font-size: 11px; }
.sidebar-bottom { display: flex; gap: 10px; align-items: center; }
.sidebar-bottom small { display: block; color: #86998c; font-size: 10px; }
.sync-time { color: #68786e; font-size: 11px; font-variant-numeric: tabular-nums; }
.account { min-width: 0; }
#account-name { max-width: 180px; overflow-wrap: anywhere; }
.green { color: var(--green); }
.toolbar > select { min-height: 35px; border: 1px solid #dfe5e0; border-radius: 5px; background: #fff; padding: 7px 27px 7px 10px; color: #53665b; font-size: 12px; }
.service-table { table-layout: fixed; min-width: 480px; }
.service-table th:first-child { width: 42%; }
.service-table th:nth-child(2) { width: 17%; }
.service-table th:nth-child(3) { width: 21%; }
.service-table th:last-child { width: 100px; }
.service-select { display: flex; align-items: center; gap: 11px; padding: 0; max-width: 100%; width: 100%; border: 0; background: transparent; text-align: left; line-height: 1.5; }
.service-select > span:last-child { min-width: 0; }
.service-symbol, .detail-symbol { display: grid; place-items: center; flex-shrink: 0; width: 33px; height: 33px; border-radius: 5px; color: #537181; background: #edf2f5; }
.service-symbol .lucide { width: 17px; height: 17px; }
.port-value { font-family: Consolas, monospace; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.table-footer { display: flex; justify-content: space-between; padding: 12px 0; color: #748179; font-size: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 11px; }
.section-heading h2 { margin: 0; }
.text-button { display: inline-flex; align-items: center; gap: 4px; padding: 5px 0; border: 0; background: transparent; color: #4e7560; font-size: 11px; }
.text-button .lucide { width: 14px; height: 14px; }
.detail-header { font-size: 12px; color: #738077; }
.detail-identity { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.detail-identity > div { min-width: 0; }
.detail-identity h2 { line-height: 1.5; overflow-wrap: anywhere; }
.detail-identity p { margin: 4px 0 0; color: #728078; font-size: 11px; overflow-wrap: anywhere; }
.detail-symbol { width: 40px; height: 40px; }
.detail-fields { margin: 18px 0; }
.detail-fields dd { margin: 0; }
.session-title { display: flex; align-items: center; gap: 7px; color: #6d7d73; }
.session-title .lucide { width: 14px; height: 14px; }
.session-box .no-session { margin: 16px 0 5px; color: #829087; font-size: 12px; }
.detail-updated { margin-top: 15px; color: #7c8880; font-size: 10px; }
.event-body strong, .event-body span, .event-body small { display: block; }
.event-body span { margin-top: 2px; color: #677a6d; }
.event-body small { margin-top: 4px; color: #728378; font-size: 10px; }
.all-events { max-width: 980px; }
.all-events .event { padding: 17px 0; }
.modal-service { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; }
.modal-service > .lucide { width: 24px; height: 24px; color: #537181; }
.modal-service strong, .modal-service small { display: block; }
.modal-service small { margin-top: 4px; color: #75827b; font-size: 11px; }
.modal-body > .form-field + .form-field, .modal-body > .form-field + .form-grid { margin-top: 16px; }
.modal-note { display: flex; align-items: center; gap: 6px; margin-top: 17px; color: #7b8173; font-size: 11px; }
.modal-note .lucide { width: 14px; height: 14px; }
.download-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 20px; font-size: 11px; color: #7b867e; }
.download-meta strong { font-weight: 500; color: #52665a; }
.form-error { margin: 0 22px 18px; padding: 10px; color: #a23e36; background: #fff1ee; font-size: 12px; overflow-wrap: anywhere; }
.settings-form { max-width: 760px; }
.settings-form .form-grid { padding: 24px 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); row-gap: 24px; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.auth-gate { width: min(100%, 560px); margin: 0 auto; padding: 70px 24px; text-align: center; overflow-wrap: anywhere; }
.auth-brand { justify-content: center; color: #263a2d; margin-bottom: 72px; }
.auth-gate > .auth-icon { width: 42px; height: 42px; margin-bottom: 20px; color: #537181; }
.auth-gate h1 { font-size: 24px; }
.auth-gate p { font-size: 13px; margin: 14px 0 24px; }
.auth-gate .button { min-height: 40px; }
.toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.credential-value { width: 100%; resize: vertical; border: 1px solid #dbe2dc; padding: 10px; border-radius: 5px; font: 12px/1.7 Consolas, monospace; overflow-wrap: anywhere; }
.inline-error { padding: 10px 0; color: #96382f; font-size: 12px; }
.breadcrumb, .eyebrow, .service-table th, .detail-row > :first-child, .event-time,
.empty-state, .sync-time, .detail-updated, .table-footer, .session-title, .download-meta { color: #59685e; }
.status, .status.stopped { color: #526057; }
.status.offline { color: #53616b; }
.form-field { min-width: 0; }
@media (min-width: 1600px) {
  .workspace { padding-left: 48px; padding-right: 48px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 34px; }
  .detail-panel { padding-left: 34px; }
}
@media (max-width: 1190px) {
  .shell { grid-template-columns: 188px minmax(0, 1fr); }
  .workspace { padding-left: 24px; padding-right: 24px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
  .detail-panel { padding-left: 20px; }
  .service-table th, .service-table td { padding-left: 11px; padding-right: 11px; }
  .brand { font-size: 16px; padding-left: 6px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 1000px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .detail-panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .detail-row { font-size: 12px; }
  .detail-actions .field { width: auto; min-width: 150px; flex: 1; margin-top: 0; }
  .detail-actions { align-items: flex-end; }
  .detail-actions .button { flex: 0 1 auto; }
  .stats { margin-bottom: 24px; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { padding: 14px 18px 0; gap: 15px; }
  .brand { padding: 0; font-size: 16px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand small, .sidebar-bottom { display: none; }
  .sidebar-label { display: none; }
  .sidebar nav { display: flex; gap: 6px; overflow-x: auto; }
  .nav-button { min-height: 37px; width: auto; flex-shrink: 0; padding: 9px 12px; font-size: 11px; border-radius: 5px 5px 0 0; gap: 7px; }
  .nav-button svg { width: 15px; height: 15px; }
  .workspace { padding: 0 18px 25px; }
  .topbar { min-height: 59px; gap: 12px; }
  .breadcrumb { font-size: 10px; gap: 5px; }
  .account { gap: 6px; font-size: 10px; }
  .account .avatar { width: 24px; height: 24px; }
  #account-name { max-width: 75px; }
  .page-head { padding: 23px 0 19px; align-items: flex-start; }
  h1 { font-size: 24px; }
  .page-actions { gap: 6px; max-width: 180px; }
  .sync-time { flex-basis: 100%; text-align: right; font-size: 10px; }
  .page-actions .button { font-size: 11px; padding: 8px 10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 16px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat-value { font-size: 23px; }
  .toolbar { gap: 11px; }
  .search { max-width: none; flex-basis: 100%; }
  .filters { width: 100%; }
  .service-table { min-width: 510px; }
  .service-table td { padding-top: 16px; padding-bottom: 16px; }
  .detail-panel { padding-top: 21px; }
  .event { gap: 8px; }
  .event-time { font-size: 9px; }
  .modal { max-width: calc(100vw - 28px); width: 470px; }
  .modal-header, .modal-body, .modal-footer { padding: 17px; }
  .toast-stack { right: 16px; bottom: 16px; }
}
@media (max-width: 390px) {
  .workspace { padding-left: 14px; padding-right: 14px; }
  .page-head { gap: 10px; }
  h1 { font-size: 22px; }
  .page-actions { max-width: 145px; }
  .page-actions .button { gap: 5px; font-size: 10px; padding: 8px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-field.full { grid-column: auto; }
  .topbar { flex-wrap: wrap; padding: 12px 0; }
  .account { max-width: 100%; flex-wrap: wrap; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .detail-actions .field { flex-basis: 100%; }
  .detail-actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Operations console: variance 3, motion 2, density 7. */
:root { font-family: "Segoe UI", "Microsoft YaHei", sans-serif; color: #20242a; background: #f5f6f8; --muted: #59636e; --line: #dfe3e8; --green: #176b4a; --sidebar: #fcfcfd; }
.shell { grid-template-columns: 208px minmax(0, 1fr); }
.sidebar { color: #535d68; border-right: 1px solid var(--line); padding: 25px 12px 20px; gap: 24px; }
.brand { color: #20242a; font-size: 17px; padding: 0 8px; gap: 9px; }
.brand-mark { background: #176b4a; color: #fff; border-radius: 5px; }
.sidebar-label { color: #606b76; font-size: 11px; padding-left: 12px; margin-top: 24px; }
.nav-button { min-height: 44px; border-radius: 5px; color: #525c67; padding: 11px 12px; font-size: 13px; }
.nav-button:hover { color: #20242a; background: #eef1f4; }
.nav-button.active { color: #14573e; background: #e7f1eb; box-shadow: inset 3px 0 #176b4a; font-weight: 650; }
.nav-button.active svg { color: #176b4a; }
.sidebar-bottom { border-color: var(--line); color: #59636e; font-size: 12px; }
.sidebar-bottom small { color: #65717d; }
.workspace { padding: 0 32px 36px; }
.topbar { min-height: 66px; }
.breadcrumb { font-size: 12px; color: #606b76; }
.breadcrumb strong { color: #343e48; }
.account { font-size: 12px; color: #3f4b57; }
.page-head { align-items: center; padding: 27px 0 23px; }
.eyebrow { display: none; }
h1 { font-size: 25px; margin: 0; font-weight: 650; }
h2 { font-size: 15px; }
.button { min-height: 37px; font-size: 12px; padding: 9px 13px; white-space: nowrap; border-color: #cdd4dc; }
.button:active:not(:disabled), .icon-button:active:not(:disabled) { transform: translateY(1px); }
.icon-button { width: 36px; height: 36px; min-height: 36px; border-color: #d7dde4; }
.stats { margin-bottom: 26px; background: transparent; border-top: 0; border-bottom: 1px solid var(--line); }
.stat { padding: 0 24px 22px; border-right: 0; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { font-size: 12px; color: #59636e; margin-bottom: 10px; }
.stat-value { font: 600 29px/1.1 "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 12px; margin-left: 8px; }
.content-grid { grid-template-columns: minmax(0, 1fr) 318px; gap: 26px; }
.toolbar { min-height: 38px; gap: 14px; }
.search { max-width: 320px; }
.search input, select { min-height: 37px; font-size: 12px; }
.search input::placeholder { color: #65717d; opacity: 1; }
.table-scroll { border: 1px solid var(--line); border-radius: 5px; }
.service-table { font-size: 13px; }
.service-table th { font-size: 11px; color: #59636e; background: #f9fafb; padding: 12px 14px; }
.service-table td { padding: 17px 14px; border-color: #e8ebef; }
.service-select { gap: 11px; }
.service-name { font-size: 13px; color: #252f39; }
.device-name { color: #606e7b; font-size: 11px; margin-top: 5px; }
.service-symbol, .detail-symbol { color: #435d78; background: #edf2f7; border-radius: 5px; }
.port-value { color: #354352; font: 12px/1.6 Consolas, monospace; overflow-wrap: anywhere; }
.service-table tbody tr.selected { background: #eef6f1; }
.status { font-size: 11px; padding: 7px 8px; border-radius: 4px; color: #526057; }
.status.running { color: #14613f; background: #e0f0e5; }
.status.starting, .status.stopping { color: #805711; background: #faf0d9; }
.status.error { color: #9c332c; background: #fcece9; }
.detail-panel { padding-left: 26px; }
.detail-header { min-height: 53px; padding-bottom: 15px; font-size: 13px; color: #3d4854; }
.detail-body { padding-top: 20px; }
.detail-identity { align-items: center; gap: 12px; margin-bottom: 17px; }
.detail-identity h2 { font-size: 17px; line-height: 1.5; }
.detail-identity p { font-size: 12px; color: #606b76; }
.detail-row { font-size: 12px; gap: 12px; padding: 7px 0; }
.detail-row > :first-child { color: #606b76; }
.detail-row > :last-child { color: #344352; }
.session-title { color: #344352; font-size: 12px; }
.session-countdown { font: 600 34px/1.1 Consolas, monospace; margin: 17px 0 12px; }
.session-box strong { font-size: 12px; }
.session-box .no-session { color: #606b76; font-size: 12px; margin: 17px 0 6px; }
.detail-actions { gap: 8px; }
.detail-actions .button { min-width: 112px; padding-left: 10px; padding-right: 10px; }
.detail-updated, .table-footer, .sync-time { color: #63707c; font-size: 11px; }
.activity { margin-top: 28px; padding-top: 21px; }
.section-heading { font-size: 12px; }
.text-button { font-size: 12px; color: #176b4a; }
.event { padding: 14px 0; gap: 11px; }
.event-body { font-size: 12px; color: #384552; }
.event-body span, .event-body small { color: #5e6a76; }
.event-body small, .event-time { font-size: 11px; }
.event-time { color: #606d79; }
.modal { border-radius: 7px; width: 480px; }
.modal-header h2 { font-size: 17px; }
.modal-body { max-height: min(68dvh, 600px); overflow-y: auto; }
.form-field { font-size: 12px; color: #43505d; }
.form-field input, .form-field select { min-height: 40px; color: #26323e; border-color: #cbd3dc; font-size: 13px; }
.modal-note { color: #626b59; line-height: 1.6; }
.form-error { border-radius: 4px; }
.auth-brand { margin-bottom: 56px; }
@media (min-width: 1600px) {
  .workspace { padding-left: 40px; padding-right: 40px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 354px; gap: 32px; }
  .detail-panel { padding-left: 32px; }
}
@media (max-width: 1190px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .workspace { padding-left: 24px; padding-right: 24px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-panel { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
  .detail-body > .status { justify-self: end; align-self: start; }
  .detail-fields { margin: 0; }
  .session-box { border-top: 0; margin: 0; padding-top: 0; }
  .detail-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .detail-actions .button { flex: 0 0 auto; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { padding: 17px 16px 0; gap: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; font-size: 17px; }
  .sidebar-label { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; overflow: visible; }
  .nav-button { justify-content: center; min-height: 41px; font-size: 11px; padding: 8px 4px; border-radius: 4px 4px 0 0; }
  .nav-button svg { display: none; }
  .nav-button.active { box-shadow: inset 0 -3px #176b4a; }
  .workspace { padding: 0 16px 28px; }
  .topbar { min-height: 57px; }
  .account { font-size: 11px; }
  .page-head { padding: 24px 0; }
  h1 { font-size: 23px; }
  .stats { row-gap: 20px; margin-bottom: 22px; }
  .stat { padding: 0 14px 18px; }
  .stat:nth-child(-n+2) { border-bottom: 0; padding-bottom: 0; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat-value { font-size: 27px; }
  .search { max-width: none; flex-basis: 100%; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .service-table { min-width: 0; table-layout: fixed; }
  .service-table th, .service-table td { padding: 12px 6px; }
  #services-view .service-table th:nth-child(2), #services-view .service-table td:nth-child(2) { display: none; }
  #services-view .service-table th:first-child { width: 44%; }
  #services-view .service-table th:nth-child(3) { width: 25%; }
  #services-view .service-table th:last-child { width: 31%; }
  .service-table .row-actions { gap: 4px; }
  .service-table .icon-button { width: 30px; height: 32px; min-height: 32px; padding: 5px; }
  #devices-view .service-table { table-layout: auto; font-size: 11px; }
  #devices-view .service-table th, #devices-view .service-table td { white-space: normal; overflow-wrap: anywhere; }
  .detail-body { display: block; }
  .detail-fields { margin: 19px 0; }
  .session-box { border-top: 1px solid var(--line); padding: 16px 0; margin: 16px 0; }
  .detail-actions .button { flex: 1; }
  .event { flex-wrap: wrap; }
  .event-time { flex-basis: 100%; padding-left: 36px; }
  .modal { max-width: calc(100vw - 24px); }
}

:root[data-theme="dark"] { color-scheme: dark; color: #e3e7ed; background: #171a1f; --muted: #a3afbb; --line: #343b45; --green: #238158; --sidebar: #1c2026; }
[data-theme="dark"] .brand, [data-theme="dark"] .auth-brand,
[data-theme="dark"] .service-name, [data-theme="dark"] .detail-header,
[data-theme="dark"] .session-title, [data-theme="dark"] .breadcrumb strong { color: #e3e7ed; }
[data-theme="dark"] .sidebar, [data-theme="dark"] .sidebar-label,
[data-theme="dark"] .sidebar-bottom, [data-theme="dark"] .sidebar-bottom small,
[data-theme="dark"] .breadcrumb, [data-theme="dark"] .account,
[data-theme="dark"] .nav-button, [data-theme="dark"] .stat-label,
[data-theme="dark"] .device-name, [data-theme="dark"] .service-table th,
[data-theme="dark"] .detail-row > :first-child, [data-theme="dark"] .detail-identity p,
[data-theme="dark"] .detail-updated, [data-theme="dark"] .table-footer,
[data-theme="dark"] .sync-time, [data-theme="dark"] .event-body span,
[data-theme="dark"] .event-body small, [data-theme="dark"] .event-time,
[data-theme="dark"] .download-meta, [data-theme="dark"] .modal-service small,
[data-theme="dark"] .session-box .no-session, [data-theme="dark"] .empty-state,
[data-theme="dark"] .muted, [data-theme="dark"] .form-field { color: #a3afbb; }
[data-theme="dark"] .nav-button:hover { color: #f0f3f7; background: #272e37; }
[data-theme="dark"] .nav-button.active { background: #233c30; color: #b8e6cb; }
[data-theme="dark"] .nav-button.active svg { color: #8ed9ac; }
[data-theme="dark"] .button, [data-theme="dark"] .icon-button,
[data-theme="dark"] .search input, [data-theme="dark"] select,
[data-theme="dark"] .form-field input, [data-theme="dark"] .form-field select,
[data-theme="dark"] .credential-value { color: #e3e7ed; background: #242a32; border-color: #485360; }
[data-theme="dark"] .button:hover, [data-theme="dark"] .icon-button:hover { background: #303944; border-color: #667484; }
[data-theme="dark"] .button.primary { color: #fff; background: #1d744e; border-color: #398d65; }
[data-theme="dark"] .button.primary:hover { background: #24865c; }
[data-theme="dark"] .button.danger { color: #ffb1a6; background: #332725; border-color: #8d5046; }
[data-theme="dark"] .button.danger:hover { background: #4a302b; }
[data-theme="dark"] .search input::placeholder { color: #a3afbb; }
[data-theme="dark"] .table-scroll { background: #1d2229; }
[data-theme="dark"] .service-table th { background: #242a32; }
[data-theme="dark"] .service-table td, [data-theme="dark"] .event { border-color: #343b45; }
[data-theme="dark"] .service-table tbody tr:hover { background: #272f39; }
[data-theme="dark"] .service-table tbody tr.selected { background: #24382e; }
[data-theme="dark"] .service-symbol, [data-theme="dark"] .detail-symbol { color: #bad0e6; background: #2c3b4a; }
[data-theme="dark"] .port-value, [data-theme="dark"] .detail-row > :last-child,
[data-theme="dark"] .event-body, [data-theme="dark"] .download-meta strong { color: #d5dee8; }
[data-theme="dark"] .status, [data-theme="dark"] .status.stopped,
[data-theme="dark"] .status.offline { color: #b9c4ce; background: #333d47; }
[data-theme="dark"] .status.running { color: #abdfbe; background: #284534; }
[data-theme="dark"] .status.starting, [data-theme="dark"] .status.stopping { color: #edcd90; background: #473c25; }
[data-theme="dark"] .status.error { color: #ffb1a6; background: #512f29; }
[data-theme="dark"] .session-countdown, [data-theme="dark"] .text-button,
[data-theme="dark"] .stat-value.green { color: #99d9b1; }
[data-theme="dark"] .session-countdown.expiring { color: #edcd90; }
[data-theme="dark"] .event-icon { color: #aed5bd; background: #2b4435; }
[data-theme="dark"] .event-icon.error { color: #ffb1a6; background: #512f29; }
[data-theme="dark"] .modal { color: #e3e7ed; background: #20262e; border-color: #485360; }
[data-theme="dark"] .modal-footer { background: #242a32; border-color: #343b45; }
[data-theme="dark"] .modal-note { color: #c2c8ae; }
[data-theme="dark"] .form-error, [data-theme="dark"] .connection-banner { color: #ffc0b5; background: #452d28; }
[data-theme="dark"] .inline-error { color: #ffc0b5; }
[data-theme="dark"] .demo-badge { color: #edcd90; background: #473c25; border-color: #6c572c; }
[data-theme="dark"] .toast { color: #d9eee1; background: #24412f; border-color: #4f745c; }
[data-theme="dark"] .toast.error { color: #ffc0b5; background: #452d28; }
