/* ============================================================================
   ARA-Training SMART System - Heat Acclimatization Module CSS
   ============================================================================
   Mobile-first, dark premium aesthetic with comprehensive component coverage
   ============================================================================ */

/* CSS Variables - Heat-Specific Color Palette */
:root {
  --heat-green: #27AE60;
  --heat-green-bg: rgba(39, 174, 96, 0.12);
  --heat-yellow: #F2C94C;
  --heat-yellow-bg: rgba(242, 201, 76, 0.12);
  --heat-orange: #F2994A;
  --heat-orange-bg: rgba(242, 153, 74, 0.12);
  --heat-red: #EB5757;
  --heat-red-bg: rgba(235, 87, 87, 0.12);
}


/* ============================================================================
   KEYFRAME ANIMATIONS
   ============================================================================ */

@keyframes heat-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes heat-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes heat-shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes heat-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================================
   CONTAINER & LAYOUT UTILITIES
   ============================================================================ */

.heat-module-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 768px) {
  .heat-module-container {
    padding: 24px;
  }
}

.heat-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  padding: 12px 0 12px 12px;
  border-left: 4px solid var(--gold);
  margin-bottom: 20px;
}

.heat-divider {
  height: 1px;
  background-color: var(--line);
  margin: 20px 0;
}

.heat-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--panel2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-tag.swim {
  background-color: rgba(30, 144, 255, 0.15);
  color: #1e90ff;
}

.heat-tag.bike {
  background-color: rgba(255, 140, 0, 0.15);
  color: #ff8c00;
}

.heat-tag.run {
  background-color: rgba(220, 20, 60, 0.15);
  color: #dc143c;
}

.heat-tag.gym {
  background-color: rgba(147, 112, 219, 0.15);
  color: #9370db;
}

/* ============================================================================
   RISK STATUS CARDS - Section 1
   ============================================================================ */

.heat-status-card {
  background-color: var(--panel);
  border-radius: var(--radius);
  border-left: 4px solid var(--line);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  animation: heat-fadeIn 0.3s ease-out;
}

.heat-status-card.heat-status-green {
  border-left-color: var(--heat-green);
  background-color: rgba(39, 174, 96, 0.08);
}

.heat-status-card.heat-status-yellow {
  border-left-color: var(--heat-yellow);
  background-color: var(--heat-yellow-bg);
}

.heat-status-card.heat-status-orange {
  border-left-color: var(--heat-orange);
  background-color: var(--heat-orange-bg);
}

.heat-status-card.heat-status-red {
  border-left-color: var(--heat-red);
  background-color: var(--heat-red-bg);
  animation: heat-pulse 2s ease-in-out infinite, heat-fadeIn 0.3s ease-out;
}

.heat-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-risk-badge.green {
  background-color: var(--heat-green-bg);
  color: var(--heat-green);
}

.heat-risk-badge.yellow {
  background-color: var(--heat-yellow-bg);
  color: #d4a500;
}

.heat-risk-badge.orange {
  background-color: var(--heat-orange-bg);
  color: var(--heat-orange);
}

.heat-risk-badge.red {
  background-color: var(--heat-red-bg);
  color: var(--heat-red);
}

.heat-risk-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.heat-risk-dot.green {
  background-color: var(--heat-green);
}

.heat-risk-dot.yellow {
  background-color: var(--heat-yellow);
}

.heat-risk-dot.orange {
  background-color: var(--heat-orange);
}

.heat-risk-dot.red {
  background-color: var(--heat-red);
}

/* ============================================================================
   WIZARD / MULTI-STEP FORM - Section 2
   ============================================================================ */

.heat-wizard {
  background-color: var(--panel);
  border-radius: var(--radius2);
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.heat-wizard-steps {
  display: flex;
  gap: 12px;
  padding: 20px 16px;
  background-color: var(--panel2);
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .heat-wizard-steps {
    gap: 20px;
    padding: 24px;
  }
}

.heat-wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.heat-wizard-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--panel);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
  border: 2px solid var(--line);
  transition: all 0.3s ease;
}

.heat-wizard-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.heat-wizard-step.active .heat-wizard-step-number {
  background-color: var(--gold);
  color: var(--bg0);
  border-color: var(--gold);
}

.heat-wizard-step.active .heat-wizard-step-label {
  color: var(--gold);
}

.heat-wizard-step.done .heat-wizard-step-number {
  background-color: var(--heat-green);
  color: var(--bg0);
  border-color: var(--heat-green);
}

.heat-wizard-step.done .heat-wizard-step-number::after {
  content: "✓";
  font-size: 0.875rem;
}

.heat-wizard-step.done .heat-wizard-step-number > span {
  display: none;
}

.heat-wizard-step.done .heat-wizard-step-label {
  color: var(--muted2);
}

.heat-wizard-step.error .heat-wizard-step-number {
  background-color: var(--heat-red-bg);
  color: var(--heat-red);
  border-color: var(--heat-red);
}

.heat-wizard-step.error .heat-wizard-step-label {
  color: var(--heat-red);
}

.heat-wizard-body {
  padding: 24px 16px;
}

@media (min-width: 768px) {
  .heat-wizard-body {
    padding: 32px;
  }
}

.heat-step-panel {
  display: none;
}

.heat-step-panel.active {
  display: block;
  animation: heat-fadeIn 0.4s ease-out;
}

.heat-wizard-nav {
  display: flex;
  gap: 12px;
  padding: 20px 16px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
}

@media (min-width: 768px) {
  .heat-wizard-nav {
    padding: 24px;
    gap: 16px;
  }
}

.heat-wizard-nav button {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-wizard-nav .btn-prev {
  background-color: var(--panel2);
  color: var(--muted);
}

.heat-wizard-nav .btn-prev:hover {
  background-color: var(--line);
}

.heat-wizard-nav .btn-next {
  background-color: var(--gold);
  color: var(--bg0);
  flex: 1.5;
}

.heat-wizard-nav .btn-next:hover {
  background-color: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(224, 168, 0, 0.3);
}

.heat-wizard-nav .btn-next:disabled {
  background-color: var(--line);
  color: var(--muted2);
  cursor: not-allowed;
  transform: none;
}

/* ============================================================================
   URINE COLOR SELECTOR - Section 3
   ============================================================================ */

.heat-urine-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .heat-urine-selector {
    gap: 16px;
  }
}

.heat-urine-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 60px;
}

.heat-urine-option-tile {
  width: 70px;
  height: 70px;
  border-radius: var(--radius);
  border: 3px solid var(--line);
  background-size: 200% 200%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .heat-urine-option-tile {
    width: 80px;
    height: 80px;
  }
}

.heat-urine-option-tile.clear {
  background-color: #fffde7;
}

.heat-urine-option-tile.pale {
  background-color: #fff176;
}

.heat-urine-option-tile.yellow {
  background-color: #fdd835;
}

.heat-urine-option-tile.dark-yellow {
  background-color: #f9a825;
}

.heat-urine-option-tile.amber {
  background-color: #e65100;
}

.heat-urine-option-tile.dark {
  background-color: #5d4037;
}

.heat-urine-option.selected .heat-urine-option-tile {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(224, 168, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.08);
}

.heat-urine-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.heat-urine-option.selected .heat-urine-label {
  color: var(--gold);
}

/* ============================================================================
   SYMPTOM CHIPS - Section 4
   ============================================================================ */

.heat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .heat-chips {
    gap: 12px;
  }
}

.heat-chip {
  padding: 10px 14px;
  border-radius: 20px;
  border: 2px solid var(--line);
  background-color: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  user-select: none;
}

.heat-chip:hover {
  border-color: var(--muted);
}

.heat-chip.selected {
  background-color: var(--gold);
  color: var(--bg0);
  border-color: var(--gold);
}

.heat-chip.danger-chip {
  border-color: var(--heat-red-bg);
  color: var(--heat-red);
}

.heat-chip.danger-chip:hover {
  border-color: var(--heat-red);
}

.heat-chip.danger-chip.selected {
  background-color: var(--heat-red);
  color: white;
  border-color: var(--heat-red);
}

/* ============================================================================
   METRIC CARDS - Section 5
   ============================================================================ */

.heat-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .heat-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .heat-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

.heat-metric {
  background-color: var(--panel);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: heat-slideUp 0.5s ease-out;
}

.heat-metric-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .heat-metric-value {
    font-size: 2.5rem;
  }
}

.heat-metric-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.heat-metric-unit {
  font-size: 0.75rem;
  color: var(--muted2);
  margin-left: 4px;
}

/* ============================================================================
   RECOMMENDATION BOX - Section 6
   ============================================================================ */

.heat-rec-box {
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow);
  animation: heat-slideUp 0.5s ease-out;
}

@media (min-width: 768px) {
  .heat-rec-box {
    padding: 24px;
    gap: 20px;
  }
}

.heat-rec-box.green {
  background-color: var(--heat-green-bg);
  border-left: 4px solid var(--heat-green);
}

.heat-rec-box.yellow {
  background-color: var(--heat-yellow-bg);
  border-left: 4px solid var(--heat-yellow);
}

.heat-rec-box.orange {
  background-color: var(--heat-orange-bg);
  border-left: 4px solid var(--heat-orange);
}

.heat-rec-box.red {
  background-color: var(--heat-red-bg);
  border-left: 4px solid var(--heat-red);
  animation: heat-pulse 2s ease-in-out infinite;
}

.heat-rec-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  line-height: 1;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heat-rec-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heat-rec-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.heat-rec-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.heat-rec-actions button {
  padding: 10px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-rec-actions .btn-primary {
  background-color: var(--gold);
  color: var(--bg0);
}

.heat-rec-actions .btn-primary:hover {
  background-color: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(224, 168, 0, 0.3);
}

.heat-rec-actions .btn-secondary {
  background-color: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
}

.heat-rec-actions .btn-secondary:hover {
  background-color: var(--panel2);
  border-color: var(--muted);
}

/* ============================================================================
   PROTOCOL DAY TIMELINE - Section 7
   ============================================================================ */

.heat-timeline {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 20px;
  scroll-snap-type: x mandatory;
}

@media (min-width: 768px) {
  .heat-timeline {
    gap: 10px;
    padding: 16px 0;
  }
}

.heat-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  min-width: 60px;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  background-color: var(--panel);
  scroll-snap-align: start;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .heat-day {
    min-width: 70px;
    padding: 14px;
  }
}

.heat-day.no-log {
  background-color: transparent;
  border-color: var(--line);
  opacity: 0.6;
}

.heat-day.logged-morning {
  border-style: solid;
  border-color: var(--heat-green);
  background-color: rgba(39, 174, 96, 0.08);
}

.heat-day.today {
  border-style: solid;
  border-color: var(--gold);
  background-color: rgba(224, 168, 0, 0.08);
  transform: scale(1.1);
}

.heat-day-num {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.heat-day-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--line);
}

.heat-day.heat-status-green .heat-day-status {
  background-color: var(--heat-green);
}

.heat-day.heat-status-yellow .heat-day-status {
  background-color: var(--heat-yellow);
}

.heat-day.heat-status-orange .heat-day-status {
  background-color: var(--heat-orange);
}

.heat-day.heat-status-red .heat-day-status {
  background-color: var(--heat-red);
}

.heat-day-checkmark {
  font-size: 1rem;
  color: var(--heat-green);
}

/* ============================================================================
   COACH DASHBOARD TABLE (SEMAPHORE) - Section 8
   ============================================================================ */

.heat-coach-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
}

.heat-coach-table thead {
  background-color: var(--panel2);
  border-bottom: 2px solid var(--line);
}

.heat-coach-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (min-width: 768px) {
  .heat-coach-table th {
    padding: 16px;
  }
}

.heat-coach-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

@media (min-width: 768px) {
  .heat-coach-table td {
    padding: 14px 16px;
  }
}

.heat-coach-table tbody tr {
  transition: all 0.3s ease;
}

.heat-coach-table tbody tr:hover {
  background-color: var(--panel2);
  cursor: pointer;
}

.heat-athlete-row {
  display: block;
}

.heat-coach-table td.risk-green {
  background-color: var(--heat-green-bg);
  color: var(--heat-green);
  font-weight: 600;
}

.heat-coach-table td.risk-yellow {
  background-color: var(--heat-yellow-bg);
  color: #d4a500;
  font-weight: 600;
}

.heat-coach-table td.risk-orange {
  background-color: var(--heat-orange-bg);
  color: var(--heat-orange);
  font-weight: 600;
}

.heat-coach-table td.risk-red {
  background-color: var(--heat-red-bg);
  color: var(--heat-red);
  font-weight: 600;
  animation: heat-pulse 2s ease-in-out infinite;
}

.heat-alert-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  background-color: var(--heat-red-bg);
  color: var(--heat-red);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  min-width: 24px;
}

/* ============================================================================
   ALERT ITEMS - Section 9
   ============================================================================ */

.heat-alert {
  background-color: var(--panel);
  border-radius: var(--radius);
  border-left: 4px solid var(--line);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  animation: heat-slideUp 0.4s ease-out;
}

@media (min-width: 768px) {
  .heat-alert {
    padding: 20px;
  }
}

.heat-alert.yellow {
  border-left-color: var(--heat-yellow);
  background-color: var(--heat-yellow-bg);
}

.heat-alert.orange {
  border-left-color: var(--heat-orange);
  background-color: var(--heat-orange-bg);
}

.heat-alert.red {
  border-left-color: var(--heat-red);
  background-color: var(--heat-red-bg);
  animation: heat-pulse 2s ease-in-out infinite, heat-slideUp 0.4s ease-out;
}

.heat-alert-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.heat-alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.heat-alert-title-time {
  flex: 1;
}

.heat-alert-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.heat-alert-time {
  font-size: 0.75rem;
  color: var(--muted2);
}

.heat-alert-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 36px;
  margin-top: -30px;
}

.heat-alert-actions {
  display: flex;
  gap: 12px;
  padding-left: 36px;
}

.heat-alert-actions button {
  padding: 8px 12px;
  border-radius: var(--radius);
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-alert-actions .btn-resolve {
  background-color: var(--heat-green);
  color: white;
}

.heat-alert-actions .btn-resolve:hover {
  background-color: #229054;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.heat-alert-actions .btn-dismiss {
  background-color: var(--panel2);
  color: var(--muted);
}

.heat-alert-actions .btn-dismiss:hover {
  background-color: var(--line);
}

/* ============================================================================
   PROTOCOL FORM - Section 10
   ============================================================================ */

.heat-protocol-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 768px) {
  .heat-protocol-form {
    gap: 24px;
  }
}

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

@media (min-width: 768px) {
  .heat-form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

.heat-form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .heat-form-section {
    padding-bottom: 20px;
  }
}

.heat-form-section:last-child {
  border-bottom: none;
}

.heat-form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-form-label.required::after {
  content: " *";
  color: var(--heat-red);
}

.heat-form-input,
.heat-form-select,
.heat-form-textarea {
  background-color: var(--bg0);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.heat-form-input:focus,
.heat-form-select:focus,
.heat-form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 168, 0, 0.15);
}

.heat-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.heat-date-picker {
  background-color: var(--bg0);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.heat-date-picker:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 168, 0, 0.15);
}

.heat-date-picker::-webkit-calendar-picker-indicator {
  filter: brightness(0.8);
  cursor: pointer;
}

.heat-form-helper {
  font-size: 0.75rem;
  color: var(--muted2);
  margin-top: -8px;
}

.heat-form-error {
  font-size: 0.75rem;
  color: var(--heat-red);
  margin-top: -8px;
}

.heat-form-input.error,
.heat-form-select.error {
  border-color: var(--heat-red);
  background-color: rgba(235, 87, 87, 0.05);
}

/* ============================================================================
   MINI CHARTS - Section 11
   ============================================================================ */

.heat-chart-wrap {
  background-color: var(--panel);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .heat-chart-wrap {
    padding: 24px;
  }
}

.heat-chart-container {
  position: relative;
  width: 100%;
  height: 200px;
  margin-bottom: 12px;
}

.heat-chart-canvas {
  width: 100%;
  height: 100%;
}

.heat-chart-label {
  font-size: 0.75rem;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .heat-chart-legend {
    gap: 20px;
  }
}

.heat-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.heat-chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================================
   SWEAT RATE VISUALIZATION - Section 12
   ============================================================================ */

.heat-sweat-bar {
  position: relative;
  height: 40px;
  background: linear-gradient(to right, #27AE60 0%, #F2C94C 33%, #F2994A 66%, #EB5757 100%);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.heat-sweat-indicator {
  position: absolute;
  top: 0;
  width: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  border-right: 3px solid var(--gold);
  transition: width 0.5s ease;
}

.heat-sweat-zones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .heat-sweat-zones {
    gap: 16px;
  }
}

.heat-sweat-zone {
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius);
  background-color: var(--panel);
  border: 2px solid var(--line);
  transition: all 0.3s ease;
}

.heat-sweat-zone.active {
  border-color: var(--gold);
  background-color: rgba(224, 168, 0, 0.1);
}

.heat-sweat-zone-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.heat-sweat-zone.active .heat-sweat-zone-label {
  color: var(--gold);
}

.heat-sweat-zone-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

/* ============================================================================
   LOADING & EMPTY STATES - Section 13
   ============================================================================ */

.heat-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
}

.heat-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: heat-spin 0.8s linear infinite;
}

.heat-loading-text {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.heat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  text-align: center;
}

.heat-empty-icon {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 12px;
}

.heat-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.heat-empty-text {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 300px;
}

.heat-empty-action {
  margin-top: 16px;
}

.heat-empty-action button {
  padding: 10px 16px;
  border-radius: var(--radius);
  border: none;
  background-color: var(--gold);
  color: var(--bg0);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.heat-empty-action button:hover {
  background-color: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(224, 168, 0, 0.3);
}

.heat-skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: heat-shimmer 2s infinite;
  border-radius: var(--radius);
}

.heat-skeleton.short {
  height: 12px;
  margin-bottom: 8px;
}

.heat-skeleton.medium {
  height: 16px;
  margin-bottom: 12px;
}

.heat-skeleton.tall {
  height: 24px;
  margin-bottom: 16px;
}

.heat-skeleton.card {
  height: 120px;
  margin-bottom: 16px;
}

/* ============================================================================
   RESPONSIVE MOBILE ADJUSTMENTS - Section 14
   ============================================================================ */

@media (max-width: 375px) {
  .heat-module-container {
    padding: 12px;
  }

  .heat-wizard-steps {
    gap: 8px;
    padding: 16px;
  }

  .heat-wizard-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .heat-wizard-step-label {
    font-size: 0.65rem;
  }

  .heat-metrics {
    gap: 12px;
  }

  .heat-metric {
    padding: 16px 12px;
  }

  .heat-metric-value {
    font-size: 1.5rem;
  }

  .heat-rec-box {
    padding: 16px;
    gap: 12px;
  }

  .heat-rec-icon {
    font-size: 2rem;
    min-width: 48px;
  }

  .heat-rec-text {
    font-size: 0.85rem;
  }

  .heat-coach-table {
    font-size: 0.75rem;
  }

  .heat-coach-table th,
  .heat-coach-table td {
    padding: 8px 10px;
  }

  .heat-form-grid {
    gap: 12px;
  }

  .heat-form-input,
  .heat-form-select,
  .heat-form-textarea,
  .heat-date-picker {
    padding: 10px;
    font-size: 0.9rem;
  }

  .heat-wizard-nav {
    padding: 16px;
    gap: 8px;
    flex-direction: column;
  }

  .heat-wizard-nav button {
    padding: 10px 12px;
  }
}

/* ============================================================================
   TABLE RESPONSIVE - Horizontal Scroll on Mobile
   ============================================================================ */

@media (max-width: 640px) {
  .heat-coach-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .heat-coach-table thead,
  .heat-coach-table tbody,
  .heat-coach-table th,
  .heat-coach-table td,
  .heat-coach-table tr {
    display: block;
  }

  .heat-coach-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .heat-coach-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background-color: var(--panel);
  }

  .heat-coach-table td {
    border: none;
    padding: 8px 4px;
    text-align: right;
    position: relative;
    padding-left: 50%;
  }

  .heat-coach-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 8px;
    font-weight: 700;
    color: var(--gold);
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}

/* ============================================================================
   CIRCULAR SCORE RING - Section 16
   ============================================================================ */

.heat-score-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
}

@media (min-width: 768px) {
  .heat-score-ring {
    width: 160px;
    height: 160px;
  }
}

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

.heat-score-ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 8;
}

.heat-score-ring-progress {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 471.2;
  stroke-dashoffset: 471.2;
  transition: stroke-dashoffset 0.5s ease;
}

.heat-score-ring-progress.green {
  stroke: var(--heat-green);
}

.heat-score-ring-progress.yellow {
  stroke: var(--heat-yellow);
}

.heat-score-ring-progress.orange {
  stroke: var(--heat-orange);
}

.heat-score-ring-progress.red {
  stroke: var(--heat-red);
}

.heat-score-ring-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
}

@media (min-width: 768px) {
  .heat-score-ring-value {
    font-size: 2.8rem;
  }
}

.heat-score-ring-label {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ============================================================================
   UTILITY BUTTON STATES
   ============================================================================ */

button {
  cursor: pointer;
  transition: all 0.3s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:active {
  transform: scale(0.98);
}

/* ============================================================================
   SMOOTH SCROLLING
   ============================================================================ */

.heat-timeline {
  scroll-behavior: smooth;
}

/* ============================================================================
   DARK MODE ENHANCEMENTS
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   END OF HEAT ACCLIMATIZATION CSS
   ============================================================================ */

/* Light redesign for athlete_heat_acclimation.html */
body[data-theme="light"] {
  --heat-navy: #071b46;
  --heat-copy: #425072;
  --heat-soft: #f7f9fd;
  --heat-border: #dfe6f0;
  --heat-card-shadow: 0 14px 34px rgba(20, 37, 72, 0.08);
  background: radial-gradient(circle at 35% 8%, rgba(255,255,255,.95), rgba(255,255,255,0) 34%), linear-gradient(180deg, #fbfcff 0%, #f4f7fb 100%) !important;
  color: var(--heat-navy);
}

body[data-theme="light"] #topbarMount {
  max-width: none;
  width: 100%;
  padding: 0;
  border-bottom: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
}

body[data-theme="light"] #topbarMount .topbar {
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 72px;
}

body[data-theme="light"] #topbarMount .topbarInner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
}

#heatContent.container {
  width: min(1128px, calc(100vw - 44px));
  max-width: 1128px;
  margin: 0 auto;
  padding: 20px 0 34px;
}

body.ara-athlete-shell-ready:not(.ara-athlete-no-sidebar) > #heatContent.container {
  padding-left: 0 !important;
}

#heatContent .page-header {
  margin: 0 0 18px;
}

#heatContent .page-header::before {
  content: "Inicio  >  Aclimatizacion  >  Control diario";
  display: block;
  margin: 0 0 16px;
  color: #2e4166;
  font-size: 12px;
  font-weight: 700;
}

#heatContent .page-header .h1 {
  display: block;
  margin: 0;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 1;
}

#heatContent .page-header .h1::before {
  content: none;
  display: block;
  margin-bottom: 6px;
  color: #f2b705;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: .02em;
  text-transform: uppercase;
}

#heatContent .page-header .h1::after {
  content: none;
  display: block;
  color: var(--heat-navy);
  font-size: clamp(28px, 3vw, 38px);
  line-height: .98;
  font-weight: 950;
  letter-spacing: 0;
}

#heatContent .page-header .subtitle {
  margin-top: 8px;
  color: var(--heat-copy);
  font-size: 15px;
}

#heatContent .page-header .subtitle::after {
  content: "Monitorea tu adaptacion al calor, registra entrenos y controla tu evolucion diaria.";
}

#heatContent .page-header .subtitle #protocolDay {
  display: none;
}

#heatContent .heat-page-kicker {
  margin-bottom: 6px;
  color: #f2b705;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: .02em;
}

#heatContent .heat-page-title {
  margin: 0;
  color: var(--heat-navy);
  font-size: clamp(28px, 3vw, 38px);
  line-height: .98;
  font-weight: 950;
}

#heatContent .heat-page-subtitle {
  margin: 8px 0 0;
  color: var(--heat-copy);
  font-size: 15px;
}

#heatContent .page-header .subtitle {
  display: none !important;
}

#heatTodayStatus {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 126px;
  margin: 0 0 16px !important;
  padding: 30px 28px 30px 124px !important;
  border: 1px solid rgba(39, 174, 96, .22) !important;
  border-left: 4px solid #2eb872 !important;
  border-radius: 14px !important;
  background: linear-gradient(90deg, rgba(39,174,96,.12), rgba(255,255,255,.90)) !important;
  box-shadow: none !important;
  color: var(--heat-navy) !important;
}

#heatTodayStatus::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(46, 184, 114, .12);
  pointer-events: none;
}

#heatTodayStatus::after {
  content: "OK";
  position: absolute;
  left: 47px;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #35b87a;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(39, 174, 96, .26);
  pointer-events: none;
}

#heatTodayStatus .h3 {
  margin: 4px 0 6px !important;
  color: var(--heat-navy) !important;
  font-size: 21px !important;
  font-weight: 950 !important;
}

#heatTodayStatus p {
  max-width: 760px;
  color: var(--heat-copy) !important;
  font-size: 14px;
  line-height: 1.55;
}

#heatTodayStatus .heat-risk-badge {
  width: max-content;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  background: rgba(46, 184, 114, .15) !important;
  color: #1fa463 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1;
  letter-spacing: 0 !important;
}

#heatTodayStatus .small.muted {
  display: block;
  margin-top: 10px !important;
  color: #526080 !important;
  font-size: 12px;
  font-weight: 700;
}

#heatContent .action-buttons {
  display: grid !important;
  grid-template-columns: .82fr 1.18fr 1.18fr !important;
  gap: 20px !important;
  margin: 16px 0 20px !important;
}

#heatContent .action-btn {
  min-height: 82px;
  border-radius: 12px !important;
  border: 1px solid var(--heat-border) !important;
  background: #fff !important;
  box-shadow: var(--heat-card-shadow) !important;
  color: var(--heat-navy) !important;
  display: grid !important;
  grid-template-columns: 48px 1fr;
  align-items: center;
  justify-items: start;
  gap: 16px;
  padding: 16px 22px !important;
  text-align: left !important;
  font-size: 0 !important;
  line-height: 1.2;
}

#heatContent .action-btn span:first-child {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid !important;
  place-items: center;
  background: rgba(242, 183, 5, .18);
  color: #071b46;
  font-size: 0 !important;
}

#heatContent .action-btn span:first-child svg {
  display: none;
}

#heatContent .action-btn span:first-child::before {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: inherit;
  font-size: 20px;
  line-height: 1;
}

#btnMorning span:first-child {
  background: #35b87a !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(39, 174, 96, .24);
}

#btnMorning span:first-child::before { content: "OK"; font-size: 12px; font-weight: 950; }
#btnTraining span:first-child::before { content: "RUN"; font-size: 11px; font-weight: 950; }
#btnPassiveHeat span:first-child::before { content: "HOT"; font-size: 11px; font-weight: 950; }

#btnTraining,
#btnPassiveHeat {
  background: linear-gradient(135deg, #ffc400, #f2ad00) !important;
  border-color: #efb000 !important;
  box-shadow: 0 14px 24px rgba(226, 160, 0, .22) !important;
  color: #071b46 !important;
  font-size: 0 !important;
}

#btnMorning::before,
#btnTraining::before,
#btnPassiveHeat::before {
  display: block;
  font-size: 16px;
  line-height: 1.18;
  font-weight: 950;
  color: var(--heat-navy);
  white-space: normal;
}

#btnMorning::after,
#btnTraining::after,
#btnPassiveHeat::after {
  display: block;
  font-size: 13px;
  line-height: 1.28;
  color: #425072;
  white-space: normal;
}

#btnMorning::before { content: "Control registrado hoy"; }
#btnMorning::after { content: "Registro diario completo."; }
#btnTraining::before { content: "Registrar entreno"; }
#btnTraining::after { content: "Registra tu sesion de hoy"; color: #071b46; }
#btnPassiveHeat::before { content: "Sauna / Bano caliente"; }
#btnPassiveHeat::after { content: "Registra tu exposicion al calor"; color: #071b46; }

#heatContent > .card,
#heatProgress,
#heatAlertsSection .card {
  border: 1px solid var(--heat-border) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: var(--heat-card-shadow) !important;
  padding: 16px !important;
  color: var(--heat-navy) !important;
}

#heatProgress {
  margin-top: 16px !important;
}

#heatContent > .card > .h3,
#heatProgress > .h2,
#heatAlertsSection .h3 {
  margin: 0 0 14px !important;
  color: var(--heat-navy) !important;
  font-size: 19px !important;
  font-weight: 950 !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

#heatContent > .card > .h3::before,
#heatProgress > .h2::before,
#heatAlertsSection .h3::before {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  border: 1px solid #dbe7fb;
  font-size: 11px;
  color: #3c6ed6;
}

#heatContent > .card > .h3::before { content: "SUM"; }
#heatProgress > .h2::before { content: "CAL"; }
#heatAlertsSection .h3::before { content: "!"; color: #f2ad00; background: #fff8e8; border-color: #ffe2a8; }

#heatContent .heat-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  margin: 0 !important;
}

#heatContent .heat-metric {
  min-height: 78px;
  padding: 14px 18px !important;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--heat-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  text-align: left !important;
  box-shadow: none !important;
}

#heatContent .heat-metric::before {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf4ff;
  color: #4a7de8;
  font-size: 13px;
  font-weight: 950;
  grid-row: 1 / span 2;
}

#heatMetrics .heat-metric:nth-child(1)::before { content: "KG"; background: #edf4ff; color: #4a7de8; }
#heatMetrics .heat-metric:nth-child(2)::before { content: "HR"; background: #ffe9f0; color: #ef3d68; }
#heatMetrics .heat-metric:nth-child(3)::before { content: "H2O"; background: #fff7df; color: #f4af00; font-size: 11px; }
#heatMetrics .heat-metric:nth-child(4)::before { content: "LOG"; background: #f0e9ff; color: #7657d8; font-size: 11px; }
#heatProgressMetrics .heat-metric:nth-child(1)::before { content: "KG"; background: #eefbf4; color: #27ae60; }
#heatProgressMetrics .heat-metric:nth-child(2)::before { content: "HR"; background: #ffe9f0; color: #ef3d68; }
#heatProgressMetrics .heat-metric:nth-child(3)::before { content: "%"; background: #fff7df; color: #f4af00; }

#heatContent .heat-metric-value {
  margin: 0 !important;
  color: var(--heat-navy) !important;
  font-size: 23px !important;
  font-weight: 950 !important;
  line-height: 1.05;
}

#heatContent .heat-metric-label {
  margin-top: 4px;
  color: #526080 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0;
}

#heatProgress .hr {
  display: none;
}

#heatTimeline {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 8px 0 14px !important;
}

#heatTimeline .heat-day {
  aspect-ratio: auto !important;
  min-height: 58px;
  border-radius: 6px !important;
  border: 1px solid var(--heat-border) !important;
  background: #fff !important;
  color: #2b3a5c !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 15px !important;
  font-weight: 850 !important;
}

#heatTimeline .heat-day.logged {
  background: linear-gradient(135deg, rgba(39,174,96,.13), rgba(255,255,255,.95)) !important;
  border-color: rgba(39,174,96,.38) !important;
  color: #18a763 !important;
}

#heatTimeline .heat-day.logged::after {
  content: "OK";
  font-size: 11px;
  line-height: .8;
  color: #27ae60;
  font-weight: 950;
}

#heatTimeline .heat-day.rest {
  opacity: 1 !important;
  color: #6e7c99 !important;
}

#heatTimeline .heat-day.rest::after {
  content: "LOCK";
  font-size: 9px;
  line-height: 1;
}

#heatTimeline .heat-day.today {
  border-color: #9aa8bd !important;
  box-shadow: inset 0 0 0 1px #9aa8bd;
}

#heatTimeline .heat-day.today::after {
  content: "HOY";
  color: #526080;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

#heatTimeline .heat-day:nth-child(n+8)::after {
  content: "LOCK";
  font-size: 9px;
}

#heatProgressMetrics {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 26px !important;
  margin-top: 10px !important;
}

#heatAlertsSection {
  margin-top: 16px !important;
}

#alertsList .alert-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  margin: 0 !important;
  padding: 10px 16px !important;
  border: 1px solid var(--heat-border) !important;
  border-left: 0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--heat-copy) !important;
}

#alertsList .alert-item::before {
  content: "!";
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff8e8;
  color: #f2ad00;
  font-size: 20px;
  font-weight: 950;
}

#alertsList .alert-title {
  color: var(--heat-navy);
  font-weight: 950;
}

@media (min-width: 900px) {
  body.ara-athlete-shell-ready:not(.ara-athlete-no-sidebar) #topbarMount {
    padding-left: 240px;
  }

  body.ara-athlete-shell-ready:not(.ara-athlete-no-sidebar) > #heatContent.container {
    width: min(1128px, calc(100vw - 316px));
    margin-left: calc(240px + ((100vw - 240px - min(1128px, calc(100vw - 316px))) / 2)) !important;
    margin-right: auto !important;
  }

  body.ara-athlete-shell-ready:not(.ara-athlete-no-sidebar) .ara-athlete-desktop-sidebar {
    width: 240px !important;
    background: rgba(255,255,255,.92) !important;
    border-right: 1px solid rgba(15,23,42,.10) !important;
    box-shadow: 18px 0 55px rgba(20,37,72,.07) !important;
  }
}

@media (max-width: 899px) {
  body[data-theme="light"] #topbarMount {
    padding: 14px 22px 0 !important;
    border-bottom: 0;
    background: transparent;
  }

  #heatContent.container {
    width: min(100% - 44px, 780px);
    padding-top: 28px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  #heatContent .page-header::before {
    display: none;
  }

  #heatContent .page-header {
    margin-bottom: 18px;
  }

  #heatContent .page-header .h1::after {
    font-size: 38px;
  }

  #heatContent .page-header .subtitle {
    font-size: 18px;
    line-height: 1.42;
  }

  #heatTodayStatus {
    min-height: 228px;
    padding: 92px 24px 24px 132px !important;
    border-radius: 18px !important;
  }

  #heatTodayStatus::before {
    left: 24px;
    top: 53%;
  }

  #heatTodayStatus::after {
    left: 41px;
    top: 53%;
  }

  #heatTodayStatus .h3 {
    font-size: 25px !important;
  }

  #heatTodayStatus p {
    font-size: 19px;
  }

  #heatTodayStatus .small.muted {
    font-size: 16px;
  }
}

@media (max-width: 899px) {
  #heatContent .action-buttons {
    grid-template-columns: 1.05fr 1fr 1fr !important;
    gap: 18px !important;
  }

  #heatContent .action-btn {
    grid-template-columns: 54px 1fr;
    min-height: 102px;
    padding: 18px 20px !important;
  }

  #btnMorning::after,
  #btnTraining::after,
  #btnPassiveHeat::after {
    display: none;
  }
}

/* CTA button polish: make the quick actions read unmistakably as buttons */
#heatContent .action-buttons .action-btn {
  position: relative;
  overflow: hidden;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-height: 86px;
  padding: 16px 22px !important;
  border-radius: 16px !important;
  cursor: pointer;
  user-select: none;
  transform: translateY(0);
}

#heatContent .action-buttons .action-btn::before,
#heatContent .action-buttons .action-btn::after {
  content: none !important;
  display: none !important;
}

#heatContent .action-buttons .action-btn .heat-action-icon {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid !important;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 10px 22px rgba(15,23,42,.12);
}

#heatContent .action-buttons .action-btn .heat-action-icon::before {
  content: none !important;
}

#heatContent .action-buttons .action-btn .heat-action-icon svg {
  display: block !important;
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

#heatContent .action-buttons .action-btn .heat-action-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

#heatContent .action-buttons .action-btn .heat-action-copy strong {
  color: var(--heat-navy);
  font-size: 17px;
  line-height: 1.1;
  font-weight: 950;
}

#heatContent .action-buttons .action-btn .heat-action-copy small {
  color: #425072;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 750;
}

#heatContent .action-buttons .action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(20, 37, 72, .14) !important;
}

#heatContent .action-buttons .action-btn:active {
  transform: translateY(0) scale(.99);
}

#heatContent .action-buttons .action-btn:focus-visible {
  outline: 3px solid rgba(242, 183, 5, .35);
  outline-offset: 3px;
}

#heatContent .action-buttons #btnMorning {
  background: #fff !important;
  border: 1px solid #dce5f1 !important;
  box-shadow: 0 12px 26px rgba(20, 37, 72, .08) !important;
}

#heatContent .action-buttons #btnMorning .heat-action-icon {
  background: linear-gradient(135deg, #38c98a, #25a96a) !important;
  color: #fff !important;
}

#heatContent .action-buttons #btnTraining,
#heatContent .action-buttons #btnPassiveHeat {
  border: 1px solid #e8aa00 !important;
  background: linear-gradient(135deg, #ffd23d 0%, #f4b000 100%) !important;
  box-shadow: 0 14px 28px rgba(226, 160, 0, .24), inset 0 1px 0 rgba(255,255,255,.48) !important;
}

#heatContent .action-buttons #btnTraining .heat-action-icon,
#heatContent .action-buttons #btnPassiveHeat .heat-action-icon {
  background: rgba(255, 255, 255, .58) !important;
  color: #071b46 !important;
}

#heatContent .action-buttons #btnTraining .heat-action-copy small,
#heatContent .action-buttons #btnPassiveHeat .heat-action-copy small {
  color: #17264a;
}

@media (max-width: 899px) {
  #heatContent .action-buttons .action-btn {
    min-height: 96px;
    padding: 16px 18px !important;
  }

  #heatContent .action-buttons .action-btn .heat-action-copy strong {
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  #heatContent .action-buttons {
    grid-template-columns: 1fr !important;
  }

  #heatContent .action-buttons .action-btn {
    min-height: 78px;
  }
}

/* Dark redesign for athlete_heat_acclimation.html */
body[data-theme="dark"] {
  --heat-navy: #f5f7fb;
  --heat-copy: #cfd6e4;
  --heat-soft: #0d1724;
  --heat-border: rgba(148, 163, 184, .22);
  --heat-card-shadow: 0 24px 60px rgba(0, 0, 0, .34);
  background:
    radial-gradient(circle at 18% 8%, rgba(25, 99, 182, .16), rgba(25, 99, 182, 0) 32%),
    radial-gradient(circle at 88% 94%, rgba(242, 183, 5, .10), rgba(242, 183, 5, 0) 24%),
    linear-gradient(180deg, #030813 0%, #071421 48%, #050b13 100%) !important;
  color: #f5f7fb;
}

body[data-theme="dark"] #topbarMount {
  max-width: none;
  width: 100%;
  padding: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  background: rgba(3, 8, 19, .78);
  backdrop-filter: blur(18px);
}

body[data-theme="dark"] #topbarMount .topbar {
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 72px;
}

body[data-theme="dark"] #topbarMount .topbarInner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
}

body[data-theme="dark"] #topbarMount .topbarSearch input,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background: rgba(3, 10, 22, .72) !important;
  border-color: rgba(148, 163, 184, .22) !important;
  color: #f5f7fb !important;
}

body[data-theme="dark"] #topbarMount .iconBtn {
  background: rgba(9, 18, 31, .74) !important;
  border-color: rgba(148, 163, 184, .22) !important;
  color: #f5f7fb !important;
}

body[data-theme="dark"] #heatContent .page-header::before {
  color: #bac5d8;
}

/* Hide duplicate page labels marked by the user */
#topbarMount .topbarCenter,
#heatContent .page-header::before {
  display: none !important;
}

#heatContent .page-header {
  margin-top: 0 !important;
}

body[data-theme="dark"] #heatContent .page-header .h1::before {
  color: #ffc400;
  text-shadow: 0 0 18px rgba(255, 196, 0, .20);
}

body[data-theme="dark"] #heatContent .page-header .h1::after {
  color: #f5f7fb;
  text-shadow: 0 12px 34px rgba(0, 0, 0, .46);
}

body[data-theme="dark"] #heatContent .page-header .subtitle {
  color: #cfd6e4;
}

body[data-theme="dark"] #heatTodayStatus,
body[data-theme="dark"] #heatContent > .card,
body[data-theme="dark"] #heatProgress,
body[data-theme="dark"] #heatAlertsSection .card {
  background: linear-gradient(145deg, rgba(12, 24, 39, .92), rgba(5, 13, 24, .94)) !important;
  border-color: rgba(148, 163, 184, .20) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--heat-card-shadow) !important;
}

body[data-theme="dark"] #heatTodayStatus {
  border-left-color: #25c778 !important;
  background: linear-gradient(145deg, rgba(11, 24, 39, .95), rgba(5, 13, 24, .96)) !important;
}

body[data-theme="dark"] #heatTodayStatus::before {
  background: rgba(37, 199, 120, .14);
  box-shadow: 0 0 44px rgba(37, 199, 120, .24);
}

body[data-theme="dark"] #heatTodayStatus::after {
  background: linear-gradient(135deg, #42d98f, #20a969);
  box-shadow: 0 0 34px rgba(37, 199, 120, .44);
}

body[data-theme="dark"] #heatTodayStatus .heat-risk-badge {
  background: rgba(37, 199, 120, .16) !important;
  color: #38d889 !important;
}

body[data-theme="dark"] #heatTodayStatus .h3 {
  color: #f5f7fb !important;
}

body[data-theme="dark"] #heatTodayStatus p,
body[data-theme="dark"] #heatTodayStatus .small.muted {
  color: #cfd6e4 !important;
}

body[data-theme="dark"] #heatContent .action-buttons #btnMorning {
  background: linear-gradient(145deg, rgba(12, 24, 39, .92), rgba(5, 13, 24, .94)) !important;
  border-color: rgba(148, 163, 184, .22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 38px rgba(0,0,0,.28) !important;
}

body[data-theme="dark"] #heatContent .action-buttons #btnMorning .heat-action-copy strong,
body[data-theme="dark"] #heatContent .action-buttons #btnMorning .heat-action-copy small {
  color: #f5f7fb;
}

body[data-theme="dark"] #heatContent .action-buttons #btnTraining,
body[data-theme="dark"] #heatContent .action-buttons #btnPassiveHeat {
  border-color: rgba(255, 196, 0, .82) !important;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 231, 128, .28), rgba(255, 231, 128, 0) 30%),
    linear-gradient(135deg, #ffd23d 0%, #f4b000 100%) !important;
  box-shadow: 0 0 0 1px rgba(255, 196, 0, .18), 0 18px 40px rgba(242, 176, 0, .23), inset 0 1px 0 rgba(255,255,255,.58) !important;
}

body[data-theme="dark"] #heatContent .action-buttons .action-btn:hover {
  box-shadow: 0 22px 46px rgba(0, 0, 0, .36), 0 0 32px rgba(255, 196, 0, .14) !important;
}

body[data-theme="dark"] #heatContent > .card > .h3,
body[data-theme="dark"] #heatProgress > .h2,
body[data-theme="dark"] #heatAlertsSection .h3 {
  color: #f5f7fb !important;
}

body[data-theme="dark"] #heatContent > .card > .h3::before,
body[data-theme="dark"] #heatProgress > .h2::before {
  background: rgba(59, 130, 246, .16);
  border-color: rgba(96, 165, 250, .32);
  color: #70a7ff;
}

body[data-theme="dark"] #heatContent .heat-metric,
body[data-theme="dark"] #heatTimeline .heat-day,
body[data-theme="dark"] #alertsList .alert-item {
  background: linear-gradient(145deg, rgba(12, 24, 39, .86), rgba(5, 13, 24, .90)) !important;
  border-color: rgba(148, 163, 184, .20) !important;
  color: #f5f7fb !important;
}

body[data-theme="dark"] #heatContent .heat-metric-value,
body[data-theme="dark"] #alertsList .alert-title {
  color: #f5f7fb !important;
}

body[data-theme="dark"] #heatContent .heat-metric-label,
body[data-theme="dark"] #alertsList .alert-item {
  color: #c4ccda !important;
}

body[data-theme="dark"] #heatMetrics .heat-metric:nth-child(1)::before { background: rgba(59,130,246,.25); color: #76a7ff; }
body[data-theme="dark"] #heatMetrics .heat-metric:nth-child(2)::before { background: rgba(239,61,104,.26); color: #ff6387; }
body[data-theme="dark"] #heatMetrics .heat-metric:nth-child(3)::before { background: rgba(244,175,0,.22); color: #ffc329; }
body[data-theme="dark"] #heatMetrics .heat-metric:nth-child(4)::before { background: rgba(118,87,216,.28); color: #a78bfa; }
body[data-theme="dark"] #heatProgressMetrics .heat-metric:nth-child(1)::before { background: rgba(39,174,96,.18); color: #51d987; }
body[data-theme="dark"] #heatProgressMetrics .heat-metric:nth-child(2)::before { background: rgba(239,61,104,.26); color: #ff6387; }
body[data-theme="dark"] #heatProgressMetrics .heat-metric:nth-child(3)::before { background: rgba(244,175,0,.22); color: #ffc329; }

body[data-theme="dark"] #heatTimeline .heat-day.logged {
  background: linear-gradient(145deg, rgba(14, 79, 51, .72), rgba(6, 33, 27, .88)) !important;
  border-color: rgba(37, 199, 120, .66) !important;
  color: #40d98f !important;
}

body[data-theme="dark"] #heatTimeline .heat-day.today {
  background: linear-gradient(145deg, rgba(20, 38, 62, .94), rgba(7, 16, 30, .96)) !important;
  border-color: rgba(80, 151, 255, .82) !important;
  box-shadow: inset 0 0 0 1px rgba(80, 151, 255, .52), 0 0 24px rgba(80, 151, 255, .14);
}

body[data-theme="dark"] #heatTimeline .heat-day.rest {
  color: #aab4c5 !important;
}

body[data-theme="dark"] #heatAlertsSection .h3::before,
body[data-theme="dark"] #alertsList .alert-item::before {
  background: rgba(255, 196, 0, .14);
  border-color: rgba(255, 196, 0, .32);
  color: #ffc400;
}

@media (min-width: 900px) {
  body[data-theme="dark"].ara-athlete-shell-ready:not(.ara-athlete-no-sidebar) .ara-athlete-desktop-sidebar {
    background: rgba(3, 8, 19, .82) !important;
    border-right: 1px solid rgba(148, 163, 184, .18) !important;
    box-shadow: 18px 0 55px rgba(0, 0, 0, .22) !important;
  }
}

@media (max-width: 899px) {
  body[data-theme="dark"] #topbarMount {
    background: transparent;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
  }

  body[data-theme="dark"] .ara-athlete-mobile-bottom {
    background: rgba(6, 15, 27, .92) !important;
    border-top-color: rgba(148, 163, 184, .20) !important;
    box-shadow: 0 -16px 42px rgba(0, 0, 0, .34) !important;
  }

  #heatContent .page-header > .h1 {
    color: transparent !important;
    font-size: 0 !important;
    overflow: hidden;
  }

  body[data-theme="dark"] .ara-athlete-mobile-bottom .mobileNavItem.active,
  body[data-theme="dark"] .ara-athlete-mobile-bottom .mobileNavItem[aria-expanded="true"] {
    background: linear-gradient(135deg, #ffd23d, #f4b000) !important;
    color: #06101d !important;
    box-shadow: 0 14px 28px rgba(242, 176, 0, .24) !important;
  }
}
