/* ============================================================
   MINHA MESADA — Complete Design System CSS
   Dark theme · Glassmorphism · Vibrant purple/amber palette
   ============================================================ */

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

/* ─── 2. CSS RESET ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { text-decoration: none; color: inherit; }
ol, ul { list-style: none; }
table { border-collapse: collapse; }

/* ─── 3. CSS ROOT VARIABLES ───────────────────────────────── */
:root {
  /* Colors */
  --primary:        #7C3AED;
  --primary-light:  #9D5CF5;
  --primary-dark:   #5B21B6;
  --primary-dim:    rgba(124, 58, 237, 0.15);
  --secondary:      #F59E0B;
  --secondary-light:#FCD34D;
  --secondary-dim:  rgba(245, 158, 11, 0.15);
  --success:        #10B981;
  --success-light:  #34D399;
  --success-dim:    rgba(16, 185, 129, 0.15);
  --danger:         #EF4444;
  --danger-light:   #F87171;
  --danger-dim:     rgba(239, 68, 68, 0.15);
  --warning:        #F97316;
  --warning-light:  #FB923C;
  --warning-dim:    rgba(249, 115, 22, 0.15);
  --info:           #3B82F6;
  --info-light:     #60A5FA;
  --info-dim:       rgba(59, 130, 246, 0.15);

  /* Backgrounds */
  --bg:        #0F0A1E;
  --surface:   #1A1235;
  --surface2:  #231847;
  --surface3:  #2D1F5E;

  /* Text */
  --text:       #F8F4FF;
  --text-muted: #9F8FC3;
  --text-dim:   #6B5F8A;

  /* Border */
  --border:     rgba(124, 58, 237, 0.2);
  --border-mid: rgba(124, 58, 237, 0.35);

  /* Glow / Shadow */
  --glow:         rgba(124, 58, 237, 0.4);
  --glow-strong:  rgba(124, 58, 237, 0.6);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-float: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  --shadow-glow:  0 0 20px var(--glow), 0 4px 24px rgba(0,0,0,0.4);

  /* Radius */
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-pill:999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10:40px;
  --space-12:48px;
  --space-16:64px;

  /* Typography */
  --font: 'Nunito', system-ui, sans-serif;
  --text-xs:  0.75rem;
  --text-sm:  0.875rem;
  --text-base:1rem;
  --text-lg:  1.125rem;
  --text-xl:  1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-slow: all 0.4s ease;

  /* Layout */
  --header-h: 60px;
  --bottom-nav-h: 72px;
  --max-w: 480px;
}

/* ─── 4. BASE STYLES ──────────────────────────────────────── */
html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124,58,237,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%,  rgba(245,158,11,0.06) 0%, transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── 5. TYPOGRAPHY ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl);  }
h4 { font-size: var(--text-lg);  }
h5 { font-size: var(--text-base);}
h6 { font-size: var(--text-sm);  }

p { color: var(--text-muted); line-height: 1.6; }

small { font-size: var(--text-xs); color: var(--text-dim); }

strong { font-weight: 800; color: var(--text); }

/* ─── 6. LAYOUT ───────────────────────────────────────────── */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

.container {
  width: 100%;
  padding: calc(var(--header-h) + var(--space-4)) var(--space-4) var(--space-6);
}

.content-area {
  flex: 1;
  padding: var(--space-4);
  padding-top: calc(var(--header-h) + var(--space-4));
  padding-bottom: calc(var(--bottom-nav-h) + var(--space-6));
  overflow-y: auto;
}

.content-area.no-nav {
  padding-bottom: var(--space-8);
}

.content-area.no-header {
  padding-top: var(--space-4);
}

/* ─── 7. TOP BAR / HEADER ─────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  background: rgba(15, 10, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.top-bar__left,
.top-bar-left,
.top-bar__right,
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 48px;
}

.top-bar__right,
.top-bar-actions {
  justify-content: flex-end;
}

.top-bar__title,
.top-bar-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.top-bar-sub {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 1px;
}

.top-bar-left > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.top-bar__logo {
  font-size: var(--text-xl);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--primary-dim);
  border: 1px solid var(--border);
  color: var(--primary-light);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.back-btn:hover {
  background: var(--surface3);
  border-color: var(--primary-light);
  box-shadow: 0 0 12px var(--glow);
}

/* ─── 8. BOTTOM NAVIGATION ────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: var(--bottom-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(15, 10, 30, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 var(--space-2);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: var(--space-2) 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: var(--transition);
}

.nav-item__icon {
  font-size: 22px;
  position: relative;
  line-height: 1;
}

.nav-item__label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.nav-item.active .nav-item__label {
  color: var(--primary-light);
}

.nav-item.active .nav-item__icon {
  filter: drop-shadow(0 0 8px var(--primary-light));
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
}

.nav-item:hover .nav-item__label { color: var(--text-muted); }

/* Notification dot on nav icon */
.notif-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* ─── 9. CARDS ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.card-glass {
  background: rgba(26, 18, 53, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-float);
}

.card-hover {
  transition: var(--transition);
  cursor: pointer;
}

.card-hover:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.card-hover:active {
  transform: translateY(0);
}

/* ─── 10. BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px var(--space-6);
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.07);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.btn:hover::after  { opacity: 1; }
.btn:active { transform: scale(0.97); }

/* Primary — gradient purple */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(124,58,237,0.55);
  transform: translateY(-1px);
}

/* Success */
.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 28px rgba(16,185,129,0.5);
  transform: translateY(-1px);
}

/* Danger */
.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239,68,68,0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 28px rgba(239,68,68,0.5);
  transform: translateY(-1px);
}

/* Secondary / amber */
.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: #1a0a00;
  box-shadow: 0 4px 20px rgba(245,158,11,0.3);
  font-weight: 800;
}

.btn-secondary:hover {
  box-shadow: 0 6px 28px rgba(245,158,11,0.5);
  transform: translateY(-1px);
}

/* Warning */
.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-light) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(249,115,22,0.3);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary-dim);
  border-color: var(--primary-light);
  box-shadow: 0 0 16px var(--glow);
}

/* Ghost */
.btn-ghost {
  background: var(--primary-dim);
  color: var(--primary-light);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface3);
  border-color: var(--primary-light);
}

/* Sizes */
.btn-sm {
  padding: 8px var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 15px var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-pill);
  font-size: 18px;
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.btn-icon.btn-lg {
  width: 52px;
  height: 52px;
  font-size: 22px;
}

.btn-block {
  width: 100%;
  display: flex;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── 11. FORMS ───────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-control,
.form-select {
  width: 100%;
  padding: 13px var(--space-4);
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-control::placeholder { color: var(--text-dim); font-weight: 600; }

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2), 0 0 16px rgba(124,58,237,0.1);
}

.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%239F8FC3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 40px;
  cursor: pointer;
}

.form-select option {
  background: var(--surface2);
  color: var(--text);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-weight: 600;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.form-check-input {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-mid);
  background: var(--surface2);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
}

.form-check-input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-check-input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.form-check-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

/* PIN input (large digit input) */
.pin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface3);
  border: 2px solid var(--border-mid);
  transition: var(--transition);
}

.pin-dot.filled {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary-light);
  box-shadow: 0 0 12px var(--glow);
  transform: scale(1.2);
}

.pin-input {
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  width: 100%;
  max-width: 200px;
  padding: var(--space-4);
  background: var(--surface2);
  border: 2px solid var(--border-mid);
  border-radius: var(--radius);
  color: var(--primary-light);
}

/* ─── 12. ALERTS / FLASH MESSAGES ─────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  border-left: 4px solid currentColor;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  animation: slideDown 0.3s ease;
  position: relative;
}

.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.alert-close:hover { opacity: 1; }

.alert-success {
  color: var(--success-light);
  background: var(--success-dim);
  border-color: var(--success);
}

.alert-danger {
  color: var(--danger-light);
  background: var(--danger-dim);
  border-color: var(--danger);
}

.alert-warning {
  color: var(--warning-light);
  background: var(--warning-dim);
  border-color: var(--warning);
}

.alert-info {
  color: var(--info-light);
  background: var(--info-dim);
  border-color: var(--info);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── 13. BADGES ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-primary  { background: var(--primary-dim);  color: var(--primary-light);  border: 1px solid rgba(124,58,237,0.3); }
.badge-success  { background: var(--success-dim);  color: var(--success-light);  border: 1px solid rgba(16,185,129,0.3); }
.badge-danger   { background: var(--danger-dim);   color: var(--danger-light);   border: 1px solid rgba(239,68,68,0.3);  }
.badge-warning  { background: var(--warning-dim);  color: var(--warning-light);  border: 1px solid rgba(249,115,22,0.3); }
.badge-secondary{ background: var(--secondary-dim);color: var(--secondary-light);border: 1px solid rgba(245,158,11,0.3); }
.badge-info     { background: var(--info-dim);     color: var(--info-light);     border: 1px solid rgba(59,130,246,0.3); }

.badge-pulse {
  position: relative;
}

.badge-pulse::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: inherit;
  animation: badgePulse 2s infinite;
  z-index: -1;
}

@keyframes badgePulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ─── 14. AVATAR ──────────────────────────────────────────── */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
  border: 2px solid var(--border);
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.avatar-sm { width: 36px; height: 36px; font-size: 1.1rem; }
.avatar-md { width: 52px; height: 52px; font-size: 1.6rem; }
.avatar-lg { width: 68px; height: 68px; font-size: 2rem;   }
.avatar-xl { width: 88px; height: 88px; font-size: 2.6rem; }

.avatar-purple  { background: linear-gradient(135deg, #4C1D95, #7C3AED); border-color: rgba(124,58,237,0.5); }
.avatar-blue    { background: linear-gradient(135deg, #1E3A5F, #3B82F6); border-color: rgba(59,130,246,0.5); }
.avatar-green   { background: linear-gradient(135deg, #064E3B, #10B981); border-color: rgba(16,185,129,0.5); }
.avatar-amber   { background: linear-gradient(135deg, #78350F, #F59E0B); border-color: rgba(245,158,11,0.5); }
.avatar-pink    { background: linear-gradient(135deg, #831843, #EC4899); border-color: rgba(236,72,153,0.5); }
.avatar-red     { background: linear-gradient(135deg, #7F1D1D, #EF4444); border-color: rgba(239,68,68,0.5); }
.avatar-teal    { background: linear-gradient(135deg, #134E4A, #14B8A6); border-color: rgba(20,184,166,0.5); }

/* ─── 15. TASK ITEMS ──────────────────────────────────────── */
.task-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.task-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.task-item.task-pending::before   { background: var(--warning); }
.task-item.task-done::before      { background: var(--success); }
.task-item.task-approved::before  { background: var(--primary-light); }
.task-item.task-rejected::before  { background: var(--danger); }

.task-item:hover {
  border-color: var(--border-mid);
  background: var(--surface2);
}

.task-item.task-done {
  opacity: 0.7;
}

.task-item__info {
  flex: 1;
  min-width: 0;
}

.task-item__name {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-item.task-done .task-item__name {
  text-decoration: line-through;
  color: var(--text-dim);
}

.task-item__meta {
  font-size: var(--text-xs);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.task-item__value {
  font-weight: 800;
  font-size: var(--text-base);
  color: var(--success-light);
  white-space: nowrap;
}

/* Task check button */
.task-check-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--border-mid);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  color: transparent;
  flex-shrink: 0;
}

.task-check-btn:hover {
  border-color: var(--success);
  background: var(--success-dim);
  color: var(--success);
  transform: scale(1.1);
}

.task-check-btn.checked {
  border-color: var(--success);
  background: var(--success);
  color: white;
  box-shadow: 0 0 12px rgba(16,185,129,0.4);
}

/* ─── 16. PROGRESS BAR ────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface3);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress-bar.lg { height: 12px; }
.progress-bar.sm { height: 5px;  }

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: progressShine 2s infinite;
}

@keyframes progressShine {
  from { left: -60%; }
  to   { left: 160%; }
}

.progress-fill.success {
  background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 100%);
}

.progress-fill.warning {
  background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.progress-label span {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
}

/* ─── 17. STAT CARDS ──────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-2);
}

.stat-card__value {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-card.gold .stat-card__value { color: var(--secondary); }
.stat-card.green .stat-card__value { color: var(--success-light); }
.stat-card.purple .stat-card__value { color: var(--primary-light); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.stats-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ─── 18. CHILD CARDS ─────────────────────────────────────── */
.child-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
}

.child-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
  background: var(--surface2);
}

.child-card__name {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text);
}

.child-card__earning {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--success-light);
}

.child-card__progress-wrap {
  width: 100%;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

/* ─── 19. WEEK VIEW ───────────────────────────────────────── */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: var(--space-4);
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.week-day-header {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.week-day-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-dim);
  transition: var(--transition);
}

.week-day-cell.today {
  border-color: var(--primary-light);
  background: var(--primary-dim);
  color: var(--primary-light);
  box-shadow: 0 0 8px var(--glow);
}

.week-day-cell.done {
  background: var(--success-dim);
  border-color: var(--success);
  color: var(--success-light);
}

.week-day-cell.missed {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: var(--danger-light);
}

.week-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
}

/* ─── 20. HISTORY TABLE ───────────────────────────────────── */
.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--space-2);
}

.history-row {
  background: var(--surface);
}

.history-row td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.history-row td:first-child {
  border-left: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
}

.history-row td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.history-row:hover td {
  background: var(--surface2);
}

.history-amount {
  font-weight: 800;
  color: var(--success-light);
}

.history-amount.negative { color: var(--danger-light); }

/* ─── 21. MODAL ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay.center {
  align-items: center;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-6);
  width: 100%;
  max-width: var(--max-w);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-overlay.center .modal-content {
  border-radius: var(--radius-xl);
  transform: scale(0.9);
  margin: var(--space-4);
}

.modal-overlay.center.open .modal-content {
  transform: scale(1);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--surface3);
  border-radius: var(--radius-pill);
  margin: 0 auto var(--space-5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { margin: 0; }

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover { background: var(--surface3); color: var(--text); }

.modal-body { padding-bottom: var(--space-4); }

.modal-footer {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.modal-footer .btn { flex: 1; }

/* ─── 22. TOAST NOTIFICATIONS ─────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--space-4));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: calc(var(--max-w) - 32px);
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  pointer-events: all;
  animation: toastSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast.hiding {
  animation: toastSlideDown 0.3s ease forwards;
}

.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-msg  { flex: 1; }

.toast.success { border-color: var(--success); color: var(--success-light); }
.toast.danger  { border-color: var(--danger);  color: var(--danger-light);  }
.toast.warning { border-color: var(--warning); color: var(--warning-light); }
.toast.info    { border-color: var(--info);    color: var(--info-light);    }

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideDown {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* ─── 23. EMPTY STATE ─────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  gap: var(--space-3);
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: var(--space-2);
  filter: drop-shadow(0 0 20px rgba(124,58,237,0.3));
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.empty-state__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text);
}

.empty-state__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 240px;
  line-height: 1.6;
}

/* ─── 24. EMOJI / COLOR PICKERS ───────────────────────────── */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.emoji-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: transparent;
  border: 2px solid transparent;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.emoji-option:hover {
  background: var(--surface3);
  border-color: var(--border);
  transform: scale(1.15);
}

.emoji-option.selected {
  background: var(--primary-dim);
  border-color: var(--primary-light);
  box-shadow: 0 0 10px var(--glow);
  transform: scale(1.15);
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.2);
}

.color-swatch.selected {
  border-color: white;
  box-shadow: 0 0 0 2px var(--primary), 0 0 12px var(--glow);
  transform: scale(1.15);
}

/* ─── 25. LOGIN PAGE ──────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,0.22) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 90%,  rgba(245,158,11,0.08) 0%, transparent 60%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(26, 18, 53, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.1),
    0 8px 48px rgba(0,0,0,0.5),
    0 0 80px rgba(124,58,237,0.08);
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-6);
}

.logo-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: var(--space-3);
  filter: drop-shadow(0 0 20px rgba(245,158,11,0.5));
  animation: floatIcon 3s ease-in-out infinite;
}

.logo-title {
  font-size: var(--text-2xl);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-weight: 600;
  margin-top: var(--space-1);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-footer {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.login-footer a {
  color: var(--primary-light);
  font-weight: 700;
  transition: var(--transition);
}

.login-footer a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* ─── 26. PIN KEYPAD ──────────────────────────────────────── */
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  max-width: 300px;
  margin: 0 auto;
}

.pin-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-2xl);
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.pin-key::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124,58,237,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
}

.pin-key:active::after  { opacity: 1; }
.pin-key:hover { background: var(--surface3); border-color: var(--border-mid); transform: scale(0.96); }
.pin-key:active { transform: scale(0.9); }

.pin-key .pin-key__sub {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
}

.pin-key.pin-key--backspace {
  font-size: var(--text-xl);
  color: var(--danger-light);
  border-color: rgba(239,68,68,0.2);
}

.pin-key.pin-key--backspace:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
}

.pin-key.pin-key--empty {
  background: transparent;
  border: none;
  pointer-events: none;
}

/* ─── 27. SECTION TITLES ──────────────────────────────────── */
.section-title {
  font-size: var(--text-xl);
  font-weight: 900;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.section-header h2,
.section-header h3 {
  margin: 0;
}

/* ─── 28. LOADING / SKELETON ──────────────────────────────── */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-2);
}

.skeleton-text.sm { height: 10px; }
.skeleton-text.lg { height: 20px; }

.skeleton-card {
  height: 80px;
  border-radius: var(--radius-lg);
}

.skeleton-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ─── 29. ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.8); }
  60%  { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-10px); }
  30%       { transform: translateX(10px); }
  45%       { transform: translateX(-8px); }
  60%       { transform: translateX(8px); }
  75%       { transform: translateX(-4px); }
  90%       { transform: translateX(4px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-12px); }
  60%       { transform: translateY(-6px); }
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.animate-fade    { animation: fadeIn 0.4s ease; }
.animate-slide   { animation: slideUp 0.4s ease; }
.animate-bounce  { animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-shake   { animation: shake 0.5s ease; }
.animate-pulse   { animation: pulse 2s infinite; }

/* Stagger children */
.stagger > * { animation: slideUp 0.4s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ─── 30. UTILITY CLASSES ─────────────────────────────────── */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm  { font-size: var(--text-sm); }
.text-xs  { font-size: var(--text-xs); }
.text-lg  { font-size: var(--text-lg); }
.text-xl  { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }
.text-muted  { color: var(--text-muted); }
.text-dim    { color: var(--text-dim); }
.text-success{ color: var(--success-light); }
.text-danger { color: var(--danger-light); }
.text-warning{ color: var(--warning-light); }
.text-primary{ color: var(--primary-light); }
.text-gold   { color: var(--secondary); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-5  { padding: var(--space-5); }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow effects */
.glow-purple { box-shadow: 0 0 20px var(--glow); }
.glow-green  { box-shadow: 0 0 20px rgba(16,185,129,0.35); }
.glow-gold   { box-shadow: 0 0 20px rgba(245,158,11,0.35); }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
}

/* Rounded full */
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-pill); }

/* Scroll area */
.scroll-x {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface3) transparent;
}

.scroll-x::-webkit-scrollbar { height: 4px; }
.scroll-x::-webkit-scrollbar-track { background: transparent; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

/* ─── 31. CHILD SELECTION CARDS (login-filho) ─────────────── */
.child-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.child-select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.child-select-card:nth-child(1) { animation-delay: 0.05s; }
.child-select-card:nth-child(2) { animation-delay: 0.10s; }
.child-select-card:nth-child(3) { animation-delay: 0.15s; }
.child-select-card:nth-child(4) { animation-delay: 0.20s; }

.child-select-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--primary-light);
  box-shadow: 0 8px 32px var(--glow);
  background: var(--surface3);
}

.child-select-card:active { transform: scale(0.97); }

.child-select-card .avatar {
  width: 72px;
  height: 72px;
  font-size: 2.2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 3px var(--border);
}

.child-select-card__name {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text);
  text-align: center;
}

/* PIN entry section */
.pin-entry {
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-entry__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.pin-entry__back {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.pin-entry__back:hover { color: var(--text); }

/* ─── 32. REWARD / GOAL CARDS ─────────────────────────────── */
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  transition: var(--transition);
}

.goal-card:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 20px rgba(245,158,11,0.1);
}

.goal-card__icon { font-size: 2.4rem; }

.goal-card__info { flex: 1; min-width: 0; }

.goal-card__name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.goal-card__amount {
  font-size: var(--text-sm);
  color: var(--secondary);
  font-weight: 700;
}

/* ─── 33. SUMMARY BANNER ──────────────────────────────────── */
.summary-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(124,58,237,0.4);
}

.summary-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}

.summary-banner::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 40px;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.summary-banner__label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-2);
}

.summary-banner__value {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: white;
  line-height: 1;
}

.summary-banner__sub {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  margin-top: var(--space-2);
}

/* ─── 34. RESPONSIVE (768px breakpoint) ───────────────────── */
@media (min-width: 768px) {
  :root {
    --max-w: 600px;
    --text-base: 1.05rem;
  }

  .content-area { padding: calc(var(--header-h) + var(--space-6)) var(--space-6) calc(var(--bottom-nav-h) + var(--space-8)); }

  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  .children-grid { grid-template-columns: repeat(3, 1fr); }

  .child-select-grid { grid-template-columns: repeat(3, 1fr); }

  .pin-keypad { max-width: 340px; }

  .login-card { padding: var(--space-10); }
}

/* ─── 35. SCROLLBAR GLOBAL ────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── 36. FOCUS VISIBLE ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── 37. SELECTION ───────────────────────────────────────── */
::selection {
  background: rgba(124, 58, 237, 0.35);
  color: var(--text);
}

/* ─── 38. INPUT AUTOFILL ──────────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface3) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

/* ─── 39. PRINT ───────────────────────────────────────────── */
@media print {
  .top-bar, .bottom-nav, .modal-overlay, .toast-container { display: none; }
  body { background: white; color: black; }
}
