/* Admin Panel Styles */
.admin-body {
  background: var(--light-gray);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.admin-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.admin-header h1 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-user {
  color: var(--gray);
  font-size: 0.9rem;
}

.logout-btn {
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background: var(--primary-dark);
}

.admin-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  display: flex;
  gap: 30px;
  overflow-x: auto;
}

.nav-link {
  padding: 15px 0;
  text-decoration: none;
  color: var(--gray);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

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

.admin-content {
  flex: 1;
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-section h2 {
  margin: 0 0 30px 0;
  color: var(--dark-gray);
  font-size: 1.8rem;
}

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

.stat-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card h3 {
  margin: 0 0 10px 0;
  font-size: 2.5rem;
  color: var(--primary-color);
  font-weight: bold;
}

.stat-card p {
  margin: 0;
  color: var(--gray);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Section Controls */
.section-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.search-input,
.filter-select {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.search-input {
  flex: 1;
  min-width: 250px;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.filter-select {
  min-width: 150px;
}

/* Tables */
.data-table {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-header {
  background: var(--light-gray);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--dark-gray);
}

.table-row {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}

.table-row:hover {
  background: var(--light-gray);
}

.table-row:last-child {
  border-bottom: none;
}

.row-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.row-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.row-details h4 {
  margin: 0 0 5px 0;
  color: var(--dark-gray);
  font-size: 0.95rem;
}

.row-details p {
  margin: 0;
  color: var(--gray);
  font-size: 0.8rem;
}

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

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn.primary {
  background: var(--primary-color);
  color: var(--white);
}

.action-btn.danger {
  background: #dc3545;
  color: var(--white);
}

.action-btn.secondary {
  background: var(--gray);
  color: var(--white);
}

.action-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Settings Form */
.settings-form {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-width: 600px;
}

.settings-form h3 {
  margin: 0 0 20px 0;
  color: var(--dark-gray);
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  margin-bottom: 20px;
}

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

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
}

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

.modal-header h3 {
  margin: 0;
  color: var(--dark-gray);
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  background: var(--light-gray);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* Status badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.verified {
  background: var(--primary-color);
  color: var(--white);
}

.status-badge.banned {
  background: #dc3545;
  color: var(--white);
}

.status-badge.featured {
  background: #ffc107;
  color: var(--dark-gray);
}

.status-badge.open {
  background: #28a745;
  color: var(--white);
}

.status-badge.closed {
  background: var(--gray);
  color: var(--white);
}

/* Loading states */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray);
}

.no-data {
  text-align: center;
  padding: 40px;
  color: var(--gray);
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-header {
    padding: 15px;
  }

  .admin-header h1 {
    font-size: 1.2rem;
  }

  .admin-nav {
    padding: 0 15px;
  }

  .admin-content {
    padding: 20px 15px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card h3 {
    font-size: 2rem;
  }

  .section-controls {
    flex-direction: column;
  }

  .search-input {
    min-width: auto;
  }

  .table-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .row-actions {
    align-self: stretch;
    justify-content: flex-end;
  }
}
