/* ============================================================
   TDEE CALCULATOR — tdee-calculator.css
   Responsive glassmorphism styles for Total Daily Energy Expenditure
   Toolspot by Tradesala
   ============================================================ */

.container {
  --tool-red: #f97316;
  --tool-red-soft: rgba(249, 115, 22, 0.12);
}

.print-only-header {
  display: none;
}


/* ── Two-Column Layout Override ── */
.tool-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Hero KPI Cards Strip ── */
.tdee-hero-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.hero-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 16px 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hero-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
}

.bmr-card::before  { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.tdee-card::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.goal-card::before { background: linear-gradient(90deg, #10b981, #059669); }

.hero-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
  display: block;
}

.hero-val {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  transition: color 0.3s ease;
}

.bmr-card .hero-val  { color: #60a5fa; }
.tdee-card .hero-val { color: #f97316; }
.goal-card .hero-val { color: #10b981; }

.hero-sub {
  font-size: 11px;
  color: var(--text-3);
  margin: 0;
  display: block;
}

/* Light Mode Overrides for KPI */
body.light .hero-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .hero-card:hover {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

body.light .bmr-card .hero-val  { color: #2563eb; }
body.light .tdee-card .hero-val { color: #ea580c; }
body.light .goal-card .hero-val { color: #16a34a; }

/* ── MODE, SEX & MACRO TOGGLES (Premium Glassmorphic) ── */
.mode-toggle {
  position: relative;
  display: flex !important; /* Override standard grid layout */
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.mode-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.06) 100%);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 8px;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), background 0.28s, border-color 0.28s;
  z-index: 0;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Unit Toggle (2 choices) */
#unit-toggle.mode-toggle::before {
  width: calc(50% - 6px);
}
#unit-toggle.mode-toggle.active-metric::before {
  transform: translateX(0);
}
#unit-toggle.mode-toggle.active-imperial::before {
  transform: translateX(calc(100% + 4px));
}

/* Sex Toggle (2 choices) */
#sex-toggle.mode-toggle::before {
  width: calc(50% - 6px);
}
#sex-toggle.mode-toggle.active-male::before {
  transform: translateX(0);
}
#sex-toggle.mode-toggle.active-female::before {
  transform: translateX(calc(100% + 4px));
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.06) 100%);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Macro Toggle (3 choices) */
#macro-toggle.mode-toggle::before {
  width: calc(33.333% - 6px);
}
#macro-toggle.mode-toggle.active-standard::before {
  transform: translateX(0);
}
#macro-toggle.mode-toggle.active-highprotein::before {
  transform: translateX(calc(100% + 4px));
}
#macro-toggle.mode-toggle.active-keto::before {
  transform: translateX(calc(200% + 8px));
}

.mode-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  background: transparent !important;
  border: none;
  padding: 10px 16px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: none !important;
  transition: color 0.28s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.mode-btn.active {
  color: #fb923c !important; /* Orange active color */
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
  background: transparent !important;
  box-shadow: none !important;
}

#sex-toggle.active-female .mode-btn.active {
  color: #f472b6 !important; /* Pink active color */
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.mode-btn:active {
  transform: scale(0.97);
}

/* Light mode overrides for toggles */
body.light .mode-toggle {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .mode-toggle::before {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.12) 0%, rgba(234, 88, 12, 0.04) 100%);
  border-color: rgba(234, 88, 12, 0.25);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

body.light #sex-toggle.mode-toggle.active-female::before {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(236, 72, 153, 0.04) 100%);
  border-color: rgba(236, 72, 153, 0.25);
}

body.light .mode-btn {
  color: #556b82;
}

body.light .mode-btn:hover {
  color: #0f172a;
}

body.light .mode-btn.active {
  color: #ea580c !important;
  text-shadow: none;
}

body.light #sex-toggle.active-female .mode-btn.active {
  color: #db2777 !important;
}

/* Mobile stacking */
@media (max-width: 640px) {
  .mode-toggle {
    flex-direction: column !important;
    align-items: stretch;
  }
  .mode-toggle::before {
    display: none !important;
  }
  .mode-btn.active {
    background: var(--tool-red) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2) !important;
  }
}

/* ── Premium Compact Input Boxes inside Input Headers ── */
.input-header .inp-box {
  width: 96px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-header .inp-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 8px rgba(249, 115, 22, 0.1);
}

.input-header .inp-box:focus-within {
  background: rgba(249, 115, 22, 0.05) !important;
  border-color: rgba(249, 115, 22, 0.5) !important;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1), 0 0 12px rgba(249, 115, 22, 0.25) !important;
}

.input-header .inp-box input {
  padding: 4px 6px 4px 10px;
  text-align: right;
  font-size: 13.5px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  letter-spacing: -0.2px;
  transition: color 0.2s;
}

.input-header .inp-box .inp-suf {
  padding-right: 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  transition: color 0.2s;
}

.input-header .inp-box:focus-within .inp-suf {
  color: #fdba74;
}

/* Light mode overrides */
body.light .input-header .inp-box {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.light .input-header .inp-box:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(234, 88, 12, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 8px rgba(234, 88, 12, 0.15);
}

body.light .input-header .inp-box:focus-within {
  background: rgba(234, 88, 12, 0.03) !important;
  border-color: rgba(234, 88, 12, 0.55) !important;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05), 0 0 10px rgba(234, 88, 12, 0.2) !important;
}

body.light .input-header .inp-box:focus-within .inp-suf {
  color: #ea580c;
}

/* ── Physical Activity Toggle ── */
.activity-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-toggle-btn {
  width: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text-2);
}

.activity-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.activity-toggle-btn.active {
  background: var(--tool-red-soft);
  border-color: rgba(249, 115, 22, 0.35);
  color: var(--text);
}

.activity-title {
  font-size: 13px;
  font-weight: 700;
}

.activity-desc {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
  line-height: 1.35;
}

.activity-multiplier {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  padding: 4px 8px;
  border-radius: 8px;
}

body.light .activity-toggle-btn {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.05);
  color: #475569;
}

body.light .activity-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light .activity-toggle-btn.active {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.25);
  color: #0f172a;
}

/* ── Goal Presets Rows ── */
.goal-btn-group {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}

.goal-preset-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.goal-preset-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.goal-preset-btn.active {
  background: var(--tool-red-soft);
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.15);
}

.goal-preset-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
}

.goal-preset-subtitle {
  font-size: 10px;
  color: var(--text-3);
}

.goal-preset-btn.active .goal-preset-title {
  color: #f97316;
}

.goal-preset-btn.active .goal-preset-subtitle {
  color: #fdba74;
}

body.light .goal-preset-btn {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .goal-preset-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light .goal-preset-btn.active {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.25);
}

body.light .goal-preset-btn.active .goal-preset-title {
  color: #c2410c;
}

body.light .goal-preset-btn.active .goal-preset-subtitle {
  color: #ea580c;
}

@media (max-width: 640px) {
  .tdee-hero-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .goal-btn-group {
    grid-template-columns: repeat(2, 1fr);
  }
  .goal-preset-btn:last-child {
    grid-column: span 2;
  }
}

/* ── Weight Projection Card ── */
.projection-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px 20px;
}

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

.proj-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
}

.proj-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.proj-badge.cut {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.proj-badge.maintain {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.proj-badge.bulk {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.proj-val {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.proj-unit {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.proj-desc {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.45;
}

body.light .projection-card {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .proj-badge.cut {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.15);
}

body.light .proj-badge.maintain {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.15);
}

body.light .proj-badge.bulk {
  background: rgba(5, 150, 105, 0.08);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.15);
}

/* ── Formula Comparison Table ── */
.comparison-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.formula-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.formula-comparison-table th {
  padding: 12px 16px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  background: rgba(255, 255, 255, 0.01);
}

.formula-comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.formula-comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.formula-comparison-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.formula-comparison-table tr.active td {
  color: var(--text);
  background: rgba(249, 115, 22, 0.06) !important; /* Premium orange highlight background */
  font-weight: 700;
}

.formula-comparison-table tr.active td strong {
  color: #ff9f43; /* Highlight active name in orange */
}

/* Light mode overrides */
body.light .comparison-table-wrap {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
}

body.light .formula-comparison-table th {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
  background: rgba(0, 0, 0, 0.01);
}

body.light .formula-comparison-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #334155;
}

body.light .formula-comparison-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

body.light .formula-comparison-table tr.active td {
  color: #c2410c;
  background: rgba(234, 88, 12, 0.06) !important; /* Premium orange highlight in light mode */
}

body.light .formula-comparison-table tr.active td strong {
  color: #ea580c;
}

/* ── Macro Donut Chart & Legend ── */
.macro-donut circle {
  transition: stroke-dashoffset 0.35s ease, stroke-dasharray 0.35s ease;
}

.macro-legend-item {
  transition: all 0.2s ease;
}

.macro-legend-item:hover {
  transform: translateX(4px);
}

body.light .macro-legend-item span {
  color: #0f172a;
}

body.light .macro-legend-item span[id$="-pct"] {
  color: #64748b;
}

/* ── History Table Control & Styling ── */
.history-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.history-average-card {
  font-size: 13px;
  color: var(--text-2);
}

.history-average-card b {
  color: var(--text);
}

body.light .history-average-card {
  color: #475569;
}

body.light .history-average-card b {
  color: #0f172a;
}

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

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

body.light .table-wrap {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.history-table th {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.history-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  vertical-align: middle;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.history-table td strong {
  color: var(--text);
}

.cell-val {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6.5px;
}

.cell-val span {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

body.light .cell-val span {
  color: #64748b;
}

.delete-entry-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.delete-entry-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

body.light .history-table th {
  background: rgba(0, 0, 0, 0.01);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

body.light .history-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #475569;
}

body.light .history-table td strong {
  color: #0f172a;
}

body.light .delete-entry-btn {
  color: #94a3b8;
}

body.light .delete-entry-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

/* ── MOBILE CARD COLLAPSE FOR LOG TABLE ── */
@media (max-width: 768px) {
  .table-wrap {
    background: transparent !important;
    border: none !important;
    overflow-x: visible !important;
  }
  
  .history-table, 
  .history-table tbody, 
  .history-table tr, 
  .history-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  .history-table thead {
    display: none !important;
  }
  
  .history-table tr {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  body.light .history-table tr {
    background: rgba(0, 0, 0, 0.015) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
  }
  
  .history-table td {
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: right !important;
  }
  
  .history-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    margin-right: 12px;
  }
  
  .cell-val {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    text-align: right !important;
    gap: 2px !important;
  }
}

/* ── PRINTING LAYOUTS (PDF EXPORTS) ── */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .bg-scene, 
  nav, 
  footer, 
  #ts-header,
  #ts-footer,
  #ts-cookie,
  #ts-share,
  #ts-toast,
  .cookie-banner, 
  .share-pill, 
  #toast-container, 
  .tool-left, 
  .history-actions, 
  .delete-entry-btn,
  .action-column,
  #tool-faq,
  .explanatory-content,
  .breadcrumb,
  .tool-header,
  #add-log-btn,
  .history-log-panel .panel-title,
  .history-table th:last-child,
  .history-table td:last-child,
  #tool-disclaimer {
    display: none !important;
  }
  
  /* Show print-only header */
  .print-only-header {
    display: block !important;
    margin-bottom: 10px;
    width: 100% !important;
  }
  
  .print-brand {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 6px;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 4px;
    width: 100% !important;
  }
  
  .print-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #000000 !important;
  }
  
  .print-logo-text span {
    color: #f97316 !important;
  }
  
  .print-report-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555555 !important;
    letter-spacing: 0.5px;
  }
  
  .print-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #000000 !important;
    margin: 4px 0 6px;
    letter-spacing: -0.5px;
  }
  
  .print-meta-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px 12px !important;
    font-size: 10.5px;
    color: #111111 !important;
    background: #f8f9fa !important;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 10px;
    width: 100% !important;
  }
  
  .print-divider {
    height: 1px;
    background: #e9ecef;
    margin-bottom: 10px;
  }

  .container {
    max-width: 100% !important;
    padding: 12px !important;
    margin: 0 auto !important;
  }
  
  .tool-layout {
    display: block !important;
    width: 100% !important;
  }
  
  .tool-right {
    width: 100% !important;
  }
  
  .panel {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
  }

  .panel-title {
    color: #000000 !important;
    font-size: 11pt !important;
    font-weight: 800 !important;
    margin-bottom: 6px !important;
    text-align: center !important;
    display: block !important;
  }

  .title-line {
    display: none !important;
  }

  /* Metric KPI Cards in Print */
  .tdee-hero-strip {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }
  
  .hero-card {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-top: 4px solid #cccccc !important;
    border-radius: 12px !important;
    padding: 14px !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  
  .bmr-card  { border-top-color: #3b82f6 !important; }
  .tdee-card { border-top-color: #f97316 !important; }
  .goal-card { border-top-color: #10b981 !important; }

  .hero-val {
    color: #000000 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
  }
  
  .hero-label {
    color: #555555 !important;
    font-size: 9px !important;
  }
  
  .hero-sub {
    color: #555555 !important;
    font-size: 10px !important;
  }

  .goal-btn-group,
  .mode-toggle {
    display: none !important;
  }

  /* Weight Projection Box in Print */
  .projection-card {
    border: 1px solid #dee2e6 !important;
    background: #f8f9fa !important;
    border-left: 6px solid #f97316 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    page-break-inside: avoid;
  }

  .proj-label {
    color: #555555 !important;
  }

  .proj-val {
    color: #000000 !important;
    font-size: 20px !important;
  }

  .proj-unit {
    color: #555555 !important;
  }

  .proj-desc {
    color: #222222 !important;
  }

  /* Macros Panel in Print */
  .macro-display-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 24px !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    page-break-inside: avoid;
  }

  .macro-legend-list {
    flex: 2 !important;
  }

  .macro-legend-item {
    border-left-width: 4px !important;
    padding-left: 10px !important;
  }

  .macro-legend-item span {
    color: #000000 !important;
  }

  .macro-legend-item span[id$="-pct"] {
    color: #555555 !important;
  }

  /* Comparison Grid in Print */
  .comparison-table-wrap {
    border: 1px solid #dee2e6 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    page-break-inside: avoid;
    overflow: hidden;
  }

  .formula-comparison-table {
    border: none !important;
    background: transparent !important;
  }

  .formula-comparison-table th {
    background: #f1f3f5 !important;
    color: #000000 !important;
    border-bottom: 2px solid #dee2e6 !important;
  }

  .formula-comparison-table td {
    color: #222222 !important;
    border-bottom: 1px solid #dee2e6 !important;
  }

  .formula-comparison-table tr.active td {
    background: #f8f9fa !important;
    color: #000000 !important;
  }

  .formula-comparison-table td strong {
    color: #000000 !important;
  }

  /* History Table print formatting */
  .history-log-panel {
    margin-top: 24px !important;
    page-break-before: always !important;
    break-before: page !important;
  }
  
  .history-average-card {
    color: #000000 !important;
    font-weight: 600 !important;
  }

  .history-average-card b {
    color: #000000 !important;
    font-weight: 800 !important;
  }

  .table-wrap {
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
  }

  .history-table th {
    background: #f1f3f5 !important;
    color: #000000 !important;
    border-bottom: 2px solid #dee2e6 !important;
  }

  .history-table td {
    color: #222222 !important;
    border-bottom: 1px solid #dee2e6 !important;
  }

  .history-table td strong {
    color: #000000 !important;
  }
}
