/* =========================================================
   CLICK MONSTER · ADMIN DASHBOARD STYLES
   Cyberpunk Arcade Control Center
   ========================================================= */

:root {
  --admin-bg: #030712;
  --admin-panel: #0b0f19;
  --admin-panel-hover: #0f172a;
  --admin-border: #1e293b;
  --admin-border-focus: #06b6d4;
  --admin-text-main: #f8fafc;
  --admin-text-muted: #94a3b8;
  --admin-cyan: #06b6d4;
  --admin-gold: #f59e0b;
  --admin-green: #10b981;
  --admin-red: #ef4444;
  --admin-purple: #8b5cf6;
}

html.admin-html,
html.admin-html body,
body.admin-body {
  background: var(--admin-bg) !important;
  color: var(--admin-text-main) !important;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif !important;
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  position: relative !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Guarantee full-page scroll on all desktop resolutions (overrides style.css 1024px rule) */
@media (min-width: 1024px) {
  html.admin-html,
  html.admin-html body,
  body.admin-body {
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

.admin-wrapper {
  min-height: 100vh !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
}

/* =========================================================
   AUTH OVERLAY
   ========================================================= */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(6, 182, 212, 0.12) 0%,
    rgba(3, 7, 18, 0.96) 80%
  );
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.auth-card {
  background: #0b0f19;
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow:
    0 0 50px rgba(6, 182, 212, 0.15),
    0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  text-align: center;
  position: relative;
}

.auth-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.auth-badge {
  display: inline-block;
  font-family: "Chakra Petch", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.auth-title {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem 0;
  color: #fff;
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.auth-desc {
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  text-align: left;
}

.auth-footer {
  margin-top: 1.5rem;
  font-size: 0.82rem;
}

.auth-footer a {
  color: var(--admin-cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* =========================================================
   ADMIN LAYOUT & SIDEBAR NAVIGATION
   ========================================================= */
.admin-layout {
  display: flex !important;
  min-height: 100vh !important;
  width: 100% !important;
  background: var(--admin-bg);
}

.admin-sidebar {
  width: 270px;
  min-width: 270px;
  background: #070b14;
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-sizing: border-box;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.4rem 1.25rem 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-monogram {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  font-family: "Chakra Petch", monospace;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.brand-role {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--admin-cyan);
  letter-spacing: 0.1em;
}

.sidebar-status-banner {
  margin: 0.85rem 1rem;
  padding: 0.45rem 0.75rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.status-label {
  font-family: "Chakra Petch", monospace;
  font-weight: 700;
  color: #6ee7b7;
  letter-spacing: 0.05em;
}

.status-env {
  margin-left: auto;
  font-size: 0.62rem;
  background: #065f46;
  color: #a7f3d0;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 800;
}

.sidebar-nav-group {
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-heading {
  font-size: 0.68rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.5rem;
  text-transform: uppercase;
}

.sidebar-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--admin-text-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
  text-align: left;
}

.sidebar-nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-nav-btn.active {
  color: #fff;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
  font-weight: 700;
}

.sidebar-nav-btn .nav-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.sidebar-nav-btn .nav-label {
  flex: 1;
}

.sidebar-widget {
  margin: auto 0.85rem 0.85rem 0.85rem;
  padding: 0.85rem;
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  font-size: 0.75rem;
}

.widget-title {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.widget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  color: var(--admin-text-muted);
}

.widget-row:last-child {
  margin-bottom: 0;
}

.widget-val {
  font-family: "Chakra Petch", monospace;
  font-weight: 700;
  color: #fff;
}

.tag-status-ok {
  color: #10b981;
  font-weight: 700;
  font-size: 0.7rem;
}

.sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  gap: 0.5rem;
}

.sidebar-footer-link {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  color: var(--admin-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer-link:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--admin-cyan);
}

.btn-sidebar-logout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

.admin-content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--admin-bg);
}

.admin-top-bar {
  height: 60px;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-mobile-sidebar {
  display: none;
  background: transparent;
  border: 1px solid var(--admin-border);
  color: #fff;
  font-size: 1.1rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.breadcrumb-root {
  color: #64748b;
  font-weight: 500;
}

.breadcrumb-sep {
  color: #334155;
}

.breadcrumb-current {
  color: #fff;
  font-weight: 700;
  font-family: "Chakra Petch", sans-serif;
  letter-spacing: 0.03em;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: #94a3b8;
  background: #020617;
  border: 1px solid var(--admin-border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.badge-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: #1e293b;
  color: #94a3b8;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.badge-alert {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =========================================================
   BUTTONS & INPUTS
   ========================================================= */
.btn-primary-admin {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  border: none;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-primary-admin:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.45);
}

.btn-outline-sm {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-outline-sm:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #475569;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.search-input {
  background: #020617;
  border: 1px solid var(--admin-border);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  width: 260px;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--admin-cyan);
}

/* =========================================================
   CONTENT WRAPPER
   ========================================================= */
.admin-main {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem 1.5rem;
  flex: 1 0 auto !important;
  height: auto !important;
  overflow: visible !important;
}

.admin-tab-content {
  overflow: visible !important;
  height: auto !important;
}

.tab-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.tab-title {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.4rem 0;
  color: #fff;
}

.tab-desc {
  color: var(--admin-text-muted);
  font-size: 0.88rem;
  margin: 0;
  max-width: 780px;
  line-height: 1.5;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  background: #020617;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.pill-btn.active {
  background: #1e293b;
  color: #fff;
}

/* Overview Stat Boxes */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.stat-box-val {
  font-family: "Chakra Petch", monospace;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.stat-box-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--admin-text-muted);
  letter-spacing: 0.06em;
}

.color-green {
  color: var(--admin-green) !important;
}
.color-yellow {
  color: var(--admin-gold) !important;
}
.color-cyan {
  color: var(--admin-cyan) !important;
}
.color-red {
  color: var(--admin-red) !important;
}

/* =========================================================
   GAMES CARDS & ROUNDS GRID
   ========================================================= */
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.game-admin-card {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.game-admin-card:hover {
  border-color: #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.game-admin-card.paused {
  opacity: 0.65;
  border-style: dashed;
}

.game-admin-card.broken {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.game-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.game-card-icon svg {
  width: 100%;
  height: 100%;
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
}

.game-card-emblem-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.game-card-custom-emblem {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#preview-object-svg svg,
#preview-icon-svg svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-titles h3 {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
  color: #fff;
}

.slug-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--admin-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.card-badges {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 0.7rem;
  font-weight: 600;
  background: #020617;
  border: 1px solid var(--admin-border);
  color: #94a3b8;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.card-stats-row {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.card-stat-item {
  min-width: 0;
}

.card-stat-item .val {
  font-family: "Chakra Petch", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-stat-item .lbl {
  font-size: 0.65rem;
  color: var(--admin-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  gap: 0.5rem;
}

.card-action-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}

.card-action-btns .btn-outline-sm {
  padding: 0.45rem 0.65rem;
  font-size: 0.76rem;
  white-space: nowrap;
}

/* Status Badges */
.status-tag {
  font-family: "Chakra Petch", monospace;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.status-tag.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-tag.broken {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid #ef4444;
  animation: pulse-border 1.5s infinite;
}

.status-tag.claimed {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid #f59e0b;
}

@keyframes pulse-border {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
  }
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
}

input:checked + .slider {
  background-color: var(--admin-green);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-label {
  font-size: 0.88rem;
  color: var(--admin-text-main);
  font-weight: 500;
}

/* =========================================================
   CAMPAIGN MODERATION CARDS
   ========================================================= */
.campaigns-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: visible !important;
  height: auto !important;
}

.campaign-card {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.campaign-card.pending-mod {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(
    180deg,
    rgba(245, 158, 11, 0.04) 0%,
    rgba(11, 15, 25, 1) 100%
  );
}

.campaign-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.campaign-title-area h3 {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.campaign-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  flex-wrap: wrap;
}

/* Dedicated Advertiser Contact Box */
.sponsor-contact-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-info-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-avatar {
  font-size: 2rem;
}

.contact-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.contact-details {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--admin-cyan);
}

.btn-contact-action {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid var(--admin-cyan);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-contact-action:hover {
  background: var(--admin-cyan);
  color: #000;
}

/* Banner HTML Preview */
.banner-preview-box {
  background: #020617;
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  padding: 1rem;
}

.banner-preview-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--admin-text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.campaign-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-approve {
  background: #10b981;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-reject {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-approve:hover {
  opacity: 0.9;
}
.btn-reject:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* =========================================================
   WINNERS TABLE
   ========================================================= */
.winners-table-container {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.admin-table th {
  background: #020617;
  padding: 0.85rem 1rem;
  color: var(--admin-text-muted);
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.winner-name {
  font-weight: 700;
  color: #fff;
}

.winner-email {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

.winner-contact-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--admin-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.reward-val {
  font-family: "Chakra Petch", monospace;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--admin-gold);
}

/* =========================================================
   MODAL DIALOGS
   ========================================================= */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-modal-card {
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.admin-modal-card.admin-modal-wide {
  max-width: 920px;
  width: 94vw;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  font-family: "Inter", sans-serif;
  font-weight: 500;
  display: block;
  margin-top: 0.2rem;
}

.form-section-title {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--admin-cyan);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--admin-cyan);
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
}

/* =========================================================
   SVG VISUAL STUDIO STYLES
   ========================================================= */
.svg-studio-panel {
  background: #020617;
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.2rem;
}

.preset-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.preset-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
}

.preset-hint {
  font-size: 0.72rem;
  color: #64748b;
}

.preset-filter-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pill-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--admin-cyan);
  color: #38bdf8;
  font-weight: 700;
}

/* Preset Cards Visual Gallery */
.preset-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  max-height: 210px;
  overflow-y: auto;
  padding: 0.4rem 0.2rem 0.8rem;
  margin-bottom: 0.9rem;
  scrollbar-width: thin;
}

.preset-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 0.6rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  text-align: center;
}

.preset-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.preset-card.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--admin-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.preset-card-preview {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.preset-card-preview svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.preset-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.preset-card-tag {
  font-size: 0.62rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
}

/* Drag-and-drop Dropzone */
.svg-dropzone {
  background: rgba(15, 23, 42, 0.4);
  border: 2px dashed rgba(6, 182, 212, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-dropzone:hover,
.svg-dropzone.dragover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--admin-cyan);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.dropzone-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.dropzone-icon {
  font-size: 1.5rem;
}

.dropzone-texts {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dropzone-primary {
  font-size: 0.8rem;
  color: #e2e8f0;
}

.dropzone-sub {
  font-size: 0.68rem;
  color: #64748b;
}

/* Validation Badges */
.badge-valid {
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.badge-invalid {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

/* Crack Simulation Slider */
.crack-sim-box {
  margin-top: 0.75rem;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.crack-sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.crack-sim-label {
  font-weight: 700;
  color: #cbd5e1;
}

.crack-sim-val {
  font-weight: 700;
  color: var(--admin-cyan);
  font-family: "Chakra Petch", monospace;
}

.crack-slider {
  width: 100%;
  accent-color: var(--admin-cyan);
  cursor: pointer;
}

.crack-sim-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #64748b;
  cursor: pointer;
}

.crack-sim-ticks span:hover {
  color: #38bdf8;
}

.btn-reset-test {
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-test:hover {
  color: #fff;
  border-color: #64748b;
}

.svg-code-area.expanded {
  min-height: 280px !important;
}

.svg-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.svg-editor-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
}

.svg-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-editor-tool {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-editor-tool:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #64748b;
}

.svg-code-area {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace !important;
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
  background: #020617 !important;
  border: 1px solid #1e293b !important;
  border-radius: 8px !important;
  color: #38bdf8 !important;
  padding: 0.85rem 1rem !important;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.svg-code-area:focus {
  border-color: var(--admin-cyan) !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2) !important;
}

.svg-editor-wrapper {
  width: 100%;
  box-sizing: border-box;
}

.custom-icon-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.9rem 1.15rem;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.custom-icon-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.custom-icon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 1rem;
  flex-wrap: wrap;
}

.custom-icon-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-icon-badge {
  font-size: 0.85rem;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-cyan);
}

.custom-icon-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
}

.custom-icon-subtitle {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  margin-top: 0.15rem;
}

.custom-icon-body-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.custom-icon-editor-col {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.custom-icon-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  min-width: 90px;
  padding: 0.65rem 0.5rem;
  background: #020617;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-sizing: border-box;
}

#custom-icon-direct-preview {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#custom-icon-direct-preview svg {
  width: 100%;
  height: 100%;
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
}

.custom-icon-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.2s ease;
}

.custom-icon-status-badge.custom-active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--admin-cyan);
  border-color: rgba(6, 182, 212, 0.4);
}

.svg-studio-interactive-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.interactive-stage-card,
.thumbnail-preview-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.stage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stage-header-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
}

.stage-click-badge {
  font-family: "Chakra Petch", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--admin-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.interactive-monster-box {
  height: 190px;
  border-radius: 8px;
  background: radial-gradient(
    circle at 50% 60%,
    rgba(6, 182, 212, 0.08) 0%,
    rgba(2, 6, 23, 0.8) 70%
  );
  border: 1px dashed rgba(6, 182, 212, 0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.interactive-monster-box:hover {
  border-color: var(--admin-cyan);
  box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.1);
}

.test-pedestal {
  position: absolute;
  bottom: 15px;
  width: 140px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(6, 182, 212, 0.4) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.test-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.test-monster-target {
  width: 100%;
  height: 100%;
  max-width: 170px;
  max-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.1s;
}

.test-monster-target svg {
  width: 100%;
  height: 100%;
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
}

.test-monster-target .three-monster-viewport {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  pointer-events: auto !important;
}

.interactive-monster-box:has(.three-monster-viewport) {
  height: 300px;
}

.interactive-monster-box:has(.three-monster-viewport) .test-pedestal,
.interactive-monster-box:has(.three-monster-viewport) .test-glow,
.interactive-monster-box:has(.three-monster-viewport)
  #test-crack-overlay-container {
  display: none !important;
}

.interactive-monster-box:has(.three-monster-viewport) .test-monster-target {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto !important;
}

.three-monster-viewport canvas {
  pointer-events: auto !important;
}

.card-thumbnail-box {
  height: 100px;
  border-radius: 8px;
  background: #020617;
  border: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-thumbnail-box svg {
  width: 100%;
  height: 100%;
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
}

.stage-hint {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.5rem;
  text-align: center;
}

.badge-mini {
  font-size: 0.65rem;
  color: var(--admin-text-muted);
  background: #020617;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.btn-toggle-custom-icon {
  background: transparent;
  border: none;
  color: var(--admin-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.quick-swatches {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.swatch-lbl {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  margin-right: 0.2rem;
}

.swatch-btn {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.15s;
}

.swatch-btn:hover {
  transform: scale(1.2);
  border-color: #fff;
}

.color-role-lbl {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  margin-left: 0.4rem;
  white-space: nowrap;
}

.admin-modal-card form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

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

.modal-header h3 {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.btn-close-modal:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body-scroll {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: #020617;
  border: 1px solid var(--admin-border);
  color: #fff;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--admin-cyan);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.hint {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.3rem;
}

.color-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.color-input-wrapper input[type="color"] {
  width: 42px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.anim-preview-bar {
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.anim-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.15);
  color: var(--admin-cyan);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.anim-desc {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}

.moderate-box {
  background: #020617;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Toast Container */
.admin-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  background: #0b0f19;
  border: 1px solid var(--admin-cyan);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slide-in 0.3s ease;
}

.admin-toast.error {
  border-color: #ef4444;
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    left: -280px;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    z-index: 1000;
  }
  .admin-sidebar.open {
    left: 0;
  }
  .btn-mobile-sidebar {
    display: inline-block;
  }
  .svg-studio-interactive-grid {
    grid-template-columns: 1fr;
  }
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   RESTART ROUND MODAL
   ========================================================= */
.restart-preview-box {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.restart-game-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
}

.restart-game-icon {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.restart-game-icon svg {
  width: 100%;
  height: 100%;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
}

.restart-round-progression {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: #020617;
  padding: 1.25rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
}

.prog-item {
  text-align: center;
}

.prog-item .lbl {
  display: block;
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.prog-item .val {
  font-family: "Chakra Petch", monospace;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.prog-item.next .val {
  color: var(--admin-green);
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.prog-arrow {
  font-size: 1.5rem;
  color: var(--admin-cyan);
}

.restart-warning-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.restart-warning-box .warning-title {
  color: var(--admin-gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.restart-warning-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.restart-warning-box li {
  margin-bottom: 0.4rem;
}

/* =========================================================
   STUDIO 3D VECTORIEL PUR SVG STYLES
   ========================================================= */

.studio-mode-switcher {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--admin-border);
  margin-bottom: 1.25rem;
}

.studio-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.studio-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.studio-tab-btn.active {
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.2) 0%,
    rgba(59, 130, 246, 0.15) 100%
  );
  color: var(--admin-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.badge-3d-glow {
  font-family: "Chakra Petch", monospace;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, #00f0ff, #ff0055);
  color: #000;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  animation: pulse 2s infinite;
}

.studio-3d-group {
  margin-bottom: 1rem;
}

.studio-3d-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.6rem;
}

.studio-3d-hint {
  font-size: 0.7rem;
  font-weight: 400;
  color: #64748b;
}

.studio-3d-models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
}

.studio-3d-model-btn {
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.studio-3d-model-btn:hover {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(15, 23, 42, 0.8);
}

.studio-3d-model-btn.active {
  border-color: var(--admin-cyan);
  background: rgba(6, 182, 212, 0.12);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.2);
}

.model-btn-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.model-btn-info strong {
  display: block;
  font-size: 0.78rem;
  color: #fff;
}

.model-btn-info small {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
}

.studio-3d-shaders-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.studio-3d-shader-btn {
  background: #0b0f19;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-3d-shader-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.studio-3d-shader-btn.active {
  border-color: var(--admin-cyan);
  background: rgba(6, 182, 212, 0.15);
  color: var(--admin-cyan);
}

.shader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.studio-3d-interactive-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1rem;
}

.studio-3d-viewport-card {
  display: flex;
  flex-direction: column;
  background: #020617;
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 10px;
  overflow: hidden;
}

.studio-3d-viewport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.viewport-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
}

.btn-reset-view-3d {
  background: transparent;
  border: 1px solid var(--admin-border);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-view-3d:hover {
  color: #fff;
  border-color: var(--admin-cyan);
}

.studio-3d-canvas-wrap {
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(6, 182, 212, 0.08) 0%,
    #020617 75%
  );
  user-select: none;
}

.studio-3d-canvas-wrap svg {
  width: 100%;
  height: 100%;
  max-width: 280px;
  max-height: 250px;
}

.studio-3d-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.85rem;
  background: rgba(15, 23, 42, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: #64748b;
}

.stat-cyan {
  color: var(--admin-cyan);
}
.stat-green {
  color: var(--admin-green);
}
.stat-white {
  color: #f1f5f9;
}

.studio-3d-controls-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.studio-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}

.slider-val-badge {
  font-family: "Chakra Petch", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--admin-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

.admin-range-slider {
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: #1e293b;
  accent-color: var(--admin-cyan);
  cursor: pointer;
  outline: none;
}

.highlight-3d-toggle {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

.toggle-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.toggle-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-cyan);
  margin-top: 0.15rem;
  cursor: pointer;
}

.toggle-checkbox-label strong {
  display: block;
  font-size: 0.78rem;
  color: var(--admin-cyan);
}

.toggle-checkbox-label p {
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0.2rem 0 0 0;
  line-height: 1.35;
}

.studio-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.2rem 0;
}

.toggle-sub-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.73rem;
  color: #cbd5e1;
  cursor: pointer;
}

.toggle-sub-item input[type="checkbox"] {
  accent-color: var(--admin-cyan);
  cursor: pointer;
}

.studio-3d-actions-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.btn-3d-inject-primary {
  width: 100%;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #000;
  border: none;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-3d-inject-primary:hover {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
}

.btn-3d-action-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-3d-action-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #64748b;
  color: #fff;
}

@media (max-width: 900px) {
  .studio-3d-interactive-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   AI PROMPT GENERATOR SECTION IN STUDIO
   ========================================================= */
.ai-prompt-header-box {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.12) 0%,
    rgba(236, 72, 153, 0.08) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.ai-prompt-header-left {
  flex: 1;
  min-width: 260px;
}

.ai-prompt-badge {
  display: inline-block;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.ai-prompt-title {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem 0;
}

.ai-prompt-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.ai-prompt-header-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 220px;
}

.btn-ai-copy-main {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-ai-copy-main:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.btn-ai-demo-inject {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--admin-cyan);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-ai-demo-inject:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: var(--admin-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.ai-custom-desc-box {
  background: #020617;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.ai-quick-tag-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-ai-tag {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ai-tag:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
  border-color: #c084fc;
}

.ai-text-input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-family: inherit;
  font-size: 0.85rem !important;
  background: #0f172a !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  border-radius: 8px;
  color: #fff !important;
  padding: 0.6rem 0.85rem !important;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.ai-text-input:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.2) !important;
}

.ai-desc-textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-family: inherit;
  font-size: 0.82rem !important;
  line-height: 1.5;
  background: #0f172a !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  border-radius: 8px;
  color: #e2e8f0 !important;
  padding: 0.75rem 0.9rem !important;
  resize: vertical;
  min-height: 75px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.ai-desc-textarea:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.2) !important;
}

.btn-ai-clear-desc {
  background: none;
  border: none;
  color: #c084fc;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.72rem;
  transition: color 0.2s;
}

.btn-ai-clear-desc:hover {
  color: #f472b6;
}

.ai-prompt-preview-wrap {
  background: #020617;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ai-prompt-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.ai-prompt-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #c084fc;
  font-weight: 600;
}

.btn-copy-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-mini:hover {
  background: rgba(139, 92, 246, 0.4);
  border-color: #c084fc;
}

.ai-prompt-code {
  width: 100%;
  background: transparent;
  color: #e2e8f0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  line-height: 1.5;
  border: none;
  padding: 0.9rem;
  resize: vertical;
  min-height: 240px;
  outline: none;
  box-sizing: border-box;
}

/* =========================================================================
   READ-ONLY 3D PREVIEW MODAL (👁 Visualiser)
   ========================================================================= */
.preview-modal-card {
  max-width: 1100px;
  width: 96vw;
  max-height: 94vh;
}

.preview-header-identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.preview-header-emoji {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.45));
}

.preview-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.preview-readonly-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--admin-gold);
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.preview-stage {
  --preview-theme: #06b6d4;
  --preview-accent: #38bdf8;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.25rem 0.9rem;
  border-right: 1px solid var(--admin-border);
  background:
    radial-gradient(
      ellipse at 50% 42%,
      color-mix(in srgb, var(--preview-theme) 22%, transparent) 0%,
      transparent 62%
    ),
    linear-gradient(180deg, #060a14 0%, #030712 100%);
}

.preview-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.preview-viewport-wrap {
  flex: 1;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-anim-target {
  width: 100%;
  height: 100%;
  min-height: 380px;
  aspect-ratio: 1 / 1;
  max-height: 62vh;
  will-change: transform, filter;
  border-radius: 14px;
  overflow: hidden;
}

.preview-viewport {
  width: 100%;
  height: 100%;
  min-height: 380px;
  position: relative;
}

.preview-viewport canvas {
  border-radius: 14px;
}

.preview-svg-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.preview-svg-fallback svg {
  max-width: 100%;
  max-height: 100%;
}

.preview-error {
  color: var(--admin-red);
  font-size: 0.85rem;
  font-family: "JetBrains Mono", monospace;
  padding: 1rem;
  text-align: center;
}

.preview-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 0.6rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--admin-text-muted);
}

.preview-readout strong {
  color: var(--admin-cyan);
  font-weight: 700;
}

.preview-readout-hint {
  margin-left: auto;
  opacity: 0.7;
}

.preview-panel {
  padding: 1.1rem 1.35rem;
  overflow-y: auto;
  min-height: 0;
}

.preview-slider-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.preview-slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #0e7490 0%,
    #06b6d4 45%,
    #f59e0b 80%,
    #ef4444 100%
  );
  outline: none;
  cursor: pointer;
}

.preview-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f8fafc;
  border: 3px solid var(--admin-cyan);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.75);
  cursor: grab;
}

.preview-slider-row input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f8fafc;
  border: 3px solid var(--admin-cyan);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.75);
  cursor: grab;
}

.preview-slider-value {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--admin-text-muted);
}

.preview-slider-value input[type="number"] {
  width: 76px;
  background: #0f172a;
  border: 1px solid var(--admin-border);
  color: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  text-align: right;
}

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.preview-chip {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--admin-cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preview-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--admin-cyan);
  transform: translateY(-1px);
}

.preview-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.preview-toggle-row code {
  font-size: 0.72rem;
  color: var(--admin-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.preview-btn-hit {
  padding: 0.55rem 1.1rem;
}

.preview-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.preview-icon-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.6rem 0.4rem;
  min-height: 92px;
  justify-content: center;
}

.preview-icon-box small {
  font-size: 0.62rem;
  color: var(--admin-text-muted);
  font-family: "JetBrains Mono", monospace;
  text-align: center;
}

.preview-icon-emoji {
  font-size: 2.2rem;
  line-height: 1;
}

.preview-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-icon-svg.lg {
  width: 64px;
  height: 64px;
}
.preview-icon-svg.sm {
  width: 32px;
  height: 32px;
}
.preview-icon-svg svg {
  width: 100%;
  height: 100%;
}

.preview-icon-missing {
  color: var(--admin-text-muted);
}

.preview-icon-swatches {
  display: flex;
  gap: 0.35rem;
}

.preview-icon-swatches span {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

.preview-prize {
  margin: 0.8rem 0 0;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  line-height: 1.45;
}

.preview-prize strong {
  color: var(--admin-gold);
}

.preview-footer {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .preview-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .preview-stage {
    border-right: none;
    border-bottom: 1px solid var(--admin-border);
  }

  .preview-viewport-wrap,
  .preview-anim-target,
  .preview-viewport {
    min-height: 300px;
  }

  .preview-panel {
    overflow: visible;
  }

  .preview-icons {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-readonly-badge {
    display: none;
  }
}

/* ---- Anti-cheat v2: manual winner review ---- */
.status-tag.paused {
  background: rgba(100, 116, 139, 0.18);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.4);
}
.status-tag.review-tag {
  display: inline-block;
  margin-top: 0.35rem;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  font-size: 0.65rem;
}
.ac-toggle {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
}
.ac-score {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
}
.ac-report-row td {
  background: rgba(15, 23, 42, 0.6);
  padding: 0 !important;
}
.ac-report {
  padding: 1rem 1.25rem;
  border-left: 3px solid #38bdf8;
}
.ac-report-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.ac-report-head code {
  font-size: 0.75rem;
  color: #94a3b8;
}
.ac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.5rem 1rem;
}
.ac-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.4rem 0.6rem;
  background: rgba(30, 41, 59, 0.7);
  border-radius: 6px;
}
.ac-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted);
}
.ac-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
}
.ac-flags {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}
.ac-flag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid;
}
.ac-flag.hard {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.1);
}
.ac-flag.soft {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.1);
}
.ac-flag.ok {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.1);
}
.ac-ua {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: #64748b;
  word-break: break-all;
}

/* ============================================================
   LIVE CHAT CONSOLE (tab-chats)
   ============================================================ */
.chat-live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
  margin-left: 0.4rem;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
}
.chat-live-dot.is-live {
  background: var(--admin-green);
  animation: chat-live-pulse 1.8s ease-out infinite;
}
@keyframes chat-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }
  100% {
    box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
  }
}

.chat-filter-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
  min-width: 220px;
  outline: none;
}
.chat-filter-input:focus {
  border-color: var(--admin-cyan);
}

.chat-admin-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
  height: calc(100vh - 230px);
  min-height: 480px;
}

.chat-panel {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--admin-text-muted);
  flex-shrink: 0;
}
.chat-panel-meta {
  font-weight: 500;
  letter-spacing: 0;
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-room-head {
  padding: 0.6rem 0.75rem 0.6rem 1rem;
}
.chat-room-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}
.chat-room-select {
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  max-width: 100%;
  cursor: pointer;
}
.chat-room-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.btn-danger-outline {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--admin-red);
}

.chat-feed-list,
.chat-room-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}
.chat-empty {
  margin: auto;
  padding: 2rem;
  color: var(--admin-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Feed items */
.chat-feed-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 0.6rem;
  align-items: start;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.chat-feed-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.chat-feed-item.is-selected {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.06);
}
.chat-feed-item.is-admin {
  background: rgba(251, 191, 36, 0.06);
}
.chat-feed-room {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--admin-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 2px;
}
.chat-feed-icon {
  margin-right: 0.3rem;
}
.chat-feed-body {
  min-width: 0;
}
.chat-feed-head {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.chat-feed-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--admin-text-main);
}
.chat-feed-item.is-admin .chat-feed-author {
  color: var(--admin-gold);
}
.chat-feed-time,
.chat-room-time {
  font-size: 0.7rem;
  color: var(--admin-text-muted);
  font-variant-numeric: tabular-nums;
}
.chat-feed-text,
.chat-room-text {
  font-size: 0.85rem;
  color: #cbd5e1;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.chat-del-btn {
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  opacity: 0.55;
  transition:
    opacity 0.15s,
    background 0.15s,
    color 0.15s;
}
.chat-feed-item:hover .chat-del-btn,
.chat-room-msg:hover .chat-del-btn {
  opacity: 1;
}
.chat-del-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

/* Room messages */
.chat-room-msg {
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.chat-room-msg.is-admin {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.3);
  margin-left: 1.5rem;
}
.chat-room-msg-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chat-room-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--admin-text-main);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-admin-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: var(--admin-gold);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

/* Reply bar */
.chat-reply-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--admin-border);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.chat-reply-as {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--admin-gold);
  white-space: nowrap;
}
.chat-reply-bar input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  font-size: 0.88rem;
  outline: none;
}
.chat-reply-bar input:focus {
  border-color: var(--admin-gold);
}

@media (max-width: 1100px) {
  .chat-feed-item {
    grid-template-columns: 1fr auto;
  }
  .chat-feed-room {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .chat-admin-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .chat-panel {
    height: 60vh;
    min-height: 360px;
  }
  .chat-filter-input {
    min-width: 0;
    width: 100%;
  }
  .chat-reply-as {
    display: none;
  }
  .chat-room-msg.is-admin {
    margin-left: 0.5rem;
  }
}
