/* ─── RESET & BASE ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #e91e63;
  --primary-dark: #c2185b;
  --primary-light: #fce4ec;
  --sidebar-bg: #1a1a2e;
  --sidebar-hover: #16213e;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --border: #e0e0e0;
  --success: #4caf50;
  --warning: #ff9800;
  --danger: #f44336;
  --info: #2196f3;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ─── LOGIN SCREEN ─── */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 400px;
}

.login-logo {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

.error-msg { color: var(--danger); margin-top: 1rem; text-align: center; font-size: 0.9rem; }

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

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav { padding: 1rem 0; }

.nav-item {
  display: block;
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item:hover, .nav-item.active {
  background: var(--sidebar-hover);
  color: white;
}

.badge {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

.badge-lg {
  background: var(--primary);
  color: white;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 12px;
}

.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); }

.btn-logout {
  width: 100%;
  padding: 0.6rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.btn-logout:hover { background: rgba(255,255,255,0.1); }

/* Main Content */
.main-content { margin-left: 260px; flex: 1; }

.top-bar {
  background: white;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar h1 { font-size: 1.5rem; }

.content-area { padding: 2rem; }

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-label { font-size: 0.85rem; color: var(--text-light); }
.stat-value { font-size: 1.5rem; font-weight: 700; }

/* Tables */
.table-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table-card h3 { margin-bottom: 1rem; }

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

thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
}

tbody td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.no-data { text-align: center; color: var(--text-light); padding: 2rem !important; }

/* Status badges */
.status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-suspended { background: #fff3e0; color: #e65100; }
.status-banned { background: #ffebee; color: #c62828; }
.status-pending { background: #fff3e0; color: #e65100; }
.status-approved { background: #e8f5e9; color: #2e7d32; }
.status-rejected { background: #ffebee; color: #c62828; }
.status-open { background: #ffebee; color: #c62828; }
.status-resolved { background: #e8f5e9; color: #2e7d32; }
.status-reviewing { background: #e3f2fd; color: #1565c0; }

/* Action buttons */
.btn-sm {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-right: 4px;
}
.btn-view { background: var(--info); color: white; }
.btn-suspend { background: var(--warning); color: white; }
.btn-ban { background: var(--danger); color: white; }
.btn-approve { background: var(--success); color: white; }
.btn-reject { background: var(--danger); color: white; }

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-bar input {
  padding: 0.6rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  width: 300px;
}

/* Photos Grid */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.photo-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.photo-card img { width: 100%; height: 200px; object-fit: cover; }

.photo-card .photo-info {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Charts */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chart-card h3 { margin-bottom: 1rem; }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body { padding: 1.5rem; }

/* Settings */
.settings-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-card h3 { margin-bottom: 1rem; }

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.setting-item input {
  width: 100px;
  padding: 0.5rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  text-align: center;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
}

.toast {
  background: #333;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  animation: slideIn 0.3s ease;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-logo, .nav-item span, .badge { display: none; }
  .nav-item { text-align: center; font-size: 1.2rem; padding: 1rem; }
  .main-content { margin-left: 60px; }
  .stats-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}
