:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #64748B;
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --purple: #8B5CF6;
  --blue: #3B82F6;
  --pink: #EC4899;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Utilities */
.d-none { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 24px; }

/* Login Page */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 440px;
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.8);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.logo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

.login-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.login-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #F8FAFC;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .col {
  flex: 1;
}

.hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #F1F5F9;
  color: #475569;
  border: 1px solid var(--border);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #E2E8F0;
}

.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* Alerts */
.alert {
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 14px;
}
.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}
.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #FFFFFF;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

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

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.brand-text h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
}

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

.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: right;
}

.nav-link:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.nav-link.active {
  background: #EEF2FF;
  color: var(--primary);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.admin-profile .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 14px;
}

.admin-profile .info h4 {
  font-size: 13px;
  font-weight: 700;
}

.admin-profile .info span {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-logout {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.btn-logout:hover {
  background: #FEE2E2;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 30px 40px;
  overflow-y: auto;
  max-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.topbar-title h2 {
  font-size: 24px;
  font-weight: 800;
}

.topbar-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tabs */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
}

.bg-purple { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.bg-blue { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.bg-pink { background: linear-gradient(135deg, #EC4899, #BE185D); }
.bg-emerald { background: linear-gradient(135deg, #10B981, #047857); }
.bg-amber { background: linear-gradient(135deg, #F59E0B, #B45309); }

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-info h3 {
  font-size: 24px;
  font-weight: 800;
  margin-top: 4px;
}

/* Content Cards */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: white;
  outline: none;
  font-size: 13px;
}

.filter-group {
  display: flex;
  gap: 12px;
}

.filter-group select {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: white;
  font-size: 13px;
  outline: none;
}

/* Video Grid Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-item-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.video-thumb-container {
  position: relative;
  width: 100%;
  height: 170px;
  background-color: #0F172A;
  overflow: hidden;
}

.video-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-badge-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.video-thumb-container:hover .play-badge-overlay {
  opacity: 1;
}

.play-circle {
  width: 48px;
  height: 48px;
  background: white;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.age-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #FBBF24;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.category-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--primary);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.video-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-main);
}

.video-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  flex: 1;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid #F1F5F9;
}

.video-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.video-actions-sub {
  display: flex;
  gap: 8px;
}

.btn-icon-sm {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-block-sm {
  width: 100%;
  padding: 9px 12px;
}

.video-actions-sub .btn-icon-sm {
  flex: 1;
}

.btn-icon-sm:hover {
  background: #F1F5F9;
}

.btn-delete {
  color: #EF4444;
  border-color: #FECACA;
}

.btn-delete:hover {
  background: #FEE2E2;
  color: var(--danger);
  border-color: #FCA5A5;
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
}

.data-table th {
  background: #F8FAFC;
  padding: 12px 16px;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

.data-table tr:hover td {
  background: #F8FAFC;
}

.badge-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 580px;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.preview-card-extended {
  max-width: 820px;
  width: 95%;
  padding: 20px;
  background: #1E293B;
  color: white;
  border-radius: var(--radius-md);
}

.preview-grid-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .preview-grid-layout {
    grid-template-columns: 1fr;
  }
}

.preview-video-pane {
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-video-element {
  width: 100%;
  max-height: 520px;
  border-radius: var(--radius-sm);
  background: #000;
}

.preview-comments-pane {
  background: #0F172A;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  height: 520px;
  display: flex;
  flex-direction: column;
}

.preview-comments-pane .pane-header {
  border-bottom: 1px solid #334155;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.preview-comments-pane .pane-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-comments-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.video-comment-item-card {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 12px;
}

.comment-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.author-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar-tag-emoji {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.author-tag strong {
  font-size: 13px;
  color: #FBBF24;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-date-tag {
  font-size: 11px;
  color: #94A3B8;
}

.btn-delete-comment-card {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-comment-card:hover {
  background: #EF4444;
  color: white;
}

.comment-item-body p {
  font-size: 13px;
  color: #E2E8F0;
  line-height: 1.4;
  margin: 0;
}

.empty-video-comments {
  text-align: center;
  padding: 40px 10px;
  color: #94A3B8;
}

.empty-video-comments p {
  margin-top: 8px;
  font-size: 13px;
}

.btn-comments-preview {
  background: rgba(99, 102, 241, 0.1);
  color: #6366F1;
  border-color: rgba(99, 102, 241, 0.2);
}

.btn-comments-preview:hover {
  background: #6366F1;
  color: white;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.upload-filename {
  font-size: 12px;
  color: var(--success);
  margin-right: 8px;
  font-weight: 600;
}

.thumb-preview-container {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.thumb-preview-img {
  width: 140px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Comments Admin Table */
.user-meta-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-emoji {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: #EEF2F6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.video-info-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thumb-mini {
  width: 38px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.video-title-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-bubble-admin {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-main);
  max-width: 320px;
  line-height: 1.4;
}

.bg-indigo {
  background: #4F46E5 !important;
  color: white !important;
}

/* ========================================================
   MINI-GAMES MANAGEMENT STYLES (Admin)
======================================================== */
.games-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.game-item-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
}

.game-item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.game-item-card.is-disabled {
  opacity: 0.72;
  background: #F8FAFC;
}

.game-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.game-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #EEF2F6;
  border: 1.5px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-sm);
}

.game-title-info h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.game-key-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
}

.game-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.game-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill-frequency {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.pill-age {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.pill-status-active {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.pill-status-inactive {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.game-desc-p {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 18px;
  flex: 1;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}

/* iOS Style Switch Toggle */
.ios-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ios-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #CBD5E1;
  border-radius: 24px;
  transition: .3s;
}

.ios-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ios-switch input:checked + .ios-slider {
  background-color: #10B981;
}

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

.switch-label-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.game-card-actions {
  display: flex;
  gap: 6px;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-action:hover {
  color: var(--text-main);
  background: #F1F5F9;
}

.btn-icon-action.delete:hover {
  color: #EF4444;
  border-color: #FCA5A5;
  background: #FEF2F2;
}

.toggle-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

/* Quick Settings Box inside Game Cards */
.game-quick-settings {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.quick-settings-title {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

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

.quick-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-inputs-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-num-input {
  width: 70px;
  padding: 6px 8px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: #1E293B;
  background: white;
  transition: border-color 0.2s;
}

.quick-num-input:focus {
  border-color: var(--primary);
  outline: none;
}

.quick-sep {
  font-size: 12px;
  font-weight: 700;
  color: #94A3B8;
}

.quick-presets {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.preset-btn {
  background: white;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-btn:hover, .preset-btn.active {
  background: #EFF6FF;
  border-color: #3B82F6;
  color: #1D4ED8;
}

.btn-quick-save {
  width: 100%;
  padding: 7px 12px;
  margin-top: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: #4F46E5;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-quick-save:hover {
  background: #4338CA;
  transform: translateY(-1px);
}

.btn-quick-save.saved-success {
  background: #10B981 !important;
}

/* Modal preset buttons */
.modal-freq-presets {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.modal-freq-presets button {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-freq-presets button:hover {
  background: #E0E7FF;
  border-color: #6366F1;
  color: #4338CA;
}

/* ========================================================
   PARENTS & CHILDREN MANAGEMENT STYLES (بەڕێوەبردنی خێزان)
======================================================== */
.view-toggle-btns {
  display: flex;
  background: #E2E8F0;
  padding: 3px;
  border-radius: 10px;
  gap: 4px;
}

.view-toggle-btns .toggle-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  color: #64748B;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.view-toggle-btns .toggle-btn.active {
  background: white;
  color: #4F46E5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.family-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.family-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.family-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.08);
  border-color: #C7D2FE;
}

.parent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #E2E8F0;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.parent-info-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.parent-avatar-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

.parent-meta h4 {
  font-size: 16px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 3px;
}

.parent-phone-text {
  font-size: 13px;
  color: #64748B;
  direction: ltr;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 6px;
}

.parent-pin-tag {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.parent-card-actions {
  display: flex;
  gap: 6px;
}

.btn-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.btn-icon-circle:hover {
  background: #EEF2FF;
  border-color: #6366F1;
  color: #4F46E5;
}

.btn-icon-circle.danger:hover {
  background: #FEE2E2;
  border-color: #EF4444;
  color: #DC2626;
}

.children-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.btn-add-child-sm {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-add-child-sm:hover {
  background: #10B981;
  color: white;
}

.children-chips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.child-chip-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}

.child-chip-card:hover {
  background: #F1F5F9;
}

.child-chip-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.child-chip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: white;
  border: 1px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}

.child-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-chip-name {
  font-size: 14px;
  font-weight: 800;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.child-chip-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.tag-time-limit {
  background: #E0E7FF;
  color: #4338CA;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.child-chip-actions {
  display: flex;
  gap: 4px;
}

.family-card-inactive {
  border-color: #FCA5A5 !important;
  background: #FFF5F5 !important;
  opacity: 0.85;
}

.child-chip-inactive {
  border-color: #FECDD3 !important;
  background: #FFF1F2 !important;
  opacity: 0.85;
}

/* ========================================================
   ADMIN REWARDS & GAMIFICATION MANAGEMENT STYLES
   ======================================================== */

.rewards-admin-header {
  background: white;
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.rewards-subtabs {
  display: flex;
  gap: 8px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
}

.subtab-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.subtab-btn:hover {
  color: var(--primary);
}

.subtab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Avatars Grid in Admin */
.admin-avatars-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-avatar-card {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.admin-avatar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.admin-avatar-card.is-inactive {
  opacity: 0.6;
  border-style: dashed;
}

.admin-avatar-status-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
}

.tag-active {
  background: #D1FAE5;
  color: #065F46;
}

.tag-inactive {
  background: #FEE2E2;
  color: #991B1B;
}

.avatar-preview-circle {
  width: 70px;
  height: 70px;
  border-radius: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

.avatar-preview-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-avatar-title {
  font-size: 15px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 2px;
}

.admin-avatar-key {
  font-size: 11px;
  color: #94A3B8;
  font-family: monospace;
  margin-bottom: 8px;
}

.admin-avatar-cost-pill {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #B45309;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-avatar-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-card-action {
  flex: 1;
  padding: 7px 0;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-card-edit {
  background: #EEF2FF;
  color: #4F46E5;
  border-color: #C7D2FE;
}

.btn-card-edit:hover {
  background: #E0E7FF;
}

.btn-card-del {
  background: #FEF2F2;
  color: #EF4444;
  border-color: #FECACA;
  flex: 0 0 34px;
}

.btn-card-del:hover {
  background: #FEE2E2;
}

.btn-card-toggle {
  background: #F1F5F9;
  color: #475569;
  border-color: #CBD5E1;
  flex: 0 0 34px;
}

/* Badges List in Admin */
.admin-badges-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.admin-badge-card {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-badge-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #EEF2FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.badge-details h4 {
  font-size: 14px;
  font-weight: 800;
  color: #1E293B;
  margin: 0 0 2px 0;
}

.badge-details p {
  font-size: 11px;
  color: #64748B;
  margin: 0;
}

.badge-req-tag {
  font-size: 10px;
  font-weight: 800;
  color: #D97706;
  margin-top: 2px;
  display: inline-block;
}

/* Color Picker Row */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-row input[type="color"] {
  width: 40px;
  height: 38px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
}

.color-picker-row input[type="text"] {
  flex: 1;
}

/* Quick Star Grant Presets in Admin */
.grant-quick-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.grant-quick-presets button {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #B45309;
  font-weight: 800;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.grant-quick-presets button:hover {
  background: #FDE68A;
}

.btn-preset-deduct {
  background: #FEE2E2 !important;
  border-color: #FECACA !important;
  color: #DC2626 !important;
}

.grant-target-banner {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.target-emoji {
  font-size: 32px;
}

.text-amber {
  color: #D97706;
}

.btn-grant-fast {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #B45309;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 4px;
}

.btn-grant-fast:hover {
  background: #FDE68A;
}

/* Star Reward Rules Settings Panel */
.reward-rules-form {
  padding: 10px 0;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.rule-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.rule-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.rule-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.rule-body {
  flex: 1;
}

.rule-body label {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.rule-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  margin-bottom: 14px;
}

.input-with-badge {
  display: flex;
  align-items: center;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 4px 12px;
  width: 100%;
  transition: border-color 0.2s ease;
}

.input-with-badge:focus-within {
  border-color: #6366F1;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.rule-number-input {
  border: none !important;
  background: transparent !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #1E293B !important;
  width: 100px !important;
  padding: 8px 4px !important;
  outline: none !important;
}

.input-suffix {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin-right: auto;
}

/* Presets */
.presets-box {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.presets-label {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.presets-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-preset {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset:hover {
  background: #6366F1;
  color: #FFFFFF;
  border-color: #6366F1;
}

.save-status-text {
  font-size: 14px;
  font-weight: 700;
  color: #10B981;
}

/* ========================================================
   ADMIN STAFF & PERMISSIONS STYLES
   ======================================================== */

.staff-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.role-super {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.role-editor {
  background: rgba(99, 102, 241, 0.15);
  color: #4F46E5;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.role-moderator {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.role-support {
  background: rgba(236, 72, 153, 0.15);
  color: #DB2777;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.role-custom {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.perm-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
  display: inline-block;
}

.perm-all {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
  font-weight: 800;
}

.perm-none {
  background: #FEE2E2;
  color: #991B1B;
}

.row-inactive {
  opacity: 0.6;
  background: rgba(0, 0, 0, 0.02);
}

/* Modal lg */
.modal-lg {
  max-width: 750px !important;
  width: 95% !important;
}

/* Permissions Checkbox Grid in Modal */
.permissions-section-box {
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 16px;
}

.perms-quick-btns {
  display: flex;
  gap: 6px;
}

.btn-xs-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-xs-select:hover {
  background: #6366F1;
  color: white;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.perm-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.perm-checkbox-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.perm-checkbox-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6366F1;
  cursor: pointer;
}

.perm-card-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.perm-card-inner i {
  font-size: 14px;
  color: #818CF8;
}

.perm-card-inner strong {
  display: block;
  font-size: 11px;
  color: #F8FAFC;
}

/* Video Frame Picker Widget */
.frame-picker-container {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
}

.frame-picker-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.frame-picker-title {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}

.frame-picker-subtitle {
  font-size: 11px;
  color: #64748B;
}

.frame-video-preview-wrapper {
  position: relative;
  width: 100%;
  max-width: 260px;
  height: 150px;
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.frame-video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame-range-slider {
  width: 100%;
  height: 6px;
  accent-color: var(--primary);
  border-radius: 4px;
  cursor: pointer;
}

.btn-grant-fast {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  border: none;
  font-weight: 800;
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 4px;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.btn-grant-fast:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
}





