/* =============================================================
   ORBIT — Design System  (orbit.css)
   Palette: Orange #F9A825 | Teal #2DD4BF | Dark #374151
            Blush #FB923C | Light #F3F4F6 | Gray #6B7280
   ============================================================= */

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

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

:root {
  --orange:   #F9A825;
  --orange-d: #E59200;
  --teal:     #2DD4BF;
  --teal-d:   #14B8A6;
  --dark:     #374151;
  --blush:    #FB923C;
  --light:    #F3F4F6;
  --white:    #FFFFFF;
  --gray:     #6B7280;
  --gray-l:   #D1D5DB;
  --red:      #EF4444;
  --green:    #22C55E;

  --sidebar-w: 240px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Nunito', 'Inter', sans-serif;
}

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Abstract shapes background */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
}
.shape-1 {
  top: -100px;
  right: -10px;
  width: 450px;
  height: 450px;
  background: var(--orange);
}
.shape-2 {
  bottom: -150px;
  left: -50px;
  width: 400px;
  height: 400px;
  background: var(--teal);
}
.shape-3 {
  top: 30%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: var(--blush);
  opacity: 0.4;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Typography ───────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; line-height: 1.2; }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.4rem; border-radius: 9999px;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  cursor: pointer; border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,.1); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn-primary  { background: linear-gradient(135deg, var(--orange), var(--blush));  color: var(--white); border: none; }
.btn-primary:hover { box-shadow: 0 8px 15px rgba(251, 146, 60, 0.3); }

.btn-teal     { background: linear-gradient(135deg, var(--teal), var(--teal-d));    color: var(--white); border: none; }
.btn-teal:hover { box-shadow: 0 8px 15px rgba(45, 212, 191, 0.3); }

.btn-ghost    { background: rgba(255,255,255,0.7); border-color: var(--gray-l); color: var(--dark); }
.btn-ghost:hover { background: #fff; box-shadow: var(--shadow); }

.btn-danger   { background: var(--red);     color: #fff; border: none; }
.btn-sm       { padding: .4rem 1rem; font-size: .85rem; }
.btn-lg       { padding: 1rem 2.2rem;   font-size: 1.1rem; }
.btn-icon     { padding: .5rem; border-radius: 12px; background: transparent; }

/* ─── Cards ────────────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.1);
  padding: 1.75rem;
}
.card-sm { padding: 1.25rem; border-radius: 18px; }

/* ─── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
}
.badge-orange  { background: #FEF3C7; color: #92400E; }
.badge-teal    { background: #CCFBF1; color: #0F766E; }
.badge-gray    { background: var(--light); color: var(--gray); }
.badge-red     { background: #FEE2E2; color: #991B1B; }
.badge-green   { background: #DCFCE7; color: #166534; }
.badge-blush   { background: #FFEDD5; color: #9A3412; }

/* ─── Forms ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.form-group label { font-weight: 600; font-size: .9rem; color: var(--dark); }
.form-control {
  width: 100%; padding: .75rem 1.1rem;
  border: 1.5px solid var(--gray-l); border-radius: 12px;
  font-family: var(--font-body); font-size: 1rem;
  transition: all .2s;
  background: rgba(255, 255, 255, 0.9);
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2); }
.form-control.error { border-color: var(--red); }
.form-hint  { font-size: .8rem; color: var(--gray); margin-top: .2rem; }
.form-error { font-size: .8rem; color: var(--red); font-weight: 600; margin-top: .2rem; }

/* ─── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.25rem; border-radius: var(--radius);
  border-left: 4px solid;
  font-size: .9rem; font-weight: 500;
}
.alert-warning { border-color: var(--orange);  background: #FFFBEB; color: #92400E; }
.alert-success  { border-color: var(--green);   background: #F0FDF4; color: #166534; }
.alert-error    { border-color: var(--red);     background: #FEF2F2; color: #991B1B; }
.alert-info     { border-color: var(--teal);    background: #F0FDFA; color: #0F766E; }

/* ─── Cancellation Warning Banner ──────────────────────────── */
.cancellation-banner {
  display: flex; align-items: center; gap: .85rem;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px solid #F59E0B;
  border-radius: 14px;
  padding: .75rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px -4px rgba(245, 158, 11, .2);
  animation: banner-enter .4s ease;
}
.cancellation-icon {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(245, 158, 11, .15);
  display: flex; align-items: center; justify-content: center;
  color: #D97706;
  animation: icon-pulse 2s ease-in-out infinite;
}
.cancellation-body { flex: 1; min-width: 0; }
.cancellation-title {
  display: block;
  font-size: .95rem; font-weight: 800; color: #92400E;
  margin-bottom: 2px;
}
.cancellation-text {
  font-size: .85rem; color: #78350F; line-height: 1.5;
  margin: 0;
}
@keyframes banner-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ─── Tables ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--light); padding: .75rem 1rem;
  text-align: left; font-size: .8rem;
  font-weight: 700; color: var(--gray); letter-spacing: .05em;
  text-transform: uppercase;
}
tbody tr { border-bottom: 1px solid var(--light); }
tbody tr:last-child { border: none; }
tbody td { padding: .85rem 1rem; font-size: .9rem; }
tbody tr:hover { background: #FAFAFA; }

/* ─── Progress Bar ─────────────────────────────────────────── */
.progress { height: 10px; background: var(--light); border-radius: 999px; overflow: hidden; }
.progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  transition: width .5s ease;
}

/* ─────────────────────────────────────────────────────────────
   CAREGIVER LAYOUT
   ───────────────────────────────────────────────────────────── */
.layout-caregiver {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  grid-row: 1 / -1;
  background: linear-gradient(180deg, var(--dark) 0%, #1f2937 100%);
  display: flex; flex-direction: column;
  padding: 1.5rem 0 1.5rem;
  position: sticky; top: 0; height: 100vh;
  box-shadow: 4px 0 24px rgba(0,0,0,.1);
}
.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand .logo-emoji { font-size: 2rem; }
.sidebar-brand .brand-name {
  font-family: var(--font-heading); font-weight: 900;
  font-size: 1.4rem; color: var(--orange); letter-spacing: -.02em;
}
.sidebar-brand .brand-sub { font-size: .7rem; color: rgba(255,255,255,.5); }

.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-section-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  padding: .5rem 1.5rem; margin-top: .5rem;
}
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.5rem;
  color: rgba(255,255,255,.7);
  font-weight: 500; font-size: .9rem;
  border-radius: 0; cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: rgba(249,168,37,.12);
  color: var(--orange);
  font-weight: 700;
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--orange); border-radius: 0 2px 2px 0;
}
.nav-item .nav-icon { font-size: 1.15rem; width: 1.5rem; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--red); color: #fff;
  border-radius: 999px; padding: .1rem .45rem;
  font-size: .72rem; font-weight: 700;
}

.sidebar-footer {
  padding: 1rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem .5rem; border-radius: var(--radius);
  cursor: pointer; transition: background .15s;
}
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--orange); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: .85rem; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .72rem; color: rgba(255,255,255,.4); }

/* Top bar (caregiver) */
.topbar {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 20px -10px rgba(0,0,0,.05);
  position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-weight: 700; font-size: 1.1rem; color: var(--dark); }
.topbar-actions { display: flex; align-items: center; gap: .75rem; }

/* Main content */
.main-content {
  padding: 2rem;
  max-width: 1200px;
  min-height: 100%;
}

/* ─────────────────────────────────────────────────────────────
   CHILD LAYOUT
   ───────────────────────────────────────────────────────────── */
.layout-child {
  display: flex; flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(135deg, #FFFBEB 0%, #F0FDFA 100%);
}

.child-header {
  background: var(--white);
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid var(--orange);
  box-shadow: 0 2px 12px rgba(249,168,37,.15);
  position: sticky; top: 0; z-index: 10;
}
.child-avatar-wrap { display: flex; align-items: center; gap: .75rem; }
.child-avatar-big {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  border: 3px solid var(--orange);
  box-shadow: 0 0 0 4px rgba(249,168,37,.2);
}
.child-name-header { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; }
.child-greeting { font-size: .8rem; color: var(--gray); }

.point-display {
  display: flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, var(--orange), var(--blush));
  color: var(--dark); border-radius: var(--radius-lg);
  padding: .5rem 1.25rem;
  box-shadow: 0 4px 12px rgba(249,168,37,.35);
}
.point-display .pts-number {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 900;
}
.point-display .pts-label { font-size: .75rem; font-weight: 700; }

.child-main { flex: 1; padding: 1.5rem; max-width: 700px; margin: 0 auto; width: 100%; }
.child-bottom-nav {
  background: var(--white);
  border-top: 2px solid var(--light);
  display: flex;
  padding: .5rem 0 env(safe-area-inset-bottom, .5rem);
  position: sticky; bottom: 0;
}
.child-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem;
  padding: .5rem .25rem;
  color: var(--gray); font-size: .72rem; font-weight: 600;
  transition: color .15s;
  cursor: pointer;
}
.child-nav-item .nav-icon { font-size: 1.5rem; }
.child-nav-item.active { color: var(--orange); }

/* ─── Task Cards (Child) ───────────────────────────────────── */
.task-cards { display: flex; flex-direction: column; gap: .85rem; }

.task-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.task-card:hover { transform: translateX(4px); }
.task-card--pending-approval {
  border-color: var(--orange);
  background: linear-gradient(135deg, #fff 0%, #FFFBEB 100%);
}
.task-card--approved {
  opacity: .7;
  border-color: var(--green);
  background: linear-gradient(135deg, #fff 0%, #F0FDF4 100%);
}
.task-card--done { opacity: .5; }

.task-emoji {
  font-size: 2.25rem; flex-shrink: 0;
  background: var(--light); border-radius: var(--radius);
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
}
.task-info { flex: 1; min-width: 0; }
.task-title { font-weight: 700; font-size: 1rem; margin-bottom: .15rem; }
.task-pts { font-size: .8rem; color: var(--gray); font-weight: 600; }
.task-pts span { color: var(--orange); font-weight: 800; }

.btn-done {
  background: linear-gradient(135deg, var(--teal), var(--teal-d));
  color: #fff; border: none; border-radius: var(--radius);
  padding: .6rem 1.1rem; font-weight: 700; font-size: .9rem;
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(45,212,191,.4);
  transition: transform .15s, box-shadow .15s;
}
.btn-done:hover { transform: scale(1.05); }
.btn-done:active { transform: scale(0.97); }

.status-waiting {
  background: #FEF3C7; color: #92400E;
  border-radius: var(--radius); padding: .45rem .85rem;
  font-size: .82rem; font-weight: 700; flex-shrink: 0;
  white-space: nowrap;
}
.status-approved {
  background: #DCFCE7; color: #166534;
  border-radius: var(--radius); padding: .45rem .85rem;
  font-size: .82rem; font-weight: 700; flex-shrink: 0;
}

/* ─── First/Then Board ─────────────────────────────────────── */
.first-then {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: stretch; gap: .75rem;
  margin-bottom: 1.75rem;
}
.first-then-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1rem;
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: .5rem;
}
.first-then-card--task  { border-top: 5px solid var(--teal); }
.first-then-card--reward { border-top: 5px solid var(--orange); }
.first-then-label {
  font-size: .7rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase;
}
.first-then-card--task .first-then-label   { color: var(--teal-d); }
.first-then-card--reward .first-then-label { color: var(--orange-d); }
.first-then-emoji { font-size: 3rem; line-height: 1; }
.first-then-title { font-weight: 800; font-size: .95rem; line-height: 1.2; }
.first-then-pts { font-size: .8rem; color: var(--gray); }
.first-then-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: var(--orange-d);
}

/* ─── PIN Pad ──────────────────────────────────────────────── */
.pin-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--dark) 0%, #1F2937 100%);
  display: flex; align-items: center; justify-content: center;
}
.pin-card {
  background: var(--white); border-radius: var(--radius-lg);
  width: min(400px, 95vw); padding: 2rem;
  box-shadow: var(--shadow-lg); text-align: center;
}
.pin-child-avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.75rem; border: 4px solid var(--orange);
  box-shadow: 0 0 0 8px rgba(249,168,37,.15);
}
.pin-greeting { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin-bottom: .25rem; }
.pin-instruction { color: var(--gray); font-size: .9rem; margin-bottom: 1.5rem; }
.pin-dots { display: flex; justify-content: center; gap: .75rem; margin-bottom: 1.5rem; }
.pin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--gray-l);
  transition: background .15s, border-color .15s, transform .15s;
}
.pin-dot.filled { background: var(--orange); border-color: var(--orange); transform: scale(1.2); }
.pin-dot.error  { background: var(--red);    border-color: var(--red); animation: shake .4s ease; }

.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.num-btn {
  background: var(--light); border: none; border-radius: var(--radius);
  font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800;
  padding: 1rem; cursor: pointer; color: var(--dark);
  transition: background .1s, transform .1s;
}
.num-btn:hover  { background: var(--orange); color: var(--dark); }
.num-btn:active { transform: scale(0.93); }
.num-btn.del    { background: #FEE2E2; color: var(--red); }
.num-btn.go     { background: var(--teal);  color: var(--dark); }

/* ─── Child Avatar Select ──────────────────────────────────── */
.avatar-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
}
.avatar-btn {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  cursor: pointer; background: var(--white);
  border: 3px solid transparent; border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow); transition: all .2s;
  min-width: 130px;
}
.avatar-btn:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.avatar-btn .avatar-emoji { font-size: 3.5rem; }
.avatar-btn .avatar-name { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; }

/* Child select screen */
.child-select-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--dark) 0%, #1F2937 100%);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2rem;
}
.child-select-title {
  font-family: var(--font-heading); font-size: 1.75rem; font-weight: 900;
  color: var(--white); margin-bottom: .5rem; text-align: center;
}
.child-select-sub { color: rgba(255,255,255,.6); font-size: .9rem; margin-bottom: 2.5rem; }

/* ─── Caregiver Dashboard ──────────────────────────────────── */
.child-summary-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px; padding: 1.75rem;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.1); margin-bottom: 1rem;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 1.5rem;
}
.child-sum-avatar {
  width: 70px; height: 70px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; border: 4px solid var(--orange);
  box-shadow: 0 0 0 6px rgba(249,168,37,.15);
}
.child-sum-name { font-weight: 800; font-size: 1.1rem; margin-bottom: .15rem; }
.child-sum-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.child-stat { text-align: center; }
.child-stat-val {
  font-family: var(--font-heading); font-size: 1.6rem; font-weight: 900;
  color: var(--orange); line-height: 1;
}
.child-stat-lbl { font-size: .7rem; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* Approval feed */
.approval-item {
  background: rgba(255, 255, 255, 0.85); border-radius: 16px; padding: 1.1rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  border-left: 5px solid var(--orange); box-shadow: 0 10px 25px -5px rgba(0,0,0,.08);
  margin-bottom: .75rem;
  border-top: 1px solid rgba(255,255,255,0.6);
  border-right: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.6);
}
.approval-info { flex: 1; }
.approval-task { font-weight: 700; font-size: 1rem; color: var(--dark); }
.approval-child { font-size: .85rem; color: var(--gray); }
.approval-actions { display: flex; gap: .75rem; }

/* Reward cards (caregiver & child) */
.reward-card {
  background: rgba(255, 255, 255, 0.85); border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.08); padding: 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid rgba(255,255,255,0.6); transition: all .2s;
}
.reward-card:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: 0 15px 35px -10px rgba(0,0,0,.15); }
.reward-emoji { font-size: 2.25rem; flex-shrink: 0; background: var(--light); border-radius: 16px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.reward-info { flex: 1; min-width: 0; }
.reward-title { font-weight: 700; font-size: 1rem; color: var(--dark); margin-bottom: 2px;}
.reward-cost { font-size: .85rem; color: var(--gray); font-weight: 600; }
.reward-cost span { color: var(--orange-d); font-weight: 800; }

/* Affordable vs not */
.reward-card--affordable { border-color: var(--teal); }
.reward-card--locked     { opacity: .6; }

/* ─── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; background: var(--light); padding: .25rem; border-radius: var(--radius); width: fit-content; margin-bottom: 1.5rem; }
.tab { padding: .5rem 1.25rem; border-radius: calc(var(--radius) - 2px); font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--gray); transition: all .2s; border: none; background: transparent; }
.tab.active { background: var(--white); color: var(--dark); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ─── Empty States ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray); }
.empty-emoji { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-title { font-weight: 700; font-size: 1.05rem; color: var(--dark); margin-bottom: .35rem; }
.empty-sub { font-size: .875rem; }

/* ─── Modals ───────────────────────────────────────────────── */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: min(520px, 95vw);
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--light);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body    { padding: 1.5rem; }
.modal-footer  { padding: 1rem 1.5rem; border-top: 1px solid var(--light); display: flex; justify-content: flex-end; gap: .75rem; }

/* ─── Toast Notifications ──────────────────────────────────── */
#toast-container {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .6rem;
  pointer-events: none; max-width: 380px; width: 100%;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: .75rem;
  background: rgba(55, 65, 81, 0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: #fff; padding: .9rem 1.1rem; border-radius: 14px;
  font-size: .88rem; font-weight: 500; line-height: 1.4;
  box-shadow: 0 12px 40px -8px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.06);
  animation: toast-in .35s cubic-bezier(.21,1.02,.73,1) forwards;
  position: relative; overflow: hidden;
}
.toast.removing {
  animation: toast-out .3s cubic-bezier(.55,.06,.68,.19) forwards;
}

.toast-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; margin-top: 1px;
}
.toast-body { flex: 1; min-width: 0; }
.toast-close {
  flex-shrink: 0; background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1.1rem; cursor: pointer; padding: 0; line-height: 1;
  transition: color .15s;
}
.toast-close:hover { color: #fff; }

/* Progress bar that counts down */
.toast-progress {
  position: absolute; bottom: 0; left: 0; height: 3px;
  border-radius: 0 0 14px 14px;
  animation: toast-timer 4s linear forwards;
}

/* Variants */
.toast-success             { border-left: 4px solid var(--green); }
.toast-success .toast-icon { background: rgba(34,197,94,.2); color: var(--green); }
.toast-success .toast-progress { background: var(--green); }

.toast-error               { border-left: 4px solid var(--red); }
.toast-error .toast-icon   { background: rgba(239,68,68,.2); color: var(--red); }
.toast-error .toast-progress { background: var(--red); }

.toast-warning             { border-left: 4px solid var(--orange); }
.toast-warning .toast-icon { background: rgba(249,168,37,.2); color: var(--orange); }
.toast-warning .toast-progress { background: var(--orange); }

.toast-info                { border-left: 4px solid var(--teal); }
.toast-info .toast-icon    { background: rgba(45,212,191,.2); color: var(--teal); }
.toast-info .toast-progress { background: var(--teal); }

/* ─── Animations ───────────────────────────────────────────── */
@keyframes slide-in  { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade-out  { to   { opacity: 0; transform: translateX(100%); } }
@keyframes shake     { 0%,100% { transform: translateX(0); } 25%,75% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
@keyframes bounce-in { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes pulse-pts {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); color: var(--orange); }
  100% { transform: scale(1); }
}
.pts-pulse { animation: pulse-pts .6s ease; }

/* Toast-specific */
@keyframes toast-in  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }
@keyframes toast-timer { from { width: 100%; } to { width: 0%; } }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .layout-caregiver { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 1rem; }
  .topbar { padding: .75rem 1rem; }
  .child-summary-card { grid-template-columns: auto 1fr; }
  .first-then { grid-template-columns: 1fr; }
  .first-then-arrow { transform: rotate(90deg); }
}
