/* AWG Control v1.2 — borderless graphite, restrained violet accent */
:root {
  color-scheme: dark;
  --bg: #0e0f14;
  --panel: #181920;
  --panel2: #1f202a;
  --panel-hover: #252633;
  --text: #efeff5;
  --muted: #9293a6;
  --faint: #666878;
  --accent: #ae9afa;
  --accent-hover: #c1b2ff;
  --accent-soft: #27223b;
  --accent-ink: #1c162e;
  --danger: #e79a9f;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: var(--font); }
body { margin: 0; min-height: 100vh; font-size: 14px; }
button, input, select { font: inherit; }
button, a, select { transition: background .16s ease, color .16s ease, opacity .16s ease; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
/* No decorative outlines or strokes anywhere. Visible focus rings are for keyboard accessibility only. */
:where(button, input, select, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { max-width: 1280px; margin: 0 auto; padding: 0 52px; }
.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: -.9px; white-space: nowrap; }
.logo-mark { font-weight: 800; color: var(--accent); font-size: 22px; letter-spacing: -4px; margin-right: 11px; }
.logo-dim { color: #858398; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 27px; }
.scope { display: flex; align-items: center; gap: 9px; color: #aa9ec8; font-size: 11px; font-weight: 650; letter-spacing: .8px; }
.scope-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.quiet { background: transparent; border: 0; color: var(--muted); }
.quiet:hover { color: var(--text); }
.logout { padding: 8px 0; }
main { padding-top: 48px; }
.heading-row, .section-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.heading-row { margin-bottom: 26px; }
.eyebrow { font-size: 10px; color: var(--accent); letter-spacing: 1.8px; font-weight: 750; margin: 0 0 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; font-weight: 670; letter-spacing: -1.2px; margin: 0 0 9px; }
h2 { font-size: 22px; letter-spacing: -.75px; font-weight: 650; margin: 0; }
h3 { font-size: 22px; font-weight: 650; letter-spacing: -.6px; margin: 0; }
.hint, .subdued { color: var(--muted); }
.hint { margin: 0; font-size: 13px; }
.updated { display: flex; align-items: center; gap: 11px; font-size: 12px; color: var(--muted); }
.icon-button { display: grid; place-items: center; height: 34px; width: 34px; border: 0; border-radius: 9px; background: var(--panel2); color: #b4b0c6; }
.icon-button:hover { background: var(--panel-hover); }
.server-picker { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 22px; padding: 20px 23px; margin: 7px 0 13px; border-radius: 15px; background: #171720; }
.server-picker .field-label { margin-bottom: 10px; }
.server-picker select { min-width: 247px; padding: 12px 38px 12px 14px; border: 0; border-radius: 9px; background: #252430; color: var(--text); font-size: 13px; cursor: pointer; }
.server-picker select:hover { background: #302b3f; }
.server-info { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--faint); font-size: 12px; }
.server-info strong { font-weight: 540; color: #c9c7d6; font-variant-numeric: tabular-nums; }
.server-sep { color: var(--accent); }
.status-panel { display: grid; grid-template-columns: 1fr 1fr 1.15fr .9fr; gap: 9px; background: none; margin-top: 14px; }
.status-cell { padding: 22px 21px 21px; background: var(--panel); border-radius: 13px; min-width: 0; }
.status-head { color: #b3b1c2; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 12px; font-weight: 560; }
.tag { background: #24242e; color: #838094; font-size: 9px; font-weight: 650; letter-spacing: .6px; border-radius: 5px; padding: 4px 6px; }
.status-main { display: flex; align-items: center; gap: 10px; min-height: 27px; margin-top: 22px; }
.status-main strong { font-weight: 630; font-size: 19px; letter-spacing: -.5px; white-space: nowrap; }
.status-main small { color: #85859a; font-weight: 450; font-size: 15px; }
.status-foot { margin-top: 9px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; height: 9px; width: 9px; border-radius: 50%; flex: none; background: #6b6c7a; }
.dot.online { background: var(--accent); }
.dot.offline { background: var(--danger); }
.dot.muted { background: #747585; }
.dot.small { width: 7px; height: 7px; }
.section { margin-top: 60px; }
.section-top { margin-bottom: 22px; }
.heading-count { font-size: 12px; background: #252331; color: #c3b8ee; border-radius: 7px; letter-spacing: 0; padding: 5px 9px; vertical-align: middle; margin-left: 7px; }
.section-actions { display: flex; gap: 9px; }
.search-wrap { display: flex; align-items: center; gap: 9px; width: 230px; height: 40px; padding: 0 13px; border-radius: 9px; background: var(--panel); color: var(--muted); }
.search-wrap:focus-within { background: var(--panel2); }
.search-wrap input { width: 100%; min-width: 0; color: var(--text); font-size: 12px; background: none; border: 0; outline: none; }
.search-wrap input::placeholder { color: #787889; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 0 15px; border: 0; border-radius: 9px; font-size: 12px; font-weight: 660; white-space: nowrap; }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { background: #282733; color: #d7d2e6; }
.button.secondary:hover { background: #353143; }
.button.destructive { background: #a45f68; color: #fff; }
.button.destructive:hover { background: #b96c77; }
.table-wrap { background: transparent; border-radius: 13px; overflow-x: auto; }
.clients-table { width: 100%; text-align: left; white-space: nowrap; border-collapse: separate; border-spacing: 0 5px; }
.clients-table th { font-size: 10px; font-weight: 670; letter-spacing: 1.1px; color: #78798c; padding: 15px 19px 10px; }
.clients-table td { background: var(--panel); padding: 15px 19px; color: #bcbacb; }
.clients-table td:first-child { border-radius: 10px 0 0 10px; }
.clients-table td:last-child { border-radius: 0 10px 10px 0; }
.clients-table tbody tr:hover td { background: #20212a; }
.clients-table tbody tr[hidden] { display: none !important; }
.clients-table .actions-head { text-align: right; }
.client-name { display: flex; align-items: center; gap: 13px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #c8b8ff; background: var(--accent-soft); font-size: 14px; font-weight: 710; }
.client-name strong { display: block; color: #e6e5ed; font-size: 13px; font-weight: 650; }
.client-name small { display: block; color: #88879b; font-size: 10px; margin-top: 5px; }
.ip { color: #c1bcd0; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 12px; }
.client-status { display: inline-flex; align-items: center; gap: 9px; color: #a8a5b6; font-size: 12px; }
.traffic { color: #a9a7b8; font-size: 12px; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.small-action { height: 32px; min-width: 36px; display: inline-flex; justify-content: center; align-items: center; padding: 0 10px; background: #292833; color: #c6c0dd; border: 0; border-radius: 7px; font-size: 11px; }
.small-action:hover { color: #fff; background: #393448; }
.small-action.danger { min-width: 32px; width: 32px; color: #d9a2aa; }
.small-action.danger:hover { background: #493039; color: #f3b8c2; }
.small-action[aria-disabled=true] { opacity: .4; pointer-events: none; }
.readonly { font-size: 11px; color: var(--muted); white-space: nowrap; }
.clients-table td:last-child { min-width: 145px; }
.empty { text-align: center; padding: 46px 16px; color: var(--muted); font-size: 13px; }
.unmanaged { color: #838296; margin-top: 14px; font-size: 11px; }
.notice { background: #282239; color: #d6cbff; border-radius: 9px; padding: 13px 16px; margin-bottom: 18px; font-size: 12px; }
.notice.error { background: #322128; color: #e9b4b9; }
footer { margin: 64px 0 30px; padding-top: 14px; color: #747487; font-size: 10px; letter-spacing: 1.1px; display: flex; justify-content: space-between; }
.footer-divider { padding: 0 5px; color: #565469; }
.modal { width: min(430px,calc(100vw - 28px)); padding: 29px; color: var(--text); background: #20202b; border: 0; border-radius: 15px; box-shadow: 0 24px 100px #0009; }
.modal::backdrop { background: #06060cd9; backdrop-filter: blur(4px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.modal-head .eyebrow { margin-bottom: 10px; }
.modal-close { border: 0; background: transparent; color: #aaa5ba; font-size: 24px; padding: 0; line-height: 23px; }
.modal .subdued { font-size: 12px; line-height: 1.7; margin-bottom: 21px; }
.field-label { display: block; color: #c1becf; font-size: 11px; font-weight: 640; margin-bottom: 10px; }
.modal input, .login-card input { width: 100%; height: 44px; padding: 0 13px; color: var(--text); background: #13141b; border: 0; border-radius: 9px; outline: 0; font-size: 13px; }
.modal input:focus-visible, .login-card input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 28px; }
.danger-text { color: var(--danger); }
.qr-modal { width: min(375px,calc(100vw - 28px)); }
.qr-holder { display: grid; place-items: center; background: #f5f5f8; padding: 11px; border-radius: 9px; }
.qr-holder img { width: min(100%,260px); height: auto; }
.qr-warning { text-align: center; margin: 15px 0; font-size: 11px; color: #b0adbd; }
.full { width: 100%; }
.login-body { display: grid; place-items: center; padding: 22px; }
.login-card { width: min(420px,100%); padding: 37px; background: var(--panel); border: 0; border-radius: 16px; }
.login-card .logo { margin-bottom: 42px; }
.login-title { font-size: 25px; font-weight: 665; letter-spacing: -.8px; }
.login-desc { font-size: 12px; margin: 10px 0 28px; }
.login-card .button { margin-top: 19px; }
.login-card .button span { font-size: 17px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 32px; font-size: 11px; color: #858093; }
.dot.tiny { width: 6px; height: 6px; background: var(--accent); }
.inline-error { font-size: 12px; line-height: 1.55; color: var(--danger); }
@media(max-width:940px) {
  .shell { padding: 0 24px; }
  .status-panel { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:700px) {
  .shell { padding: 0 16px; }
  .topbar { height: 68px; }
  .scope { display: none; }
  main { padding-top: 31px; }
  .heading-row { align-items: flex-start; }
  .heading-row h1 { font-size: 25px; }
  .updated { font-size: 10px; gap: 8px; }
  .icon-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex: 0 0 36px;
    border-radius: 9px;
    font-size: 16px;
    line-height: 1;
  }
  .server-picker { padding: 18px; align-items: stretch; gap: 16px; }
  .server-picker>div:first-child { width: 100%; }
  .server-picker select { width: 100%; }
  .server-info { gap: 7px; font-size: 11px; }
  .status-panel { gap: 8px; }
  .status-cell { padding: 18px 15px; }
  .status-main strong { font-size: 17px; }
  .status-foot { font-size: 10px; }
  .status-head { flex-wrap: wrap; }
  .status-head .tag { font-size: 8px; }
  .section { margin-top: 44px; }
  .section-top { align-items: flex-start; flex-direction: column; gap: 17px; }
  .section-actions { width: 100%; gap: 8px; }
  .search-wrap { flex: 1; min-width: 0; width: auto; }
  .section-actions .button { padding: 0 12px; font-size: 11px; }
  .clients-table, .clients-table tbody { display: block; width: 100%; min-width: 0; }
  .clients-table thead { display: none; }
  .clients-table tbody tr.client-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 8px; margin-bottom: 8px; padding: 18px 16px; background: var(--panel); border-radius: 12px; }
  .clients-table tbody tr.client-row td { display: block; padding: 0; min-width: 0; background: none !important; border-radius: 0; }
  .clients-table tbody tr.client-row td:nth-child(1) { grid-column: 1/-1; }
  .clients-table tbody tr.client-row td:nth-child(4), .clients-table tbody tr.client-row td:nth-child(5) { grid-column: 1/-1; }
  .clients-table tbody tr.client-row td:nth-child(2):before,
  .clients-table tbody tr.client-row td:nth-child(3):before,
  .clients-table tbody tr.client-row td:nth-child(4):before { content: 'IP-АДРЕС'; display: block; margin-bottom: 7px; color: #77768b; font-size: 9px; letter-spacing: 1px; }
  .clients-table tbody tr.client-row td:nth-child(3):before { content: 'СОСТОЯНИЕ'; }
  .clients-table tbody tr.client-row td:nth-child(4):before { content: 'ТРАФИК ↓ / ↑'; }
  .clients-table tbody tr.client-row .row-actions { justify-content: flex-start; }
  .clients-table tbody tr.client-row .row-actions>* { height: 35px; min-width: 46px; }
  .clients-table .empty-row, .clients-table .empty-row td { display: block; }
  footer { font-size: 9px; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; } }
