:root {
  color-scheme: dark;
  --bg: #111317;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(30, 33, 40, 0.86);
  --glass-border: rgba(255, 255, 255, 0.09);
  --surface-2: rgba(255, 255, 255, 0.06);
  --hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e6e8eb;
  --muted: #8a9099;
  --accent: #7aa2c8;
  --danger: #e5484d;
  --warn: #d4a72c;
  --ok: #4fa36a;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Thin glass scrollbars everywhere instead of the native ones. */
html { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .24); }
::-webkit-scrollbar-corner { background: transparent; }

body { margin: 0; min-height: 100vh; color: var(--text); font-size: 14px; background: var(--bg); }

/* ------------------------------------------------------------ backdrop */
/* Muted, slow aurora — gives the frosted glass something to blur without neon. */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.aurora { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.a1 {
  width: 75vmax; height: 75vmax; top: -32vmax; left: -22vmax; opacity: .95;
  background: radial-gradient(circle, #36537a 0%, rgba(54, 83, 122, 0) 62%);
  animation: drift-a 42s ease-in-out infinite alternate;
}
.a2 {
  width: 70vmax; height: 70vmax; bottom: -36vmax; right: -24vmax; opacity: .85;
  background: radial-gradient(circle, #2a5a5d 0%, rgba(42, 90, 93, 0) 62%);
  animation: drift-b 50s ease-in-out infinite alternate;
}
.a3 {
  width: 52vmax; height: 52vmax; top: 18%; left: 38%; opacity: .6;
  background: radial-gradient(circle, #463f72 0%, rgba(70, 63, 114, 0) 62%);
  animation: drift-c 58s ease-in-out infinite alternate;
}
.dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, #000 20%, transparent 75%);
}
/* Soft light that follows the cursor (--mx/--my are set from JS). */
.spotlight {
  position: absolute; inset: 0;
  background: radial-gradient(650px circle at var(--mx, 50%) var(--my, 20%), rgba(170, 195, 230, .075), transparent 60%);
}
.grain {
  position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain 7s steps(8) infinite;
}
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-12vmax, -9vmax) scale(1.08); } }
@keyframes drift-c { to { transform: translate(-16vmax, 8vmax) scale(.9); } }
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-5%, 3%); }
  50% { transform: translate(4%, -4%); } 75% { transform: translate(-3%, -2%); }
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .25);
}
.card { border-radius: var(--radius); padding: 22px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); min-height: 0; margin: 0; font-size: 13px; }
.error:not(:empty) { margin: 2px 0; animation: fade-in .2s var(--ease); }
.hint { font-size: 12px; margin: 0; line-height: 1.5; }

h1, h2, h3 { margin: 0 0 12px; font-weight: 600; }
h1 { font-size: 20px; } h2 { font-size: 17px; }
h3 { font-size: 12px; margin: 26px 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---------------------------------------------------------------- forms */

.field { display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.field > span.muted { font-size: 12px; }
input {
  width: 100%; padding: 10px 12px; border-radius: 11px; font: inherit; font-size: 14px;
  color: var(--text); background: rgba(0, 0, 0, .22); border: 1px solid var(--border); outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input::placeholder { color: #5f656e; }
input:focus { border-color: var(--border-strong); background: rgba(0, 0, 0, .3); box-shadow: 0 0 0 3px rgba(255, 255, 255, .04); }
.stack-form { display: grid; gap: 14px; }
.stack-form h2 { margin-bottom: 0; }
.stack-form > .btn:not(.wide) { justify-self: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 18px; }
.collapsible { overflow: hidden; transition: max-height .25s var(--ease), opacity .2s, margin .25s var(--ease); max-height: 90px; }
.collapsible.collapsed { max-height: 0; opacity: 0; margin-top: -14px; pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 11px; padding: 9px 15px; font: inherit; font-size: 14px;
  font-weight: 500; cursor: pointer; color: var(--text); background: var(--surface-2); white-space: nowrap;
  transition: background .15s, transform .1s var(--ease), opacity .15s;
}
.btn:hover { background: rgba(255, 255, 255, .1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { color: #111317; background: var(--text); border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(229, 72, 77, .25); }
.btn.danger:hover { background: rgba(229, 72, 77, .1); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn.danger.solid:hover { background: #ef5b60; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.wide { width: 100%; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
svg { flex: none; }
.icon-btn svg, .tab svg, .empty-icon svg, .dd svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg { width: 16px; height: 16px; }

/* Segmented control (replaces native <select> for short choices). */
.segmented {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--border);
}
.segmented .seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 9px; background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: transform .28s var(--ease), width .28s var(--ease);
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px;
  padding: 7px 10px; border-radius: 9px; cursor: pointer; transition: color .2s;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-checked="true"] { color: var(--text); }

/* Custom dropdown (replaces native <select>). */
.dd { position: relative; }
.dd-trigger {
  display: flex; align-items: center; gap: 10px; min-width: 190px; max-width: 260px; padding: 6px 10px 6px 12px;
  border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .05); color: var(--text);
  font: inherit; cursor: pointer; text-align: left; transition: background .15s, border-color .15s;
}
.dd-trigger:hover, .dd.open .dd-trigger { background: rgba(255, 255, 255, .09); border-color: var(--border-strong); }
.dd-text { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.dd-text b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-text span { font-size: 11px; color: var(--muted); }
.dd-chevron { width: 14px; height: 14px; color: var(--muted); transition: transform .25s var(--ease); }
.dd.open .dd-chevron { transform: rotate(180deg); }
.dd-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 100%; width: max-content; max-width: 320px; z-index: 30;
  padding: 6px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  transform-origin: top left; animation: pop-in .18s var(--ease);
  max-height: 360px; overflow-y: auto;
}
.dd-menu.closing { animation: pop-out .12s ease-in forwards; pointer-events: none; }
.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.dd-item:hover, .dd-item:focus-visible { background: var(--hover); outline: none; }
.dd-item .dd-text b { font-weight: 500; }
.dd-check { width: 14px; height: 14px; color: var(--text); opacity: 0; }
.dd-item[aria-selected="true"] .dd-check { opacity: 1; }
.dd-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.dd-action { color: var(--muted); }
.dd-action:hover { color: var(--text); }

/* Modal dialog (replaces confirm/prompt). */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 9, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade-in .2s ease-out;
}
.modal {
  width: min(420px, 100%); padding: 22px; border-radius: 20px; background: var(--glass-strong);
  border: 1px solid var(--glass-border); box-shadow: 0 30px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: grid; gap: 14px;
  animation: modal-in .26s var(--ease);
}
.modal h2 { margin: 0; }
.modal p { margin: 0; color: var(--muted); line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal-backdrop.closing { animation: fade-out .16s ease-in forwards; pointer-events: none; }
.modal-backdrop.closing .modal { animation: modal-out .16s ease-in forwards; }

/* ---------------------------------------------------------------- login */

.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(360px, 100%); display: grid; gap: 14px; }
.brand { text-align: center; margin-bottom: 8px; }
.brand h1 { margin: 12px 0 2px; }
.brand p { margin: 0; font-size: 13px; }

/* Login hero: a looping scan of a mods folder, one file gets caught. */
.login-split { grid-template-columns: minmax(0, 520px) 360px; gap: 72px; place-content: center; }
.hero { display: grid; gap: 18px; animation: drop-in .6s var(--ease); }
.hero-mark { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.hero-title { margin: 0; font: 600 52px/1.04 "Segoe UI Variable Display", "Segoe UI", sans-serif; letter-spacing: -.02em; }
.hero-text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 440px; }
.scan-demo { position: relative; overflow: hidden; border-radius: var(--radius); padding: 14px 16px; }
.scan-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 12px "Cascadia Mono", Consolas, monospace; margin-bottom: 8px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.4s ease-in-out infinite; }
.scan-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font: 13px "Cascadia Mono", Consolas, monospace; }
.scan-rows li {
  display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 10px;
  animation: row-check 6s var(--ease) infinite;
}
.scan-rows li:nth-child(2) { animation-delay: .35s; }
.scan-rows li:nth-child(3) { animation-delay: .7s; }
.scan-rows li:nth-child(4) { animation-delay: 1.05s; }
.scan-rows li:nth-child(5) { animation-delay: 1.4s; }
.scan-rows i { font-style: normal; color: var(--ok); }
.scan-rows li.hit { animation-name: row-hit; }
.scan-rows li.hit i { color: var(--danger); }
.beam {
  position: absolute; left: 0; right: 0; top: 0; height: 46px; pointer-events: none;
  background: linear-gradient(transparent, rgba(122, 162, 200, .10), transparent);
  border-bottom: 1px solid rgba(122, 162, 200, .35);
  animation: beam 6s var(--ease) infinite;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 12.5px; }

@keyframes blink { 50% { opacity: .3; } }
@keyframes beam { 0% { transform: translateY(20px); opacity: 0; } 8% { opacity: 1; } 40% { transform: translateY(210px); opacity: 1; } 50%, 100% { transform: translateY(210px); opacity: 0; } }
@keyframes row-check { 0%, 8% { opacity: .35; } 16%, 92% { opacity: 1; } 100% { opacity: .35; } }
@keyframes row-hit {
  0%, 8% { opacity: .35; background: transparent; }
  16%, 88% { opacity: 1; background: rgba(229, 72, 77, .12); box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .35); }
  100% { opacity: .35; background: transparent; }
}

/* ------------------------------------------------------------- island */

.island {
  position: sticky; top: 14px; z-index: 20; width: min(1200px, calc(100% - 32px)); margin: 14px auto 0;
  display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 16px; border-radius: 20px;
  background: rgba(24, 27, 33, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 32px rgba(0, 0, 0, .35);
  animation: drop-in .45s var(--ease);
}
.brand-inline { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.tabs { position: relative; display: flex; gap: 2px; flex: 1; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 7px;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px;
  padding: 8px 12px; border-radius: 11px; cursor: pointer; transition: color .2s;
}
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab-indicator {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 11px; background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .32s var(--ease), width .32s var(--ease), opacity .2s;
}
.me { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--border); flex: none;
}
.me-text { display: grid; line-height: 1.2; font-size: 13px; }
.me-text span { font-size: 11px; }

/* --------------------------------------------------------- tab panels */

.tab-panel { width: min(1200px, calc(100% - 32px)); margin: 20px auto 40px; }
.layout { display: grid; grid-template-columns: 330px 1fr; gap: 16px; align-items: start; }
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0 0 2px; }
.section-head p { margin: 0; }

.empty-state { text-align: center; margin-top: 50px; padding: 34px; }
.empty-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.empty-icon svg { width: 22px; height: 22px; }
.empty-state .inline-form { text-align: left; }

/* ------------------------------------------------------------- checks */

.list-card { padding: 16px; position: sticky; top: 92px; max-height: calc(100vh - 112px); display: flex; flex-direction: column; }
.new-check { display: grid; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.list-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 4px 8px; text-transform: uppercase; letter-spacing: .06em; }
.check-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 2px; }
.check-list::-webkit-scrollbar { width: 6px; }
.check-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
.check-item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 11px; border-radius: 12px; cursor: pointer;
  transition: background .15s;
}
.check-item:hover { background: var(--surface-2); }
.check-item:active { transform: scale(.99); }
.check-item.active { background: rgba(255, 255, 255, .09); }
.check-item .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-item .time { font-size: 12px; color: var(--muted); grid-column: 1; }
.check-item .badge { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.empty { text-align: center; padding: 20px 0; font-size: 13px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending, .badge.connected, .badge.scanning { color: var(--accent); }
.badge.connected::before, .badge.scanning::before { animation: pulse 1.4s ease-in-out infinite; }
.badge.clean { color: var(--ok); }
.badge.suspicious { color: var(--warn); }
.badge.detected { color: var(--danger); }
.badge.expired { color: var(--muted); }

.detail { min-height: 460px; position: relative; overflow: hidden; }

/* Detection stamp: slams in over the card like a hammer, then fades. */
.mogged-stamp {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 40;
  font: 900 clamp(64px, 13vw, 150px)/1 "Segoe UI Variable Display", "Segoe UI", sans-serif;
  color: var(--danger); letter-spacing: -.05em; text-transform: uppercase;
  text-shadow: 0 8px 36px rgba(229, 72, 77, .55), 0 2px 0 rgba(0, 0, 0, .3);
  animation: mogged-slam .55s cubic-bezier(.2, 1.5, .3, 1) forwards;
}
.mogged-stamp.out { animation: mogged-out .42s ease-in forwards; }
.mogged-hit { display: inline-block; animation: mogged-shake .5s cubic-bezier(.36, .07, .19, .97); color: var(--danger); }
@keyframes mogged-slam {
  0% { opacity: 0; transform: scale(3.2) rotate(-16deg); filter: blur(4px); }
  55% { opacity: 1; transform: scale(.86) rotate(-9deg); filter: blur(0); }
  72% { transform: scale(1.06) rotate(-9deg); }
  100% { opacity: 1; transform: scale(1) rotate(-9deg); }
}
@keyframes mogged-out { to { opacity: 0; transform: scale(1.18) rotate(-9deg); } }
@keyframes mogged-shake {
  0%, 100% { transform: translateX(0); } 10% { transform: translateX(-9px); } 20% { transform: translateX(8px); }
  30% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 50% { transform: translateX(-5px); }
  60% { transform: translateX(4px); } 70% { transform: translateX(-3px); } 80% { transform: translateX(2px); }
}
.placeholder { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 400px; font-size: 13px; text-align: center; }
.placeholder b { color: var(--text); font-size: 15px; font-weight: 600; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.detail-head h2 { margin: 0; font-size: 20px; }
.detail-head .meta { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Check lifecycle: Код выдан → Подключился → Сканирование → Результат */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.step { display: grid; gap: 8px; font-size: 12px; color: var(--muted); transition: color .3s; }
.step i { display: block; height: 3px; border-radius: 3px; background: var(--border); position: relative; overflow: hidden; }
.step i::after {
  content: ""; position: absolute; inset: 0; background: var(--text); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.step.done, .step.current { color: var(--text); }
.step.done i::after { transform: scaleX(1); }
.step.current i::after { transform: scaleX(.5); animation: step-pulse 1.6s ease-in-out infinite; }
.steps.final .step.current i::after { transform: scaleX(1); animation: none; }

.pin-box { text-align: center; padding: 26px 12px 8px; }
.pin { display: flex; justify-content: center; gap: 8px; margin: 14px 0 18px; user-select: all; }
.pin span {
  width: 52px; height: 64px; display: grid; place-items: center; border-radius: 14px;
  font: 500 32px "Cascadia Mono", Consolas, monospace; background: rgba(0, 0, 0, .25); border: 1px solid var(--border);
}
.pin span:nth-child(4) { margin-left: 12px; }
.pin-actions { display: flex; justify-content: center; gap: 8px; }
.pin-cmd { margin-top: 20px; display: grid; gap: 10px; justify-items: center; }
.pin-cmd code {
  display: block; width: 100%; max-width: 100%; padding: 10px 12px; border-radius: 10px; text-align: left;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border); color: #b9c0ca;
  font: 11.5px/1.5 "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere;
}
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; text-align: left; }
.howto div { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); font-size: 13px; line-height: 1.45; }
.howto b { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; letter-spacing: .04em; }
.countdown { font-variant-numeric: tabular-nums; }

.progress { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; margin: 14px 0 8px; }
.progress > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--text); transition: width .6s var(--ease); }
.progress.indeterminate > i { width: 30% !important; animation: slide 1.4s ease-in-out infinite; }
.scan-box { padding: 18px 0 6px; }
.scan-box .big { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scan-box.stalled .big, .scan-box.stalled .scan-text { color: var(--warn); }
.scan-box.stalled .progress > i { background: var(--warn); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 18px; }
.stat { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); }
.stat b { display: block; font-size: 17px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }

.verdict { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); }
.verdict-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; flex: none; }
.verdict-dot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.verdict b { display: block; font-size: 16px; }
.verdict span { font-size: 13px; color: var(--muted); }
.verdict.clean { color: var(--ok); }
.verdict.suspicious { color: var(--warn); }
.verdict.detected { color: var(--danger); background: rgba(229, 72, 77, .05); border-color: rgba(229, 72, 77, .2); }

.finding { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 8px; }
.finding .kind { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.finding .kind::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.finding.detected .kind::before { background: var(--danger); }
.finding.suspicious .kind::before { background: var(--warn); }
.finding .path { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-all; margin: 4px 0 0; }
.finding ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; }

/* ------------------------------------------------- members / accounts */

.member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.member { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; transition: background .15s; }
.member:hover { background: rgba(255, 255, 255, .03); }
.member .avatar { width: 34px; height: 34px; }
.member-main { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.member-main b { font-weight: 500; }
.member-main span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-actions { display: flex; gap: 6px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--muted); white-space: nowrap; }
.tag.owner { color: var(--warn); background: rgba(212, 167, 44, .1); }
.tag.client, .tag.admin { color: var(--accent); background: rgba(122, 162, 200, .1); }

.danger-zone {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding: 14px 16px;
  border-radius: 14px; border: 1px solid rgba(229, 72, 77, .2);
}
.danger-zone p { margin: 2px 0 0; }

.users-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }

/* ----------------------------------------------------------- overview */

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stats-row .stat { background: var(--glass); border-color: var(--glass-border); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); padding: 16px 18px; }
.stats-row .stat b { font-size: 24px; }
/* Inside a card the glass-on-glass tiles look raised — flatten and inset them. */
.card .stats-row .stat { background: rgba(0, 0, 0, .18); border-color: var(--border); backdrop-filter: none; -webkit-backdrop-filter: none; padding: 13px 15px; }
.card .stats-row .stat b { font-size: 20px; }
.overview-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.server-cards { display: grid; gap: 8px; }

/* Subscription box on the server tab. */
.sub-box { margin: 22px 0 6px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); }
.sub-box h3 { margin: 0 0 10px; }
.sub-status { font-size: 14px; }
.sub-status.ok { color: var(--ok); }
.sub-status.soon { color: var(--warn); }
.sub-status.expired { color: var(--danger); font-weight: 500; }
.sub-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* Idle check pane: server summary header. */
.dash-head { margin-bottom: 18px; }
.dash-head h2 { margin: 0 0 4px; }
.dash-head p { margin: 0; }
.detail .dash-stats { margin-bottom: 0; }

/* Overview distribution bar. */
.dist { margin-bottom: 16px; }
.dist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dist-head h3 { margin: 0; }
.dist-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--border); margin: 14px 0 12px; }
.dist-bar .seg { height: 100%; width: 0; transition: width .6s var(--ease); }
.seg.detected, .dot.detected { background: var(--danger); }
.seg.suspicious, .dot.suspicious { background: var(--warn); }
.seg.clean, .dot.clean { background: var(--ok); }
.dot.pending { background: var(--accent); }
.dist-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
.dist-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dist-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; }

/* Profile: account card beside the password form. */
.profile-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.profile-id { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-id b { display: block; font-size: 18px; margin-bottom: 4px; }
.avatar.big { width: 52px; height: 52px; font-size: 19px; flex: none; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.info-list dt { color: var(--muted); font-size: 13px; }
.info-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0 0; }
.chip-list li { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.server-card {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); cursor: pointer; transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.server-card:hover { background: rgba(255, 255, 255, .04); border-color: var(--border-strong); transform: translateY(-1px); }
.server-card .sc-meta { font-size: 12px; color: var(--muted); }
.server-card .sc-right { grid-row: 1 / span 2; grid-column: 2; align-self: center; display: flex; gap: 16px; text-align: right; }
.server-card .sc-right div { display: grid; font-size: 11px; color: var(--muted); }
.server-card .sc-right b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: opacity .2s, transform .3s var(--ease); z-index: 120; font-size: 13px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.enter { animation: panel-in .45s var(--ease); }

/* ---------------------------------------------------------- keyframes */

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes item-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.97) translateY(-4px); } }
@keyframes modal-in { from { opacity: 0; transform: scale(.95) translateY(8px); } }
@keyframes modal-out { to { opacity: 0; transform: scale(.97) translateY(6px); } }
@keyframes char-in { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes step-pulse { 50% { opacity: .45; } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

@media (max-width: 1000px) {
  .layout, .overview-grid, .users-layout, .profile-layout { grid-template-columns: 1fr; }
  .login-split { grid-template-columns: minmax(0, 360px); }
  .hero { display: none; }
  .list-card { position: static; max-height: 380px; }
  .island { flex-wrap: wrap; gap: 10px; position: static; }
  .tabs { order: 3; flex-basis: 100%; overflow-x: auto; }
  .me-text { display: none; }
  .stats, .stats-row, .howto, .grid-2 { grid-template-columns: 1fr 1fr; }
  .pin span { width: 40px; height: 52px; font-size: 24px; }
}

a.brand-inline { color: inherit; text-decoration: none; }
.back-link { justify-self: center; color: var(--muted); font-size: 13px; text-decoration: none; transition: color .15s; }
.back-link:hover { color: var(--text); }
