/* ===== DASHBOARD STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700;800&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --primary: #7c3aed;
  --primary-light: #a855f7;
  --primary-dark: #5b21b6;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --bg-base: #050510;
  --bg-sidebar: rgba(8, 8, 22, 0.98);
  --bg-card: rgba(15, 15, 35, 0.85);
  --bg-card-hover: rgba(22, 22, 48, 0.95);
  --bg-input: rgba(255, 255, 255, 0.04);
  --border: rgba(124, 58, 237, 0.2);
  --border-hover: rgba(168, 85, 247, 0.5);
  --border-light: rgba(255, 255, 255, 0.06);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.25);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient-green: linear-gradient(135deg, #22c55e, #16a34a);
  --gradient-red: linear-gradient(135deg, #ef4444, #dc2626);
  --gradient-orange: linear-gradient(135deg, #f97316, #ea580c);
  --gradient-yellow: linear-gradient(135deg, #eab308, #ca8a04);
  --sidebar-w: 260px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LIGHT MODE PREVIEW FIXES (PREMIUM) ===== */
:root.light-mode {
  --bg-base: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(124, 58, 237, 0.3);
  --border-light: rgba(0, 0, 0, 0.04);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.08);
  --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.05), 0 4px 10px rgba(0, 0, 0, 0.03);
}

.light-mode .g-sidebar {
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.03);
}

.light-mode .g-logo-text {
  color: #0f172a;
}

.light-mode .sidebar-logo-sub {
  color: #64748b;
  opacity: 0.9;
}

.light-mode .sidebar-section-title {
  color: #94a3b8;
  font-weight: 800;
}

.light-mode .g-nav-link {
  color: #475569;
}

.light-mode .g-nav-link i {
  color: var(--primary);
  opacity: 0.85;
}

.light-mode .g-nav-link:hover {
  background: rgba(124, 58, 237, 0.06);
  color: var(--primary-dark);
}

.light-mode .g-nav-link:hover i {
  opacity: 1;
}

.light-mode .g-nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.light-mode .g-nav-link.active i {
  color: #fff;
  opacity: 1;
}

.light-mode .g-theme-trigger {
  background: #f1f5f9;
  color: #475569;
  border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .g-theme-trigger:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.light-mode .g-theme-trigger i {
  color: var(--orange);
}

.light-mode .sidebar-user {
  background: #f8fafc !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.light-mode .sidebar-user-name {
  color: #0f172a;
}

.light-mode .sidebar-user-role {
  color: #64748b;
}

.light-mode .topbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.light-mode .topbar-title {
  color: #0f172a;
}

.light-mode .stat-icon-1 {
  background: rgba(124, 58, 237, 0.08);
}

.light-mode .stat-icon-2 {
  background: rgba(6, 182, 212, 0.08);
}

.light-mode .stat-icon-3 {
  background: rgba(34, 197, 94, 0.08);
}

.light-mode .stat-icon-4 {
  background: rgba(249, 115, 22, 0.08);
}

.light-mode .stat-value {
  color: #0f172a;
}

.light-mode .stat-label {
  color: #64748b;
}

.light-mode .card-title {
  color: #0f172a;
}

.light-mode .card-subtitle {
  color: #64748b;
}

.light-mode .topbar-search input {
  background: #f1f5f9;
  color: #0f172a;
}

.light-mode .topbar-search input::placeholder {
  color: #94a3b8;
}

.light-mode table th {
  color: #0f172a;
  background: #f8fafc;
}

.light-mode table td {
  color: #334155;
}

.light-mode tr:hover td {
  background: #f8fafc;
}

.light-mode .btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.1);
}

.light-mode .action-btn {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.05);
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Exo 2', sans-serif;
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  direction: rtl;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #0a0a1f;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* ===== GLOBAL LAYOUT ===== */
.main-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ===== SIDEBAR (Aligned with Global) ===== */
.g-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 35px 25px;
  z-index: 1000;
  overflow-y: auto;
  transition: var(--transition);
}

.g-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 25px;
}

.g-logo i {
  font-size: 2rem;
  color: var(--primary-light);
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.4));
}

.g-logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.sidebar-logo-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 400;
}

.g-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  margin-top: 10px;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0 10px;
  margin: 15px 0 5px;
}

.g-nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: right;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
}

.g-nav-link i {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
  color: var(--primary-light);
  opacity: 0.7;
}

.g-nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(-3px);
}

.g-nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

.g-nav-link.active i {
  color: #fff;
  opacity: 1;
}

.sidebar-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
}

.g-theme-trigger {
  margin-top: 20px;
  padding: 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.g-theme-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: var(--primary-light);
}

/* ===== MAIN CONTENT (Aligned with Global) ===== */
.content-wrapper {
  margin-right: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-w));
  display: flex;
  flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
  height: 68px;
  background: rgba(5, 5, 16, 0.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 20px;
}

.topbar-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

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

.topbar-search {
  position: relative;
}

.topbar-search input {
  width: 240px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 9px 40px 9px 18px;
  color: var(--text);
  font-family: 'Exo 2', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
  direction: rtl;
}

.topbar-search input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.topbar-search input::placeholder {
  color: var(--text-dim);
}

.topbar-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.topbar-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}

.topbar-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--border-hover);
  color: var(--text);
}

.topbar-notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-base);
}

/* ===== PAGE CONTENT ===== */
.page {
  padding: 28px;
  flex: 1;
  display: none;
}

.page.active {
  display: block;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

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

.stat-card:nth-child(1)::before {
  background: var(--primary);
}

.stat-card:nth-child(2)::before {
  background: var(--accent);
}

.stat-card:nth-child(3)::before {
  background: var(--green);
}

.stat-card:nth-child(4)::before {
  background: var(--orange);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

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

.stat-icon-1 {
  background: linear-gradient(135deg, #7c3aed22, #7c3aed44);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.stat-icon-2 {
  background: linear-gradient(135deg, #06b6d422, #06b6d444);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.stat-icon-3 {
  background: linear-gradient(135deg, #22c55e22, #22c55e44);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.stat-icon-4 {
  background: linear-gradient(135deg, #f9731622, #f9731644);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

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

.stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 8px;
}

.stat-change.up {
  color: var(--green);
}

.stat-change.down {
  color: var(--red);
}

/* ===== GRID LAYOUT ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

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

.card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.card-body {
  padding: 20px 22px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  border-bottom: 1px solid var(--border);
}

th {
  padding: 12px 14px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

td {
  padding: 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

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

.td-game-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: rgba(124, 58, 237, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.td-game-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.td-game-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pill-active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.pill-draft {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.pill-featured {
  background: rgba(124, 58, 237, 0.15);
  color: #a855f7;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.action-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Edit / View Button */
.action-btn.view,
.action-btn.edit {
  color: var(--primary-light);
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.15);
}

.action-btn.view:hover,
.action-btn.edit:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

.action-btn i {
  pointer-events: none;
}

/* Delete Button */
.action-btn.delete,
.action-btn.del {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
}

.action-btn.delete:hover,
.action-btn.del:hover {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

/* Sync / Toggle Button */
.action-btn.sync {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.15);
}

.action-btn.sync:hover {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
  transform: translateY(-2px);
}

/* ===== CHART AREA ===== */
.chart-container {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 0;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--gradient-primary);
  opacity: 0.85;
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  cursor: pointer;
}

.chart-bar:hover {
  opacity: 1;
}

.chart-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ===== TOP GAMES LIST ===== */
.top-game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.top-game-item:last-child {
  border-bottom: none;
}

.top-game-rank {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
  flex-shrink: 0;
}

.top-game-rank.gold {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.3);
  color: #eab308;
}

/* ===== CUSTOM CONFIRM MODAL ===== */
.gv-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gv-confirm-overlay.active {
  opacity: 1;
  visibility: visible;
}

.gv-confirm-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gv-confirm-overlay.active .gv-confirm-card {
  transform: scale(1) translateY(0);
}

.gv-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.gv-confirm-icon.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.gv-confirm-icon.info {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.gv-confirm-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.gv-confirm-msg {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.gv-confirm-actions {
  display: flex;
  gap: 12px;
}

.gv-confirm-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.gv-btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border) !important;
}

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

.gv-btn-confirm {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.gv-btn-confirm.danger {
  background: var(--red);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.gv-btn-confirm:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.top-game-rank.bronze {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.3);
  color: #f97316;
}

.top-game-info {
  flex: 1;
}

.top-game-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.top-game-dl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.top-game-bar-wrap {
  width: 80px;
}

.top-game-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--gradient-primary);
  margin-bottom: 2px;
}

.top-game-pct {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: left;
}

/* ===== FORMS ===== */
.form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.form-overlay.active {
  opacity: 1;
  visibility: visible;
}

#gv-report-preview-modal.gv-force-show-modal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  z-index: 9999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
}

#gv-report-preview-modal.gv-force-show-modal .form-modal {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
}

.form-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: calc(var(--radius) + 4px);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: var(--transition);
  box-shadow: 0 0 60px rgba(124, 58, 237, 0.25);
}

.form-overlay.active .form-modal {
  transform: translateY(0) scale(1);
}

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

.form-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.form-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.form-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red);
  color: var(--red);
}

.form-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  direction: rtl;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-light);
  background-color: rgba(124, 58, 237, 0.05);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
  padding-left: 36px;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-select option {
  background: var(--bg-card);
  color: var(--text);
}

.light-mode .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.light-mode .form-select option {
  background: #ffffff;
  color: #1e293b;
}

.light-mode .form-modal {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.light-mode .form-header {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.07) !important;
}

.light-mode .form-title {
  color: #1e293b !important;
}

.light-mode .form-body {
  color: #1e293b;
}

.light-mode .form-footer {
  border-top-color: rgba(0, 0, 0, 0.07) !important;
  background: #f8fafc;
}

.light-mode .form-close {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #64748b !important;
}

.light-mode .form-close:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #ef4444 !important;
}

/* Report preview content inside form-body */
.light-mode .report-preview-content strong,
.light-mode .report-preview-content div[style*="color:#fff"],
.light-mode .report-preview-content div[style*="color: #fff"] {
  color: #1e293b !important;
}


.form-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.btn-grad {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

.btn-grad:hover {
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.6);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* ===== IMAGE PREVIEW ===== */
.img-preview {
  width: 100%;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.img-preview:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.img-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-preview-icon {
  font-size: 2rem;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-primary);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== SETTINGS ===== */
.settings-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.settings-item-label {
  font-weight: 600;
  margin-bottom: 3px;
}

.settings-item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input {
  display: none;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-success-ghost {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-success-ghost:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.btn-blue-ghost {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-blue-ghost:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

.light-mode .btn-success-ghost {
  background: rgba(34, 197, 94, 0.05);
  color: #16a34a;
}

.light-mode .btn-blue-ghost {
  background: rgba(59, 130, 246, 0.05);
  color: #2563eb;
}

.count-pill {
  font-family: 'Rajdhani', sans-serif;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked+.toggle-slider {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle input:checked+.toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}

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

.toast {
  background: rgba(10, 10, 34, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.88rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInLeft 0.3s ease;
  max-width: 300px;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--primary-light);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-right: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ===== PLATFORM CHIPS (matches submit-game.html) ===== */
.platform-chip {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
  user-select: none;
}

.platform-chip i {
  font-size: 1rem;
  opacity: 0.8;
  transition: transform 0.3s;
}

.platform-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.platform-chip:hover i {
  transform: scale(1.1);
  opacity: 1;
}

.platform-chip:has(input:checked) {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.platform-chip:has(input:checked) i {
  opacity: 1;
  transform: scale(1.1);
}

.platform-chip input {
  display: none;
}

/* Light mode chips */
.light-mode .platform-chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.light-mode .platform-chip:has(input:checked) {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}

/* sg-input/sg-select — extra rounded style from submit-game */
.sg-input,
.sg-select {
  border-radius: 12px !important;
}

.light-mode .sg-input,
.light-mode .sg-select,
.light-mode .form-textarea.sg-input {
  background-color: #fff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* ===== NOTIFICATIONS DROPDOWN ===== */
.notif-dropdown {
  position: absolute;
  top: 50px;
  left: -20px;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
}

.notif-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notif-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(124, 58, 237, 0.05);
}

.notif-header h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  margin: 0;
}

.notif-header h3 i {
  color: var(--primary-light);
}

.notif-header .badg {
  background: var(--red);
  color: white;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.notif-body {
  max-height: 380px;
  overflow-y: auto;
}

.notif-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--bg-hover);
}

.notif-item.unread {
  background: rgba(124, 58, 237, 0.08);
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-info {
  flex: 1;
}

.notif-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.notif-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.notif-time {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 600;
}

.light-mode .notif-dropdown {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* ===== BOTTOM NAV ===== */
@media (min-width: 901px) {
  .bottom-nav {
    display: none !important;
  }
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 68px;
  background: rgba(4, 4, 18, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.65rem;
  font-weight: 600;
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 0.3px;
  transition: var(--transition);
  padding: 8px 4px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary-light);
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 0 0 4px 4px;
}

.bottom-nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  background: transparent;
}

.bottom-nav-item:hover .bottom-nav-icon,
.bottom-nav-item.active .bottom-nav-icon {
  background: rgba(124, 58, 237, 0.18);
  color: var(--primary-light);
  transform: translateY(-2px);
}

/* Center Search Button */
.bottom-nav-center {
  position: relative;
  margin-top: -18px;
}

.bottom-nav-icon-main {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  border: 3px solid rgba(4, 4, 18, 0.9);
}

.bottom-nav-center:hover .bottom-nav-icon-main {
  box-shadow: 0 0 36px rgba(124, 58, 237, 0.75), 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: scale(1.08) translateY(-2px);
}

.bottom-nav-center span {
  color: var(--primary-light);
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-search-box {
  width: 100%;
  padding: 0 16px;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-search-overlay.active .mobile-search-box {
  transform: translateY(0);
}

.mobile-search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(12, 12, 34, 0.98);
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.25), 0 12px 40px rgba(0, 0, 0, 0.5);
}

.mobile-search-inner input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Exo 2', sans-serif;
  font-size: 1.05rem;
}

.mobile-search-inner input::placeholder {
  color: var(--text-dim);
}

.light-mode .bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  border-top-color: #e2e8f0;
}

.light-mode .mobile-search-inner {
  background: #ffffff;
  border-color: #e2e8f0;
}

.light-mode .mobile-search-inner input {
  color: #1e293b;
}

/* ===== PREMIUM CONFIRMATION & PREVIEW MODALS ===== */
.gv-confirm-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  background: rgba(4, 4, 18, 0.9) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  z-index: 2147483647 !important;
  display: none;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  padding: 20px;
  animation: gvFadeIn 0.35s ease;
  border: 4px solid #22c55e !important;
  /* DEBUG GREEN BORDER */
}

.gv-confirm-overlay.gv-force-show-modal,
.gv-confirm-overlay.active {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2147483647 !important;
  position: fixed !important;
}

.gv-confirm-card {
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 35px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: translateY(0);
  animation: gvSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.gv-confirm-icon {
  width: 70px;
  height: 70px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.gv-confirm-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.gv-confirm-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.gv-confirm-msg {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.gv-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.gv-btn-cancel,
.gv-btn-confirm {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.gv-btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

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

.gv-btn-confirm {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.gv-btn-confirm:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.gv-btn-confirm.danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

@keyframes gvFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes gvSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Specific to Report Preview content inside modal */
.report-preview-content {
  text-align: right;
  direction: rtl;
}

.badge-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ===== FORM OVERLAY & MODALS (Add Game, Inbox, Reports) ===== */
.form-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(4, 4, 18, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  z-index: 2147483646 !important;
  display: none;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  padding: 20px;
  animation: gvFadeIn 0.35s ease;
  overflow-y: auto;
  border: 4px solid #3b82f6 !important;
  /* DEBUG BLUE BORDER FOR FORMS */
}

.form-overlay.active {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2147483647 !important;
  position: fixed !important;
}

.form-modal {
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: gvSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.form-header {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.form-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.form-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.form-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.form-body {
  padding: 25px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.form-footer {
  padding: 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Ensure mobile responsiveness for forms */
@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-modal {
    max-height: 95vh;
  }
}

/* ===== ACTION BUTTONS (Tables) ===== */
.action-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.action-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn i {
  pointer-events: none;
  /* Crucial: ensures clicks hit the button, not the icon */
}

/* Specific button types themes */
.action-btn.view:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.action-btn.sync:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Ensure nothing covers the buttons */
.table-wrapper {
  position: relative;
  z-index: 1;
}

/* Settings Footer Buttons */
.btn-save-settings {
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-save-settings:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.5);
  opacity: 0.9;
}

.btn-undo-settings {
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.3s;
}

.btn-undo-settings:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.light-mode .btn-save-settings {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}

.light-mode .btn-undo-settings {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}