:root {
  --bg: #07090f;
  --bg-card: rgba(17, 22, 34, 0.72);
  --bg-input: rgba(9, 12, 20, 0.78);
  --border: rgba(148, 180, 220, 0.14);
  --border-strong: rgba(168, 200, 240, 0.38);
  --text: #e8edf7;
  --muted: #8d9bb5;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-2: #94a3b8;
  --accent-3: #e2e8f0;
  --grad: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  --grad-bright: linear-gradient(120deg, #cbd5e1 0%, #7dd3fc 40%, #e2e8f0 70%, #94a3b8 100%);
  --grad-metal: linear-gradient(135deg, #475569 0%, #94a3b8 30%, #e2e8f0 50%, #94a3b8 70%, #475569 100%);
  --danger: #f43f5e;
  --secondary: rgba(148, 180, 220, 0.08);
  --secondary-hover: rgba(148, 180, 220, 0.16);
  --radius: 16px;
  --glow: 0 0 28px rgba(125, 211, 252, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* metallic fluid фон: холодные сияния + блик, плывущий по экрану */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(38% 38% at 12% 18%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(42% 42% at 88% 12%, rgba(203, 213, 225, 0.12), transparent 60%),
    radial-gradient(50% 50% at 50% 92%, rgba(51, 65, 85, 0.5), transparent 60%);
  filter: blur(40px);
  animation: bgFloat 20s ease-in-out infinite alternate;
}
/* широкий мягкий блик, проходящий по фону (Vision Pro style) */
body::after {
  content: "";
  position: fixed;
  top: -60%; left: -80%;
  width: 60%; height: 220%;
  z-index: -1;
  background: linear-gradient(100deg, transparent 0%, rgba(226, 232, 240, 0.05) 45%, rgba(125, 211, 252, 0.08) 50%, rgba(226, 232, 240, 0.05) 55%, transparent 100%);
  transform: rotate(12deg);
  animation: sheenPass 14s linear infinite;
  pointer-events: none;
}
@keyframes bgFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(2%, -2%) scale(1.05); }
  100% { transform: translate(-2%, 2%) scale(1.02); }
}
@keyframes sheenPass {
  0%   { left: -80%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

/* ─── LOGIN ─── */
.login-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 40px; width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), var(--glow);
  position: relative;
}
.login-card h1 {
  text-align: center; font-size: 28px; font-weight: 800;
  background: var(--grad-bright);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle { text-align: center; color: var(--muted); margin-bottom: 8px; }

/* ─── TOPBAR ─── */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(12, 16, 26, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.brand {
  font-weight: 800; font-size: 20px; letter-spacing: .3px;
  background: var(--grad-bright);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brandShine 6s linear infinite;
}
@keyframes brandShine {
  to { background-position: 200% center; }
}
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a, .link-btn {
  color: var(--muted); text-decoration: none; font-size: 14px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: color .2s;
}
.topbar nav a:hover, .link-btn:hover { color: var(--accent-hover); }
.topbar .user { color: var(--text); font-size: 14px; }
.topbar .logout { color: var(--danger); }

/* ─── BALANCE CHIPS ─── */
.balance-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--secondary); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 14px; font-size: 13px;
  cursor: pointer; user-select: none; transition: all .2s;
}
.balance-chip:hover { background: var(--secondary-hover); border-color: var(--border-strong); box-shadow: var(--glow); }
.balance-chip .bal-val { font-weight: 700; color: var(--accent-hover); font-family: "Cascadia Code", Consolas, monospace; }

/* ─── GRID ─── */
.grid {
  display: grid; gap: 18px; padding: 24px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  max-width: 1200px; margin: 0 auto;
}
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
  overflow: hidden;
}
/* металлическая кромка сверху карточки */
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1.5px;
  background: var(--grad-metal); opacity: .9;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 50px rgba(0,0,0,.55), var(--glow), inset 0 1px 0 rgba(255,255,255,.1);
}
.card.wide { grid-column: 1 / -1; }
.card h2 { font-size: 17px; font-weight: 700; }

/* ─── INPUTS ─── */
input, select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 13px; font-size: 14px; font-family: inherit; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
input::placeholder { color: rgba(141, 155, 181, 0.55); }
select option { background: #111622; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input, .row > select { flex: 1; width: auto; }

/* ─── BUTTONS: металлик с бликом ─── */
button {
  position: relative; overflow: hidden;
  background: var(--grad-metal); color: #f1f5f9; border: 1px solid rgba(226, 232, 240, 0.25);
  border-radius: 12px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.4);
  transition: transform .15s, box-shadow .25s, border-color .25s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,.18);
}
/* бегущий блик по кнопке */
button::before {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-18deg);
  transition: left .5s ease;
  pointer-events: none;
}
button:hover { transform: translateY(-1px); border-color: rgba(226, 232, 240, 0.5); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), var(--glow), inset 0 1px 0 rgba(255,255,255,.22); }
button:hover::before { left: 130%; }
button:active { transform: translateY(0); }
button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
button:disabled::before { display: none; }
button.secondary {
  background: var(--secondary); color: var(--text);
  border: 1px solid var(--border); text-shadow: none; box-shadow: none;
}
button.secondary::before { display: none; }
button.secondary:hover { background: var(--secondary-hover); border-color: var(--border-strong); transform: none; }
button.danger { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3); }
button.danger:hover { filter: brightness(1.12); }

/* ─── RESULTS ─── */
.result {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; font-size: 14px;
}
.log {
  background: rgba(4, 4, 12, 0.7); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; font-size: 12px;
  color: var(--muted); max-height: 200px; overflow-y: auto;
  white-space: pre-wrap; font-family: "Cascadia Code", Consolas, monospace;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: "Cascadia Code", Consolas, monospace; }
hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ─── SCORE ─── */
.score-badge {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 700; margin-bottom: 8px;
}
.score-num {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; color: #fff; font-weight: 800;
}
.s-good { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 0 22px rgba(34,197,94,.5); }
.s-mid  { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 0 22px rgba(245,158,11,.45); }
.s-bad  { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 0 22px rgba(244,63,94,.5); }
.issues { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.issues li { font-size: 13px; color: #fca5c4; padding-left: 14px; position: relative; }
.issues li::before { content: "•"; position: absolute; left: 0; color: var(--danger); }

.code-highlight {
  font-size: 26px; font-weight: 800; letter-spacing: 3px;
  font-family: "Cascadia Code", Consolas, monospace;
  background: var(--grad-bright);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.copy-field {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  background: var(--bg-input); padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); margin-top: 6px;
}
.copy-field .mono { word-break: break-all; }
.copy-btn { padding: 5px 12px; font-size: 12px; }

/* ─── ALERTS ─── */
.alert { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.alert-error { background: rgba(244,63,94,.15); color: #fca5c4; border: 1px solid var(--danger); }
.alert-success { background: rgba(34,197,94,.15); color: #86efac; border: 1px solid #22c55e; }

/* ─── MODAL ─── */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 24px; width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6), var(--glow);
}
.modal-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

/* ─── HISTORY ─── */
.history-wrap { max-width: 1000px; margin: 0 auto; padding: 24px; }
.history-wrap h2 { margin-bottom: 16px; }
.history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.history-table th, .history-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.history-table th { color: var(--muted); font-weight: 500; }
.nowrap { white-space: nowrap; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.badge-ip { background: rgba(34,197,94,.18); color: #86efac; border-color: rgba(34,197,94,.35); }
.badge-email { background: rgba(59,130,246,.2); color: #93c5fd; border-color: rgba(59,130,246,.35); }
.badge-sms { background: rgba(245,158,11,.2); color: #fcd34d; border-color: rgba(245,158,11,.35); }
.badge-names { background: rgba(154,160,196,.2); color: #c7cbe8; border-color: rgba(154,160,196,.3); }

/* ─── ADMIN: USERS ─── */
.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.admin-wrap h2 { margin-bottom: 4px; }
.admin-wrap h3 { font-size: 15px; margin-bottom: 10px; }
.user-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.user-form input[type="text"] { flex: 1; min-width: 160px; width: auto; }
.checkbox { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.checkbox input { width: auto; }
.users-table td { vertical-align: middle; }
.users-table .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input[type="text"] { width: 130px; padding: 6px 8px; font-size: 13px; }
button.small { padding: 6px 10px; font-size: 12px; }

/* ─── WORK SESSION BAR ─── */
.session-bar { gap: 14px; }
.session-bar-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.session-btns { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px; }
.session-btns button { flex: 0 0 auto; }

/* быстрые кнопки домена */
.quick-domains { gap: 6px; }
.chip-btn {
  background: var(--secondary); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 12px; font-size: 12px; flex: 0 0 auto;
  box-shadow: none; transition: all .2s;
}
.chip-btn:hover { background: var(--secondary-hover); border-color: var(--border-strong); filter: none; transform: none; }
.session-info { display: flex; flex-direction: column; gap: 6px; }
.session-active-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.session-seq {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-metal); color: #f1f5f9; font-weight: 700;
  border-radius: 8px; padding: 3px 12px; font-size: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.15);
}
.session-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px;
}
.s-label { color: var(--muted); min-width: 90px; }
.code-inline {
  background: rgba(125, 211, 252, 0.14); color: #7dd3fc;
  padding: 2px 10px; border-radius: 12px; font-size: 13px;
  font-family: "Cascadia Code", Consolas, monospace;
  border: 1px solid rgba(125, 211, 252, 0.3);
}

/* ─── SESSIONS HISTORY ─── */
.sessions-list { display: flex; flex-direction: column; gap: 14px; }
.session-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.session-card::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--grad-bright);
}
.session-card:hover {
  transform: translateY(-2px); border-color: var(--border-strong);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), var(--glow);
}
.session-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.session-head .session-del { margin-left: auto; }

/* ─── AWS ACCOUNTS ─── */
.accounts-wrap { width: 100%; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.accounts-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.head-btns { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 10px; }
.head-btns > * { flex: 0 0 auto; }

/* фильтры аккаунтов */
.acc-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.acc-filters #acc-search { flex: 1; min-width: 240px; }
.acc-filters select { width: auto; min-width: 140px; }
.acc-filters #acc-count { margin-left: auto; white-space: nowrap; }
.acc-form { gap: 12px; }
.acc-table-wrap {
  overflow: auto;
  background: var(--bg-card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 200px;
  max-height: 85vh;
  height: 480px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.acc-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.acc-table th, .acc-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); }
.acc-table th {
  color: var(--muted); font-weight: 600; font-size: 12px;
  position: sticky; top: 0; background: rgba(13, 17, 27, 0.95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1;
  border-bottom: 1px solid var(--border-strong);
}
.acc-table tbody tr { transition: background .15s; }
.acc-table tbody tr:hover { background: rgba(148, 180, 220, 0.07); }
.acc-table tr:last-child td { border-bottom: none; }
.acc-actions { display: flex; gap: 6px; }
.badge-err { background: rgba(244,63,94,.2); color: #fca5c4; border: 1px solid rgba(244,63,94,.35); }
.badge-checking { background: rgba(59,130,246,.2); color: #93c5fd; border: 1px solid rgba(59,130,246,.4); }

/* ─── DRAGGABLE MODAL ─── */
.drag-modal {
  position: fixed; top: 80px; left: 80px; z-index: 100;
  width: 380px; max-width: calc(100vw - 20px);
  background: var(--bg-card);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.6), var(--glow);
  display: flex; flex-direction: column;
}
.drag-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 18px; background: var(--grad-metal);
  border-bottom: 1px solid rgba(226, 232, 240, 0.25);
  border-radius: 16px 16px 0 0;
  cursor: move; font-weight: 700; user-select: none; color: #f1f5f9;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.drag-close {
  background: none; border: none; color: rgba(255,255,255,.85);
  font-size: 16px; cursor: pointer; padding: 0 4px; box-shadow: none;
}
.drag-close:hover { color: #fff; background: none; filter: none; transform: none; }
.drag-modal-body {
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  max-height: 75vh; overflow-y: auto;
}
.drag-modal-body label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--muted);
}
.drag-modal-body textarea {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  padding: 10px 13px; font-size: 14px; font-family: inherit; width: 100%; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.drag-modal-body textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,.18); }
.mfa-code {
  margin-top: 6px; padding: 10px 12px; background: var(--bg-input);
  border: 1px solid var(--border-strong); border-radius: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.18);
}
.mfa-row { display: flex; gap: 8px; align-items: center; }
.mfa-row input { flex: 1; min-width: 0; }
.mfa-row button { flex: 0 0 auto; }
.session-body { display: flex; flex-direction: column; gap: 6px; }

/* ─── градиентные заголовки страниц ─── */
.history-wrap h2, .accounts-wrap h2, .admin-wrap h2 {
  background: var(--grad-bright);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ─── кастомный скроллбар ─── */
* { scrollbar-width: thin; scrollbar-color: rgba(148, 180, 220, 0.4) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(203, 213, 225, 0.5), rgba(100, 130, 170, 0.5));
  border-radius: 8px; border: 2px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.8), rgba(125, 211, 252, 0.6));
  background-clip: padding-box;
}

/* ─── плавное появление карточек ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .session-card, .acc-table-wrap { animation: fadeUp .4s ease both; }

/* ─── ссылка-кнопка (Архив) ─── */
.btn-link-secondary {
  display: inline-flex; align-items: center;
  background: var(--secondary); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .2s;
}
.btn-link-secondary:hover { background: var(--secondary-hover); border-color: var(--border-strong); }

/* ─── верхняя сетка: массовые действия + статистика ─── */
.accounts-topgrid {
  display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start;
}
@media (max-width: 900px) { .accounts-topgrid { grid-template-columns: 1fr; } }

/* таблица + статистика справа */
.acc-main-row { display: flex; gap: 16px; align-items: flex-start; }
.acc-main-row .acc-table-wrap { flex: 1; min-width: 0; }
.acc-main-row .stats-box { flex: 0 0 260px; }
@media (max-width: 1100px) {
  .acc-main-row { flex-direction: column; }
  .acc-main-row .stats-box { flex: none; width: 100%; }
}

.bulk-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.bulk-bar #bulk-count { font-weight: 600; }

.stats-box {
  background: var(--bg-card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: 0 10px 28px rgba(0,0,0,.3);
  position: relative; overflow: hidden;
}
.stats-box::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-bright);
}
.stats-title { font-weight: 700; margin-bottom: 10px; font-size: 14px; }
.stats-list { display: flex; flex-direction: column; gap: 6px; }
/* списки пользователей — компактно, но без скролла */
.stats-box > .stats-list { max-height: none; overflow: visible; }
/* статистика лимитов — тянется вниз, скролл только если очень много групп */
#limits-list { max-height: 60vh; overflow-y: auto; }
.stats-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 10px; background: var(--bg-input); border-radius: 8px; font-size: 13px;
}
.stats-user { color: var(--text); }
.stats-num {
  font-weight: 700; font-family: "Cascadia Code", Consolas, monospace;
  background: var(--grad-bright);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── галочки в таблице ─── */
.col-check { width: 38px; text-align: center; }
.col-check input { width: auto; margin: 0; cursor: pointer; }
.acc-table td.col-check, .acc-table th.col-check { padding-left: 14px; padding-right: 6px; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }

/* ─── история недель (админ) ─── */
.week-history { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }

/* балансы сервисов в статистике */
.stats-balances { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.stats-balances .stats-subtitle { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.stats-balances .stats-row { font-size: 13px; }
.week-history-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.week-block { margin-bottom: 10px; }
.week-date { font-size: 12px; color: var(--accent-hover); margin-bottom: 3px; font-weight: 600; }
.week-rows { display: flex; flex-direction: column; gap: 2px; padding-left: 8px; }
.week-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.week-row .stats-num { font-size: 12px; }

/* ─── колонки IP / Комментарий ─── */
.acc-comment {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; cursor: default;
}

/* ─── подсветка строки: Bedrock-лимит есть ─── */
.acc-table tbody tr.row-bedrock-ok {
  background: rgba(34, 197, 94, 0.12);
}
.acc-table tbody tr.row-bedrock-ok:hover {
  background: rgba(34, 197, 94, 0.2);
}

/* ─── бейдж 0 RPM — жёлтый ─── */
.badge-zero { background: rgba(245, 158, 11, 0.22); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.5); }

/* ─── развёрнутая информация о регистрации ─── */
.acc-detail {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  padding: 12px 16px; background: var(--bg-input);
  border-left: 3px solid var(--accent); border-radius: 6px;
}
.detail-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.acc-detail-row td { padding: 6px 10px !important; }

/* вторая страница окна (регистрация) */
.reg-form { display: flex; flex-direction: column; gap: 12px; }
