:root {
  --bg: #08080f;
  --surface: #12121f;
  --surface2: #1a1a2e;
  --border: rgba(139, 92, 246, 0.2);
  --text: #ececf4;
  --muted: #8888a8;
  --accent: #8b5cf6;
  --cyan: #22d3ee;
  --ok: #34d399;
  --err: #f87171;
  --warn: #fbbf24;
  --r: 14px;
  --touch: 44px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --max: 520px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 50% -15%, rgba(124, 58, 237, 0.22), transparent 62%),
    radial-gradient(ellipse 45% 35% at 92% 88%, rgba(91, 33, 182, 0.14), transparent 68%),
    radial-gradient(ellipse 38% 28% at 8% 72%, rgba(34, 211, 238, 0.06), transparent 70%),
    linear-gradient(180deg, #05050c 0%, #0a0814 45%, #07070f 100%);
  pointer-events: none;
}

.app-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  animation: pulse 0.9s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-dot { animation: none; opacity: 0.7; }
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
}

.screen.is-off {
  display: none !important;
}

/* ── Login minimal (premium) ── */
.login-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
}

.login-orb-a {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55), rgba(91, 33, 182, 0.08) 68%);
}

.login-orb-b {
  width: min(280px, 45vw);
  height: min(280px, 45vw);
  bottom: 8%;
  right: -8%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
}

.login-orb-c {
  width: min(220px, 38vw);
  height: min(220px, 38vw);
  bottom: 18%;
  left: -6%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 72%);
}

.login-minimal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: max(1.5rem, var(--safe-t)) max(1.25rem, var(--safe-r)) max(1.5rem, var(--safe-b)) max(1.25rem, var(--safe-l));
}

.login-minimal-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 2rem 1.85rem 1.75rem;
  border-radius: 24px;
  background:
    linear-gradient(165deg, rgba(22, 18, 38, 0.94), rgba(10, 10, 18, 0.97));
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.login-minimal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.55), rgba(124, 58, 237, 0.15), rgba(34, 211, 238, 0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-minimal-shine {
  position: absolute;
  inset: -40% -20% auto;
  height: 55%;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139, 92, 246, 0.16), transparent 72%);
  pointer-events: none;
}

.login-minimal-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.65rem;
}

.login-minimal-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 48%, #0891b2 100%);
  box-shadow:
    0 12px 28px rgba(124, 58, 237, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.login-minimal-titles {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.login-minimal-titles strong {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fafafa;
}

.login-minimal-titles span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a78bfa;
}

.login-minimal-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.login-minimal-field label {
  display: block;
  margin-bottom: 0.38rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.login-minimal-field input {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 6, 12, 0.72);
  color: #fafafa;
  font-size: 0.96rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.login-minimal-field input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.58);
  background: rgba(8, 8, 16, 0.88);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.login-minimal-options {
  margin: 0.1rem 0 0.15rem;
}

.login-minimal-options .login-minimal-remember {
  margin: 0;
  font-size: 0.82rem;
  color: #b4b4c7;
}

.login-minimal-options .remember input:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.login-minimal-form .btn-login {
  margin-top: 0.35rem;
  min-height: 2.9rem;
  border-radius: 13px;
  font-weight: 600;
}

.btn-login-premium {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 45%, #6d28d9 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(124, 58, 237, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.btn-login-premium:hover:not(:disabled) {
  background: linear-gradient(135deg, #9d7af8 0%, #8b5cf6 45%, #7c3aed 100%);
  box-shadow:
    0 14px 32px rgba(124, 58, 237, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.screen-login .alert {
  margin-bottom: 0;
}

/* ── Login ── */
.screen-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, var(--safe-t)) max(1rem, var(--safe-r)) max(1.25rem, var(--safe-b)) max(1rem, var(--safe-l));
  overflow: hidden;
}

.login-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 48% at 50% -5%, rgba(139, 92, 246, 0.28), transparent 72%),
    radial-gradient(ellipse 42% 32% at 88% 78%, rgba(109, 40, 217, 0.16), transparent 70%),
    radial-gradient(ellipse 36% 28% at 12% 68%, rgba(34, 211, 238, 0.08), transparent 72%);
}

.login-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.login-card {
  position: relative;
  width: 100%;
  padding: clamp(1.35rem, 4.5vw, 1.85rem);
  border-radius: calc(var(--r) + 8px);
  background:
    linear-gradient(165deg, rgba(26, 26, 46, 0.96), rgba(14, 14, 24, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.28);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.45), rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-hero {
  margin-bottom: 1.15rem;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.32);
}

.brand-lg {
  margin-bottom: 0.85rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, #7c3aed, #0891b2);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-edition {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-card h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.login-tagline {
  margin: 0;
  color: #a8a8c8;
  font-size: 0.86rem;
  line-height: 1.55;
}

.login-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border-radius: calc(var(--r) - 2px);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-feature-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.login-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.login-feature-text strong {
  font-size: 0.74rem;
  font-weight: 700;
  color: #ececf4;
  line-height: 1.25;
}

.login-feature-text span {
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.35;
}

.login-form {
  margin: 0;
  padding: 1rem;
  border-radius: calc(var(--r) + 2px);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-form-head {
  margin-bottom: 0.85rem;
}

.login-form-head h2 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login-form-head p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.login-field {
  margin-bottom: 0.65rem;
}

.login-field input {
  background: rgba(8, 8, 15, 0.65);
  border-color: rgba(255, 255, 255, 0.08);
}

.login-field input:focus {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.login-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.85rem;
}

.login-options .remember {
  margin-bottom: 0;
  min-height: 2rem;
  font-size: 0.8rem;
}

.btn-login {
  min-height: 2.85rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.login-foot {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.78rem;
}

.login-foot a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.login-foot a:hover {
  color: var(--cyan);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ececf4;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  min-height: var(--touch);
}

.remember input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .login-features {
    grid-template-columns: 1fr;
  }

  .login-options {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard ── */
.screen-dash {
  display: flex;
  flex-direction: column;
  max-width: var(--max);
  margin-inline: auto;
  padding-bottom: calc(0.5rem + var(--safe-b));
}

body.is-admin .screen-dash {
  max-width: min(1320px, calc(100vw - 1.5rem));
  padding-inline: max(0.75rem, var(--safe-l)) max(0.75rem, var(--safe-r));
}

body.is-admin {
  --max: min(1320px, calc(100vw - 1.5rem));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.75rem + var(--safe-t)) max(1rem, var(--safe-r)) 0.75rem max(1rem, var(--safe-l));
  background: rgba(8, 8, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.topbar-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-icon {
  width: var(--touch);
  height: var(--touch);
  margin: -6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.btn-icon-muted {
  color: var(--muted);
  font-size: 1rem;
}

.dash {
  flex: 1;
  padding: 1rem max(1rem, var(--safe-r)) 0 max(1rem, var(--safe-l));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  align-content: start;
}

.dash-span-full {
  grid-column: 1 / -1;
}

.guest-banner,
.guest-shell,
.dash-top,
.stats,
.gen-choose-hint,
.guest-gen-block,
.seg,
.gen-stack,
.log-section,
.admin-admin-row,
.desk-admin-panel {
  grid-column: 1 / -1;
}

.temp-link-panel {
  grid-column: 1 / -1;
  margin-bottom: 0.35rem;
  min-width: 0;
}

@media (max-width: 420px) {
  .temp-link-panel {
    grid-column: 1 / -1;
  }
}

/* Dashboard top */
.dash-top {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.35rem;
  width: 100%;
}

.dash-command-bar {
  position: relative;
  width: 100%;
  padding: 0.85rem;
  border-radius: 22px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    radial-gradient(900px 220px at 0% 0%, rgba(124, 58, 237, 0.14), transparent 58%),
    radial-gradient(700px 200px at 100% 100%, rgba(59, 130, 246, 0.1), transparent 52%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(8, 10, 22, 0.88);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.dash-command-glow {
  position: absolute;
  inset: -30% auto auto -10%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, transparent 68%);
  pointer-events: none;
}

/* Stats — premium full width */
.dash-stats-premium.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
  min-height: 0;
  margin: 0 0 0.75rem;
}

.dash-stat-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.045) 0%, rgba(0, 0, 0, 0.22) 55%, rgba(0, 0, 0, 0.32) 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dash-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.28);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(167, 139, 250, 0.08);
}

.dash-stat-shine {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.dash-stat-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.dash-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.15rem;
  border-radius: 11px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-stat-k {
  display: block;
  font-size: 0.62rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.2;
}

.dash-stat-v {
  display: block;
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dash-stat-card--users { border-color: rgba(96, 165, 250, 0.22); }
.dash-stat-card--users .dash-stat-v { color: #7dd3fc; text-shadow: 0 0 24px rgba(56, 189, 248, 0.2); }
.dash-stat-card--users .dash-stat-icon { background: rgba(59, 130, 246, 0.16); border-color: rgba(96, 165, 250, 0.28); }

.dash-stat-card--today { border-color: rgba(52, 211, 153, 0.2); }
.dash-stat-card--today .dash-stat-v { color: #6ee7b7; text-shadow: 0 0 24px rgba(52, 211, 153, 0.18); }
.dash-stat-card--today .dash-stat-icon { background: rgba(34, 197, 94, 0.14); border-color: rgba(74, 222, 128, 0.28); }

.dash-stat-card--gens { border-color: rgba(167, 139, 250, 0.24); }
.dash-stat-card--gens .dash-stat-v { color: #c4b5fd; text-shadow: 0 0 24px rgba(167, 139, 250, 0.2); }
.dash-stat-card--gens .dash-stat-icon { background: rgba(124, 58, 237, 0.16); border-color: rgba(167, 139, 250, 0.3); }

.dash-stat-card--subs { border-color: rgba(251, 191, 36, 0.22); }
.dash-stat-card--subs .dash-stat-v { color: #fcd34d; text-shadow: 0 0 24px rgba(251, 191, 36, 0.18); }
.dash-stat-card--subs .dash-stat-icon { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.28); }

/* Legacy stat classes (fallback) */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  min-height: 4.5rem;
}

.stat {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r);
  padding: 0.65rem 0.5rem;
  text-align: center;
  min-width: 0;
}

.stat-k {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.stat-v {
  display: block;
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.2;
}

/* Stars balance */
.stars-balance-card {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.05rem;
  border-radius: calc(var(--r) + 4px);
  border: 1px solid rgba(251, 191, 36, 0.28);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.04) 42%, rgba(18, 18, 31, 0.92) 100%),
    linear-gradient(160deg, rgba(26, 26, 46, 0.98), rgba(18, 18, 31, 0.98));
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stars-balance-glow {
  position: absolute;
  top: -3rem;
  right: -1rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.22) 0%, transparent 68%);
  pointer-events: none;
}

.stars-balance-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(251, 191, 36, 0.14);
}

.stars-balance-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.stars-balance-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.35rem;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.12);
}

.stars-balance-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(253, 230, 138, 0.72);
  margin-bottom: 0.2rem;
}

.stars-balance-total {
  font-size: clamp(1.15rem, 4.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fde68a;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.18);
  word-break: break-word;
}

.payment-revenue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.payment-revenue-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: calc(var(--r) - 2px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.payment-revenue-k {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(253, 230, 138, 0.62);
}

.payment-revenue-v {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fde68a;
  word-break: break-word;
}

.payment-revenue-stars {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.06);
}

.payment-revenue-platega-rub {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(59, 130, 246, 0.06);
}

.payment-revenue-platega-rub .payment-revenue-k {
  color: rgba(147, 197, 253, 0.72);
}

.payment-revenue-platega-rub .payment-revenue-v {
  color: #bfdbfe;
}

.payment-revenue-platega-usd {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(16, 185, 129, 0.06);
}

.payment-revenue-platega-usd .payment-revenue-k {
  color: rgba(110, 231, 183, 0.72);
}

.payment-revenue-platega-usd .payment-revenue-v {
  color: #a7f3d0;
}

.stars-balance-rate-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.stars-balance-rate-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(253, 230, 138, 0.55);
}

.stars-balance-rate {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.24);
  white-space: normal;
  text-align: right;
  line-height: 1.25;
}

.stars-balance-products {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
}

.stars-product {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.8rem;
  border-radius: calc(var(--r) - 2px);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stars-product-title {
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.3;
  min-width: 0;
}

.stars-product-stars {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fde68a;
}

.stars-product-rub {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(253, 230, 138, 0.72);
}

.stars-product-empty {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 0.35rem 0;
}

/* Segment control — 2×2 grid */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.45rem;
  background: linear-gradient(160deg, rgba(26, 26, 46, 0.95), rgba(18, 18, 31, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: calc(var(--r) + 2px);
  margin-bottom: 0.15rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.seg-btn {
  min-height: 3.1rem;
  padding: 0.55rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: calc(var(--r) - 2px);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}

.seg-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: #c8c8e0;
  border-color: rgba(139, 92, 246, 0.25);
}

.seg-btn.active {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.45), rgba(34, 211, 238, 0.18));
  color: #fff;
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.seg-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.seg-btn-wide {
  grid-column: 1 / -1;
  min-height: 3.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.12), rgba(124, 58, 237, 0.14));
  border-color: rgba(96, 165, 250, 0.28);
}

.seg-btn-wide:hover:not(.active) {
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.2), rgba(124, 58, 237, 0.22));
  border-color: rgba(96, 165, 250, 0.42);
  color: #dbeafe;
}

.seg-btn-wide.active {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.42), rgba(124, 58, 237, 0.38));
  border-color: rgba(147, 197, 253, 0.55);
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.seg-wide-label {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
}

.seg-wide-sub {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.82;
  letter-spacing: 0.02em;
}

.seg-btn-wide.active .seg-wide-sub {
  opacity: 0.95;
}

/* Generator panels — single slot, no phantom gaps between tabs */
.guest-gen-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.gen-stack {
  grid-column: 1 / -1;
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  min-height: 0;
}

.gen-stack > .gen-panel {
  margin: 0;
  padding: 0;
}

.gen-stack > .gen-panel:not(.active),
.gen-stack > .gen-panel[hidden] {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.gen-panel {
  display: none;
}

.gen-panel.active {
  display: block;
  animation: in 0.2s ease;
}

@keyframes in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gen-panel.active { animation: none; }
}

.gen-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--r) + 2px);
  padding: 0.85rem 1.1rem 1.1rem;
  margin-bottom: 0.65rem;
}

.gen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.gen-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  white-space: nowrap;
}

.tag-cyan {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
}

.tag-green {
  background: rgba(134, 239, 172, 0.12);
  color: #86efac;
}

.tag-amber {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.gen-hint {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.hwid-example {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: calc(var(--r) - 4px);
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.14);
}

.hwid-example-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hwid-example-value {
  display: block;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--cyan);
  word-break: break-all;
  cursor: pointer;
}

/* Fields */
.field {
  margin-bottom: 0.85rem;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b8b8d0;
}

.link-btn {
  border: none;
  background: none;
  color: var(--cyan);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  min-height: var(--touch);
  margin: -0.5rem -0.25rem -0.5rem 0;
  touch-action: manipulation;
}

.link-btn:focus-visible {
  outline: 2px solid var(--cyan);
  border-radius: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  resize: vertical;
  min-height: 4rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(136, 136, 168, 0.5);
  font-size: 0.85em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--touch);
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: var(--r);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.15s, transform 0.1s;
  position: relative;
}

.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #0891b2);
  color: #fff;
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.5rem;
}

.btn-secondary:not(:disabled):hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.35);
}

.btn.loading { pointer-events: none; opacity: 0.8; }
.btn.loading .btn-text { opacity: 0.6; }

.btn-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.btn.loading .btn-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.gen-actions .btn-secondary { margin-top: 0.5rem; }

.result-135 {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.result-135 .btn-secondary {
  margin-top: 0;
}

.output-serial {
  margin-top: 0.75rem;
}

.output-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.output-text {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  word-break: break-all;
  line-height: 1.55;
  user-select: all;
  -webkit-user-select: all;
}

/* Output / log */
.output {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--r);
  background: var(--surface2);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  word-break: break-all;
  line-height: 1.5;
  max-height: 30vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.log-section {
  margin-top: 0.5rem;
  min-width: 0;
}

.log-section-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.1rem 1rem 1rem;
  margin-bottom: 0.85rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid rgba(34, 211, 238, 0.16);
  background:
    radial-gradient(520px 140px at 50% 0%, rgba(34, 211, 238, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(18, 18, 31, 0.96), rgba(12, 12, 22, 0.98));
  overflow: visible;
  isolation: isolate;
}

.log-section-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.12), transparent 55%);
  pointer-events: none;
}

.log-section-hero-icon {
  position: relative;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.15rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.08);
}

.log-section-hero .log-title {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #eef2ff;
}

.log-section-hero .log-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.72rem;
  color: rgba(203, 213, 225, 0.82);
}

.log-section-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.log-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-log-clear-hero {
  padding: 0.45rem 1rem;
  font-size: 0.76rem;
}

.log-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.log-section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.log-sub {
  font-size: 0.68rem;
  color: var(--muted);
}

.log-section-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.log-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-log-clear {
  appearance: none;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-log-clear:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.btn-log-clear:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-log-clear:focus-visible {
  outline: 2px solid rgba(248, 113, 113, 0.55);
  outline-offset: 2px;
}

.gen-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(72vh, 40rem);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.35rem 0.25rem 0;
  scrollbar-gutter: stable;
}

.gen-log-list::-webkit-scrollbar {
  width: 6px;
}

.gen-log-list::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.35);
  border-radius: 999px;
}

.gen-log-empty-state {
  text-align: center;
  color: var(--muted);
  padding: 1.75rem 1rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.82rem;
}

.gen-log-card {
  position: relative;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: unset;
  padding: 1rem 1rem 1.05rem 1.15rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--surface);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.gen-log-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(139, 92, 246, 0.55);
}

.gen-log-card.bill-accent-admin::before { background: #8b5cf6; }
.gen-log-card.bill-accent-paid::before { background: #22d3ee; }
.gen-log-card.bill-accent-promo::before { background: #fbbf24; }
.gen-log-card.bill-accent-sub::before { background: #34d399; }
.gen-log-card.bill-accent-free::before { background: #fbbf24; }

.gen-log-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.gen-log-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e2f4;
  font-variant-numeric: tabular-nums;
}

.gen-log-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.gen-log-product {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
  background: rgba(139, 92, 246, 0.14);
  color: #ddd6fe;
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.gen-log-product.p-133 {
  background: rgba(139, 92, 246, 0.14);
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.22);
}

.gen-log-product.p-135 {
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.22);
}

.gen-log-product.p-300 {
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.22);
}

.gen-log-product.p-200 {
  background: rgba(52, 211, 153, 0.1);
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.22);
}

.gen-log-product.p-mobiledit {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.22);
}

.gen-log-client {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gen-log-client-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.gen-log-client-handle {
  margin-top: 0.12rem;
  font-size: 0.76rem;
  color: var(--cyan);
  word-break: break-all;
}

.gen-log-client-id {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.gen-log-details {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.gen-log-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.gen-log-field-k {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.gen-log-value {
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.gen-log-value.copy-chip {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gen-log-value.copy-chip:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.06);
  color: #e0f2fe;
}

.gen-log-value.copy-chip:active {
  transform: scale(0.995);
}

.copy-chip {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.copy-chip:hover {
  border-color: rgba(34, 211, 238, 0.35);
  color: var(--cyan);
}

.gen-muted {
  color: var(--muted);
  font-size: 0.68rem;
}

.bill-tag {
  display: inline-flex;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.06);
  color: #c8c8e0;
  white-space: nowrap;
}

.bill-admin { background: rgba(139, 92, 246, 0.18); color: #ddd6fe; }
.bill-paid { background: rgba(34, 211, 238, 0.12); color: #a5f3fc; }
.bill-promo { background: rgba(251, 191, 36, 0.14); color: #fde68a; }
.bill-sub { background: rgba(52, 211, 153, 0.12); color: #a7f3d0; }
.bill-free { background: rgba(251, 191, 36, 0.14); color: #fde68a; }

.log-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.log-list {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r);
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--muted);
  line-height: 1.6;
  max-height: min(12rem, 35vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-item {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.log-item:last-child { border-bottom: none; }

.desktop-clients-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(28rem, 50vh);
  overflow-y: auto;
}

/* --- Desktop clients admin panel --- */
.admin-admin-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
  align-items: stretch;
  min-width: 0;
  position: relative;
  z-index: 2;
  isolation: isolate;
}

@media (max-width: 1080px) {
  .admin-admin-row {
    grid-template-columns: 1fr;
  }
}

.admin-admin-row .log-section-side {
  margin-top: 0;
  height: auto;
  min-height: 28rem;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 1rem 1rem 1.1rem;
  border-radius: calc(var(--r) + 4px);
  border: 1px solid rgba(34, 211, 238, 0.18);
  background:
    radial-gradient(900px 260px at 50% 0%, rgba(34, 211, 238, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(18, 18, 31, 0.98), rgba(10, 10, 18, 0.99));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.admin-admin-row .log-section-side .gen-log-list {
  flex: 1;
  max-height: none;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.desk-admin-panel {
  margin-top: 1.25rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: calc(var(--r) + 4px);
  border: 1px solid rgba(139, 92, 246, 0.22);
  background:
    radial-gradient(1200px 300px at 0% 0%, rgba(139, 92, 246, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.desk-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.desk-admin-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #f3f4ff;
}

.desk-admin-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.desk-stats,
.desk-stats-premium {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.desk-stat {
  padding: 0.65rem 0.75rem;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.18);
}

.desk-stat-k {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.desk-stat-v {
  font-size: 1.25rem;
  font-weight: 700;
  color: #eef0ff;
  font-variant-numeric: tabular-nums;
}

.desk-stat-online .desk-stat-v { color: #86efac; }
.desk-stat-active .desk-stat-v { color: #7dd3fc; }
.desk-stat-keygen .desk-stat-v { color: #fbbf24; }
.desk-stat-gens .desk-stat-v { color: #c4b5fd; }

.desk-btn-glow {
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 8px 24px rgba(139, 92, 246, 0.12);
}

.desk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.desk-search {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: var(--fg);
  font: inherit;
}

.desk-search:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.desk-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.desk-filter {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  cursor: pointer;
}

.desk-filter.active,
.desk-filter:hover {
  color: #ede9fe;
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.16);
}

.desk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr));
  gap: 0.85rem;
  max-height: min(70vh, 42rem);
  overflow: auto;
  padding-right: 0.15rem;
}

@media (max-width: 720px) {
  .desk-cards { grid-template-columns: 1fr; }
}

.desk-card {
  position: relative;
  padding: 0.95rem 0.95rem 0.85rem 1rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 60%), rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.desk-card-rich {
  padding-top: 1rem;
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(139, 92, 246, 0.12), transparent 58%),
    radial-gradient(320px 100px at 100% 100%, rgba(34, 211, 238, 0.06), transparent 62%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.045), transparent 55%),
    rgba(0, 0, 0, 0.2);
}

.desk-card-rich.is-online {
  border-color: rgba(34, 197, 94, 0.22);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.06);
}

.desk-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: rgba(139, 92, 246, 0.55);
}

.desk-card.status-blocked .desk-card-accent { background: #ef4444; }
.desk-card.status-frozen .desk-card-accent { background: #3b82f6; }
.desk-card.status-suspended .desk-card-accent { background: #f59e0b; }
.desk-card.status-active .desk-card-accent { background: #22c55e; }
.desk-card.status-warned .desk-card-accent { background: #f59e0b; }

.desk-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.desk-card::before {
  display: none;
}

.desk-card.status-blocked::before { background: #ef4444; }
.desk-card.status-frozen::before { background: #3b82f6; }
.desk-card.status-suspended::before { background: #f59e0b; }
.desk-card.status-active::before { background: #22c55e; }
.desk-card.status-warned::before { background: #f59e0b; }
.desk-status.warned { background: rgba(245, 158, 11, 0.18); color: #fde68a; }

.desk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.desk-host {
  font-weight: 700;
  color: #f5f6ff;
  font-size: 0.95rem;
  line-height: 1.25;
}

.desk-host-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.desk-online-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.desk-online-badge.on {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.22);
}

.desk-online-badge.off {
  background: rgba(100, 116, 139, 0.18);
  color: #94a3b8;
}

.desk-sub-os {
  color: rgba(203, 213, 225, 0.72);
}

.desk-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.desk-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #dbeafe;
}

.desk-pill.uptime { color: #a5f3fc; border-color: rgba(34, 211, 238, 0.18); }
.desk-pill.harden { color: #fca5a5; border-color: rgba(239, 68, 68, 0.28); background: rgba(239, 68, 68, 0.1); }
.desk-pill.warn { color: #fde68a; border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.08); }
.desk-pill.activity-generating { color: #86efac; border-color: rgba(34, 197, 94, 0.22); }
.desk-pill.activity-syncing,
.desk-pill.activity-uploading { color: #93c5fd; border-color: rgba(59, 130, 246, 0.22); }
.desk-pill.activity-blocked { color: #fca5a5; border-color: rgba(239, 68, 68, 0.22); }

.desk-card-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

@media (max-width: 520px) {
  .desk-card-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.desk-chip {
  padding: 0.42rem 0.48rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  min-width: 0;
}

.desk-chip-k {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.12rem;
}

.desk-chip-v {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: #eef0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.desk-sub {
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 0.15rem;
  line-height: 1.35;
}

.desk-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.desk-online-dot.on { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
.desk-online-dot.off { background: #64748b; }

.desk-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.65rem;
  font-size: 0.76rem;
  margin-bottom: 0.65rem;
}

.desk-card-meta dt { color: var(--muted); }
.desk-card-meta dd { margin: 0; color: #e5e7ff; font-variant-numeric: tabular-nums; }

.desk-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.desk-quick-actions {
  display: flex;
  gap: 0.3rem;
}

.desk-quick {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.desk-quick:hover { border-color: rgba(139, 92, 246, 0.45); }

.desk-status {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.desk-status.active { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.desk-status.blocked { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.desk-status.frozen { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.desk-status.suspended { background: rgba(251, 191, 36, 0.18); color: #fde68a; }

.desk-open {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.78rem;
}

.desk-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.desk-modal[hidden] { display: none !important; }

.desk-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}

.desk-modal-card {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background:
    radial-gradient(900px 260px at 100% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    rgba(12, 14, 28, 0.96);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: calc(var(--r) + 8px);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.desk-modal-premium .desk-modal-head {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.desk-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.desk-modal-badge.online {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.12);
}

.desk-modal-badge.offline { color: #94a3b8; }

.desk-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.desk-hero-stat {
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.desk-hero-stat .k {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.desk-hero-stat .v {
  font-size: 0.95rem;
  font-weight: 700;
  color: #eef0ff;
}

.desk-section { margin-bottom: 1rem; }

.desk-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b5fd;
}

.desk-event-top {
  font-size: 0.82rem;
  color: #e5e7ff;
}

.desk-event-detail {
  margin-top: 0.25rem;
  font-size: 0.76rem;
  color: var(--muted);
  word-break: break-word;
}

.desk-event-admin { color: #a5b4fc; }

.desk-event-gen { border-left: 3px solid rgba(34, 197, 94, 0.45); }

.desk-event-activity { border-left: 3px solid rgba(251, 191, 36, 0.45); }

.desk-event-context {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #93c5fd;
}

.desk-event-activity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.desk-live-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.desk-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.desk-live-pill.activity-idle { color: #cbd5e1; }
.desk-live-pill.activity-generating { color: #86efac; border-color: rgba(34, 197, 94, 0.25); background: rgba(34, 197, 94, 0.08); }
.desk-live-pill.activity-syncing { color: #93c5fd; border-color: rgba(59, 130, 246, 0.25); background: rgba(59, 130, 246, 0.08); }
.desk-live-pill.activity-uploading { color: #fcd34d; border-color: rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.08); }
.desk-live-pill.activity-blocked { color: #fca5a5; border-color: rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.08); }

.desk-live-pill.uptime {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.22);
  background: rgba(139, 92, 246, 0.08);
  font-variant-numeric: tabular-nums;
}

.desk-card-activity {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: #93c5fd;
  line-height: 1.35;
}

.desk-card-uptime {
  margin-top: 0.15rem;
  font-size: 0.66rem;
  color: #c4b5fd;
  font-variant-numeric: tabular-nums;
}

.desk-keygen-btn-folder {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.desk-action-form,
.desk-act-compact-form {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-act-inline {
  display: grid;
  grid-template-columns: 1fr 5.5rem;
  gap: 0.4rem;
}

.desk-act-group { margin-bottom: 0.55rem; }

.desk-act-group-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.3rem;
}

.desk-act-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.desk-act-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28rem;
  min-height: 0;
  height: auto;
  padding: 0.28rem 0.5rem;
  border-radius: 7px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(12, 14, 28, 0.95);
  color: #eef0ff;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.desk-act-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(20, 22, 42, 0.98);
}

.desk-act-icon {
  display: inline;
  font-size: 0.78rem;
  line-height: 1;
  flex-shrink: 0;
}

.desk-act-label {
  display: inline;
  font-size: 0.68rem;
  margin: 0;
  white-space: nowrap;
}

.desk-act-manage {
  border-color: rgba(125, 211, 252, 0.28);
  color: #dbeafe;
  background: rgba(10, 18, 32, 0.95);
}

.desk-act-harden {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.35), rgba(24, 10, 16, 0.96));
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.08), 0 8px 24px rgba(127, 29, 29, 0.12);
}

.desk-act-freeze {
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
  background: rgba(8, 16, 36, 0.96);
}

.desk-act-block,
.desk-act-delete {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
  background: rgba(36, 10, 16, 0.96);
}

.desk-act-restore {
  border-color: rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
  background: rgba(8, 28, 18, 0.96);
}

.desk-btn-danger {
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #fecaca !important;
}

.desk-keygen-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.desk-keygen-btn-tg {
  background: #1d4ed8;
  border-color: #2563eb;
  color: #eff6ff;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.desk-keygen-btn-tg:hover {
  background: #2563eb;
}

.desk-keygen-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.desk-keygen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.desk-keygen-table th,
.desk-keygen-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.desk-keygen-table th {
  color: #94a3b8;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.03);
}

.desk-keygen-table td {
  color: #e5e7ff;
}

.desk-keygen-name {
  max-width: 220px;
  word-break: break-word;
  font-weight: 600;
}

.desk-keygen-src {
  max-width: 260px;
  word-break: break-all;
}

.desk-keygen-src a {
  color: #93c5fd;
  text-decoration: none;
}

.desk-keygen-src a:hover {
  text-decoration: underline;
}

.desk-keygen-meta {
  margin-top: 0.45rem;
  font-size: 0.72rem;
}

.desk-keygen-actions {
  white-space: nowrap;
}

.desk-keygen-btn {
  appearance: none;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
  border-radius: 7px;
  padding: 0.28rem 0.55rem;
  font-size: 0.68rem;
  cursor: pointer;
}

.desk-keygen-btn:hover {
  background: rgba(37, 99, 235, 0.32);
}

.desk-keygen-btn-dl {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.16);
  color: #d1fae5;
}

.desk-keygen-btn-dl:hover {
  background: rgba(16, 185, 129, 0.28);
}

.desk-keygen-pending {
  color: #fbbf24;
  font-size: 0.68rem;
}

.desk-keygen-failed {
  color: #f87171;
  font-size: 0.68rem;
}

.desk-keygen-upload-live {
  min-width: 168px;
  max-width: 220px;
}

.desk-keygen-upload-head {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.66rem;
  color: #fbbf24;
  margin-bottom: 0.25rem;
}

.desk-keygen-upload-pct {
  font-variant-numeric: tabular-nums;
  color: #fde68a;
}

.desk-keygen-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  overflow: hidden;
}

.desk-keygen-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width 0.35s ease;
}

.desk-keygen-upload-meta {
  margin-top: 0.2rem;
  font-size: 0.62rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.desk-action-section { margin-bottom: 0.85rem; }

.desk-action-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.desk-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.desk-modal-title-wrap h3 { margin: 0; font-size: 1.05rem; }
.desk-modal-subtitle { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--muted); }

.desk-modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.desk-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.desk-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.desk-tab.active {
  color: #ede9fe;
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.18);
}

.desk-kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.85rem;
  font-size: 0.8rem;
  margin-bottom: 0.85rem;
}

.desk-kv-grid dt { color: var(--muted); }
.desk-kv-grid dd { margin: 0; color: var(--fg); word-break: break-word; }

.desk-events {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.desk-event-row {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.desk-modal-body {
  max-height: 52vh;
  overflow: auto;
  padding-right: 0.15rem;
}

.desk-modal-actions {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 42vh;
  overflow: auto;
}

.desk-msg-label {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0.35rem 0 0.25rem;
}

#desk-action-message,
#desk-admin-note,
#desk-suspend-minutes {
  width: 100%;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #eef0ff;
  padding: 0.38rem 0.5rem;
  font: inherit;
  font-size: 0.76rem;
}

#desk-suspend-minutes { text-align: center; }

.desk-action-grid,
.desk-act-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.desk-admin-head-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
.desk-tg-notify-toggle {
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.78rem;
  white-space: nowrap;
}
.desk-tg-notify-toggle:not(:has(input:checked)) {
  opacity: 0.72;
  border-color: rgba(255, 255, 255, 0.06);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .desk-stats,
  .desk-stats-premium { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-kv-grid { grid-template-columns: 1fr; }
  .desk-act-inline { grid-template-columns: 1fr; }
}

.admin-only { display: none; }
body.is-admin .admin-only { display: block; }
body.is-admin .admin-admin-row.admin-only { display: grid; }
body.is-admin .desk-admin-panel { display: block; }
body.is-admin .admin-only.stats { display: grid; }
body.is-admin .admin-only.dash-top { display: flex; }
body.is-admin .btn-icon.admin-only { display: inline-flex; }

body.is-guest {
  --max: min(980px, calc(100vw - 1rem));
}

body.is-guest .screen-dash {
  max-width: min(980px, calc(100vw - 1rem));
}

body.is-guest .dash {
  grid-template-columns: 1fr;
  gap: 0.65rem;
  padding-inline: max(0.65rem, var(--safe-l)) max(0.65rem, var(--safe-r));
}

body.is-guest .guest-gen-block {
  gap: 0.4rem;
  margin-top: 0.1rem;
}

body.is-guest .guest-gen-block .gen-choose-hint {
  margin: 0;
}

body.is-guest .guest-gen-block .seg {
  margin-bottom: 0;
}

body.is-guest .guest-gen-block .gen-stack {
  margin-top: 0;
}

body.is-guest .admin-only {
  display: none !important;
}

body.is-guest .guest-shell {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

body.is-guest .guest-topbar,
body.is-guest .guest-banner {
  width: 100%;
}

.guest-shell {
  display: none;
}

body.is-guest .guest-shell:not([hidden]) {
  display: flex;
}

.gen-choose-hint {
  display: none;
  text-align: center;
  margin: 0.35rem 0 0.2rem;
  padding: 0.72rem 1rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: calc(var(--r) + 2px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  text-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
}

body.is-guest .gen-choose-hint {
  display: block;
}

.guest-banner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: calc(var(--r) + 4px);
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(251, 191, 36, 0.12), transparent 55%),
    radial-gradient(700px 240px at 100% 100%, rgba(139, 92, 246, 0.1), transparent 50%),
    linear-gradient(165deg, rgba(26, 26, 46, 0.96), rgba(14, 14, 26, 0.98));
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: #fde68a;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

body.is-guest .guest-banner { display: flex; }

.guest-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.guest-banner-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.guest-timer-premium {
  flex: 0 0 auto;
  min-width: 7.5rem;
  text-align: right;
}

.guest-timer-digits {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.85rem, 5.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #67e8f9;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
}

.guest-timer-digits.is-urgent {
  color: #fca5a5;
  text-shadow: 0 0 20px rgba(248, 113, 113, 0.25);
}

.guest-timer-label {
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(253, 230, 138, 0.65);
}

.guest-timer-track {
  margin-top: 0.45rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.guest-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.95), rgba(34, 211, 238, 0.95));
  transition: width 0.35s linear;
}

.guest-timer-fill.is-urgent {
  background: linear-gradient(90deg, #f87171, #fb923c);
}

.guest-exit {
  align-self: flex-start;
  margin-top: 0.15rem;
}

@media (max-width: 560px) {
  .guest-banner-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .guest-banner-info { align-items: center; }
  .guest-timer-premium { text-align: center; min-width: 0; }
  .guest-exit { align-self: center; }
}

.guest-banner-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.guest-banner-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(253, 230, 138, 0.75);
  margin-bottom: 0.25rem;
}

.guest-gens-quota {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}

.guest-gens-quota.is-exhausted {
  color: #fca5a5;
}

.guest-exit {
  align-self: flex-end;
  color: #fde68a !important;
}

.guest-progress { margin-top: 0.15rem; }

.temp-timer-display {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.temp-link-shell {
  position: relative;
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: calc(var(--r) + 6px);
  border: 1px solid rgba(167, 139, 250, 0.28);
  background:
    radial-gradient(900px 320px at 0% 0%, rgba(124, 58, 237, 0.24), transparent 58%),
    radial-gradient(760px 280px at 100% 100%, rgba(8, 145, 178, 0.2), transparent 52%),
    linear-gradient(165deg, rgba(36, 34, 58, 0.94), rgba(28, 26, 46, 0.96));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.temp-link-shell-glow {
  position: absolute;
  inset: -30% -10% auto;
  height: 60%;
  background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.14), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.temp-link-idle:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  position: relative;
  z-index: 1;
}

.temp-link-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  position: relative;
  z-index: 1;
  margin-bottom: 0.15rem;
}

.temp-link-hero-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 1.35rem;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(8, 145, 178, 0.32));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(124, 58, 237, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.temp-link-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.95);
  margin-bottom: 0.25rem;
}

.temp-link-kicker-live {
  color: rgba(34, 211, 238, 0.95);
}

.temp-link-hero-text h3,
.temp-link-head h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.temp-link-hero-text p,
.temp-link-sub {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: rgba(203, 213, 225, 0.72);
  line-height: 1.5;
}

.temp-link-layout-premium {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(11.5rem, 0.85fr);
  gap: 0.85rem;
  align-items: stretch;
  min-height: 20.5rem;
}

.temp-link-card {
  padding: 1rem 1.05rem 1.05rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid rgba(167, 139, 250, 0.16);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  min-height: 20.5rem;
}

.temp-link-card-config {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.temp-link-card-preview {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.05rem 1.1rem;
  background:
    radial-gradient(260px 160px at 50% -10%, rgba(167, 139, 250, 0.16), transparent 70%),
    radial-gradient(220px 140px at 80% 100%, rgba(34, 211, 238, 0.1), transparent 72%),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(167, 139, 250, 0.18);
  overflow: hidden;
  position: relative;
}

.temp-link-card-preview-idle::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%, transparent 72%, rgba(0, 0, 0, 0.08));
}

.temp-link-preview-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.temp-link-preview-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: #ddd6fe;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.temp-link-preview-stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10.5rem;
  margin: 0.15rem 0 0.05rem;
}

.temp-link-preview-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
  opacity: 0.75;
}

.temp-link-preview-orb-a {
  width: 7rem;
  height: 7rem;
  top: 50%;
  left: 50%;
  transform: translate(-58%, -58%);
  background: rgba(167, 139, 250, 0.28);
}

.temp-link-preview-orb-b {
  width: 6rem;
  height: 6rem;
  top: 50%;
  left: 50%;
  transform: translate(-18%, -28%);
  background: rgba(34, 211, 238, 0.22);
}

.temp-link-ring-preview {
  width: 9.25rem;
  height: 9.25rem;
  filter: drop-shadow(0 0 28px rgba(34, 211, 238, 0.16));
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.temp-link-ring-preview.is-pulse {
  transform: scale(1.03);
}

.temp-link-preview-core {
  gap: 0.18rem;
}

.temp-link-preview-time {
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  letter-spacing: 0.03em;
  text-shadow: 0 0 28px rgba(34, 211, 238, 0.42);
}

.temp-link-preview-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: rgba(165, 243, 252, 0.82);
}

.temp-link-preview-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.temp-link-preview-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  min-height: 4.6rem;
  padding: 0.65rem 0.45rem 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.temp-link-preview-stat-ttl {
  border-color: rgba(167, 139, 250, 0.16);
  background:
    radial-gradient(80px 50px at 50% 0%, rgba(167, 139, 250, 0.1), transparent 72%),
    rgba(0, 0, 0, 0.16);
}

.temp-link-preview-stat-keys {
  border-color: rgba(34, 211, 238, 0.16);
  background:
    radial-gradient(80px 50px at 50% 0%, rgba(34, 211, 238, 0.08), transparent 72%),
    rgba(0, 0, 0, 0.16);
}

.temp-link-preview-stat-icon {
  font-size: 1rem;
  line-height: 1;
}

.temp-link-preview-stat-k {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
}

.temp-link-preview-stat-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
  line-height: 1.2;
}

.temp-link-preview-stat-ttl .temp-link-preview-stat-val {
  color: #ede9fe;
}

.temp-link-preview-stat-keys .temp-link-preview-stat-val {
  color: #ccfbf1;
}

.temp-link-preview-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: center;
  color: rgba(148, 163, 184, 0.88);
}

.temp-link-create-idle {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 0.1rem;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.22);
}

.temp-link-create-idle .temp-link-create-glow {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98) 0%, rgba(6, 182, 212, 0.94) 52%, rgba(52, 211, 153, 0.9) 100%);
}

.temp-link-create-idle:hover:not(:disabled) {
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.32);
}

.temp-link-setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.temp-link-setting-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.temp-link-setting-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.temp-link-setting-keys {
  align-items: stretch;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.temp-link-setting-k {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.92);
}

.temp-link-pills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.temp-pill {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  min-height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 245, 249, 0.94);
  border-radius: 12px;
  padding: 0.35rem 0.4rem;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
}

.temp-pill span {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.temp-pill small {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
}

.temp-pill:hover {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

.temp-pill.is-active {
  border-color: rgba(34, 211, 238, 0.55);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.16), rgba(124, 58, 237, 0.14));
  color: #ecfeff;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.15),
    0 8px 22px rgba(34, 211, 238, 0.12);
}

.temp-pill.is-active small {
  color: rgba(165, 243, 252, 0.88);
}

.temp-pill:active {
  transform: scale(0.97);
}

.temp-link-stepper-premium {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.stepper-btn {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: #67e8f9;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.stepper-btn:hover:not(:disabled) {
  background: rgba(34, 211, 238, 0.14);
  color: #a5f3fc;
}

.stepper-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.stepper-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.stepper-readout {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  min-width: 0;
}

.stepper-value {
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #f8fafc;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.18);
}

.stepper-unit {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.temp-link-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.temp-link-ring-premium {
  position: relative;
  width: 7.75rem;
  height: 7.75rem;
  display: grid;
  place-items: center;
}

.temp-link-ring-live {
  width: 9.25rem;
  height: 9.25rem;
}

.temp-link-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.temp-link-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 7;
}

.temp-link-ring-progress {
  fill: none;
  stroke: url(#temp-ring-grad-idle);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.temp-link-ring-live .temp-link-ring-progress {
  stroke: url(#temp-ring-grad-live);
}

.temp-link-ring.is-urgent .temp-link-ring-progress,
.temp-link-ring-progress.is-urgent {
  stroke: #f87171;
  filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.45));
}

.temp-link-ring-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  text-align: center;
  padding: 0 0.35rem;
}

.temp-link-ring-time {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #ecfeff;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}

.temp-link-ring-live .temp-link-ring-time {
  font-size: 1.35rem;
}

.temp-link-ring-time.is-long,
.temp-countdown.is-long {
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

.temp-link-ring-live .temp-link-ring-time.is-long,
.temp-link-ring-live .temp-countdown.is-long {
  font-size: 1.05rem;
}

.temp-link-ring-label,
.temp-countdown-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
}

.temp-countdown.is-urgent,
.temp-link-ring-time.is-urgent {
  color: #fca5a5;
  text-shadow: 0 0 20px rgba(248, 113, 113, 0.35);
}

.temp-link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.temp-link-chips-inline {
  justify-content: flex-start;
}

.temp-link-chip {
  font-size: 0.68rem;
  font-weight: 650;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.9);
}

.temp-link-chip-violet {
  border-color: rgba(167, 139, 250, 0.32);
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
}

.temp-link-chip-accent {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
}

.temp-link-create-premium {
  position: relative;
  overflow: hidden;
  min-height: 2.85rem;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.temp-link-create-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(8, 145, 178, 0.92));
  transition: filter 0.2s, transform 0.2s;
}

.temp-link-create-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.temp-link-create-icon {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.temp-link-create-premium:hover:not(:disabled) .temp-link-create-glow {
  filter: brightness(1.08);
}

.temp-link-create-premium:active:not(:disabled) .temp-link-create-glow {
  transform: scale(0.985);
}

.temp-link-create-premium.loading .temp-link-create-inner .btn-text {
  opacity: 0.7;
}

.temp-link-card-live {
  gap: 0.65rem;
}

.temp-link-live-chips {
  margin-top: 0.05rem;
}

.temp-link-action-row-premium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: auto;
}

.temp-link-action-btn {
  width: 100%;
  min-height: 2.15rem;
  border-radius: 10px;
  border-color: rgba(167, 139, 250, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.temp-link-card-live .temp-progress-track-slim {
  margin-top: 0.15rem;
}

.temp-link-card-preview-live .temp-link-visual {
  flex: 1;
  justify-content: center;
}

.temp-link-create-secondary .temp-link-create-glow {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.94), rgba(124, 58, 237, 0.92));
}

.temp-link-active:not([hidden]) {
  display: block;
  position: relative;
  z-index: 1;
}

.temp-link-log-wrap {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

.temp-link-url-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(0, 0, 0, 0.38);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.temp-link-url-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  padding: 0.65rem 0.75rem;
  outline: none;
}

.temp-link-url-copy {
  flex-shrink: 0;
  width: 2.75rem;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cyan);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.temp-link-url-copy:hover {
  background: rgba(34, 211, 238, 0.12);
}

.temp-link-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.temp-progress-track-slim {
  height: 5px;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

#temp-link-idle[hidden],
#temp-link-active[hidden] {
  display: none !important;
}

.temp-link-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.temp-link-head-text {
  min-width: 0;
}

.temp-link-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  row-gap: 0.85rem;
  align-items: end;
  padding: 0.85rem 0.85rem 0.95rem;
  border-radius: calc(var(--r) - 2px);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.temp-link-setting-time {
  grid-column: 1 / -1;
  padding-bottom: 0.7rem;
  margin-bottom: 0.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.temp-link-create-row {
  grid-column: 1 / -1;
  padding-top: 0.55rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.temp-link-setting-preview {
  align-items: center;
  text-align: center;
}

.temp-link-preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: calc(var(--r) - 2px);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.temp-link-preview-time {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  line-height: 1;
}

.temp-link-footer {
  margin-top: 0.85rem;
  padding-top: 0.15rem;
}

.temp-link-active-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.temp-link-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: stretch;
}

.temp-link-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 6.75rem;
}

.temp-link-col-info,
.temp-link-col-timer {
  padding: 0.85rem 0.9rem;
  border-radius: calc(var(--r) - 2px);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.temp-link-col-timer {
  align-items: center;
  text-align: center;
}

.temp-link-col-action,
.temp-link-col-link {
  padding: 0.85rem 0.9rem;
  border-radius: calc(var(--r) - 2px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.temp-link-col-link {
  gap: 0.65rem;
  justify-content: center;
}

.temp-link-lead {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.temp-link-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 1rem;
}

.temp-link-lead h3,
.temp-link-head h3 {
  margin: 0 0 0.15rem;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.temp-link-sub {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}

.temp-link-timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 0.65rem;
}

.temp-link-col-timer .temp-progress-track {
  width: 100%;
  margin-top: 0;
}

.temp-link-copy-btn {
  min-height: 2.35rem;
  font-size: 0.82rem;
  margin-top: 0;
}

.temp-countdown {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
}

.temp-countdown.is-urgent {
  color: var(--warn);
}

.temp-countdown-label {
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: center;
}

.temp-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.temp-progress-bar {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width 1s linear;
}

.temp-progress-bar.is-urgent {
  background: linear-gradient(90deg, #f59e0b, #f87171);
}

.temp-link-url {
  padding: 0.55rem 0.65rem;
  border-radius: calc(var(--r) - 4px);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.66rem;
  line-height: 1.4;
  color: #c8c8e0;
  word-break: break-all;
}

@media (max-width: 720px) {
  .temp-link-layout-premium {
    grid-template-columns: 1fr;
  }

  .temp-link-card-preview-idle {
    order: -1;
  }

  .temp-link-card-preview:not(.temp-link-card-preview-idle) {
    order: -1;
  }

  .temp-link-action-row-premium {
    grid-template-columns: 1fr;
  }

  .temp-link-chips-inline {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .temp-link-config-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .temp-link-dial {
    min-height: 10rem;
    padding: 0.85rem 0.55rem 0.75rem;
  }

  .temp-link-dial-input {
    max-width: 100%;
    min-height: 3.1rem;
    font-size: 1.85rem;
  }

  .temp-link-preview-stage {
    min-height: 9.5rem;
  }

  .temp-link-ring-preview {
    width: 8.25rem;
    height: 8.25rem;
  }

  .temp-link-pills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .temp-link-active-grid,
  .temp-link-split {
    grid-template-columns: 1fr;
  }
}

/* Alerts */
.alert {
  display: none;
  padding: 0.7rem 0.85rem;
  border-radius: var(--r);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.alert.show { display: block; }
.alert-ok { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.25); color: #a7f3d0; }
.alert-err { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.25); color: #fecaca; }
.alert-warn { background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.25); color: #fde68a; }

/* Footer */
.foot {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.foot a {
  color: var(--accent);
  text-decoration: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(1rem + var(--safe-b));
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 100;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: rgba(18, 18, 31, 0.95);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  pointer-events: none;
  max-width: calc(100% - 2rem);
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Wider screens ── */
@media (min-width: 600px) {
  :root { --max: 640px; }

  .stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
  }

  .stat { padding: 0.85rem 0.65rem; }

  .stars-balance-head {
    align-items: flex-end;
  }
}

@media (min-width: 900px) {
  :root { --max: 720px; }

  body.is-admin {
    --max: min(1320px, calc(100vw - 1.5rem));
  }

  body.is-admin .dash {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dash {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 0 1rem;
    align-items: start;
  }

  .dash-top,
  .stats,
  .seg {
    grid-column: 1 / -1;
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .temp-link-panel {
    grid-column: 1 / -1;
  }

  .guest-gen-block,
  .gen-stack {
    grid-column: 1 / -1;
  }

  .log-section {
    grid-column: 1 / -1;
  }

  .gen-log-list {
    max-height: min(65vh, 36rem);
  }

  .log-list {
    max-height: 14rem;
  }
}

/* Tiny phones */
@media (max-width: 520px) {
  .stars-balance-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-revenue-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .stars-balance-rate-wrap {
    align-items: flex-start;
  }
}

@media (max-width: 340px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Landscape phone */
@media (max-height: 480px) and (orientation: landscape) {
  .screen-login {
    align-items: flex-start;
    padding-top: max(0.5rem, var(--safe-t));
  }

  .login-card {
    padding: 1rem 1.25rem;
  }

  .login-card h1 { font-size: 1.2rem; }
  .login-sub { margin-bottom: 1rem; }
}

/* --- Bot hub (TG sync) --- */
.bot-hub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0.65rem;
}

.bot-hub-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted, #94a3b8);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bot-hub-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.bot-hub-tab.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(99, 102, 241, 0.25));
  border-color: rgba(96, 165, 250, 0.45);
  color: #eff6ff;
}

.bot-hub-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.bot-hub-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.bot-hub-stat strong {
  color: #fbbf24;
  font-weight: 700;
}

.bot-settings-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bot-settings-main {
  display: grid;
  gap: 0.65rem;
}

.bot-settings-extra {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

.bot-settings-extra summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  list-style: none;
}

.bot-settings-extra summary::-webkit-details-marker { display: none; }

.bot-settings-extra[open] summary {
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-panel { display: none; }
.bot-panel.is-active { display: block; }

.bot-shop-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}

.stars-balance-products.bot-shop-grid {
  display: flex;
  grid-template-columns: none;
}

.bot-shop-grid::-webkit-scrollbar {
  height: 6px;
}

.bot-shop-grid::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.28);
  border-radius: 999px;
}

.bot-shop-view-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bot-shop-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 0;
  min-width: 11.5rem;
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.045) 0%, rgba(0, 0, 0, 0.22) 55%, rgba(0, 0, 0, 0.32) 100%);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.bot-shop-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.bot-shop-card-glow {
  position: absolute;
  top: -2.5rem;
  right: -1.5rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.55;
}

.bot-shop-card--keys .bot-shop-card-glow { background: radial-gradient(circle, rgba(251, 191, 36, 0.28) 0%, transparent 68%); }
.bot-shop-card--sub .bot-shop-card-glow { background: radial-gradient(circle, rgba(167, 139, 250, 0.28) 0%, transparent 68%); }
.bot-shop-card--instant .bot-shop-card-glow { background: radial-gradient(circle, rgba(248, 113, 113, 0.24) 0%, transparent 68%); }
.bot-shop-card--other .bot-shop-card-glow { background: radial-gradient(circle, rgba(148, 163, 184, 0.2) 0%, transparent 68%); }

.bot-shop-card--keys { border-color: rgba(251, 191, 36, 0.16); }
.bot-shop-card--sub { border-color: rgba(167, 139, 250, 0.16); }
.bot-shop-card--instant { border-color: rgba(248, 113, 113, 0.14); }

.bot-shop-card-head {
  position: relative;
  z-index: 1;
}

.bot-shop-card-type {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.52rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bot-shop-card--keys .bot-shop-card-type { color: #fde68a; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.22); }
.bot-shop-card--sub .bot-shop-card-type { color: #ddd6fe; background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.22); }
.bot-shop-card--instant .bot-shop-card-type { color: #fecaca; background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.22); }

.bot-shop-card-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: #f8fafc;
}

.bot-shop-card-id {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.68rem;
  color: #64748b;
}

.bot-shop-card-price {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.bot-shop-card-price strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fde68a;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.15);
}

.bot-shop-card-price-old {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: line-through;
}

.bot-shop-card-fiat {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.bot-shop-fiat-cell {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border-radius: calc(var(--r) - 3px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.bot-shop-fiat-cell span {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.bot-shop-fiat-cell strong {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
  word-break: break-word;
}

.bot-shop-card-note {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0;
  font-size: 0.66rem;
  line-height: 1.35;
  color: #94a3b8;
}

@media (max-width: 720px) {
  .bot-shop-card-fiat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .bot-shop-view-badge {
    display: none;
  }
}

.bot-product-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bot-product-card.is-off {
  opacity: 0.55;
}

.bot-product-top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: flex-start;
}

.bot-product-title {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
}

.bot-product-id {
  font-size: 0.68rem;
  color: #64748b;
}

.bot-product-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fbbf24;
}

.bot-product-meta {
  font-size: 0.68rem;
  color: #94a3b8;
}

.bot-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.btn-chip {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.68rem;
  padding: 0.22rem 0.45rem;
  cursor: pointer;
}

.btn-chip:hover { background: rgba(255, 255, 255, 0.08); }
.btn-chip.on { border-color: rgba(34, 197, 94, 0.45); color: #86efac; }
.btn-chip.off { border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }

.bot-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.bot-settings-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.bot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.75rem;
  cursor: pointer;
}

.bot-toggle input { accent-color: #3b82f6; }

.input-compact {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: #e2e8f0;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
}

.bot-field label {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.bot-users-hint {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(251, 191, 36, 0.08));
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.45;
}
.bot-users-hint-icon { font-size: 1.25rem; line-height: 1; }
.bot-users-hint strong { color: #fde68a; }
.bot-user-oxy183-panel {
  margin: 0.85rem 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.28), rgba(15, 23, 42, 0.92));
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.08);
}
.bot-user-oxy183-panel-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.bot-user-oxy183-panel-icon { font-size: 1.5rem; line-height: 1; }
.bot-user-oxy183-panel-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fef08a;
  margin-bottom: 0.2rem;
}
.bot-user-oxy183-panel-desc {
  margin: 0;
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.45;
}
.bot-user-oxy-btn {
  background: linear-gradient(135deg, #dc2626, #b45309) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  color: #fff !important;
}

.bot-oxygen-toolbar,
.bot-users-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.bot-oxygen-hint {
  flex: 1;
  font-size: 0.72rem;
  color: #94a3b8;
}

.bot-oxygen-list {
  display: grid;
  gap: 0.65rem;
}

.bot-users-list {
  display: grid;
  gap: 1rem;
}

.bot-users-scroll {
  max-height: min(68vh, 42rem);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.35rem 0.35rem 0;
  margin-right: -0.15rem;
  scrollbar-gutter: stable;
}

.bot-users-scroll::-webkit-scrollbar {
  width: 7px;
}

.bot-users-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.bot-users-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.45), rgba(59, 130, 246, 0.35));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-users-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.55), rgba(96, 165, 250, 0.45));
}

#bot-panel-users.is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bot-users-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-users-empty {
  grid-column: 1 / -1;
}

.bot-oxygen-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.bot-user-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem 1.05rem 0.85rem;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.055) 0%, rgba(0, 0, 0, 0.28) 52%, rgba(139, 92, 246, 0.07) 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.14s, box-shadow 0.18s;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bot-user-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 100% 0%, rgba(139, 92, 246, 0.14), transparent 58%);
  pointer-events: none;
}

.bot-user-card > * {
  position: relative;
  z-index: 1;
}

.bot-user-card:hover {
  border-color: rgba(139, 92, 246, 0.38);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, rgba(59, 130, 246, 0.08) 48%, rgba(139, 92, 246, 0.12) 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.bot-user-card.is-blocked {
  opacity: 0.72;
  border-color: rgba(248, 113, 113, 0.25);
}

.bot-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.bot-user-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bot-user-badge.sub {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
}

.bot-user-badge.block {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.bot-user-badge.role {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.12);
}

.sf-modal-card {
  max-width: 540px;
}

.sf-modal-card-wide {
  max-width: 580px;
}

.sf-modal-card-user {
  max-width: 760px;
}

.bot-user-modal .bot-edit-card {
  max-width: 760px;
}

.bot-user-modal-body {
  max-height: min(72vh, 44rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 1rem 1rem;
  scrollbar-gutter: stable;
}

.bot-user-modal-body::-webkit-scrollbar {
  width: 7px;
}

.bot-user-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.45), rgba(59, 130, 246, 0.35));
  border-radius: 999px;
}

.bot-user-modal-head-icon {
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.bot-user-modal-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(0, 0, 0, 0.28) 55%, rgba(59, 130, 246, 0.08) 100%);
}

.bot-user-modal-avatar {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.bot-user-modal-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-user-modal-id {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
  color: #94a3b8;
}

.bot-user-modal-hero-side {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.bot-user-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.bot-user-status-pill.is-active-user {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.1);
}

.bot-user-status-pill.is-blocked {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.bot-user-modal-seen {
  font-size: 0.68rem;
  color: #64748b;
}

.bot-user-modal-tabs {
  margin-bottom: 0.75rem;
}

.bot-user-modal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.bot-user-modal-metric {
  padding: 0.65rem 0.7rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.bot-user-modal-metric span {
  display: block;
  font-size: 0.62rem;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.bot-user-modal-metric strong {
  font-size: 0.92rem;
  color: #f1f5f9;
}

.bot-user-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.bot-user-modal-panel {
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-user-modal-panel-body {
  display: grid;
  gap: 0.55rem;
}

.bot-user-modal-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  font-size: 0.78rem;
}

.bot-user-modal-kv span {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
}

.bot-user-sub-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.bot-user-sub-progress-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bot-user-sub-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
}

.bot-user-history-scroll {
  display: grid;
  gap: 0.65rem;
  max-height: min(52vh, 28rem);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.bot-user-history-block {
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-user-history-head {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.bot-user-history-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bot-user-history-head strong {
  display: block;
  font-size: 0.82rem;
}

.bot-user-history-head span {
  font-size: 0.65rem;
  color: #64748b;
}

.user-history-list-wide {
  max-height: 10rem;
}

.user-history-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-history-item.is-empty {
  color: var(--muted);
  font-style: italic;
}

.bot-user-msg-compose {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.08) 0%, rgba(0, 0, 0, 0.24) 100%);
}

.bot-user-msg-hint {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
}

.bot-user-msg-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bot-user-msg-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.bot-user-msg-chip:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(139, 92, 246, 0.14);
  color: #f8fafc;
}

.bot-user-msg-text {
  width: 100%;
  min-height: 7rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: #f1f5f9;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  resize: vertical;
}

.bot-user-msg-preview-wrap {
  display: grid;
  gap: 0.35rem;
}

.bot-user-msg-preview-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.bot-user-msg-preview {
  min-height: 4.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.bot-user-msg-preview-empty {
  color: #64748b;
  font-style: italic;
}

.bot-user-msg-preview strong {
  color: #fff;
}

.bot-user-msg-preview code {
  padding: 0.1rem 0.3rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.bot-user-msg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bot-user-msg-send {
  width: 100%;
}

.bot-user-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.bot-user-action-card {
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 0.45rem;
}

.bot-user-action-k {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b5fd;
}

.bot-user-action-desc {
  margin: 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

.bot-user-msg-btn {
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.14);
  color: #e9d5ff;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.bot-user-msg-btn:hover {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(139, 92, 246, 0.24);
  transform: translateY(-1px);
}

.bot-user-card-foot-hint {
  font-size: 0.62rem;
  color: #64748b;
}

@media (max-width: 720px) {
  .bot-user-modal-metrics,
  .bot-user-modal-grid,
  .bot-user-actions-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bot-user-modal-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .bot-user-modal-hero-side {
    grid-column: 1 / -1;
    justify-items: start;
    grid-template-columns: repeat(2, auto);
    align-items: center;
  }
}

.sf-modal-head {
  padding: 0 1rem;
}

.sf-modal-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-modal-body {
  padding: 0 1rem 1rem;
}

.sf-modal-section {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.55rem;
}

.sf-modal-section-k {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.sf-modal-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  font-size: 0.78rem;
}

.sf-modal-kv div {
  min-width: 0;
}

.sf-modal-kv span {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
}

.bot-user-grant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-end;
}

.bot-user-grant-row select {
  flex: 1;
  min-width: 8rem;
}

.bot-form-type-fields {
  display: grid;
  gap: 0.45rem;
}

.bot-form-type-fields[hidden] {
  display: none !important;
}

.bot-oxy-drop {
  border: 1px dashed rgba(139, 92, 246, 0.45);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  background: rgba(139, 92, 246, 0.06);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.bot-oxy-drop:hover {
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(139, 92, 246, 0.1);
}

.bot-oxy-drop input[type="file"] {
  display: none;
}

.bot-edit-modal .bot-edit-card {
  max-width: 540px;
  width: calc(100% - 1.5rem);
}

.bot-edit-form {
  display: grid;
  gap: 0.55rem;
  padding: 0 1rem 1rem;
}

.bot-edit-form .bot-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.bot-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  padding-top: 0.35rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sf-modal-footer {
  margin-top: 0.5rem;
}
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.btn-sm {
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
}

.stars-balance-head {
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --- Full-width bot hub tabs (premium) --- */
nav.bot-hub-nav.bot-hub-nav-wide,
.bot-hub-nav.bot-hub-nav-wide {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  width: 100%;
  flex-wrap: nowrap;
}

.bot-hub-nav-premium {
  padding: 0.45rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bot-hub-nav-wide .bot-hub-tab,
.bot-hub-tab-premium {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.bot-hub-tab-inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.bot-hub-tab-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 68%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.bot-hub-tab-premium:hover {
  transform: translateY(-1px);
  color: #e2e8f0;
  border-color: rgba(167, 139, 250, 0.22);
  background: rgba(124, 58, 237, 0.08);
}

.bot-hub-tab-premium:hover .bot-hub-tab-glow {
  opacity: 0.5;
}

.bot-hub-tab-premium.is-active {
  color: #f8fafc;
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.42), rgba(124, 58, 237, 0.38));
  box-shadow:
    0 10px 28px rgba(59, 130, 246, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.bot-hub-tab-premium.is-active .bot-hub-tab-glow {
  opacity: 1;
}

.bot-hub-tab-label {
  white-space: nowrap;
}

.bot-hub-tab-icon {
  font-size: 1.05rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

/* --- Bot settings hub (premium) --- */
.bot-panel.bot-settings-hub.is-active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.5rem;
}

.bot-panel.bot-settings-hub:not(.is-active),
.bot-panel.bot-settings-hub[hidden] {
  display: none !important;
}

.bot-hub-hero {
  margin-bottom: 0;
}

.bot-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.65rem;
}

.bot-quick-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), transparent 45%),
    rgba(8, 10, 22, 0.72);
  color: #f1f5f9;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.bot-quick-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.42);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.18);
}

.bot-quick-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(59, 130, 246, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.bot-quick-btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.bot-quick-btn-text strong {
  font-size: 0.82rem;
  font-weight: 650;
  color: #f8fafc;
}

.bot-quick-btn-text small {
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-settings-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.85rem;
}

.bot-card-premium {
  position: relative;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(480px 160px at 0% 0%, rgba(124, 58, 237, 0.1), transparent 55%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.035), transparent 48%),
    rgba(8, 10, 22, 0.78);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.bot-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.bot-card-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.2rem;
}

.bot-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
}

.bot-card-badge {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.bot-sw-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bot-sw {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bot-sw:hover {
  border-color: rgba(167, 139, 250, 0.22);
  background: rgba(124, 58, 237, 0.06);
}

.bot-sw input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.bot-sw-track {
  position: relative;
  flex-shrink: 0;
  width: 2.65rem;
  height: 1.45rem;
  margin-top: 0.12rem;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bot-sw-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.bot-sw input:checked + .bot-sw-track {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(59, 130, 246, 0.75));
  border-color: rgba(167, 139, 250, 0.45);
}

.bot-sw input:checked + .bot-sw-track .bot-sw-thumb {
  transform: translateX(1.15rem);
}

.bot-sw-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.bot-sw-label strong {
  font-size: 0.82rem;
  font-weight: 650;
  color: #f1f5f9;
}

.bot-sw-label small {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #94a3b8;
}

.bot-fields-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.bot-field-premium label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.bot-field-premium .input-compact {
  border-radius: 12px;
  border-color: rgba(167, 139, 250, 0.18);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.55rem 0.65rem;
}

.bot-field-premium .input-compact:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.bot-role-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.bot-role-chip {
  display: inline-flex;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.bot-role-chip strong {
  color: #e2e8f0;
  font-weight: 650;
}

.bot-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bot-admin-row-premium {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.16);
}

.bot-admin-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.22);
  flex-shrink: 0;
}

.bot-admin-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.bot-admin-meta strong {
  font-size: 0.82rem;
  color: #f1f5f9;
}

.bot-admin-meta span {
  font-size: 0.68rem;
  color: #94a3b8;
}

.bot-role-badge--owner {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.bot-role-badge--admin {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
}

.bot-role-badge--support {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.bot-broadcast-lead {
  margin: 0 0 0.65rem;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #94a3b8;
}

.bot-broadcast-all-btn {
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #fecaca !important;
}

.bot-settings-advanced {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.12);
}

.bot-settings-advanced summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
  color: #94a3b8;
  list-style: none;
}

.bot-settings-advanced summary::-webkit-details-marker { display: none; }

.bot-settings-advanced[open] summary {
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-settings-advanced-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bot-advanced-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
}

.bot-i18n-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.bot-save-bar {
  position: sticky;
  bottom: 0.65rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(8, 10, 22, 0.95));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.bot-save-hint {
  font-size: 0.74rem;
  color: #cbd5e1;
}

.bot-save-btn {
  min-width: 9rem;
}

.temp-link-panel--highlight {
  animation: temp-link-highlight 1.8s ease;
}

@keyframes temp-link-highlight {
  0%, 100% { box-shadow: none; }
  20%, 60% {
    box-shadow:
      0 0 0 2px rgba(167, 139, 250, 0.55),
      0 16px 40px rgba(124, 58, 237, 0.25);
  }
}

@media (max-width: 720px) {
  .bot-settings-cards {
    grid-template-columns: 1fr;
  }

  .bot-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-save-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .bot-save-btn {
    width: 100%;
  }
}

/* --- Bot dashboard --- */
.bot-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bot-dash-card {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.bot-dash-card-k {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.bot-dash-card-v {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e2e8f0;
}

.bot-recent-payments {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.bot-recent-payments-scroll {
  overflow-x: auto;
  margin-top: 0.55rem;
}

.bot-recent-payments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.bot-recent-payments-table th,
.bot-recent-payments-table td {
  padding: 0.42rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.bot-recent-payments-table th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.bot-pay-ok { color: #86efac; }
.bot-pay-wait { color: #fde68a; }
.bot-pay-warn { color: #fca5a5; font-weight: 650; }

.bot-settings-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.45rem;
}

.bot-admins-section {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.bot-admins-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.bot-admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}

.bot-admin-row:last-child { border-bottom: 0; }

.bot-role-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
}

.bot-role-badge.support {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

/* --- Premium select --- */
.sf-select-wrap {
  position: relative;
  flex: 1;
  min-width: 10rem;
}

.sf-select {
  appearance: none;
  width: 100%;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background:
    linear-gradient(180deg, rgba(30, 27, 55, 0.95), rgba(15, 15, 28, 0.98));
  color: #f1f5f9;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sf-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a78bfa;
  pointer-events: none;
  font-size: 0.75rem;
}

/* --- User modal tabs --- */
.sf-modal-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.sf-modal-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.sf-modal-tab.is-active {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(167, 139, 250, 0.45);
  color: #e9d5ff;
}

.sf-modal-tab-panel[hidden] { display: none !important; }

.user-history-list {
  display: grid;
  gap: 0.35rem;
  max-height: 12rem;
  overflow: auto;
}

.user-history-item {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  line-height: 1.35;
}

.user-history-item time {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  margin-bottom: 0.15rem;
}

.temp-countdown-xl {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
  line-height: 1;
}

.temp-timer-display-premium {
  align-items: center;
  text-align: center;
}

.temp-link-log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
}

.temp-link-log {
  display: grid;
  gap: 0.35rem;
  max-height: 8rem;
  overflow: auto;
}

.temp-link-log-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.68rem;
}

.temp-link-log-main,
.temp-link-log-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.temp-link-log-main {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
}

.temp-link-log-meta {
  font-size: 0.72rem;
}

.temp-link-log-status.is-open {
  color: #6ee7b7;
}

.temp-link-log-status.is-new {
  color: #94a3b8;
}

.temp-link-log-rem {
  color: rgba(148, 163, 184, 0.88);
  font-variant-numeric: tabular-nums;
}

body.is-guest .foot { display: none; }
body.is-admin .foot { display: block; }

@media (max-width: 720px) {
  .dash-stats-premium.stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-stat-v {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
  }
}

@media (max-width: 520px) {
  .dash-command-bar {
    padding: 0.65rem;
    border-radius: 18px;
  }

  .bot-hub-nav-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-hub-tab-premium {
    min-height: 2.85rem;
    font-size: 0.78rem;
  }
}



/* --- Custom dark dropdown --- */
.sf-dd {
  position: relative;
  width: 100%;
}

.sf-select-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.sf-select-wrap-dd::after {
  display: none;
}

.sf-dd-trigger {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(180deg, rgba(30, 27, 55, 0.95), rgba(15, 15, 28, 0.98));
  color: #f1f5f9;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sf-dd-trigger::after {
  content: "▾";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a78bfa;
  pointer-events: none;
}

.sf-dd-menu {
  position: absolute;
  z-index: 120;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  max-height: 14rem;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: #12121f;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 0.25rem;
}

.sf-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}

.sf-dd-item:hover,
.sf-dd-item.is-active {
  background: rgba(139, 92, 246, 0.22);
  color: #fff;
}

/* --- User cards grid --- */
.bot-user-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.bot-user-card-meta {
  min-width: 0;
}

.bot-user-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.bot-user-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.bot-user-card-handle {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-user-card-pulse {
  font-size: 0.68rem;
  font-weight: 600;
  color: #86efac;
  white-space: nowrap;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.bot-user-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.bot-user-metric {
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-user-metric-k {
  display: block;
  font-size: 0.62rem;
  color: #94a3b8;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-user-metric-v {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-user-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
  font-size: 0.74rem;
}

.bot-user-card-details div {
  min-width: 0;
}

.bot-user-card-details span {
  display: block;
  font-size: 0.62rem;
  color: #64748b;
  margin-bottom: 0.12rem;
}

.bot-user-card-details strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-user-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.64rem;
  color: #64748b;
}

@media (max-width: 1180px) {
  .bot-users-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .bot-users-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .bot-user-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bot-user-wallet-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.65rem 0 0.5rem;
}

.bot-user-wallet-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.55rem;
  border-radius: calc(var(--r) - 2px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.16);
}

.bot-user-wallet-chip span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.bot-user-wallet-chip strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.bot-user-wallet-keys { border-color: rgba(251, 191, 36, 0.18); background: rgba(251, 191, 36, 0.05); }
.bot-user-wallet-rub { border-color: rgba(96, 165, 250, 0.18); background: rgba(59, 130, 246, 0.05); }
.bot-user-wallet-oxy { border-color: rgba(248, 113, 113, 0.22); background: rgba(239, 68, 68, 0.06); }
.bot-user-wallet-stars { border-color: rgba(167, 139, 250, 0.18); background: rgba(139, 92, 246, 0.05); }
.bot-user-wallet-platega { border-color: rgba(52, 211, 153, 0.18); background: rgba(16, 185, 129, 0.05); }

.bot-user-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.bot-user-meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-user-meta-tag.muted { opacity: 0.72; }

.bot-user-badge.oxy {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.bot-user-open-btn { flex: 1; }

.bot-user-finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0 0.85rem;
}

.bot-user-finance-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.7rem;
  border-radius: calc(var(--r) - 1px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12));
}

.bot-user-finance-card span {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.bot-user-finance-card strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.bot-user-finance-card em {
  font-style: normal;
  font-size: 0.68rem;
  color: #94a3b8;
}

.bot-user-action-wide { grid-column: 1 / -1; }

.bot-user-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.45rem 0 0.55rem;
}

.bot-user-quick-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.bot-user-quick-btn:hover {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.12);
}

@media (max-width: 900px) {
  .bot-user-wallet-strip,
  .bot-user-finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .bot-user-wallet-strip,
  .bot-user-finance-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sf-dd-menu:not([hidden]) {
  display: block;
}

.sf-dd-menu[hidden] {
  display: none !important;
}

.bot-oxygen-section-k {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0.35rem 0 0.15rem;
}

.bot-oxygen-card-builtin {
  opacity: 0.85;
  border-style: dashed;
}

/* --- Guest topbar compact row --- */
.guest-topbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  padding: 0.55rem 0.75rem;
  width: 100%;
  border-radius: calc(var(--r) + 2px);
  background:
    radial-gradient(800px 220px at 100% 0%, rgba(59, 130, 246, 0.14), transparent 55%),
    linear-gradient(165deg, rgba(26, 26, 46, 0.96), rgba(14, 14, 26, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.is-guest .guest-topbar {
  display: flex;
  overflow: visible;
  position: relative;
  z-index: 40;
}

.guest-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
}

.guest-location-inline {
  flex: 1 1 8rem;
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guest-ip-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.guest-lang-wrap {
  flex: 0 1 10.5rem;
  min-width: 8rem;
  margin: 0;
  position: relative;
  z-index: 80;
}

/* Guest language dropdown — premium */
body.is-guest .guest-lang-wrap.sf-select-wrap-dd::after {
  display: none;
}

body.is-guest .guest-lang-dd.sf-dd {
  z-index: 90;
}

body.is-guest .guest-lang-dd .sf-dd-trigger {
  padding: 0.48rem 2.15rem 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.42);
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(124, 58, 237, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(36, 32, 68, 0.98), rgba(16, 14, 30, 0.99));
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.is-guest .guest-lang-dd .sf-dd-trigger::after {
  content: "";
  right: 0.72rem;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.12rem;
  border-right: 2px solid #c4b5fd;
  border-bottom: 2px solid #c4b5fd;
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

body.is-guest .guest-lang-dd.is-open .sf-dd-trigger {
  border-color: rgba(196, 181, 253, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 3px rgba(124, 58, 237, 0.22),
    0 10px 28px rgba(124, 58, 237, 0.18);
}

body.is-guest .guest-lang-dd.is-open .sf-dd-trigger::after {
  transform: rotate(225deg);
  margin-top: 0.05rem;
  border-color: #e9d5ff;
}

body.is-guest .guest-lang-dd .sf-dd-menu--premium {
  top: calc(100% + 0.42rem);
  max-height: 15.5rem;
  padding: 0.38rem;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.46);
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 50%),
    radial-gradient(120% 100% at 0% 100%, rgba(124, 58, 237, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(24, 22, 44, 0.98), rgba(10, 10, 20, 0.99));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 32px rgba(124, 58, 237, 0.14);
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 181, 253, 0.65) rgba(255, 255, 255, 0.04);
  animation: guestLangMenuIn 0.18s ease-out;
}

@keyframes guestLangMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.is-guest .guest-lang-dd .sf-dd-menu--premium::-webkit-scrollbar {
  width: 7px;
}

body.is-guest .guest-lang-dd .sf-dd-menu--premium::-webkit-scrollbar-track {
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

body.is-guest .guest-lang-dd .sf-dd-menu--premium::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(196, 181, 253, 0.85), rgba(124, 58, 237, 0.75));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.35);
}

body.is-guest .guest-lang-dd .sf-dd-menu--premium::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(233, 213, 255, 0.95), rgba(139, 92, 246, 0.85));
}

body.is-guest .guest-lang-dd .sf-dd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.56rem 0.72rem;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 560;
  color: #e2e8f0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

body.is-guest .guest-lang-dd .sf-dd-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-guest .guest-lang-dd .sf-dd-item-check {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #ede9fe;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(34, 211, 238, 0.55));
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.35);
}

body.is-guest .guest-lang-dd .sf-dd-item-check[hidden] {
  display: none !important;
}

body.is-guest .guest-lang-dd .sf-dd-item:hover {
  background: rgba(139, 92, 246, 0.16);
  color: #fff;
  transform: translateX(1px);
}

body.is-guest .guest-lang-dd .sf-dd-item.is-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.42), rgba(34, 211, 238, 0.12));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 14px rgba(124, 58, 237, 0.18);
}

.sf-dd.is-open .sf-dd-trigger {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.sf-dd {
  z-index: 1;
}

.sf-dd-menu {
  z-index: 200;
}

/* --- Bot broadcast (premium) --- */
.bot-broadcast-section.bot-card-premium {
  margin: 0;
}

.bot-bcast-premium {
  margin-top: 0.15rem;
}

.bot-bcast-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.bot-bcast-compose {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bot-bcast-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.bot-bcast-ai-card {
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    radial-gradient(420px 140px at 0% 0%, rgba(124, 58, 237, 0.16), transparent 58%),
    rgba(0, 0, 0, 0.22);
}

.bot-bcast-ai-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.bot-bcast-ai-head span[aria-hidden="true"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  font-size: 1rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(124, 58, 237, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bot-bcast-ai-head strong {
  display: block;
  font-size: 0.84rem;
  color: #f8fafc;
}

.bot-bcast-ai-head small {
  font-size: 0.68rem;
  color: #94a3b8;
}

.bot-bcast-ai-input {
  margin-bottom: 0.55rem;
  border-color: rgba(167, 139, 250, 0.2) !important;
}

.bot-bcast-style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.bot-bcast-style-pill {
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: #cbd5e1;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.bot-bcast-style-pill:hover {
  border-color: rgba(167, 139, 250, 0.35);
}

.bot-bcast-style-pill.is-active {
  color: #f5f3ff;
  border-color: rgba(167, 139, 250, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(59, 130, 246, 0.2));
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}

.bot-bcast-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: #f8fafc;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.bot-bcast-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.bot-bcast-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.bot-bcast-btn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.bot-bcast-btn:hover:not(:disabled) .bot-bcast-btn-glow {
  opacity: 1;
}

.bot-bcast-btn-inner {
  position: relative;
  z-index: 1;
}

.bot-bcast-btn--ai {
  width: 100%;
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(124, 58, 237, 0.28));
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.18);
}

.bot-bcast-btn--primary {
  flex: 1;
  border-color: rgba(96, 165, 250, 0.4);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.55), rgba(124, 58, 237, 0.45));
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.22);
}

.bot-bcast-btn--danger {
  flex: 1;
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.45), rgba(124, 58, 237, 0.18));
  color: #fecaca;
}

.bot-bcast-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bot-bcast-tool-btn {
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: #cbd5e1;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.bot-bcast-tool-btn:hover {
  border-color: rgba(167, 139, 250, 0.3);
  color: #f1f5f9;
}

.bot-broadcast-text {
  width: 100%;
  min-height: 7rem;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: #f1f5f9;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
}

.bot-bcast-photo-card,
.bot-bcast-recipient-card {
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.16);
}

.bot-bcast-photo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.bot-bcast-photo-head strong {
  font-size: 0.82rem;
  color: #f1f5f9;
}

.bot-bcast-photo-head small {
  font-size: 0.65rem;
  color: #64748b;
}

.bot-bcast-photo-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 3.2rem;
  border-radius: 12px;
  border: 1px dashed rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.06);
  color: #c4b5fd;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bot-bcast-photo-pick span {
  font-size: 1.1rem;
  line-height: 1;
}

.bot-bcast-photo-pick:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(167, 139, 250, 0.5);
}

.bot-bcast-photo-preview {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.bot-bcast-photo-preview img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bot-bcast-photo-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bot-bcast-photo-meta span {
  font-size: 0.72rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-bcast-photo-remove {
  align-self: flex-start;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.bot-bcast-search-wrap {
  position: relative;
}

.bot-bcast-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.7;
  pointer-events: none;
}

.bot-bcast-search-input {
  padding-left: 2rem !important;
  border-color: rgba(167, 139, 250, 0.18) !important;
}

.bot-bcast-user-results {
  margin-top: 0.45rem;
  max-height: 12rem;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  background: rgba(8, 10, 22, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.bot-bcast-user-hit {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: #f1f5f9;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bot-bcast-user-hit:last-child {
  border-bottom: 0;
}

.bot-bcast-user-hit:hover {
  background: rgba(124, 58, 237, 0.12);
}

.bot-bcast-user-hit-avatar,
.bot-bcast-recipient-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(59, 130, 246, 0.35));
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.bot-bcast-user-hit strong,
.bot-bcast-recipient-chip-inner strong {
  display: block;
  font-size: 0.78rem;
}

.bot-bcast-user-hit small,
.bot-bcast-recipient-chip-inner small {
  font-size: 0.65rem;
  color: #94a3b8;
}

.bot-bcast-search-empty {
  padding: 0.65rem;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

.bot-bcast-recipient-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.25);
  background: rgba(34, 197, 94, 0.08);
}

.bot-bcast-recipient-chip-inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.bot-bcast-recipient-clear {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.bot-bcast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.bot-bcast-preview-panel {
  position: sticky;
  top: 0.75rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  background:
    radial-gradient(360px 160px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
    rgba(0, 0, 0, 0.22);
}

.bot-bcast-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.bot-bcast-preview-head span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
}

.bot-bcast-preview-head small {
  font-size: 0.65rem;
  color: #64748b;
}

.bot-bcast-tg-shell {
  padding: 0.65rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(8, 10, 22, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bot-bcast-tg-bubble {
  max-width: 100%;
  padding: 0.55rem 0.65rem 0.65rem;
  border-radius: 0 14px 14px 14px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.bot-bcast-preview-img {
  display: block;
  width: 100%;
  max-height: 12rem;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.45rem;
}

.bot-bcast-preview-text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #e2e8f0;
  word-break: break-word;
}

.bot-bcast-preview-text strong {
  color: #f8fafc;
}

.bot-bcast-preview-text code {
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.72rem;
}

@media (max-width: 960px) {
  .bot-bcast-grid {
    grid-template-columns: 1fr;
  }

  .bot-bcast-preview-panel {
    position: static;
  }

  .bot-bcast-actions {
    flex-direction: column;
  }
}

.bot-broadcast-toolbar,
.bot-broadcast-send-row {
  display: none;
}

.bot-i18n-section {
  margin: 0.85rem 0;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.bot-i18n-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.bot-i18n-status {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.45;
}

.temp-link-manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.temp-link-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.temp-link-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  flex: 1;
  align-content: center;
}

.temp-link-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 11.5rem;
  padding: 1rem 0.85rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  background:
    radial-gradient(120px 80px at 50% 0%, rgba(167, 139, 250, 0.12), transparent 72%),
    rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: text;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}

.temp-link-dial-keys {
  border-color: rgba(34, 211, 238, 0.18);
  background:
    radial-gradient(120px 80px at 50% 0%, rgba(34, 211, 238, 0.1), transparent 72%),
    rgba(0, 0, 0, 0.18);
}

.temp-link-dial:focus-within {
  border-color: rgba(167, 139, 250, 0.42);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.temp-link-dial-keys:focus-within {
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.temp-link-dial-icon {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.92;
}

.temp-link-dial-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.92);
}

.temp-link-dial-field {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.temp-link-dial-input {
  width: 100%;
  max-width: 7.5rem;
  min-height: 3.6rem;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font: inherit;
  font-size: clamp(2rem, 4vw, 2.45rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  appearance: textfield;
  -moz-appearance: textfield;
}

.temp-link-dial-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.temp-link-dial-input::-webkit-outer-spin-button,
.temp-link-dial-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.temp-link-dial-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(165, 243, 252, 0.88);
}

.temp-link-dial-keys .temp-link-dial-sub {
  color: rgba(167, 243, 208, 0.88);
}

.temp-link-manual-field {
  margin: 0;
}

.temp-link-manual-field label {
  display: block;
  font-size: 0.62rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.temp-link-manual-field .input-compact {
  width: 100%;
}

/* --- Temp link polish --- */
.temp-link-shell {
  width: 100%;
}

/* Guest thank-you page */
.screen-guest-thanks {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, var(--safe-t)) max(1rem, var(--safe-r)) max(1.25rem, var(--safe-b)) max(1rem, var(--safe-l));
}

.guest-thanks-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.guest-thanks-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.guest-thanks-orb-a {
  width: 280px;
  height: 280px;
  top: -40px;
  left: -60px;
  background: rgba(139, 92, 246, 0.35);
}

.guest-thanks-orb-b {
  width: 320px;
  height: 320px;
  right: -80px;
  bottom: -60px;
  background: rgba(251, 191, 36, 0.22);
}

.guest-thanks-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
}

.guest-thanks-card {
  text-align: center;
  padding: 2rem 1.5rem 1.75rem;
  border-radius: calc(var(--r) + 6px);
  background:
    radial-gradient(900px 280px at 50% 0%, rgba(139, 92, 246, 0.16), transparent 55%),
    linear-gradient(165deg, rgba(26, 26, 46, 0.96), rgba(14, 14, 26, 0.98));
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.guest-thanks-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 1.65rem;
  font-weight: 700;
  color: #ecfdf5;
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.35), rgba(34, 211, 238, 0.2));
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 8px 28px rgba(52, 211, 153, 0.22);
}

.guest-thanks-kicker {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.guest-thanks-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  color: #f8fafc;
}

.guest-thanks-body {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.guest-thanks-contacts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.guest-thanks-contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.guest-thanks-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.55), rgba(34, 211, 238, 0.25));
  border: 1px solid rgba(167, 139, 250, 0.45);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.guest-thanks-support-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.32);
}

.guest-thanks-at {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.9;
  color: #e9d5ff;
}


/* --- SmartAdmin rent hub (premium) --- */
.bot-panel.rent-hub.is-active {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.bot-panel.rent-hub:not(.is-active),
.bot-panel.rent-hub[hidden] {
  display: none !important;
}

.rent-hero {
  position: relative;
  padding: 1.35rem 1.45rem 1.2rem;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(124, 58, 237, 0.22), transparent 58%),
    radial-gradient(700px 240px at 100% 100%, rgba(8, 145, 178, 0.14), transparent 52%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.04), transparent 42%),
    rgba(8, 10, 22, 0.92);
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.rent-hero-glow {
  position: absolute;
  inset: -40% -10% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28) 0%, transparent 68%);
  pointer-events: none;
}

.rent-hero-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rent-hero-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.rent-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  font-size: 1.45rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(124, 58, 237, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.18);
}

.rent-hero-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.rent-hero-sub {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.72);
  max-width: 36rem;
  line-height: 1.45;
}

.rent-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.rent-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.rent-pill--ok {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.35);
}

.rent-pill--warn {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.32);
}

.rent-pill--muted {
  color: rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.rent-stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.rent-stat-card {
  position: relative;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.rent-stat-card:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.35);
}

.rent-stat-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, transparent 48%);
  pointer-events: none;
}

.rent-stat-body {
  position: relative;
  z-index: 1;
}

.rent-stat-card--rent { border-color: rgba(96, 165, 250, 0.28); }
.rent-stat-card--imei { border-color: rgba(167, 139, 250, 0.28); }
.rent-stat-card--server { border-color: rgba(34, 211, 238, 0.22); }
.rent-stat-card--total { border-color: rgba(251, 191, 36, 0.25); }

.rent-stat-k {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 0.3rem;
}

.rent-stat-v {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f1f5f9;
  line-height: 1.1;
}

.rent-stat-sub {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.62rem;
  line-height: 1.35;
  color: rgba(148, 163, 184, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rent-stat-card--orders { border-color: rgba(167, 139, 250, 0.28); }
.rent-stat-card--revenue { border-color: rgba(52, 211, 153, 0.28); }
.rent-stat-card--fulfill { border-color: rgba(56, 189, 248, 0.25); }
.rent-stat-card--rate { border-color: rgba(251, 191, 36, 0.25); }
.rent-stat-card--revenue .rent-stat-v { color: #6ee7b7; }
.rent-stat-card--orders .rent-stat-v { color: #c4b5fd; }
.rent-stat-card--fulfill .rent-stat-v { color: #7dd3fc; }
.rent-stat-card--rate .rent-stat-v { color: #fcd34d; font-size: 1.15rem; }

.rent-panel {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 22px;
  background:
    radial-gradient(520px 180px at 0% 0%, rgba(124, 58, 237, 0.1), transparent 58%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 55%),
    rgba(8, 10, 22, 0.82);
  border: 1px solid rgba(167, 139, 250, 0.18);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.rent-panel-glow {
  position: absolute;
  inset: -35% auto auto -8%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, transparent 68%);
  pointer-events: none;
}

.rent-panel--premium > .rent-panel-head,
.rent-panel--premium > .rent-muted,
.rent-panel--premium > .rent-pager {
  position: relative;
  z-index: 2;
}

.rent-panel--premium > .rent-fields-grid,
.rent-panel--premium > .rent-actions-grid,
.rent-panel--premium > .rent-catalog-toolbar,
.rent-panel--premium > .rent-history-toolbar {
  position: relative;
  z-index: 40;
}

.rent-panel--premium > .rent-table-shell,
.rent-panel--premium > .rent-history-layout {
  position: relative;
  z-index: 1;
}

.rent-panel-head {
  margin-bottom: 1rem;
}

.rent-panel-kicker {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a78bfa;
}

.rent-panel--history .rent-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rent-panel-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.rent-panel-desc {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.95);
  max-width: 42rem;
}

.rent-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rent-field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  padding: 0.65rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rent-field:focus-within {
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(124, 58, 237, 0.06);
}

.rent-field-label {
  font-size: 0.62rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.95);
}

.rent-field-input {
  width: 100%;
  padding: 0.58rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rent-field-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.rent-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.rent-actions-grid--main {
  margin-top: 0.15rem;
}

.rent-actions-grid--orders {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  margin-bottom: 0.65rem;
}

.rent-purge-meta {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.88);
}

.rent-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: #e2e8f0;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.rent-action-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.14), transparent 68%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.rent-action-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}

.rent-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 12px;
  font-size: 1.1rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rent-action-label {
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.rent-action-btn--premium:hover:not(:disabled) {
  transform: translateY(-2px);
}

.rent-action-btn--premium:hover:not(:disabled) .rent-action-glow {
  opacity: 1;
}

.rent-action-btn--primary {
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.55), rgba(124, 58, 237, 0.48));
  color: #fff;
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.24);
}

.rent-action-btn--primary .rent-action-icon {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}

.rent-action-btn--sync {
  border-color: rgba(34, 211, 238, 0.38);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(59, 130, 246, 0.18));
  color: #cffafe;
  box-shadow: 0 10px 28px rgba(8, 145, 178, 0.18);
}

.rent-action-btn--sync .rent-action-icon {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.28);
}

.rent-action-btn--calc {
  border-color: rgba(251, 191, 36, 0.38);
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.32), rgba(124, 58, 237, 0.14));
  color: #fde68a;
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.16);
}

.rent-action-btn--calc .rent-action-icon {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
}

.rent-action-btn--ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.rent-action-btn--ghost .rent-action-icon {
  background: rgba(255, 255, 255, 0.05);
}

.rent-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.rent-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 40;
}

.rent-catalog-toolbar--premium {
  flex-direction: column;
  gap: 0;
  padding: 0.72rem;
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(124, 58, 237, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(124, 58, 237, 0.05), rgba(0, 0, 0, 0.2)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 28px rgba(0, 0, 0, 0.14);
  overflow: visible;
}

.rent-catalog-toolbar-main {
  display: grid;
  grid-template-columns: minmax(9.75rem, 11.5rem) minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
}

.rent-toolbar-cat {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.rent-toolbar-select-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.rent-toolbar-select-wrap .sf-select,
.rent-toolbar-select-wrap .sf-dd,
.rent-toolbar-select-wrap .sf-dd-trigger {
  height: 100%;
  min-height: 2.75rem;
}

.rent-toolbar-select-wrap .sf-select,
.rent-toolbar-select-wrap .sf-dd-trigger {
  display: flex;
  align-items: center;
  border-radius: 14px;
  border-color: rgba(167, 139, 250, 0.24);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.1), rgba(0, 0, 0, 0.38)),
    rgba(8, 8, 18, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.rent-toolbar-select-wrap .sf-dd.is-open .sf-dd-trigger,
.rent-toolbar-select-wrap .sf-select:focus {
  border-color: rgba(196, 181, 253, 0.48);
  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rent-catalog-search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  display: flex;
  align-items: stretch;
}

.rent-catalog-toolbar--premium .rsf-box {
  flex: 1;
  min-height: 2.75rem;
  height: 100%;
  border-radius: 14px;
  padding-right: 0.28rem;
}

.rent-catalog-toolbar--premium .rsf-go {
  align-self: center;
  margin: 0.22rem 0;
  min-height: 2.15rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 11px;
  border-left: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.72), rgba(124, 58, 237, 0.62));
  box-shadow:
    0 6px 16px rgba(99, 102, 241, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.rent-catalog-toolbar--premium .rsf-go:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.rent-catalog-toolbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-top: 0.52rem;
  padding-top: 0.48rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rent-toolbar-bulk--premium {
  display: grid;
  grid-template-columns: repeat(2, minmax(5.5rem, 1fr));
  gap: 0.45rem;
  align-self: stretch;
}

.rent-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rent-toolbar-btn:hover {
  transform: translateY(-1px);
}

.rent-toolbar-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rent-toolbar-btn--ok {
  border-color: rgba(74, 222, 128, 0.32);
  color: #bbf7d0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(0, 0, 0, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rent-toolbar-btn--ok .rent-toolbar-btn-icon {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.28);
  color: #86efac;
}

.rent-toolbar-btn--ok:hover {
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.14);
}

.rent-toolbar-btn--warn {
  border-color: rgba(248, 113, 113, 0.32);
  color: #fecaca;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.14), rgba(0, 0, 0, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rent-toolbar-btn--warn .rent-toolbar-btn-icon {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}

.rent-toolbar-btn--warn:hover {
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: 0 8px 22px rgba(248, 113, 113, 0.12);
}

.rent-panel--settings .rent-fields-grid {
  position: relative;
  z-index: 35;
}

.rent-panel--settings:has(.sf-dd.is-open),
.rent-panel--catalog:has(.sf-dd.is-open),
.rent-panel--history:has(.sf-dd.is-open) {
  z-index: 50;
  overflow: visible;
}

.rent-panel--catalog:has(.sf-dd.is-open) .rent-table-shell,
.rent-panel--history:has(.sf-dd.is-open) .rent-history-layout {
  z-index: 0;
}

.rent-panel--catalog:has(.sf-dd.is-open) .rent-table-shell {
  opacity: 0.88;
  filter: saturate(0.92);
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.bot-panel.rent-hub .sf-dd.is-open {
  z-index: 450;
}

.bot-panel.rent-hub .sf-dd-menu {
  z-index: 500;
  background:
    linear-gradient(180deg, rgba(22, 20, 40, 0.99), rgba(10, 10, 20, 0.99));
  backdrop-filter: blur(14px);
  border: 1px solid rgba(167, 139, 250, 0.48);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 24px rgba(124, 58, 237, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.55) transparent;
}

.bot-panel.rent-hub .sf-dd-menu::-webkit-scrollbar {
  width: 6px;
}

.bot-panel.rent-hub .sf-dd-menu::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.55);
  border-radius: 999px;
}

.bot-panel.rent-hub .sf-dd-item {
  padding: 0.52rem 0.65rem;
  border-radius: 10px;
  font-weight: 550;
}

.bot-panel.rent-hub .sf-dd-item.is-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.38), rgba(34, 211, 238, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rent-select-wrap {
  position: relative;
  z-index: 1;
}

.rent-select-wrap:has(.sf-dd.is-open) {
  z-index: 460;
}

.rent-history-filters .rent-select-wrap,
.rent-catalog-toolbar .rent-toolbar-select-wrap,
.rent-panel--settings .sf-select-wrap {
  z-index: 2;
}

.rent-history-filters .rent-select-wrap:has(.sf-dd.is-open),
.rent-catalog-toolbar .rent-toolbar-select-wrap:has(.sf-dd.is-open),
.rent-panel--settings .sf-select-wrap:has(.sf-dd.is-open) {
  z-index: 480;
}

.rent-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  min-width: min(100%, 20rem);
}

.rent-toolbar-select {
  min-width: 9.5rem;
  padding: 0.58rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.32);
  color: inherit;
  font-size: 0.82rem;
}

.rent-search-wrap {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: min(100%, 14rem);
  max-width: 28rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.32);
}

/* Premium search field (catalog + history) */
.rsf {
  flex: 1 1 16rem;
  min-width: min(100%, 14rem);
  max-width: 34rem;
}

.rsf--wide {
  flex: 1 1 100%;
  max-width: none;
  width: 100%;
}

.rsf-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 2.65rem;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(0, 0, 0, 0.42)),
    rgba(8, 8, 18, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.rsf.is-active .rsf-box,
.rsf-box:focus-within {
  border-color: rgba(196, 181, 253, 0.55);
  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(124, 58, 237, 0.12);
}

.rsf-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  flex: 0 0 2.65rem;
  color: rgba(196, 181, 253, 0.88);
}

.rsf-ico svg {
  width: 1rem;
  height: 1rem;
}

.rsf-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.65rem 0.35rem 0.65rem 0;
}

.rsf-input::placeholder {
  color: rgba(148, 163, 184, 0.72);
  font-weight: 500;
}

.rsf-input:focus {
  outline: none;
}

.rsf-input::-webkit-search-cancel-button,
.rsf-input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.rsf-clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  margin-right: 0.15rem;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 240, 0.88);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.rsf-clear svg {
  width: 0.82rem;
  height: 0.82rem;
}

.rsf-clear:hover {
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

.rsf-go {
  flex: 0 0 auto;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.22));
  color: #f5f3ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0 1rem;
  cursor: pointer;
  transition: filter 0.14s ease, background 0.14s ease;
}

.rsf-go:hover {
  filter: brightness(1.08);
}

.rsf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0 0.15rem;
}

.rsf-hint {
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.88);
  line-height: 1.35;
}

.rsf-chip {
  flex: 0 1 auto;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
  font-size: 0.62rem;
  font-weight: 700;
}

.rsf-chip::before {
  content: "🔎 ";
}

.rent-search-input {
  flex: 1;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.58rem 0.75rem;
  font-size: 0.82rem;
  min-width: 0;
}

.rent-search-input:focus { outline: none; }

.rent-search-btn {
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(124, 58, 237, 0.22);
  color: #e9d5ff;
  padding: 0 0.85rem;
  font-size: 1rem;
  cursor: pointer;
}

.rent-toolbar-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.rent-chip-btn {
  position: relative;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rent-chip-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.32);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.rent-chip-btn--ok {
  border-color: rgba(74, 222, 128, 0.38);
  color: #bbf7d0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.12);
}

.rent-chip-btn--warn {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.14), rgba(127, 29, 29, 0.12));
  box-shadow: 0 6px 18px rgba(248, 113, 113, 0.1);
}

.rent-table-shell {
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.06), transparent 28%),
    rgba(0, 0, 0, 0.28);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
}

.rent-table-wrap {
  overflow: auto;
  max-height: min(52vh, 520px);
}

.rent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rent-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(15, 16, 28, 0.96);
}

.rent-table th,
.rent-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
  text-align: left;
}

.rent-table th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.95);
  font-weight: 700;
}

.rent-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.06);
}

.rent-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(15, 16, 28, 0.98);
  backdrop-filter: blur(8px);
}

.rent-table tbody tr {
  transition: background 0.12s ease;
}

.rent-table tbody tr:has(.rent-check-input:checked) {
  background: rgba(124, 58, 237, 0.08);
}

.rent-col-check {
  width: 2.6rem;
  text-align: center;
}

.rent-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  vertical-align: middle;
}

.rent-check-head .rent-check-ui {
  width: 1.05rem;
  height: 1.05rem;
}

.rent-check-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.rent-check-ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 7px;
  border: 1px solid rgba(167, 139, 250, 0.42);
  background:
    linear-gradient(180deg, rgba(34, 31, 58, 0.95), rgba(12, 12, 24, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.rent-check:hover .rent-check-ui {
  border-color: rgba(196, 181, 253, 0.65);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rent-check-input:focus-visible + .rent-check-ui {
  outline: none;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.45);
}

.rent-check-input:checked + .rent-check-ui {
  border-color: rgba(167, 139, 250, 0.75);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.92), rgba(34, 211, 238, 0.38));
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: scale(1.02);
}

.rent-check-input:checked + .rent-check-ui::after {
  content: "";
  width: 0.32rem;
  height: 0.58rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.rent-col-actions {
  width: 8.75rem;
  white-space: nowrap;
  text-align: center;
}

.rent-col-usd {
  text-align: right;
  white-space: nowrap;
}

.rent-usd-val {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.82rem;
  color: #e2e8f0;
  letter-spacing: 0.01em;
}

.rent-usd-unit {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.72);
}

.rent-table th:nth-child(6),
.rent-table th:nth-child(7),
.rent-table th.rent-col-actions {
  text-align: center;
}

.rent-table td.rent-col-usd,
.rent-table td.rent-price-cell {
  text-align: right;
}

.rent-empty {
  padding: 2.5rem 1rem !important;
  text-align: center;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.88rem;
}

.rent-price-cell {
  min-width: 8.5rem;
}

.rent-price-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 6.75rem;
}

.rent-price-inner {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 5.75rem;
  padding: 0.1rem 0.55rem 0.1rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.1), rgba(8, 8, 18, 0.55)),
    rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 22px rgba(0, 0, 0, 0.18);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.rent-price-field:focus-within .rent-price-inner {
  border-color: rgba(196, 181, 253, 0.62);
  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 28px rgba(124, 58, 237, 0.12);
  transform: translateY(-1px);
}

.rent-price-field.is-dirty .rent-price-inner {
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow:
    0 0 0 3px rgba(250, 204, 21, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rent-price-field.is-locked .rent-price-inner {
  border-color: rgba(34, 211, 238, 0.35);
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.12), rgba(8, 8, 18, 0.55)),
    rgba(0, 0, 0, 0.35);
}

.rent-price-input {
  width: 100%;
  min-width: 3.2rem;
  max-width: 5.5rem;
  padding: 0.42rem 0.25rem 0.42rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
  appearance: textfield;
  -moz-appearance: textfield;
}

.rent-price-input::-webkit-outer-spin-button,
.rent-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rent-price-input:focus {
  outline: none;
}

.rent-price-suffix {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(196, 181, 253, 0.92);
  padding-left: 0.15rem;
}

.rent-price-lock-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.35), rgba(15, 23, 42, 0.95));
  color: #a5f3fc;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.22);
}

.rent-price-lock-badge .rent-act-ico {
  width: 0.62rem;
  height: 0.62rem;
}

.rent-act-group {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.22rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.22)),
    rgba(10, 10, 20, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.rent-table tbody tr:hover .rent-act-group {
  border-color: rgba(167, 139, 250, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(124, 58, 237, 0.12);
}

.rent-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(226, 232, 240, 0.88);
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.rent-act-ico {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
}

.rent-act-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rent-act:hover {
  transform: translateY(-1px);
}

.rent-act:active {
  transform: translateY(0) scale(0.96);
}

.rent-act--save {
  color: #ddd6fe;
}

.rent-act--save:hover,
.rent-act--save.is-ready {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.22));
  color: #fff;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.28);
}

.rent-act--save.is-ready {
  animation: rent-save-pulse 1.6s ease-in-out infinite;
}

@keyframes rent-save-pulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(124, 58, 237, 0.22); }
  50% { box-shadow: 0 8px 22px rgba(167, 139, 250, 0.42); }
}

.rent-act--toggle.is-on {
  color: #fecaca;
}

.rent-act--toggle.is-on:hover {
  background: rgba(248, 113, 113, 0.16);
  color: #fff;
  box-shadow: 0 8px 18px rgba(248, 113, 113, 0.16);
}

.rent-act--toggle.is-off {
  color: #86efac;
}

.rent-act--toggle.is-off:hover {
  background: rgba(34, 197, 94, 0.16);
  color: #fff;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.16);
}

.rent-act--reset {
  color: #a5f3fc;
}

.rent-act--reset:hover {
  background: rgba(8, 145, 178, 0.18);
  color: #fff;
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.18);
}

/* legacy mini buttons — kept for compatibility */
.rent-row-actions {
  display: inline-flex;
  gap: 0.32rem;
  align-items: center;
}

.rent-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  min-height: 1.85rem;
  padding: 0.28rem 0.5rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.rent-mini-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.rent-mini-btn--save {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(124, 58, 237, 0.16);
  color: #e9d5ff;
}

.rent-mini-btn--save:hover {
  background: rgba(124, 58, 237, 0.28);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.18);
}

.rent-mini-btn--toggle {
  border-color: rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 0.64rem;
  min-width: auto;
  padding-inline: 0.55rem;
}

.rent-mini-btn--reset {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(8, 145, 178, 0.12);
  color: #a5f3fc;
}

.rent-mini-btn--reset:hover {
  background: rgba(8, 145, 178, 0.22);
}

.rent-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.rent-badge--on {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.rent-badge--off {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.rent-badge--refund {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.rent-cat {
  font-size: 0.68rem;
  opacity: 0.85;
  color: #cbd5e1;
}

.rent-service-name {
  font-weight: 650;
  color: #f1f5f9;
}

.rent-service-id {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.9);
}

.rent-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.rent-pager-btn {
  min-width: 7.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(0, 0, 0, 0.22));
  color: #e2e8f0;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.rent-pager-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.38);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.16);
}

.rent-pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rent-pager-info {
  font-size: 0.76rem;
  color: rgba(148, 163, 184, 0.95);
  min-width: 6rem;
  text-align: center;
}

.rent-admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  background: rgba(15, 16, 28, 0.97);
  border: 1px solid rgba(124, 92, 255, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  max-width: min(420px, 92vw);
  font-size: 0.84rem;
}

.rent-admin-toast.is-ok { border-color: rgba(34, 197, 94, 0.5); }
.rent-admin-toast.is-err { border-color: rgba(248, 113, 113, 0.5); }

.rent-subnav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.85rem 0 0.85rem;
  padding: 0.45rem;
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  background:
    radial-gradient(480px 120px at 0% 0%, rgba(124, 58, 237, 0.1), transparent 55%),
    rgba(0, 0, 0, 0.24);
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rent-subnav-btn {
  position: relative;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(148, 163, 184, 0.95);
  border-radius: 14px;
  padding: 0.72rem 0.95rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.rent-subnav-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 68%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.rent-subnav-inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.rent-subnav-btn-premium:hover {
  transform: translateY(-1px);
  color: #e2e8f0;
  border-color: rgba(167, 139, 250, 0.24);
}

.rent-subnav-btn-premium:hover .rent-subnav-glow {
  opacity: 0.55;
}

.rent-subnav-btn.is-active {
  color: #f8fafc;
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.42), rgba(124, 58, 237, 0.38));
  box-shadow:
    0 10px 28px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.rent-subnav-btn.is-active .rent-subnav-glow {
  opacity: 1;
}

.rent-subnav-icon { font-size: 0.95rem; line-height: 1; }

.rent-subnav-badge {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rent-view[hidden] { display: none !important; }

.rent-select-wrap { min-width: 10.5rem; }
.rent-select-wrap--sm { min-width: 8.5rem; max-width: 11rem; }
.rent-panel--settings .sf-select-wrap,
.rent-panel--settings .sf-dd { width: 100%; }

.rent-table-wrap.sf-scroll,
.rent-history-scroll,
.rent-order-detail-body,
.rent-order-logs,
.rod-scroll,
.rod-timeline,
.rod-result-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.55) rgba(255, 255, 255, 0.04);
}

.rent-table-wrap.sf-scroll::-webkit-scrollbar,
.rent-history-scroll::-webkit-scrollbar,
.rent-order-detail-body::-webkit-scrollbar,
.rent-order-logs::-webkit-scrollbar,
.rod-scroll::-webkit-scrollbar,
.rod-timeline::-webkit-scrollbar,
.rod-result-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.rent-table-wrap.sf-scroll::-webkit-scrollbar-thumb,
.rent-history-scroll::-webkit-scrollbar-thumb,
.rent-order-detail-body::-webkit-scrollbar-thumb,
.rent-order-logs::-webkit-scrollbar-thumb,
.rod-scroll::-webkit-scrollbar-thumb,
.rod-timeline::-webkit-scrollbar-thumb,
.rod-result-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.75), rgba(124, 58, 237, 0.55));
  border-radius: 999px;
  border: 2px solid rgba(15, 16, 28, 0.85);
}

.rent-badge--warn {
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.rent-muted {
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.76rem;
}

.rent-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.65rem;
  position: relative;
  z-index: 40;
}

.rent-history-toolbar--premium {
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.06), rgba(0, 0, 0, 0.18)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
}

.rent-history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.rent-history-search { flex: 1 1 220px; max-width: none; }

.rent-history-head-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rent-chip-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.rent-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.rent-history-table-shell { min-height: 18rem; }
.rent-history-scroll { max-height: min(56vh, 560px); }
.rent-order-row { cursor: pointer; transition: background 0.12s ease; }
.rent-order-row.is-active {
  background: rgba(124, 58, 237, 0.12) !important;
  box-shadow: inset 3px 0 0 rgba(167, 139, 250, 0.85);
}

.rent-order-time {
  display: block;
  font-size: 0.72rem;
  color: rgba(203, 213, 225, 0.95);
  white-space: nowrap;
}

.rent-tg-id,
.rent-acc-id {
  display: inline-block;
  margin-top: 0.12rem;
  font-size: 0.64rem;
  color: #93c5fd;
}

.rent-result-preview {
  display: block;
  margin-top: 0.18rem;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.64rem;
  line-height: 1.3;
}

.rent-col-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}

.rent-badge--cat {
  background: rgba(124, 58, 237, 0.14);
  color: #ddd6fe;
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.rent-history-layout:has(.rent-order-detail:not([hidden])) {
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.92fr);
}

.rent-order-detail.rod {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(124, 58, 237, 0.16), transparent 58%),
    radial-gradient(420px 180px at 0% 100%, rgba(34, 211, 238, 0.08), transparent 55%),
    rgba(8, 8, 18, 0.82);
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(68vh, 680px);
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rod-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent 42%, rgba(34, 211, 238, 0.05));
}

.rod-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 16, 28, 0.55);
  backdrop-filter: blur(10px);
}

.rod-kicker {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
  margin-bottom: 0.28rem;
}

.rod-order-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  color: #f8fafc;
}

.rod-head-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.rod-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.rod-close svg {
  width: 0.95rem;
  height: 0.95rem;
}

.rod-close:hover {
  transform: translateY(-1px);
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fecaca;
}

.rod-scroll {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rod-detail-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rod-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.rod-stat {
  padding: 0.62rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rod-stat-k {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.25rem;
}

.rod-stat-v {
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.25;
}

.rod-stat-v--money { color: #86efac; }

.rod-stat-v--sm {
  font-size: 0.72rem;
  font-weight: 650;
  color: rgba(226, 232, 240, 0.95);
}

.rod-info-card,
.rod-result-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  padding: 0.7rem 0.75rem;
}

.rod-info-card--mono {
  border-color: rgba(167, 139, 250, 0.18);
  background: rgba(124, 58, 237, 0.06);
}

.rod-info-card--note {
  border-color: rgba(251, 191, 36, 0.18);
  background: rgba(251, 191, 36, 0.05);
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.95);
}

.rod-info-head,
.rod-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.rod-info-title,
.rod-result-title {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.92);
}

.rod-client-line {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: baseline;
  padding: 0.22rem 0;
  font-size: 0.76rem;
}

.rod-client-k {
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rod-client-v {
  color: #e2e8f0;
  word-break: break-word;
}

.rod-mono-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0;
}

.rod-mono-k {
  flex: 0 0 3.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(148, 163, 184, 0.9);
}

.rod-mono-v {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.68rem;
  color: #c4b5fd;
  word-break: break-all;
}

.rod-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.9);
  cursor: pointer;
  transition: background 0.14s ease, transform 0.14s ease, color 0.14s ease;
}

.rod-copy svg {
  width: 0.82rem;
  height: 0.82rem;
}

.rod-copy:hover {
  background: rgba(124, 58, 237, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

.rod-result-card.is-filled {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.07);
}

.rod-result-card.is-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
}

.rod-result-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #ecfdf5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-height: 8rem;
  overflow: auto;
}

.rod-empty-note {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.92);
}

.rod-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rod-card--fulfill {
  border-color: rgba(124, 58, 237, 0.22);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(0, 0, 0, 0.12)),
    rgba(255, 255, 255, 0.02);
}

.rod-card--logs {
  border-color: rgba(34, 211, 238, 0.16);
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.06), rgba(0, 0, 0, 0.12)),
    rgba(255, 255, 255, 0.02);
}

.rod-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.rod-card-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f5f3ff;
}

.rod-card-desc {
  margin: 0.22rem 0 0;
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.92);
  line-height: 1.35;
}

.rod-card-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
}

.rod-card-icon svg {
  width: 1rem;
  height: 1rem;
}

.rod-log-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(8, 145, 178, 0.14);
  color: #a5f3fc;
  font-size: 0.72rem;
  font-weight: 800;
}

.rod-fulfill-grid {
  display: grid;
  gap: 0.65rem;
}

.rod-switch {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.rod-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.rod-switch-ui {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.9);
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.rod-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: transform 0.18s ease, background 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.rod-switch-input:checked + .rod-switch-ui {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(74, 222, 128, 0.45);
}

.rod-switch-input:checked + .rod-switch-ui::after {
  transform: translateX(1rem);
  background: #86efac;
}

.rod-switch-text {
  display: grid;
  gap: 0.08rem;
}

.rod-switch-text strong {
  font-size: 0.76rem;
  font-weight: 700;
  color: #e2e8f0;
}

.rod-switch-text small {
  font-size: 0.64rem;
  color: rgba(148, 163, 184, 0.92);
}

.rod-field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.9);
}

.rod-status-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.rod-pill {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.48rem 0.35rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.rod-pill:hover { transform: translateY(-1px); }

.rod-pill.is-active { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }

.rod-pill--ok.is-active {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.rod-pill--wait.is-active {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
}

.rod-pill--err.is-active {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.rod-textarea {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  padding: 0.72rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.32);
  color: #f8fafc;
  font-size: 0.8rem;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rod-textarea:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

.rod-field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.88);
}

.rod-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(34, 211, 238, 0.55));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.28);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.rod-save-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
}

.rod-save-icon svg {
  width: 100%;
  height: 100%;
}

.rod-save-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.34);
}

.rod-save-btn:active { transform: translateY(0); }

.rod-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 14rem;
  overflow: auto;
  padding-right: 0.15rem;
}

.rod-timeline-empty {
  padding: 1rem 0.75rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.92);
  text-align: center;
}

.rod-timeline-empty.is-err {
  border-color: rgba(248, 113, 113, 0.28);
  color: #fecaca;
}

.rod-log {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.55rem;
}

.rod-log-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.rod-log-rail::after {
  content: "";
  position: absolute;
  top: 1.1rem;
  bottom: -0.55rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.rod-log:last-child .rod-log-rail::after { display: none; }

.rod-log-dot {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.rod-log.is-latest .rod-log-dot {
  border-color: rgba(167, 139, 250, 0.75);
  background: linear-gradient(180deg, #a78bfa, #7c3aed);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
}

.rod-log--ok .rod-log-dot { border-color: rgba(74, 222, 128, 0.55); background: rgba(34, 197, 94, 0.35); }
.rod-log--wait .rod-log-dot { border-color: rgba(251, 191, 36, 0.55); background: rgba(251, 191, 36, 0.25); }
.rod-log--err .rod-log-dot { border-color: rgba(248, 113, 113, 0.55); background: rgba(248, 113, 113, 0.25); }
.rod-log--edit .rod-log-dot { border-color: rgba(167, 139, 250, 0.55); background: rgba(124, 58, 237, 0.25); }

.rod-log-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  padding: 0.55rem 0.65rem;
}

.rod-log.is-latest .rod-log-card {
  border-color: rgba(167, 139, 250, 0.22);
  background: rgba(124, 58, 237, 0.08);
}

.rod-log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.rod-log-head strong {
  font-size: 0.74rem;
  color: #f1f5f9;
}

.rod-log-head time {
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.92);
  white-space: nowrap;
}

.rod-log-admin {
  font-size: 0.64rem;
  color: #93c5fd;
  margin-bottom: 0.18rem;
}

.rod-log-detail {
  font-size: 0.68rem;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rod-log-tag {
  display: inline-block;
  margin-top: 0.28rem;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.rod-card--danger {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.05);
}

.rod-danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.rod-danger-btn svg {
  width: 0.95rem;
  height: 0.95rem;
}

.rod-danger-btn:hover {
  background: rgba(248, 113, 113, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(248, 113, 113, 0.12);
}

.rent-order-detail {
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(124, 58, 237, 0.12), transparent 62%),
    rgba(0, 0, 0, 0.28);
  padding: 0.75rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(62vh, 620px);
}

.rent-order-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rent-order-detail-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #f5f3ff;
}

.rent-order-detail-close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.rent-order-detail-body { overflow: auto; max-height: 14rem; }

.rent-order-kv { display: grid; gap: 0.35rem; }

.rent-order-kv-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.45rem;
  font-size: 0.74rem;
  align-items: start;
}

.rent-order-kv-row span:first-child {
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rent-order-kv-row code {
  font-size: 0.68rem;
  word-break: break-all;
  color: #c4b5fd;
}

.rent-order-result-box {
  margin-top: 0.35rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.08);
}

.rent-order-result-box.is-empty {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.rent-order-result-k {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(134, 239, 172, 0.9);
  margin-bottom: 0.35rem;
}

.rent-order-result-v {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #ecfdf5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rent-order-note { font-size: 0.72rem; color: rgba(203, 213, 225, 0.95); }

.rent-order-fulfill {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rent-order-fulfill-title,
.rent-order-logs-title {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b5fd;
}

.rent-order-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: rgba(203, 213, 225, 0.95);
}

.rent-action-btn--compact {
  padding: 0.45rem 0.75rem;
  font-size: 0.74rem;
}

.rent-order-logs {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 9rem;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}

.rent-order-log-item {
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
}

.rent-order-log-top {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  align-items: baseline;
}

.rent-order-log-top time {
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.95);
  white-space: nowrap;
}

.rent-order-log-admin {
  margin-top: 0.15rem;
  color: #a5b4fc;
  font-size: 0.64rem;
}

.rent-order-log-detail {
  margin-top: 0.2rem;
  color: rgba(203, 213, 225, 0.92);
  line-height: 1.35;
  word-break: break-word;
}

@media (max-width: 900px) {
  .rent-stats-grid,
  .rent-stats-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rent-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rent-history-layout:has(.rent-order-detail:not([hidden])) {
    grid-template-columns: 1fr;
  }
  .rent-catalog-toolbar-main {
    grid-template-columns: minmax(8.5rem, 10rem) minmax(0, 1fr);
  }
  .rent-toolbar-bulk--premium {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .rent-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .rent-hero-head { flex-direction: column; }
  .rent-hero-badges { justify-content: flex-start; }
  .rent-stats-grid { grid-template-columns: 1fr 1fr; }
  .rent-fields-grid { grid-template-columns: 1fr; }
  .rent-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rent-catalog-toolbar-main {
    grid-template-columns: 1fr;
  }
  .rent-toolbar-bulk--premium {
    grid-column: auto;
  }
  .rent-catalog-toolbar-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .rent-history-toolbar { flex-direction: column; align-items: stretch; }
  .rent-toolbar-filters { flex-direction: column; align-items: stretch; }
  .rent-search-wrap { max-width: none; }
}

/* --- DESK/VMP PREMIUM (remote_snapshot) --- */
.desk-pc-list,
.vmp-library-body,
.gen-log-list,
.desk-modal-body,
.desk-keygen-table-wrap,
.desk-lic-table-wrap,
.vmp-library-table-wrap,
.log-section-side,
.admin-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.55) rgba(255, 255, 255, 0.04);
}

.sf-scroll::-webkit-scrollbar,
.desk-pc-list::-webkit-scrollbar,
.vmp-library-body::-webkit-scrollbar,
.gen-log-list::-webkit-scrollbar,
.desk-modal-body::-webkit-scrollbar,
.desk-keygen-table-wrap::-webkit-scrollbar,
.desk-lic-table-wrap::-webkit-scrollbar,
.vmp-library-table-wrap::-webkit-scrollbar,
.log-section-side::-webkit-scrollbar,
.admin-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.sf-scroll::-webkit-scrollbar-track,
.desk-pc-list::-webkit-scrollbar-track,
.vmp-library-body::-webkit-scrollbar-track,
.gen-log-list::-webkit-scrollbar-track,
.desk-modal-body::-webkit-scrollbar-track,
.desk-keygen-table-wrap::-webkit-scrollbar-track,
.desk-lic-table-wrap::-webkit-scrollbar-track,
.vmp-library-table-wrap::-webkit-scrollbar-track,
.log-section-side::-webkit-scrollbar-track,
.admin-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  margin: 6px 2px;
}

.sf-scroll::-webkit-scrollbar-thumb,
.desk-pc-list::-webkit-scrollbar-thumb,
.vmp-library-body::-webkit-scrollbar-thumb,
.gen-log-list::-webkit-scrollbar-thumb,
.desk-modal-body::-webkit-scrollbar-thumb,
.desk-keygen-table-wrap::-webkit-scrollbar-thumb,
.desk-lic-table-wrap::-webkit-scrollbar-thumb,
.vmp-library-table-wrap::-webkit-scrollbar-thumb,
.log-section-side::-webkit-scrollbar-thumb,
.admin-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  background-image: linear-gradient(180deg, rgba(167, 139, 250, 0.75), rgba(244, 114, 182, 0.55));
}

.sf-scroll::-webkit-scrollbar-thumb:hover,
.desk-pc-list::-webkit-scrollbar-thumb:hover,
.vmp-library-body::-webkit-scrollbar-thumb:hover,
.gen-log-list::-webkit-scrollbar-thumb:hover,
.desk-modal-body::-webkit-scrollbar-thumb:hover,
.desk-keygen-table-wrap::-webkit-scrollbar-thumb:hover,
.desk-lic-table-wrap::-webkit-scrollbar-thumb:hover,
.vmp-library-table-wrap::-webkit-scrollbar-thumb:hover,
.log-section-side::-webkit-scrollbar-thumb:hover,
.admin-scroll::-webkit-scrollbar-thumb:hover {
  background-image: linear-gradient(180deg, rgba(196, 181, 253, 0.9), rgba(251, 113, 133, 0.7));
}

.sf-scroll::-webkit-scrollbar-corner,
.desk-pc-list::-webkit-scrollbar-corner,
.vmp-library-body::-webkit-scrollbar-corner,
.gen-log-list::-webkit-scrollbar-corner,
.desk-modal-body::-webkit-scrollbar-corner {
  background: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 50% -15%, rgba(124, 58, 237, 0.22), transparent 62%),
    radial-gradient(ellipse 45% 35% at 92% 88%, rgba(91, 33, 182, 0.14), transparent 68%),
    radial-gradient(ellipse 38% 28% at 8% 72%, rgba(34, 211, 238, 0.06), transparent 70%),
    linear-gradient(180deg, #05050c 0%, #0a0814 45%, #07070f 100%);
  pointer-events: none;
}

.app-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  animation: pulse 0.9s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-dot { animation: none; opacity: 0.7; }
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
}

.screen.is-off {
  display: none !important;
}

/* ── Login minimal (premium) ── */
.login-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
}

.login-orb-a {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55), rgba(91, 33, 182, 0.08) 68%);
}

.login-orb-b {
  width: min(280px, 45vw);
  height: min(280px, 45vw);
  bottom: 8%;
  right: -8%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
}

.login-orb-c {
  width: min(220px, 38vw);
  height: min(220px, 38vw);
  bottom: 18%;
  left: -6%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 72%);
}

.login-minimal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: max(1.5rem, var(--safe-t)) max(1.25rem, var(--safe-r)) max(1.5rem, var(--safe-b)) max(1.25rem, var(--safe-l));
}

.login-minimal-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 2rem 1.85rem 1.75rem;
  border-radius: 24px;
  background:
    linear-gradient(165deg, rgba(22, 18, 38, 0.94), rgba(10, 10, 18, 0.97));
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.login-minimal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.55), rgba(124, 58, 237, 0.15), rgba(34, 211, 238, 0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-minimal-shine {
  position: absolute;
  inset: -40% -20% auto;
  height: 55%;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139, 92, 246, 0.16), transparent 72%);
  pointer-events: none;
}

.login-minimal-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.65rem;
}

.login-minimal-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 48%, #0891b2 100%);
  box-shadow:
    0 12px 28px rgba(124, 58, 237, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.login-minimal-titles {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.login-minimal-titles strong {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fafafa;
}

.login-minimal-titles span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a78bfa;
}

.login-minimal-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.login-minimal-field label {
  display: block;
  margin-bottom: 0.38rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.login-minimal-field input {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 6, 12, 0.72);
  color: #fafafa;
  font-size: 0.96rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.login-minimal-field input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.58);
  background: rgba(8, 8, 16, 0.88);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.login-minimal-options {
  margin: 0.1rem 0 0.15rem;
}

.login-minimal-options .login-minimal-remember {
  margin: 0;
  font-size: 0.82rem;
  color: #b4b4c7;
}

.login-minimal-options .remember input:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.login-minimal-form .btn-login {
  margin-top: 0.35rem;
  min-height: 2.9rem;
  border-radius: 13px;
  font-weight: 600;
}

.btn-login-premium {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 45%, #6d28d9 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(124, 58, 237, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.btn-login-premium:hover:not(:disabled) {
  background: linear-gradient(135deg, #9d7af8 0%, #8b5cf6 45%, #7c3aed 100%);
  box-shadow:
    0 14px 32px rgba(124, 58, 237, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.screen-login .alert {
  margin-bottom: 0;
}

/* ── Login ── */
.screen-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, var(--safe-t)) max(1rem, var(--safe-r)) max(1.25rem, var(--safe-b)) max(1rem, var(--safe-l));
  overflow: hidden;
}

.login-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 48% at 50% -5%, rgba(139, 92, 246, 0.28), transparent 72%),
    radial-gradient(ellipse 42% 32% at 88% 78%, rgba(109, 40, 217, 0.16), transparent 70%),
    radial-gradient(ellipse 36% 28% at 12% 68%, rgba(34, 211, 238, 0.08), transparent 72%);
}

.login-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.login-card {
  position: relative;
  width: 100%;
  padding: clamp(1.35rem, 4.5vw, 1.85rem);
  border-radius: calc(var(--r) + 8px);
  background:
    linear-gradient(165deg, rgba(26, 26, 46, 0.96), rgba(14, 14, 24, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.28);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.45), rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-hero {
  margin-bottom: 1.15rem;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.32);
}

.brand-lg {
  margin-bottom: 0.85rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, #7c3aed, #0891b2);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-edition {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-card h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.login-tagline {
  margin: 0;
  color: #a8a8c8;
  font-size: 0.86rem;
  line-height: 1.55;
}

.login-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border-radius: calc(var(--r) - 2px);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-feature-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.login-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.login-feature-text strong {
  font-size: 0.74rem;
  font-weight: 700;
  color: #ececf4;
  line-height: 1.25;
}

.login-feature-text span {
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.35;
}

.login-form {
  margin: 0;
  padding: 1rem;
  border-radius: calc(var(--r) + 2px);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-form-head {
  margin-bottom: 0.85rem;
}

.login-form-head h2 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login-form-head p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.login-field {
  margin-bottom: 0.65rem;
}

.login-field input {
  background: rgba(8, 8, 15, 0.65);
  border-color: rgba(255, 255, 255, 0.08);
}

.login-field input:focus {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.login-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.85rem;
}

.login-options .remember {
  margin-bottom: 0;
  min-height: 2rem;
  font-size: 0.8rem;
}

.btn-login {
  min-height: 2.85rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.login-foot {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.78rem;
}

.login-foot a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.login-foot a:hover {
  color: var(--cyan);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ececf4;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  min-height: var(--touch);
}

.remember input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .login-features {
    grid-template-columns: 1fr;
  }

  .login-options {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard ── */
.screen-dash {
  display: flex;
  flex-direction: column;
  max-width: var(--max);
  margin-inline: auto;
  padding-bottom: calc(0.5rem + var(--safe-b));
}

body.is-admin .screen-dash {
  max-width: min(1320px, calc(100vw - 1.5rem));
  padding-inline: max(0.75rem, var(--safe-l)) max(0.75rem, var(--safe-r));
}

body.is-admin {
  --max: min(1320px, calc(100vw - 1.5rem));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.75rem + var(--safe-t)) max(1rem, var(--safe-r)) 0.75rem max(1rem, var(--safe-l));
  background: rgba(8, 8, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.topbar-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-icon {
  width: var(--touch);
  height: var(--touch);
  margin: -6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.btn-icon-muted {
  color: var(--muted);
  font-size: 1rem;
}

.dash {
  flex: 1;
  padding: 1rem max(1rem, var(--safe-r)) 0 max(1rem, var(--safe-l));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  align-content: start;
}

.dash-span-full {
  grid-column: 1 / -1;
}

.desk-stat-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--r) + 2px);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.045), transparent 58%),
    rgba(0, 0, 0, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.desk-stat-card-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 80px at 0% 0%, rgba(255, 255, 255, 0.08), transparent 70%);
  pointer-events: none;
}

.desk-stat-card-body {
  position: relative;
  z-index: 1;
  padding: 0.8rem 0.85rem 0.75rem;
}

.desk-stat-k {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(203, 213, 225, 0.72);
  margin-bottom: 0.28rem;
  font-weight: 600;
}

.desk-stat-v {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  color: #f5f6ff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.desk-stat-total .desk-stat-v { color: #f8fafc; }
.desk-stat-online .desk-stat-v { color: #86efac; text-shadow: 0 0 24px rgba(34, 197, 94, 0.25); }
.desk-stat-vmp .desk-stat-v { color: #f472b6; text-shadow: 0 0 24px rgba(244, 114, 182, 0.2); }
.desk-stat-keygen .desk-stat-v { color: #fbbf24; text-shadow: 0 0 24px rgba(251, 191, 36, 0.18); }
.desk-stat-gens .desk-stat-v { color: #c4b5fd; text-shadow: 0 0 24px rgba(139, 92, 246, 0.2); }

.desk-stat-total { border-color: rgba(148, 163, 184, 0.18); }
.desk-stat-online {
  border-color: rgba(34, 197, 94, 0.22);
  background:
    radial-gradient(180px 100px at 100% 0%, rgba(34, 197, 94, 0.12), transparent 72%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 58%),
    rgba(0, 0, 0, 0.22);
}

.desk-stat-online.is-live {
  border-color: rgba(34, 197, 94, 0.38);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.08), inset 0 1px 0 rgba(134, 239, 172, 0.08);
}

.desk-stat-vmp {
  border-color: rgba(244, 114, 182, 0.22);
  background:
    radial-gradient(180px 100px at 100% 0%, rgba(244, 114, 182, 0.1), transparent 72%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 58%),
    rgba(0, 0, 0, 0.22);
}

.desk-stat-keygen { border-color: rgba(251, 191, 36, 0.2); }
.desk-stat-gens { border-color: rgba(139, 92, 246, 0.22); }

.desk-stat-live-dot {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.55);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
}

.desk-stat-live-dot.active {
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45);
  animation: desk-online-pulse 2s ease-in-out infinite;
}

@keyframes desk-online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.42); }
  50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

.desk-stat-click {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.desk-stat-click:hover,
.desk-stat-click:focus-visible {
  border-color: rgba(244, 114, 182, 0.48);
  box-shadow: 0 14px 34px rgba(244, 114, 182, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
  outline: none;
}

.desk-stat-sub {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.66rem;
  line-height: 1.35;
  color: rgba(148, 163, 184, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-stat-online .desk-stat-sub {
  color: rgba(134, 239, 172, 0.82);
}

.vmp-library-card {
  display: flex;
  flex-direction: column;
  width: min(96vw, 1480px);
  max-height: min(92vh, 960px);
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(244, 114, 182, 0.16), transparent 55%),
    radial-gradient(900px 360px at 100% 0%, rgba(139, 92, 246, 0.14), transparent 50%),
    linear-gradient(180deg, rgba(18, 20, 34, 0.98), rgba(10, 12, 22, 0.98));
  border: 1px solid rgba(244, 114, 182, 0.18);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
}

.vmp-library-toolbar {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0 1rem 0.85rem;
}

.vmp-library-search-wrap {
  position: relative;
  flex: 1;
}

.vmp-library-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a78bfa;
  font-size: 0.95rem;
  pointer-events: none;
}

.vmp-library-search-input {
  width: 100%;
  padding-left: 2.2rem !important;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(167, 139, 250, 0.22);
}

.vmp-library-online-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.28);
  white-space: nowrap;
}

.vmp-library-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 114, 182, 0.35);
  animation: vmp-live-pulse 1.6s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes vmp-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 114, 182, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(244, 114, 182, 0); }
}

.vmp-library-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 0.15rem;
}

.vmp-library-summary {
  margin: 0 0 0.9rem;
}

.vmp-library-summary-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.vmp-library-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  color: #e9d5ff;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.22);
}

.vmp-library-pill.live {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 114, 182, 0.28);
}

.vmp-library-pill.online {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.24);
}

.vmp-library-pill.global-online {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.22);
}

.vmp-library-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.vmp-library-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.vmp-col-file { min-width: 9rem; width: 18%; }
.vmp-col-host { min-width: 8rem; width: 16%; }
.vmp-col-path { min-width: 14rem; width: auto; }
.vmp-col-size { min-width: 4.5rem; width: 5rem; }
.vmp-col-action { min-width: 8.5rem; width: 9rem; }

.vmp-library-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 0.55rem 0.7rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(12, 14, 24, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.vmp-lib-row td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
  line-height: 1.45;
}

.vmp-lib-row:hover:not(.is-uploading) {
  background: rgba(244, 114, 182, 0.06);
}

.vmp-lib-row.is-uploading {
  background: rgba(251, 191, 36, 0.06);
}

.vmp-lib-row.is-uploading:hover {
  background: rgba(251, 191, 36, 0.08);
}

.vmp-lib-row.is-ready {
  background: rgba(34, 197, 94, 0.04);
}

.vmp-lib-col-name {
  font-weight: 700;
  color: #f8fafc;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.vmp-lib-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.1rem 0.35rem;
  margin-right: 0.35rem;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fbcfe8;
  background: rgba(244, 114, 182, 0.18);
  border: 1px solid rgba(244, 114, 182, 0.22);
  vertical-align: middle;
  flex-shrink: 0;
}

.vmp-lib-col-host {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #dbeafe;
}

.vmp-lib-online {
  display: inline-block;
  margin-left: 0.35rem;
  margin-top: 0.12rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.vmp-lib-online.on { color: #86efac; }
.vmp-lib-online.off { color: #94a3b8; }

.vmp-lib-col-path {
  color: var(--muted);
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.vmp-lib-col-size {
  white-space: nowrap;
  color: #ddd6fe;
  font-variant-numeric: tabular-nums;
}

.vmp-lib-col-action {
  white-space: nowrap;
  vertical-align: middle;
}

.vmp-lib-col-action .desk-keygen-btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
}

.vmp-upload-failed {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  max-width: 100%;
}

.vmp-upload-failed .desk-keygen-failed {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 4.5rem;
}

.vmp-inline-upload {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(2.5rem, 2fr) auto auto;
  gap: 0.35rem 0.45rem;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.16);
  font-size: 0.66rem;
  color: #fde68a;
  max-width: 100%;
}

.vmp-upload-stage {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vmp-upload-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.vmp-upload-pct,
.vmp-upload-meta-size {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vmp-upload-meta-speed,
.vmp-upload-meta-eta {
  display: none;
}

.vmp-upload-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #f472b6);
  transition: width 0.35s ease;
}

.vmp-upload-failed {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.vmp-search-hit {
  background: rgba(244, 114, 182, 0.28);
  color: #fff;
  border-radius: 3px;
  padding: 0 0.1rem;
}

.desk-keygen-muted {
  font-size: 0.78rem;
  color: var(--muted);
}

.desk-btn-glow {
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 8px 24px rgba(139, 92, 246, 0.12);
}

.desk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.desk-search {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: var(--fg);
  font: inherit;
}

.desk-search:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.desk-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.desk-filter {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  cursor: pointer;
}

.desk-filter.active,
.desk-filter:hover {
  color: #ede9fe;
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.16);
}

.desk-pc-list,
.desk-cards {
  max-height: min(70vh, 42rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.desk-pc-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.desk-pc-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(10rem, 1.2fr) minmax(12rem, 1.4fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 55%),
    rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  overflow: hidden;
}

.desk-pc-card .dpc-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(280px 80px at 0% 0%, rgba(139, 92, 246, 0.1), transparent 70%);
  pointer-events: none;
}

.desk-pc-card:hover {
  border-color: rgba(139, 92, 246, 0.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.desk-pc-card.is-online {
  border-color: rgba(34, 197, 94, 0.22);
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.06), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 55%),
    rgba(0, 0, 0, 0.2);
}

.dpc-card-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

.dpc-card-online {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.desk-pc-card.is-online .dpc-card-online { color: #86efac; }

.dpc-card-main {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.dpc-card-host {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
}

.dpc-card-user,
.dpc-card-os {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.dpc-card-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  position: relative;
  z-index: 1;
}

.dpc-metric {
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.dpc-metric-k {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dpc-metric-v {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #eef0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dpc-metric-v.warn { color: #fbbf24; }
.dpc-metric-v.vmp { color: #f472b6; }
.dpc-metric-v code {
  font-size: 0.68rem;
  color: #e9d5ff;
  background: transparent;
  padding: 0;
}

.dpc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.dpc-card-btn {
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7ff;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dpc-card-btn:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
}

.dpc-card-btn.primary {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.18);
  color: #f5f3ff;
}

.dpc-card-btn.danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

@media (max-width: 1100px) {
  .desk-pc-card {
    grid-template-columns: 1fr 1fr;
  }
  .dpc-card-metrics { grid-column: 1 / -1; }
  .dpc-card-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

.desk-pc-table-wrap {
  border: 1px solid rgba(139, 92, 246, 0.14);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.desk-pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.desk-pc-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 0.55rem 0.65rem;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(12, 14, 24, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.desk-pc-row td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.desk-pc-row {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.desk-pc-row:hover {
  background: rgba(139, 92, 246, 0.08);
}

.desk-pc-row.is-online {
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.65);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.05), transparent 28%);
}

.desk-pc-col-status {
  white-space: nowrap;
}

.desk-pc-col-status .desk-online-dot {
  display: inline-block;
  margin: 0 0.4rem 0 0;
  vertical-align: middle;
}

.desk-pc-hostline strong {
  color: #f5f6ff;
  font-size: 0.84rem;
}

.desk-pc-user {
  color: #c4b5fd;
  font-size: 0.74rem;
}

.desk-pc-subline {
  margin-top: 0.12rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.desk-pc-col-activity .desk-pill {
  margin: 0.08rem 0.15rem 0.08rem 0;
}

.desk-pc-wph-ver {
  font-weight: 600;
  color: #a5f3fc;
  white-space: nowrap;
}

.desk-pc-code {
  font-size: 0.7rem;
  color: #e9d5ff;
  background: rgba(139, 92, 246, 0.12);
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
}

.desk-pc-col-keygen,
.desk-pc-col-lic,
.desk-pc-col-ping {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.desk-pc-col-actions .desk-quick-actions {
  justify-content: flex-end;
}

.desk-card {
  position: relative;
  padding: 0.95rem 0.95rem 0.85rem 1rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 60%), rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.desk-card-rich {
  padding-top: 1rem;
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(139, 92, 246, 0.12), transparent 58%),
    radial-gradient(320px 100px at 100% 100%, rgba(34, 211, 238, 0.06), transparent 62%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.045), transparent 55%),
    rgba(0, 0, 0, 0.2);
}

.desk-card-rich.is-online {
  border-color: rgba(34, 197, 94, 0.22);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.06);
}

.desk-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: rgba(139, 92, 246, 0.55);
}

.desk-card.status-blocked .desk-card-accent { background: #ef4444; }
.desk-card.status-frozen .desk-card-accent { background: #3b82f6; }
.desk-card.status-suspended .desk-card-accent { background: #f59e0b; }
.desk-card.status-active .desk-card-accent { background: #22c55e; }
.desk-card.status-warned .desk-card-accent { background: #f59e0b; }

.desk-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.desk-card::before {
  display: none;
}

.desk-card.status-blocked::before { background: #ef4444; }
.desk-card.status-frozen::before { background: #3b82f6; }
.desk-card.status-suspended::before { background: #f59e0b; }
.desk-card.status-active::before { background: #22c55e; }
.desk-card.status-warned::before { background: #f59e0b; }
.desk-status.warned { background: rgba(245, 158, 11, 0.18); color: #fde68a; }

.desk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.desk-host {
  font-weight: 700;
  color: #f5f6ff;
  font-size: 0.95rem;
  line-height: 1.25;
}

.desk-host-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.desk-online-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.desk-online-badge.on {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.22);
}

.desk-online-badge.off {
  background: rgba(100, 116, 139, 0.18);
  color: #94a3b8;
}

.desk-sub-os {
  color: rgba(203, 213, 225, 0.72);
}

.desk-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.desk-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #dbeafe;
}

.desk-pill.uptime { color: #a5f3fc; border-color: rgba(34, 211, 238, 0.18); }
.desk-pill.harden { color: #fca5a5; border-color: rgba(239, 68, 68, 0.28); background: rgba(239, 68, 68, 0.1); }
.desk-pill.warn { color: #fde68a; border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.08); }
.desk-pill.activity-generating { color: #86efac; border-color: rgba(34, 197, 94, 0.22); }
.desk-pill.activity-syncing,
.desk-pill.activity-uploading { color: #93c5fd; border-color: rgba(59, 130, 246, 0.22); }
.desk-pill.activity-blocked { color: #fca5a5; border-color: rgba(239, 68, 68, 0.22); }

.desk-card-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

@media (max-width: 520px) {
  .desk-card-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.desk-chip {
  padding: 0.42rem 0.48rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  min-width: 0;
}

.desk-chip-k {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.12rem;
}

.desk-chip-v {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: #eef0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.desk-sub {
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 0.15rem;
  line-height: 1.35;
}

.desk-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.desk-online-dot.on { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
.desk-online-dot.off { background: #64748b; }

.desk-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.65rem;
  font-size: 0.76rem;
  margin-bottom: 0.65rem;
}

.desk-card-meta dt { color: var(--muted); }
.desk-card-meta dd { margin: 0; color: #e5e7ff; font-variant-numeric: tabular-nums; }

.desk-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.desk-quick-actions {
  display: flex;
  gap: 0.3rem;
}

.desk-quick {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.desk-quick:hover { border-color: rgba(139, 92, 246, 0.45); }

.desk-status {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.desk-status.active { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.desk-status.blocked { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.desk-status.frozen { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.desk-status.suspended { background: rgba(251, 191, 36, 0.18); color: #fde68a; }

.desk-open {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.78rem;
}

.desk-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.desk-modal[hidden] { display: none !important; }

.desk-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}

.desk-modal-card {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background:
    radial-gradient(900px 260px at 100% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    rgba(12, 14, 28, 0.96);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: calc(var(--r) + 8px);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* --- PC client modal (premium) --- */
.dpc-modal .dpc-modal-backdrop {
  background: rgba(2, 4, 14, 0.72);
  backdrop-filter: blur(8px);
}

.dpc-modal-card {
  display: flex;
  flex-direction: column;
  width: min(96vw, 1000px);
  max-height: min(94vh, 940px);
  min-height: min(88vh, 820px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    radial-gradient(900px 280px at 100% -10%, rgba(139, 92, 246, 0.18), transparent 58%),
    radial-gradient(640px 220px at 0% 0%, rgba(34, 197, 94, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 38%),
    rgba(10, 12, 24, 0.97);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
}

.dpc-modal-hero {
  position: relative;
  padding: 1.15rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.dpc-modal-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 200px at 0% 0%, rgba(139, 92, 246, 0.22), transparent 62%),
    radial-gradient(460px 160px at 100% 0%, rgba(34, 197, 94, 0.12), transparent 58%);
  pointer-events: none;
}

.dpc-modal-hero-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dpc-modal-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  min-width: 0;
}

.dpc-hero-avatar {
  position: relative;
  flex-shrink: 0;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(0, 0, 0, 0.2)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dpc-hero-avatar-glyph {
  font-size: 1.35rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.35));
}

.dpc-hero-status-ring {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  border: 2px solid rgba(10, 12, 24, 0.95);
  background: #64748b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dpc-hero-status-ring.online {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.55), 0 0 0 1px rgba(134, 239, 172, 0.25);
}

.dpc-hero-status-ring.offline { background: #64748b; }

.dpc-hero-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dpc-modal-hero-text h3 {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fafaff;
  line-height: 1.15;
}

.dpc-hero-badge {
  min-width: auto;
  padding: 0.22rem 0.55rem;
  font-size: 0.58rem;
}

.dpc-hero-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: rgba(148, 163, 184, 0.95);
}

.dpc-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.dpc-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.dpc-meta-chip.warn {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.1);
}

.dpc-modal-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.dpc-btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #c4b5fd;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.dpc-btn-icon-glyph {
  font-size: 1.05rem;
  line-height: 1;
}

.dpc-btn-icon:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.14);
  transform: translateY(-1px);
}

.dpc-btn-icon.dpc-btn-close:hover {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.dpc-modal-tabs-wrap {
  padding: 0.7rem 1.15rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dpc-modal .dpc-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0.28rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.22);
}

.dpc-modal .dpc-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(148, 163, 184, 0.95);
  border-radius: 10px;
  padding: 0.42rem 0.82rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dpc-modal .dpc-tab:hover {
  color: #e9d5ff;
  background: rgba(139, 92, 246, 0.08);
}

.dpc-modal .dpc-tab.active {
  color: #f5f3ff;
  border-color: rgba(167, 139, 250, 0.38);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.28), rgba(139, 92, 246, 0.14));
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dpc-tab-badge {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dpc-modal .dpc-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 0.95rem 1.15rem 1rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.dpc-overview { display: flex; flex-direction: column; gap: 0.75rem; }

.dpc-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.dpc-metric-tile {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.62rem 0.68rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 58%),
    rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.dpc-metric-tile.online {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    radial-gradient(120px 70px at 100% 0%, rgba(34, 197, 94, 0.14), transparent 72%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 58%),
    rgba(0, 0, 0, 0.18);
}

.dpc-metric-tile.warn {
  border-color: rgba(251, 191, 36, 0.28);
  background:
    radial-gradient(120px 70px at 100% 0%, rgba(251, 191, 36, 0.12), transparent 72%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 58%),
    rgba(0, 0, 0, 0.18);
}

.dpc-metric-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.dpc-metric-link.online .dpc-metric-icon {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
}

.dpc-metric-keygen.warn .dpc-metric-icon {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.28);
}

.dpc-metric-body { min-width: 0; }

.dpc-metric-tile .k {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.15rem;
  font-weight: 600;
}

.dpc-metric-tile .v {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
  word-break: break-word;
}

.dpc-status-pill {
  display: inline-flex;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dpc-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dpc-alert {
  padding: 0.55rem 0.75rem;
  border-radius: 11px;
  font-size: 0.74rem;
  line-height: 1.35;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dpc-alert.harden {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
}

.dpc-alert.restrict {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
}

.dpc-alert.msg,
.dpc-alert.note {
  color: #dbeafe;
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.08);
}

.dpc-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.dpc-panel {
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
    rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.dpc-panel-head {
  padding: 0.55rem 0.8rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(139, 92, 246, 0.06);
}

.dpc-panel-title {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d8b4fe;
  font-weight: 700;
}

.dpc-panel-body { padding: 0.45rem 0.8rem 0.55rem; }

.dpc-kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dpc-kv-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 34%) 1fr;
  gap: 0.55rem 0.75rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
  align-items: baseline;
}

.dpc-kv-row:last-child { border-bottom: none; }

.dpc-kv-k {
  color: rgba(148, 163, 184, 0.92);
  font-weight: 500;
}

.dpc-kv-v {
  color: #eef2ff;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.dpc-empty {
  font-size: 0.74rem;
  color: var(--muted);
  padding: 0.25rem 0;
}

.dpc-action-strip {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.18);
}

.dpc-action-group-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.dpc-quickbar,
.dpc-files-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dpc-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.1);
  color: #e9d5ff;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dpc-quick-btn:hover {
  border-color: rgba(167, 139, 250, 0.48);
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-1px);
}

.dpc-quick-count {
  min-width: 1.1rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.64rem;
  font-weight: 800;
  color: #f8fafc;
}

.dpc-quick-btn.danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
}

.dpc-quick-btn.ok {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
}

.dpc-control-panel {
  margin: 0;
  padding: 0.85rem 1.15rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.06), transparent 28%),
    rgba(0, 0, 0, 0.28);
  max-height: none;
  overflow: visible;
}

.dpc-control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.dpc-control-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f5f3ff;
  letter-spacing: -0.01em;
}

.dpc-control-sub {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.dpc-control-form textarea,
.dpc-control-form input {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.dpc-control-form textarea:focus,
.dpc-control-form input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.12);
}

.dpc-control-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.55rem;
}

.dpc-act-group {
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.dpc-act-group-danger {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(127, 29, 29, 0.12);
}

.dpc-act-group-label {
  color: #a5b4fc;
  margin-bottom: 0.4rem;
}

.dpc-act-group-danger .dpc-act-group-label { color: #fca5a5; }

.dpc-modal .desk-act-btn {
  border-radius: 9px;
  padding: 0.35rem 0.58rem;
  font-size: 0.7rem;
}

.dpc-control-hint,
.dpc-files-meta {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0;
}

.dpc-control-intro {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.06);
}

.dpc-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 52vh;
  overflow: auto;
}

.dpc-event-row {
  padding: 0.62rem 0.75rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dpc-event-row:hover {
  border-color: rgba(139, 92, 246, 0.22);
  background: rgba(139, 92, 246, 0.05);
}

@media (max-width: 900px) {
  .dpc-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dpc-panels { grid-template-columns: 1fr; }
  .dpc-control-groups { grid-template-columns: 1fr; }
  .dpc-modal-card { min-height: auto; max-height: min(94vh, 900px); }
}

/* Installer licenses (6 profiles) */
.dpc-lic-page { display: flex; flex-direction: column; gap: 0.85rem; }

.dpc-lic-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(0, 0, 0, 0.18));
}

.dpc-lic-page-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f5f3ff;
}

.dpc-lic-page-sub {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 36rem;
}

.dpc-lic-page-total {
  text-align: right;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.dpc-lic-page-total .k {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.dpc-lic-page-total .v {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #c4b5fd;
  line-height: 1.1;
}

.dpc-lic-profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dpc-lic-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05), transparent 52%),
    rgba(8, 10, 22, 0.88);
  padding: 0.85rem 0.9rem 0.8rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dpc-lic-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dpc-lic-card.is-empty { opacity: 0.78; }
.dpc-lic-card.has-data { border-color: rgba(139, 92, 246, 0.32); }

.dpc-lic-card-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 100px at 0% 0%, rgba(255, 255, 255, 0.07), transparent 70%);
  pointer-events: none;
}

.dpc-lic-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(139, 92, 246, 0.55);
  border-radius: 3px 0 0 3px;
}

.dpc-lic-card.tone-cyan .dpc-lic-card-accent { background: rgba(34, 211, 238, 0.7); }
.dpc-lic-card.tone-blue .dpc-lic-card-accent { background: rgba(59, 130, 246, 0.7); }
.dpc-lic-card.tone-pink .dpc-lic-card-accent { background: rgba(244, 114, 182, 0.7); }
.dpc-lic-card.tone-amber .dpc-lic-card-accent { background: rgba(245, 158, 11, 0.75); }
.dpc-lic-card.tone-lime .dpc-lic-card-accent { background: rgba(132, 204, 22, 0.7); }

.dpc-lic-card.tone-cyan.has-data { border-color: rgba(34, 211, 238, 0.3); }
.dpc-lic-card.tone-blue.has-data { border-color: rgba(59, 130, 246, 0.3); }
.dpc-lic-card.tone-pink.has-data { border-color: rgba(244, 114, 182, 0.3); box-shadow: 0 12px 32px rgba(244, 114, 182, 0.06); }
.dpc-lic-card.tone-amber.has-data { border-color: rgba(245, 158, 11, 0.35); box-shadow: 0 12px 32px rgba(245, 158, 11, 0.08); }
.dpc-lic-card.tone-lime.has-data { border-color: rgba(132, 204, 22, 0.3); }

.dpc-lic-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.dpc-lic-card-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.dpc-lic-brand {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #c4b5fd;
  text-transform: uppercase;
}

.dpc-lic-ver {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.dpc-lic-state {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dpc-lic-card.has-data .dpc-lic-state {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.12);
}

.dpc-lic-card-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
}

.dpc-lic-card-sub {
  position: relative;
  z-index: 1;
  margin: 0.28rem 0 0;
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.35;
}

.dpc-lic-card-date {
  position: relative;
  z-index: 1;
  margin: 0.22rem 0 0;
  font-size: 0.62rem;
  color: var(--muted);
}

.dpc-tg-panel .dpc-tg-empty {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.dpc-tg-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.dpc-tg-avatar {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.dpc-tg-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
}

.dpc-tg-handle {
  margin-top: 0.12rem;
  font-size: 0.74rem;
  color: #7dd3fc;
}

.dpc-tg-id {
  margin-top: 0.1rem;
  font-size: 0.66rem;
  color: var(--muted);
}

.dpc-tg-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.dpc-tg-badge {
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dpc-tg-badge.unlimited { color: #fde68a; border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.1); }
.dpc-tg-badge.sub { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); background: rgba(139, 92, 246, 0.1); }
.dpc-tg-badge.free { color: #86efac; border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.1); }

.dpc-tg-stats {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 5.5rem;
}

.dpc-tg-stat {
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dpc-tg-stat .k {
  display: block;
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dpc-tg-stat .v {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #eef2ff;
}

.dpc-lic-serial-box {
  position: relative;
  z-index: 1;
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dpc-lic-serial-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dpc-lic-serial-k {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.dpc-lic-copy-btn {
  appearance: none;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: #ddd6fe;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  cursor: pointer;
}

.dpc-lic-copy-btn:hover {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(139, 92, 246, 0.2);
}

.dpc-lic-serial-v {
  display: block;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #e2e8f0;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-height: 4.2rem;
  overflow: auto;
}

.dpc-lic-card.is-empty .dpc-lic-serial-v { color: #64748b; font-style: italic; }

.dpc-lic-card-history {
  position: relative;
  z-index: 1;
  margin-top: 0.55rem;
}

.dpc-lic-card-history summary {
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  color: #c4b5fd;
  list-style: none;
  padding: 0.25rem 0;
}

.dpc-lic-card-history summary::-webkit-details-marker { display: none; }

.dpc-lic-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.45rem;
  max-height: 16rem;
  overflow: auto;
}

.dpc-lic-item { margin: 0; padding: 0.55rem 0.6rem; }
.dpc-lic-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.dpc-lic-source {
  font-size: 0.62rem;
  color: var(--muted);
  margin-left: auto;
}

/* Control tab */
.dpc-modal-card.dpc-tab-control .dpc-modal-body {
  padding-top: 0.75rem;
}

.dpc-control-page {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dpc-control-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  background:
    radial-gradient(420px 120px at 100% 0%, rgba(139, 92, 246, 0.14), transparent 62%),
    rgba(0, 0, 0, 0.2);
}

.dpc-control-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.dpc-ctrl-tile {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #eef2ff;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  min-width: 6.5rem;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dpc-ctrl-tile:hover { transform: translateY(-1px); }
.dpc-ctrl-tile.ok { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.1); color: #86efac; }
.dpc-ctrl-tile.freeze { border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.1); color: #bfdbfe; }
.dpc-ctrl-tile.block { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.1); color: #fca5a5; }

.dpc-ctrl-tile-icon { font-size: 1rem; line-height: 1; }
.dpc-ctrl-tile-label { font-size: 0.72rem; font-weight: 700; }

.dpc-control-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.95fr) minmax(0, 1.35fr);
  gap: 0.65rem;
  align-items: start;
}

.dpc-control-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.18);
  padding: 0.7rem 0.8rem;
}

.dpc-control-card-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c4b5fd;
  font-weight: 700;
}

.dpc-control-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.dpc-control-field span {
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 600;
}

.dpc-control-field input,
.dpc-control-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: #eef0ff;
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.76rem;
}

.dpc-control-field input:focus,
.dpc-control-field textarea:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.12);
}

.dpc-control-field-inline { max-width: 6.5rem; }

.dpc-act-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.35rem;
}

.dpc-act-btn {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px !important;
  padding: 0.42rem 0.55rem !important;
  min-height: 2rem;
}

.dpc-act-group + .dpc-act-group { margin-top: 0.55rem; }

.dpc-act-group-access {
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.04);
  border: 1px solid rgba(34, 197, 94, 0.12);
}

.dpc-act-group-manage {
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.dpc-act-group-danger {
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (max-width: 900px) {
  .dpc-lic-profiles { grid-template-columns: 1fr; }
  .dpc-control-hero { grid-template-columns: 1fr; }
  .dpc-control-quick { justify-content: flex-start; }
  .dpc-control-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .dpc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dpc-kv-row { grid-template-columns: 1fr; gap: 0.15rem; }
}

