/* ABOUTME: Styles for the daily dashboard, subpages, and activity cards */

/* ABOUTME: Handles the main app layout including header, tabs, and panels */

/* Dashboard Styles */

/* Subpage Layout (progress, profile, settings, etc.) */
.subpage {
  min-height: 100vh;
  background: var(--bg);
}

.subpage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.subpage-header h1 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.back-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  text-decoration: none;
}

.back-btn:hover {
  background: var(--gray-200);
}

.subpage-content {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* Daily Dashboard Container */
.daily-dashboard-container {
  position: fixed;
  inset: 56px 0 0; /* Height of navbar on desktop */
  background-color: var(--bg);
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* Desktop: constrain width to match nav (1400px) */
@media (width > 768px) {
  .daily-dashboard-container {
    left: max(0px, calc((100vw - 1400px) / 2));
    right: max(0px, calc((100vw - 1400px) / 2));
  }
}

/* On mobile, stack vertically below the nav */
@media (width <= 768px) {
  .daily-dashboard-container {
    inset: 56px 0 0;
    flex-direction: column;
    overflow: hidden;
  }
}

/* Desktop-only rules for daily dashboard */
@media (width >= 769px) {
  /* Hide chat FAB on desktop (chat sidebar already visible), keep + button */
  .fab-secondary {
    display: none !important;
  }

  /* Position + button in main content area, not over chat sidebar */
  .fab-container {
    right: calc(400px + 32px) !important;
  }

  /* Hide chat close button on desktop (chat is always visible) */
  .chat-card-header .modal-close {
    display: none;
  }
}

/* Header Section */
.daily-header-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0;
  flex-shrink: 0;
}

.daily-header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Date Navigation */
.date-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* Date display elements alignment */
.date-display-relative { 
  display: flex !important; 
  align-items: center !important; 
  justify-content: center !important;
  gap: 0.5rem !important; 
}

.date-display-relative .date-nav-icon-button { /* normalize the icon buttons */
  width: 24px !important; 
  height: 24px !important; 
  display: inline-flex !important; 
  align-items: center !important; 
  justify-content: center !important;
  flex-shrink: 0 !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

.date-display-relative .date-chip { /* applies to all date labels */
  display: inline-flex !important; 
  align-items: center !important; 
  justify-content: center !important;
  height: 24px !important; 
  line-height: 24px !important; 
  padding: 0 0.5rem !important; 
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
}

/* only when it's today */
.date-display-relative .date-chip.is-today {
  background: var(--success-100) !important;
  color: var(--success-700) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.025em !important;
}

/* when not today, make it look like plain text but keep the box */
.date-display-relative .date-chip:not(.is-today) { 
  padding: 0 0.25rem !important; 
  background: transparent !important; 
}

/* Date navigation inside activity card */
.activity-date-navigation {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--primary-100);
  background: var(--primary-50);
  height: 80px;
  box-sizing: border-box;
}

.activity-date-navigation .date-navigation {
  gap: 1rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-date-navigation .date-display-main {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.activity-date-navigation .date-display-relative {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.activity-date-navigation .trainer-viewing-note {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.date-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  text-decoration: none;
  font-size: 1.25rem;
  transition: all 0.2s;
}

.date-nav-button:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  border-color: var(--gray-400);
}

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

.date-display-main {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: var(--gray-900);
}

.date-display-relative {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

/* Removed - using .date-chip.is-today instead */

.date-nav-inline-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.date-picker-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.date-nav-icon-button {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.date-nav-icon-button:hover {
  background: var(--gray-100);
  color: var(--gray-700);
  transform: scale(1.05);
}

/* Enhanced hover for activity control buttons */
.activity-controls .btn-secondary:hover {
  background-color: var(--gray-100) !important;
  border-color: var(--gray-400) !important;
  transform: scale(1.05);
}

.activity-controls .btn-primary:hover {
  background-color: var(--primary-700) !important;
  border-color: var(--primary-700) !important;
  transform: scale(1.05);
}

.daily-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem 0 1rem 1rem;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Important for Firefox flexbox */
}

.daily-layout {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.activities-section {
  flex: 0 0 55%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.activities-section turbo-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.activity-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.activity-card .card-header {
  padding: 0;
  flex-shrink: 0;
  position: relative;
  min-height: 49px; /* Prevent height change on load */
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  box-sizing: border-box;
}

.activity-card .card-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Attention Banner */
.attention-banner {
  background: linear-gradient(90deg, rgb(232 116 59 / 8%), rgb(232 116 59 / 4%));
  border-left: 3px solid #E8743B;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.attention-badge {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E8743B;
  display: inline-block;
  flex-shrink: 0;
  border: 1.5px solid white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
}

.attention-badge.attention-badge-lg {
  width: 16px;
  height: 16px;
}

.attention-text {
  flex: 1;
  color: #E8743B;
  font-weight: 500;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}

.attention-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.attention-nav-btn {
  background: rgb(232 116 59 / 10%);
  border: 1px solid rgb(232 116 59 / 30%);
  color: #E8743B;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.attention-nav-btn:hover {
  background: rgb(232 116 59 / 20%);
}

.attention-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.attention-nav-position {
  color: #FF9500;
  font-size: 0.875rem;
  min-width: 3rem;
  text-align: center;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
  z-index: 20;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.section-icon {
  font-size: 1.25rem;
}

.section-name-transition {
  opacity: 0;
  transition: opacity 0.15s;
}

.section-name-transition.active {
  opacity: 1;
}

/* Activity Controls */
.activity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activity-controls .btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
}

.activity-controls .btn-icon.active,
.section-header .btn-icon {
  display: inline-flex;
}

.activity-add-button {
  background-color: var(--yafa-orange);
  border-color: var(--yafa-orange);
  color: white;
}

.activity-add-button:hover {
  background-color: var(--yafa-orange-600);
  border-color: var(--yafa-orange-600);
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) 0;
  background: transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: auto hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 49px;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
  border-bottom: 1px solid var(--border);
}

.tab-nav::-webkit-scrollbar {
  height: 6px;
}

.tab-nav::-webkit-scrollbar-track {
  background: transparent;
}

.tab-nav::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

.tab-nav::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

.tab-button {
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 600;
  white-space: nowrap;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

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

.tab-button.active {
  background: var(--orange);
  color: white;
  font-weight: 700;
}

.tab-button:focus-visible {
  outline: 2px solid var(--orange-light);
  outline-offset: 2px;
}

.tab-badge,
.tab-count {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0.15rem 0.45rem;
  background: var(--gray-200);
  color: var(--text);
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-align: center;
  opacity: 0.7;
}

.tab-badge-empty {
  background: var(--gray-100);
  color: var(--text-muted);
}

.tab-button.active .tab-badge,
.tab-button.active .tab-count {
  background: rgb(255 255 255 / 25%);
  color: white;
  opacity: 1;
}

.tab-button.active .tab-badge-empty {
  background: rgb(255 255 255 / 15%);
  color: rgb(255 255 255 / 70%);
}

/* Tab suggestion indicator */
.tab-suggestion-indicator {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
}

.attention-badge-sm {
  font-size: 0.625rem;
}

.attention-badge-sm .fa-stack-2x {
  color: rgb(255 149 0 / 20%);
}

.attention-badge-sm .fa-stack-1x {
  color: #FF9500;
}

.tab-button.active .attention-badge-sm .fa-stack-2x {
  color: rgb(255 149 0 / 25%); /* slightly darker circle on soft blue bg */
}

.tab-button.active .attention-badge-sm .fa-stack-1x {
  color: #ea580c; /* darker orange for better visibility */
}

/* Chat Badge for Mobile */
.chat-badge {
  display: none;
  min-width: 1.25rem;
  padding: 0.125rem 0.375rem;
  background: var(--error-500);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.chat-badge.active {
  display: inline-block;
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 1rem;
}

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

/* Chat Panel */
.chat-panel {
  display: flex;
  flex: 0 0 45%;
  min-width: 0; /* CRUCIAL: prevent overflow */
  height: 100%;
  flex-direction: column;
  overflow: visible;
  padding-right: 1rem;
}

.chat-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
  box-sizing: border-box;
  overflow: hidden;
}

.chat-card:hover {
  box-shadow: 0 4px 6px rgb(0 0 0 / 7%), 0 2px 4px rgb(0 0 0 / 4%);
}

.chat-card-header {
  position: relative;
  background: transparent;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--primary-100);
  box-sizing: border-box;
  overflow: hidden;
  height: 80px;
  display: flex;
  align-items: center;
}

.chat-card-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary-50);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  z-index: 0;
}

.chat-card-header > * {
  position: relative;
  z-index: 1;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  width: 100%;
}

a.btn-help-subtle,
.btn-help-subtle {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  outline: none;
  cursor: pointer !important;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.15s;
  color: var(--gray-500) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  text-decoration: none !important;
}

a.btn-help-subtle:focus,
.btn-help-subtle:focus {
  outline: none;
  box-shadow: none;
}

a.btn-help-subtle:hover,
.btn-help-subtle:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
  color: var(--gray-700) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.chat-icon {
  font-size: 1.25rem;
}

.chat-card .card-body {
  flex: 1;
  padding: 0;
  overflow: hidden;
}

/* Old mobile toggle CSS removed - now using bottom navigation */

@media (width <= 640px) {
  .daily-header-content {
    padding: 0 0.75rem;
  }
  
  .date-display-main {
    font-size: 1.5rem;
  }
  
  .date-navigation {
    gap: 1rem;
  }
  
  .date-nav-button {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  
  .section-header {
    padding: 0.75rem 1rem;
  }
  
  .section-title {
    font-size: 1rem;
  }
  
  .tab-button {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-600);
}

.empty-state p {
  margin: 0.5rem 0;
}

.empty-state .text-muted {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* Trainer Viewing Note */
.trainer-viewing-note {
  text-align: center;
  color: var(--primary-600);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Day Dividers */
.day-divider {
  border-top: 2px solid var(--gray-200);
  margin: 1.5rem 0;
  position: relative;
}

.divider-label {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-50);
  padding: 0 1rem;
  color: var(--gray-500);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  white-space: nowrap;
}

/* Workout Card Styles */
.workout-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.workout-card:hover {
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  transform: translateY(-2px);
}

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

/* Dropdown menu styling */
.dropdown-menu {
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

/* ============================================
   MOCKUP-10 CLEAN EVOLUTION STYLES
   ============================================ */

/* Main activities area */
.daily-dashboard-container .main {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* On mobile, reduce padding */
@media (width <= 768px) {
  .daily-dashboard-container .main {
    padding: 8px;
  }
}

/* Turbo frame should expand to fill remaining space */
.daily-dashboard-container .main > turbo-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Make the activity card expand to fill available space */
.daily-dashboard-container .main > turbo-frame > .card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0; /* Remove margin when filling space */
}

/* Tab content fills the card and scrolls */
.daily-dashboard-container .main .card .tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

/* Tab panes fill the tab-content - only when active */
.daily-dashboard-container .main .card .tab-pane {
  display: none;
}

.daily-dashboard-container .main .card .tab-pane.active {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Bottom padding so last items aren't hidden behind FABs */
@media (width <= 768px) {
  .daily-dashboard-container .main .card .tab-pane.active {
    padding-bottom: 80px;
  }
}

/* Empty state centers in available space */
.daily-dashboard-container .main .card .empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Chat panel - sidebar on desktop */
.daily-dashboard-container .chat-panel {
  flex: 0 0 440px;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 16px 0;
  overflow: hidden;
}

.daily-dashboard-container .chat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.daily-dashboard-container .chat-card .card-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Date Section */
.date-section {
  margin-bottom: 16px;
}

.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.date-nav-left,
.date-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-btn {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.date-btn:hover {
  background: var(--gray-50);
  color: var(--text);
}

.date-content {
  flex: 1;
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.date-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}

.date-chip {
  background: var(--orange-light);
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 2px;
}

.jump-to-today {
  display: inline-flex;
  align-items: center;
  background: var(--orange);
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 18px;
  transition: background 0.2s;
  white-space: nowrap;
}

.jump-to-today:hover {
  background: var(--orange-dark, #d35400);
  color: white;
  text-decoration: none;
}

/* Quick Stats */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.quick-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}

.quick-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.quick-stat-value.good {
  color: var(--green);
}

.quick-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.quick-stat-progress {
  height: 4px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.quick-stat-progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.3s;
}

.quick-stat-progress-fill.good {
  background: var(--green);
}

/* Compact Header - Date nav + Nutrition rings */
.compact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.compact-date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-date-nav .date-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}

.compact-date-nav .date-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.compact-date-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.compact-date-main {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.compact-date-main:hover {
  color: var(--orange);
}

.compact-date-main i {
  font-size: 0.8em;
  color: var(--text-muted);
}

.compact-today-btn {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--orange);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.compact-today-btn:hover {
  text-decoration: underline;
}

/* Nutrition Rings */
.nutrition-rings {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rings-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
  opacity: 0.6;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
  margin-left: 4px;
  border-radius: 50%;
}

.rings-settings-btn:hover {
  opacity: 1;
  color: var(--text);
  background: var(--gray-100);
}

.rings-settings-btn i {
  font-size: 14px;
}

.ring-item {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ring-item:hover {
  transform: scale(1.08);
}

.ring-item svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.ring-item .ring-bg {
  fill: none;
  stroke: var(--gray-100);
  stroke-width: 5;
}

.ring-item .ring-progress {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease-out;
}

.ring-item .ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 600;
}

.ring-item .ring-unit {
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ring-item .ring-days-left {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Overflow badge for when over goal */
.ring-item .overflow-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 6px;
  color: white;
  z-index: 1;
  line-height: 1;
}

.ring-item .overflow-badge.bad {
  background: var(--red);
}

.ring-item .overflow-badge.good {
  background: var(--green);
}

/* Nutrition detail modal */
.nutrition-detail-ring {
  display: flex;
  justify-content: center;
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.nutrition-detail-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.nutrition-detail-ring .ring-bg {
  fill: none;
  stroke: var(--gray-100);
}

.nutrition-detail-ring .ring-progress {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease-out;
}

.nutrition-detail-ring .ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.nutrition-detail-ring .ring-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.nutrition-detail-ring .ring-goal {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

#nutritionDetailModal .status-under {
  background: var(--gray-100);
  color: var(--text-secondary);
}

#nutritionDetailModal .status-good {
  background: #dcfce7;
  color: #16a34a;
}

#nutritionDetailModal .status-warning {
  background: #fef2f2;
  color: #dc2626;
}

/* Nutrition detail modal backdrop */
#nutritionDetailModal {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 16px;
}

#nutritionDetailModal .modal-dialog {
  display: block;
  background: var(--surface);
  border-radius: 16px;
  max-width: 320px;
  width: 100%;
  min-height: auto;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 10%);
  padding: 0;
}

#nutritionDetailModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: none;
}

#nutritionDetailModal .modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

#nutritionDetailModal .modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

#nutritionDetailModal .modal-close:hover {
  background: var(--gray-200);
}

#nutritionDetailModal .modal-body {
  padding: 12px 20px 20px;
  text-align: center;
}

#nutritionDetailModal .modal-body > .ring-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  margin-top: 12px;
}

#nutritionDetailModal .ring-days-left-modal {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Mobile: stack date and rings vertically */
@media (width <= 480px) {
  .compact-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .compact-date-nav {
    justify-content: space-between;
  }

  .nutrition-rings {
    justify-content: center;
  }

  .ring-item {
    width: 48px;
    height: 48px;
  }

  .ring-item .ring-label {
    font-size: 10px;
  }
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
}

/* Tabs inside card */
.tabs {
  display: flex;
  padding: 12px 12px 0;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

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

.tab.active {
  color: var(--text-primary);
  font-weight: 600;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 6px;
  right: 6px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px 2px 0 0;
}

.tab-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.tab.active .tab-count {
  color: var(--text-secondary);
}

.tab-content {
  padding: 16px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block !important;
}

/* Meal Groups */
.meal-group {
  margin-bottom: 4px;
}

.meal-group:last-child {
  margin-bottom: 0;
}

.meal-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  padding-left: 4px;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: all 0.15s;
}

.activity-item:hover {
  background: var(--gray-100);
}

.activity-item.from-ai {
  border-left: 3px solid var(--purple);
  background: var(--purple-light);
}


.activity-icon {
  width: 32px;
  height: 32px;
  background: var(--surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.activity-meta strong {
  color: var(--text);
}

/* Meal macro display with color-coded dots */
.meal-macros {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meal-macro {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meal-macro-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.meal-macro-value {
  font-weight: 600;
  font-size: 12px;
}

.meal-macro-unit {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Macro color utilities */
.bg-calories { background-color: var(--orange); }
.bg-protein { background-color: var(--blue); }
.bg-carbs { background-color: var(--purple); }
.bg-fat { background-color: var(--green); }

.color-calories { color: var(--orange); }
.color-protein { color: var(--blue); }
.color-carbs { color: var(--purple); }
.color-fat { color: var(--green); }

.ai-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--purple-light);
  padding: 2px 6px;
  border-radius: 4px;
}

.ai-badge.planned {
  color: var(--blue-700, #1d4ed8);
  background: var(--blue-100, #dbeafe);
}

.ai-badge.trainer {
  color: var(--green-700, #15803d);
  background: var(--green-100, #dcfce7);
}

/* Activity content wrapper for swipe-to-reveal */
.activity-content-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

/* Item actions (delete button) */
.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.activity-item:hover .item-actions {
  opacity: 1;
}

.btn-delete {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-delete:hover {
  color: var(--red);
}

/* Mobile swipe-to-reveal styles */
@media (width <= 768px) {
  .activity-item {
    overflow: hidden;
    position: relative;
    touch-action: pan-y; /* Allow vertical scroll, we handle horizontal */
  }

  .activity-content-wrapper {
    background: inherit;
    transition: transform 0.2s ease-out;
    position: relative;
    z-index: 1;
  }

  /* Delete button hidden off-screen by default */
  .activity-item .item-actions {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: var(--red);
    opacity: 1;
    justify-content: center;
    z-index: 0;
    border-radius: 0 10px 10px 0;
    transform: translateX(100%);
    transition: transform 0.2s ease-out;
  }

  .activity-item .item-actions .btn-delete {
    color: white;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  /* When swiped open */
  .activity-item.swipe-open .item-actions {
    transform: translateX(0);
  }

  .activity-item.swipe-open .activity-content-wrapper {
    transform: translateX(-60px);
  }
}

/* Totals Footer */
.totals-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.totals-footer strong {
  color: var(--text);
  font-weight: 700;
}

.goal-target {
  color: var(--text-muted);
  font-weight: 400;
}

/* Deleted items link */
.deleted-items-link {
  text-align: center;
  padding: 8px 0;
  margin-top: 8px;
}

.deleted-items-link a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.deleted-items-link a:hover {
  color: var(--text-secondary);
}

.deleted-items-link i {
  margin-right: 4px;
}

/* Deleted items modal list */
.deleted-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deleted-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--gray-50);
  border-radius: 8px;
  gap: 12px;
}

.deleted-item-content {
  flex: 1;
  min-width: 0;
}

.deleted-item-content strong {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.deleted-item-meta {
  margin-top: 4px;
}

.deleted-item-actions {
  flex-shrink: 0;
}

/* FABs positioning */
.daily-dashboard-container .main {
  position: relative; /* Establish positioning context */
}

/* Desktop: Hide FAB container since + is inline with tabs */
@media (width > 768px) {
  .fab-container {
    display: none;
  }
}

/* Inline add button in tabs bar - desktop only */
.tab-add-btn {
  display: none !important; /* Hidden on mobile, use FAB instead */
}

@media (width >= 769px) {
  .tab-add-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: 32px;
    height: 32px;
    background: var(--orange);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
  }

  .tab-add-btn:hover {
    background: var(--orange-600);
    transform: scale(1.05);
  }
}

/* Mobile: FAB at bottom right */
@media (width <= 768px) {
  .fab-container {
    position: absolute;
    bottom: 24px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 30;
  }
}

/* Hide FAB when chat panel is active (mobile overlay) */
.daily-dashboard-container:has(.chat-panel.active) .fab-container {
  display: none;
}

.fab {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 16px !important;
  border: none;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-direction: row !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.fab-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 20px rgb(232 116 59 / 40%);
  border: 3px solid white;
}

.fab-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgb(232 116 59 / 50%);
}

.fab-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgb(0 0 0 / 8%);
}

.fab-secondary:hover {
  transform: scale(1.05);
  background: var(--gray-50);
}

/* Chat card styling (layout handled by .daily-dashboard-container .chat-panel) */
.chat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

/* Mobile adjustments */
@media (width <= 768px) {
  /* Stack layout vertically on mobile */
  .daily-dashboard-container {
    flex-direction: column;
  }

  /* Main area takes full width */
  .daily-dashboard-container .main {
    flex: 1;
  }

  /* Chat panel is hidden by default, shown as overlay when active */
  .daily-dashboard-container .chat-panel {
    display: none;
    position: fixed;
    inset: 56px 0 0; /* Below nav bar */
    height: auto; /* Override base height: 100% which ignores top offset */
    z-index: 50;
    padding: 0;
    background: var(--bg);
  }

  /* Account for trainer stripe when viewing a client */
  body.has-trainer-stripe .daily-dashboard-container .chat-panel {
    top: 92px; /* 56px nav + ~36px stripe */
  }

  .daily-dashboard-container .chat-panel.active {
    display: flex;
    flex-direction: column;
  }

  .daily-dashboard-container .chat-panel .chat-card {
    flex: 1;
    min-height: 0;
    border-radius: 0;
  }

  .daily-dashboard-container .chat-panel .chat-card-header {
    height: auto;
    padding: 8px 12px;
  }

  .daily-dashboard-container .chat-panel .chat-card-header::before {
    border-radius: 0;
  }

  /* FABs positioned above safe area */
  .fab-container {
    bottom: calc(24px + env(safe-area-inset-bottom, 0));
  }

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

  .tab {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.profile-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.profile-identity h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 0;
}

.profile-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.profile-meta span + span::before {
  content: "\00b7";
  margin: 0 6px;
  color: var(--text-muted);
}

/* Stats Bar */
.profile-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 16px 0 0;
  margin-bottom: 40px;
}

.profile-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
}

.profile-stat-pill .emoji {
  font-size: 14px;
}

.profile-stat-pill .count {
  font-weight: 700;
  color: var(--text);
}

.profile-stat-pill .label {
  color: var(--text-muted);
  font-weight: 400;
}

/* Profile Sections */
.profile-section {
  margin-bottom: 40px;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.profile-edit-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--orange);
  text-decoration: none;
  cursor: pointer;
  padding: 4px 0;
  background: none;
  border: none;
}

.profile-edit-link:hover {
  text-decoration: underline;
}

/* Content Card */
.profile-content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

/* Active Situations */
.profile-situations {
  margin-bottom: 40px;
}

.profile-situations-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-situation-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--amber-light);
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 14px;
  color: #92400e;
  line-height: 1.45;
  margin-bottom: 8px;
}

.profile-situation-banner .icon {
  flex-shrink: 0;
  font-size: 16px;
  margin-top: 1px;
}

.profile-situation-banner .dismiss {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #92400e;
  opacity: 0.5;
  padding: 0 0 0 8px;
  line-height: 1;
}

.profile-situation-banner .dismiss:hover {
  opacity: 1;
}

/* Goals & Motivations */
.profile-goals-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.profile-goal-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--orange-light);
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #c2410c;
}

.profile-goal-tag .check {
  font-size: 13px;
}

.profile-sub-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.profile-motivations-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-motivations-list li {
  padding: 8px 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.profile-motivations-list li + li {
  border-top: 1px solid var(--gray-100);
}

.profile-motivations-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  position: relative;
  top: 1px;
}

/* Detail Rows (Personal Info) */
.profile-detail-rows {
  display: grid;
  gap: 0;
}

.profile-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.profile-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-detail-row:first-child {
  padding-top: 0;
}

.profile-detail-label {
  color: var(--text-secondary);
  font-weight: 400;
}

.profile-detail-value {
  font-weight: 500;
  color: var(--text);
  text-align: right;
}

.profile-detail-value.muted {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
}

/* Schedule Section */
.profile-schedule-items {
  display: grid;
  gap: 16px;
}

.profile-schedule-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.profile-schedule-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.profile-schedule-content {
  flex: 1;
  min-width: 0;
}

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

.profile-schedule-value {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* AI Assistant */
.profile-ai-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-ai-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.profile-ai-name {
  font-size: 15px;
  font-weight: 600;
}

.profile-ai-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

/* Security Section */
.profile-security-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-size: 14px;
}

.profile-security-method svg {
  flex-shrink: 0;
}

.profile-security-method .method-label {
  font-weight: 500;
}

.profile-security-method .method-detail {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-security-actions {
  display: flex;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
}

.profile-btn-secondary {
  background: var(--gray-100);
  color: var(--text);
  border: 1px solid var(--border);
}

.profile-btn-secondary:hover {
  background: var(--border);
  color: var(--text);
  text-decoration: none;
}

.profile-btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}

.profile-btn-danger:hover {
  background: #fee2e2;
  color: #dc2626;
  text-decoration: none;
}

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

/* Danger Zone */
.profile-danger-section {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

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

/* Profile Page Empty State */
.profile-empty-text {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

/* Responsive */
@media (width <= 480px) {
  .profile-page {
    padding: 20px 16px 60px;
  }

  .profile-header {
    gap: 16px;
  }

  .profile-avatar {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }

  .profile-identity h1 {
    font-size: 20px;
  }

  .profile-stats-bar {
    gap: 6px;
    margin-bottom: 32px;
  }

  .profile-stat-pill {
    padding: 5px 10px;
    font-size: 12px;
  }

  .profile-content-card {
    padding: 20px;
    border-radius: 12px;
  }

  .profile-section {
    margin-bottom: 32px;
  }

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

  .profile-goal-tag {
    font-size: 13px;
    padding: 6px 11px;
  }
}
