/* ═══════════════════════════════════════════════════════
   FAMILY HOME TASKS - Main Stylesheet
   Fun, colorful, kid-friendly design 🎨
═══════════════════════════════════════════════════════ */

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

:root {
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --secondary: #f093fb;
  --accent-green: #48bb78;
  --accent-orange: #ed8936;
  --accent-pink: #fc8181;
  --accent-teal: #38b2ac;
  --accent-yellow: #f6e05e;
  --accent-purple: #9f7aea;
  --bg: #f7f8fc;
  --card-bg: #ffffff;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-height: 64px;
  --nav-height: 68px;

  /* Member colors */
  --eden-color: #667eea;
  --hen-color: #f093fb;
  --harel-color: #48bb78;
  --ella-color: #fc8181;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
}

/* ── Screens ── */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

.screen.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════════════════════════ */
#splash-screen {
  background: linear-gradient(145deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: var(--safe-top) 24px var(--safe-bottom);
}

.splash-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-emoji {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: 2rem;
  animation: floatEmoji 4s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0.6;
}

@keyframes floatEmoji {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 380px;
}

.app-logo {
  font-size: 80px;
  animation: logoPopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
}

@keyframes logoPopIn {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.app-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: white;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideUp 0.5s 0.2s both;
}

.app-subtitle {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  animation: slideUp 0.5s 0.3s both;
}

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

.family-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  animation: slideUp 0.5s 0.4s both;
}

.family-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.family-card:active {
  transform: scale(0.94);
}

.family-card:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.member-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 3px solid rgba(255,255,255,0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.member-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.member-role {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   MAIN APP LAYOUT
═══════════════════════════════════════════════════════ */
#main-app {
  display: none;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

#main-app.active {
  display: flex;
}

/* ── Header ── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  min-height: calc(var(--header-height) + var(--safe-top));
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.header-left, .header-right {
  width: 60px;
  display: flex;
  align-items: center;
}

.header-right { justify-content: flex-end; }

.header-center {
  flex: 1;
  text-align: center;
}

.header-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
}

.btn-icon {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
}

.btn-icon:active { transform: scale(0.9); }

.member-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(255,255,255,0.2);
}

.points-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 0.9rem;
  font-weight: 800;
  color: white;
}

/* ── Tab Navigation ── */
.tab-nav {
  display: flex;
  background: white;
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(8px + var(--safe-bottom));
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  color: var(--text-secondary);
  -webkit-user-select: none;
  user-select: none;
}

.tab-btn:active { transform: scale(0.9); }

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active .tab-icon {
  transform: scale(1.2);
}

.tab-icon {
  font-size: 1.3rem;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: block;
}

.tab-label {
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Tab Content ── */
.tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  margin-bottom: calc(var(--nav-height) + var(--safe-bottom) + 4px);
}

.tab-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}

.tab-panel.active {
  display: flex;
}

/* ═══════════════════════════════════════════════════════
   PANEL HEADERS
═══════════════════════════════════════════════════════ */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  gap: 12px;
}

.panel-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.panel-filters {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: white;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-family: 'Nunito', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

.filter-btn:active { transform: scale(0.95); }

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.btn-add {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
}

.btn-add:active { transform: scale(0.9); }

/* ═══════════════════════════════════════════════════════
   TASK CARDS
═══════════════════════════════════════════════════════ */
.tasks-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  animation: cardSlideIn 0.3s ease both;
}

@keyframes cardSlideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.task-card:active { transform: scale(0.98); }

.task-card.done {
  opacity: 0.6;
  background: #f8f9fa;
}

.task-card.done .task-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.task-card.overdue {
  background: #fff5f5;
  border-left-color: var(--accent-pink);
}

.task-card.today {
  background: #fffff0;
  border-left-color: var(--accent-yellow);
}

.task-checkbox {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 0.9rem;
}

.task-checkbox.checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

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

.task-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.task-category-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-assignee {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
}

.task-due {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.task-due.overdue {
  color: var(--accent-pink);
  font-weight: 700;
}

.task-due.today {
  color: var(--accent-orange);
  font-weight: 700;
}

.task-points {
  font-size: 0.75rem;
  color: var(--accent-orange);
  font-weight: 700;
  margin-left: auto;
}

.task-recurring-badge {
  font-size: 0.65rem;
  background: var(--accent-teal);
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  display: block;
}

.empty-state p {
  font-size: 1rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   SHOPPING LIST
═══════════════════════════════════════════════════════ */
.shopping-categories {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shop-category-section {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.shop-category-header {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

.shop-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.shop-item:active { background: var(--bg); }

.shop-item.checked {
  opacity: 0.5;
}

.shop-item.checked .shop-item-name {
  text-decoration: line-through;
}

.shop-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.shop-checkbox.checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

.shop-item-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
}

.shop-item-qty {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 700;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 8px;
}

.shop-item-delete {
  background: none;
  border: none;
  color: var(--accent-pink);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

/* ═══════════════════════════════════════════════════════
   ROUTINES
═══════════════════════════════════════════════════════ */
.routines-container {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.routine-section {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.routine-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.routine-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.routine-title {
  font-size: 1rem;
  font-weight: 800;
}

.routine-progress {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.routine-progress-bar {
  height: 6px;
  background: var(--border);
  margin: 0 16px 12px;
  border-radius: 3px;
  overflow: hidden;
}

.routine-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), #68d391);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.routine-items {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

.routine-item:active { background: var(--bg); }

.routine-item.completed {
  opacity: 0.6;
}

.routine-item.completed .routine-item-text {
  text-decoration: line-through;
}

.routine-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.2s;
}

.routine-checkbox.checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

.routine-item-emoji {
  font-size: 1.3rem;
}

.routine-item-text {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   REWARDS
═══════════════════════════════════════════════════════ */
.my-points-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-orange);
  background: #fff7ed;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #fed7aa;
}

.rewards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}

.reward-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.reward-card:active { transform: scale(0.96); }

.reward-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.reward-card.cant-afford {
  opacity: 0.5;
  cursor: not-allowed;
}

.reward-card.cant-afford:active { transform: none; }

.reward-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.reward-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.reward-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #f6e05e, #f6ad55);
  color: #744210;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.reward-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent-green);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
}

.earned-rewards {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.earned-reward-item {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.earned-reward-status {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 700;
  margin-left: auto;
}

.earned-reward-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.earned-reward-status.approved {
  background: #dcfce7;
  color: #14532d;
}

/* ═══════════════════════════════════════════════════════
   LEADERBOARD
═══════════════════════════════════════════════════════ */
.leaderboard-container {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leaderboard-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.leaderboard-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.leaderboard-card:nth-child(1) { background: linear-gradient(135deg, #fff9c4, white); }
.leaderboard-card:nth-child(1)::before { background: #f6e05e; }
.leaderboard-card:nth-child(2)::before { background: #a0aec0; }
.leaderboard-card:nth-child(3)::before { background: #ed8936; }

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #f6e05e, #f6ad55); }
.rank-2 { background: linear-gradient(135deg, #e2e8f0, #cbd5e0); }
.rank-3 { background: linear-gradient(135deg, #fbd38d, #ed8936); }
.rank-other { background: var(--bg); font-size: 1rem; font-weight: 800; color: var(--text-secondary); }

.lb-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.lb-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.lb-stats {
  text-align: right;
}

.lb-points {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: flex-end;
}

.lb-tasks {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Stats Section */
.stats-section {
  padding: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* ── Parent Controls ── */
.parent-controls {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.parent-control-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.parent-control-header {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pending-approval-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.pending-item-info {
  flex: 1;
}

.pending-item-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.pending-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pending-actions {
  display: flex;
  gap: 6px;
}

.btn-approve {
  background: var(--accent-green);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s;
}

.btn-reject {
  background: var(--accent-pink);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s;
}

.btn-approve:active, .btn-reject:active { transform: scale(0.93); }

/* ═══════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeInOverlay 0.2s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: slideUpModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding-bottom: var(--safe-bottom);
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
}

.modal-close:active { transform: scale(0.9); background: var(--border); }

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 14px 20px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
}

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  background: white;
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.assign-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.assign-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.assign-btn:active { transform: scale(0.95); }

.assign-btn.selected {
  color: white;
  border-color: transparent;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cat-btn {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-user-select: none;
  user-select: none;
}

.cat-btn:active { transform: scale(0.95); }

.cat-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.points-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.points-opt {
  padding: 7px 14px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.points-opt:active { transform: scale(0.95); }

.points-opt.selected {
  background: linear-gradient(135deg, #f6e05e, #f6ad55);
  border-color: #f6ad55;
  color: #744210;
}

.recurring-grid {
  display: flex;
  gap: 8px;
}

.recur-opt {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.recur-opt:active { transform: scale(0.95); }

.recur-opt.active {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: white;
}

.shop-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.emoji-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.emoji-opt {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.emoji-opt:active { transform: scale(0.9); }

.emoji-opt.selected {
  border-color: var(--primary);
  background: rgba(102,126,234,0.1);
}

/* ── Buttons ── */
.btn-primary {
  flex: 1;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:active { transform: scale(0.97); opacity: 0.9; }

.btn-secondary {
  flex: 0 0 auto;
  padding: 13px 20px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:active { transform: scale(0.97); }

.btn-danger {
  padding: 13px 20px;
  background: var(--accent-pink);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:active { transform: scale(0.97); }

.full-width {
  width: 100%;
}

/* Task detail styles */
.task-detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.detail-row-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.detail-row-content {
  flex: 1;
}

.detail-row-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.detail-row-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   CELEBRATION
═══════════════════════════════════════════════════════ */
.celebration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  backdrop-filter: blur(6px);
}

.celebration-overlay.show {
  display: flex;
}

.celebration-content {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 30px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
}

@keyframes popIn {
  from { transform: scale(0.5) rotate(-5deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.celebration-emoji {
  font-size: 5rem;
  display: block;
  margin-bottom: 10px;
  animation: bounce 0.6s ease infinite;
}

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

.celebration-content h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.celebration-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 20px;
}

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  top: -20px;
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2d3748;
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════
   INSTALL BANNER
═══════════════════════════════════════════════════════ */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 16px 20px calc(16px + var(--safe-bottom));
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  animation: slideUpBanner 0.4s ease;
}

@keyframes slideUpBanner {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.install-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.install-banner-text {
  flex: 1;
}

.install-banner-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
}

.install-banner-text small {
  font-size: 0.75rem;
  opacity: 0.85;
}

.install-banner-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   UTILITIES & MEMBER COLOR CLASSES
═══════════════════════════════════════════════════════ */
.color-eden { background-color: var(--eden-color); }
.color-hen { background-color: var(--hen-color); }
.color-harel { background-color: var(--harel-color); }
.color-ella { background-color: var(--ella-color); }

.text-eden { color: var(--eden-color); }
.text-hen { color: var(--hen-color); }
.text-harel { color: var(--harel-color); }
.text-ella { color: var(--ella-color); }

/* Scrollbar styling */
.tab-panel::-webkit-scrollbar { width: 0; }
.modal-body::-webkit-scrollbar { width: 0; }

/* Member color for task cards */
.task-card[data-member="eden"] { border-left-color: var(--eden-color); }
.task-card[data-member="hen"] { border-left-color: var(--hen-color); }
.task-card[data-member="harel"] { border-left-color: var(--harel-color); }
.task-card[data-member="ella"] { border-left-color: var(--ella-color); }

/* Animations for score changes */
@keyframes pointsPopup {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-40px) scale(1.3); opacity: 0; }
}

.points-popup {
  position: fixed;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-orange);
  pointer-events: none;
  z-index: 500;
  animation: pointsPopup 1s ease forwards;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
