:root {
  --bg: #0d0f14;
  --bg2: #141821;
  --card: #181c27;
  --card2: #1f2432;
  --line: #2a3042;
  --text: #e8eaf0;
  --muted: #8a91a6;
  --accent: #7c5cff;
  --accent2: #a48bff;
  --ok: #2ecc8f;
  --warn: #ffb648;
  --bad: #ff5d6c;
  --yt: #ff3d3d;
  --tt: #25f4ee;
  --tw: #9146ff;
  --r: 14px;
  --font: "Onest Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded Variable", "Onest Variable", system-ui, sans-serif;
  --gutter: 20px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #231a4a55, transparent), var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent2); text-decoration: none; transition: color .15s, background-color .15s, border-color .15s; }
a:hover { color: #c7b8ff; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
h1 { font: 600 26px/1.15 var(--display); letter-spacing: -.02em; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
button, input, select, textarea { font-family: inherit; }
code { font: 13px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #cfd3e0; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: #0d0f14d9; backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.logo { font: 600 16px/1 var(--display); color: var(--text); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo:hover { color: #fff; }
.logo i { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #ff4fa3); display: inline-block; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 9px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.on { color: var(--text); background: var(--card2); }
.nav a.admin { color: var(--warn); }
.tools { display: flex; align-items: center; gap: 10px; }

.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 20px 50px #0008; padding: 6px; z-index: 30;
}
.dd-menu a, .dd-menu button.link { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.dd-menu a:hover, .dd-menu button.link:hover { background: var(--card2); }

.bell { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); position: relative; }
.bell svg { width: 19px; height: 19px; fill: var(--text); }
.bell .cnt { position: absolute; top: -4px; right: -4px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.notif-menu { width: 340px; max-height: 420px; overflow: auto; }
.notif { display: block; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.notif.unread { background: #7c5cff18; }
.notif b { display: block; font-size: 14px; }
.notif span { font-size: 13px; color: var(--muted); }

.ava { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--accent), #ff4fa3); display: grid; place-items: center; font-weight: 700; color: #fff; border: 2px solid var(--line); flex: none; }
.ava.lg { width: 84px; height: 84px; font-size: 30px; }
.ava.sm { width: 30px; height: 30px; font-size: 12px; }

/* ---------- раскладка ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 26px 20px 60px; }
.narrow { max-width: 440px; margin: 50px auto; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.side { grid-template-columns: 2fr 1fr; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card.pad0 { padding: 0; overflow: hidden; }
.stat { display: block; color: var(--text); }
a.stat:hover { border-color: #3a4260; color: var(--text); }
.stat .v { font: 600 24px/1.2 var(--display); letter-spacing: -.02em; margin-top: 4px; overflow-wrap: anywhere; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.accent { background: linear-gradient(135deg, #7c5cff33, #ff4fa322); border-color: #7c5cff55; }

/* ---------- формы ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 5px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: inherit; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

/* ---------- выпадающий список ---------- */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%238a91a6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.sel { position: relative; width: 100%; min-width: 0; }
.sel > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.sel-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sel-btn:hover { border-color: #3a4260; background: #171b26; }
.sel-btn:focus-visible, .sel.open .sel-btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #7c5cff2e; }
.sel-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-arrow { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 6px; color: var(--muted); transition: transform .2s, color .15s, background .15s; }
.sel-arrow svg { width: 18px; height: 18px; }
.sel-btn:hover .sel-arrow { color: var(--text); }
.sel.open .sel-arrow { transform: rotate(180deg); color: var(--accent2); background: #7c5cff1f; }
.sel-list {
  position: fixed; z-index: 100; max-height: 280px; overflow-y: auto; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px #000a, 0 0 0 1px #7c5cff14; animation: sel-in .12s ease-out;
}
@keyframes sel-in { from { opacity: 0; transform: translateY(-4px); } }
.sel-opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 11px; border-radius: 8px; cursor: pointer; color: var(--text); white-space: nowrap; }
.sel-opt:hover { background: var(--card2); }
.sel-opt.on { background: #7c5cff22; color: #fff; }
.sel-opt svg { width: 16px; height: 16px; color: var(--accent2); flex: none; }
textarea { min-height: 100px; resize: vertical; }
input[type=file] { color: var(--muted); font-size: 13px; }
.code-input { font-size: 28px; letter-spacing: 12px; text-align: center; font-weight: 700; }
.check { display: inline-flex; gap: 10px; align-items: center; color: var(--text); font-size: 14px; cursor: pointer; user-select: none; }

/* ---------- чекбоксы ---------- */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer; vertical-align: middle;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--bg2) center / 14px no-repeat; border: 1.5px solid #3a4260;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
input[type=checkbox]:hover { border-color: var(--accent2); }
input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 3px #7c5cff38; }
input[type=checkbox]:checked {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3.2 3L15 6.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- пароль ---------- */
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.pw-eye:hover { color: var(--text); background: var(--card2); }
.pw-eye svg { width: 20px; height: 20px; }
.pw-rules { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 6px; transition: color .15s; }
.pw-rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #3a4260; flex: none; box-sizing: border-box; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { border: 0; background: var(--ok) center / 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4.5 10.5 3.5 3.3 7.5-7.6' fill='none' stroke='%23062' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: #3a4260; color: var(--text); }
.btn.ok { background: var(--ok); color: #062; }
.btn.bad { background: transparent; color: var(--bad); border: 1px solid #ff5d6c66; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
form.inline { display: inline; }

/* ---------- таблицы и бейджи ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; background: var(--bg2); }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.badge.pending { color: var(--warn); border-color: #ffb64855; }
.badge.approved, .badge.paid { color: var(--ok); border-color: #2ecc8f55; }
.badge.rejected, .badge.banned { color: var(--bad); border-color: #ff5d6c55; }
.badge.youtube { color: var(--yt); }
.badge.tiktok { color: var(--tt); }
.badge.twitch { color: #b38bff; }
.badge.admin, .badge.owner { color: var(--warn); }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid; }
.alert.ok { background: #2ecc8f14; border-color: #2ecc8f55; color: #8ff0c6; }
.alert.error { background: #ff5d6c14; border-color: #ff5d6c55; color: #ffb0b8; }
.alert.info { background: #7c5cff14; border-color: #7c5cff55; color: #cbbcff; }

.flag { padding: 7px 10px; border-radius: 9px; font-size: 13px; margin-top: 6px; }
.flag.warn { background: #ffb64815; color: var(--warn); }
.flag.info { background: #7c5cff15; color: #cbbcff; }
.flag.ok { background: #2ecc8f12; color: var(--ok); }

.plat { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.plat + .plat { margin-top: 10px; }
.plat .info { flex: 1; min-width: 0; }
.plat .info b { display: block; }

.news-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.news-item:last-child { border-bottom: 0; }
.news-body { white-space: pre-wrap; }
.pin { color: var(--warn); font-size: 12px; font-weight: 700; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 7px 13px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.tabs a:hover { color: var(--text); border-color: #3a4260; }
.tabs a.on { color: var(--text); border-color: var(--accent); background: #7c5cff14; }
.tabs a .badge { margin-left: 4px; }

.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-nav a { padding: 7px 12px; border-radius: 9px; color: var(--muted); }
.admin-nav a.on, .admin-nav a:hover { background: var(--card2); color: var(--text); }
.admin-nav .n { background: var(--bad); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 9px; margin-left: 4px; }

.bar { height: 8px; background: var(--card2); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff4fa3); }

.hero { text-align: center; padding: 80px 20px 40px; }
.hero h1 { font-size: 44px; letter-spacing: -1px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 26px; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
details.box > summary { cursor: pointer; color: var(--accent2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.proof { max-width: 120px; max-height: 80px; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- графики ---------- */
.chart { position: relative; margin-top: 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .axis-t { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--accent2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .median { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .median-t { fill: var(--muted); font-size: 11px; }
.chart .dot { fill: var(--accent2); stroke: var(--card); stroke-width: 2; }
.chart .dot.spike { fill: var(--warn); }
.chart .cross { stroke: #ffffff40; stroke-width: 1; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 140px; max-width: 240px;
  background: #0d0f14f2; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-size: 12.5px; line-height: 1.4; box-shadow: 0 10px 30px #0009; transform: translate(-50%, calc(-100% - 12px));
}
.chart-tip b { display: block; font-size: 14px; }
.chart-tip .t { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-tip .w { color: var(--warn); display: block; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.chart-legend i { display: inline-block; width: 14px; vertical-align: middle; margin-right: 6px; }
.chart-legend .l-line { height: 2px; background: var(--accent2); }
.chart-legend .l-med { border-top: 1.5px dashed var(--muted); }
.chart-legend .l-spike { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.chart-empty { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }

/* ---------- бургер ---------- */
.burger { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.burger[aria-expanded=true] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded=true] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded=true] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- адаптивность ---------- */
.wrap { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
img { max-width: 100%; }
.card, .plat .info, .news-item { min-width: 0; overflow-wrap: anywhere; }

@media (min-width: 1500px) {
  .wrap, .top-in { max-width: 1360px; }
}
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .side { grid-template-columns: 3fr 2fr; }
}
@media (max-width: 900px) {
  .g2, .g3, .side { grid-template-columns: 1fr; }
  .burger { display: inline-flex; order: 3; }
  .top-in { flex-wrap: wrap; gap: 10px; }
  .logo { flex: 1; min-width: 0; }
  .tools { order: 2; }
  .nav {
    order: 4; flex: 0 0 100%; display: none; flex-direction: column; gap: 2px;
    padding: 6px 0 4px; border-top: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 15px; }
}
@media (max-width: 640px) {
  :root { --gutter: 14px; }
  body { font-size: 14.5px; }
  h1 { font-size: 21px; }
  h2 { font-size: 16.5px; }
  .wrap { padding-top: 18px; padding-bottom: 40px; }
  .top-in { padding: 8px var(--gutter); }
  .logo { font-size: 13px; }
  .logo i { width: 24px; height: 24px; flex: none; }
  .bell, .ava { width: 36px; height: 36px; }
  .card { padding: 16px; border-radius: 12px; }
  .card.pad0 { padding: 0; }
  .grid { gap: 12px; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 17px; }
  .stat .l { font-size: 12px; }
  .narrow { margin: 16px auto; }
  .hero { padding: 36px 0 24px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15.5px; }
  .table th, .table td { padding: 9px 10px; font-size: 13.5px; }
  .admin-nav, .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .admin-nav { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
  .admin-nav::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; }
  .dd-menu { position: fixed; left: 10px; right: 10px; top: 58px; min-width: 0; }
  .notif-menu { width: auto; max-height: 70vh; }
  .plat { flex-wrap: wrap; }
  .plat > .row { width: 100%; }
  form.row > div, form.row > input, form.row > .sel { flex: 1 1 100% !important; width: 100% !important; min-width: 0 !important; }
  .pw-rules { grid-template-columns: 1fr; }
  .code-input { font-size: 24px; letter-spacing: 8px; }
  input, select, textarea, .sel-btn { font-size: 16px; } /* iOS не зумит поля от 16px */
}
@media (max-width: 340px) {
  .g4 { grid-template-columns: 1fr; }
}

/* Кнопки привязки платформ — своя заливка, не зависят от темы */
.pbtn {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 13px; border-radius: 12px;
  font-weight: 600; color: #fff; border: 1px solid rgba(255, 255, 255, .12); transition: transform .12s, filter .15s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.pbtn .ico { width: 20px; height: 20px; }
.pbtn:hover { color: #fff; filter: brightness(1.12); }
.pbtn:active { transform: scale(.97); }
.pbtn.yt { background: #e62117; }
.pbtn.tt { background: #121212; }
.pbtn.tw { background: #8045f0; }

/* Публичные документы */
.legal { max-width: 760px; margin: 30px auto; line-height: 1.6; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal ul { padding-left: 20px; margin: 0 0 10px; }
.legal li { margin: 4px 0; }
.legal a { color: var(--accent2); text-decoration: underline; text-underline-offset: 2px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 28px 0 8px; }
.legal-links a { color: inherit; }
.center { text-align: center; }

/* Без стрелок у числовых полей */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Статистика ролика в форме отчёта */
.rp-stats { border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.rp-msg { overflow-wrap: anywhere; }
.rp-msg.ok { color: var(--text, inherit); font-weight: 600; }
.rp-msg.err { color: #f87171; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-top: 10px; }
.rp-grid > div { display: flex; flex-direction: column; gap: 2px; }
.rp-grid b { font-size: 18px; }

/* Реквизиты из профиля в форме выплаты */
.saved-details { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.saved-details > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.saved-details > span b { overflow-wrap: anywhere; font-weight: 600; }
.saved-details svg { width: 16px; height: 16px; flex: none; color: #4ade80; }

/* Рекомендации к премии */
.bonus.rec { border-color: color-mix(in srgb, #4ade80 45%, var(--line)); }
.bonus .up { color: #4ade80; font-weight: 600; }
.bonus .down { color: #f87171; font-weight: 600; }
.bonus-form { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 640px) { .bonus-form { grid-template-columns: 1fr; } }

/* Прогресс загрузки файлов */
.upl { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; }
.upl-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--muted, #888) 20%, transparent); overflow: hidden; }
.upl-bar i { display: block; height: 100%; width: 0; background: var(--accent2); border-radius: inherit; transition: width .2s linear; }
.upl-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.upl-cancel { justify-self: start; }

/* Вход через Google */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.google-btn .ico { width: 18px; height: 18px; }
.social-btns { display: grid; gap: 8px; }
.social-btns > .btn { margin-left: 0; }
.twitch-btn .ico { color: #9146ff; }
.or-line { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Главная: прогресс до выплаты и напоминание */
.payout-goal { display: grid; gap: 10px; }
.goal-bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 12%, transparent); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .4s; }
.remind { display: flex; align-items: center; gap: 10px; }
.remind > span { flex: 1; }
.remind .ico { flex: none; }
.stat .up { color: #4ade80; }
.stat .down { color: #f87171; }

/* ================= Каркас: боковая панель + верхняя полоса ================= */
:root { --menu: var(--card); --side-w: 248px; --side-bg: var(--bg2); }
.ico { width: 20px; height: 20px; flex: none; }

body.has-shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main > .wrap { width: 100%; }

.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: none;
  display: flex; flex-direction: column; gap: 6px; padding: 18px 12px 14px;
  background: var(--side-bg); border-right: 1px solid var(--line); overflow-y: auto; z-index: 15;
}
.logo i {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #ff4fa3); color: #fff; font: 700 14px/1 var(--display); font-style: normal;
}
.sidebar .logo { padding: 4px 8px 16px; font-size: 14px; white-space: normal; line-height: 1.25; }
.logo span { overflow: hidden; text-overflow: ellipsis; }

.snav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.snav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: var(--muted); font-weight: 550; font-size: 14.5px; border: 1px solid transparent;
}
.snav a:hover { color: var(--text); background: var(--card); }
.snav a.on { color: var(--text); background: var(--card2); border-color: var(--line); }
.snav a.on::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.snav a.on .ico { color: var(--accent2); }
.snav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snav a em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--bad); border-radius: 9px; padding: 1px 7px; }
.snav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 6px; opacity: .8; }
.snav a.snav-back { font-size: 13.5px; }
.sfoot { border-top: 1px solid var(--line); padding: 14px 6px 0; margin-top: 10px; }
.sfoot b { display: block; margin: 2px 0; overflow-wrap: anywhere; }
.sfoot .btn .ico { width: 16px; height: 16px; }

.topbar {
  position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; min-height: 64px;
  background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.topbar .tools { margin-left: auto; }
.mobile-logo { display: none; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn.on { background: color-mix(in srgb, var(--accent) 22%, var(--card)); border-color: var(--accent); color: #fff; }
.icon-btn .cnt, summary.icon-btn .cnt {
  position: absolute; top: -4px; right: -4px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}
.dd-menu, .sel-list { background: var(--menu); }

/* Горизонтальное меню админки — только на телефоне */
.admin-nav { display: none; }

/* ================= Нижняя панель (Liquid Glass) ================= */
.tabbar { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobile-logo { display: flex; font-size: 14px; }
  .topbar { padding: 10px var(--gutter); min-height: 58px; }
  .main > .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .admin-nav { display: flex; }

  .tabbar {
    position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    max-width: 520px; margin: 0 auto; height: 66px; padding: 6px;
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    border-radius: 24px;
    background:
      linear-gradient(135deg, rgba(120, 170, 255, .18), rgba(255, 255, 255, .04) 45%, rgba(90, 140, 255, .12)),
      rgba(12, 20, 44, .42);
    backdrop-filter: blur(26px) saturate(190%) brightness(1.08); -webkit-backdrop-filter: blur(26px) saturate(190%) brightness(1.08);
    border: 1px solid rgba(180, 210, 255, .22);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .03);
  }
  .tabbar::before { /* блик по верхней кромке */
    content: ""; position: absolute; left: 18%; right: 18%; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); pointer-events: none;
  }
  .tab {
    position: relative; flex: 1; height: 54px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 7px;
    color: rgba(225, 235, 255, .72); transition: background .25s, color .2s, flex .3s;
  }
  .tab span { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 12.5px; font-weight: 600; transition: max-width .3s; }
  .tab .ico { width: 23px; height: 23px; }
  .tab:hover { color: #fff; }
  .tab.on {
    flex: 1.9; color: #fff;
    background: linear-gradient(180deg, rgba(150, 190, 255, .26), rgba(120, 160, 255, .1));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -8px 16px rgba(80, 130, 255, .12);
  }
  .tab.on span { max-width: 80px; }
  .tab-plus {
    flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(160deg, #7fb2ff, #2f6bff 55%, #1c48d8);
    box-shadow: 0 10px 24px rgba(40, 100, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -3px 8px rgba(0, 20, 90, .35);
  }
  .tab-plus .ico { width: 26px; height: 26px; stroke-width: 2.2; }
  .tab-plus:active, .tab:active { transform: scale(.95); }
}

/* ================= Зона загрузки файлов ================= */
.drop {
  position: relative; border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 14px;
  background: color-mix(in srgb, var(--bg2) 70%, transparent); transition: border-color .15s, background .15s;
}
.drop > input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); }
.drop-body { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px; text-align: center; }
.drop-body b { font-weight: 600; font-size: 14px; }
.drop-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent2); background: color-mix(in srgb, var(--accent) 14%, transparent); margin-bottom: 4px; }
.drop-ico svg { width: 22px; height: 22px; }
.drop-body .row { margin-top: 6px; }
.drop-err { color: var(--bad); }
.drop-list { display: grid; gap: 8px; padding: 0 12px; }
.drop.has-files .drop-list { padding-bottom: 12px; }
.drop-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.drop-item img, .drop-item video { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.drop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.drop-x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; flex: none; }
.drop-x:hover { background: var(--card2); color: var(--bad); }
.media-row { display: flex; flex-wrap: wrap; gap: 8px; }
.media-row .proof { max-width: 160px; max-height: 110px; object-fit: cover; }

/* ================= Выплаты, права, способы ================= */
.conv { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.conv span { color: var(--muted); font-size: 12.5px; }
.rate-pair { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.method-list { display: grid; gap: 12px; padding: 12px 20px 20px; }
.method-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: color-mix(in srgb, var(--bg2) 60%, transparent); }
.method-card:last-child { border-style: dashed; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.perm-grid.one { grid-template-columns: 1fr; gap: 4px; }
.perm { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; background: color-mix(in srgb, var(--bg2) 60%, transparent); }
.perm-grid.one .perm { padding: 6px 8px; }
.perm:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.perm:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.perm.locked { opacity: .5; cursor: not-allowed; }
.perm input { margin-top: 1px; }
.perm b { display: block; font-size: 13.5px; font-weight: 600; }
.perm small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }

/* ================= Выбор темы ================= */
.theme-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--card); cursor: pointer; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.theme-preview { position: relative; height: 110px; border-radius: 10px; overflow: hidden; display: block; margin-bottom: 6px; }
.theme-preview i { position: absolute; border-radius: 6px; }
.theme-preview i:nth-child(1) { left: 0; top: 0; bottom: 0; width: 26%; }
.theme-preview i:nth-child(2) { left: 32%; top: 14%; right: 8%; height: 30%; border-radius: 8px; }
.theme-preview i:nth-child(3) { left: 32%; top: 54%; width: 34%; height: 30%; border-radius: 8px; }
.tp-midnight { background: #0d0f14; }
.tp-midnight i:nth-child(1) { background: #141821; }
.tp-midnight i:nth-child(2), .tp-midnight i:nth-child(3) { background: #1f2432; border: 1px solid #2a3042; }
.tp-violet { background: radial-gradient(120% 90% at 0 0, #2a1452, #0a0712 60%); }
.tp-violet i:nth-child(1) { background: #120b1f; }
.tp-violet i:nth-child(2), .tp-violet i:nth-child(3) { background: #1b1230; border: 1px solid #3a2766; box-shadow: 0 0 18px #8b5cf640; }
.tp-glass { background: radial-gradient(60% 70% at 80% 20%, #1e63ff 0, transparent 60%), radial-gradient(50% 60% at 15% 90%, #00c2ff 0, transparent 60%), #040b1c; }
.tp-glass i { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }

/* ================= Тема «Неон» ================= */
[data-theme=violet] {
  --bg: #0a0712; --bg2: #110b1c; --card: #150f22; --card2: #1e1531; --line: #2b2142;
  --text: #efeaff; --muted: #9b90b8; --accent: #8b5cf6; --accent2: #b9a2ff; --side-bg: #0e0918;
}
[data-theme=violet] body { background: radial-gradient(900px 600px at 0 0, #2a145255, transparent 70%), radial-gradient(800px 600px at 100% 100%, #4a103a33, transparent 70%), var(--bg); background-attachment: fixed; }
[data-theme=violet] h1 { font-weight: 800; letter-spacing: -.01em; }
[data-theme=violet] h2 { font: 700 17px/1.25 var(--display); letter-spacing: -.01em; }
[data-theme=violet] .card { background: linear-gradient(180deg, #17102580, #130d1f80), var(--card); }
[data-theme=violet] .snav a.on { background: linear-gradient(90deg, #8b5cf62e, #8b5cf60a); border-color: #8b5cf655; box-shadow: 0 0 24px #8b5cf62a; }
[data-theme=violet] .snav a.on::before { box-shadow: 0 0 12px var(--accent); }
[data-theme=violet] .btn:not(.ghost):not(.bad):not(.ok) { background: linear-gradient(135deg, #8b5cf6, #a855f7); box-shadow: 0 6px 18px #8b5cf640; }
[data-theme=violet] .logo i { background: linear-gradient(135deg, #8b5cf6, #c026d3); }

/* ================= Тема «Liquid Glass» (синяя) ================= */
[data-theme=glass] {
  --bg: #040b1c; --bg2: rgba(255, 255, 255, .045); --card: rgba(255, 255, 255, .065); --card2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .13); --text: #eef4ff; --muted: #9db0d4; --accent: #3b82f6; --accent2: #8ab8ff;
  --menu: rgba(10, 22, 50, .9); --side-bg: rgba(255, 255, 255, .04);
}
[data-theme=glass] body { background: #040b1c; }
/* Три источника света за стеклом медленно дрейфуют — стекло «оживает» */
[data-theme=glass] .bg-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #0a1a3f 0%, #050d22 55%, #030816 100%);
}
[data-theme=glass] .bg-fx i {
  position: absolute; display: block; border-radius: 50%; filter: blur(70px); opacity: .75; will-change: transform;
}
[data-theme=glass] .bg-fx i:nth-child(1) {
  width: 46vmax; height: 46vmax; left: 52%; top: -14%;
  background: radial-gradient(circle, rgba(46, 110, 255, .85), rgba(46, 110, 255, 0) 68%);
  animation: drift-a 34s ease-in-out infinite alternate;
}
[data-theme=glass] .bg-fx i:nth-child(2) {
  width: 40vmax; height: 40vmax; left: -12%; top: 48%;
  background: radial-gradient(circle, rgba(0, 196, 255, .6), rgba(0, 196, 255, 0) 68%);
  animation: drift-b 41s ease-in-out infinite alternate;
}
[data-theme=glass] .bg-fx i:nth-child(3) {
  width: 32vmax; height: 32vmax; left: 30%; top: 30%;
  background: radial-gradient(circle, rgba(110, 90, 255, .5), rgba(110, 90, 255, 0) 68%);
  animation: drift-c 29s ease-in-out infinite alternate;
}
@keyframes drift-a { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-18vw, 14vh) scale(1.12); } 100% { transform: translate(-6vw, 30vh) scale(.92); } }
@keyframes drift-b { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(22vw, -18vh) scale(.9); } 100% { transform: translate(40vw, -4vh) scale(1.1); } }
@keyframes drift-c { 0% { transform: translate(0, 0) scale(.95); } 50% { transform: translate(16vw, 20vh) scale(1.15); } 100% { transform: translate(-20vw, 6vh) scale(1); } }
@media (prefers-reduced-motion: reduce) { [data-theme=glass] .bg-fx i { animation: none; } }
[data-theme=glass] .card, [data-theme=glass] .sidebar, [data-theme=glass] .topbar, [data-theme=glass] .plat,
[data-theme=glass] .dd-menu, [data-theme=glass] .sel-list, [data-theme=glass] .icon-btn, [data-theme=glass] .tabs a,
[data-theme=glass] .method-card, [data-theme=glass] .theme-card {
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
}
[data-theme=glass] .card, [data-theme=glass] .theme-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .16);
}
[data-theme=glass] .sidebar { border-right-color: rgba(255, 255, 255, .1); }
[data-theme=glass] .topbar { background: rgba(5, 14, 36, .4); }
[data-theme=glass] .snav a.on { background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); border-color: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
[data-theme=glass] .snav a.on::before { background: #60a5fa; box-shadow: 0 0 12px #60a5fa; }
[data-theme=glass] input[type=text], [data-theme=glass] input[type=email], [data-theme=glass] input[type=password],
[data-theme=glass] input[type=number], [data-theme=glass] input[type=url], [data-theme=glass] textarea, [data-theme=glass] .sel-btn, [data-theme=glass] select {
  background-color: rgba(3, 10, 28, .45); border-color: rgba(255, 255, 255, .14);
}
[data-theme=glass] .btn:not(.ghost):not(.bad):not(.ok) {
  background: linear-gradient(180deg, #5b9bff, #2563eb); border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .45), inset 0 1px 0 rgba(255, 255, 255, .45);
}
[data-theme=glass] .btn.ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
[data-theme=glass] .stat.accent { background: linear-gradient(135deg, rgba(59, 130, 246, .35), rgba(6, 182, 212, .15)); border-color: rgba(138, 184, 255, .4); }
[data-theme=glass] .logo i { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
[data-theme=glass] .table th { background: rgba(255, 255, 255, .04); }
[data-theme=glass] .chart .line { stroke: #8ab8ff; }
[data-theme=glass] .chart .dot { fill: #8ab8ff; stroke: #0a1838; }

/* ================= Полоса прокрутки ================= */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, var(--line)) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 38%, var(--card2)); border-radius: 10px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--accent) 65%, var(--card2)); }
::-webkit-scrollbar-button, ::-webkit-scrollbar-corner { display: none; background: transparent; }

/* ================= Мелочи ================= */
.uid { display: inline-block; font: 600 11.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 0 7px; border-radius: 6px; color: var(--accent2); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); white-space: nowrap; vertical-align: middle; }
.uid.lg { font-size: 13px; padding: 2px 9px; }
.with-ico { display: flex; gap: 6px; align-items: flex-start; }
.with-ico .ico, .flag .ico, .pin .ico, .tabs .ico, .btn .ico { width: 16px; height: 16px; flex: none; }
.with-ico .ico { margin-top: 2px; }
.flag { display: flex; gap: 8px; align-items: flex-start; }
.flag .ico { margin-top: 1px; }
.pin { display: inline-flex; align-items: center; gap: 5px; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; }
.task { display: flex; gap: 16px; align-items: flex-start; border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.task-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.task-ico .ico { width: 24px; height: 24px; }
.task-body { flex: 1; min-width: 0; }
.task-grid { display: flex; gap: 22px; flex-wrap: wrap; }
.task-grid b { display: block; font-size: 16px; }
.skin-form { display: grid; gap: 6px; margin-top: 8px; min-width: 210px; }

.skin-card { display: flex; gap: 14px; align-items: flex-start; margin: -2px 0 14px; padding: 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 7%, transparent); }
.skin-line { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; font-size: 14px; }
.skin-line span { color: var(--muted); }
.skin-card > div:last-child { flex: 1; min-width: 0; }
.msg-form { display: grid; gap: 10px; }
.msg-form textarea { min-height: 80px; }
.msg-form .btn { justify-self: start; }
.msg-list { display: grid; gap: 8px; margin-top: 14px; }
.msg { padding: 10px 12px; border-radius: 12px 12px 12px 4px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); border: 1px solid var(--line); white-space: pre-wrap; }

/* ================= Liquid Glass: материал ================= */
/* Стекло: размытие + усиление цвета того, что под ним, светлая кромка сверху и блик, который следует за курсором */
[data-theme=glass] .card, [data-theme=glass] .sidebar, [data-theme=glass] .theme-card, [data-theme=glass] .method-card {
  position: relative; isolation: isolate;
  backdrop-filter: blur(22px) saturate(175%) brightness(1.06); -webkit-backdrop-filter: blur(22px) saturate(175%) brightness(1.06);
}
[data-theme=glass] .card::before, [data-theme=glass] .theme-card::before {
  /* кромка-«линза»: ярче сверху-слева, гаснет к низу */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(150deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08) 32%, rgba(255, 255, 255, 0) 55%, rgba(140, 190, 255, .22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
[data-theme=glass] .card { border-color: rgba(255, 255, 255, .1); }
[data-theme=glass] .card.pad0 { overflow: hidden; }
[data-theme=glass] .btn, [data-theme=glass] .pbtn, [data-theme=glass] .icon-btn, [data-theme=glass] .tab-plus { transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), filter .15s; }
[data-theme=glass] .btn:active, [data-theme=glass] .icon-btn:active { transform: scale(.96); }
[data-theme=glass] .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
[data-theme=glass] .topbar { background: rgba(5, 14, 36, .28); border-bottom-color: rgba(255, 255, 255, .08); }

/* ================= Нижняя панель сжимается при прокрутке вниз ================= */
@media (max-width: 900px) {
  .tabbar { transition: height .3s cubic-bezier(.3, 1.3, .5, 1), left .3s, right .3s, border-radius .3s, bottom .3s; }
  .tabbar.compact { height: 54px; left: 22%; right: 22%; border-radius: 20px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .tabbar.compact .tab { height: 42px; border-radius: 14px; }
  .tabbar.compact .tab span { max-width: 0; }
  .tabbar.compact .tab.on { flex: 1.2; }
  .tabbar.compact .tab-plus { width: 44px; height: 44px; border-radius: 14px; }
  .tabbar.compact .tab .ico, .tabbar.compact .tab-plus .ico { width: 21px; height: 21px; }
}

/* ================= Плавность ================= */
/* Переход между страницами: боковая панель, шапка и нижняя панель стоят на месте, меняется только содержимое */
@view-transition { navigation: auto; }
.sidebar { view-transition-name: sidebar; }
.topbar { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
.top { view-transition-name: guest-top; }
::view-transition-old(root) { animation: vt-out .18s ease-in both; }
::view-transition-new(root) { animation: vt-in .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Появление блоков страницы — лёгкий подъём по очереди */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.main > .wrap > *, body.guest .wrap > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.main > .wrap > *:nth-child(2) { animation-delay: .04s; }
.main > .wrap > *:nth-child(3) { animation-delay: .08s; }
.main > .wrap > *:nth-child(4) { animation-delay: .12s; }
.main > .wrap > *:nth-child(5) { animation-delay: .16s; }
.main > .wrap > *:nth-child(n+6) { animation-delay: .2s; }
.grid > .card { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.grid > .card:nth-child(2) { animation-delay: .05s; }
.grid > .card:nth-child(3) { animation-delay: .1s; }
.grid > .card:nth-child(4) { animation-delay: .15s; }

/* Меню, выпадающие списки, вкладки */
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
details.dd[open] > .dd-menu { animation: pop .18s cubic-bezier(.2, .8, .2, 1); transform-origin: top right; }
.snav a, .tabs a, .admin-nav a, .tab, .btn, .pbtn, .icon-btn, .perm, .theme-card, .notif, .sel-btn {
  transition: background-color .22s ease, color .2s ease, border-color .22s ease, box-shadow .25s ease, transform .18s ease, opacity .2s ease, flex .3s ease;
}
.snav a.on::before { animation: grow .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes grow { from { transform: scaleY(0); } }
.tabs a.on, .admin-nav a.on { animation: tab-on .25s ease; }
@keyframes tab-on { from { background-color: transparent; } }
.alert { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.drop-item { animation: rise .25s ease both; }
.skin-card:not([hidden]), .conv:not([hidden]), #pay-image:not([hidden]) { animation: rise .25s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation: none !important; transition: none !important;
  }
}

/* ================= Отступы между соседними кнопками ================= */
/* Кнопки и инлайн-формы подряд без flex-контейнера получают ровный промежуток */
:where(.btn, .pbtn, form.inline) + :where(.btn, .pbtn, form.inline) { margin-left: 8px; }
:where(.row, .tools, .modal-actions, .drop-body .row, .skin-form .row) > :where(.btn, .pbtn, form.inline) + :where(.btn, .pbtn, form.inline) { margin-left: 0; }
td > :where(.btn, form.inline) { vertical-align: middle; }
.plat-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin-right: 6px; }
.plat-toggle .pbtn { pointer-events: none; }
.plat-toggle input:not(:checked) + .pbtn { opacity: .45; filter: grayscale(.6); }

/* ================= ID-чип с копированием ================= */
button.uid { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
button.uid .ico { width: 12px; height: 12px; opacity: .7; }
button.uid:hover { border-color: var(--accent); color: #fff; }
button.uid:active { transform: scale(.96); }

/* ================= Тост и модальное окно ================= */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 200; transform: translate(-50%, 12px);
  padding: 10px 16px; border-radius: 12px; background: var(--menu); border: 1px solid var(--line); color: var(--text);
  box-shadow: 0 12px 30px #0008; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 901px) { .toast { bottom: 28px; } }
.modal-wrap { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(3, 6, 16, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .16s ease; }
.modal-wrap.closing { opacity: 0; transition: opacity .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(420px, 100%); padding: 24px; border-radius: 18px; background: var(--menu); border: 1px solid var(--line); box-shadow: 0 24px 60px #000a; animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
.modal h2 { margin-bottom: 8px; }
.modal p { margin-bottom: 16px; }
.modal .check { margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
[data-theme=glass] .modal { backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%); box-shadow: 0 24px 60px #000a, inset 0 1px 0 rgba(255, 255, 255, .2); }

/* ================= Тарифы, ссылка-карточка, режим оплаты ================= */
.tariff { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tariff:first-child { padding-top: 0; }
.tariff:last-child { border-bottom: 0; padding-bottom: 0; }
.tariff-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--accent2); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tariff-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tariff-price { text-align: right; display: grid; gap: 2px; }
.tariff-price b { font-size: 16px; white-space: nowrap; }
.link-card { display: flex; align-items: center; gap: 14px; color: var(--text); }
.link-card > span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--accent2); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.link-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--text); }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-opt { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; background: color-mix(in srgb, var(--bg2) 60%, transparent); }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mode-opt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
@media (max-width: 640px) { .mode-switch { grid-template-columns: 1fr; } .tariff { flex-wrap: wrap; } .tariff-price { text-align: left; width: 100%; padding-left: 54px; } }

/* Таблицы с полями ввода (тарифы, валюты) */
.edit-table th { white-space: nowrap; }
.edit-table td { vertical-align: middle; }
.cell-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
/* Боковая панель всегда прилипает к экрану (правило стекла выше задаёт position: relative) */
[data-theme=glass] .sidebar { position: sticky; top: 0; }

/* Ровные формы-карточки: одинаковый промежуток между рядами и подвал с действиями */
.form-grid { gap: 0 12px; }
.method-card > .field, .method-card > .form-grid { margin-bottom: 0; }
.method-card > * + * { margin-top: 12px; }
.method-card .field { margin-bottom: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .form-grid { gap: 12px; } .form-grid .field[style*="span 2"] { grid-column: auto !important; } }
/* Заголовки колонок и бейджи не разрываются на строки */
.table th, .badge { white-space: nowrap; }

/* ================= Баннеры ================= */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.banner { display: grid; gap: 12px; align-content: start; padding: 14px; }
.banner.off { opacity: .55; }
.banner-preview { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: repeating-conic-gradient(#ffffff08 0 25%, transparent 0 50%) 0 0 / 16px 16px, var(--bg2); display: grid; place-items: center; }
.banner-preview img, .banner-preview video { width: 100%; height: 100%; object-fit: contain; display: block; }
.banner-file { display: grid; place-items: center; gap: 6px; color: var(--muted); font-weight: 700; }
.banner-file .ico { width: 34px; height: 34px; }
.banner-body { display: grid; gap: 2px; min-width: 0; }
.banner-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner .field { margin: 0; }
.banner .card-foot { padding-top: 10px; }
.stack { display: grid; gap: 14px; }
.stack .field { margin: 0; }

/* ================= Условия оплаты в профиле ================= */
.rate-plat { padding: 12px 0; border-top: 1px solid var(--line); }
.rate-plat:first-of-type { border-top: 0; }
.rate-plat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rate-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.rate-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--accent2); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.rate-ico .ico { width: 17px; height: 17px; }
.rate-name { flex: 1; min-width: 0; }
@media (max-width: 640px) { .rate-row { flex-wrap: wrap; } .rate-row b { width: 100%; padding-left: 40px; } }
/* На телефоне форма загрузки баннеров — над списком */
@media (max-width: 900px) { .banners-admin > div:last-child { order: -1; } }

/* ================= Превью баннера при наведении ================= */
.banner-preview { position: relative; }
.banner-preview.is-video { cursor: pointer; }
.banner-preview .play-hint {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; background: rgba(0, 0, 0, .5); transition: opacity .2s; pointer-events: none;
}
.banner-preview .play-hint .ico { width: 16px; height: 16px; }
.banner-preview.playing .play-hint { opacity: 0; }
.banner-file small { font-weight: 400; font-size: 12px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--muted) 35%, transparent); border-top-color: var(--accent2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Стримы для нарезки */
.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vod { display: flex; flex-direction: column; gap: 6px; }
.vod .btn { margin-top: auto; }
.vod-poster { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--accent) 10%, var(--card)); margin-bottom: 4px; }
.vod-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vod-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; font-size: 12px; background: rgba(0, 0, 0, .75); color: #fff; }
.vod-title { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff4d5e; margin-right: 6px; vertical-align: 1px; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .35; } }

/* ================= Подключение платформ ================= */
.integ-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.integ-head .pbtn { pointer-events: none; }
.integ.later { opacity: .75; }
.integ-steps { margin: 16px 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.5; }
.integ-steps li::marker { color: var(--accent2); font-weight: 700; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13.5px; }

/* ================= Тема «Графит»: переливающаяся сетка + дымчатое стекло ================= */
[data-theme=graphite] {
  --bg: #000; --bg2: rgba(255, 255, 255, .035); --card: rgba(16, 16, 16, .62); --card2: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .1); --text: #f2f2f2; --muted: #8e8e8e; --accent: #d9d9d9; --accent2: #ffffff;
  --menu: rgba(18, 18, 18, .9); --side-bg: rgba(10, 10, 10, .55);
}
[data-theme=graphite] body { background: #000; }
[data-theme=graphite] .bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #000; }
[data-theme=graphite] .bg-fx i { display: none; }
#bg-grid { display: none; }
[data-theme=graphite] #bg-grid { position: absolute; inset: 0; display: block; }

/* Стекло: дымчатое, с лёгкой светлой кромкой сверху */
[data-theme=graphite] .card, [data-theme=graphite] .sidebar, [data-theme=graphite] .topbar, [data-theme=graphite] .dd-menu,
[data-theme=graphite] .sel-list, [data-theme=graphite] .modal, [data-theme=graphite] .theme-card, [data-theme=graphite] .method-card,
[data-theme=graphite] .plat, [data-theme=graphite] .icon-btn, [data-theme=graphite] .toast {
  backdrop-filter: blur(16px) saturate(115%); -webkit-backdrop-filter: blur(16px) saturate(115%);
}
[data-theme=graphite] .card, [data-theme=graphite] .theme-card {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, rgba(28, 28, 28, .72), rgba(12, 12, 12, .7));
  border-color: rgba(255, 255, 255, .09);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
}
[data-theme=graphite] .card::before, [data-theme=graphite] .theme-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(160deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .03) 35%, transparent 60%, rgba(255, 255, 255, .06));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
[data-theme=graphite] .card.pad0 { overflow: hidden; }
[data-theme=graphite] .sidebar { position: sticky; top: 0; border-right-color: rgba(255, 255, 255, .07); }
[data-theme=graphite] .topbar { background: rgba(0, 0, 0, .35); border-bottom-color: rgba(255, 255, 255, .06); }
[data-theme=graphite] h1 { font-weight: 700; }
[data-theme=graphite] a { color: #e6e6e6; }
[data-theme=graphite] a:hover { color: #fff; }
[data-theme=graphite] .muted { color: var(--muted); }

/* Кнопки: светлое «стекло» с тонким кольцом, как на образце */
[data-theme=graphite] .btn:not(.ghost):not(.bad):not(.ok) {
  color: #fff; border: 1px solid rgba(255, 255, 255, .55);
  background: linear-gradient(180deg, #5a5a5a, #343434);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 6px 18px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .28);
}
[data-theme=graphite] .btn:not(.ghost):not(.bad):not(.ok):hover { filter: none; background: linear-gradient(180deg, #686868, #3c3c3c); }
[data-theme=graphite] .btn.ghost { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); color: #eee; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
[data-theme=graphite] .btn.ghost:hover { border-color: rgba(255, 255, 255, .3); }
[data-theme=graphite] .logo i { background: linear-gradient(180deg, #6a6a6a, #2a2a2a); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
[data-theme=graphite] .logo { color: #fff; }

/* Поля ввода */
[data-theme=graphite] input[type=text], [data-theme=graphite] input[type=email], [data-theme=graphite] input[type=password],
[data-theme=graphite] input[type=number], [data-theme=graphite] input[type=url], [data-theme=graphite] textarea,
[data-theme=graphite] .sel-btn, [data-theme=graphite] select {
  background-color: rgba(0, 0, 0, .45); border-color: rgba(255, 255, 255, .12); color: #f2f2f2;
}
[data-theme=graphite] input:focus, [data-theme=graphite] textarea:focus, [data-theme=graphite] .sel.open .sel-btn, [data-theme=graphite] .sel-btn:focus-visible {
  border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
}
[data-theme=graphite] input[type=checkbox]:checked { background-color: #e8e8e8; border-color: #e8e8e8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3.2 3L15 6.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Меню и вкладки */
[data-theme=graphite] .snav a.on { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
[data-theme=graphite] .snav a.on::before { background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .6); }
[data-theme=graphite] .snav a.on .ico { color: #fff; }
[data-theme=graphite] .tabs a.on, [data-theme=graphite] .admin-nav a.on { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .07); }
[data-theme=graphite] .icon-btn { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
[data-theme=graphite] .icon-btn.on { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
[data-theme=graphite] .stat.accent { background: linear-gradient(180deg, rgba(60, 60, 60, .6), rgba(20, 20, 20, .7)); border-color: rgba(255, 255, 255, .18); }
[data-theme=graphite] .uid, [data-theme=graphite] .badge { color: #e6e6e6; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
[data-theme=graphite] .badge.pending { color: var(--warn); } [data-theme=graphite] .badge.approved, [data-theme=graphite] .badge.paid { color: var(--ok); }
[data-theme=graphite] .badge.rejected, [data-theme=graphite] .badge.banned { color: var(--bad); }
[data-theme=graphite] .table th { background: rgba(255, 255, 255, .03); }
[data-theme=graphite] .bar i { background: linear-gradient(90deg, #8a8a8a, #fff); }
[data-theme=graphite] .chart .line { stroke: #e8e8e8; }
[data-theme=graphite] .chart .dot { fill: #e8e8e8; stroke: #111; }
[data-theme=graphite] .tariff-ico, [data-theme=graphite] .rate-ico, [data-theme=graphite] .link-card > span, [data-theme=graphite] .drop-ico { color: #fff; background: rgba(255, 255, 255, .08); }

/* Нижняя панель на телефоне — дымчатая */
@media (max-width: 900px) {
  [data-theme=graphite] .tabbar {
    background: linear-gradient(180deg, rgba(60, 60, 60, .38), rgba(20, 20, 20, .55)), rgba(0, 0, 0, .35);
    border-color: rgba(255, 255, 255, .16);
  }
  [data-theme=graphite] .tab.on { background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07)); }
  [data-theme=graphite] .tab-plus { background: linear-gradient(180deg, #f2f2f2, #9a9a9a); color: #000; box-shadow: 0 8px 22px rgba(0, 0, 0, .6), inset 0 1px 0 #fff; }
}

/* Карточка выбора темы */
.tp-graphite { background:
  repeating-linear-gradient(90deg, transparent 0 4px, #000 4px 5px),
  repeating-linear-gradient(0deg, transparent 0 14px, #000 14px 17px),
  radial-gradient(60% 70% at 70% 30%, #3a3a3a, #101010 70%), #000; }
.tp-graphite i { background: rgba(24, 24, 24, .8); border: 1px solid rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
@media (max-width: 1100px) { .grid.g4 > .theme-card { min-width: 0; } }

/* Логотип-картинка вместо буквы */
.logo i { overflow: hidden; }
.logo i img { width: 100%; height: 100%; display: block; }
.logo i:has(img), [data-theme] .logo i:has(img) { background: none !important; box-shadow: none !important; border-radius: 50%; }

/* Узкие телефоны (до 360 px): карточки-формы не вылезают за экран, кнопки переносятся */
.method-card, .method-card > *, .form-grid > * { min-width: 0; }
@media (max-width: 480px) {
  .method-list { padding-left: 12px; padding-right: 12px; }
  .method-card { padding: 12px; }
  .cell-actions { flex-wrap: wrap; }
  .card-foot { align-items: flex-start; }
}

/* Короткое имя в шапке на узких телефонах */
.ln-short { display: none; }
@media (max-width: 430px) { .mobile-logo .ln-full { display: none; } .mobile-logo .ln-short { display: inline; } }

/* Таблицы на телефоне не сжимаются по буквам, а листаются вбок */
@media (max-width: 640px) {
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap .table { min-width: 580px; }
  .table-wrap .table th, .table-wrap .table td { white-space: nowrap; }
  .table-wrap .table td .small { white-space: normal; min-width: 140px; }
}

.icon-btn.sm { width: 32px; height: 32px; flex: none; }
.icon-btn.sm svg { width: 16px; height: 16px; }

/* Сворачиваемая аналитика канала */
details.more { margin-top: 12px; }
details.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent2); padding: 6px 0; user-select: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary svg { width: 16px; height: 16px; transition: transform .2s; }
details.more[open] > summary svg { transform: rotate(180deg); }
details.more .more-close, details.more[open] .more-open { display: none; }
details.more[open] .more-close { display: inline; }
details.more[open] > summary + * { margin-top: 6px; }

/* Логотип: белый на тёмных оформлениях, чёрный на светлых (для светлой темы — data-scheme="light") */
.logo i img.lg-b { display: none; }
[data-scheme=light] .logo i img.lg-w { display: none; }
[data-scheme=light] .logo i img.lg-b { display: block; }
