:root {
  color-scheme: dark;
  --background: #101313;
  --panel: #191d1d;
  --text: #eef0ea;
  --muted: #a4afaa;
  --border: #343c39;
  --accent: #e7f573;
  --accent-dark: #202615;
  --danger: #ffc0ad;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--text); }
h1,h2,h3,p { margin: 0; }
.top { min-height: 70px; border-bottom: 1px solid var(--border); display: flex; padding: 12px clamp(16px,5vw,56px); align-items: center; justify-content: space-between; gap: 12px; }
.brand,.top-actions { display: flex; align-items: center; gap: 13px; }
.brand strong { font-weight: 850; letter-spacing: .12em; }
.brand > span:last-child { color: var(--muted); font-size: .75rem; letter-spacing: .1em; }
.mark { width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; border-radius: 8px; }
main { max-width: 1440px; margin: auto; padding: clamp(24px, 5vw, 56px); }
.headline { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
h1 { font-size: clamp(1.7rem, 3.8vw, 2.8rem); line-height: 1.1; font-weight: 770; letter-spacing: -.046em; }
.headline p { color: var(--muted); margin-top: 9px; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.metrics article, .panel, .login { background: var(--panel); border: 1px solid var(--border); border-radius: 15px; }
.metrics article { padding: clamp(12px,2.1vw,22px); display: flex; flex-direction: column; min-height: 125px; }
.metrics span, .profile-stats dt { color: var(--muted); font-size: .875rem; }
.metrics strong { display: block; font-size: 2rem; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metrics .word { font-size: 1.4rem; margin: 5px 0; }
.metrics small, .small { color: var(--muted); font-size: .8rem; }
.workspace { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(270px,1fr); align-items: start; gap: 16px; }
aside { display: grid; gap: 16px; }
.panel { padding: clamp(14px,2vw,22px); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.performance { margin-bottom: 20px; }
.performance h3 { font-size: .92rem; color: var(--muted); margin: 0 0 6px; }
.performance-groups { display: grid; grid-template-columns: minmax(0, 3fr) minmax(145px, 1fr); gap: 20px; }
.performance-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); gap: 1px 9px; margin: 0; }
.performance-stats > div { background: #131717; border-radius: 8px; padding: 8px 10px; margin-top: 5px; }
.performance-stats dt { font-size: .78rem; color: var(--muted); }
.performance-stats dd { font-weight: 720; font-variant-numeric: tabular-nums; margin: 0; overflow-wrap: anywhere; }
.host-stats { grid-template-columns: 1fr; }
.performance .panel-head .small { margin: 0; }
h2 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -.02em; }
.tabs { display: flex; gap: 3px; border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
button { font: inherit; font-size: .88rem; font-weight: 620; cursor: pointer; border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; background: transparent; color: var(--text); white-space: nowrap; }
.tabs button { padding: 4px 8px; color: var(--muted); }
.tabs .active { background: var(--accent-dark); color: var(--accent); }
.quiet { border-color: var(--border); }
.quiet:hover,.tabs button:hover, tbody tr:hover { background: #282f2b; }
.primary { background: var(--accent); color: #151810; border-color: var(--accent); }
.danger { color: var(--danger); border-color: #835646; background: #311f1c; }
button:disabled { opacity: .46; cursor: not-allowed; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .875rem; }
.connection::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: #c4a471; }
.connection.live::before { background: #b6ec7d; }
input { font: inherit; width: 100%; color: var(--text); background: #131717; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
input::placeholder { color: #a0aaa4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
th { text-align: left; color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
th,td { border-bottom: 1px solid var(--border); padding: 10px 8px; }
td:first-child { overflow-wrap: anywhere; min-width: 95px; }
td .quiet { padding: 4px 8px; }
.empty { color: var(--muted); padding: 12px 0 6px; }
.identity { display:flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.initial { display:grid; place-items:center; min-width: 45px; height: 45px; border-radius: 10px; background: var(--accent-dark); color: var(--accent); font-weight: 800; }
.identity h3 { overflow-wrap: anywhere; }
.identity span:not(.initial) { color:var(--muted); font-size: .875rem; }
.profile-stats { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.profile-stats div { padding: 9px; background: #131717; border-radius: 8px; }
.profile-stats dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 700; }
.actions,.dialog-actions { display:flex; flex-wrap:wrap; gap: 8px; }
.small { margin-top: 10px; }
.feed-row { display:flex; justify-content:space-between; align-items: start; gap: 9px; padding: 9px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.feed-row span { color:var(--muted); font-size:.8rem; white-space: nowrap; }
.notice,.feedback { color:var(--accent); margin: 0 0 12px; }
.feedback { margin: 12px 0; }
.login { max-width: 450px; padding: 25px; margin: 40px auto; }
.login-logo { display: block; margin: 0 auto 18px; object-fit: contain; border-radius: 12px; }
.login h1 { font-size: clamp(1.6rem, 3.8vw, 2.2rem); text-align: center; }
.login form { margin-top: 24px; display: grid; gap: 9px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; max-width: min(460px,calc(100vw - 32px)); padding: 23px; }
dialog::backdrop { background: #060908cb; }
dialog p { color: var(--muted); margin: 9px 0; }
.dialog-actions { justify-content: flex-end; }
#action-error,#login-error { color:var(--danger); }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space: nowrap; }
@media(max-width:850px) { .workspace { grid-template-columns: 1fr; } aside { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:710px) { .performance-groups { grid-template-columns: 1fr; gap: 12px; } .host-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:630px) { .metrics,aside { grid-template-columns: 1fr; } .metrics article { min-height: 90px; } .brand > span:last-child { display:none; } .headline { align-items:start; } }
