/* Cool Or Cruel — Admin Dashboard Theme */

:root {
  --cc-bg: #0f1117;
  --cc-surface: #161822;
  --cc-surface-2: #1c1f2e;
  --cc-surface-3: #232738;
  --cc-border: rgba(255,255,255,0.06);
  --cc-border-hover: rgba(255,255,255,0.12);
  --cc-text: #e2e4ea;
  --cc-text-muted: #7a7f94;
  --cc-text-faint: #4e5266;
  --cc-cool: #00e5ff;
  --cc-cool-dim: rgba(0,229,255,0.1);
  --cc-cool-glow: rgba(0,229,255,0.25);
  --cc-cruel: #ec3f73;
  --cc-cruel-dim: rgba(236,63,115,0.1);
  --cc-success: #22c55e;
  --cc-success-dim: rgba(34,197,94,0.1);
  --cc-warning: #f59e0b;
  --cc-warning-dim: rgba(245,158,11,0.1);
  --cc-danger: #ef4444;
  --cc-sidebar-w: 260px;
  --cc-header-h: 64px;
  --cc-radius: 12px;
  --cc-radius-sm: 8px;
  --cc-transition: 180ms ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cc-bg);
  color: var(--cc-text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cc-cool); text-decoration: none; }
a:hover { color: #33ebff; }

/* ==================== LOGIN ==================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cc-bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: 16px;
  padding: 40px 32px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.login-logo .cool { color: var(--cc-cool); }
.login-logo .cruel { color: var(--cc-cruel); }
.login-logo .or { color: var(--cc-text-muted); margin: 0 4px; }

.login-subtitle {
  text-align: center;
  color: var(--cc-text-muted);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

/* ==================== LAYOUT ==================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--cc-sidebar-w);
  background: var(--cc-surface);
  border-right: 1px solid var(--cc-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--cc-transition);
}

.sidebar-brand {
  height: var(--cc-header-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--cc-border);
  gap: 10px;
}

.sidebar-brand h2 {
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-brand .cool { color: var(--cc-cool); }
.sidebar-brand .cruel { color: var(--cc-cruel); }

.sidebar-badge {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cc-cool);
  background: var(--cc-cool-dim);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-section {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cc-text-faint);
  padding: 12px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--cc-radius-sm);
  color: var(--cc-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--cc-transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  color: var(--cc-text);
  background: var(--cc-surface-2);
}

.sidebar-link.active {
  color: var(--cc-cool);
  background: var(--cc-cool-dim);
}

.sidebar-link i {
  font-size: 1.125rem;
  width: 22px;
  text-align: center;
}

.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--cc-cruel);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--cc-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cc-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--cc-cool);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: var(--cc-text-muted);
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: var(--cc-sidebar-w);
  min-height: 100vh;
}

.main-header {
  height: var(--cc-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--cc-border);
  background: var(--cc-surface);
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-header h1 {
  font-size: 1.125rem;
  font-weight: 600;
}

.main-body {
  padding: 28px;
}

/* ==================== CARDS ==================== */
.stat-card {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 20px 24px;
  transition: border-color var(--cc-transition);
}

.stat-card:hover {
  border-color: var(--cc-border-hover);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 14px;
}

.stat-card-icon.cool { background: var(--cc-cool-dim); color: var(--cc-cool); }
.stat-card-icon.cruel { background: var(--cc-cruel-dim); color: var(--cc-cruel); }
.stat-card-icon.success { background: var(--cc-success-dim); color: var(--cc-success); }
.stat-card-icon.warning { background: var(--cc-warning-dim); color: var(--cc-warning); }

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 0.8125rem;
  color: var(--cc-text-muted);
}

/* ==================== TABLES ==================== */
.admin-table {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  overflow: hidden;
}

.admin-table .table {
  margin: 0;
  color: var(--cc-text);
}

.admin-table .table thead th {
  background: var(--cc-surface-2);
  border-bottom: 1px solid var(--cc-border);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cc-text-muted);
  padding: 12px 16px;
}

.admin-table .table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cc-border);
  vertical-align: middle;
  font-size: 0.875rem;
}

.admin-table .table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table .table tbody tr:hover {
  background: var(--cc-surface-2);
}

/* ==================== PHOTO CARDS ==================== */
.photo-card {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  overflow: hidden;
  transition: all var(--cc-transition);
}

.photo-card:hover {
  border-color: var(--cc-border-hover);
  transform: translateY(-2px);
}

.photo-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--cc-surface-2);
}

.photo-card-body {
  padding: 14px;
}

.photo-card-user {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.photo-card-caption {
  font-size: 0.75rem;
  color: var(--cc-text-muted);
  margin-bottom: 10px;
}

.photo-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.photo-card-stats .cool { color: var(--cc-cool); }
.photo-card-stats .cruel { color: var(--cc-cruel); }

/* Progress bar */
.rating-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--cc-surface-3);
  overflow: hidden;
  display: flex;
  margin-bottom: 12px;
}

.rating-bar-cool {
  background: var(--cc-cool);
  transition: width 0.4s ease;
}

.rating-bar-cruel {
  background: var(--cc-cruel);
  transition: width 0.4s ease;
}

/* ==================== BUTTONS ==================== */
.btn-cool {
  background: var(--cc-cool);
  color: #0f1117;
  border: none;
  font-weight: 600;
}

.btn-cool:hover {
  background: #33ebff;
  color: #0f1117;
}

.btn-approve {
  background: var(--cc-success);
  color: white;
  border: none;
  font-weight: 600;
}

.btn-approve:hover { background: #16a34a; color: white; }

.btn-reject {
  background: var(--cc-cruel);
  color: white;
  border: none;
  font-weight: 600;
}

.btn-reject:hover { background: #d42a5f; color: white; }

.btn-ghost {
  background: transparent;
  color: var(--cc-text-muted);
  border: 1px solid var(--cc-border);
}

.btn-ghost:hover {
  background: var(--cc-surface-2);
  color: var(--cc-text);
  border-color: var(--cc-border-hover);
}

/* ==================== BADGES ==================== */
.badge-pending {
  background: var(--cc-warning-dim);
  color: var(--cc-warning);
  font-weight: 600;
}

.badge-approved {
  background: var(--cc-success-dim);
  color: var(--cc-success);
  font-weight: 600;
}

.badge-rejected {
  background: var(--cc-cruel-dim);
  color: var(--cc-cruel);
  font-weight: 600;
}

/* ==================== FORM CONTROLS ==================== */
.form-control, .form-select {
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-border);
  color: var(--cc-text);
  border-radius: var(--cc-radius-sm);
  padding: 10px 14px;
}

.form-control:focus, .form-select:focus {
  background: var(--cc-surface-2);
  border-color: var(--cc-cool);
  color: var(--cc-text);
  box-shadow: 0 0 0 3px var(--cc-cool-glow);
}

.form-control::placeholder {
  color: var(--cc-text-faint);
}

/* ==================== PHOTO PREVIEW MODAL ==================== */
.photo-preview-modal .modal-content {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
}

.photo-preview-modal .modal-header {
  border-bottom: 1px solid var(--cc-border);
}

.photo-preview-modal .modal-footer {
  border-top: 1px solid var(--cc-border);
}

.photo-preview-img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: var(--cc-radius-sm);
  background: var(--cc-bg);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--cc-text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h5 {
  font-weight: 600;
  color: var(--cc-text);
  margin-bottom: 8px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

/* ==================== LOADING ==================== */
.spinner-cool {
  color: var(--cc-cool);
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cc-surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cc-text-faint); }
