*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: #f1f5f9; color: #0f172a; min-height: 100vh; }

/* ===== SHARED LOGIN ===== */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%); padding: 24px;
}
.login-card {
  background: #fff; border-radius: 24px; padding: 48px 40px;
  width: 100%; max-width: 420px; box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.logo-star { font-size: 1.4rem; }
.logo-text { font-size: 0.9rem; font-weight: 700; color: #0f172a; }
.login-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 6px; }
.login-sub { font-size: 0.82rem; color: #64748b; margin-bottom: 24px; }
.login-error {
  background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626;
  border-radius: 10px; padding: 10px 14px; font-size: 0.83rem; margin-bottom: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: #374151; }
.form-group input, .text-input, .select-input, .textarea-input {
  border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 13px;
  font-size: 0.9rem; font-family: inherit; outline: none; transition: border-color 0.2s;
  width: 100%; background: #fff; color: #0f172a;
}
.form-group input:focus, .text-input:focus, .select-input:focus, .textarea-input:focus {
  border-color: #3b82f6;
}
.textarea-input { resize: vertical; line-height: 1.6; }
.btn-login {
  width: 100%; padding: 13px; background: #0f172a; color: #fff;
  border: none; border-radius: 12px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.2s; margin-top: 4px;
}
.btn-login:hover { background: #1e293b; }
.btn-login:disabled { background: #94a3b8; cursor: not-allowed; }
.back-link { display: block; text-align: center; margin-top: 20px; font-size: 0.82rem; color: #64748b; text-decoration: none; }
.back-link:hover { color: #0f172a; }

/* ===== ADMIN NAV ===== */
.admin-nav {
  position: sticky; top: 0; z-index: 100;
  background: #0f172a; padding: 0 32px; height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.admin-nav-left { display: flex; align-items: center; gap: 12px; }
.admin-nav-brand { color: #f8fafc; font-size: 0.9rem; font-weight: 700; }
.admin-nav-right { display: flex; align-items: center; gap: 12px; }
.admin-nav-email { color: #64748b; font-size: 0.8rem; }
.btn-nav-link {
  color: #94a3b8; font-size: 0.82rem; text-decoration: none;
  border: 1px solid #334155; border-radius: 8px; padding: 5px 12px;
  transition: background 0.2s;
}
.btn-nav-link:hover { background: #1e293b; color: #f8fafc; }
.btn-logout {
  background: #1e293b; color: #f8fafc; border: 1px solid #334155;
  border-radius: 8px; padding: 6px 14px; font-size: 0.82rem;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.btn-logout:hover { background: #334155; }

/* ===== TABS ===== */
.tab-bar {
  background: #fff; border-bottom: 1px solid #e2e8f0;
  display: flex; gap: 0; padding: 0 32px; overflow-x: auto;
}
.tab {
  padding: 14px 20px; font-size: 0.85rem; font-weight: 600; color: #64748b;
  border: none; background: none; cursor: pointer; font-family: inherit;
  border-bottom: 3px solid transparent; white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.tab:hover { color: #0f172a; }
.tab.active { color: #0f172a; border-bottom-color: #f59e0b; }

/* ===== ADMIN BODY ===== */
.admin-body { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }

/* ===== PANEL ===== */
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-header h2 { font-size: 1.2rem; font-weight: 800; }
.panel-header-tools { display: flex; gap: 12px; align-items: center; }
.hint { font-size: 0.82rem; color: #64748b; margin-bottom: 16px; line-height: 1.6; background: #f8fafc; padding: 10px 14px; border-radius: 8px; }
.hint code { background: #e2e8f0; padding: 1px 6px; border-radius: 4px; font-size: 0.8rem; }
.success-msg { color: #16a34a; font-size: 0.85rem; margin-top: 10px; font-weight: 600; }
.empty-state { color: #94a3b8; font-size: 0.88rem; text-align: center; padding: 32px 0; }

/* ===== FORM CARD ===== */
.form-card {
  background: #fff; border-radius: 16px; padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 24px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: #0f172a; color: #fff; border: none; border-radius: 10px;
  padding: 10px 22px; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.btn-primary:hover { background: #1e293b; }
.btn-secondary {
  background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 10px 22px; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.btn-secondary:hover { background: #e2e8f0; }
.btn-edit-sm {
  background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;
  border-radius: 7px; padding: 5px 12px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn-edit-sm:hover { background: #dbeafe; }
.btn-danger-sm {
  background: #fef2f2; color: #dc2626; border: 1px solid #fecaca;
  border-radius: 7px; padding: 5px 12px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn-danger-sm:hover { background: #fee2e2; }

.enroll-status-select {
  font-size: 0.78rem !important; padding: 4px 8px !important;
  border-radius: 8px !important; min-width: 120px;
}

/* ===== GROUPS ===== */
.groups-list { display: flex; flex-direction: column; gap: 12px; }
.group-card {
  background: #fff; border-radius: 14px; padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: space-between;
}
.group-name { font-size: 1rem; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.group-dates { font-size: 0.82rem; color: #64748b; margin-bottom: 4px; }
.group-count { font-size: 0.8rem; color: #94a3b8; }

/* ===== PARENTS TABLE ===== */
.parents-table-wrap { background: #fff; border-radius: 16px; overflow: auto; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.parents-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.parents-table thead { background: #f8fafc; }
.parents-table th { padding: 12px 16px; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; border-bottom: 1px solid #f1f5f9; }
.parents-table td { padding: 13px 16px; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
.parents-table tr:last-child td { border-bottom: none; }
.td-email { color: #64748b; font-size: 0.8rem; }
.group-badge { background: #eff6ff; color: #2563eb; border-radius: 99px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700; }

/* ===== ANNOUNCEMENTS (admin) ===== */
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann-admin-item { background: #fff; border-left: 4px solid #f59e0b; border-radius: 0 12px 12px 0; padding: 16px 18px; box-shadow: 0 1px 6px rgba(0,0,0,0.05); }
.ann-meta { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.ann-date-badge { font-size: 0.72rem; font-weight: 700; color: #64748b; }
.ann-group-badge { font-size: 0.7rem; font-weight: 700; background: #eff6ff; color: #2563eb; border-radius: 99px; padding: 2px 8px; }
.ann-title-text { font-size: 0.95rem; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.ann-body-text { font-size: 0.83rem; color: #475569; line-height: 1.6; }

/* ===== PHOTOS (admin) ===== */
.photo-grid-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 24px; }
.photo-admin-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.photo-admin-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.photo-admin-meta { padding: 8px 10px; }
.photo-caption-text { font-size: 0.78rem; color: #0f172a; font-weight: 600; }
.photo-group-tag { font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 999; padding: 24px;
}
.modal-card {
  background: #fff; border-radius: 20px; padding: 36px 32px;
  width: 100%; max-width: 480px; box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}
.modal-wide { max-width: 680px; }
.modal-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 20px; }
.modal-btns { display: flex; gap: 10px; margin-top: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .admin-body { padding: 20px 16px 60px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-nav { padding: 0 16px; }
  .admin-nav-brand { font-size: 0.75rem; }
  .tab-bar { padding: 0 12px; }
  .tab { padding: 12px 14px; font-size: 0.78rem; }
  .modal-card { padding: 28px 20px; }
  .panel-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
