@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #06080d;
  --bg-2: #0c1018;
  --surface: rgba(16, 20, 30, 0.72);
  --surface-solid: #12161f;
  --surface2: rgba(24, 30, 44, 0.9);
  --surface-hover: rgba(32, 40, 58, 0.95);
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --text: #eef2f8;
  --text-muted: #7d8aa0;
  --accent: #4a9eff;
  --accent-2: #229ed9;
  --accent-bright: #4a9eff;
  --accent-glow: rgba(74, 158, 255, 0.25);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.12);
  --purple: #a78bfa;
  --orange: #fb923c;
  --cyan: #22d3ee;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 248px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.38);
  --input-bg: rgba(8, 12, 20, 0.6);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */
.panel-body {
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(74, 158, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(167, 139, 250, 0.08), transparent 50%),
    var(--bg);
}

/* ── Login ── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 50% at 50% -20%, rgba(74, 158, 255, 0.18), transparent 60%),
    var(--bg);
}

.login-card {
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 28px;
}

.login-logo img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 8px;
}

.login-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.login-logo-ver {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.login-card .login-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-card input::placeholder { color: var(--text-muted); }

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-login {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.login-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 14px;
  display: none;
  padding: 10px 12px;
  background: var(--red-dim);
  border-radius: var(--radius-sm);
}

/* ── Panel layout ── */
.panel-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon img {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 10px;
}

.brand-icon--landing img,
.login-logo-icon {
  border-radius: 8px;
  filter: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: var(--text);
}

.brand-ver {
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
  line-height: 1.2;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 14px 12px 6px;
  opacity: 0.7;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.18), rgba(34, 158, 217, 0.08));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(74, 158, 255, 0.2);
}

.sidebar-link.active svg { stroke: var(--accent); }

.sidebar-link-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sidebar-maintenance-badge {
  display: none;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  line-height: 1.3;
  white-space: nowrap;
}

.sidebar-link-maintenance {
  opacity: 0.72;
}

.sidebar-link-maintenance .sidebar-maintenance-badge {
  display: inline-flex;
}

.sidebar-footer {
  padding: 12px 10px 18px;
  border-top: 1px solid var(--border);
}

.sidebar-add {
  background: rgba(74, 158, 255, 0.08) !important;
  color: var(--accent) !important;
  border: 1px dashed rgba(74, 158, 255, 0.3) !important;
}

.sidebar-add:hover {
  background: rgba(74, 158, 255, 0.15) !important;
}

/* ── Main area ── */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.5);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  width: 280px;
  transition: border-color var(--transition);
}

.topbar-search:focus-within {
  border-color: rgba(74, 158, 255, 0.4);
}

.topbar-search svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.toolbar-search {
  background: transparent;
  border: none;
  padding: 10px 0;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  width: 100%;
}

.toolbar-search:focus { outline: none; }
.toolbar-search::placeholder { color: var(--text-muted); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-role {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.header-role.admin {
  color: var(--accent);
  background: rgba(74, 158, 255, 0.1);
  border-color: rgba(74, 158, 255, 0.25);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 30px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.header-user {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.toolbar-logout:hover {
  background: var(--red-dim) !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
  color: var(--red) !important;
}

/* ── Content ── */
.panel-content {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 1200px;
  width: 100%;
}

.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  margin-bottom: 28px;
}

.page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.page .subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.save-block { margin-bottom: 20px; }
.card.save-block { margin-bottom: 20px; }

.block-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.15;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-card.accent-blue::after { background: var(--accent); }
.stat-card.accent-cyan::after { background: var(--cyan); }
.stat-card.accent-purple::after { background: var(--purple); }
.stat-card.accent-green::after { background: var(--green); }
.stat-card.accent-orange::after { background: var(--orange); }
.stat-card.accent-red::after { background: var(--red); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.accent-blue .stat-icon { background: rgba(74, 158, 255, 0.15); color: var(--accent); }
.accent-cyan .stat-icon { background: rgba(34, 211, 238, 0.12); color: var(--cyan); }
.accent-purple .stat-icon { background: rgba(167, 139, 250, 0.12); color: var(--purple); }
.accent-green .stat-icon { background: var(--green-dim); color: var(--green); }
.accent-orange .stat-icon { background: rgba(251, 146, 60, 0.12); color: var(--orange); }
.accent-red .stat-icon { background: var(--red-dim); color: var(--red); }

.stat-body .value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.accent-blue .value { color: var(--accent); }
.accent-cyan .value { color: var(--cyan); }
.accent-purple .value { color: var(--purple); }
.accent-green .value { color: var(--green); }
.accent-orange .value { color: var(--orange); }
.accent-red .value { color: var(--red); }

.stat-body .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Home screen ── */
.home-profile {
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.08), rgba(167, 139, 250, 0.05));
  border-color: rgba(74, 158, 255, 0.15);
}

.home-profile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.home-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.home-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.home-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-balance {
  color: var(--green);
}

.home-field-full {
  min-width: 100%;
}

.home-nickname {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
}

.home-balance-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.home-field-balance {
  flex: 1;
  min-width: 220px;
}

.workspace-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.workspace-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.workspace-tab:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.workspace-tab.active {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.18), rgba(34, 158, 217, 0.08));
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.25);
}

.workspace-panel {
  display: none;
}

.workspace-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

.modal-panel-sm {
  max-width: 420px;
}

.modal-panel-wide {
  max-width: 720px;
}

.proxy-main-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-bottom: 22px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(74, 158, 255, 0.35);
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.12), rgba(34, 158, 217, 0.05));
  box-shadow: 0 4px 20px rgba(74, 158, 255, 0.08);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all var(--transition);
}

.proxy-main-card:hover {
  border-color: rgba(74, 158, 255, 0.55);
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.16), rgba(34, 158, 217, 0.08));
  transform: translateY(-1px);
}

.proxy-main-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.proxy-main-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74, 158, 255, 0.15);
  border: 1px solid rgba(74, 158, 255, 0.25);
}

.proxy-main-count {
  flex-shrink: 0;
  font-size: 1rem;
}

.proxy-scopes-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
  opacity: 0.85;
}

.proxy-scopes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.proxy-scope-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all var(--transition);
}

.proxy-scope-card:hover {
  border-color: rgba(74, 158, 255, 0.35);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.proxy-scope-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.proxy-scope-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.proxy-scope-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.settings-tab:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.settings-tab.active {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.18), rgba(34, 158, 217, 0.08));
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.25);
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.tg-settings-panel {
  display: none;
}

.tg-settings-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

#tg-settings-panel-spam > .card,
#tg-settings-panel-spam > .stealer-settings-card {
  margin-bottom: 16px;
}

.tool-btn-settings {
  border-color: rgba(74, 158, 255, 0.35);
  color: var(--accent);
}

.tool-btn-settings:hover:not(:disabled) {
  border-color: rgba(74, 158, 255, 0.55);
  background: rgba(74, 158, 255, 0.08);
}

.settings-section {
  margin-bottom: 16px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section .block-title {
  margin-bottom: 8px;
}

.account-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 520px;
}

.account-settings-card {
  max-width: 640px;
}

.account-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.account-security-section {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-security-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.account-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-details[open] {
  border-color: rgba(74, 158, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.08);
}

.account-details-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s ease;
}

.account-details-summary::-webkit-details-marker {
  display: none;
}

.account-details-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.account-details-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent);
}

.account-details-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-details-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-details-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.account-details-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.account-details-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  margin-right: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.account-details[open] .account-details-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
  border-color: var(--accent);
}

.account-details-body {
  padding: 14px 16px 16px 64px;
  animation: accountDetailsIn 0.2s ease;
}

@media (max-width: 600px) {
  .account-details-body {
    padding-left: 16px;
  }
}

@keyframes accountDetailsIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-form-result {
  margin-top: 12px;
}

.account-form-result:empty {
  display: none;
}

.account-password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.balance-topup-card {
  max-width: 520px;
}

.balance-topup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.balance-topup-form .input-dark {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}

.balance-history-card {
  max-width: none;
  overflow: hidden;
}

.balance-history-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.balance-history-table {
  width: 100%;
  table-layout: fixed;
}

.balance-history-table th,
.balance-history-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.balance-history-table th:nth-child(1),
.balance-history-table td:nth-child(1) {
  width: 34%;
}

.balance-history-table th:nth-child(2),
.balance-history-table td:nth-child(2) {
  width: 16%;
}

.balance-history-table th:nth-child(3),
.balance-history-table td:nth-child(3) {
  width: 30%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-overflow: clip;
  line-height: 1.35;
}

.balance-history-table th:nth-child(4),
.balance-history-table td:nth-child(4) {
  width: 20%;
}

.balance-tx-pending {
  color: #f0a020;
}

.balance-tx-success {
  color: var(--green, #40916c);
}

.balance-tx-withdraw {
  color: var(--red, #e05c5c);
}

.balance-withdraw-form .btn-outline {
  white-space: nowrap;
}


.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.tools-grid .card {
  margin-bottom: 0;
}

.platform-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 260px;
  padding: 18px;
}

.platform-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  min-height: 36px;
}

.platform-section-head .platform-section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.platform-section-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.platform-section-meta--empty {
  min-height: 40px;
  margin-bottom: 14px;
}

.platform-buy-btn {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 32px;
}

.platform-section .tool-buttons {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-section .tool-btn {
  flex: 1;
  min-height: 44px;
}

.tg-sub-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--green);
  background: rgba(64, 145, 108, 0.12);
  border: 1px solid rgba(64, 145, 108, 0.3);
}

.tg-sub-timer--head {
  flex-shrink: 0;
  margin-left: auto;
}

.platform-section-meta--buy {
  margin-bottom: 14px;
}

.tg-sub-timer::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: sub-timer-pulse 1.4s ease-in-out infinite;
}

@keyframes sub-timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.platform-maintenance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.platform-disabled .tool-btn {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.platform-disabled .tool-btn:hover {
  transform: none;
}

.sub-modal-panel {
  width: 100%;
  max-width: 440px;
  padding: 28px 28px 24px;
}

.sub-modal-panel .modal-header,
.sub-modal-header {
  margin-bottom: 20px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border);
}

.sub-modal-header h2 {
  margin: 0 0 8px;
}

.sub-modal-subtitle {
  margin: 0;
}

.sub-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sub-modal-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.08), rgba(64, 145, 108, 0.06));
  border: 1px solid var(--border);
}

.sub-modal-balance-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sub-modal-balance-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.sub-plans {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.sub-plan {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.sub-plan:hover:not(:disabled):not(.is-selected) {
  border-color: rgba(74, 158, 255, 0.35);
  background: rgba(74, 158, 255, 0.04);
}

.sub-plan.is-selected {
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.15);
}

.sub-plan:disabled {
  opacity: 0.55;
  cursor: wait;
}

.sub-plan-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition);
}

.sub-plan.is-selected .sub-plan-radio {
  border-color: var(--accent);
}

.sub-plan.is-selected .sub-plan-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.sub-plan-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sub-plan-days {
  font-size: 0.95rem;
  font-weight: 700;
}

.sub-plan-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sub-plan-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sub-plan-trial {
  border-color: rgba(74, 158, 255, 0.35);
  background: rgba(74, 158, 255, 0.06);
}

.sub-plan-trial .sub-plan-price {
  color: var(--green);
}

.sub-plan[hidden],
.sub-plan.is-hidden {
  display: none !important;
}

.sub-modal-selected {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 1.2em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
}

.sub-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.sub-modal-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

.sub-modal-result {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
}

.sub-modal-result-ok {
  color: var(--green);
  background: rgba(64, 145, 108, 0.1);
  border: 1px solid rgba(64, 145, 108, 0.25);
}

.sub-modal-result-error {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.platform-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-section-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.platform-tg::before { background: #2aabee; box-shadow: 0 0 10px rgba(42, 171, 238, 0.45); }
.platform-max::before { background: var(--purple); box-shadow: 0 0 10px rgba(167, 139, 250, 0.45); }
.platform-wa::before { background: #25d366; box-shadow: 0 0 10px rgba(37, 211, 102, 0.45); }
.platform-mkt::before { background: linear-gradient(180deg, #4A9EFF 0%, #C44AFF 100%); box-shadow: 0 0 10px rgba(106, 120, 255, 0.45); }

.stealer-settings-locked .stealer-settings-summary {
  cursor: not-allowed;
  opacity: 0.72;
}

.stealer-settings-locked .stealer-settings-body {
  display: none !important;
}

.stealer-settings-locked .stealer-settings-status {
  color: var(--text-muted);
}

.workspace-tab-maintenance {
  opacity: 0.55;
}

.platform-tg + .tool-buttons .tool-btn:hover { border-color: rgba(42, 171, 238, 0.4); color: #2aabee; }

.platform-soon-card {
  position: relative;
}

.platform-soon-body {
  position: relative;
  flex: 1;
  min-height: 148px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px dashed var(--border);
  overflow: hidden;
}

.platform-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(8, 12, 20, 0.72);
  backdrop-filter: blur(2px);
}

.platform-soon-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.platform-soon-hint {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
}

.topbar-search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.global-search-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.global-search-item:hover {
  background: var(--surface2);
}

.global-search-item-phone {
  font-weight: 700;
  font-size: 0.9rem;
}

.global-search-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.global-search-empty {
  padding: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.stats-refresh-block {
  margin-top: 16px;
}

.stats-extra {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.stats-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.stats-section-tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.stats-section-tab:hover {
  border-color: rgba(74, 158, 255, 0.35);
  color: var(--text);
}

.stats-section-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(74, 158, 255, 0.08);
}

.stats-section-grid {
  margin-top: 4px;
}

.site-stat-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-stat-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.site-stats-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.site-stats-toolbar-hint {
  margin: 0;
}

.site-stat-link {
  appearance: none;
  border: none;
  background: none;
  color: var(--accent-purple, #a78bfa);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-stat-link:hover {
  color: #c4b5fd;
}

.site-stats-logs-modal {
  width: min(98vw, 1440px);
  max-width: min(98vw, 1440px);
}

.site-stats-logs-modal .modal-body {
  max-height: min(78vh, 820px);
  overflow: auto;
}

.site-stats-logs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.site-stats-logs-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-stats-logs-table-wrap {
  max-height: 58vh;
  overflow: auto;
}

.site-stats-logs-table-wrap .data-table {
  table-layout: auto;
  width: 100%;
}

.site-stats-logs-table-wrap .data-table th:nth-child(1),
.site-stats-logs-table-wrap .data-table td.site-log-time {
  width: 110px;
  white-space: nowrap;
}

.site-stats-logs-table-wrap .data-table th:nth-child(2),
.site-stats-logs-table-wrap .data-table td.site-log-ip {
  width: 150px;
}

.site-stats-logs-table-wrap .data-table th:nth-child(3),
.site-stats-logs-table-wrap .data-table td.site-log-landing {
  width: 120px;
}

.site-stats-logs-table-wrap .data-table th:nth-child(5),
.site-stats-logs-table-wrap .data-table td.site-log-details {
  min-width: 420px;
}

.site-stats-logs-table-wrap .data-table th:nth-child(6),
.site-stats-logs-table-wrap .data-table td.site-log-actions {
  width: 90px;
  white-space: nowrap;
}

.site-log-ip {
  white-space: nowrap;
}

.site-log-details {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  line-height: 1.45;
}

.site-log-summary {
  display: block;
}

.site-log-summary-success {
  color: #86efac;
  font-weight: 600;
}

.site-log-row-success .site-log-event .site-log-badge-success {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}

.site-log-technical {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.site-log-journey-text {
  flex: 1;
  min-width: 280px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.site-log-journey-text .site-log-technical {
  margin-top: 2px;
}

.site-log-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-log-badge-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.site-log-badge-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.site-log-badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.site-log-badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.site-log-badge-muted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.site-log-journey-row td {
  background: rgba(0, 0, 0, 0.2);
  padding-top: 8px;
  padding-bottom: 12px;
}

.site-log-journey {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-log-journey li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.site-log-journey-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 110px;
}

.site-log-journey-empty {
  margin: 0;
}

.site-stats-logs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.marketing-soon-card {
  max-width: 560px;
}

.marketing-sell-card {
  max-width: 720px;
}

.marketing-sell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.marketing-sell-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
}

.marketing-platforms {
  margin-bottom: 18px;
}

.marketing-platforms .home-label {
  display: block;
  margin-bottom: 10px;
}

.marketing-platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.marketing-platform-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}

.marketing-platform-option:hover {
  border-color: rgba(74, 158, 255, 0.35);
}

.marketing-platform-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.08);
}

.marketing-platform-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.marketing-auto-row {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.marketing-sell-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.marketing-sell-status {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.marketing-settings-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.marketing-contacts-row {
  flex-wrap: wrap;
  gap: 8px;
}

.marketing-contacts-input {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  flex: 0 0 72px;
  padding: 6px 10px;
  text-align: center;
}

#marketingSettingsModal .input-dark {
  box-sizing: border-box;
}

@media (max-width: 700px) {
  .marketing-platforms-grid {
    grid-template-columns: 1fr;
  }
}

.marketing-soon-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  gap: 12px;
}

.marketing-soon-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.22);
  color: var(--accent);
  margin-bottom: 4px;
}

.marketing-soon-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.marketing-soon-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.marketing-soon-text {
  margin: 0;
  max-width: 420px;
  line-height: 1.5;
}

.stealer-domains-card {
  margin-bottom: 16px;
}

.stealer-domain-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.stealer-domain-form .input-dark {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}

.stealer-domains-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.stealer-domains-head .block-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.stealer-domains-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 0.82rem;
  line-height: 1;
}

.stealer-domains-refresh-icon {
  font-size: 1rem;
  line-height: 1;
}

.stealer-domain-name {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

a.stealer-domain-link {
  color: var(--accent, #5b9cf5);
  text-decoration: none;
  font-weight: 600;
}

a.stealer-domain-link:hover {
  text-decoration: underline;
}

.stealer-domain-status-cell {
  min-width: 0;
}

.stealer-domain-ns-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.stealer-domain-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.domain-ssl-badge {
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.85;
}

.domain-ssl-off {
  opacity: 0.45;
}

.stealer-domain-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.stealer-domain-chip-btn:hover {
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.35);
  color: var(--accent);
}

.stealer-domain-chip-btn-icon {
  padding: 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.stealer-domain-actions .domain-status {
  margin-top: 0;
  margin-right: 0;
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 4px 9px;
}

.stealer-domain-ns {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 158, 255, 0.25);
  background: rgba(74, 158, 255, 0.06);
}

.stealer-domain-ns-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.stealer-domain-ns-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.stealer-domain-ns-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stealer-domain-ns-row .stealer-domain-ns-item {
  flex: 1;
  min-width: 0;
}

.stealer-domain-ns-copy-btn,
.stealer-domain-ns-copy-all {
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}

.stealer-domain-ns-copy-all {
  margin-top: 12px;
  width: 100%;
}

.copy-btn-done {
  border-color: rgba(34, 197, 94, 0.45) !important;
  color: var(--green) !important;
  background: rgba(34, 197, 94, 0.12) !important;
}

.stealer-domain-ns-item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--accent);
}

.stealer-domain-ns-inline code {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 3px 0;
  line-height: 1.35;
  word-break: break-all;
}

.domain-status {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  margin-right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.domain-status-ok {
  color: var(--green);
  background: rgba(64, 145, 108, 0.12);
  border: 1px solid rgba(64, 145, 108, 0.28);
}

.domain-status-pending {
  color: #ffc107;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.25);
}

.domain-status-warn {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.domain-status-danger {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.stealer-domains-table td {
  vertical-align: top;
}

.stealer-domain-landing-select {
  min-width: 160px;
  margin-bottom: 0;
}

.stealer-settings-card {
  max-width: 960px;
}

.stealer-settings-intro {
  margin: 0 0 16px;
}

.stealer-settings-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stealer-settings-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stealer-settings-details[open] {
  border-color: rgba(74, 158, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.08);
}

.stealer-settings-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.stealer-settings-summary::-webkit-details-marker {
  display: none;
}

.stealer-settings-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.stealer-settings-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(74, 158, 255, 0.1);
  font-size: 1.1rem;
}

.stealer-settings-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stealer-settings-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.stealer-settings-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stealer-settings-status {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.stealer-settings-status-on {
  color: var(--green);
  background: rgba(64, 145, 108, 0.12);
}

.stealer-settings-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  margin-right: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stealer-settings-details[open] .stealer-settings-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
  border-color: var(--accent);
}

.stealer-settings-body {
  padding: 0 16px 16px 64px;
  animation: accountDetailsIn 0.2s ease;
}

.stealer-settings-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stealer-autospam-modes {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stealer-delivery-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}

.stealer-delivery-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.stealer-delivery-mode-option:has(input:checked) {
  border-color: rgba(99, 179, 237, 0.55);
  background: rgba(99, 179, 237, 0.08);
}

.stealer-delivery-mode-option input {
  margin-top: 3px;
  flex-shrink: 0;
}

.stealer-delivery-mode-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.9rem;
}

.stealer-delivery-mode-text strong {
  font-weight: 600;
}

.stealer-delivery-mode-text small {
  color: var(--text-muted, #8b95a8);
  font-size: 0.78rem;
  line-height: 1.35;
}

.stealer-autospam-grid {
  margin-top: 4px;
}

.stealer-autospam-grid .stealer-setting-field {
  margin: 0;
}

@media (max-width: 700px) {
  .stealer-delivery-mode {
    grid-template-columns: 1fr;
  }
}

.stealer-setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 600px) {
  .stealer-settings-body {
    padding-left: 16px;
  }

  .stealer-setting-grid {
    grid-template-columns: 1fr;
  }
}

.stealer-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.stealer-setting-options {
  margin: 8px 0 18px;
  padding-left: 4px;
}

.stealer-setting-field {
  margin: 14px 0;
}

.stealer-setting-field .home-label {
  display: block;
  margin-bottom: 8px;
}

.stealer-auto-text {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.domain-landing-locked {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.marketing-soon-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(74, 158, 255, 0.12);
  border: 1px solid rgba(74, 158, 255, 0.28);
}

.refresh-all-stats {
  margin-top: 12px;
}

.refresh-progress {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.refresh-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

.toast-root {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 36px));
}

.toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.25s ease;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.toast-success {
  border-color: rgba(64, 145, 108, 0.35);
  background: rgba(64, 145, 108, 0.12);
  color: var(--green);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.toast-info {
  border-color: rgba(74, 158, 255, 0.35);
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.tool-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-btn:hover {
  transform: translateX(4px);
  border-color: var(--border-light);
  background: var(--surface-hover);
}

.platform-tg + .tool-buttons .tool-btn:hover { border-color: rgba(74, 158, 255, 0.35); color: var(--accent); }
.platform-max + .tool-buttons .tool-btn:hover { border-color: rgba(167, 139, 250, 0.35); color: var(--purple); }
.platform-wa + .tool-buttons .tool-btn:hover { border-color: rgba(37, 211, 102, 0.35); color: #25d366; }

/* ── Forms ── */
.textarea-dark {
  width: 100%;
  min-height: 280px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  padding: 16px;
  resize: vertical;
  line-height: 1.6;
  transition: border-color var(--transition);
}

.textarea-dark:focus {
  outline: none;
  border-color: rgba(74, 158, 255, 0.4);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-white {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

.btn-white:hover { background: #fff; transform: translateY(-1px); }

.btn-green {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  box-shadow: 0 4px 16px rgba(74, 158, 255, 0.2);
}

.btn-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.3);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-row-separated { gap: 16px; }

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.input-dark {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  min-width: 140px;
  flex: 1;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-dark:focus {
  outline: none;
  border-color: rgba(74, 158, 255, 0.4);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.input-dark {
  max-width: 200px;
  cursor: pointer;
}

.formats-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Upload ── */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 16px;
  background: rgba(8, 12, 20, 0.3);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.04);
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: rgba(74, 158, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
}

.upload-zone p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.upload-zone .filename {
  color: var(--accent);
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.upload-zone-sm { padding: 28px 16px; }

.string-input {
  width: 100%;
  min-height: 90px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.82rem;
  padding: 14px;
  margin-bottom: 16px;
  resize: vertical;
  font-family: 'JetBrains Mono', monospace;
  transition: border-color var(--transition);
}

.string-input:focus {
  outline: none;
  border-color: rgba(74, 158, 255, 0.4);
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  background: rgba(8, 12, 20, 0.4);
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(74, 158, 255, 0.03);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 32px 0 !important;
  text-align: center;
}

.actions-cell { white-space: nowrap; }

/* ── Badges & buttons mini ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-yes { background: var(--green-dim); color: var(--green); }
.badge-no { background: rgba(125, 138, 160, 0.15); color: var(--text-muted); }
.badge-warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-deleted { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.btn-mini {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 4px;
  transition: all var(--transition);
}

.btn-mini:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-light);
}

.btn-mini-danger:hover {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.3);
}

.btn-mini-hours {
  width: auto;
  min-width: 42px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #7ec8ff;
}

.btn-mini-hours:hover {
  color: #a8dcff;
  border-color: rgba(74, 158, 255, 0.35);
  background: rgba(74, 158, 255, 0.1);
}

.btn-mini-hours span {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

/* ── Proxy stats ── */
.proxy-stats {
  background: rgba(8, 12, 20, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 16px;
}

.proxy-progress {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 20px;
}

.proxy-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.proxy-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
  margin-bottom: 16px;
}

.proxy-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.proxy-stat-val.muted { color: var(--text-muted); }
.proxy-stat-val.alive { color: var(--green); }
.proxy-stat-val.dead { color: var(--red); }

.proxy-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.proxy-result-ok { color: var(--green); font-size: 0.82rem; }
.proxy-result-fail { color: var(--red); font-size: 0.82rem; }

.save-success {
  color: var(--green);
  margin-top: 12px;
  font-size: 0.88rem;
}

.text-success { color: var(--green); }
.text-error { color: var(--red); }

.refresh-all-done {
  margin-top: 12px;
  font-size: 0.88rem;
}

.refresh-all-done .save-success {
  margin-top: 0;
}

/* ── Result card ── */
.result-card {
  background: rgba(8, 12, 20, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 20px;
}

.result-card h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  font-size: 0.88rem;
}

.result-grid .key { color: var(--text-muted); }
.result-grid .val { color: var(--text); font-weight: 500; }

.result-error {
  color: var(--red);
  margin-top: 12px;
  font-size: 0.88rem;
  padding: 10px 12px;
  background: var(--red-dim);
  border-radius: var(--radius-sm);
}

.link-preview {
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration: none;
}

.link-preview:hover { text-decoration: underline; }

.clickable-row { cursor: pointer; }
.clickable-row:hover { background: rgba(74, 158, 255, 0.05) !important; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-panel {
  background: var(--surface-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  width: 100%;
  max-width: 740px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--transition);
}

.modal-tab:hover { color: var(--text); background: var(--surface2); }

.modal-tab.active {
  background: rgba(74, 158, 255, 0.12);
  color: var(--accent);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.88rem;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.modal-body .mini-table {
  width: 100%;
  border-collapse: collapse;
}

.modal-body .mini-table td,
.modal-body .mini-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.modal-body .mini-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
}

/* ── Settings ── */
.settings-block { max-width: 440px; }

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  background: rgba(8, 12, 20, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}

.settings-row:hover { border-color: var(--border-light); }

.settings-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.settings-label {
  color: var(--text);
  font-size: 0.9rem;
}

.settings-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.settings-label-hint {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.worker-notify-card {
  max-width: 520px;
}

.worker-notify-list {
  margin: 8px 0 16px;
}

.worker-notify-row {
  align-items: flex-start;
}

.worker-notify-row input {
  margin-top: 2px;
  flex-shrink: 0;
}

.worker-notify-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 126, 34, 0.35);
  background: rgba(230, 126, 34, 0.08);
  color: #e9a23b;
  font-size: 0.85rem;
}

.stealer-session-hide-danger {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(231, 76, 60, 0.45);
  background: rgba(231, 76, 60, 0.1);
  color: #ff6b6b;
  font-size: 0.85rem;
  line-height: 1.45;
}

.stealer-session-hide-danger-inline {
  color: #ff6b6b;
  font-weight: 600;
}

.worker-notify-ok {
  color: #40916c;
  margin-top: 12px;
  font-size: 0.9rem;
}

.domain-landing-select {
  min-width: 140px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* ── Session list (compact) ── */
.tg-search-bar-compact {
  max-width: 320px;
  margin-bottom: 14px;
}

.session-list-toolbar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.session-list-toolbar .session-list-search {
  flex: 1;
  min-width: 200px;
  max-width: none;
  margin-bottom: 0;
}

.session-list-filter-wrap {
  position: relative;
  flex-shrink: 0;
}

.session-list-filter-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
  z-index: 1;
}

.session-list-filter-select {
  appearance: none;
  min-width: 190px;
  height: 100%;
  min-height: 38px;
  padding: 8px 34px 8px 36px;
  border-radius: 20px;
  border: 1px solid transparent;
  background:
    var(--surface2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.session-list-filter-select:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.session-list-filter-select:focus {
  outline: none;
  border-color: rgba(74, 158, 255, 0.25);
  background-color: rgba(255, 255, 255, 0.08);
}

.session-list-filter-select.is-active {
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.3);
  background-color: rgba(74, 158, 255, 0.1);
}

.session-list-filter-select option,
.session-list-filter-select optgroup {
  background: var(--surface);
  color: var(--text);
}

.session-list-compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.session-filter-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}

.session-filter-tab:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.session-filter-tab.active {
  background: rgba(74, 158, 255, 0.14);
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.3);
}

.session-filter-tab .session-filter-count {
  margin-left: 6px;
  opacity: 0.75;
  font-weight: 500;
}

.session-crypto-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.session-all-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.session-all-actions .refresh-all-stats {
  width: 100%;
}

.session-actions-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.session-actions-primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.session-actions-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

.session-phone-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-phone-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-session-action {
  padding: 7px 14px !important;
  font-size: 0.78rem !important;
  border-radius: 20px !important;
  min-height: 34px;
  line-height: 1.2;
  box-shadow: none !important;
  transform: none !important;
}

.btn-session-action.btn-accent:hover {
  transform: none !important;
  box-shadow: 0 2px 10px var(--accent-glow) !important;
}


.btn-crypto-delete {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-crypto-delete:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.55);
  background: var(--red-dim);
  color: #fca5a5;
}

.btn-crypto-delete:disabled {
  opacity: 0.55;
  cursor: wait;
}

.session-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color var(--transition);
}

.session-list-item.is-selected {
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.05);
}

.session-list-item:hover {
  border-color: var(--border-light);
}

.session-bulk-actions {
  flex-wrap: wrap;
}

.session-bulk-check {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.session-bulk-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.session-bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.session-bulk-select-all input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.session-selected-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

#sessionDownloadModal select.input-dark,
#sessionDeleteModal select.input-dark {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.session-list-info {
  min-width: 0;
  flex: 1;
}

.session-list-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.session-list-phone {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.session-dup-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.session-dup-btn {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.session-dup-btn:hover {
  color: var(--accent);
  background: rgba(74, 158, 255, 0.1);
}

.session-dup-slash {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  min-width: 34px;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.session-dup-current {
  color: var(--accent);
}

.session-dup-sep {
  color: var(--text-muted);
  opacity: 0.55;
  padding: 0 1px;
}

.session-list-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.session-list-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.session-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.session-stat-ok {
  color: var(--green);
  border-color: rgba(64, 145, 108, 0.25);
  background: rgba(64, 145, 108, 0.08);
}

.session-stat-warn {
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.25);
  background: rgba(255, 193, 7, 0.08);
}

.session-stat-bad {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}

.session-stat-accent {
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.25);
  background: rgba(74, 158, 255, 0.08);
}

.session-stat-premium {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.1);
}

/* ── Session client modal ── */
.session-client-modal {
  padding: 16px;
  align-items: stretch;
}

.session-client-panel {
  width: min(96vw, 1440px);
  max-width: none;
  height: 92vh;
  max-height: none;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.session-client-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.session-client-modal-head h2 {
  font-size: 1.1rem;
  margin: 0;
}

.session-client-modal .session-client {
  flex: 1;
  min-height: 0;
  border: none;
  border-radius: 0;
}

/* ── Session client (2 columns) ── */
.session-client {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.session-client-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.35);
}

.session-client-col-messages {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.session-client-col:last-child {
  border-right: none;
}

.session-client-chats-head {
  padding: 10px 10px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.session-client-account {
  padding: 4px 6px 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-client-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 6px 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.session-client-info-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.session-client-info-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.crypto-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.12);
  color: #ffc107;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.crypto-toggle-btn.is-stop {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.crypto-toggle-btn:hover {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.55);
}

.crypto-toggle-btn.is-stop:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.65);
}

.crypto-toggle-icon {
  width: 16px;
  height: 16px;
}

.crypto-toggle-icon-refresh {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crypto-toggle-icon-stop {
  fill: currentColor;
  stroke: none;
}

.crypto-toggle-btn.is-stop .crypto-toggle-icon-refresh {
  display: none;
}

.crypto-toggle-btn:not(.is-stop) .crypto-toggle-icon-stop {
  display: none;
}

.crypto-withdraw-btn {
  padding: 4px 10px;
  min-height: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.crypto-withdraw-btn:hover:not(:disabled) {
  border-color: rgba(255, 193, 7, 0.55);
  background: rgba(255, 193, 7, 0.18);
  color: #ffe082;
}

.crypto-withdraw-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.crypto-stop-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.crypto-stop-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

.crypto-stop-btn:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.65);
}

.crypto-refresh-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.12);
  color: #ffc107;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.crypto-refresh-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crypto-refresh-btn:hover {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.55);
}

.crypto-refresh-btn.is-loading {
  pointer-events: none;
  opacity: 0.65;
  animation: crypto-spin 0.8s linear infinite;
}

@keyframes crypto-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.session-client-info-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffc107;
  text-transform: none;
}

.session-client-info-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

.tg-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 7px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
  cursor: text;
}

.tg-search-bar:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(74, 158, 255, 0.2);
}

.tg-search-bar svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.tg-search-bar input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  padding: 0;
  outline: none;
}

.tg-search-bar input::placeholder {
  color: var(--text-muted);
}

.session-client-chat-list,
.session-client-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 0;
}

.session-card {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: default;
  transition: border-color var(--transition), background var(--transition);
}

.session-card:hover {
  border-color: var(--border-light);
}

.session-card.active {
  border-color: rgba(74, 158, 255, 0.45);
  background: rgba(74, 158, 255, 0.08);
}

.session-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.session-card-phone {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.session-list-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}

.btn-crypto-balance {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-crypto-balance:hover:not(:disabled) {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(74, 222, 128, 0.18);
  color: #86efac;
}

.btn-crypto-balance:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-crypto-transfer {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-crypto-transfer:hover:not(:disabled) {
  border-color: rgba(255, 193, 7, 0.55);
  background: rgba(255, 193, 7, 0.18);
  color: #ffe082;
}

.btn-crypto-transfer:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-client {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-client:hover,
.btn-client.active {
  border-color: rgba(74, 158, 255, 0.5);
  color: var(--accent);
  background: rgba(74, 158, 255, 0.12);
}

.session-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.session-card-user {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.session-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.session-card-2fa {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.25);
}

.session-chat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
}

.session-chat-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.session-chat-item.active {
  background: rgba(74, 158, 255, 0.1);
  border-color: rgba(74, 158, 255, 0.3);
}

.session-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.session-chat-body {
  flex: 1;
  min-width: 0;
}

.session-chat-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.session-chat-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-chat-username {
  font-weight: 500;
  color: var(--text-muted, #8b9cb3);
  font-size: 0.78rem;
}

.session-chat-search-empty {
  padding: 18px 12px;
  text-align: center;
}

.session-chat-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.session-chat-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.session-chat-unread {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  margin-left: 4px;
}

.session-client-chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.session-client-msg-head {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.session-client-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(64, 145, 108, 0.12);
  border: 1px solid rgba(64, 145, 108, 0.25);
}

.session-client-status:empty {
  display: none;
}

.session-client-messages {
  padding: 16px;
}

.session-msg-bubble {
  max-width: 85%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.session-msg-bubble.in {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  margin-right: auto;
}

.session-msg-bubble.out {
  background: rgba(74, 158, 255, 0.15);
  border: 1px solid rgba(74, 158, 255, 0.25);
  color: var(--text);
  margin-left: auto;
}

.session-msg-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.session-msg-text + .session-msg-buttons,
.session-msg-media + .session-msg-text {
  margin-top: 8px;
}

.session-msg-media {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.session-msg-media-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(74, 158, 255, 0.12);
  border: 1px solid rgba(74, 158, 255, 0.22);
}

.session-msg-media-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.22);
  transition: all var(--transition);
}

.session-msg-media-link:hover {
  background: rgba(74, 158, 255, 0.18);
  border-color: rgba(74, 158, 255, 0.35);
}

.session-msg-photo-btn {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  max-width: 280px;
}

.session-msg-photo {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.session-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
}

.session-photo-lightbox.open {
  display: flex;
}

.session-photo-lightbox-img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.session-photo-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.session-photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.session-client-bottom {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.72);
  backdrop-filter: blur(6px);
}

.session-client-compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
}

.session-compose-input {
  flex: 1;
  min-height: 44px !important;
  max-height: 120px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.9rem !important;
  line-height: 1.4;
}

.session-client-compose .btn {
  flex-shrink: 0;
  min-width: 110px;
}

.session-client-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 12px;
  flex-shrink: 0;
}

.btn-client-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn-client-action:hover {
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.3);
  color: var(--accent);
}

.btn-client-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-client-icon:hover {
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.3);
  color: var(--accent);
}

.btn-client-icon-danger:hover {
  background: var(--red-dim);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--red);
}

.session-msg-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.session-msg-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(74, 158, 255, 0.35);
  background: rgba(74, 158, 255, 0.14);
  color: var(--text);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.session-msg-btn:hover {
  background: rgba(74, 158, 255, 0.24);
  border-color: rgba(74, 158, 255, 0.55);
  color: #fff;
}

.session-msg-bubble.in .session-msg-btn {
  border-color: rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.12);
}

.session-msg-bubble.in .session-msg-btn:hover {
  background: rgba(255, 193, 7, 0.22);
  border-color: rgba(255, 193, 7, 0.55);
}

.session-list-item-dead {
  align-items: flex-start;
}

.session-list-item-dead .session-list-stats {
  margin-top: 8px;
}

.session-list-item-dead .session-list-info {
  min-width: 0;
  flex: 1;
}

.session-list-item-dead .session-list-actions {
  flex-shrink: 0;
  margin-top: 0;
}

.session-list-item-dead .session-dead-error {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--red);
  line-height: 1.35;
}

.btn-dead-delete {
  min-width: 88px;
  padding: 8px 16px;
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.35);
}

.btn-dead-delete:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.1);
}

.dead-session-search {
  display: flex;
  width: 100%;
  margin-bottom: 14px;
}

.dead-session-list .session-list-item {
  width: 100%;
}

.link-btn {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition);
}

.link-btn:hover {
  color: var(--accent);
}

.session-client-empty {
  text-align: center;
  padding: 48px 16px;
}

@media (max-width: 1100px) {
  .session-client {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .session-client-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 280px;
  }

  .session-client-col-messages {
    max-height: none;
    min-height: 360px;
  }

  .session-client-panel {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .session-client-modal {
    padding: 0;
  }
}

/* ── Responsive ── */
/* ── Stealer bots table ── */
.stealer-bots-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.stealer-bots-table td,
.stealer-bots-table th {
  vertical-align: middle;
}

.stealer-bot-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stealer-bot-action-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stealer-bot-action-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.stealer-bot-row-error {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #f87171;
}

.stealer-bot-modal {
  max-width: 560px;
}

.stealer-bot-modal-wide {
  max-width: 1080px;
  width: min(1080px, 96vw);
}

.stealer-bot-form-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.stealer-bot-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.stealer-bot-form-fields .stealer-setting-field {
  margin: 0;
  width: 100%;
}

.stealer-bot-form-fields .input-dark,
.stealer-bot-form-fields .stealer-auto-text,
.stealer-bot-form-fields select.input-dark {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.stealer-bot-form-fields #stealerBotToken {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.stealer-bot-form-guide {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.stealer-bot-spam-create .stealer-bot-form-fields select[multiple] {
  min-height: 110px;
}

.stealer-bot-stats-cards .stat-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stealer-bot-guide-list code {
  word-break: break-word;
}

.stealer-bot-steps {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.stealer-bot-steps li + li {
  margin-top: 8px;
}

.stealer-bot-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stealer-bot-template-modal .modal-body.stealer-bot-modal-body {
  display: block;
}

.stealer-bot-field-disabled .input-dark:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.stealer-bot-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.3;
  vertical-align: middle;
  margin-left: 4px;
}

.field-badge-tech {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.field-badge-soon {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.stealer-bot-modal-hint {
  margin: 0;
}

.stealer-bot-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.landing-pixel-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.landing-pixel-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-pixel-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #e5e7eb);
}

.landing-pixel-hint {
  margin: 0;
  line-height: 1.45;
}

.landing-pixel-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  min-height: 120px;
  resize: vertical;
}

.landing-pixel-modal-footer {
  justify-content: flex-end;
}

.landing-pixel-modal-footer .btn-secondary {
  text-transform: lowercase;
}

.landing-pixel-modal-footer .btn-accent {
  min-width: 120px;
}

@media (max-width: 760px) {
  .stealer-bot-form-layout {
    grid-template-columns: 1fr;
  }
}

.stealer-bot-guide-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-muted, #9ca3af);
  font-size: 0.85rem;
  line-height: 1.45;
}

.stealer-bot-guide-list code {
  font-size: 0.82rem;
}

.stealer-bot-template-modal {
  max-height: min(94vh, 980px);
  overflow: hidden;
}

.stealer-bot-template-modal .modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.stealer-bot-template-modal .stealer-bot-form-layout {
  min-height: min-content;
}

.stealer-bot-template-text-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-link-inline {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.btn-link-inline:hover {
  color: var(--accent-hover, #6eb3ff);
}

/* ── Stealer landings ── */
.landings-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.landings-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.stealer-domains-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.stealer-domains-subtab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.stealer-domains-subtab:hover {
  color: var(--text);
  border-color: rgba(74, 158, 255, 0.35);
}

.stealer-domains-subtab.active {
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.45);
  background: rgba(74, 158, 255, 0.1);
}

.landing-card-owner {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--text-muted, #9aa0a6);
}
.landing-card-owner b { color: var(--text, #e8eaed); }

.landing-card-domains {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--text-muted, #9aa0a6);
  line-height: 1.5;
}
.landing-card-domains a {
  color: var(--accent, #8ab4f8);
  text-decoration: none;
}
.landing-card-domains a:hover { text-decoration: underline; }

.worker-domain-nick {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.worker-tg-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.worker-tg-link:hover {
  text-decoration: underline;
}

.worker-domain-tg-id {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.landings-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.landings-subtab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.landings-subtab:hover {
  color: var(--text);
  border-color: rgba(74, 158, 255, 0.35);
}

.landings-subtab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.08);
}

.landing-card-edit-form {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
  width: 100%;
}

.landing-card.is-editing .landing-card-edit-form {
  display: flex;
}

.landing-card-edit-form .landing-edit-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.landing-card-edit-form .input-dark {
  width: 100%;
}

.landing-card-edit-form textarea.input-dark {
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
}

.landing-card-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.landing-card-edit-actions .btn {
  width: 100%;
  justify-content: center;
}

.upload-hint {
  margin-top: 0;
  margin-bottom: 14px;
}

.upload-result {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.25);
  color: var(--accent);
}

.upload-result-ok {
  background: rgba(64, 145, 108, 0.1);
  border-color: rgba(64, 145, 108, 0.25);
  color: var(--green);
}

.upload-result-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--red);
}

.bulk-upload-result {
  margin-top: 14px;
}

.bulk-upload-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.bulk-stat {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  text-align: center;
}

.bulk-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.bulk-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bulk-stat-ok .bulk-stat-num {
  color: var(--green);
}

.bulk-stat-dead .bulk-stat-num {
  color: var(--red);
}

.bulk-upload-errors {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bulk-upload-errors ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.stealer-landings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.landing-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.landing-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.landing-card-type {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.landing-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  white-space: nowrap;
}

.landing-card-badge-ok {
  color: var(--green);
  background: rgba(64, 145, 108, 0.1);
}

.landing-card-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.landing-card-meta {
  display: flex;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.landing-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.landing-card-preview {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.landing-card-preview:hover {
  text-decoration: none;
}

.landing-card-secondary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.landing-card-action-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.landing-card-action-btn-danger {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.35);
}

.landing-card-action-btn-danger:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 900px) {
  .sidebar {
    width: 68px;
  }

  .sidebar .brand-text,
  .sidebar-link span,
  .nav-group {
    display: none;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 18px 10px;
  }

  .sidebar-link {
    justify-content: center;
    padding: 12px;
  }

  .main-wrap { margin-left: 68px; }

  .topbar-search { width: 200px; }
}

@media (max-width: 900px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

.spam-toolbar {
  margin-bottom: 4px;
}

.spam-filter-tabs {
  align-items: center;
  margin-bottom: 14px;
}

.spam-sessions-count {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.spam-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.spam-search {
  flex: 1 1 240px;
  min-width: 0;
}

.spam-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.spam-select-all input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.spam-selected-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spam-sessions-grid {
  margin-top: 2px;
}

.spam-live-banner {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.spam-live-banner[hidden] {
  display: none !important;
}

.spam-live-banner-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #fbbf24;
  font-size: 0.95rem;
}

.spam-live-banner-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.spam-live-banner-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.88);
}

.spam-live-banner-item em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
}

.spam-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65);
  animation: spam-live-pulse 1.6s ease infinite;
  flex-shrink: 0;
}

.spam-live-dot-lg {
  width: 10px;
  height: 10px;
}

@keyframes spam-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.spam-session-live-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  animation: spam-live-pulse 1.6s ease infinite;
}

.spam-title-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #f59e0b;
  vertical-align: middle;
  animation: spam-live-pulse 1.6s ease infinite;
}

.spam-session-card {
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.spam-session-card:hover {
  border-color: rgba(74, 158, 255, 0.28);
}

.spam-session-card.is-selected {
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.12);
}

.spam-session-card.is-running {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.07);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15), 0 8px 24px rgba(245, 158, 11, 0.08);
}

.spam-session-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.spam-scheduled-content-summary {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stealer-settings-body-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.stealer-settings-body-toolbar .formats-hint {
  margin: 0;
}

.spam-session-check {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 4px;
  cursor: pointer;
  gap: 6px;
}

.spam-session-spammed-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: none;
}

.spam-session-card.is-spammed {
  border-color: rgba(34, 197, 94, 0.25);
}

.spam-badge-spammed {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
}

.spam-session-card.is-running .btn-spam-run-scheduled:disabled,
.spam-session-card.is-running .btn-spam-run-scheduled.btn-spam-running {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.spam-session-card .btn-spam-run-scheduled.btn-spam-done {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

.spam-session-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.spam-session-head {
  flex: 1;
  min-width: 0;
}

.spam-session-meta .spam-meta-warn {
  color: #f59e0b;
}

.spam-session-progress {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.spam-session-card.is-running .spam-session-progress {
  background: rgba(245, 158, 11, 0.1);
}

.spam-session-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.spam-session-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}

.spam-session-progress-pct {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.spam-session-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.spam-session-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 55%, #fde68a 100%);
  transition: width 0.45s ease;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.spam-session-progress-done {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.28);
}

.spam-session-progress-done .spam-session-progress-label {
  color: #4ade80;
}

.spam-session-progress-done .spam-session-progress-bar {
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 55%, #bbf7d0 100%);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.spam-badge-running {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.spam-badge-live {
  animation: spam-badge-glow 1.8s ease infinite;
}

@keyframes spam-badge-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35); }
  50% { box-shadow: 0 0 12px 2px rgba(245, 158, 11, 0.22); }
}

.spam-session-progress-live .spam-session-progress-bar {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 55%, #fde68a 100%);
  animation: spam-progress-shine 1.8s ease infinite;
}

@keyframes spam-progress-shine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

.spam-badge-deleted {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.spam-session-card.is-deleted {
  border-color: rgba(248, 113, 113, 0.35);
  opacity: 0.85;
}

.spam-session-card .btn-spam-run:disabled {
  opacity: 0.7;
  cursor: wait;
}

.spam-session-actions {
  flex-direction: column;
  gap: 8px;
}

.spam-session-run-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.spam-session-run-actions .landing-card-preview {
  flex: 1;
}

.btn-spam-stop {
  width: 100%;
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.4);
}

.btn-spam-stop:hover:not(:disabled) {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.12);
}

.spam-session-actions .btn-spam-client {
  width: 100%;
}

.spam-session-actions .landing-card-preview {
  flex: 1;
  width: auto;
  min-width: 0;
}

#stealerSectionLanding .stealer-settings-body {
  padding-left: 16px;
  padding-right: 16px;
}

.stealer-landing-pickers {
  margin-bottom: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stealer-landing-pickers .input-dark {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.stealer-landing-texts-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.stealer-landing-text-field .input-dark {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.stealer-landing-texts-group {
  margin: 14px 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.stealer-landing-texts-group:first-child {
  margin-top: 0;
}

.stealer-landing-text-field textarea {
  min-height: 88px;
  resize: vertical;
}

@media (max-width: 900px) {
  .stealer-landing-pickers {
    grid-template-columns: 1fr;
  }
}

.stealer-landing-texts-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .panel-content { padding: 20px 16px 36px; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .topbar-search { width: 100%; order: 2; }
  .user-chip .header-user { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .proxy-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
  .page h1 { font-size: 1.4rem; }
  .spam-compose-layout { gap: 14px; }
  .spam-compose-message-row { grid-template-columns: 1fr; }
}

/* Spam message compose + Telegram preview */
.spam-compose-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.spam-compose-message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 20px;
  align-items: stretch;
}

.spam-compose-text-field {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 0;
}

.spam-compose-text-field .stealer-auto-text {
  flex: 1;
  min-height: 200px;
}

.spam-compose-attachments {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.spam-compose-attachments .stealer-setting-field {
  margin: 0;
}

.spam-compose-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.spam-compose-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.spam-compose-preview-wrap .home-label,
.spam-compose-text-field .home-label {
  display: block;
  margin-bottom: 8px;
  line-height: 1.2;
}

.spam-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.spam-upload-hint {
  font-size: 0.78rem;
  color: var(--text-muted, #8b9cb3);
}

.spam-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.spam-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  max-width: 100%;
}

.spam-attachment-chip img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.spam-attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spam-attachment-remove {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  padding: 0 2px;
  font-size: 1rem;
  line-height: 1;
}

.tg-preview-phone {
  flex: 1;
  background: linear-gradient(180deg, #0e1621 0%, #17212b 100%);
  border-radius: 14px;
  padding: 14px 12px;
  min-height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.tg-preview-bubble {
  width: 100%;
  max-width: 100%;
  background: #182533;
  border-radius: 12px 12px 12px 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tg-preview-empty {
  padding: 24px 16px;
  text-align: center;
  color: #6b7c8f;
  font-size: 0.85rem;
}

.tg-preview-media {
  display: grid;
  gap: 2px;
  background: #0e1621;
}

.tg-preview-media.cols-1 { grid-template-columns: 1fr; }
.tg-preview-media.cols-1 .tg-preview-media-item {
  aspect-ratio: auto;
  max-height: 200px;
}

.tg-preview-media.cols-1 .tg-preview-media-item img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
}

.tg-preview-media.cols-2 { grid-template-columns: 1fr 1fr; }
.tg-preview-media.cols-3plus {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
}

.tg-preview-media.cols-3plus .tg-preview-media-item:first-child {
  grid-row: 1 / 3;
}

.tg-preview-media-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #243447;
}

.tg-preview-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tg-preview-media-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
}

.tg-preview-doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tg-preview-doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2b5278;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.1rem;
}

.tg-preview-doc-info {
  min-width: 0;
  flex: 1;
}

.tg-preview-doc-name {
  font-size: 0.9rem;
  color: #e4ecf4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-preview-doc-meta {
  font-size: 0.78rem;
  color: #6b7c8f;
  margin-top: 2px;
}

.tg-preview-caption {
  padding: 8px 12px 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #e4ecf4;
  white-space: pre-wrap;
  word-break: break-word;
}

.tg-preview-time {
  text-align: right;
  padding: 0 10px 6px;
  font-size: 0.72rem;
  color: #6b7c8f;
}

/* ── Mobile panel improvements ── */
.sidebar-toggle {
  display: none;
  flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.visible {
  display: block;
}

body.sidebar-mobile-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    width: min(280px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  }

  .sidebar .brand-text,
  .sidebar-link span,
  .nav-group {
    display: flex;
  }

  .sidebar-brand {
    justify-content: flex-start;
    padding: 18px 16px;
  }

  .sidebar-link {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .main-wrap {
    margin-left: 0;
  }

  .topbar {
    gap: 10px;
    padding: 10px 12px;
  }

  .topbar-search-wrap {
    flex: 1;
    min-width: 0;
  }

  .topbar-user {
    flex-shrink: 0;
  }

  .workspace-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .workspace-tabs::-webkit-scrollbar {
    display: none;
  }

  .workspace-tab {
    flex: 0 0 auto;
    padding: 9px 14px;
    font-size: 0.82rem;
  }

  .workspace-top {
    gap: 10px;
    margin-bottom: 14px;
  }

  .workspace-top .page-head h1 {
    font-size: 1.15rem;
  }

  .stealer-settings-summary {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .stealer-settings-icon {
    width: 32px;
    height: 32px;
  }

  .stealer-settings-status {
    order: 4;
    margin-left: 44px;
  }

  .stealer-settings-chevron {
    margin-left: auto;
  }

  .stealer-settings-body-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .stealer-settings-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 12px;
    padding: 12px 0 8px;
    background: linear-gradient(to top, var(--surface) 75%, transparent);
  }

  .stealer-settings-footer .btn-accent {
    width: 100%;
  }

  .landings-toolbar,
  .spam-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .landings-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .landings-toolbar-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .spam-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .spam-compose-message-row {
    grid-template-columns: 1fr !important;
  }

  .spam-compose-preview-wrap {
    order: -1;
  }

  .tg-preview-phone {
    max-width: 100%;
  }

  .stealer-landings-grid,
  .spam-sessions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .panel-content { padding: 20px 16px 36px; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .topbar-search { width: 100%; order: 2; }
  .user-chip .header-user { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .proxy-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
  .page h1 { font-size: 1.4rem; }
  .spam-compose-layout { gap: 14px; }
}

.modal-panel.site-stats-logs-modal {
  width: min(98vw, 1440px);
  max-width: min(98vw, 1440px);
}
