/* SummerSPARK VBS Lineup — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

:root {
  --spark-yellow: #FFD600;
  --spark-orange: #FF6B35;
  --spark-blue: #1E88E5;
  --spark-green: #43A047;
  --spark-purple: #8E24AA;
  --spark-pink: #E91E63;
  --bg-light: #FFF8E1;
  --bg-card: #ffffff;
  --text-dark: #1a1a2e;
  --text-muted: #666;
  --border-radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  background: linear-gradient(135deg, var(--spark-orange) 0%, #ff8c42 50%, var(--spark-yellow) 100%);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 12px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .brand {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  color: white;
  text-decoration: none;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .brand span { font-size: 1.8rem; }
.topbar nav { display: flex; align-items: center; gap: 8px; }
.topbar nav a, .topbar nav button {
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 2px solid rgba(255,255,255,0.4);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Nunito', sans-serif;
}
.topbar nav a:hover, .topbar nav button:hover {
  background: rgba(255,255,255,0.25);
}
.topbar nav a.active {
  background: rgba(255,255,255,0.3);
  border-color: white;
}
.topbar .user-pill {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 4px 12px;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.page-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  color: var(--spark-orange);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.card-header {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  color: var(--spark-blue);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--bg-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--spark-orange); color: white; }
.btn-success { background: var(--spark-green); color: white; }
.btn-danger  { background: #e74c3c; color: white; }
.btn-blue    { background: var(--spark-blue); color: white; }
.btn-purple  { background: var(--spark-purple); color: white; }
.btn-yellow  { background: var(--spark-yellow); color: var(--text-dark); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--spark-orange);
  color: var(--spark-orange);
}
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-dark); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  color: var(--text-dark);
}
.form-control:focus { outline: none; border-color: var(--spark-blue); box-shadow: 0 0 0 3px rgba(30,136,229,0.15); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Alerts ── */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid var(--spark-green); }
.alert-danger  { background: #ffebee; color: #c62828; border-left: 4px solid #e74c3c; }
.alert-warning { background: #fff8e1; color: #f57f17; border-left: 4px solid var(--spark-yellow); }
.alert-info    { background: #e3f2fd; color: #1565c0; border-left: 4px solid var(--spark-blue); }

/* ── Station Block ── */
.station-block {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 3px solid transparent;
  transition: var(--transition);
}
.station-block.active { border-color: rgba(0,0,0,0.2); transform: scale(1.01); }
.station-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}
.station-label {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.station-count { font-size: 0.85rem; opacity: 0.9; }
.station-slots { background: white; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.kid-slot {
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
}
.kid-slot.empty { color: #bbb; font-weight: 400; font-size: 0.85rem; }
.kid-slot.filled {
  background: #f9f9f9;
  border-style: solid;
  border-color: #ddd;
}
.kid-slot.filled:hover { background: #fff3e0; border-color: var(--spark-orange); }
.kid-slot .slot-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #eee;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Grid layout for stations ── */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* ── Line display (big screen) ── */
.display-line {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.display-station {
  border-radius: 16px;
  overflow: hidden;
  min-width: 180px;
  flex: 1;
  max-width: 260px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.display-station-header {
  padding: 14px 16px;
  text-align: center;
  color: white;
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}
.display-station-kids { background: white; padding: 12px; }
.display-kid {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-dark);
}
.display-kid:last-child { border-bottom: none; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { background: #f5f5f5; font-weight: 800; padding: 10px 12px; text-align: left; border-bottom: 2px solid #eee; }
.table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.table tr:hover td { background: #fafafa; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
}
.badge-admin   { background: #fce4ec; color: #c62828; }
.badge-inside  { background: #e3f2fd; color: #1565c0; }
.badge-outside { background: #e8f5e9; color: #2e7d32; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal-box {
  background: white;
  border-radius: 20px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--spark-orange);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ── Login page ── */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF6B35 0%, #FFD600 50%, #FF6B35 100%);
  background-size: 400% 400%;
  animation: gradShift 8s ease infinite;
  padding: 16px;
}
@keyframes gradShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.login-card {
  background: white;
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}
.login-logo { font-family: 'Fredoka One', cursive; font-size: 2.5rem; color: var(--spark-orange); margin-bottom: 4px; }
.login-sub  { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text-muted); font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #eee; }

/* ── Spinner ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.4); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pickup line visual ── */
.line-number-badge {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  color: var(--spark-orange);
  text-align: center;
  line-height: 1;
}
.line-label { text-align: center; color: var(--text-muted); font-weight: 700; font-size: 1rem; margin-top: 4px; margin-bottom: 20px; }

/* ── Confetti emoji decoration ── */
.fun-header { position: relative; }
.fun-header::before { content: '⭐'; margin-right: 8px; }
.fun-header::after  { content: '⭐'; margin-left: 8px; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .topbar { padding: 0 12px; }
  .topbar .brand { font-size: 1.2rem; }
  .topbar nav a, .topbar nav button { padding: 5px 10px; font-size: 0.8rem; }
  .container { padding: 16px 10px; }
  .page-title { font-size: 1.5rem; }
  .stations-grid { grid-template-columns: 1fr; }
}

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 3px solid #eee; padding-bottom: 0; }
.tab-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: var(--transition);
}
.tab-btn.active { color: var(--spark-orange); border-bottom-color: var(--spark-orange); }
.tab-panel { display: none; } 
.tab-panel.active { display: block; }

/* ── Stars bg decoration ── */
.stars-bg {
  background-image: radial-gradient(circle, #FFD600 1px, transparent 1px);
  background-size: 30px 30px;
  background-color: var(--bg-light);
}

/* ── Kid-friendly decorative elements ── */
.emoji-icon { font-size: 1.2em; }

/* ── Outside worker UI ── */
.big-select-wrapper { position: relative; }
.big-select-wrapper select.form-control { font-size: 1.1rem; padding: 12px 16px; }
.station-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.station-pick-btn {
  border-radius: 14px;
  padding: 14px;
  border: 3px solid transparent;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: white;
  text-align: center;
  transition: var(--transition);
  position: relative;
}
.station-pick-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.station-pick-btn.full { opacity: 0.5; cursor: not-allowed; transform: none; }
.station-pick-btn .slot-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; justify-content: center; }
.station-pick-btn .slot-badge {
  background: rgba(255,255,255,0.3);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}

/* Inside controller remote */
.remote-panel {
  background: #1a1a2e;
  border-radius: 30px;
  padding: 32px 24px;
  max-width: 360px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  color: white;
  text-align: center;
}
.remote-panel .remote-title { font-family: 'Fredoka One', cursive; font-size: 1.6rem; color: var(--spark-yellow); margin-bottom: 8px; }
.remote-line-num { font-family: 'Fredoka One', cursive; font-size: 4rem; color: white; line-height: 1; }
.remote-btn {
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  cursor: pointer;
  border: none;
  margin-top: 12px;
  transition: var(--transition);
}
.remote-btn:hover { transform: scale(1.03); }
.remote-btn:active { transform: scale(0.97); }
.remote-btn-dismiss { background: linear-gradient(135deg, var(--spark-orange), #ff8c42); color: white; }
.remote-btn-advance { background: linear-gradient(135deg, var(--spark-green), #66bb6a); color: white; }
.remote-btn-reset   { background: #444; color: #aaa; font-size: 1rem; }
