/* ============================================
   CASINO7PROVIDER — Admin Panel Design System
   Premium dark-mode glassmorphism UI
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1425;
  --bg-card: #151a2e;
  --bg-card-hover: #1a2038;
  --bg-surface: rgba(255,255,255,0.03);
  --bg-glass: rgba(15,20,37,0.85);

  --border-color: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --border-focus: rgba(139,92,246,0.5);

  --text-primary: #e8eaed;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-accent: #a78bfa;

  --accent-purple: #8b5cf6;
  --accent-purple-dark: #7c3aed;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;

  --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(139,92,246,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --sidebar-width: 240px;
  --topbar-height: 64px;

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(139,92,246,0.3);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.hidden { display: none !important; }

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(16,185,129,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.05) 0%, transparent 50%);
  animation: bgPulse 15s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(5deg) scale(1.05); }
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: slideUp 0.6s var(--transition-slow) forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-purple);
  border-radius: var(--radius-md);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.logo-icon svg { width: 28px; height: 28px; }

.login-logo h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.login-logo h1 span {
  color: var(--accent-purple);
}
.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.input-group {
  margin-bottom: 24px;
}
.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}
.input-wrapper input:focus {
  border-color: var(--border-focus);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.input-wrapper input::placeholder { color: var(--text-muted); }

.btn-login {
  width: 100%;
  padding: 13px 24px;
  background: var(--gradient-purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(139,92,246,0.25);
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139,92,246,0.35);
}
.btn-login:active { transform: translateY(0); }

.login-error {
  margin-top: 16px;
  text-align: center;
  color: var(--accent-rose);
  font-size: 0.85rem;
  font-weight: 500;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-screen {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.sidebar-logo svg {
  width: 24px;
  height: 24px;
  color: var(--accent-purple);
  flex-shrink: 0;
}
.sidebar-logo b { color: var(--accent-purple); }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  text-align: left;
}
.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(139,92,246,0.12);
  color: var(--accent-purple);
}
.nav-item.logout {
  color: var(--accent-rose);
}
.nav-item.logout:hover {
  background: rgba(244,63,94,0.1);
}

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

/* --- Main Area --- */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-primary);
}

/* --- Topbar --- */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(16,185,129,0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16,185,129,0.2);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Tab Content --- */
.tab-content {
  display: none;
  padding: 28px 32px;
  animation: fadeIn 0.3s ease;
}
.tab-content.active { display: block; }

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

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base);
}
.stat-card:hover { transform: translateY(-2px); }

.stat-card.gradient-purple { background: linear-gradient(135deg, rgba(139,92,246,0.15) 0%, rgba(109,40,217,0.08) 100%); border: 1px solid rgba(139,92,246,0.2); }
.stat-card.gradient-emerald { background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(5,150,105,0.08) 100%); border: 1px solid rgba(16,185,129,0.2); }
.stat-card.gradient-amber { background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(217,119,6,0.08) 100%); border: 1px solid rgba(245,158,11,0.2); }
.stat-card.gradient-rose { background: linear-gradient(135deg, rgba(244,63,94,0.15) 0%, rgba(225,29,72,0.08) 100%); border: 1px solid rgba(244,63,94,0.2); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }

.gradient-purple .stat-icon { background: var(--gradient-purple); color: #fff; }
.gradient-emerald .stat-icon { background: var(--gradient-emerald); color: #fff; }
.gradient-amber .stat-icon { background: var(--gradient-amber); color: #fff; }
.gradient-rose .stat-icon { background: var(--gradient-rose); color: #fff; }

.stat-info { display: flex; flex-direction: column; }
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

/* ============================================
   PANELS
   ============================================ */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.panel-body {
  padding: 24px;
}

.badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(139,92,246,0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139,92,246,0.2);
}

/* ============================================
   PROVIDER BARS (Dashboard)
   ============================================ */
.provider-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.provider-bar-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.provider-bar-name {
  width: 140px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.provider-bar-track {
  flex: 1;
  height: 28px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.provider-bar-fill {
  height: 100%;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: fit-content;
}

.provider-bar-fill.bar-pragmatic { background: var(--gradient-purple); }
.provider-bar-fill.bar-pgsoft { background: var(--gradient-emerald); }
.provider-bar-fill.bar-amusnet { background: var(--gradient-amber); }
.provider-bar-fill.bar-egt { background: var(--gradient-rose); }

/* ============================================
   DATA TABLE
   ============================================ */
.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}
.data-table td {
  padding: 12px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
}
.data-table .empty-row {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

/* ============================================
   FORMS
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group.full-width { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="url"] {
  width: 100%;
  padding: 11px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
}
.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.form-group input::placeholder { color: var(--text-muted); }

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-purple);
  cursor: pointer;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-primary {
  background: var(--gradient-purple);
  color: #fff;
  box-shadow: 0 2px 12px rgba(139,92,246,0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(139,92,246,0.35);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-danger {
  background: rgba(244,63,94,0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244,63,94,0.2);
}
.btn-danger:hover { background: rgba(244,63,94,0.25); }

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

/* ============================================
   SITES LIST
   ============================================ */
.sites-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all var(--transition-base);
}
.site-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.site-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.site-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-card-title h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.site-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.site-status.active {
  background: rgba(16,185,129,0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16,185,129,0.2);
}
.site-status.inactive {
  background: rgba(244,63,94,0.12);
  color: var(--accent-rose);
  border: 1px solid rgba(244,63,94,0.2);
}

.site-card-actions {
  display: flex;
  gap: 8px;
}

.site-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.site-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-detail-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.site-detail-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.site-detail-value .copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.site-detail-value .copy-btn:hover { color: var(--accent-purple); }

.site-providers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.provider-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(139,92,246,0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(139,92,246,0.15);
}

.site-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.site-meta-item {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.site-meta-item strong {
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin-bottom: 12px; opacity: 0.4; }

/* ============================================
   GAMES TAB
   ============================================ */
.games-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.provider-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-tab:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}
.filter-tab.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}

.games-search {
  position: relative;
}
.games-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.games-search input {
  padding: 9px 16px 9px 42px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 260px;
  outline: none;
  transition: all var(--transition-fast);
}
.games-search input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.games-search input::placeholder { color: var(--text-muted); }

.games-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.games-pagination {
  display: flex;
  gap: 4px;
}
.games-pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.games-pagination button:hover { border-color: var(--border-light); }
.games-pagination button.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}
.games-pagination button:disabled {
  opacity: 0.3;
  cursor: default;
}

.admin-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.admin-game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: default;
}
.admin-game-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.admin-game-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.admin-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-game-thumb .no-thumb {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-game-info {
  padding: 10px 12px;
}
.admin-game-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.admin-game-provider {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.admin-game-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   API DOCS
   ============================================ */
.docs-content {
  max-width: 800px;
}

.doc-section {
  margin-bottom: 36px;
}
.doc-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-purple);
}
.doc-section h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-secondary);
}
.doc-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.endpoint-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.method-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(139,92,246,0.15);
  color: var(--accent-purple);
}
.method-badge.post {
  background: rgba(16,185,129,0.15);
  color: var(--accent-emerald);
}
.endpoint-box code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.code-block {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.code-block code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  white-space: pre;
  line-height: 1.7;
}

.docs-content code:not(.code-block code) {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-purple);
  background: rgba(139,92,246,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.4s var(--transition-slow);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  min-width: 280px;
}
.toast.success {
  background: rgba(16,185,129,0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16,185,129,0.25);
}
.toast.error {
  background: rgba(244,63,94,0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244,63,94,0.25);
}
.toast.info {
  background: rgba(59,130,246,0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59,130,246,0.25);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(30px); }
}

/* ============================================
   GAME TEST MODAL
   ============================================ */
.game-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.game-modal-container {
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.game-modal-topbar {
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.game-modal-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-pill {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(139,92,246,0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139,92,246,0.25);
}

.active-game-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.game-modal-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.test-bal-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.test-bal-display strong {
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.icon-btn:hover {
  color: var(--accent-purple);
  background: rgba(139,92,246,0.1);
}

.game-iframe-wrapper {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #000;
}

.game-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Card Play Button Overlay */
.admin-game-card {
  position: relative;
}

.btn-test-play {
  width: 100%;
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--gradient-purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(139,92,246,0.3);
}
.btn-test-play:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139,92,246,0.45);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .sidebar-logo span,
  .nav-item span,
  .nav-item:not(svg) { font-size: 0; }
  .sidebar-nav .nav-item { justify-content: center; padding: 12px; }
  .main-area { margin-left: 64px; }
  .topbar { padding: 0 16px; }
  .tab-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .admin-games-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .games-search input { width: 180px; }
  .game-modal-container { height: 100vh; max-width: 100vw; border-radius: 0; }
}

