:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --muted: #6b7280;
  --text: #1a1a1a;
  --accent: #4a90e2;
  --accent-dark: #357abd;
  --success: #5cb85c;
  --warning: #f0ad4e;
  --danger: #d9534f;
  --border: #e8ecf0;
  --blue-header: #4a90e2;
  --blue-dark: #357abd;
  
  /* Mobile-first font sizes */
  --font-xs: 12px;
  --font-sm: 14px;
  --font-base: 16px;
  --font-lg: 18px;
  --font-xl: 20px;
  --font-2xl: 24px;
  --font-3xl: 28px;
  
  /* Mobile-first spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
}

* { box-sizing: border-box; }
html, body { 
  margin: 0; 
  padding: 0; 
  background: white; 
  color: var(--text); 
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
}

header {
  padding: 4px var(--space-md);
  position: sticky;
  top: 0;
  background: var(--blue-header);
  color: white;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
  min-height: 25px;
  display: flex;
  align-items: center;
}

.header-title {
  font-size: var(--font-lg);
  font-weight: 600;
  flex: 1;
  text-align: center !important;
  order: 1 !important;
}

/* Ensure hamburger menu is on the right */
.hamburger-menu {
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  order: 2 !important;
}

/* Simplified Header */
header .container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  width: 100% !important;
  gap: 16px !important;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: var(--space-md);
  position: relative;
  width: 100%;
  height: 100%;
}

.home-icon {
  font-size: var(--font-xl);
  color: white;
  text-decoration: none;
  padding: var(--space-sm);
  border-radius: 6px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  font-weight: 600;
}

.home-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
}

/* Hamburger Menu */
.hamburger-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu:hover span {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Hamburger Menu Overlay */
.hamburger-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  animation: fadeIn 0.3s ease;
}

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

.hamburger-menu-content {
  background: white;
  width: 280px;
  height: 100%;
  padding: 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease;
  overflow-y: auto;
}

.hamburger-header {
  background: var(--accent);
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hamburger-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.hamburger-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.hamburger-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.hamburger-nav {
  padding: 20px 0;
}

.hamburger-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.2s ease;
  border-left: 4px solid transparent;
}

.hamburger-item:hover {
  background-color: var(--panel);
  text-decoration: none;
  color: var(--text);
}

.hamburger-item.active {
  background-color: var(--accent-light);
  border-left-color: var(--accent);
  color: var(--accent);
}

.hamburger-icon {
  font-size: 20px;
  margin-right: 16px;
  width: 24px;
  text-align: center;
}

.hamburger-label {
  font-size: 16px;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Category Tabs */
.category-tabs-container {
  position: relative;
  background: white;
  border-bottom: 1px solid var(--border);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  background: white;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
  gap: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.category-tabs.collapsed {
  max-height: 48px; /* Height of one row */
}

.category-tabs.expanded {
  max-height: none;
}

.category-expand-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.2s ease;
  z-index: 10;
}

.category-expand-toggle:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.category-expand-toggle.expanded {
  transform: rotate(180deg);
}

.category-expand-toggle.hidden {
  display: none;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: 0 0 auto;
  background: transparent;
  color: var(--muted);
  border: none;
  border-right: 1px solid var(--border);
  font-size: var(--font-base);
  min-width: fit-content;
}

.tab:hover {
  background: var(--border);
  color: var(--text);
}

.tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.tab-icon {
  margin-right: var(--space-md);
  font-size: var(--font-lg);
}

.tab-label {
  font-weight: 600;
  font-size: var(--font-base);
}

/* Category Filter Dropdown */
.category-filter-container {
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: center;
    padding: 0 var(--space-lg);
}

.category-dropdown {
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    min-width: 200px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    background-size: 16px;
    padding-right: 40px;
    transition: all 0.2s ease;
}

.category-dropdown:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Clean Goal Cards */
.goal-card-clean {
    background: rgba(var(--goal-color-rgb, 74, 144, 226), 0.1);
    border-radius: 0;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-left: 4px solid var(--goal-color, #4a90e2);
    transition: all 0.2s ease;
}

.goal-card-clean:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.goal-card-content {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    gap: 10px;
}

.goal-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

/* Unified Checkbox Styles */
.checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    background: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox.checked {
    background: #28a745;
    border-color: #28a745;
}

/* Tracking page checkbox inputs should match the unified style */
.goal-entry-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.goal-entry-checkbox input[type="checkbox"]:checked {
    background: #28a745;
    border-color: #28a745;
}

.goal-entry-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.goal-main-content {
    flex: 1;
}

.goal-title {
    font-weight: 600;
    font-size: 19.2px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.goal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.4;
}

.goal-metrics {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #888;
}

.metric {
    font-weight: 500;
}

.goal-right-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.goal-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.time-icon {
    font-size: 14px;
}

.goal-type-badge {
    background: rgba(var(--goal-color-rgb, 74, 144, 226), 0.1);
    color: var(--goal-color, #666);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(var(--goal-color-rgb, 74, 144, 226), 0.2);
}

/* Count Controls */
.count-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.count-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.plus-btn {
    background: #6c757d;
    color: white;
}

.plus-btn:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.minus-btn {
    background: #6c757d;
    color: white;
}

.minus-btn:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.count-display {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    min-width: 24px;
    text-align: center;
}

/* Numeric Completion Display */
.numeric-completion-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.numeric-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(var(--accent-rgb, 74, 144, 226), 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb, 74, 144, 226), 0.2);
    text-align: center;
    min-width: 40px;
}



.hamburger-menu span {
    background-color: #1a1a1a !important;
}

/* Date Navigation Arrows */
.date-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.nav-arrow {
    font-size: 18px;
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.1);
}

.nav-arrow:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: scale(1.1);
}

.nav-arrow.disabled {
    color: #ccc;
    background: rgba(204, 204, 204, 0.1);
    cursor: not-allowed;
}

.date-nav-left {
    margin-right: 8px;
    margin-left: 16px;
}

.date-nav-right {
    margin-left: 8px;
    margin-right: 16px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .hamburger-menu-content {
    width: 100%;
  }
  
  .category-tabs {
    padding: 0;
    margin-bottom: 0;
    flex-wrap: wrap;
  }
  
  .tab {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-sm);
  }
  
  .tab-icon {
    margin-right: var(--space-sm);
    font-size: var(--font-base);
  }
  
  .goal-card-content {
    padding: 10px;
    gap: 10px;
  }
  
  .goal-title {
    font-size: 18px;
  }
  
  .goal-description {
    font-size: 13px;
  }
  
  .fab {
    bottom: 70px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  
  .fab-icon {
    font-size: 18px;
  }
  
  .date-nav-arrow {
    width: 24px;
    height: 24px;
  }
  
  .nav-arrow {
    font-size: 16px;
    width: 24px;
    height: 24px;
  }
  
  .date-nav-left {
    margin-right: 4px;
    margin-left: 12px;
  }
  
  .date-nav-right {
    margin-left: 4px;
    margin-right: 12px;
  }
}


main { 
  padding: var(--space-xs) var(--space-sm); 
  padding-bottom: 80px; /* Account for fixed footer navigation */
  background: white;
}

.container { 
  max-width: 100%; 
  margin: 0; 
  padding: 0 var(--space-md);
}

.row { display: flex; gap: 8px; align-items: center; }
.filters { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.filters input, .filters select, .filters button { 
  background: rgba(255,255,255,0.9); 
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--text);
}
.filters button { background: rgba(255,255,255,0.2); color: white; border-color: rgba(255,255,255,0.4); }
.col { flex: 1; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.list { display: flex; flex-direction: column; gap: 12px; }

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

input, textarea, select {
  width: 100%;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 16px;
}

button, .btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md) var(--space-lg);
  background: #f3f4f6;
  color: #111827;
  font-weight: 500;
  font-size: var(--font-base);
  min-height: 44px;
  cursor: pointer;
}

.btn-primary { 
  background: #4a90e2; 
  color: #ffffff; 
  border: 1px solid #4a90e2; 
}

.btn-primary:hover {
  background: #357abd;
  border-color: #357abd;
}
.btn-danger { background: var(--danger); color: #ffffff; border: 1px solid var(--danger); }
.btn-ghost { background: #ffffff; border: 1px solid var(--border); }
.btn-success { background: var(--success); color: #ffffff; border: 1px solid var(--success); }

.goal-item { display: flex; align-items: center; gap: 12px; }
.goal-title { font-weight: 700; }
.badge { padding: 3px 8px; border-radius: 12px; font-size: 11px; border: 1px solid var(--border); color: #374151; background: #f3f4f6; }
.badge.success { color: #166534; background: #dcfce7; border-color: #bbf7d0; }

.muted { color: var(--muted); }
.spacer { height: 4px; }
.sep { height: 1px; background: var(--border); margin: 8px 0; }

.task {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: start;
}
.task.done .task-title { text-decoration: line-through; color: var(--muted); }

form.inline { display: inline; }

@media (min-width: 640px) {
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
  border: none;
  transition: all 0.2s ease;
  z-index: 15;
}
.fab:hover { background: var(--accent-dark); transform: scale(1.05); }

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal[inert] {
  display: none;
}
.modal-dialog { width: min(640px, 92vw); }

/* Datepicker */
.datepicker-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 110;
}
.datepicker-overlay[aria-hidden="false"] { display: flex; }
.datepicker {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  width: 320px;
}
.datepicker-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.datepicker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.datepicker-weekday {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding-bottom: 4px;
}
.datepicker-day {
  text-align: center;
  padding: 8px 0;
  border: 1px solid transparent;
  border-radius: 8px;
}
.datepicker-day:hover { background: #f3f4f6; border-color: var(--border); cursor: pointer; }
.datepicker-day.is-other { color: var(--muted); }
.datepicker-day.is-today { outline: 1px solid var(--accent); }
.datepicker-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* Chips, progress, stats */
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 12px; padding: 2px 6px; font-size: 11px; color: #374151; background: #f9fafb; margin-right: 4px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.progress {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #86efac); }
.statbar { display:flex; gap:6px; flex-wrap: wrap; margin-bottom: 12px; }
.stat { flex:1; min-width: 80px; background: var(--panel); border:1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; }
.stat .value { font-size: 18px; font-weight: 700; }
.stat .label { font-size: 12px; color: var(--muted); }


/* Goal cards - Strides style */
.goal-card {
  background: var(--panel);
  border: none;
  border-left: 4px solid var(--goal-color, #4a90e2);
  border-radius: 12px;
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Ensure last goal card has enough bottom margin */
.goal-card:last-child {
  margin-bottom: 20px;
}

/* Completed goal cards - very light green background */
.goal-card.completed {
  background: #f0f9f0;
}
.goal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.goal-title { 
  font-weight: 600; 
  font-size: var(--font-lg); 
  margin-bottom: var(--space-xs); 
  color: var(--text); 
  text-decoration: none; 
  display: block; 
  transition: color 0.2s ease;
}
.goal-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.goal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.streak-inline {
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
  background: rgba(92, 184, 92, 0.1);
  padding: 2px 6px;
  border-radius: 12px;
  border: 1px solid rgba(92, 184, 92, 0.3);
  white-space: nowrap;
}
.goal-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.goal-actions { display: flex; gap: 8px; flex-shrink: 0; }
.goal-actions .btn { padding: 6px 12px; font-size: 12px; min-height: 32px; border-radius: 16px; }
.small { font-size: 11px; }

/* Progress display - Strides style */
.progress-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* Circular progress indicator */
.circular-progress {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, var(--accent) calc(var(--progress, 0) * 3.6deg), #e8ecf0 calc(var(--progress, 0) * 3.6deg));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.circular-progress::before {
  content: '';
  position: absolute;
  inset: 4px;
  background: white;
  border-radius: 50%;
}
.circular-progress-text {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1;
}

/* Progress info */
.progress-info {
  flex: 1;
}
.progress-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 2px;
}
.progress-number.status-text {
  font-size: 16px;
  font-weight: 600;
}
.progress-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* Status indicators */
.status-complete { 
  color: var(--success) !important; 
}
.status-complete .circular-progress {
  background: conic-gradient(var(--success) 0deg, var(--success) calc(var(--progress, 0) * 3.6deg), #e8ecf0 calc(var(--progress, 0) * 3.6deg));
}
.status-active { 
  color: var(--accent) !important; 
}
.status-active .circular-progress {
  background: conic-gradient(var(--accent) 0deg, var(--accent) calc(var(--progress, 0) * 3.6deg), #e8ecf0 calc(var(--progress, 0) * 3.6deg));
}
.status-overdue { 
  color: var(--danger) !important; 
}
.status-overdue .circular-progress {
  background: conic-gradient(var(--danger) 0deg, var(--danger) calc(var(--progress, 0) * 3.6deg), #e8ecf0 calc(var(--progress, 0) * 3.6deg));
}

/* Goal card status styling - removed as we use goal color now */

/* Calendar Heat Map */
.calendar-heatmap {
  margin: 12px 0;
}
.calendar-heatmap-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-width: 200px;
}
.calendar-day {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #e8ecf0;
}
.calendar-day.completed-1 { background: #c6f6d5; }
.calendar-day.completed-2 { background: #9ae6b4; }
.calendar-day.completed-3 { background: #68d391; }
.calendar-day.completed-4 { background: #48bb78; }
.calendar-day.completed-5 { background: #38a169; }

/* Goal type indicators */
.goal-type-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(74, 144, 226, 0.1);
  color: var(--accent);
}
.goal-type-badge.habit { background: rgba(92, 184, 92, 0.1); color: var(--success); }
.goal-type-badge.number { background: rgba(240, 173, 78, 0.1); color: var(--warning); }


/* Header top section */

/* Add Goal Button */
.btn-add-goal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 20px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.btn-add-goal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

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

.btn-add-goal-inline {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 14px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  margin-left: 8px;
}

.btn-add-goal-inline:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.btn-add-goal-inline:active {
  transform: scale(0.95);
}


.add-goal-btn {
  font-size: 14px;
  padding: 8px 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Week Navigation */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 12px 0;
}

.week-nav .btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50%;
}

.week-display {
  text-align: center;
  color: var(--text);
}

.week-display strong {
  font-size: 16px;
}

/* Goals Page Styles */
.goals-page main {
  padding: 0;
  padding-bottom: 120px; /* Extra space for FAB button */
}

.goals-page .container {
  padding: 0;
}

/* Tracking Page Styles */
.tracking-page main {
  padding: 0;
  padding-bottom: 120px; /* Extra space for FAB button */
}

.tracking-page .container {
  padding: 0;
}

/* Daily Page Styles */
.daily-page main {
  padding: 0;
}

.daily-page .container {
  padding: 0;
}

.daily-goals-list {
  background: white;
}

.daily-goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  background: white;
}

.daily-goal-row:last-child {
  border-bottom: none;
}

.daily-goal-row .goal-info {
  flex: 1;
  min-width: 0;
}

.daily-goal-row .goal-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.daily-goal-row .goal-title:hover {
  color: var(--accent);
}

.daily-goal-row .goal-category-info {
  font-size: 14px;
  color: var(--muted);
}

.daily-goal-row .category-text {
  font-weight: 500;
}

.daily-goal-row .streak-info {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-left: 8px;
}

.daily-goal-row .goal-completion {
  flex-shrink: 0;
  margin-left: 16px;
}

.daily-goal-row .completion-checkbox {
  cursor: pointer;
  padding: 8px;
}


.tracking-header {
  display: grid;
  grid-template-columns: 30px 100px repeat(7, 1fr) 30px;
  gap: 0;
  margin-bottom: 0;
  background: white;
  padding: 8px 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.goal-name-header {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.month-header {
  text-align: center;
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
  grid-column: 3 / -2; /* Span from column 3 to the second-to-last column (across all 7 date columns) */
}

.date-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.date-day {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
}

.date-number {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.goal-container {
  background: white;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  overflow: hidden;
}

.tracking-row {
  display: grid;
  grid-template-columns: 30px 100px repeat(7, 1fr) 30px;
  gap: 0;
  align-items: center;
  padding: 0;
  margin-bottom: 0;
}

.goal-name-row {
  background: transparent;
  border-bottom: none;
  margin-bottom: 0;
  padding: 8px 0;
}

.goal-completion-row {
  background: transparent;
  margin-bottom: 0;
  padding: 8px 0;
}

.goal-name-spacer {
  /* Empty spacer to align with date columns */
  display: block;
}

.goal-info-spacer {
  /* Empty spacer to align with goal name column */
  display: block;
}


/* Ensure last tracking row has enough bottom margin */
.tracking-row:last-child {
  margin-bottom: 0;
}

.goal-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 4px;
}


.goal-icon {
  font-size: 20px;
}

.goal-details {
  flex: 1;
  padding-left: 2px;
}

.goal-title {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 2px;
  transition: color 0.2s ease;
}

.goal-title:hover {
  color: var(--accent);
}

.goal-title-row {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  width: 100%;
}


.goal-unit {
  font-size: 11px;
  color: var(--muted);
}

.completion-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  font-weight: 600;
  margin: 0 auto;
  flex-shrink: 0;
  justify-self: center;
}

.completion-box.completed {
  background: #28a745;
  color: white;
  border: 2px solid #28a745;
}

.completion-box.incomplete {
  background: white;
  color: var(--text);
  border: 1px solid #ddd;
}

.completion-value {
  font-size: 10px;
  line-height: 1;
}

.completion-check {
  font-size: 14px;
}

.day-number {
  font-size: 14px;
  font-weight: 600;
}

/* Completion Date Checkbox */
.completion-box.completion-date {
  background: white;
  color: #dc3545;
  border: 2px solid #dc3545;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  line-height: 1.2;
}

.completion-box.completion-date:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* Completion Date Modal Styles */
.goal-title-display {
  background: var(--panel);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-weight: 500;
  color: var(--text);
}

.header-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-top: 4px;
}

/* Add Goal Link */
.add-goal-link-container {
  text-align: center;
  margin-bottom: var(--space-md);
}

.add-goal-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: var(--font-lg);
  font-weight: 600;
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--accent);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.add-goal-link:hover {
  background-color: var(--accent);
  color: white;
  text-decoration: none;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .goal-actions { flex-direction: column; gap: var(--space-xs); }
  .goal-actions .btn { font-size: var(--font-sm); padding: var(--space-sm) var(--space-md); min-height: 40px; }
  .filters { gap: var(--space-sm); }
  .calendar-grid { max-width: 150px; }
  .calendar-day { width: 10px; height: 10px; }
  
  /* Additional mobile optimizations */
  .goal-card { padding: var(--space-md); margin-bottom: var(--space-sm); }
  .goal-header { margin-bottom: var(--space-sm); }
  .goal-meta { margin-bottom: var(--space-sm); }
  .progress-section { margin-bottom: var(--space-sm); gap: var(--space-sm); }
  .circular-progress { width: 40px; height: 40px; }
  .circular-progress::before { inset: 4px; }
  .circular-progress-text { font-size: var(--font-xs); }
  .progress-number { font-size: var(--font-lg); }
  .progress-label { font-size: var(--font-sm); }
  .actual-input-section { margin-top: var(--space-sm); padding: var(--space-sm); }
  .actual-input-row { gap: var(--space-sm); }
  .actual-input-group input { max-width: 80px; padding: var(--space-sm) var(--space-md); }
  .actual-input-row label { font-size: var(--font-sm); }
     .btn-check { width: 32px; height: 32px; font-size: 14px; }
   .btn-uncheck { width: 32px; height: 32px; font-size: 14px; }
   .goal-title-row { gap: 6px; }
   .streak-inline { font-size: 12px; padding: 1px 4px; }
   
   
   /* Header mobile adjustments */
   .add-goal-btn { 
     font-size: 13px; 
     padding: 8px 16px; 
   }
   
   /* Week navigation mobile adjustments */
   .week-nav { gap: 16px; margin: 8px 0; }
   .week-display strong { font-size: 14px; }
   .week-nav .btn { width: 36px; height: 36px; font-size: 16px; }
   
   /* Tracking mobile adjustments */
   .tracking-header { 
     padding: 6px 0; 
     gap: 0; 
     grid-template-columns: 24px 80px repeat(7, 1fr) 24px; 
   }
   .tracking-row { 
     padding: 0; 
     gap: 0; 
     grid-template-columns: 24px 80px repeat(7, 1fr) 24px; 
   }
   .goal-container {
     margin-bottom: 0;
   }
   .goal-name-row {
     padding: 6px 0;
   }
   .goal-completion-row {
     padding: 6px 0;
   }
   
   /* Daily page mobile adjustments */
   .daily-goal-row {
     padding: 10px 0;
   }
   .daily-goal-row .goal-title {
     font-size: 18px;
   }
   .daily-goal-row .goal-category-info {
     font-size: 13px;
   }
   .daily-goal-row .streak-info {
     font-size: 11px;
   }
   .completion-box { width: 32px; height: 32px; margin: 0 auto; }
   .goal-title { font-size: var(--font-sm); line-height: 1.2; }
   .goal-unit { font-size: var(--font-xs); }
   .date-day { font-size: var(--font-xs); }
   .date-number { font-size: var(--font-sm); }
}

/* Settings Page Styles */
.settings-section {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 20px;
}

.settings-section h2 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.section-description {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px 0;
}

.category-form h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: var(--text);
}

.inline-form {
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.form-row input[type="text"] {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--text);
}

.form-row input[type="color"] {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--background);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.category-icon {
  font-size: 20px;
}

.category-name {
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.category-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.category-actions {
  display: flex;
  gap: 8px;
}

/* Hierarchical category styles */
.parent-category {
  font-weight: 600;
}

.subcategory {
  margin-left: 0;
  background: linear-gradient(to right, #f8f9fa, var(--panel));
}

.subcategory-indent {
  color: var(--muted);
  font-family: monospace;
  margin-right: 8px;
  font-size: 12px;
}

.category-type-badge {
  padding: 2px 6px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.category-parent {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger {
  background: #ff6b6b;
  color: white;
}

.btn-danger:hover {
  background: #ff5252;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 40px 20px;
}

.about-info {
  color: var(--muted);
}

.about-info p {
  margin: 0 0 8px 0;
}

.feature-list {
  margin-top: 16px;
}

.feature-item {
  padding: 4px 0;
  color: var(--text);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--panel);
  padding: var(--space-xl);
  border-radius: 12px;
  border: 1px solid var(--border);
  max-width: 100%;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3 {
  margin: 0 0 20px 0;
  color: var(--text);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--text);
  font-family: inherit;
  font-size: var(--font-base);
  min-height: 44px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Icon Selector Styles */
.icon-selector-container {
  position: relative;
  display: inline-block;
}

.icon-grid {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  z-index: 200;
  min-width: 240px;
  max-height: 200px;
  overflow-y: auto;
}

.icon-option {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.icon-option:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.icon-option.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Show icon grid on input focus */
.icon-selector-container:hover .icon-grid,
.icon-selector-container:focus-within .icon-grid {
  display: grid;
}

.icon-selector-container .icon-grid {
  display: none;
}

/* Keep grid visible when hovering over it */
.icon-grid:hover {
  display: grid;
}

/* Goal Icon Grid Specific Styles */
.goal-icon-grid {
  grid-template-columns: repeat(6, 1fr);
  max-height: 180px;
  overflow-y: auto;
}

/* Color Picker Styles */
.color-picker {
  margin-top: 8px;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 8px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: var(--text);
}

.color-option.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Show goal icon grid on hover/focus */
.modal .icon-selector-container:hover .goal-icon-grid,
.modal .icon-selector-container:focus-within .goal-icon-grid {
  display: grid;
}

.modal .icon-selector-container .goal-icon-grid {
  display: none;
}

.modal .goal-icon-grid:hover {
  display: grid;
}

/* Edit Goal Page - Always show icon grid above input */
.edit-goal-form .icon-selector-container {
  display: block;
}

.edit-goal-form .icon-grid {
  position: static;
  display: grid;
  margin-bottom: 8px;
  width: 100%;
  max-width: 300px;
}

.edit-goal-form .goal-icon-grid {
  display: grid !important;
  position: static;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-height: none;
  overflow-y: visible;
}

/* Modal SMART Goals - Always show icon grid above input */
.modal .smart-goals-container .icon-selector-container {
  display: block;
}

.modal .smart-goals-container .icon-grid {
  position: static;
  display: grid;
  margin-bottom: 8px;
  width: 100%;
  max-width: 300px;
}

.modal .smart-goals-container .goal-icon-grid {
  display: grid !important;
  position: static;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-height: none;
  overflow-y: visible;
}

.modal .smart-goals-container {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal .smart-section {
  margin-bottom: var(--space-lg);
  padding: 0;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.modal .smart-header {
  padding: var(--space-lg);
  margin: 0;
  border-radius: 0;
}

.modal .smart-header h3 {
  font-size: var(--font-xl);
  margin-bottom: var(--space-sm);
  font-weight: 700;
  color: white;
}

.modal .smart-header p {
  font-size: var(--font-base);
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  line-height: 1.4;
}

/* Modal form styling for better readability */
.modal .smart-section .form-group {
  margin: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.modal .smart-section .form-group:last-child {
  margin-bottom: var(--space-lg);
}

.modal .form-group label {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
  display: block;
}

.modal .form-group input,
.modal .form-group textarea,
.modal .form-group select {
  font-size: var(--font-base);
  padding: var(--space-md);
  border: 2px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text);
  min-height: 44px;
  width: 100%;
}

.modal .form-group input:focus,
.modal .form-group textarea:focus,
.modal .form-group select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.modal .form-group small {
  font-size: var(--font-sm);
  color: var(--muted);
  margin-top: var(--space-xs);
  display: block;
}

/* Section Header with Filter */
.section-header-with-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Inline Filter Styles */
.inline-filter {
  margin-bottom: 0;
}

.inline-filter .filter-header {
  padding: 8px 16px;
  font-size: 14px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 24px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.inline-filter .filter-header:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.inline-filter .filter-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-filter .filter-icon {
  font-size: 12px;
  color: var(--muted);
}

.inline-filter .goals-count {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.inline-filter .filter-toggle {
  font-size: 10px;
  color: var(--muted);
}

.inline-filter .filter-header:hover .filter-icon,
.inline-filter .filter-header:hover .filter-toggle,
.inline-filter .filter-header:hover .goals-count {
  color: white;
}

/* Goals Page Styles */
.goals-section {
  margin-bottom: var(--space-lg);
  margin-top: var(--space-xs);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.active {
  background: #4ecdc4;
}

.status-indicator.paused {
  background: #ffa726;
}

.status-indicator.completed {
  background: #66bb6a;
}

.goals-grid {
  display: grid;
  gap: 6px;
}

.goal-list-card {
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.goal-list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.goal-list-card.paused {
  opacity: 0.7;
}

.goal-list-card.completed {
  background: #f8f9fa;
  border-color: #dee2e6;
  opacity: 0.8;
}

/* Dark theme support for completed goals */
@media (prefers-color-scheme: dark) {
  .goal-list-card.completed {
    background: #2c2c2c;
    border-color: #404040;
  }
  
  /* SMART sections dark theme alternating backgrounds */
  .smart-section:nth-child(even) { 
    background: #2d3748; 
  }
  
  .smart-section:nth-child(odd) { 
    background: #1a202c; 
  }
}

.goal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.goal-card-left {
  display: flex;
  gap: 10px;
  flex: 1;
}

.goal-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

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

.goal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.goal-card-title {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.goal-card-description {
  margin: 0 0 var(--space-sm) 0;
  color: var(--muted);
  font-size: var(--font-sm);
  line-height: 1.3;
}

.goal-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.goal-type-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.goal-type-badge.habit {
  background: #e3f2fd;
  color: #1976d2;
}

.goal-type-badge.number {
  background: #f3e5f5;
  color: #7b1fa2;
}

.goal-category-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.goal-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  flex-shrink: 0;
}

/* Goal Card Footer */
.goal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.goal-card-footer-left {
  flex: 1;
}

.goal-card-footer-right {
  flex-shrink: 0;
}

/* Goal Icon Container */
.goal-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Small Goal Type Badge */
.goal-type-badge-small {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    text-align: center;
    min-width: 40px;
}

.goal-type-badge-small.habit {
    background: #e3f2fd;
    color: #1976d2;
}

.goal-type-badge-small.number {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Goal Completion Checkbox */
.goal-completion-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
}


@keyframes celebration {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Completion Modal */
.completion-modal {
  max-width: 400px;
  text-align: center;
}

.completion-feedback {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.celebration-icon {
  font-size: 48px;
  margin-bottom: 10px;
  animation: bounce 1s ease-in-out;
}

.completion-feedback h3 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
}

.completion-feedback p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.number-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.number-input-group input {
  flex: 1;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 18px;
  text-align: center;
  font-weight: 600;
}

.unit-label {
  font-size: 16px;
  font-weight: 600;
  color: #6c757d;
  min-width: 60px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 14px;
  font-weight: 600;
  color: #6c757d;
}

.completion-message {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 10px 0;
}

.completion-message p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

/* Button styles */
.btn-warning {
    background: #ffc107;
    color: #212529;
    border: 1px solid #ffc107;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #d39e00;
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal footer */
.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.modal-footer .btn {
    min-width: 100px;
}

/* Habit Checkbox */
.habit-checkbox {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.habit-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  display: inline-block;
  height: 32px;
  width: 32px;
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.habit-checkbox:hover .checkmark {
  background-color: #e9ecef;
  border-color: var(--accent);
}

.habit-checkbox input:checked ~ .checkmark {
  background-color: var(--accent);
  border-color: var(--accent);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 10px;
  top: 6px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.habit-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* Number Goal Input */
.number-goal-input {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 8px;
  transition: border-color 0.2s ease;
}

.number-goal-input:hover {
  border-color: var(--accent);
}

.number-goal-input.completed {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.number-goal-input.completed .goal-number-input {
  color: white;
}

.number-goal-input.completed .goal-unit {
  color: rgba(255, 255, 255, 0.8);
}

.goal-number-input {
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  outline: none;
  width: 50px;
}

.goal-unit {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.streak-display {
  text-align: center;
}

.streak-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.streak-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.action-dropdown {
  position: relative;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
}

.action-btn:hover {
  background: var(--background);
  color: var(--text);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  z-index: 100;
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
}

.dropdown-item:hover {
  background: var(--background);
}

.dropdown-item.danger {
  color: #ff6b6b;
}

.dropdown-item.danger:hover {
  background: #ff6b6b;
  color: white;
}

.goal-progress-summary {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.stat-value.status-active {
  color: #4ecdc4;
}

.stat-value.status-paused {
  color: #ffa726;
}

.stat-value.status-completed {
  color: #66bb6a;
}

.empty-state-card {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-card h3 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 20px;
}

.empty-state-card p {
  margin: 0 0 24px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Category Filter Styles */
.filter-section {
  background: transparent;
  border-radius: 0;
  border: none;
  padding: 0;
  margin-bottom: 12px;
}

.filter-header {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
  padding: 6px 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  transition: all 0.2s ease;
  font-size: 14px;
  max-width: fit-content;
}

.filter-header:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.filter-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-icon {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.filter-header:hover .filter-icon {
  color: white;
}

.filter-toggle {
  color: var(--muted);
  font-size: 10px;
  transition: all 0.2s ease;
  margin-left: 4px;
}

.filter-header:hover .filter-toggle {
  color: white;
}

.filter-content {
  display: none;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  max-width: 400px;
}

.filter-content.show {
  display: block;
}

.filter-actions-bottom {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.filter-btn {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.filter-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.category-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-filter-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.category-filter-item input[type="checkbox"] {
  margin-right: 6px;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.category-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  flex: 1;
  transition: all 0.2s ease;
  font-size: 13px;
}

.category-filter-item:hover .category-filter-label {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.category-filter-item input[type="checkbox"]:checked + .category-filter-label {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.category-filter-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.category-filter-name {
  font-size: 13px;
  font-weight: 400;
  flex: 1;
}

.no-categories {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

.no-categories a {
  color: var(--primary);
  text-decoration: none;
}

.no-categories a:hover {
  text-decoration: underline;
}

/* Hierarchical filter styles */
.parent-filter {
  font-weight: 600;
}

.subcategory-filter {
  margin-left: 0;
}

.subcategory-filter .category-filter-label {
  background: linear-gradient(to right, #f8f9fa, var(--background));
  padding-left: 20px;
}

.category-parent-name {
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
  margin-left: auto;
}

.filter-header:hover {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

.goals-summary {
  display: flex;
  align-items: center;
}

.goals-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* User Info Styles */
.user-info {
  color: white;
  font-size: 14px;
  opacity: 0.9;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Success/Error Messages */
.success-message {
  background: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 16px 0;
  border: 1px solid #c3e6cb;
}

/* Ideas Styles */
.ideas-intro {
  text-align: center;
  margin: 20px 0 30px 0;
  padding: 20px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.ideas-intro h2 {
  margin: 0 0 8px 0;
  color: var(--text);
}

.ideas-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Category Menu Styles */
.category-menu {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.category-menu h3 {
  margin: 0 0 16px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.category-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.category-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  cursor: pointer;
}

.category-menu-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-menu-item.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.category-menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 8px;
  background: var(--muted);
  color: white;
}

.category-menu-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  text-align: center;
}

.category-menu-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.category-menu-item.active .category-menu-count {
  color: rgba(255, 255, 255, 0.8);
}

/* Back Button Styles */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.1);
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-weight: 500;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.back-button:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.3);
  color: var(--text);
  text-decoration: none;
}

/* Header Layout for Category Page */

.header-left {
  flex: 0 0 auto;
}

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

.header-right {
  flex: 0 0 auto;
}

/* Category Intro Styles */
.category-intro {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.category-intro h2 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 24px;
}

.category-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.template-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.template-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.1);
}

.template-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.template-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.template-info {
  flex: 1;
}

.template-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.template-type {
  margin-bottom: 12px;
}

.template-description {
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

.template-relevance {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  font-size: 14px;
  line-height: 1.4;
}

.template-category {
  margin-bottom: 16px;
}

.category-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.template-actions {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Admin Styles */
.admin-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.admin-section h2 {
  margin: 0 0 16px 0;
  color: var(--text);
  font-size: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: linear-gradient(135deg, var(--accent) 0%, #5cb85c 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
}

.template-form {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.templates-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-template-card {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.admin-template-card .template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-template-card .template-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.admin-template-card .template-type {
  font-size: 12px;
  color: var(--muted);
}

.admin-template-card .template-description {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.users-table {
  overflow-x: auto;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.users-table th,
.users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.users-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--text);
}

.role-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.role-badge.admin {
  background: #fff3cd;
  color: #856404;
}

.role-badge.user {
  background: #d1ecf1;
  color: #0c5460;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Edit Goal Form Styles */
.edit-goal-form {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
}

/* SMART Goals Styles */
.smart-goals-container {
  max-width: 800px;
  margin: 0 auto;
}

.smart-section {
  margin-bottom: var(--space-xl);
  padding: 0;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.smart-header {
  padding: var(--space-lg);
  margin: 0;
  text-align: left;
  position: relative;
  border-radius: 0;
}

.smart-header h3 {
  margin: 0 0 var(--space-xs) 0;
  font-size: var(--font-xl);
  font-weight: 600;
  color: var(--accent);
}

.smart-header p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--muted);
  font-weight: 400;
}

.smart-section .form-group {
  margin: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.smart-section .form-group:last-child {
  margin-bottom: var(--space-lg);
}

/* Individual section styling */
.smart-section.specific .smart-header {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); /* Red */
  color: white;
}

.smart-section.specific .smart-header h3 {
  color: white;
}

.smart-section.specific .smart-header p {
  color: rgba(255, 255, 255, 0.9);
}

.smart-section.measurable .smart-header {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); /* Orange */
  color: white;
}

.smart-section.measurable .smart-header h3 {
  color: white;
}

.smart-section.measurable .smart-header p {
  color: rgba(255, 255, 255, 0.9);
}

.smart-section.attainable .smart-header {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%); /* Green */
  color: white;
}

.smart-section.attainable .smart-header h3 {
  color: white;
}

.smart-section.attainable .smart-header p {
  color: rgba(255, 255, 255, 0.9);
}

.smart-section.relevant .smart-header {
  background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%); /* Purple */
  color: white;
}

.smart-section.relevant .smart-header h3 {
  color: white;
}

.smart-section.relevant .smart-header p {
  color: rgba(255, 255, 255, 0.9);
}

.smart-section.timebound .smart-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); /* Blue */
  color: white;
}

.smart-section.timebound .smart-header h3 {
  color: white;
}

.smart-section.timebound .smart-header p {
  color: rgba(255, 255, 255, 0.9);
}

.smart-section.spirit-led .smart-header {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%); /* Pink */
  color: white;
}

.smart-section.spirit-led .smart-header h3 {
  color: white;
}

.smart-section.spirit-led .smart-header p {
  color: rgba(255, 255, 255, 0.9);
}

.smart-section.visual-settings .smart-header {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%); /* Gray */
  color: white;
}

.smart-section.visual-settings .smart-header h3 {
  color: white;
}

.smart-section.visual-settings .smart-header p {
  color: rgba(255, 255, 255, 0.9);
}

.placeholder-content {
  padding: var(--space-lg);
  background: #f8f9fa;
  border-radius: 0;
  margin: 0;
  border-left: 4px solid var(--accent);
}

.modal .placeholder-content {
  margin: 0;
  border-radius: 0;
}

.placeholder-content p {
  margin: 0 0 var(--space-md) 0;
  line-height: 1.5;
  font-size: var(--font-base);
  color: var(--text);
}

.placeholder-content p:last-child {
  margin-bottom: 0;
}

.placeholder-content strong {
  font-weight: 600;
  color: var(--accent);
}

.visual-settings {
  display: flex;
  gap: 20px;
  align-items: end;
}

.visual-setting-item {
  display: flex;
  flex-direction: column;
}

.visual-setting-item label {
  font-size: 14px;
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  .modal .smart-section {
    margin-bottom: var(--space-md);
    padding: 0;
  }
  
  .modal .smart-header h3 {
    font-size: var(--font-lg);
    font-weight: 700;
  }
  
  .modal .smart-header {
    padding: var(--space-md);
  }
  
  .modal .smart-header p {
    font-size: var(--font-sm);
    line-height: 1.4;
  }
  
  .modal .smart-section .form-group {
    margin: var(--space-md);
  }
  
  .modal .smart-section .form-group:last-child {
    margin-bottom: var(--space-md);
  }
  
  .modal .placeholder-content {
    margin: 0;
    padding: var(--space-md);
  }
  
  .modal .placeholder-content p {
    margin-bottom: var(--space-sm);
    font-size: var(--font-sm);
    line-height: 1.5;
  }
  
  .visual-settings {
    flex-direction: column;
    gap: 10px;
  }
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-actions-left {
  display: flex;
  gap: 8px;
}

.form-actions-right {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
  border-color: #545b62;
  color: white;
}

.btn-danger {
  background: #ff6b6b;
  color: white;
  border: 1px solid #ff6b6b;
}

.btn-danger:hover {
  background: #ff5252;
  border-color: #ff5252;
}

/* Color and Emoji Pickers */
.color-picker, .emoji-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-option, .emoji-option {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}

.color-option:hover, .emoji-option:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

.color-option.selected, .emoji-option.selected {
  border-color: var(--accent);
  border-width: 3px;
  transform: scale(1.05);
}

.color-option {
  border-radius: 50%;
}

.emoji-option {
  background: var(--panel);
}

.picker-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

/* Actual Input for Number Goals */
.actual-input-section {
  margin-top: 6px;
  padding: 6px;
  background: rgba(74, 144, 226, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(74, 144, 226, 0.2);
}

.actual-form {
  margin: 0;
}

.actual-input-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.actual-input-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  flex: 1;
}

.actual-input-group {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
}

.actual-input-group input {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  max-width: 80px;
  text-align: left;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
}

/* Date Navigation */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0;
}

.date-display {
  text-align: center;
  color: white;
  min-width: 120px;
}

.date-display strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.date-sub {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.date-nav .btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .date-nav {
    gap: 12px;
  }
  .date-nav .btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* Circular checkmark button - unified design */
.btn-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  min-height: 36px;
}
.btn-check:hover {
  background: #4a9b4a;
  transform: scale(1.05);
}

/* Circular uncheck button - for removing completions */
.btn-uncheck {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  min-height: 36px;
}

.btn-uncheck:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

/* Streak badges styling */
.streak-badge {
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  margin-right: 8px;
  margin-bottom: 8px;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  animation: streak-pulse 2s ease-in-out infinite;
}

.best-streak-badge {
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 16px;
  margin-right: 8px;
  margin-bottom: 8px;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@keyframes streak-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Footer Navigation Menu */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 24px;
  transition: all 0.2s ease;
  background: transparent;
}

.footer-nav-item:hover {
  background: var(--border);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-2px);
}

.footer-nav-item.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.footer-nav-item.active:hover {
  color: white;
  background: var(--accent-dark);
}

/* Add bottom padding to body to account for footer */
body {
  padding-bottom: 70px;
}

@media (max-width: 480px) {
  .footer-nav-container {
    padding: 0 16px;
  }
  
  .footer-nav-item {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  
  body {
    padding-bottom: 65px;
  }
}

