/* ================= Tokens ================= */
:root {
  --accent: #e36c43;
  --accent-hi: #f08a64;
  --accent-lo: #c9542d;
  --accent-soft: rgba(227, 108, 67, .14);
  --accent-line: rgba(227, 108, 67, .38);
  --on-accent: #fff;

  --bg: #141414;
  --bg-2: #171717;
  --surface: #1b1b1b;
  --surface-2: #212121;
  --surface-3: #2a2a2a;
  --border: rgba(255, 255, 255, .07);
  --border-hi: rgba(255, 255, 255, .13);
  --text: #f2f2f2;
  --text-2: #b8b8b8;
  --muted: #7f7f7f;
  --success: #3ecf8e;
  --danger: #ef5b5b;
  --warn: #f2b84b;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --shadow-sm: 0 6px 20px -8px rgba(0, 0, 0, .6);
  --glow: rgba(255, 255, 255, .035);
  --modal: #171717;
  --modal-card: #1c1c1c;

  --radius: 16px;
  --radius-sm: 11px;
  --top: 64px;
  --side: 264px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --accent: #dd6236;
  --accent-hi: #ea7d55;
  --accent-lo: #c24f25;
  --accent-soft: rgba(221, 98, 54, .11);
  --accent-line: rgba(221, 98, 54, .35);
  --bg: #f3f3f3;
  --bg-2: #eeeeee;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --surface-3: #ececec;
  --border: rgba(0, 0, 0, .08);
  --border-hi: rgba(0, 0, 0, .15);
  --text: #141414;
  --text-2: #4a4a4a;
  --muted: #8a8a8a;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .2);
  --shadow-sm: 0 6px 18px -8px rgba(0, 0, 0, .15);
  --glow: rgba(255, 255, 255, .7);
  --modal: #ffffff;
  --modal-card: #f7f7f7;
  color-scheme: light;
}

/* ================= Base ================= */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
html.no-scroll, html.no-scroll body { overflow: hidden; height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-line); }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ================= Backdrop ================= */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1100px 560px at 50% -12%, var(--glow), transparent 70%);
}

/* плавная смена темы */
html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease),
    box-shadow .45s var(--ease), fill .45s var(--ease), stroke .45s var(--ease),
    opacity .45s var(--ease), transform .45s var(--ease) !important;
}

/* ================= Topbar ================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--top); z-index: 50;
  display: flex; align-items: center; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { width: 100%; max-width: 1120px; margin: 0 auto; transition: max-width .3s var(--ease); display: flex; align-items: center; justify-content: space-between; }
body.in-app .topbar-inner { max-width: 100%; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand-dis { color: var(--text); }
.brand-actor { color: var(--accent); }

.pill {
  display: flex; align-items: center; height: 38px; padding: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.pill button { height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 9px; transition: background .2s; }
.pill button:hover { background: var(--surface-3); }
.pill button:active { transform: scale(.96); }
.pill-sep { width: 1px; height: 18px; background: var(--border-hi); margin: 0 2px; }
.pill-code { font-weight: 700; font-size: 13px; letter-spacing: .02em; min-width: 20px; }
.flag { width: 20px; height: 20px; border-radius: 50%; overflow: hidden; display: block; box-shadow: 0 0 0 1px var(--border-hi); transition: transform .45s var(--spring); }
.flag svg { width: 100%; height: 100%; display: block; stroke: none; }
.pill-lang.flip .flag { transform: rotateY(180deg) scale(.8); }
.pill-theme svg { font-size: 17px; color: var(--text-2); transition: transform .5s var(--spring), opacity .25s; }
.pill-theme { position: relative; width: 36px; justify-content: center; padding: 0 !important; }
.pill-theme svg { position: absolute; }
.i-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="light"] .i-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
:root[data-theme="light"] .i-sun { opacity: 1; transform: none; }

.burger { display: none; width: 38px; height: 38px; border-radius: 10px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.burger span { width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .2s; }
body.drawer-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.drawer-open .burger span:nth-child(2) { opacity: 0; }
body.drawer-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

#app { padding-top: var(--top); }

/* ================= Buttons ================= */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s, background .2s, border-color .2s, opacity .2s;
}
.btn svg { font-size: 18px; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, var(--accent-lo));
  box-shadow: 0 8px 24px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn-primary:hover { box-shadow: 0 12px 32px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-hi); background: var(--surface-3); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s, transform .2s; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { font-size: 18px; }

/* ================= Login ================= */
.login { height: calc(100dvh - var(--top)); display: grid; place-items: center; padding: 16px; }
.auth {
  width: min(460px, 100%); position: relative; overflow: hidden;
  border-radius: 26px; text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent);
  animation: fade .5s var(--ease) both;
}
.auth-main {
  position: relative; padding: 44px 40px 34px;
  background: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.auth-main::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 160px; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.auth-logo { width: 60px; height: 60px; border-radius: 17px; margin: 0 auto 24px; display: block; box-shadow: 0 12px 32px -10px var(--accent); }
.auth h1 { margin: 0 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.auth h1 span { color: var(--accent); }
.auth p { margin: 0 auto 30px; max-width: 340px; color: var(--text-2); line-height: 1.55; font-size: 14.5px; }
.auth .btn-discord svg { font-size: 22px; fill: currentColor; stroke: none; }

@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ================= App shell ================= */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: calc(100dvh - var(--top)); }
.side {
  position: sticky; top: var(--top); height: calc(100dvh - var(--top));
  display: flex; flex-direction: column; padding: 20px 14px;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
  backdrop-filter: blur(12px);
}
.side-group { margin-bottom: 18px; }
.side-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 12px 8px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; position: relative; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 500; font-size: 14.5px;
  transition: color .2s, background .2s;
}
.side-link svg { font-size: 19px; transition: transform .35s var(--spring); }
.side-link:hover { color: var(--text); background: var(--surface-2); }
.side-link:hover svg { transform: scale(1.12) rotate(-4deg); }
.side-link.active { color: var(--text); background: var(--accent-soft); }
.side-link.active svg { color: var(--accent); }
.side-link.active::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: grow .35s var(--ease);
}
@keyframes grow { from { transform: scaleY(0); } }
.side-count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--surface-3); color: var(--text-2); }
.side-link.active .side-count { background: var(--accent); color: #fff; }

.side-user {
  margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 10px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.side-user img { width: 38px; height: 38px; border-radius: 50%; }
.side-user-meta { min-width: 0; flex: 1; }
.side-user-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-bal { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.side-user .icon-btn:hover { color: var(--danger); }

.content { padding: 34px 40px 60px; width: 100%; min-width: 0; }
.view { animation: rise .45s var(--ease) both; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.page-sub { color: var(--muted); margin: 6px 0 0; font-size: 14.5px; }
.section-title { font-size: 16px; font-weight: 700; margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }

.scrim { position: fixed; inset: var(--top) 0 0 0; background: rgba(0, 0, 0, .5); z-index: 39; opacity: 0; pointer-events: none; transition: opacity .3s; }

/* ================= Cards ================= */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.balance-card {
  position: relative; overflow: hidden; padding: 26px; min-height: 180px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
    var(--surface);
  border-color: var(--accent-line);
}
.balance-card::after {
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px;
  background: url(/static/Images/Logo.png) center/contain no-repeat; opacity: .07; transform: rotate(-14deg);
}
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: .55em; color: var(--muted); font-weight: 700; margin-left: 4px; }
.balance-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.stat-card { padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-card .stat-value { font-size: 32px; }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.stat-icon svg { font-size: 19px; }

.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.profile-head img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.profile-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.profile-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* list rows */
.rows { display: flex; flex-direction: column; overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); animation: rise .4s var(--ease) both; }
.row:last-child { border-bottom: 0; }
.row-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); flex-shrink: 0; }
.row-icon svg { font-size: 18px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14.5px; }
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.row-amount.plus { color: var(--success); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.badge.wait { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.badge.off { color: var(--muted); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.plain::before { display: none; }

.empty-mini { padding: 34px; text-align: center; color: var(--muted); font-size: 14px; }

/* ================= Servers ================= */
.toolbar { display: flex; gap: 10px; align-items: center; }
.guilds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guild {
  position: relative; display: flex; flex-direction: column; gap: 18px; padding: 20px; overflow: hidden; cursor: pointer;
  animation: rise .45s var(--ease) both;
}
.guild::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 45%);
}
.guild:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow); }
.guild:hover::before { opacity: 1; }
.guild-top { display: flex; align-items: center; gap: 14px; position: relative; }
.guild-avatar {
  width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0; object-fit: cover;
  display: grid; place-items: center; font-weight: 700; font-size: 18px; color: var(--text);
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--border);
  transition: border-radius .35s var(--ease), transform .35s var(--spring);
}
.guild:hover .guild-avatar { border-radius: 50%; transform: scale(1.05); }
.guild-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-invite { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.guild-invite.none { color: var(--muted); font-weight: 500; }
.guild-meta { min-width: 0; flex: 1; }
.guild-arrow { color: var(--muted); font-size: 18px; transition: transform .3s var(--ease), color .2s; }
.guild:hover .guild-arrow { transform: translateX(4px); color: var(--accent); }
.guild-stats { display: flex; gap: 8px; position: relative; }
.guild-stat { flex: 1; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.guild-stat-v { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 7px; }
.guild-stat-l { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); animation: pulse 2s infinite; }
.dot.gray { background: var(--muted); box-shadow: none; animation: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

/* bought servers */
.guild.bought { border-color: var(--accent-line); background: radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); }
.guild-bought { position: relative; align-self: flex-start; flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.guild-bought svg { font-size: 14px; }
.guild-invite svg { font-size: 13px; }

/* guild page */
.guild-hero { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--border); margin-bottom: 22px; background: var(--surface); }
.guild-banner { height: 150px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%), linear-gradient(135deg, var(--surface-3), var(--surface)); background-size: cover; background-position: center; }
.guild-hero-body { display: flex; align-items: flex-end; gap: 20px; padding: 0 26px 24px; margin-top: -44px; flex-wrap: wrap; position: relative; }
.guild-hero .guild-avatar { width: 92px; height: 92px; border-radius: 26px; font-size: 30px; border: 4px solid var(--surface); }
.guild-hero h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.guild-hero-info { flex: 1; min-width: 200px; padding-bottom: 4px; }
.guild-hero-actions { display: flex; gap: 10px; padding-bottom: 4px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 18px; transition: color .2s, gap .25s var(--ease); }
.back:hover { color: var(--text); gap: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.notice { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: var(--radius); border: 1px dashed var(--accent-line); background: var(--accent-soft); margin-bottom: 22px; flex-wrap: wrap; }
.notice-text { flex: 1; min-width: 220px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.notice-text b { color: var(--text); display: block; margin-bottom: 2px; }

/* ================= Empty state ================= */
.empty { min-height: calc(100dvh - var(--top) - 200px); display: grid; place-items: center; text-align: center; }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.empty-icon svg { font-size: 24px; }
.empty h2 { margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0 auto 22px; color: var(--muted); max-width: 380px; line-height: 1.55; font-size: 14.5px; }

/* orders */
.orders { display: grid; gap: 14px; }
.order { padding: 18px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; animation: rise .45s var(--ease) both; }
.order:hover { border-color: var(--border-hi); }
.order .guild-avatar { width: 46px; height: 46px; border-radius: 14px; font-size: 15px; }
.order-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-sub { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.order-sub span { display: inline-flex; align-items: center; gap: 5px; }
.order-right { text-align: right; display: flex; align-items: center; gap: 18px; }
.order-total { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); margin-top: 10px; overflow: hidden; width: 160px; margin-left: auto; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); border-radius: inherit; transition: width .8s var(--ease); }

/* ================= Skeleton ================= */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ================= Inputs ================= */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; }
.field-label em { font-style: normal; color: var(--muted); font-weight: 500; }
.input {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .25s, background .2s;
}
.input:hover { border-color: var(--border-hi); }
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; }
.input input::placeholder { color: var(--muted); }
.input > svg { color: var(--muted); font-size: 18px; transition: color .2s; }
.input:focus-within > svg { color: var(--accent); }
.input-suffix { color: var(--muted); font-weight: 700; }
.input-lg { height: 60px; }
.input-lg input { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 15%, transparent); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); transition: all .2s var(--ease); }
.chip:hover { border-color: var(--accent-line); color: var(--text); transform: translateY(-1px); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* custom select */
.select { position: relative; }
.select-btn {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); transition: border-color .2s, box-shadow .25s;
}
.select-btn:hover { border-color: var(--border-hi); }
.select.open .select-btn { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.select-value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.select-value.placeholder { color: var(--muted); }
.select-caret { color: var(--muted); font-size: 18px; transition: transform .3s var(--spring); }
.select.open .select-caret { transform: rotate(180deg); color: var(--accent); }
.select-media { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--surface-3); object-fit: cover; }
.select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30;
  max-height: 260px; overflow: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-hi); border-radius: 14px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top; pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease);
}
.select.open .select-menu { opacity: 1; transform: none; pointer-events: auto; }
.select-search { margin-bottom: 6px; height: 40px; }
.select-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14px; transition: background .15s; }
.select-option:hover, .select-option.hover { background: var(--surface-3); }
.select-option.selected { color: var(--accent); }
.select-option .check { margin-left: auto; opacity: 0; color: var(--accent); }
.select-option.selected .check { opacity: 1; }
.select-option-sub { margin-left: auto; color: var(--muted); font-size: 12px; }
.select-empty { padding: 14px; color: var(--muted); font-size: 13px; text-align: center; }

/* segmented */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { position: relative; z-index: 1; height: 38px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: color .25s; white-space: nowrap; padding: 0 8px; }
.seg button.on { color: var(--text); }
.seg-badge { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--success); margin-left: 5px; }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 9px; background: var(--surface); border: 1px solid var(--border-hi); box-shadow: var(--shadow-sm); transition: transform .35s var(--spring), width .35s var(--spring); }

/* stepper */
.stepper { display: flex; align-items: center; height: 48px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); transition: border-color .2s, box-shadow .25s; }
.stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper button { width: 46px; height: 100%; display: grid; place-items: center; color: var(--text-2); font-size: 18px; transition: color .2s, transform .15s; }
.stepper button:hover { color: var(--accent); }
.stepper button:active { transform: scale(.85); }
.stepper input { flex: 1; min-width: 0; text-align: center; border: 0; outline: 0; background: none; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* range */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; outline: 0; margin: 6px 0 0;
  background: linear-gradient(90deg, var(--accent) 0 var(--p, 0%), var(--surface-3) var(--p, 0%) 100%); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); cursor: grab; transition: transform .2s var(--spring); }
.range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); cursor: grab; }

/* ================= Tooltip ================= */
.tip {
  position: fixed; z-index: 200; max-width: 260px; padding: 10px 12px; border-radius: 11px;
  background: var(--text); color: var(--bg); font-size: 12.5px; line-height: 1.45; font-weight: 500;
  pointer-events: none; opacity: 0; transform: translateY(4px) scale(.96);
  transition: opacity .18s, transform .22s var(--spring);
  box-shadow: var(--shadow);
}
.tip.show { opacity: 1; transform: none; }
.tip::after { content: ""; position: absolute; left: var(--ax, 50%); top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--text); }
.tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--text); }

/* ================= Modal ================= */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-bg { position: absolute; inset: 0; background: rgba(5, 5, 8, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s both; }
.modal {
  position: relative; width: min(var(--w, 480px), 100%); max-height: calc(100dvh - 32px); overflow: auto;
  scrollbar-width: none;
  background: var(--modal); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow);
  animation: pop .4s var(--spring) both;
}
.modal::-webkit-scrollbar { display: none; }
.modal .input, .modal .select-btn, .modal .seg, .modal .stepper, .modal .method, .modal .chip, .modal .plan-summary, .modal .btn-ghost { background: var(--modal-card); }
.modal .btn-ghost:hover { background: var(--surface-3); }
.modal .chip.on, .modal .method.on { background: var(--accent-soft); }
.modal-wrap.closing .modal-bg { animation: fade .2s reverse both; }
.modal-wrap.closing .modal { animation: pop-out .2s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 0; }
.modal-head h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.modal-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.modal-foot { display: flex; align-items: center; gap: 12px; padding: 16px 24px 24px; border-top: 1px solid var(--border); }

/* payment methods */
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.method:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.method.on { border-color: var(--accent); background: var(--accent-soft); }
.method-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.method-icon svg { font-size: 19px; }
.method-name { font-weight: 700; font-size: 14px; }
.method-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.method-radio { position: absolute; top: 10px; right: 10px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-hi); transition: all .25s var(--spring); }
.method.on .method-radio { border: 5px solid var(--accent); }

/* plans */
.plan-groups { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; gap: 12px 44px; }
.plan-group-head { align-self: end; }
.plan-group-head h4 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.plan-group-head h4 svg { color: var(--accent); }
.plan-group-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.plans { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; }
.plan {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 16px; border-radius: 16px;
  background: var(--modal-card); border: 1px solid var(--border);
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s, background .25s;
}
.plan:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.plan.featured { background: radial-gradient(120% 80% at 100% 0%, var(--accent-soft), transparent 60%), var(--modal-card); border-color: var(--accent-line); }
.plan-tag { position: absolute; top: -10px; right: 14px; height: 22px; padding: 0 10px; border-radius: 20px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; }
.plan-name { font-weight: 700; font-size: 15px; }
.plan-price { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 12px; white-space: nowrap; }
.plan-price small { font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.feats { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.feat { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.feat i { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.feat i svg { font-size: 12px; stroke-width: 3; }
.feat.no { color: var(--muted); }
.feat.no i { background: var(--surface-3); color: var(--muted); }
.feat.random i { background: var(--accent-soft); color: var(--accent); }
.feat.random i svg { stroke-width: 2.6; }
.feat[data-tip] span { border-bottom: 1px dashed var(--border-hi); cursor: help; transition: color .2s, border-color .2s; }
.feat[data-tip]:hover span { color: var(--text); border-color: var(--accent); }

.plan-summary { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.plan-summary .row-icon { background: var(--accent-soft); color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.total { flex: 1; }
.total-label { font-size: 12.5px; color: var(--muted); }
.total-value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.total-value.short { color: var(--danger); }
.total-label s { margin-left: 6px; color: var(--muted); }
.hint-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-hi); line-height: 1.45; }
.hint-box svg { font-size: 16px; color: var(--accent); }
.hint-line { font-size: 12.5px; color: var(--muted); }
.hint-line b { color: var(--text-2); }


/* ================= Toasts ================= */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 380px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-hi); box-shadow: var(--shadow); font-size: 14px;
  animation: toast-in .45s var(--spring) both;
}
.toast.out { animation: toast-out .3s var(--ease) both; }
.toast-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.toast.ok .toast-icon { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.toast.err .toast-icon { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.toast.info .toast-icon { background: var(--accent-soft); color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ripple */
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .35); animation: ripple .6s var(--ease); pointer-events: none; z-index: 0; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* theme switch reveal */

/* ================= Responsive ================= */
@media (max-width: 1400px) { .clients-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1150px) {
  .plan-groups { grid-template-columns: 1fr !important; grid-auto-flow: row; }
  .plans { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 1100px) {
  .guilds, .clients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .guild-top-grid { grid-template-columns: 1fr; }
  .balance-card { grid-column: 1 / -1; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .burger { display: flex; }
  body:not(.in-app) .burger { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: var(--top); bottom: 0; width: 280px; height: auto; z-index: 40;
    background: var(--bg-2); transform: translateX(-100%); transition: transform .35s var(--ease);
  }
  body.drawer-open .side { transform: none; }
  body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .content { padding: 24px 16px 48px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 600px) {
  .stats, .info-grid, .form-grid, .methods, .guilds, .clients-grid { grid-template-columns: 1fr; }
  .clients-filters { width: 100%; }
  .clients-filters .select { flex: 1; width: auto; }
  .stat-value { font-size: 34px; }
  .order { grid-template-columns: auto 1fr; }
  .order-right { grid-column: 1 / -1; text-align: left; display: flex; justify-content: space-between; align-items: center; }
  .progress { margin: 0; }
  .auth-main { padding: 34px 22px 28px; }
    .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .page-title { font-size: 24px; }
  .toasts { left: 16px; right: 16px; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================= Guild settings ================= */
.settings-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.settings-card { padding: 20px; }
.settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.settings-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.settings-title svg { color: var(--accent); font-size: 17px; }
.settings-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.settings-empty { color: var(--muted); font-size: 13px; }
.clan-row { display: flex; gap: 10px; margin-top: 14px; }
.clan-row .input { flex: 1; height: 44px; }
.game-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.game-chips.selected { margin-top: 0; min-height: 34px; align-items: center; }
.game-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; animation: rise .3s var(--ease) both; }
.game-chip img, .game-noicon { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; }
.game-noicon { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.game-chip-x { width: 20px; height: 20px; margin-right: -6px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.game-chip-x:hover { background: var(--surface-3); color: var(--danger); }
.game-results { height: 336px; display: flex; flex-direction: column; gap: 2px; }
.game-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 11px; text-align: left; transition: background .15s; }
.game-row:hover { background: var(--surface-3); }
.game-row img, .game-row .game-noicon { width: 32px; height: 32px; border-radius: 9px; }
.game-row-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-hi); display: grid; place-items: center; color: transparent; transition: all .2s var(--spring); }
.game-check svg { font-size: 13px; stroke-width: 3; }
.game-row.on .game-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.game-hint { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.game-hint svg { font-size: 22px; }

/* ================= Server clients ================= */
.clients-head { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.clients-head em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 8px; }
.clients-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 500; }
.clients-filters .select { width: 190px; }
.clients-filters .select-btn { height: 42px; }
.clients-filters .seg button { height: 32px; }
.clients-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.client {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, transform .25s var(--ease); animation: rise .35s var(--ease) both;
}
button.client { width: 100%; text-align: left; cursor: pointer; }
button.client:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.client.pending { border-style: dashed; background: transparent; }
.client-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.client-avatar svg { font-size: 19px; }
.client-meta { flex: 1; min-width: 0; }
.client-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client.pending .client-name { color: var(--muted); font-weight: 500; }
.client-type { color: var(--muted); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.clan-tag { flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.nitro { display: inline-grid; place-items: center; color: #f47fff; font-size: 14px; flex-shrink: 0; }
.gender { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 15px; }
.gender.male { background: rgba(80, 140, 255, .14); color: #6ea2ff; }
.gender.female { background: rgba(255, 105, 170, .14); color: #ff7ab3; }
.gender.any { background: var(--surface-3); color: var(--muted); }

/* ================= Guild top ================= */
.guild-top-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 8px; }
.guild-top-grid .guild-hero { margin-bottom: 0; }
.guild-top-grid > .skel { min-height: 280px; border-radius: var(--radius); }
.guild-hero-stats { display: flex; gap: 10px; padding: 0 26px 24px; }
.guild-hero-stats .guild-stat { flex: 0 1 170px; }
.notice { margin-bottom: 16px; }
.guild-invite.role-owner { color: var(--warn); font-weight: 600; }
.game-chip.none { color: var(--muted); border-style: dashed; background: transparent; }
.row-amount.minus { color: var(--text); }
.tx-head { justify-content: space-between; flex-wrap: wrap; }
.tx-head .seg { font-weight: 500; }
.tx-head .seg button { height: 32px; padding: 0 14px; }

/* ================= Client profile ================= */
.client-profile { gap: 16px; padding-top: 0; }
.client-profile-head { display: flex; align-items: center; gap: 14px; }
.client-avatar.lg { width: 64px; height: 64px; }
.client-avatar.lg svg { font-size: 26px; }
.client-name.lg { font-size: 19px; font-weight: 700; }
.client-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.client-facts > div { padding: 12px 14px; border-radius: 12px; background: var(--modal-card); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.client-facts span { font-size: 12px; color: var(--muted); }
.client-facts b { font-size: 14px; font-weight: 600; }
.clan-row .btn { height: 44px; }

/* ================= Frames: guild counts, clients, transactions ================= */
.hero-counts { display: flex; gap: 14px; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.hero-counts span { display: inline-flex; align-items: center; gap: 6px; }
.hero-counts svg { font-size: 15px; color: var(--muted); }
.hero-counts b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.hero-counts .dot { width: 7px; height: 7px; }
.settings-card { display: flex; flex-direction: column; }
.game-chips.empty { flex: 1; justify-content: center; align-items: center; min-height: 80px; }
.games-empty { color: var(--muted); font-size: 13.5px; text-align: center; }
.frame-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.frame-title { font-size: 16px; font-weight: 700; }
.frame-title em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 8px; }
.frame-head .seg { font-weight: 500; }
.frame-head .seg button { height: 32px; padding: 0 14px; }
.clients-card { margin-top: 16px; overflow: visible; }
.clients-card .clients-grid { padding: 16px 20px 20px; }
.clients-card .client:not(.pending) { background: var(--surface-2); }
.tx-card { margin-top: 26px; overflow: hidden; }
.tx-card .rows .row:last-child { border-bottom: 0; }
.client-type { display: flex; align-items: center; gap: 8px; }
.client-days { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }
.client-days svg { font-size: 12px; }

/* ================= Banner games, servers list ================= */
.guild-banner { position: relative; }
.banner-games { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; }
.banner-game {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px 0 3px; border-radius: 8px;
  background: rgba(10, 10, 10, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12); color: #fff; font-size: 12px; font-weight: 600;
  transition: background .2s, border-color .2s, opacity .2s; animation: rise .3s var(--ease) both;
}
.banner-game img { width: 20px; height: 20px; border-radius: 5px; }
.banner-game > svg { font-size: 14px; margin-left: 3px; }
.banner-game i { display: grid; place-items: center; width: 0; overflow: hidden; transition: width .2s var(--ease); }
.banner-game i svg { font-size: 12px; }
.banner-game:hover { background: rgba(200, 50, 50, .55); border-color: rgba(255, 120, 120, .5); }
.banner-game:hover i { width: 12px; }
.banner-game.removing { opacity: .35; pointer-events: none; }
.guild-stats { margin-top: auto; }
.show-more { display: flex; margin: 18px auto 0; }
.show-more svg { transition: transform .3s var(--spring); }
.show-more.open svg { transform: rotate(180deg); }
.tx-link { color: var(--accent); font-weight: 600; }
.tx-link:hover { text-decoration: underline; }

/* кнопки без свечения */
.btn-primary.btn-flat, .btn-primary.btn-flat:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

.show-more[hidden] { display: none; }

/* ================= Nitro icon, categories ================= */
.nitro-img { display: block; width: 1.1em; height: 1.1em; object-fit: contain; }
.nitro .nitro-img { width: 15px; height: 15px; }
.plan-group-head h4 .nitro-img { width: 20px; height: 20px; }
.row-icon .nitro-img { width: 20px; height: 20px; }
.categories { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.category {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px; min-height: 230px;
  border-radius: 18px; text-align: left; background: var(--modal-card); border: 1px solid var(--border);
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.category:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.category.cat-nitro { background: radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%), var(--modal-card); }
.category-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.category-icon svg { font-size: 24px; }
.category-icon .nitro-img { width: 30px; height: 30px; }
.category-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.category-price { font-size: 14px; font-weight: 700; color: var(--accent); }
.category-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.category-go { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--text-2); transition: color .2s, gap .25s var(--ease); }
.category:hover .category-go { color: var(--accent); gap: 10px; }
.step-back { margin-bottom: 12px; }
.modal .plan-group-head { margin-bottom: 14px; align-self: stretch; }
@media (max-width: 600px) { .categories { grid-template-columns: 1fr; } .category { min-height: 0; } }

/* ================= Shared: danger, empty, mono, textarea ================= */
.regular-img { display: block; width: 1.1em; height: 1.1em; stroke: none; }
.category-icon .regular-img { width: 30px; height: 30px; }
.row-icon .regular-img, .plan-group-head h4 .regular-img { width: 20px; height: 20px; }
.btn-danger { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.icon-btn.danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.badge.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.mono { font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace; font-size: .95em; letter-spacing: -.01em; }
.empty-block { padding: 48px 24px; text-align: center; }
.empty-block h3 { margin: 0 0 6px; font-size: 17px; }
.empty-block p { margin: 0 auto; max-width: 420px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.textarea {
  width: 100%; min-height: 200px; resize: vertical; padding: 12px 14px; border-radius: 12px; outline: 0;
  background: var(--modal-card); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; line-height: 1.6;
  transition: border-color .2s, box-shadow .25s;
}
.textarea:hover { border-color: var(--border-hi); }
.textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.textarea::placeholder { color: var(--muted); }
.spinner.dark { width: 16px; height: 16px; border: 2px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.frame { overflow: hidden; }
.toolbar { flex-wrap: wrap; }

/* ================= Bots ================= */
.bots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bot-card { display: flex; align-items: center; gap: 14px; padding: 18px; animation: rise .4s var(--ease) both; }
.bot-avatar { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.bot-avatar svg { font-size: 22px; }
.bot-meta { flex: 1; min-width: 0; }
.bot-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-tag { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: #5865f2; color: #fff; letter-spacing: .04em; }
.bot-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================= Admin orders ================= */
.admin-orders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.admin-order { display: flex; flex-direction: column; gap: 16px; padding: 20px; animation: rise .45s var(--ease) both; }
.admin-order .guild-avatar { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }
.missing { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--danger) 9%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent); }
.missing-num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--danger); font-variant-numeric: tabular-nums; line-height: 1; }
.missing-text { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 14px; }
.missing-text span { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.progress.wide { width: 100%; margin: -6px 0 0; }
.order-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ochip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ochip svg, .ochip .nitro-img, .ochip .regular-img { width: 14px; height: 14px; font-size: 14px; }
.admin-order-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hint-line.ok { color: var(--success); }

/* ================= Proxies ================= */
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mini-stat { padding: 14px 16px; }
.mini-stat-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-stat-l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mini-stat.accent .mini-stat-v { color: var(--accent); }
.mini-stat.ok .mini-stat-v { color: var(--success); }
.mini-stat.bad .mini-stat-v { color: var(--danger); }
.row-icon.sys { background: var(--accent-soft); color: var(--accent); }
.proxy-row { padding: 10px 18px; gap: 12px; }
.proxy-row .row-icon { width: 34px; height: 34px; }

/* ================= Nodes ================= */
.nodes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.node-card { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.node-head { display: flex; align-items: center; gap: 12px; }
.node-body { display: flex; flex-direction: column; gap: 14px; min-height: 90px; }
.meter-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.meter-top b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); transition: width .8s var(--ease); }
.meter-bar.warn i { background: linear-gradient(90deg, #c98a1d, var(--warn)); }
.meter-bar.bad i { background: linear-gradient(90deg, #b83b3b, var(--danger)); }
.node-load { font-size: 12.5px; color: var(--muted); }
.node-load b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.node-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13.5px; text-align: center; }
.node-wait.off { color: var(--danger); }
.node-wait.off svg { font-size: 22px; }
.node-wait small { color: var(--muted); font-size: 11.5px; max-width: 260px; word-break: break-word; }

@media (max-width: 1400px) { .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .admin-orders, .bots-grid, .nodes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .admin-orders, .bots-grid, .nodes-grid, .mini-stats { grid-template-columns: 1fr; } }

.ochip.count { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); font-weight: 800; cursor: default; }

/* ================= Proxies: countries ================= */
.mini-stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.countries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.country { display: flex; align-items: center; gap: 14px; padding: 16px; animation: rise .4s var(--ease) both; }
.flag-img { width: 44px; height: 32px; border-radius: 7px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px var(--border-hi); }
.flag-img.none { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 18px; box-shadow: none; }
.country-meta { flex: 1; min-width: 0; }
.country-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.country-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.country-count { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ================= Report ================= */
.report-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.report-tile { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.report-tile.hero { border-color: var(--accent-line); background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); }
.report-v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.report-tile.hero .report-v { font-size: 36px; }
.report-tiles.small .report-v { font-size: 22px; }
.report-tile.warn .report-v { color: var(--warn); }
.report-sub { font-size: 12.5px; color: var(--muted); }
.delta { font-weight: 700; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.report-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.chart-controls { display: flex; align-items: center; gap: 8px; }
.chart-controls .seg button { height: 30px; padding: 0 12px; }
.chart { position: relative; padding: 16px 16px 8px; min-height: 256px; }
.chart-svg { display: block; overflow: visible; width: 100%; height: 240px; fill: initial; stroke: none; }
.chart-tip[hidden] { display: none; }
.chart-svg .grid { stroke: var(--border); stroke-width: 1; }
.chart-svg .axis { stroke: var(--border-hi); stroke-width: 1; }
.chart-svg .tick { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-svg .bar { fill: var(--accent); transition: opacity .15s; }
.chart-svg .bar.dim { opacity: .35; }
.chart-svg .hit { fill: transparent; cursor: default; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12px; white-space: nowrap; box-shadow: var(--shadow-sm); margin-top: 8px; }
.chart-tip b { font-size: 14px; }
.chart-table { max-height: 300px; overflow: auto; padding: 0 16px 12px; }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.chart-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 6px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.chart-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); }
.hbars { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 12px; }
.hbar-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-label .nitro-img, .hbar-label .regular-img { width: 15px; height: 15px; flex-shrink: 0; }
.hbar-track { height: 14px; display: block; }
.hbar-track i { display: block; height: 100%; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .8s var(--ease); }
.hbar-v { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.recent-row { padding: 12px 20px; }
.recent-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.recent-arrow { color: var(--muted); display: inline-flex; vertical-align: -2px; margin: 0 4px; }
.guild-avatar.tiny { display: inline-grid; width: 20px; height: 20px; border-radius: 6px; font-size: 9px; vertical-align: -5px; margin-right: 4px; border: 0; }

/* ================= Admin clients ================= */
.pool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 20px; }
.pool-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 14px 16px; background: var(--surface-2); animation: rise .35s var(--ease) both; }
.pool-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.pool-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); margin-bottom: 8px; }
.pool-avatar svg { font-size: 26px; }
.pool-name { display: flex; align-items: center; gap: 6px; max-width: 100%; font-weight: 700; font-size: 15px; justify-content: center; }
.pool-user { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.order-chips.center { justify-content: center; }
.pool-more { display: flex; justify-content: center; padding: 0 0 18px; }
.pool-more .btn[hidden] { display: none; }
.client-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.preview { overflow: hidden; position: sticky; top: calc(var(--top) + 16px); }
.preview-banner { height: 96px; background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%), linear-gradient(135deg, var(--surface-3), var(--surface)); }
.preview-body { padding: 0 20px 18px; margin-top: -44px; display: flex; flex-direction: column; gap: 6px; }
.preview-avatar { position: relative; width: 88px; height: 88px; border-radius: 50%; cursor: pointer; border: 5px solid var(--surface); background: var(--surface); }
.preview-avatar .pv-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.preview-avatar .pv-img svg { font-size: 30px; }
.preview-avatar i { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transition: opacity .2s; font-size: 20px; }
.preview-avatar:hover i { opacity: 1; }
.preview-name { display: flex; align-items: center; gap: 7px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.preview-name .nitro .nitro-img { width: 18px; height: 18px; }
.preview-user { color: var(--muted); font-size: 13px; }
.preview-status { font-size: 13.5px; color: var(--text-2); padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-top: 6px; }
.preview-section { margin-top: 10px; }
.preview-section > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.preview-section p { margin: 6px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.preview-section .game-chips { margin-top: 8px; }
.preview .order-chips { margin-top: 12px; }
.preview-guilds { border-top: 1px solid var(--border); padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.preview-guilds .frame-title em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 6px; }
.pg-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.pg-row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-row em { font-style: normal; color: var(--muted); font-size: 12px; }
.settings-form { overflow: visible; }
.form-body { padding: 20px; }
.settings-form .textarea { background: var(--surface-2); }
.nitro-row { display: flex; gap: 10px; }
.nitro-row > div:first-child { flex: 1; }
.nitro-row > div:last-child { flex: 1; }
.nitro-row [hidden] { display: none; }
.link-btn { color: var(--accent); font-weight: 600; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

@media (max-width: 1400px) { .countries, .pool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .report-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .countries, .pool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-grid, .client-layout { grid-template-columns: 1fr; } .preview { position: static; } }
@media (max-width: 600px) { .countries, .pool-grid, .report-tiles { grid-template-columns: 1fr; } .hbar { grid-template-columns: 110px 1fr auto; } }

/* ================= Node state, counters ================= */
.node-state { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; font-size: 18px; }
.node-state.on { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.node-state.off { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.node-state.wait { background: var(--surface-3); }
.node-state svg { stroke-width: 2.6; }
.side-count.warn { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.side-link.active .side-count.warn { background: var(--danger); color: #fff; }

/* ================= Problems ================= */
.problems { display: flex; flex-direction: column; gap: 12px; }
.problem { display: flex; align-items: center; gap: 16px; padding: 18px 20px; animation: rise .4s var(--ease) both; border-left: 3px solid var(--border-hi); }
.problem.critical { border-left-color: var(--danger); }
.problem.warning { border-left-color: var(--warn); }
.problem-icon { width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 20px; }
.problem-icon .nitro-img, .problem-icon .regular-img { width: 22px; height: 22px; }
.problem-main { flex: 1; min-width: 0; }
.problem-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-weight: 700; font-size: 15px; }
.problem-level { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.problem-level svg { font-size: 12px; stroke-width: 2.6; }
.problem.critical .problem-level { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.problem.warning .problem-level { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.problem-text { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.45; }
.bot-card.default { border-color: var(--accent-line); }
@media (max-width: 600px) { .problem { flex-wrap: wrap; } }

/* ================= Banner actions ================= */
.banner-actions { position: absolute; top: 14px; right: 16px; display: flex; gap: 8px; z-index: 1; }
.banner-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px;
  background: rgba(10, 10, 10, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: 12.5px; font-weight: 600;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.banner-btn svg { font-size: 15px; }
.banner-btn:hover { background: rgba(10, 10, 10, .75); border-color: rgba(255, 255, 255, .28); transform: translateY(-1px); }
.banner-games { right: auto; max-width: calc(100% - 360px); }

/* ================= Channels page ================= */
.channels-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.roles-card { position: sticky; top: calc(var(--top) + 16px); }
.roles-search { padding: 12px 12px 6px; }
.roles-list { max-height: calc(100dvh - var(--top) - 220px); overflow: auto; padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.role-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; font-size: 14px; color: var(--text-2); transition: background .15s, color .15s; }
.role-row:hover { background: var(--surface-2); color: var(--text); }
.role-row.on { background: var(--accent-soft); color: var(--text); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.role-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#role-title { display: flex; align-items: center; gap: 9px; }
.channels-list { padding: 8px 16px 16px; }
.ch-category { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 6px 6px; }
.ch-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.ch-row:hover { background: var(--surface-2); }
.ch-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-hi); display: grid; place-items: center; color: transparent; flex-shrink: 0; transition: all .2s var(--spring); }
.ch-check svg { font-size: 13px; stroke-width: 3; }
.ch-row.on .ch-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.ch-icon { color: var(--muted); font-size: 17px; display: inline-flex; }
.ch-row.on .ch-icon { color: var(--accent); }
.ch-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row:not(.on) .ch-name { color: var(--text-2); }
.ch-games { display: flex; gap: 4px; }
.ch-games img, .ch-games .game-noicon { width: 22px; height: 22px; border-radius: 6px; }
@media (max-width: 1100px) { .channels-layout { grid-template-columns: 1fr; } .roles-card { position: static; } .roles-list { max-height: 260px; } }
@media (max-width: 760px) { .banner-actions { position: static; padding: 12px 16px 0; } .banner-games { max-width: none; } }
