:root {
  --bg: #0a0c0f;
  --side: #0d1014;
  --panel: #11151a;
  --panel-2: #161b21;
  --input: #0c0f13;
  --line: rgba(232, 235, 238, .08);
  --line-2: rgba(232, 235, 238, .14);
  --text: #e8ebee;
  --dim: #a1a9b2;
  --mute: #697179;
  --sea: #5fd0c0;
  --sea-deep: #2a7f78;
  --sea-soft: rgba(95, 208, 192, .1);
  --warn: #ff8a5c;
  --warn-text: #ffc59e;
  --warn-soft: rgba(255, 138, 92, .1);
  --danger: #ff6b6b;
  --ok: #8fd694;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .92em; }
::selection { background: rgba(95, 208, 192, .28); }
.boot { opacity: 0; }
#app { transition: opacity .35s var(--ease); }

/* ------------------------------------------------------------ login */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background: radial-gradient(50% 45% at 50% 110%, rgba(95, 208, 192, .14), transparent 70%), var(--bg);
}
.login__card { width: min(380px, 100%); animation: rise .7s var(--ease) both; }
.login__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; margin-bottom: 34px; }
.login h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.025em; font-weight: 600; }
.login p { margin: 0 0 26px; color: var(--dim); }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login .btn { margin-top: 8px; height: 46px; }
.login__back { display: inline-block; margin-top: 26px; color: var(--mute); font-size: 13.5px; transition: color .2s; }
.login__back:hover { color: var(--text); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px; background: var(--side); border-right: 1px solid var(--line); }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; font-weight: 600; font-size: 16px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__link { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--dim); transition: background .25s, color .25s; }
.side__link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side__link:hover { background: rgba(232, 235, 238, .04); color: var(--text); }
.side__link.is-active { background: rgba(232, 235, 238, .06); color: var(--text); }
.side__link.is-active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--sea); }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 10px 0; border-top: 1px solid var(--line); }
.side__user { display: flex; align-items: center; justify-content: space-between; color: var(--mute); font-size: 13px; }
.side__user button { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 4px 0; transition: color .2s; }
.side__user button:hover { color: var(--text); }
.global { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.global small { display: block; color: var(--mute); font-size: 12px; }

.main { min-width: 0; padding: 34px 40px 120px; }
.page { max-width: 1120px; margin: 0 auto; animation: page-in .45s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page__head h1 { margin: 0; font-size: 28px; letter-spacing: -.03em; font-weight: 600; }
.page__head p { margin: 4px 0 0; color: var(--dim); }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: 13px; margin-bottom: 8px; transition: color .2s; }
.crumb:hover { color: var(--text); }

/* ------------------------------------------------------------ cards */
.grid { display: grid; gap: 16px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.card__sub { margin: 0 0 18px; color: var(--mute); font-size: 13px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card__head h2 { margin: 0; }
.stat__label { color: var(--mute); font-size: 12.5px; }
.stat__value { margin-top: 6px; font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__note { margin-top: 2px; color: var(--mute); font-size: 12.5px; }
.section-gap { margin-top: 16px; }

.notice { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: 12px; border: 1px solid rgba(255, 138, 92, .3); background: var(--warn-soft); color: var(--warn-text); }
.notice .btn { margin-left: auto; }
.notice--info { border-color: rgba(95, 208, 192, .25); background: var(--sea-soft); color: var(--text); }

/* chart */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 170px; padding-top: 10px; }
.bar { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar__col { position: relative; width: 100%; max-width: 38px; border-radius: 6px 6px 3px 3px; background: rgba(232, 235, 238, .08); height: 0; transition: height .9s var(--ease); overflow: hidden; }
.bar__flag { position: absolute; left: 0; right: 0; bottom: 0; background: var(--warn); opacity: .85; border-radius: 3px; transition: height .9s var(--ease) .1s; height: 0; }
.bar__day { font: 500 11px/1 var(--mono); color: var(--mute); }
.bar__tip { position: absolute; bottom: calc(100% - 4px); padding: 4px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: all .2s var(--ease); pointer-events: none; }
.bar:hover .bar__tip { opacity: 1; transform: none; }
.legend { display: flex; gap: 16px; color: var(--mute); font-size: 12.5px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: rgba(232,235,238,.2); }
.legend i.w { background: var(--warn); }

.meter { display: flex; flex-direction: column; gap: 12px; }
.meter__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13.5px; }
.meter__track { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(232, 235, 238, .07); overflow: hidden; }
.meter__fill { height: 100%; width: 0; background: var(--sea); border-radius: 3px; transition: width .9s var(--ease); }
.meter__row span:last-child { color: var(--mute); font-variant-numeric: tabular-nums; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; color: var(--mute); font-size: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(232, 235, 238, .02); }
.table .msgcell { max-width: 360px; font-family: var(--mono); font-size: 12.5px; color: var(--warn-text); overflow-wrap: anywhere; }
.table .why { display: block; margin-top: 4px; color: var(--mute); font-family: var(--sans); font-size: 12px; }
.muted { color: var(--mute); }
.nowrap { white-space: nowrap; }
.empty { padding: 36px 20px; text-align: center; color: var(--mute); }
.is-revoked td { opacity: .45; }
.is-revoked .msgcell { text-decoration: line-through; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; border: 1px solid var(--line-2); color: var(--dim); }
.pill--warn { color: var(--warn); border-color: rgba(255, 138, 92, .35); }
.pill--sea { color: var(--sea); border-color: rgba(95, 208, 192, .35); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); flex: none; }
.dot--on { background: var(--sea); box-shadow: 0 0 0 3px rgba(95, 208, 192, .15); }
.dot--off { background: var(--warn); }

/* servers */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.server { display: flex; flex-direction: column; gap: 16px; padding: 20px 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, transform .3s var(--ease); cursor: pointer; }
.server:hover { border-color: var(--line-2); transform: translateY(-2px); }
.server__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.server__name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.server__meta dt { color: var(--mute); font-size: 12px; }
.server__meta dd { margin: 2px 0 0; }
.server__key { font-family: var(--mono); font-size: 12px; color: var(--mute); }

/* ------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 13px; color: var(--dim); }
.field small { color: var(--mute); font-size: 12.5px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; padding: 10px 13px; border-radius: 10px; background: var(--input); border: 1px solid var(--line-2);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus { border-color: rgba(95, 208, 192, .55); box-shadow: 0 0 0 3px rgba(95, 208, 192, .12); }
.input--mono, .textarea--mono { font-family: var(--mono); font-size: 13px; }
.textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .wide { grid-column: 1 / -1; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.spacer { flex: 1; }

.range { display: flex; align-items: center; gap: 14px; }
.range input { flex: 1; accent-color: var(--sea); }
.range output { min-width: 44px; text-align: right; font-family: var(--mono); font-size: 13px; }

.seg { align-self: flex-start; max-width: 100%; display: inline-flex; padding: 3px; border-radius: 11px; background: var(--input); border: 1px solid var(--line-2); }
.seg button { padding: 7px 14px; border: 0; border-radius: 8px; background: none; color: var(--dim); cursor: pointer; font-size: 13.5px; transition: background .3s var(--ease), color .2s; }
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 14px -8px rgba(0,0,0,.8); }

.toggle { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; border: 0; padding: 0; background: rgba(232, 235, 238, .12); cursor: pointer; transition: background .35s var(--ease); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--dim); transition: transform .35s var(--ease), background .35s; }
.toggle.is-on { background: var(--sea-deep); }
.toggle.is-on::after { transform: translateX(18px); background: #fff; }
.toggle--big { width: 52px; height: 28px; }
.toggle--big::after { width: 22px; height: 22px; }
.toggle--big.is-on::after { transform: translateX(24px); }
.toggle:focus-visible, .btn:focus-visible, .seg button:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 0; cursor: pointer; background: var(--text); color: #0b0d10; font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .2s, transform .2s var(--ease), opacity .2s; }
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: rgba(232, 235, 238, .05); }
.btn--danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .35); }
.btn--danger:hover { background: rgba(255, 107, 107, .08); }
.btn--small { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn--link { background: none; color: var(--dim); padding: 0; height: auto; font-weight: 500; }
.btn--link:hover { background: none; color: var(--text); }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(11, 13, 16, .35); border-top-color: #0b0d10; animation: spin .7s linear infinite; }
.btn--ghost.is-busy::after { border-color: rgba(232,235,238,.25); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; padding: 11px 14px; border: 0; background: none; color: var(--dim); cursor: pointer; white-space: nowrap; transition: color .2s; }
.tabs button:hover { color: var(--text); }
.tabs button.is-on { color: var(--text); }
.tabs__ink { position: absolute; bottom: -1px; height: 2px; background: var(--sea); border-radius: 2px; transition: transform .4s var(--ease), width .4s var(--ease); left: 0; }
.tabs { position: relative; }

/* categories */
.cats { display: flex; flex-direction: column; gap: 12px; }
.cat { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: border-color .3s, opacity .3s; }
.cat.is-off { opacity: .6; }
.cat__head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.cat__name { font-weight: 600; }
.cat__id { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.cat__ladder { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cat__chev { width: 16px; height: 16px; stroke: var(--mute); fill: none; stroke-width: 1.8; transition: transform .35s var(--ease); flex: none; }
.cat.is-open .cat__chev { transform: rotate(180deg); }
.cat__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.cat.is-open .cat__body { grid-template-rows: 1fr; }
.cat__inner { overflow: hidden; }
.cat__content { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.ladder { display: flex; flex-direction: column; gap: 8px; }
.ladder__step { display: grid; grid-template-columns: 70px 200px 140px max-content; justify-content: start; gap: 10px; align-items: center; }
.ladder__n { color: var(--mute); font-size: 12.5px; }

/* sandbox */
.sandbox__msgs { display: flex; flex-direction: column; gap: 8px; }
.sandbox__line { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; }
.verdicts { display: flex; flex-direction: column; gap: 8px; }
.verdict { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); animation: page-in .4s var(--ease) both; }
.verdict.is-flagged { border-color: rgba(255, 138, 92, .3); background: var(--warn-soft); }
.verdict__text { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.verdict__why { grid-column: 1 / -1; color: var(--dim); font-size: 12.5px; }
.verdict__cmd { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; color: var(--sea); }

/* key */
.keybox { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--input); border: 1px solid rgba(95, 208, 192, .35); font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }
.keybox span { flex: 1; min-width: 0; }

/* save bar */
.savebar { position: fixed; left: 50%; bottom: 22px; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 14px; background: rgba(22, 27, 33, .96); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--ease), opacity .3s; backdrop-filter: blur(10px); }
.savebar.is-visible { transform: translate(-50%, 0); opacity: 1; }
.savebar span { color: var(--dim); font-size: 13.5px; white-space: nowrap; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(5, 6, 8, .66); backdrop-filter: blur(4px); animation: fade .25s var(--ease) both; }
.modal__card { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -30px rgba(0,0,0,.9); animation: rise .35s var(--ease) both; }
.modal__card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.modal__card > p { margin: 0 0 18px; color: var(--dim); }
.modal__body { display: flex; flex-direction: column; gap: 14px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal.is-closing { animation: fade .2s reverse both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.qr { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr__img { width: 200px; height: 200px; padding: 0; border-radius: 10px; background: #fff; overflow: hidden; }
.qr__img svg { width: 100%; height: 100%; }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { max-width: 380px; padding: 11px 16px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 16px 40px -18px rgba(0,0,0,.9); font-size: 13.5px; animation: toast-in .4s var(--ease) both; }
.toast--error { border-color: rgba(255, 107, 107, .4); color: #ffc2c2; }
.toast--ok { border-color: rgba(95, 208, 192, .35); }
.toast.is-leaving { animation: toast-out .3s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

.skeleton { height: 120px; border-radius: 14px; background: linear-gradient(90deg, var(--panel), var(--panel-2), var(--panel)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.placeholders { display: flex; flex-wrap: wrap; gap: 6px; }
.placeholders code { padding: 2px 7px; border-radius: 6px; background: rgba(232, 235, 238, .06); color: var(--dim); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------ mobile */
.burger { display: none; }
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3-1 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; width: 260px; transform: translateX(-100%); transition: transform .4s var(--ease); }
  .shell.nav-open .side { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.6); }
  .burger { display: inline-flex; position: fixed; top: 14px; left: 16px; z-index: 35; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); align-items: center; justify-content: center; cursor: pointer; }
  .burger svg { width: 18px; height: 18px; stroke: var(--text); fill: none; stroke-width: 1.8; }
  .main { padding: 72px 16px 120px; }
  .form-grid, .grid--2 { grid-template-columns: 1fr; }
  .ladder__step { grid-template-columns: 1fr 1fr; }
  .ladder__n { grid-column: 1 / -1; }
  .sandbox__line { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .cat__ladder { display: none; }
  .savebar { left: 16px; right: 16px; transform: translateY(140%); }
  .savebar.is-visible { transform: none; }
  .savebar span { white-space: normal; }
}
@media (max-width: 520px) {
  .grid--4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat__value { font-size: 22px; }
}

/* ------------------------------------------------------------ roles & users */
.role { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; background: rgba(232, 235, 238, .07); color: var(--dim); }
.role--admin { background: rgba(122, 167, 255, .12); color: #a9c4ff; }
.role--owner { background: rgba(95, 208, 192, .14); color: var(--sea); }
.side__user > span { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.side__user .role { align-self: flex-start; font-size: 11px; }
.is-blocked td { opacity: .55; }
.uname { font-weight: 600; }
.server__owner { margin-left: auto; font-size: 12px; color: var(--mute); }
.detailcell { max-width: 420px; font-size: 12.5px; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: 12px; }
.login__switch { margin: 18px 0 0 !important; color: var(--mute); font-size: 14px; }
.login__switch a { color: var(--sea); }
.login__switch a:hover { text-decoration: underline; }
.btn:disabled { opacity: .45; pointer-events: none; }

.provider-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; color: var(--dim); font-size: 13px; }
.seg { flex-wrap: wrap; }

/* ------------------------------------------------------------ live chat */
.live { padding: 0; overflow: hidden; }
.live__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.live__wrap { position: relative; }
.live__scroll { height: min(62vh, 640px); overflow-y: auto; padding: 8px 10px; scroll-behavior: smooth; }
.live__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.live__row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 8px 10px; border-radius: 10px; animation: page-in .4s var(--ease) both; transition: background .4s var(--ease), opacity .3s; }
.live__row:hover { background: rgba(232, 235, 238, .025); }
.live__time { font: 400 11.5px/1.9 var(--mono); color: var(--mute); }
.live__body { min-width: 0; font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.live__who { color: var(--sea); }
.live__who::after { content: ":"; color: var(--mute); margin-right: 6px; }
.live__text { overflow-wrap: anywhere; }
.live__note { margin-top: 3px; font-family: var(--sans); font-size: 12px; color: var(--mute); line-height: 1.45; }
.live__note:empty { display: none; }
.live__note b { color: var(--warn-text); font-weight: 600; }
.live__cmd { margin-top: 3px; font-family: var(--mono); font-size: 11.5px; color: var(--sea); overflow-wrap: anywhere; }
.live__row .msg__tag { font: 400 11px var(--mono); color: var(--mute); white-space: nowrap; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; transition: all .4s var(--ease); }
.live__row .msg__tag.is-checking { color: var(--dim); background: linear-gradient(90deg, rgba(232,235,238,.04), rgba(232,235,238,.12), rgba(232,235,238,.04)); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.live__row.is-flagged { background: var(--warn-soft); }
.live__row.is-flagged .live__text { color: var(--warn-text); }
.live__row.is-flagged .msg__tag { color: var(--warn); border-color: rgba(255, 138, 92, .35); }
.live__row.is-skipped { opacity: .5; }
.live__row.is-error .msg__tag { color: var(--danger); border-color: rgba(255, 107, 107, .35); }
.live__system { padding: 6px 10px; display: flex; gap: 12px; font-size: 12.5px; color: var(--dim); border-left: 2px solid var(--line-2); margin: 4px 0; }
.live__system.is-error { color: #ffc2c2; border-left-color: var(--danger); }
.live__empty { padding: 60px 20px; text-align: center; color: var(--mute); }
.only-flagged .live__row:not(.is-flagged), .only-flagged .live__system:not(.is-error) { display: none; }
.live__new { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-size: 12.5px; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); animation: page-in .3s var(--ease) both; }
.live__hint { margin: 0; padding: 12px 18px 14px; border-top: 1px solid var(--line); color: var(--mute); font-size: 12px; }
@media (max-width: 860px) {
  .live__row { grid-template-columns: minmax(0, 1fr) auto; }
  .live__time { display: none; }
}
.login__guard { margin: 4px 0 0 !important; font-size: 12px; color: var(--mute); }
.live__skipnote { color: var(--dim); }
.live__row.is-flagged.is-soft { background: rgba(255, 138, 92, .05); }
