:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #1d1930;
  background: #f7f7fb;
  font-synthesis: none;
  --accent: #6041d9;
  --accent-dark: #4c2cbf;
  --accent-bg: #f0ebff;
  --muted: #655f77;
  --line: #e6e3ef;
  --surface: #fff;
}
* { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a, input, select { outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); min-height: 100vh; padding: 26px 17px 16px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 7px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; box-shadow: 0 3px 8px #6041d939; }
.brand-mark svg { width: 22px; height: 22px; }
.brand strong, .identity strong { display: block; font-size: .95rem; }
.brand small, .identity small { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
.sidebar nav { margin-top: 45px; }
.nav-heading { padding: 0 11px; color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .07em; margin-bottom: 10px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 8px; margin-bottom: 5px; font-size: .91rem; font-weight: 600; }
.nav-item:hover { background: #f7f5fd; }
.nav-item.selected { color: var(--accent-dark); background: var(--accent-bg); }
.sidebar-footer { margin-top: auto; padding: 16px 1px 4px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.avatar { width: 35px; height: 35px; flex-shrink: 0; background: var(--accent-bg); color: var(--accent-dark); border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 750; }
.identity { min-width: 0; flex-grow: 1; }
.identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 33px; color: var(--muted); font-size: .88rem; }
.topbar strong { color: #302943; }
.crumb { margin: 0 7px; color: #827a92; }
.content { max-width: 1450px; margin: auto; padding: 35px 33px; }
.page-heading, .section-label, .panel-header, .panel-title, .panel-actions { display: flex; align-items: center; gap: 12px; }
.page-heading, .panel-header { justify-content: space-between; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.35rem); letter-spacing: -.045em; line-height: 1.12; }
h2 { font-size: 1.05rem; letter-spacing: -.018em; }
.page-heading p, .muted { color: var(--muted); margin-top: 9px; line-height: 1.55; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); cursor: pointer; }
.button { min-height: 41px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; font-weight: 650; white-space: nowrap; }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); box-shadow: 0 2px 4px #38217420; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary:hover, .icon-button:hover { background: var(--accent-bg); color: var(--accent-dark); }
button:disabled, a[aria-disabled="true"] { opacity: .56; cursor: default; }
.icon-button { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); padding: 0; }
.servers-section { margin-top: 35px; }
.section-label { margin-bottom: 12px; gap: 8px; }
.section-label span { color: var(--muted); font-size: .78rem; font-weight: 600; padding: 3px 7px; background: #eeecf5; border-radius: 6px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 14px; }
.server-card { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 15px; background: var(--surface); color: inherit; cursor: pointer; }
.server-card:hover { border-color: #a896f0; }
.server-card[aria-pressed="true"] { background: #fcfaff; border-color: #8b72ee; box-shadow: 0 0 0 1px #8b72ee; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel-icon { width: 36px; height: 36px; flex-shrink: 0; display: inline-grid; place-items: center; background: var(--accent-bg); color: var(--accent-dark); border-radius: 9px; }
.radio { width: 15px; height: 15px; border: 1px solid #bfb8cc; border-radius: 50%; }
.server-card[aria-pressed="true"] .radio { border: 4px solid var(--accent); }
.server-card strong, .server-card small { display: block; }
.server-card strong { font-size: .99rem; }
.server-card small { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.server-meta { display: flex; gap: 5px 12px; flex-wrap: wrap; justify-content: space-between; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.domains-panel { margin-top: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: clip; }
.panel-header { padding: 18px 17px; flex-wrap: wrap; }
.panel-title p { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.panel-actions { gap: 8px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; color: var(--muted); width: 17px; pointer-events: none; }
.search input { width: 185px; height: 41px; padding: 8px 8px 8px 35px; font-size: .88rem; }
input, select { border: 1px solid #d9d4e5; border-radius: 8px; background: #fff; color: inherit; }
input::placeholder { color: #746e83; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; font-size: .88rem; }
thead { background: #f9f8fc; color: var(--muted); }
th, td { padding: 12px 17px; border-top: 1px solid var(--line); }
th { font-size: .8rem; font-weight: 700; }
td { height: 63px; }
td:first-child { font-weight: 650; overflow-wrap: anywhere; }
td small { display: block; color: var(--muted); margin-top: 5px; max-width: 31ch; line-height: 1.4; }
td code { color: var(--muted); font-size: .77rem; overflow-wrap: anywhere; }
.align-right { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-actions .icon-button { border-color: var(--line); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; color: var(--accent-dark); background: var(--accent-bg); font-size: .77rem; font-weight: 700; }
.badge svg { width: 13px; height: 13px; }
.badge.active { background: #e6f7ee; color: #15603b; }
.badge.warning { background: #fff1da; color: #815000; }
.badge.failed { background: #ffeaed; color: #9b2540; }
.empty { text-align: center; border-top: 1px solid var(--line); padding: 30px 15px; }
.empty h3 { margin: 10px 0 13px; font-size: 1rem; }
.panel-footer { padding: 13px 17px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.notice { margin-top: 14px; padding: 12px; color: var(--accent-dark); background: var(--accent-bg); border-radius: 8px; }
.screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card, dialog { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: inherit; width: min(100%, 430px); box-shadow: 0 15px 50px #20153f18; }
.auth-card, .dialog-form { padding: 24px; display: grid; gap: 14px; }
.auth-card .brand { padding: 0; }
dialog { width: min(calc(100% - 32px), 480px); padding: 0; }
dialog::backdrop { background: #20163780; }
.dialog-top, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-actions { justify-content: flex-end; }
.dialog-form h2 { font-size: 1.38rem; }
.dialog-form p.muted { margin: -8px 0 2px; font-size: .91rem; }
.auth-card label, .dialog-form label { display: grid; gap: 6px; font-weight: 650; font-size: .9rem; }
.auth-card input, .dialog-form input, .dialog-form select { width: 100%; min-height: 42px; padding: 9px 10px; }
.error { color: #9b2540; background: #ffeaed; padding: 9px 11px; border-radius: 7px; font-size: .88rem; }
@media (max-width: 830px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .content, .topbar { padding-inline: 20px; }
}
@media (max-width: 650px) {
  .layout { display: block; }
  .sidebar { min-height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); gap: 9px; }
  .sidebar nav { margin: 0; display: flex; gap: 5px; }
  .nav-item { padding: 8px; margin: 0; }
  .nav-heading, .sidebar-footer .avatar, .identity small { display: none; }
  .sidebar-footer { padding: 0; position: absolute; inset: 14px 14px auto auto; border: 0; max-width: 33%; }
  .topbar { min-height: 42px; padding-block: 7px; }
  .content { padding-block: 23px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .servers-section { margin-top: 23px; }
}
