/* ============================================================
   ForexArena — Admin Dashboard Styles
   ============================================================ */

.admin-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg-base);
  overflow-x: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.admin-sidebar {
  width: 220px;
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  transition: transform 0.3s ease;
}
.admin-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.admin-nav {
  flex: 1;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.admin-nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.admin-nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
}
.admin-nav-item svg { flex-shrink: 0; }
.admin-sidebar-footer {
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.admin-main {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.admin-topbar {
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.admin-menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.2s;
}
.admin-topbar-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  flex: 1;
}
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.admin-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 900;
  font-family: var(--font-display);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.admin-section {
  display: none;
  padding: 1.5rem;
  flex: 1;
}
.admin-section.active { display: block; }
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.admin-section-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0;
}
.admin-search-wrap {
  position: relative;
}
.admin-search-wrap svg {
  position: absolute; left: 0.65rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================================================
   OVERVIEW STATS GRID
   ============================================================ */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}
.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.admin-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.admin-stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.admin-stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================================
   COMPETITION LIST
   ============================================================ */
.comp-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.comp-admin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.comp-admin-card:hover { border-color: var(--accent); }
.comp-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.comp-admin-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}
.comp-admin-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.comp-admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.comp-admin-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.comp-admin-stat {
  text-align: center;
}
.comp-admin-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.comp-admin-stat-value {
  font-size: 0.9rem;
  font-weight: 800;
  font-family: var(--font-mono);
}
.comp-progress {
  margin-top: 0.75rem;
}
.comp-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.comp-progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: hidden;
}
.comp-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.5s ease;
}

/* ============================================================
   PAIRS GRID
   ============================================================ */
.pairs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.pair-checkbox {
  display: none;
}
.pair-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.pair-label:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pair-checkbox:checked + .pair-label {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   OVERVIEW MINI LISTS
   ============================================================ */
.overview-comp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.overview-comp-item:last-child { border-bottom: none; }
.overview-user-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.overview-user-item:last-child { border-bottom: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .comp-admin-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .admin-main { margin-left: 0; }
  .admin-menu-btn { display: flex; }
  .admin-two-col { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
  .comp-admin-stats { grid-template-columns: repeat(2, 1fr); }
  .comp-admin-actions { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-section { padding: 1rem; }
}