/* ==========================================================
   BERRYS PRE SCHOOL - ADMIN DASHBOARD STYLESHEET
   Clean, Responsive, Fast & Professional Portal
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --admin-primary: #d81b60;
  --admin-primary-dark: #ad1457;
  --admin-sidebar-bg: #1e1e2d;
  --admin-sidebar-hover: #27273a;
  --admin-bg: #f5f7fb;
  --admin-card-bg: #ffffff;
  --admin-text-main: #2d3748;
  --admin-text-muted: #718096;
  --admin-border: #e2e8f0;
  --status-pending: #f59e0b;
  --status-contacted: #3b82f6;
  --status-enrolled: #10b981;
  --status-archived: #6b7280;
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

/* --------------------------------------------------------
   Admin Layout Structure
   -------------------------------------------------------- */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background-color: var(--admin-sidebar-bg);
  color: #a2a3b7;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--admin-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.sidebar-brand h2 {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 1.25rem;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.sidebar-brand h2 span {
  color: #ffb300;
}

.sidebar-menu {
  padding: 20px 0;
  flex: 1;
  list-style: none;
  overflow-y: auto;
}

.sidebar-item {
  margin-bottom: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #92929f;
  transition: all 0.2s ease;
}

.sidebar-link:hover, .sidebar-link.active {
  color: #ffffff;
  background-color: var(--admin-sidebar-hover);
  border-left: 4px solid var(--admin-primary);
}

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

.sidebar-badge {
  margin-left: auto;
  background-color: var(--admin-primary);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.sidebar-btn-logout:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Main Admin Content */
.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 30px;
  min-height: 100vh;
}

/* Admin Top Bar */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: var(--admin-card-bg);
  padding: 16px 28px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-text-main);
}

.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4f46e5;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.kpi-card {
  background: var(--admin-card-bg);
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--admin-border);
}

.kpi-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.kpi-icon.pink { background: #fce4ec; color: #d81b60; }
.kpi-icon.yellow { background: #fff8e1; color: #d97706; }
.kpi-icon.blue { background: #e0f2fe; color: #0284c7; }
.kpi-icon.green { background: #dcfce7; color: #16a34a; }

.kpi-info h3 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.kpi-info p {
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------
   Tables & Data Cards
   -------------------------------------------------------- */
.data-card {
  background: var(--admin-card-bg);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--admin-border);
  margin-bottom: 30px;
}

.data-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.data-card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  padding: 8px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
}

.search-box:focus {
  border-color: var(--admin-primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 2px solid var(--admin-border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tr:hover {
  background-color: #fafbfc;
}

/* Status Badges */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending { background: #fef3c7; color: #b45309; }
.status-contacted { background: #dbeafe; color: #1d4ed8; }
.status-visit-scheduled { background: #f3e8ff; color: #7e22ce; }
.status-enrolled { background: #dcfce7; color: #15803d; }
.status-archived { background: #f1f5f9; color: #475569; }

/* Action Buttons */
.btn-action {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-view { background: #e0f2fe; color: #0369a1; }
.btn-view:hover { background: #0284c7; color: #ffffff; }

.btn-delete { background: #fee2e2; color: #b91c1c; }
.btn-delete:hover { background: #dc2626; color: #ffffff; }

/* Admin Login Page */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1e2d 0%, #2d1a33 100%);
  padding: 20px;
}

.admin-login-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.admin-login-header {
  text-align: center;
  margin-bottom: 30px;
}

.admin-login-header h1 {
  font-family: 'Fredoka', cursive, sans-serif;
  color: var(--admin-primary);
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.admin-login-header p {
  color: var(--admin-text-muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .admin-sidebar {
    left: -260px;
  }
  .admin-sidebar.open {
    left: 0;
  }
  .admin-main {
    margin-left: 0;
    padding: 16px;
  }
}
