/* ═══════════════════════════════════════════════════════════
   TAREFITO — Design System v1
   Gamer Dark · Neon · Mobile-first · Gamificado
   Fontes: Orbitron (display) + Nunito (body) + Baloo 2 (UI)
════════════════════════════════════════════════════════════ */

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

:root {
  /* ── Palette ── */
  --bg:        #07061a;
  --bg2:       #0d0b25;
  --card:      #110f2e;
  --card2:     #191640;
  --border:    #2a2660;
  --border2:   #3d3880;

  /* ── Neons ── */
  --purple:    #9d5cff;
  --purple2:   #7c3aed;
  --blue:      #38bdf8;
  --cyan:      #06b6d4;
  --green:     #22c55e;
  --green2:    #10b981;
  --gold:      #fbbf24;
  --gold2:     #f59e0b;
  --pink:      #f472b6;
  --red:       #f43f5e;

  /* ── Text ── */
  --text:      #e2e8f0;
  --text2:     #c4cfe0;
  --muted:     #7c8fa8;
  --muted2:    #4a5568;

  /* ── Gradients ── */
  --grad-purple: linear-gradient(135deg, #7c3aed, #9d5cff);
  --grad-blue:   linear-gradient(135deg, #0ea5e9, #38bdf8);
  --grad-green:  linear-gradient(135deg, #059669, #22c55e);
  --grad-gold:   linear-gradient(135deg, #d97706, #fbbf24);
  --grad-pink:   linear-gradient(135deg, #be185d, #f472b6);
  --grad-neon:   linear-gradient(135deg, #7c3aed, #0ea5e9, #22c55e);

  /* ── Glows ── */
  --glow-purple: 0 0 20px rgba(157,92,255,.4), 0 0 60px rgba(157,92,255,.15);
  --glow-blue:   0 0 20px rgba(56,189,248,.4), 0 0 60px rgba(56,189,248,.15);
  --glow-green:  0 0 20px rgba(34,197,94,.4),  0 0 60px rgba(34,197,94,.15);
  --glow-gold:   0 0 20px rgba(251,191,36,.4),  0 0 60px rgba(251,191,36,.15);

  /* ── Spacing / Shape ── */
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --radius-xl: 28px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: 'Nunito', sans-serif;
  background: #030111;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
input, select, textarea, button { font-family: 'Nunito', sans-serif; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ── PHONE FRAME ── */
#app-root {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

@media (min-width: 600px) {
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px 0 80px;
    background: #030111;
    background-image:
      radial-gradient(circle at 20% 20%, rgba(124,58,237,.08) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(6,182,212,.06) 0%, transparent 50%);
  }
  #app-root {
    width: 390px; min-width: 390px; max-width: 390px;
    min-height: 844px;
    border-radius: 44px;
    overflow: hidden;
    box-shadow:
      0 0 0 1px rgba(157,92,255,.3),
      0 0 0 10px #0d0b25,
      0 0 0 12px rgba(157,92,255,.2),
      0 40px 100px rgba(0,0,0,.95),
      0 0 80px rgba(124,58,237,.2);
    transform: translateZ(0);
  }
  #app-root::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 110px; height: 26px;
    background: #0d0b25;
    border-radius: 0 0 18px 18px;
    z-index: 9999;
  }
  .auth-wrap { padding-top: 44px !important; }
  .profiles-wrap { padding-top: 44px !important; }
  .app-header { padding-top: 32px !important; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp    { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: translateY(0) } }
@keyframes slideUp   { from { transform: translateY(100%) } to { transform: translateY(0) } }
@keyframes popIn     { from { transform: scale(.4); opacity: 0 } to { transform: scale(1); opacity: 1 } }
@keyframes bounce    { 0%,100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-14px) rotate(4deg) } }
@keyframes pulse     { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
@keyframes scanline  { 0% { transform: translateY(-100%) } 100% { transform: translateY(100vh) } }
@keyframes neonPulse { 0%,100% { box-shadow: var(--glow-purple) } 50% { box-shadow: 0 0 40px rgba(157,92,255,.7), 0 0 80px rgba(157,92,255,.3) } }
@keyframes shimmer   { 0% { background-position: -200% center } 100% { background-position: 200% center } }
@keyframes float     { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

/* ── SCREEN SYSTEM ── */
.screen { display: none; flex-direction: column; min-height: 100vh; animation: fadeUp .28s ease; }
.screen.active { display: flex; }

/* ═══════════════════════════════
   AUTH / LOGIN
═══════════════════════════════ */
.auth-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px 20px;
  background:
    radial-gradient(circle at 15% 15%, rgba(124,58,237,.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(6,182,212,.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(157,92,255,.06) 0%, transparent 70%),
    var(--bg);
  position: relative; overflow: hidden;
}
.auth-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 40px,
    rgba(157,92,255,.03) 40px, rgba(157,92,255,.03) 41px
  );
  pointer-events: none;
}
.auth-card {
  background: rgba(17,15,46,.85);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 30px 24px;
  width: 100%; max-width: 360px;
  position: relative; z-index: 1;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(157,92,255,.1), inset 0 1px 0 rgba(255,255,255,.05);
}
.auth-card-scroll { overflow-y: auto; max-height: 92vh; }

/* ── Logo ── */
.logo-area { text-align: center; margin-bottom: 24px; }
.logo-img {
  width: 110px; height: auto;
  filter: drop-shadow(0 0 24px rgba(157,92,255,.6)) drop-shadow(0 0 50px rgba(56,189,248,.3));
  animation: float 3.5s ease-in-out infinite;
}
.logo-title {
  font-family: 'Orbitron', monospace;
  font-size: 22px; font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #9d5cff, #38bdf8, #22c55e);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
  margin-top: 8px;
}
.logo-sub {
  font-size: 11px; color: var(--muted);
  margin-top: 6px; letter-spacing: 1px;
}
.badge-beta {
  display: inline-block;
  font-size: 9px; font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(157,92,255,.2);
  border: 1px solid rgba(157,92,255,.4);
  color: var(--purple);
  letter-spacing: 1px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ── Login Tabs ── */
.login-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}
.login-tab {
  flex: 1; padding: 10px 8px;
  border-radius: 10px;
  border: none; background: none;
  color: var(--muted); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.login-tab.active {
  background: var(--grad-purple);
  color: #fff;
  box-shadow: var(--glow-purple);
}

/* ── Form ── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--muted); letter-spacing: .8px;
  text-transform: uppercase; margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(157,92,255,.15);
}
.form-group input.field-error { border-color: var(--red); }

.field-msg { font-size: 11px; margin-top: 4px; display: none; }
.field-msg.show { display: block; }
.field-msg.err { color: var(--red); }

.auth-sub { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.error-msg {
  font-size: 12px; color: var(--red);
  background: rgba(244,63,94,.1);
  border: 1px solid rgba(244,63,94,.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: none;
}
.error-msg.show { display: block; margin-bottom: 12px; }

.chk-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.chk-row input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--purple); }
.chk-row label { font-size: 12px; color: var(--muted); line-height: 1.5; }
.chk-row label a { color: var(--purple); }

.child-code-error { font-size: 12px; color: var(--red); display: none; margin-top: 4px; }
.child-code-error.show { display: block; }

/* ═══════════════════════════════
   BUTTONS
═══════════════════════════════ */
.btn {
  display: block; width: 100%;
  padding: 13px 16px;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 800;
  cursor: pointer; text-align: center;
  transition: all .2s; letter-spacing: .5px;
}
.btn + .btn { margin-top: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--grad-purple);
  color: #fff;
  box-shadow: var(--glow-purple);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 30px rgba(157,92,255,.6), 0 0 80px rgba(157,92,255,.25);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(56,189,248,.12);
  border: 1px solid rgba(56,189,248,.35);
  color: var(--blue);
}
.btn-secondary:hover:not(:disabled) { background: rgba(56,189,248,.2); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted);
}
.btn-ghost:hover { border-color: var(--purple); color: var(--text); }

.btn-danger {
  background: rgba(244,63,94,.12);
  border: 1px solid rgba(244,63,94,.3);
  color: var(--red);
}
.btn-danger:hover { background: rgba(244,63,94,.22); }

.btn-confirming { background: rgba(244,63,94,.25) !important; border-color: var(--red) !important; color: var(--red) !important; }

/* ── Link style ── */
.link-btn {
  background: none; border: none;
  color: var(--purple); font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: color .2s;
}
.link-btn:hover { color: var(--blue); }

/* ── FAB ── */
.fab {
  position: fixed; bottom: 88px; right: 16px;
  width: 54px; height: 54px;
  border-radius: 50%; border: none;
  background: var(--grad-purple);
  color: #fff; font-size: 24px;
  cursor: pointer; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-purple);
  transition: all .2s;
}
.fab:hover { transform: scale(1.1) rotate(10deg); box-shadow: 0 0 35px rgba(157,92,255,.7); }
@media (min-width: 600px) { .fab { right: calc(50% - 195px + 16px); } }

/* ═══════════════════════════════
   PROFILE SELECTION
═══════════════════════════════ */
.profiles-wrap {
  flex: 1; padding: 24px 20px;
  background:
    radial-gradient(circle at 25% 20%, rgba(124,58,237,.15) 0%, transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(6,182,212,.1) 0%, transparent 45%),
    var(--bg);
}
.profiles-title {
  font-family: 'Orbitron', monospace;
  font-size: 13px; font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px; text-align: center;
}
.profiles-grid {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 20px;
}
.profile-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer; transition: all .25s;
}
.profile-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(157,92,255,.06), transparent);
  opacity: 0; transition: opacity .25s;
}
.profile-card:hover { border-color: var(--purple); transform: translateY(-3px); box-shadow: var(--glow-purple); }
.profile-card:hover::before { opacity: 1; }
.profile-card::after {
  content: '';
  position: absolute; inset: auto 12px 0;
  height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--green));
  opacity: .6;
}
.profile-emoji {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(157,92,255,.2), rgba(56,189,248,.2));
  border: 1.5px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}

/* ═══════════════════════════════
   APP HEADER
═══════════════════════════════ */
.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px;
}
.app-header-logo {
  width: 32px; height: 32px;
  filter: drop-shadow(0 0 8px rgba(157,92,255,.5));
}

/* ── Stars badge ── */
.stars-badge {
  display: flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, rgba(217,119,6,.15), rgba(251,191,36,.25));
  border: 1px solid rgba(251,191,36,.35);
  border-radius: 20px; padding: 5px 12px;
}
.stars-badge span {
  font-family: 'Baloo 2', cursive;
  font-weight: 800; color: var(--gold);
  font-size: 15px;
  text-shadow: 0 0 10px rgba(251,191,36,.5);
}

/* ── Nav tabs (parent) ── */
.nav-tabs {
  display: flex;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  gap: 2px;
}
.nav-tab {
  flex: 1; padding: 12px 4px;
  border: none; background: none;
  color: var(--muted); font-size: 11px; font-weight: 700;
  cursor: pointer; position: relative;
  transition: color .2s; letter-spacing: .3px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.nav-tab span { font-size: 18px; }
.nav-tab.active { color: var(--purple); }
.nav-tab.active::after {
  content: '';
  position: absolute; bottom: 0; left: 10%; right: 10%;
  height: 2px; border-radius: 2px;
  background: var(--grad-purple);
  box-shadow: 0 0 8px rgba(157,92,255,.6);
}

/* ═══════════════════════════════
   CHILD HERO
═══════════════════════════════ */
.child-hero {
  padding: 16px 16px 0;
  background: linear-gradient(180deg, var(--card) 0%, transparent 100%);
}
.greeting-name { font-family: 'Baloo 2', cursive; font-weight: 800; }
.progress-wrap { margin: 10px 0 4px; }
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); margin-bottom: 5px;
}
.progress-bar {
  height: 10px;
  background: rgba(255,255,255,.07);
  border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--purple2), var(--blue), var(--green2));
  transition: width .6s cubic-bezier(.34,1.56,.64,1);
  position: relative; overflow: hidden;
}
.progress-bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
}

/* ═══════════════════════════════
   TASK CARDS
═══════════════════════════════ */
.task-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all .22s;
  margin-bottom: 10px;
}
.task-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--purple), var(--blue));
  opacity: 0; transition: opacity .2s;
  border-radius: 3px 0 0 3px;
}
.task-card:hover:not(.done)::before,
.task-card:focus:not(.done)::before { opacity: 1; }
.task-card:hover:not(.done) { border-color: var(--border2); background: var(--card2); transform: translateX(3px); }
.task-card:active { transform: scale(.98); }
.task-card.done {
  opacity: .5; border-color: rgba(34,197,94,.3);
  background: rgba(34,197,94,.04);
}
.task-card.done::before { background: var(--green); opacity: 1; }

.task-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; transition: all .2s;
}
.task-card.done .task-icon { background: rgba(34,197,94,.12); }
.task-card:hover:not(.done) .task-icon { background: rgba(157,92,255,.15); transform: scale(1.05); }

.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.task-meta { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.task-recurrence { font-size: 10px; color: var(--blue); font-weight: 700; }

.task-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: transparent; transition: all .2s;
}
.task-card.done .task-check {
  background: var(--green); border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 12px rgba(34,197,94,.5);
}
.task-stars {
  font-size: 11px; font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(251,191,36,.4);
}

/* ── Section title ── */
.section-title {
  font-family: 'Baloo 2', cursive;
  font-size: 14px; font-weight: 800;
  color: var(--text2); letter-spacing: .5px;
  margin-bottom: 10px;
}

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px; text-align: center;
}
.empty-state-icon { font-size: 52px; margin-bottom: 12px; opacity: .6; }

/* ═══════════════════════════════
   REWARD CARDS (shop)
═══════════════════════════════ */
.reward-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px; cursor: pointer; transition: all .2s;
}
.reward-card:hover { border-color: var(--gold); box-shadow: var(--glow-gold); transform: translateX(3px); }
.reward-emoji { font-size: 26px; flex-shrink: 0; }
.reward-info { flex: 1; }
.reward-name { font-size: 14px; font-weight: 700; }
.reward-cost { font-size: 12px; color: var(--gold); font-weight: 700; margin-top: 2px; }

/* ── Library grid ── */
.library-grid { display: flex; flex-direction: column; gap: 8px; }
.lib-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all .2s;
}
.lib-item:hover { border-color: var(--purple); background: var(--card2); }
.lib-item.selected { border-color: var(--purple); background: rgba(157,92,255,.08); }

/* ═══════════════════════════════
   BOTTOM NAV
═══════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex; z-index: 150;
  padding: 8px 0 20px;
}
.bottom-nav::before {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--blue), var(--green), transparent);
  opacity: .5;
}
@media (min-width: 600px) {
  .bottom-nav {
    left: 50%; right: auto;
    transform: translateX(-50%);
    width: 390px;
    border-radius: 0 0 34px 34px;
  }
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 8px 4px;
  background: none; border: none;
  color: var(--muted); font-size: 10px; font-weight: 700;
  cursor: pointer; transition: all .2s; letter-spacing: .3px;
}
.nav-item svg, .nav-item i { font-size: 22px; transition: transform .2s; }
.nav-item.active { color: var(--green); }
.nav-item.active i, .nav-item.active svg { transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(34,197,94,.6)); }

/* ═══════════════════════════════
   SCROLLABLE CONTENT
═══════════════════════════════ */
.scroll-area {
  flex: 1; overflow-y: auto;
  padding: 16px 16px 100px;
}
.scroll-area-parent {
  flex: 1; overflow-y: auto;
  padding: 16px 16px 80px;
}

/* ═══════════════════════════════
   CARDS / STATS
═══════════════════════════════ */
.stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px; text-align: center;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px;
}
.stat-card:nth-child(1)::before { background: var(--grad-purple); }
.stat-card:nth-child(2)::before { background: var(--grad-green); }
.stat-card:nth-child(3)::before { background: var(--grad-blue); }
.stat-card:nth-child(4)::before { background: var(--grad-gold); }
.stat-num {
  font-family: 'Orbitron', monospace;
  font-size: 24px; font-weight: 800; line-height: 1;
}
.stat-label { font-size: 10px; color: var(--muted); margin-top: 4px; letter-spacing: .5px; }

/* ── Info card ── */
.info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px;
}
.info-card-title {
  font-size: 11px; font-weight: 800;
  color: var(--muted); letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 12px;
}

/* ── Child switch cards ── */
#child-switch-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* ═══════════════════════════════
   REWARD OVERLAY (celebration)
═══════════════════════════════ */
.reward-overlay {
  position: fixed; inset: 0;
  background: rgba(7,6,26,.9);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(8px);
}
.reward-overlay.show { display: flex; animation: fadeUp .3s ease; }
.reward-modal {
  background: var(--card);
  border: 1px solid rgba(251,191,36,.3);
  border-radius: var(--radius-xl);
  padding: 36px 28px; text-align: center;
  max-width: 320px; width: 90%;
  box-shadow: var(--glow-gold);
  transform: scale(.85);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.reward-overlay.show .reward-modal { transform: scale(1); }
.reward-stars { font-size: 64px; animation: popIn .6s ease forwards; }
.xp-rise {
  font-family: 'Orbitron', monospace;
  font-size: 32px; font-weight: 900;
  color: var(--gold);
  text-shadow: var(--glow-gold);
  animation: fadeUp .7s ease forwards .3s;
  opacity: 0; display: inline-block;
}
.modal-title { font-family: 'Baloo 2', cursive; font-size: 20px; font-weight: 800; margin: 8px 0; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

/* ═══════════════════════════════
   TOAST
═══════════════════════════════ */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(17,15,46,.95);
  border: 1px solid var(--border2);
  border-radius: 50px; padding: 10px 20px;
  font-size: 13px; font-weight: 700; color: var(--text);
  z-index: 9000; opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap; pointer-events: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════
   MODALS
═══════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(7,6,26,.85); z-index: 500;
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-overlay.show { display: flex; }
.modal-sheet {
  background: var(--card);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border2);
  padding: 24px 20px 44px;
  width: 100%; max-width: 390px;
  animation: slideUp .3s cubic-bezier(.34,1.1,.64,1);
  max-height: 90vh; overflow-y: auto;
}
.modal-sheet-tall { max-height: 92vh; }
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border2); border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-title { font-family: 'Baloo 2', cursive; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

/* ── Emoji picker ── */
.emoji-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.emoji-pick {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--card2); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; transition: all .2s;
}
.emoji-pick.selected { border-color: var(--purple); background: rgba(157,92,255,.15); box-shadow: var(--glow-purple); }
.emoji-pick:hover { transform: scale(1.15); }

/* ── Stars selector ── */
.stars-selector { display: flex; gap: 8px; margin-bottom: 12px; }
.star-opt {
  flex: 1; padding: 10px 4px; text-align: center;
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 800; cursor: pointer; transition: all .2s;
}
.star-opt.selected { border-color: var(--gold); background: rgba(251,191,36,.1); color: var(--gold); }

/* ── Day chips ── */
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.day-chip {
  padding: 5px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 800;
  background: var(--card2); border: 1.5px solid var(--border);
  cursor: pointer; transition: all .2s;
}
.day-chip.selected { border-color: var(--purple); background: rgba(157,92,255,.15); color: var(--purple); }

/* ═══════════════════════════════
   PIN MODAL
═══════════════════════════════ */
.pin-overlay {
  position: fixed; inset: 0;
  background: rgba(7,6,26,.92);
  display: none; align-items: center; justify-content: center;
  z-index: 2000; backdrop-filter: blur(10px);
}
.pin-overlay.show { display: flex; }
.pin-box {
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 32px 28px; max-width: 300px; width: 92%;
  text-align: center;
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 0 1px rgba(157,92,255,.1), var(--glow-purple);
}
.pin-icon { font-size: 42px; margin-bottom: 10px; }
.pin-title { font-family: 'Baloo 2', cursive; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.pin-sub { font-size: 12px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.pin-dots { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border2);
  background: transparent; transition: all .2s;
}
.pin-dot.filled {
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: var(--glow-purple);
}
.pin-keypad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 14px;
}
.pin-key {
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-size: 20px; font-weight: 800;
  cursor: pointer; transition: all .15s; font-family: 'Orbitron', monospace;
}
.pin-key:hover { background: rgba(157,92,255,.15); border-color: var(--purple); }
.pin-key:active { transform: scale(.93); }
.pin-key.zero { grid-column: 2; }
.pin-key.del { font-size: 18px; color: var(--muted); }
.pin-err { font-size: 12px; color: var(--red); min-height: 16px; margin-bottom: 8px; }
.pin-cancel { background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; margin-top: 4px; transition: color .2s; }
.pin-cancel:hover { color: var(--text); }

/* ═══════════════════════════════
   ONBOARDING BANNER
═══════════════════════════════ */
.ob-banner {
  margin: 12px 16px;
  background: linear-gradient(135deg, rgba(124,58,237,.1), rgba(6,182,212,.08));
  border: 1px solid rgba(157,92,255,.3);
  border-radius: var(--radius);
  padding: 16px;
  position: relative; overflow: hidden;
}
.ob-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(157,92,255,.04), transparent);
  pointer-events: none;
}
#ob-banner-child {
  margin: 12px 16px;
  background: linear-gradient(135deg, rgba(34,197,94,.1), rgba(6,182,212,.08));
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius); padding: 16px;
}
.ob-banner-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ob-banner-step-badge {
  font-size: 10px; font-weight: 800;
  background: rgba(157,92,255,.2);
  border: 1px solid rgba(157,92,255,.4);
  color: var(--purple);
  padding: 2px 8px; border-radius: 20px; letter-spacing: .5px;
}
.ob-banner-progress { flex: 1; height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.ob-banner-progress-fill { height: 100%; background: var(--grad-purple); border-radius: 2px; transition: width .5s ease; }
.ob-banner-skip { background: none; border: none; color: var(--muted); font-size: 11px; cursor: pointer; transition: color .2s; }
.ob-banner-skip:hover { color: var(--text); }
.ob-banner-body { display: flex; align-items: flex-start; gap: 12px; }
.ob-banner-icon { font-size: 26px; flex-shrink: 0; }
.ob-banner-content { flex: 1; }
.ob-banner-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.ob-banner-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }
.ob-banner-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 8px 16px;
  background: var(--grad-purple);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 800; cursor: pointer;
  box-shadow: var(--glow-purple); transition: transform .2s;
}
.ob-banner-cta:hover { transform: scale(1.04); }
.ob-complete { text-align: center; padding: 8px 0; }
.ob-complete-icon { font-size: 48px; margin-bottom: 8px; }
.ob-complete-title { font-family: 'Baloo 2', cursive; font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.ob-complete-sub { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.ob-highlight {
  box-shadow: 0 0 0 3px var(--purple), var(--glow-purple) !important;
  border-color: var(--purple) !important;
  animation: neonPulse 1.5s ease-in-out infinite !important;
}

/* ═══════════════════════════════
   HISTORY / APPROVALS
═══════════════════════════════ */
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.history-icon { font-size: 20px; width: 36px; text-align: center; flex-shrink: 0; }
.history-info { flex: 1; }
.history-name { font-size: 13px; font-weight: 700; }
.history-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.history-stars { font-size: 12px; color: var(--gold); font-weight: 800; flex-shrink: 0; }

/* ── Approval ── */
.approval-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-approve {
  flex: 1; padding: 8px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.35);
  border-radius: var(--radius-sm);
  color: var(--green); font-size: 12px; font-weight: 800;
  cursor: pointer; transition: all .2s;
}
.btn-approve:hover { background: rgba(34,197,94,.25); }
.btn-reject {
  flex: 1; padding: 8px;
  background: rgba(244,63,94,.12);
  border: 1px solid rgba(244,63,94,.35);
  border-radius: var(--radius-sm);
  color: var(--red); font-size: 12px; font-weight: 800;
  cursor: pointer; transition: all .2s;
}
.btn-reject:hover { background: rgba(244,63,94,.25); }

/* ═══════════════════════════════
   WEEK SUMMARY / METRICS
═══════════════════════════════ */
.semana-geral-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  margin-bottom: 10px;
}
.semana-geral-num {
  font-family: 'Orbitron', monospace;
  font-size: 28px; font-weight: 800;
  color: var(--purple);
  text-shadow: 0 0 15px rgba(157,92,255,.5);
  flex-shrink: 0;
}
.semana-dias-lista { display: flex; flex-direction: column; gap: 6px; }
.semana-dia-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.semana-dia-row-label { width: 28px; font-weight: 700; color: var(--muted); }
.semana-dia-row-bar-wrap {
  flex: 1; height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 3px; overflow: hidden;
}
.semana-dia-row-bar-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }
.semana-dia-row-count { width: 36px; text-align: right; font-size: 11px; font-weight: 700; }
.semana-streak-row {
  margin-top: 10px; font-size: 12px; color: var(--muted); font-weight: 700;
  text-align: center;
}

/* ── Invite code display ── */
.invite-code-display {
  font-family: 'Orbitron', monospace;
  font-size: 26px; font-weight: 800;
  letter-spacing: 6px; text-align: center;
  color: var(--purple);
  text-shadow: var(--glow-purple);
  background: rgba(157,92,255,.08);
  border: 1.5px solid rgba(157,92,255,.3);
  border-radius: var(--radius);
  padding: 16px; margin: 12px 0;
}

/* ── Misc ── */
.beta-corner {
  position: fixed; bottom: 72px; right: 12px;
  font-size: 9px; font-weight: 800;
  color: var(--muted); opacity: .35;
  pointer-events: none; letter-spacing: 1px; z-index: 100;
  font-family: 'Orbitron', monospace;
}
@media (min-width: 600px) { .beta-corner { right: calc(50% - 195px + 12px); } }

/* ── Reward preview ── */
.reward-preview {
  font-size: 13px; font-weight: 800;
  color: var(--gold); text-align: center;
  margin-bottom: 12px; min-height: 20px;
}

/* ── Admin / metrics ── */
.master-only { display: none; }
.metric-card {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 10px;
}
.metric-title { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.metric-value { font-family: 'Orbitron', monospace; font-size: 28px; font-weight: 800; color: var(--purple); }
.metric-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Feedback ── */
.feedback-wrap { padding: 20px 0; }
.rating-stars { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.star-rating {
  font-size: 28px; cursor: pointer; transition: transform .2s;
  filter: grayscale(1); opacity: .4;
}
.star-rating.selected { filter: none; opacity: 1; transform: scale(1.2); }

/* ── Reward mgmt ── */
.reward-mgmt-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.reward-mgmt-info { flex: 1; }
.reward-mgmt-name { font-size: 13px; font-weight: 700; }
.reward-mgmt-cost { font-size: 11px; color: var(--gold); }

/* ── Children mgmt ── */
.filho-mgmt-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}

/* ── CTA criar missão ── */
.btn-criar-missao-hoje {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(17,15,46,.8));
  border: 1.5px solid rgba(157,92,255,.35);
  border-radius: var(--radius); padding: 18px 16px;
  margin-bottom: 16px; cursor: pointer;
  box-shadow: 0 0 24px rgba(157,92,255,.2);
  transition: all .2s; text-align: left;
}
.btn-criar-missao-hoje:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(157,92,255,.4), var(--glow-purple);
}
.btn-criar-missao-hoje .cta-icon { font-size: 34px; flex-shrink: 0; }
.btn-criar-missao-hoje .cta-text h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 15px; font-weight: 800; color: var(--text); margin: 0;
}
.btn-criar-missao-hoje .cta-text p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.btn-criar-missao-hoje .cta-arrow { margin-left: auto; font-size: 20px; color: var(--purple); flex-shrink: 0; }

/* ── Parent empty state ── */
#parent-empty-state { display: none; text-align: center; padding: 32px 20px; }

/* ═══════════════════════════════
   CHILD MODE THEME (override)
═══════════════════════════════ */
body.child-mode {
  --purple: #00f5d4; --purple2: #00c9b1;
  --blue: #ff6ef7; --cyan: #c77dff;
  --border2: #1a3a38;
}
body.child-mode .bottom-nav::before {
  background: linear-gradient(90deg, transparent, #00f5d4, #ff6ef7, #c77dff, transparent);
}
body.child-mode .btn-primary { background: linear-gradient(135deg, #00c9b1, #00f5d4); color: #000; box-shadow: 0 0 20px rgba(0,245,212,.4); }
body.child-mode .task-card:hover:not(.done) { border-color: #00f5d4; }
body.child-mode .task-card::before { background: linear-gradient(to bottom, #00f5d4, #c77dff); }
body.child-mode .progress-bar-fill { background: linear-gradient(90deg, #00f5d4, #c77dff); box-shadow: 0 0 10px rgba(0,245,212,.4); }
body.child-mode .nav-item.active { color: #00f5d4; }
body.child-mode .ob-banner { border-color: rgba(0,245,212,.3); background: linear-gradient(135deg, rgba(0,245,212,.08), rgba(199,125,255,.06)); }
body.child-mode .ob-banner-step-badge { background: rgba(0,245,212,.15); border-color: rgba(0,245,212,.3); color: #00f5d4; }
body.child-mode .ob-banner-progress-fill { background: linear-gradient(90deg, #00f5d4, #c77dff); }
body.child-mode .ob-banner-cta { background: linear-gradient(135deg, #00c9b1, #00f5d4); color: #000; box-shadow: 0 0 20px rgba(0,245,212,.4); }
body.child-mode .ob-highlight { box-shadow: 0 0 0 3px #00f5d4, 0 0 20px rgba(0,245,212,.4) !important; border-color: #00f5d4 !important; }
body.child-mode .reward-card:hover { border-color: #ffe600; box-shadow: 0 0 20px rgba(255,230,0,.3); }
body.child-mode .stars-badge { background: rgba(255,230,0,.12); border-color: rgba(255,230,0,.3); }

/* ═══════════════════════════════
   STREAK
═══════════════════════════════ */
.streak-flame-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(255,100,0,.07);
  border: 1px solid rgba(255,100,0,.2);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.streak-flame { font-size: 28px; animation: bounce 1.4s ease-in-out infinite; transform-origin: bottom center; }
.streak-info { flex: 1; }
.streak-count { font-family: 'Orbitron', monospace; font-size: 18px; font-weight: 800; color: #ff6a00; line-height: 1; }
.streak-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.streak-danger { background: rgba(255,30,30,.07); border-color: rgba(255,30,30,.25); animation: pulse 2s ease-in-out infinite; }
.streak-danger .streak-count { color: #ff3333; }
.streak-warn-msg { font-size: 11px; color: #ff4444; font-weight: 800; margin-top: 3px; }

/* ═══════════════════════════════
   EMPTY STATE CHILD
═══════════════════════════════ */
.empty-state-art { font-size: 64px; margin-bottom: 16px; animation: float 3s ease-in-out infinite; display: inline-block; }
.empty-state-title { font-family: 'Baloo 2', cursive; font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.empty-state-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }

/* ═══════════════════════════════
   RESPONSIVE UTILS
═══════════════════════════════ */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-muted  { color: var(--muted); }
.text-purple { color: var(--purple); }
.text-green  { color: var(--green); }
.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.text-center { text-align: center; }
.font-bold   { font-weight: 800; }
.font-orbitron { font-family: 'Orbitron', monospace; }

/* confetti canvas */
#confetti-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; }
