/* ── Variables ── */
:root {
  --primary:    #2F9E9E;
  --primary-dk: #257f7f;
  --secondary:  #D9ECEC;
  --bg:         #F4F6F6;
  --input-bg:   #eaeaea;
  --text:       #333333;
  --border:     #CCCCCC;
  --white:      #ffffff;
  --danger:     #e74c3c;
  --pending:    #F4A261;
  --completed:  #2A9D8F;
  --upcoming:   #3A86FF;
  --admin:      #2c3e50;
  --admin-dk:   #1a252f;
  --shadow:     0 4px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.25s, transform 0.1s;
  text-decoration: none;
}
.btn:hover  { background-color: var(--primary-dk); }
.btn:active { transform: scale(0.98); }

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn-outline:hover { background-color: rgba(255,255,255,0.15); }

.btn-danger { background-color: var(--danger); }
.btn-danger:hover { background-color: #c0392b; }

.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── Cards ── */
.card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

/* ── Inputs ── */
.input-field {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--input-bg);
  font-size: 15px;
  transition: border-color 0.2s;
}
.input-field:focus { outline: none; border-color: var(--primary); background: var(--white); }

/* ── Navbar (public) ── */
.navbar {
  background-color: var(--primary);
  padding: 14px 0;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.navbar .logo { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.navbar .nav-links { list-style: none; display: flex; gap: 24px; }
.navbar .nav-links a { color: var(--white); text-decoration: none; font-weight: 600; font-size: 15px; opacity: 0.9; }
.navbar .nav-links a:hover { opacity: 1; }

/* ── Dashboard Navbar (parent) ── */
.dashboard-header {
  background-color: var(--primary);
  padding: 14px 0;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.dashboard-header .container { display: flex; justify-content: space-between; align-items: center; }
.dashboard-header .logo { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.dashboard-header span { font-size: 15px; font-weight: 500; }

/* ── Admin Navbar ── */
.admin-header {
  background-color: var(--admin);
  padding: 14px 0;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.admin-header .container { display: flex; justify-content: space-between; align-items: center; }
.admin-header .logo { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.admin-header .admin-badge {
  background-color: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 90px 0 70px;
  background: linear-gradient(135deg, var(--white) 60%, var(--secondary));
}
.hero h1 { font-size: 44px; margin-bottom: 16px; color: var(--admin); }
.hero .tagline { font-size: 20px; color: var(--primary); font-weight: 600; margin-bottom: 12px; }
.hero p { font-size: 17px; color: #555; max-width: 600px; margin: 0 auto 32px; }
.hero .hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Features ── */
.features { padding: 60px 0; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  text-align: center;
  padding: 30px 20px;
  border-top: 4px solid var(--primary);
}
.feature-card .icon { font-size: 36px; margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 10px; color: var(--admin); }
.feature-card p { color: #666; font-size: 14px; }

/* ── Split Layout (login/register) ── */
.split-layout { display: flex; min-height: 100vh; }
.left-panel {
  flex: 1;
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px;
  text-align: center;
}
.left-panel h1 { font-size: 36px; margin-bottom: 14px; }
.left-panel p  { font-size: 16px; margin-bottom: 10px; opacity: 0.9; }
.right-panel {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px;
  background: var(--white);
}
.form-container { width: 100%; max-width: 400px; }
.form-container h2 { margin-bottom: 24px; color: var(--admin); font-size: 26px; }
.form-link { display: block; margin-bottom: 14px; color: var(--primary); font-size: 14px; text-decoration: none; }
.form-link:hover { text-decoration: underline; }

/* ── Page Content ── */
.page-content { padding: 40px 0; }

/* ── Section Title ── */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--admin);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--secondary);
}

/* ── Parent Info Card ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.info-item label { font-size: 12px; color: #888; font-weight: 600; text-transform: uppercase; }
.info-item p { font-size: 15px; color: var(--text); margin-top: 2px; }

/* ── Children Grid ── */
.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.child-card { border-left: 4px solid var(--primary); }
.child-card h3 { color: var(--admin); margin-bottom: 6px; }
.child-card p  { color: #555; font-size: 14px; margin-bottom: 14px; }

/* ── Vaccination Table ── */
.table-wrapper { overflow-x: auto; border-radius: 12px; box-shadow: var(--shadow); }
.vaccination-table { width: 100%; border-collapse: collapse; background: var(--white); }
.vaccination-table th {
  background-color: var(--admin);
  color: var(--white);
  padding: 13px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}
.vaccination-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.vaccination-table tr:last-child td { border-bottom: none; }
.vaccination-table tr:hover td { background-color: #fafafa; }

/* ── Status Badges ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-pending   { background: #fff3e0; color: var(--pending); }
.badge-completed { background: #e8f5e9; color: var(--completed); }
.badge-upcoming  { background: #e3f0ff; color: var(--upcoming); }

/* keep old classes for backward compat */
.status-pending   { color: var(--pending);   font-weight: 600; }
.status-completed { color: var(--completed); font-weight: 600; }
.status-upcoming  { color: var(--upcoming);  font-weight: 600; }

/* ── Notification Cards ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.notif-item:last-child { border-bottom: none; }
.notif-icon { font-size: 20px; flex-shrink: 0; }

/* ── Stats (admin) ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  text-align: center;
  border-top: 4px solid var(--primary);
  padding: 24px 16px;
}
.stat-card .stat-num { font-size: 36px; font-weight: 700; color: var(--primary); margin: 8px 0 4px; }
.stat-card .stat-label { font-size: 13px; color: #777; font-weight: 600; text-transform: uppercase; }

/* ── Admin Table ── */
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); }
.admin-table th {
  background-color: var(--admin);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.admin-table td { padding: 11px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.admin-table tr:hover td { background-color: #f9f9f9; }
.admin-table tr:last-child td { border-bottom: none; }

/* ── Admin Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--secondary); }
.tab-btn {
  padding: 10px 22px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #888;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 13px; color: #888; margin-bottom: 20px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 24px;
  background: var(--admin);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin-top: 60px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .split-layout { flex-direction: column; }
  .left-panel { padding: 40px 24px; min-height: 220px; }
  .hero h1 { font-size: 30px; }
  .navbar .nav-links { gap: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero .hero-btns { flex-direction: column; align-items: center; }
}

/* ── Upcoming Vaccinations (Admin) ── */
.reminder-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.reminder-card__header {
  background: var(--admin);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.reminder-card__parent-name {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
}

.reminder-card__phone {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  margin-left: 14px;
}
.reminder-card__phone:hover { text-decoration: underline; }

.reminder-card__actions { display: flex; gap: 8px; }

.reminder-card__body { padding: 0; }

.reminder-child-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}
.reminder-child-row:last-child { border-bottom: none; }

.reminder-child-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--admin);
  min-width: 120px;
}

.reminder-urgency { min-width: 110px; }

.vaccine-pills { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

.vaccine-pill {
  background: #e8f4f4;
  color: var(--admin);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.vaccine-pill.overdue  { background: #fde8e8; color: #c0392b; }
.vaccine-pill.today    { background: #fde8e8; color: #c0392b; }
.vaccine-pill.soon     { background: #fff3e0; color: #e67e22; }

.reminder-count {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  align-self: center;
}

/* filter bar */
.upcoming-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff8e1;
  border-left: 4px solid var(--pending);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 16px;
}
.upcoming-toolbar__info strong { color: #e67e22; }
.upcoming-toolbar__info span   { font-size: 13px; color: #888; display: block; margin-top: 2px; }
.upcoming-toolbar__controls    { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
