/* ============================================
   THE BALANCE LAB — TRACKER STYLES
   Matches The Happy Labs design system
   ============================================ */

/* ============================================
   CSS VARIABLES (from Happy Labs)
   ============================================ */
:root {
  /* Primary Colors */
  --orange: #F5841F;
  --orange-dark: #D46B0A;

  /* Secondary Colors */
  --sky-blue: #87CEEB;
  --sky-blue-dark: #6BB8D9;
  --yellow: #FFD93D;
  --yellow-dark: #E6C235;
  --coral: #FF6B9D;
  --coral-dark: #E65580;
  --teal: #4ECDC4;
  --teal-dark: #3BB8B0;

  /* Neutrals */
  --dark-blue: #2D5B7B;
  --white: #FFFFFF;
  --off-white: #FFFAF5;
  --light-gray: #f5f5f5;
  --mid-gray: #888;

  /* Category Colors */
  --cat-spiritual: #7B68EE;
  --cat-spiritual-light: #E8E4FF;
  --cat-education: #4A90D9;
  --cat-education-light: #E0EFFF;
  --cat-exercise: #FF6B6B;
  --cat-exercise-light: #FFE0E0;
  --cat-hobby: #4ECDC4;
  --cat-hobby-light: #D4F5F2;
  --cat-entertainment: #FFD93D;
  --cat-entertainment-light: #FFF8DC;

  /* Typography */
  --font-display: 'Fredoka One', cursive;
  --font-body: 'Nunito', 'Comic Sans MS', sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 15px;
  --spacing-md: 25px;
  --spacing-lg: 40px;

  /* Border Radius (from Happy Labs) */
  --radius-sm: 15px;
  --radius-md: 20px;
  --radius-lg: 25px;
  --radius-xl: 30px;
  --radius-round: 50px;
  --radius-circle: 50%;

  /* Shadows (matched to main site) */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
  --shadow-orange: 0 8px 25px rgba(245, 132, 31, 0.4);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, #E8F4FC 0%, #FFF9F0 50%, #E8F4FC 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--dark-blue);
  padding-bottom: 70px;
  /* space for bottom nav */
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
}

input,
select {
  font-family: var(--font-body);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes starPop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  60% {
    transform: scale(1.3) rotate(10deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }

  100% {
    transform: translateY(-200px) rotate(720deg);
    opacity: 0;
  }
}

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

  100% {
    background-position: 200px 0;
  }
}

@keyframes progressFill {
  from {
    width: 0%;
  }
}

/* ============================================
   HEADER
   ============================================ */
.t-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 4px solid var(--orange);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(245, 132, 31, 0.15);
}

.t-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.t-header-back {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-circle);
  background: rgba(245, 132, 31, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--orange);
  transition: var(--transition-fast);
}

.t-header-back:hover {
  background: var(--orange);
  color: white;
}

.t-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.t-header-icon {
  font-size: 1.8rem;
}

.t-header-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--orange);
  text-shadow: 1px 1px 0 rgba(245, 132, 31, 0.15);
}

.t-header-subtitle {
  font-size: 0.7rem;
  color: var(--dark-blue);
  font-weight: 600;
}

.t-header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-circle);
  background: transparent;
  font-size: 1.4rem;
  transition: var(--transition-fast);
}

.t-header-btn:hover {
  background: rgba(245, 132, 31, 0.1);
  transform: scale(1.1);
}

/* Sync indicator */
.sync-indicator {
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

.sync-synced {
  color: #4caf50;
}

.sync-syncing {
  color: var(--orange);
  animation: sync-spin 1s linear infinite;
}

.sync-pending {
  color: var(--orange);
}

.sync-error {
  color: #e53935;
}

.sync-offline {
  color: #9e9e9e;
}

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

/* ============================================
   BOTTOM NAV
   ============================================ */
.t-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 3px solid rgba(245, 132, 31, 0.2);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.t-bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--mid-gray);
  font-size: 0.65rem;
  font-weight: 700;
  transition: var(--transition-fast);
}

.t-bnav-btn span:first-child {
  font-size: 1.4rem;
}

.t-bnav-btn.active {
  color: var(--orange);
  background: rgba(245, 132, 31, 0.1);
}

/* ============================================
   SCREENS
   ============================================ */
.t-screen {
  display: none;
  animation: slideUp 0.3s ease;
}

.t-screen.active {
  display: block;
}

.t-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* ============================================
   BUTTONS (matching Happy Labs style)
   ============================================ */
.t-btn {
  padding: 12px 24px;
  border-radius: var(--radius-round);
  font-weight: 800;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

.t-btn:hover {
  transform: translateY(-2px);
}

.t-btn:active {
  transform: translateY(0);
}

.t-btn-orange {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 0 var(--orange-dark), var(--shadow-orange);
}

.t-btn-teal {
  background: var(--teal);
  color: white;
  box-shadow: 0 4px 0 var(--teal-dark);
}

.t-btn-sky {
  background: var(--sky-blue);
  color: white;
  box-shadow: 0 4px 0 var(--sky-blue-dark);
}

.t-btn-coral {
  background: var(--coral);
  color: white;
  box-shadow: 0 4px 0 var(--coral-dark);
}

.t-btn-yellow {
  background: var(--yellow);
  color: var(--dark-blue);
  box-shadow: 0 4px 0 var(--yellow-dark);
}

.t-btn-muted {
  background: var(--light-gray);
  color: var(--dark-blue);
  box-shadow: 0 2px 0 #ddd;
}

.t-btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.t-btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.t-btn-block {
  width: 100%;
  justify-content: center;
}

/* ============================================
   INPUTS
   ============================================ */
.t-input {
  padding: 14px 20px;
  border-radius: var(--radius-xl);
  border: 3px solid #e0e0e0;
  font-size: 1rem;
  width: 100%;
  outline: none;
  font-family: var(--font-body);
  transition: var(--transition-fast);
  background: white;
}

.t-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(245, 132, 31, 0.15);
}

.t-input-sm {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.t-input-xs {
  padding: 10px 12px;
  font-size: 0.9rem;
  width: 80px;
}

.t-select {
  padding: 10px 16px;
  border-radius: var(--radius-xl);
  border: 3px solid #e0e0e0;
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 700;
  background: white;
  outline: none;
  cursor: pointer;
}

.t-select:focus {
  border-color: var(--orange);
}

.t-label {
  display: block;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--dark-blue);
  margin-bottom: 10px;
}

.t-label-sm {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-bottom: 8px;
}

/* ============================================
   WELCOME SCREEN
   ============================================ */
.t-welcome {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.t-welcome-hero {
  text-align: center;
  max-width: 450px;
  position: relative;
}

.t-welcome-float {
  position: absolute;
  animation: float 3s ease-in-out infinite;
  font-size: 2rem;
  opacity: 0.4;
  pointer-events: none;
}

.t-welcome-float-1 {
  top: -20px;
  left: -10px;
  animation-duration: 3s;
}

.t-welcome-float-2 {
  top: 30px;
  right: -15px;
  animation-duration: 4s;
}

.t-welcome-float-3 {
  bottom: 80px;
  left: -20px;
  animation-duration: 3.5s;
}

.t-welcome-icon {
  font-size: 5rem;
  margin-bottom: 10px;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

.t-welcome-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--orange);
  text-shadow: 3px 3px 0 rgba(245, 132, 31, 0.15);
  margin-bottom: 10px;
}

.t-welcome-tagline {
  font-size: 1.15rem;
  color: var(--dark-blue);
  font-style: italic;
  margin-bottom: 15px;
  font-weight: 700;
}

.t-welcome-desc {
  font-size: 1rem;
  color: var(--dark-blue);
  line-height: 1.6;
  margin-bottom: 30px;
  opacity: 0.8;
}

.t-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.t-welcome-note {
  margin-top: 30px;
  font-size: 0.85rem;
  color: var(--mid-gray);
  font-weight: 600;
}

.t-join-form {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.t-join-form .t-input {
  width: auto;
  max-width: 250px;
}

/* ============================================
   SETUP SCREEN
   ============================================ */
.t-setup-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border-left: 8px solid var(--orange);
}

.t-setup-step {
  animation: slideUp 0.3s ease;
}

.t-setup-info {
  font-size: 0.9rem;
  color: var(--mid-gray);
  margin-bottom: 15px;
}

.t-lab-code {
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(245, 132, 31, 0.1), rgba(78, 205, 196, 0.1));
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  letter-spacing: 3px;
  color: var(--dark-blue);
  border: 3px dashed var(--orange);
  margin-bottom: 15px;
}

.t-lab-code-sm {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark-blue);
}

/* Avatar Picker */
.t-avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.t-avatar-option {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-circle);
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 3px solid transparent;
}

.t-avatar-option:hover {
  transform: scale(1.15);
  background: rgba(245, 132, 31, 0.1);
}

.t-avatar-option.selected {
  border-color: var(--orange);
  background: rgba(245, 132, 31, 0.15);
  transform: scale(1.1);
}

.t-add-member-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  padding: 15px;
  background: var(--light-gray);
  border-radius: var(--radius-md);
  margin-top: 15px;
}

.t-members-edit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.t-member-edit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: white;
  border-radius: var(--radius-sm);
  border: 2px solid #e8e8e8;
  animation: slideIn 0.3s ease;
}

.t-member-edit-avatar {
  font-size: 1.5rem;
}

.t-member-edit-name {
  font-weight: 800;
  flex: 1;
}

.t-member-edit-age {
  font-size: 0.85rem;
  color: var(--mid-gray);
  font-weight: 700;
}

.t-member-edit-remove {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-circle);
  background: rgba(255, 107, 157, 0.1);
  color: var(--coral);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.t-member-edit-remove:hover {
  background: var(--coral);
  color: white;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.t-section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--orange);
  margin-bottom: 20px;
  text-shadow: 2px 2px 0 rgba(245, 132, 31, 0.1);
}

.t-subsection-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--dark-blue);
  margin: 20px 0 12px;
}

.t-back-btn {
  background: transparent;
  color: var(--orange);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 8px 0;
  margin-bottom: 10px;
  border: none;
  transition: var(--transition-fast);
}

.t-back-btn:hover {
  color: var(--orange-dark);
}

/* ============================================
   FAMILY HOME DASHBOARD
   ============================================ */

/* Mission Banner */
.t-mission-banner {
  background: linear-gradient(135deg, var(--dark-blue), #4a6fa5);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  color: white;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.t-mission-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.t-mission-label {
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.t-mission-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.t-mission-bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.t-mission-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  border-radius: 10px;
  transition: width 0.5s ease;
  animation: progressFill 1s ease;
}

.t-mission-count {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.9;
}

/* Champions Banner */
.t-champions-banner {
  background: white;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(255, 217, 61, 0.4);
  overflow: hidden;
}

.t-champion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-blue);
}

.t-champion-item span.t-champion-crown {
  font-size: 1.3rem;
}

/* Members Grid */
.t-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.t-member-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 15px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 3px solid transparent;
}

.t-member-card.champion {
  border-color: var(--yellow);
  box-shadow: 0 8px 25px rgba(255, 217, 61, 0.3);
}

.t-member-card .t-crown {
  position: absolute;
  top: -8px;
  right: -5px;
  font-size: 1.5rem;
  animation: bounce 2s ease-in-out infinite;
}

.t-ent-unlocked-icon {
  position: absolute;
  top: -8px;
  left: -5px;
  font-size: 1.5rem;
  animation: bounce 2s ease-in-out infinite;
  animation-delay: 1s;
}

.t-member-card-avatar {
  font-size: 2.8rem;
  margin-bottom: 8px;
  display: block;
}

.t-member-card-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--dark-blue);
  margin-bottom: 6px;
}

.t-member-card-stars {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 8px;
}

/* Progress Ring */
.t-progress-ring {
  display: flex;
  justify-content: center;
  gap: 8px;
  /* Increased from 4px */
  margin-top: 12px;
}

.t-progress-dot {
  width: 14px;
  /* Larger dots */
  height: 14px;
  border-radius: var(--radius-circle);
  background: white;
  /* Empty slot */
  border: 2px solid #e0e0e0;
  /* Explicit border for visibility */
  transition: var(--transition-fast);
}

.t-progress-dot.filled {
  border: none;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.t-feed-container {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 2px dashed rgba(0, 0, 0, 0.05);
}

.t-feed-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark-blue);
  margin-bottom: 15px;
  padding-left: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.t-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.t-feed-item {
  background: white;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUp 0.3s ease;
  border-left: 4px solid #eee;
}

.t-feed-item.cat-spiritual {
  border-left-color: var(--cat-spiritual);
}

.t-feed-item.cat-education {
  border-left-color: var(--cat-education);
}

.t-feed-item.cat-exercise {
  border-left-color: var(--cat-exercise);
}

.t-feed-item.cat-hobby {
  border-left-color: var(--cat-hobby);
}

.t-feed-avatar {
  font-size: 1.4rem;
  background: #f8f9fa;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.t-feed-content {
  flex: 1;
}

.t-feed-text {
  font-size: 0.95rem;
  color: var(--dark-blue);
  line-height: 1.3;
}

.t-feed-act {
  font-weight: 700;
}

.t-feed-time {
  font-size: 0.75rem;
  color: #999;
  margin-top: 3px;
}

.t-feed-empty {
  text-align: center;
  color: #aaa;
  font-style: italic;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
}

.t-progress-dot.filled.cat-0 {
  background: var(--cat-spiritual);
}

.t-progress-dot.filled.cat-1 {
  background: var(--cat-education);
}

.t-progress-dot.filled.cat-2 {
  background: var(--cat-exercise);
}

.t-progress-dot.filled.cat-3 {
  background: var(--cat-hobby);
}

/* ============================================
   INDIVIDUAL DASHBOARD
   ============================================ */
.t-member-header {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.t-member-hero {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.t-member-avatar-lg {
  font-size: 3.5rem;
}

.t-member-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--dark-blue);
}

.t-member-stats {
  display: flex;
  gap: 15px;
  margin-top: 4px;
}

.t-stat-stars {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--orange);
}

.t-stat-streak {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--coral);
}

.t-member-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(245, 132, 31, 0.08), rgba(255, 217, 61, 0.08));
  border-radius: var(--radius-md);
  border: 2px solid rgba(245, 132, 31, 0.15);
}

.t-balance-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--mid-gray);
}

.t-balance-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--orange);
}

/* Entertainment Status */
.t-entertainment-status {
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.t-entertainment-status.locked {
  background: rgba(255, 107, 157, 0.08);
  border: 2px solid rgba(255, 107, 157, 0.2);
  color: var(--coral);
}

.t-entertainment-status.unlocked {
  background: rgba(78, 205, 196, 0.08);
  border: 2px solid rgba(78, 205, 196, 0.3);
  color: var(--teal-dark);
}

.t-entertainment-icon {
  font-size: 1.5rem;
}

.t-ent-unlock-anim {
  animation: ent-unlock 1.2s ease-out;
}

@keyframes ent-unlock {
  0% { transform: scale(1); }
  15% { transform: scale(1.06); box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.5); }
  30% { transform: scale(1); box-shadow: 0 0 0 12px rgba(78, 205, 196, 0); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.3); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(78, 205, 196, 0); }
  100% { transform: scale(1); }
}

/* Category Cards */
.t-categories {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.t-cat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border-left: 6px solid #ccc;
  transition: all var(--transition-normal);
}

.t-cat-card:hover {
  box-shadow: var(--shadow-md);
}

.t-cat-card[data-cat="spiritual"] {
  border-left-color: var(--cat-spiritual);
}

.t-cat-card[data-cat="education"] {
  border-left-color: var(--cat-education);
}

.t-cat-card[data-cat="exercise"] {
  border-left-color: var(--cat-exercise);
}

.t-cat-card[data-cat="hobby"] {
  border-left-color: var(--cat-hobby);
}

.t-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.t-cat-title {
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-cat-star {
  font-size: 1.3rem;
  opacity: 0.3;
  transition: all 0.5s ease;
}

.t-cat-star.earned {
  opacity: 1;
  animation: starPop 0.5s ease;
}

.t-cat-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.t-cat-progress-bar {
  flex: 1;
  height: 10px;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
}

.t-cat-progress-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s ease;
  min-width: 0;
}

.t-cat-card[data-cat="spiritual"] .t-cat-progress-fill {
  background: var(--cat-spiritual);
}

.t-cat-card[data-cat="education"] .t-cat-progress-fill {
  background: var(--cat-education);
}

.t-cat-card[data-cat="exercise"] .t-cat-progress-fill {
  background: var(--cat-exercise);
}

.t-cat-card[data-cat="hobby"] .t-cat-progress-fill {
  background: var(--cat-hobby);
}

.t-cat-progress-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mid-gray);
  white-space: nowrap;
}

/* Quick Tap Activities within Category Card */
.t-cat-quick-activities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.t-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--light-gray);
  border-radius: var(--radius-round);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 2px solid transparent;
}

.t-quick-chip:hover {
  border-color: var(--orange);
  background: rgba(245, 132, 31, 0.08);
}

.t-quick-chip:active {
  transform: scale(0.95);
}

.t-quick-chip-name {
  color: var(--dark-blue);
}

.t-quick-chip-btns {
  display: flex;
  gap: 3px;
}

.t-qc-dur {
  background: rgba(245, 132, 31, 0.15);
  color: var(--orange);
  border: none;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}

.t-qc-dur:hover {
  background: var(--orange);
  color: white;
}

/* Day Off */
.t-dayoff-area {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #eee;
}

/* ============================================
   LOG ACTIVITY SCREEN
   ============================================ */
.t-log-member-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.t-log-member-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border-radius: var(--radius-round);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 3px solid #e0e0e0;
  transition: var(--transition-fast);
}

.t-log-member-chip.selected {
  border-color: var(--orange);
  background: rgba(245, 132, 31, 0.08);
}

/* Voice Input */
.t-voice-area {
  text-align: center;
  margin-bottom: 20px;
}

.t-voice-btn {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-circle);
  background: linear-gradient(135deg, var(--coral), #FF8E53);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

.t-voice-btn:hover {
  transform: scale(1.1);
}

.t-voice-btn.listening {
  animation: pulse 1s ease-in-out infinite;
  box-shadow: 0 0 0 8px rgba(255, 107, 157, 0.2), 0 8px 25px rgba(255, 107, 157, 0.4);
}

.t-voice-icon {
  font-size: 2rem;
}

.t-voice-label {
  font-size: 0.65rem;
  color: white;
  font-weight: 700;
}

.t-voice-hint {
  font-size: 0.85rem;
  color: var(--mid-gray);
  font-weight: 600;
}

.t-voice-result {
  background: white;
  border-radius: var(--radius-md);
  padding: 15px;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--teal);
  text-align: left;
}

/* Divider */
.t-log-divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.t-log-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #e0e0e0;
}

.t-log-divider span {
  background: linear-gradient(180deg, #E8F4FC, #FFF9F0);
  padding: 0 15px;
  position: relative;
  font-size: 0.85rem;
  color: var(--mid-gray);
  font-weight: 700;
}

/* Category Selection */
.t-log-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.t-log-cat-btn {
  padding: 20px 15px;
  border-radius: var(--radius-lg);
  background: white;
  border: 3px solid #e8e8e8;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.t-log-cat-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.t-log-cat-btn.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(245, 132, 31, 0.15);
}

.t-log-cat-btn span:first-child {
  font-size: 2rem;
  display: block;
  margin-bottom: 6px;
}

.t-log-cat-btn span:last-child {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--dark-blue);
}

/* Activity Area */
.t-log-activity-area {
  animation: slideUp 0.3s ease;
}

.t-log-category-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--dark-blue);
  margin-bottom: 15px;
}

.t-quick-activities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.t-quick-act-btn {
  padding: 10px 18px;
  border-radius: var(--radius-round);
  background: var(--light-gray);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.t-quick-act-btn:hover {
  border-color: var(--orange);
  background: rgba(245, 132, 31, 0.08);
}

.t-quick-act-btn.selected {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

.t-new-activity {
  margin-bottom: 20px;
}

/* Duration Picker */
.t-duration-picker {
  margin-bottom: 25px;
}

.t-duration-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.t-dur-btn {
  padding: 10px 18px;
  border-radius: var(--radius-round);
  background: var(--light-gray);
  border: 2px solid transparent;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--dark-blue);
}

.t-dur-btn:hover {
  border-color: var(--teal);
}

.t-dur-btn.selected {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* ============================================
   REWARDS STORE
   ============================================ */
.t-reward-member-select {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.t-reward-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-radius: var(--radius-lg);
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(255, 217, 61, 0.3);
}

.t-reward-balance-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--orange);
}

.t-rewards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.t-reward-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.t-reward-card:hover {
  border-color: rgba(245, 132, 31, 0.2);
  transform: translateY(-2px);
}

.t-reward-card.mystery {
  background: linear-gradient(135deg, rgba(123, 104, 238, 0.05), rgba(255, 107, 157, 0.05));
  border: 2px dashed rgba(123, 104, 238, 0.3);
}

.t-reward-icon {
  font-size: 2.2rem;
}

.t-reward-info {
  flex: 1;
}

.t-reward-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--dark-blue);
  margin-bottom: 6px;
}

.t-reward-progress {
  height: 6px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.t-reward-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.t-reward-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--orange);
  white-space: nowrap;
}

.t-reward-redeem-btn {
  padding: 8px 16px;
  border-radius: var(--radius-round);
  background: var(--orange);
  color: white;
  border: none;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 3px 0 var(--orange-dark);
}

.t-reward-redeem-btn:hover {
  transform: translateY(-2px);
}

.t-reward-redeem-btn:disabled {
  background: #ccc;
  box-shadow: 0 3px 0 #aaa;
  cursor: not-allowed;
}

.t-add-reward {
  text-align: center;
  padding: 15px 0;
}

/* ============================================
   WEEKLY SUMMARY
   ============================================ */
.t-weekly-member {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.t-weekly-member-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.t-weekly-avatar {
  font-size: 2rem;
}

.t-weekly-name {
  font-weight: 800;
  font-size: 1.1rem;
}

.t-weekly-stars-total {
  font-family: var(--font-display);
  color: var(--orange);
  font-size: 1rem;
}

.t-weekly-grid {
  display: grid;
  grid-template-columns: auto repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 15px;
  font-size: 0.75rem;
  text-align: center;
}

.t-weekly-grid-header {
  font-weight: 800;
  color: var(--mid-gray);
  padding: 4px;
}

.t-weekly-grid-cat {
  text-align: left;
  font-weight: 700;
  padding: 4px;
  font-size: 0.7rem;
}

.t-weekly-grid-cell {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.t-weekly-grid-cell.empty {
  background: #f0f0f0;
}

.t-weekly-grid-cell.done {
  background: rgba(78, 205, 196, 0.2);
  font-size: 0.8rem;
}

.t-weekly-grid-cell.starred {
  background: rgba(255, 217, 61, 0.3);
  font-size: 0.8rem;
}

.t-weekly-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.t-weekly-highlight {
  background: var(--light-gray);
  border-radius: var(--radius-round);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ============================================
   SETTINGS
   ============================================ */
.t-settings-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.t-settings-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--dark-blue);
  margin-bottom: 15px;
}

.t-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.t-settings-row:last-child {
  border-bottom: none;
}

.t-settings-row span {
  font-weight: 700;
  font-size: 0.9rem;
}

/* Toggle Switch */
.t-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.t-toggle input { opacity: 0; width: 0; height: 0; }
.t-toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  cursor: pointer;
  transition: background 0.3s;
}
.t-toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}
.t-toggle input:checked + .t-toggle-slider { background: var(--orange); }
.t-toggle input:checked + .t-toggle-slider::before { transform: translateX(22px); }

/* Activity Chips (for settings editing) */
.t-activity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.t-activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--light-gray);
  border-radius: var(--radius-round);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.t-activity-chip-remove {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-circle);
  background: rgba(255, 107, 157, 0.15);
  color: var(--coral);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
}

.t-activity-chip-remove:hover {
  background: var(--coral);
  color: white;
}

.t-add-activity-inline {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.t-add-activity-inline input {
  flex: 1;
  padding: 6px 12px;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-round);
  font-size: 0.8rem;
  font-family: var(--font-body);
  outline: none;
}

.t-add-activity-inline input:focus {
  border-color: var(--teal);
}

.t-add-activity-inline button {
  padding: 6px 14px;
  border-radius: var(--radius-round);
  background: var(--teal);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ============================================
   SUCCESS OVERLAY
   ============================================ */
.t-success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.t-success-content {
  text-align: center;
  animation: slideUp 0.4s ease;
}

.t-success-stars {
  font-size: 4rem;
  margin-bottom: 15px;
}

.t-success-stars span {
  display: inline-block;
  animation: starPop 0.5s ease forwards;
  opacity: 0;
}

.t-success-stars span:nth-child(1) {
  animation-delay: 0.1s;
}

.t-success-stars span:nth-child(2) {
  animation-delay: 0.3s;
}

.t-success-stars span:nth-child(3) {
  animation-delay: 0.5s;
}

.t-success-msg {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: white;
  margin-bottom: 10px;
}

.t-success-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 25px;
  font-weight: 600;
}

/* ============================================
   MODAL
   ============================================ */
.t-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 5, 20, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.t-modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 450px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.t-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--orange), #FF9A4D);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.t-modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: white;
}

.t-modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-circle);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
}

.t-modal-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

.t-modal-body {
  padding: 24px;
}

/* ============================================
   TOAST
   ============================================ */
.t-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-blue);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-round);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 1001;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.3s ease;
  white-space: nowrap;
}

/* ============================================
   NUDGE BANNER
   ============================================ */
.t-nudge {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(135, 206, 235, 0.1));
  border: 2px solid rgba(78, 205, 196, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-blue);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.4s ease;
}

.t-nudge-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 400px) {
  .t-welcome-title {
    font-size: 2rem;
  }

  .t-section-title {
    font-size: 1.5rem;
  }

  .t-log-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .t-log-cat-btn {
    padding: 15px 10px;
  }

  .t-members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .t-member-hero {
    flex-direction: column;
    text-align: center;
  }

  .t-member-stats {
    justify-content: center;
  }
}

@media (min-width: 600px) {
  .t-container {
    padding: 25px 30px;
  }

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

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

/* ============================================
   MEMBER SUB-TABS
   ============================================ */
.t-container-member-header {
  padding-bottom: 0;
}

.t-member-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.t-member-tabs {
  display: flex;
  gap: 0;
  margin-top: 15px;
  border-bottom: 3px solid #eee;
}

.t-member-tab {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--mid-gray);
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}

.t-member-tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.t-member-tab:hover:not(.active) {
  color: var(--dark-blue);
}

.t-member-tab-content {
  display: none;
}

.t-member-tab-content.active {
  display: block;
}

/* AI offline indicator */
.t-ai-offline {
  text-align: center;
  font-size: 0.75rem;
  color: var(--mid-gray);
  padding: 4px;
  font-weight: 600;
}

/* ============================================
   PRINT HIDDEN
   ============================================ */
@media print {

  .t-header,
  .t-bottom-nav,
  .t-voice-area,
  .t-btn {
    display: none !important;
  }
}

/* ============================================
   MINI-DASHBOARDS (HOME REDESIGN)
   ============================================ */
.t-member-dash-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 25px;
}

.t-member-dash-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.t-md-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.t-md-avatar {
  font-size: 2.2rem;
  background: #f8f9fa;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.t-md-info {
  flex: 1;
}

.t-md-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--dark-blue);
  line-height: 1.2;
}

.t-md-stats {
  font-size: 0.85rem;
  color: var(--mid-gray);
  font-weight: 600;
}

.t-md-ent {
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 20px;
  background: #f0f0f0;
  color: #555;
  border: 2px solid #ddd;
}

.t-md-ent.unlocked {
  background: #d4edda;
  color: #155724;
  border-color: #28a745;
  animation: pulse 2s infinite;
}

/* Category Rows */
.t-md-cats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.t-md-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.t-md-cat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100px;
  flex-shrink: 0;
}

.t-md-cat-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  display: inline-block;
}

.t-md-cat-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-md-cat-progress-area {
  flex: 1;
}

.t-md-cat-bar-bg {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.t-md-cat-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
}

/* Use category specific colors if possible, else teal is fine */
.t-md-cat-text {
  font-size: 0.75rem;
  color: var(--mid-gray);
  width: 50px;
  text-align: right;
  font-feature-settings: "tnum";
}

.t-md-cat-status {
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* GOOD HABITS (home card) */
.t-md-habits {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e0e0e0;
}
.t-md-habits-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.t-md-habits-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark-blue);
}
.t-md-habits-count {
  font-size: 0.8rem;
  color: var(--mid-gray);
  font-weight: 600;
}
.t-md-habits-count.bonus-earned {
  color: var(--orange);
}
.t-md-habits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.t-habit-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f5f5f5;
  border: 1.5px solid #ddd;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.t-habit-check.checked {
  background: #e8f5e9;
  border-color: #4CAF50;
}
.t-habit-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #bbb;
  font-size: 0.7rem;
  font-weight: 800;
  color: white;
  background: white;
  transition: all 0.15s;
}
.t-habit-check.checked .t-habit-box {
  background: #4CAF50;
  border-color: #4CAF50;
}
.t-habit-label {
  color: var(--dark-gray);
  font-weight: 600;
}

/* KITTI-BOT INSIGHT */
.t-insight-card {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border-radius: var(--radius-lg);
  padding: 15px 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
  margin-top: 10px;
  margin-bottom: 25px;
}

.t-insight-header {
  font-weight: 800;
  font-size: 0.9rem;
  color: #1565c0;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.t-insight-body {
  font-size: 1rem;
  color: var(--dark-blue);
  line-height: 1.4;
  font-style: italic;
}