/* ================================
   CREUSO - Pure CSS (Multi-page)
   Design: Terracota + Glassmorphism
   ================================ */

/* Reset & Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: #faf8f6;
  --foreground: #2c2420;
  --card: #ffffff;
  --primary: #c9754f;
  --primary-foreground: #ffffff;
  --secondary: #f5ede8;
  --muted: #f5ede8;
  --muted-foreground: #8a7f7a;
  --accent: #e8d5ca;
  --border: rgba(201, 117, 79, 0.15);
  --destructive: #d4183d;
  --sidebar-width: 288px;
  --header-height: 80px;
  --radius: 1rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 10px 25px -5px rgba(201, 117, 79, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  overflow-x: hidden;
}

/* Typography */
h1 { font-size: 1.65rem; font-weight: 600; line-height: 1.3; }
h2 { font-size: 1.35rem; font-weight: 600; line-height: 1.35; }
h3 { font-size: 1.15rem; font-weight: 500; line-height: 1.4; }
h4 { font-size: 1rem !important; font-weight: 500; line-height: 1.4; }
p { font-size: 0.85rem; font-weight: 400; line-height: 1.6; }

/* Sidebar Toggle */
#sidebar-toggle {
  display: none;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(201, 117, 79, 0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.logo-img {
  height: 6rem;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s;
}

.logo-img:hover {
  transform: scale(1.05);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1.25rem;
  color: var(--foreground);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
}

.nav-item:hover {
  background: rgba(232, 213, 202, 0.5);
}

.nav-item.active {
  background: linear-gradient(to right, var(--primary), rgba(201, 117, 79, 0.8));
  color: var(--primary-foreground);
  box-shadow: var(--shadow-primary);
}

.nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 117, 79, 0.1);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
}

.menu-toggle {
  display: none !important;
}

.search-container {
  flex: 1;
  max-width: 32rem;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.search-input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  background: rgba(232, 213, 202, 0.3);
  border: none;
  border-radius: 0.875rem;
  color: var(--foreground);
  outline: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: var(--foreground);
  transition: background 0.2s;
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
}

.icon-btn:hover {
  background: rgba(232, 213, 202, 0.5);
}

.notification-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--destructive);
  border-radius: 50%;
}

.user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), rgba(201, 117, 79, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 2rem;
  min-height: calc(100vh - var(--header-height));
  animation: fadeIn 0.3s ease;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: 1.25rem; 
  overflow: hidden;
  transition: all 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 500;
}

.card-content {
  padding: 1.5rem;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.75rem;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(201, 117, 79, 0.1);
  color: var(--primary);
}

.badge-secondary {
  background: var(--secondary);
  color: var(--foreground);
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.badge-warning {
  background: rgba(251, 146, 60, 0.1);
  color: #fb923c;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary), rgba(201, 117, 79, 0.8));
  color: var(--primary-foreground);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px -5px rgba(201, 117, 79, 0.4);
}

/* Stat Cards */
.stat-card {
  background: var(--card); 
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);  
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Motivational Banner */
.motivational-banner {
  background: linear-gradient(135deg, rgba(201, 117, 79, 0.1), rgba(232, 213, 202, 0.3));
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem; 
  margin-bottom: 2rem;
}

.banner-icon {
  font-size: 2.5rem;
}

.banner-content h3 {
  margin-bottom: 0.25rem;
}

.banner-content p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Ranking List */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.875rem;
  transition: background 0.2s;
}

.ranking-item:hover {
  background: rgba(232, 213, 202, 0.3);
}

.ranking-first {
  background: linear-gradient(135deg, rgba(201, 117, 79, 0.1), rgba(232, 213, 202, 0.2));
}

.ranking-position {
  font-weight: 500;
  color: var(--muted-foreground);
  min-width: 2rem;
}

.ranking-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 500;
}

.ranking-info {
  flex: 1;
}

.ranking-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.ranking-points {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: var(--accent);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), rgba(201, 117, 79, 0.8));
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Task/Expense Items */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.875rem;
  background: rgba(232, 213, 202, 0.2);
  transition: background 0.2s;
}

.item:hover {
  background: rgba(232, 213, 202, 0.4);
}

.checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 0.25rem;
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
  position: relative;
}

.checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
}

.item-info {
  flex: 1;
}

.item-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
}

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.achievement-item {
  padding: 0.75rem;
  border-radius: 0.875rem;
  text-align: center;
  transition: all 0.2s;
}

.achievement-item.unlocked {
  background: linear-gradient(135deg, rgba(201, 117, 79, 0.1), rgba(232, 213, 202, 0.2));  
}

.achievement-item.locked {
  background: rgba(138, 127, 122, 0.05);
  opacity: 0.5;
}

.achievement-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.achievement-name {
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.achievement-description {
  font-size: 0.625rem;
  color: var(--muted-foreground);
}

/* ================================
   FAB with Quick Actions Menu
   ================================ */

#fab-toggle {
  display: none;
}

.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  pointer-events: none;
}

.fab {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), rgba(201, 117, 79, 0.8));
  color: white;
  box-shadow: 0 10px 25px rgba(201, 117, 79, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

.fab:hover {
  box-shadow: 0 15px 35px rgba(201, 117, 79, 0.5);
  transform: scale(1.05);
}

.fab svg {
  transition: transform 0.3s ease;
}

#fab-toggle:checked + .fab-container .fab svg {
  transform: rotate(45deg);
}

#fab-toggle:checked ~ .fab-container {
  pointer-events: auto;
}

/* Quick Actions Menu */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#fab-toggle:checked ~ .fab-container .quick-actions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  color: var(--foreground);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  animation: slideInRight 0.3s ease backwards;
}

.quick-action:nth-child(1) { animation-delay: 0.05s; }
.quick-action:nth-child(2) { animation-delay: 0.1s; }
.quick-action:nth-child(3) { animation-delay: 0.15s; }
.quick-action:nth-child(4) { animation-delay: 0.2s; }
.quick-action:nth-child(5) { animation-delay: 0.25s; }
.quick-action:nth-child(6) { animation-delay: 0.3s; }

.quick-action:hover {
  background: linear-gradient(135deg, rgba(201, 117, 79, 0.1), rgba(232, 213, 202, 0.3));
  transform: translateX(-4px);
  box-shadow: var(--shadow-lg);
}

.quick-action-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.quick-action-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Overlay for FAB */
.fab-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 44;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.fab-overlay.is-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Kanban / Task Board */
.kanban-grid {
  align-items: stretch;
}

.kanban-column .card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 18rem;
}

.task-list {
  gap: 1rem;
}

.task-card {
  flex-direction: column;
  align-items: stretch;
  background: rgba(232, 213, 202, 0.25);
  border: 1px solid rgba(201, 117, 79, 0.08);
}

.task-card:hover {
  background: rgba(232, 213, 202, 0.4);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.task-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.task-description {
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-ghost {
  background: rgba(201, 117, 79, 0.08);
  color: var(--primary);
  border: 1px solid rgba(201, 117, 79, 0.2);
}

.btn-ghost:hover {
  background: rgba(201, 117, 79, 0.18);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 1rem;
  background: rgba(232, 213, 202, 0.2);
  border: 1px dashed rgba(201, 117, 79, 0.2);
}

.empty-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.modal.is-open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
  width: min(540px, 92vw);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 61;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .modal {
    align-items: flex-start;
  }

  .modal-content {
    width: 100vw;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
  }
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-span-2 {
  grid-column: span 2;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.input,
.textarea,
input[type="date"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(201, 117, 79, 0.25);
  background: rgba(232, 213, 202, 0.25);
  color: var(--foreground);
  outline: none;
  font-size: 0.95rem;
}

.input:focus,
.textarea:focus,
input[type="date"]:focus {
  border-color: rgba(201, 117, 79, 0.6);
  background: rgba(232, 213, 202, 0.4);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.validation-message,
.validation-message > span {
  color: #d14343;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .form-span-2 {
    grid-column: span 1;
  }
}

/* Utilities */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-4 { margin-top: 1rem; }

.text-muted {
  color: var(--muted-foreground);
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-label {
  font-size: 0.82rem;
}

.text-caption {
  font-size: 0.72rem;
}

.text-muted-strong {
  color: rgba(44, 36, 32, 0.65);
}

.text-primary {
  color: var(--primary);
}

.text-danger {
  color: var(--destructive);
}

.text-success {
  color: #22c55e;
}

.text-overlay-strong {
  color: rgba(255, 255, 255, 0.9);
}

.text-overlay {
  color: rgba(255, 255, 255, 0.8);
}

.text-overlay-muted {
  color: rgba(255, 255, 255, 0.65);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stat-meta {
  font-size: 0.72rem;
  font-weight: 500;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.page-title {
  margin-bottom: 0.5rem;
}

/* Spacing */
.space-y-8 > * + * {
  margin-top: 2rem;
}

/* Overlay for mobile sidebar */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: pointer;
  pointer-events: none;
}

#sidebar-toggle:checked ~ .overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Responsive */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  #sidebar-toggle:checked ~ .sidebar {
    transform: translateX(0);
  }

  .header {
    left: 0;
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
  }

  .fab-container {
    bottom: 1rem;
    right: 1rem;
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 1023px) {
  .grid-cols-2 {
    grid-template-columns: repeat(1, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .finance-stat {
    min-height: 100%;
  }
}
/* Challenges */
.challenge-item {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: #fff;
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.challenge-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.challenge-item.active {
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(76,110,245,0.15);
}
.challenge-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.challenge-progress {
    margin-top: 0.75rem;
}
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.progress-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.progress-value {
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.3s;
}
.goal-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: #fff;
}
.goal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.goal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted);
}
.goal-actions {
    margin-top: 0.5rem;
}
.participant-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.participant-list li {
    display: flex;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    background: #fff;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
}
.toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.goal-draft-list .draft-goal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.goal-draft-list .draft-goal:last-child {
    border-bottom: none;
}
.challenge-summary {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: rgba(76,110,245,0.05);
}
.summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.summary-row > div {
    flex: 1 1 160px;
}
.summary-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.budget-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.budget-highlight {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1.5rem;
}
.budget-total-card,
.budget-context-card {
    flex: 1 1 280px;
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--secondary);
    box-shadow: var(--shadow-sm);
}
.budget-total-card {
    text-align: center;
    background: var(--card);
}
.budget-total-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--muted-foreground);
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}
.budget-total-value {
    font-size: 2rem;
    font-weight: 700;
}
.budget-general-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.budget-context-label {
    font-size: 0.9rem;
    color: var(--muted-foreground);
}
.budget-context-value {
    font-size: 1.2rem;
    font-weight: 600;
}
.budget-note {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.4;
}
.budget-category-list {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.budget-category-row {
    display: grid;
    grid-template-columns: minmax(140px, 2fr) minmax(120px, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
}
.budget-category-row + .budget-category-row {
    border-top: 1px solid var(--border);
}
.budget-category-row--head {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--muted-foreground);
    background: var(--background);
}
.budget-category-name {
    font-weight: 600;
}
.budget-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.budget-category-empty {
    padding: 1.25rem;
    text-align: center;
    color: var(--muted-foreground);
}
.budget-edit-btn {
    border: none;
    background: var(--secondary);
    color: var(--foreground);
    font-size: 0.85rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.budget-edit-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.category-budget-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.category-budget-modal-item {
    display: grid;
    grid-template-columns: 1fr minmax(120px, 180px);
    align-items: center;
    gap: 1rem;
}

.category-budget-modal-item label {
    font-weight: 600;
}

.finance-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}
.finance-month-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(232, 213, 202, 0.4);
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    flex-wrap: wrap;
}
.finance-month-label {
    font-weight: 600;
    text-transform: capitalize;
}
.finance-month-input {
    width: auto;
    padding: 0.25rem 0.5rem;
    min-width: 130px;
}
.finance-actions .btn svg {
    margin-right: 0.35rem;
}

@media (max-width: 768px) {
    .finance-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .finance-actions .btn,
    .finance-month-picker {
        width: 100%;
    }

    .finance-month-picker {
        border-radius: var(--radius);
        justify-content: space-between;
    }

    .finance-month-picker .icon-btn {
        flex: 0 0 auto;
    }

    .finance-month-input {
        flex: 1 1 140px;
        min-width: 120px;
    }

.finance-new-expense {
    justify-content: center;
}
}

.shopping-alerts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-radius: 24px;
    padding: 1.5rem;
    border-left: 6px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-sm);
}
.alert-card h4 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}
.alert-card p {
    margin: 0;
    color: var(--muted-foreground);
}
.alert-items {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--muted-foreground);
}
.alert-items li + li {
    margin-top: 0.25rem;
}
.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(0, 0, 0, 0.05);
}
.alert-warning { background: #fff9ea; border-color: #f59e0b; }
.alert-danger { background: #fff6f6; border-color: #ef4444; }
.alert-info { background: #f3f5ff; border-color: #3b82f6; }
.alert-neutral { background: #fafafa; border-color: #d1d5db; }

.mobile-tabs { display: none; }
.mobile-tabs-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 999px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}
.mobile-tab-btn {
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
}
.mobile-tab-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
}

.shopping-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
}
.shopping-panel {
    display: flex;
    flex-direction: column;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.panel-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.panel-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.panel-badge {
    display: inline-block;
    background: var(--secondary);
    color: var(--foreground);
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.panel-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.pill-select {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    background: transparent;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.checklist-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.checklist-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.checklist-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.checklist-item.hide-completed {
    display: none;
}
.toggle-completed {
    margin-bottom: 0.75rem;
}
.toggle-completed.active {
    color: var(--primary);
}

.inventory-simple-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.inventory-simple-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem;
}
.inventory-simple-info {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}
.inventory-simple-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.inventory-expiration {
    display: inline-block;
    font-size: 0.85rem;
}
.inventory-simple-info .badge.outline {
    border: 1px solid;
    background: transparent;
    padding: 0.15rem 0.6rem;
}

.shopping-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .mobile-tabs { display: block; }
    .shopping-panels { grid-template-columns: 1fr; }
    .shopping-panel { display: none; }
    .shopping-panel.active-panel { display: flex; }
    .panel-actions { width: 100%; justify-content: flex-start; }
}

