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

:root {
  --sky: #4FC3F7;
  --sky-dark: #29A9E0;
  --sun: #FFD54F;
  --leaf: #66BB6A;
  --leaf-dark: #4C9A50;
  --coral: #EF5350;
  --coral-dark: #D8433F;
  --cream: #FFFDF7;
  --ink: #2C3E50;
  --ink-soft: #5B6B7C;
  --lavender: #B39DDB;
  --card-shadow: 0 6px 0 rgba(44, 62, 80, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
}

/* ---------- Kid-facing shared look ---------- */

body.kid-view {
  background: linear-gradient(180deg, #E1F5FE 0%, var(--cream) 320px);
}

.kid-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 8px;
}

.kid-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  color: var(--ink);
  text-align: center;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  max-width: 720px;
  margin: 24px auto;
  padding: 0 24px 48px;
}

.tile {
  background: white;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.12s ease;
  min-height: 150px;
}

.tile:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(44, 62, 80, 0.12);
}

.tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.tile-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
}

.tile.done {
  opacity: 0.55;
}

.tile-check {
  font-size: 1.4rem;
}

/* Alert ring for a kid who hasn't finished chores today, shown on the picker */
.tile.alert .tile-label {
  color: var(--coral-dark);
}
.tile.alert {
  box-shadow: 0 0 0 4px var(--coral), var(--card-shadow);
}

/* ---------- Confirm screen (green/red) ---------- */

.confirm-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 28px;
}

.confirm-photo {
  width: min(70vw, 320px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.confirm-buttons {
  display: flex;
  gap: 24px;
}

.big-btn {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: none;
  font-size: 3.2rem;
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,0.15);
}

.big-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.15);
}

.big-btn.yes { background: var(--leaf); }
.big-btn.no { background: var(--coral); }

.replay-audio {
  background: var(--sky);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Admin look: compact, muted, dense ---------- */

body.admin-view {
  background: #F4F6F8;
  font-size: 15px;
}

.admin-header {
  background: var(--ink);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header a, .admin-header button {
  color: white;
  text-decoration: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  font-size: 0.9rem;
}

.admin-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.admin-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 20px;
}

.admin-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #EEE;
}
.status-row:last-child { border-bottom: none; }

.status-pill {
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.status-pill.ok { background: #E3F5E5; color: var(--leaf-dark); }
.status-pill.alert { background: #FBE4E3; color: var(--coral-dark); }

.admin-form label {
  display: block;
  font-weight: 700;
  margin: 12px 0 4px;
  font-size: 0.9rem;
}

.admin-form input[type=text],
.admin-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #DDD;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
}

.admin-btn {
  background: var(--sky-dark);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
}

.admin-btn.danger { background: var(--coral-dark); }

.pin-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.pin-screen input {
  font-size: 2rem;
  letter-spacing: 12px;
  text-align: center;
  width: 220px;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid #DDD;
}

.error-text {
  color: var(--coral-dark);
  font-weight: 700;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  padding: 36px 32px;
  width: 320px;
  text-align: center;
}

.login-card h1 {
  font-family: 'Fredoka', sans-serif;
  margin-top: 0;
}

.login-card input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #DDD;
  font-family: 'Nunito', sans-serif;
}

.login-card button {
  width: 100%;
  padding: 11px;
  background: var(--sky-dark);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
