/* ==========================================================================
   JUBAROO HEALTH & FITNESS TOOLS SUITE — STYLESHEET
   Aesthetic: Emerald / Teal Vitality, Glassmorphism, Responsive & Accessible
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --health-primary: #10b981;
    --health-primary-hover: #059669;
    --health-primary-glow: rgba(16, 185, 129, 0.28);
    --health-secondary: #06b6d4;
    --health-accent: #14b8a6;
    --health-emerald-dark: #064e3b;
    --health-emerald-light: #d1fae5;

    /* Base Surfaces */
    --health-void: #060b11;
    --health-surface: rgba(13, 22, 33, 0.9);
    --health-card: rgba(16, 28, 42, 0.82);
    --health-card-hover: rgba(22, 38, 56, 0.95);
    --health-border: rgba(16, 185, 129, 0.18);
    --health-border-strong: rgba(16, 185, 129, 0.42);

    /* Text */
    --health-text: #f0fdf4;
    --health-text-muted: #94a3b8;
    --health-text-dim: #64748b;

    /* Shadows & Radii */
    --health-radius-sm: 6px;
    --health-radius-md: 12px;
    --health-radius-lg: 18px;
    --health-radius-full: 9999px;
    --health-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    --health-font: 'DM Sans', system-ui, sans-serif;
    --health-display: 'Outfit', system-ui, sans-serif;
    --health-mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="light"],
body.theme-light {
    --health-void: #f0fdf4;
    --health-surface: rgba(255, 255, 255, 0.94);
    --health-card: rgba(255, 255, 255, 0.88);
    --health-card-hover: #ffffff;
    --health-border: rgba(16, 185, 129, 0.28);
    --health-border-strong: rgba(16, 185, 129, 0.55);
    --health-text: #0f172a;
    --health-text-muted: #475569;
    --health-text-dim: #64748b;
}

/* Base Body Shell */
body.health-tool-page {
    min-height: 100vh;
    margin: 0;
    font-family: var(--health-font);
    color: var(--health-text);
    background: radial-gradient(ellipse 70% 45% at 50% -5%, rgba(16, 185, 129, 0.18), transparent 60%),
                radial-gradient(ellipse 45% 35% at 95% 30%, rgba(6, 182, 212, 0.1), transparent 55%),
                var(--health-void);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.health-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
    width: 100%;
    box-sizing: border-box;
}

/* Breadcrumbs & Navigation (Pill Style) */
.health-back-link,
a.health-back-link,
body.health-tool-page .cat-back,
body.health-tool-page a.cat-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    margin: 0 0 1.25rem 0 !important;
    padding: 0.45rem 1.15rem !important;
    border-radius: 999px !important;
    border: 1px solid var(--health-border-strong, rgba(16, 185, 129, 0.42)) !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: var(--health-primary, #10b981) !important;
    font-family: var(--health-font, inherit) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    width: fit-content !important;
    cursor: pointer !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.health-back-link:hover,
a.health-back-link:hover,
body.health-tool-page .cat-back:hover,
body.health-tool-page a.cat-back:hover {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #ffffff !important;
    border-color: var(--health-primary, #10b981) !important;
    box-shadow: 0 0 14px var(--health-primary-glow, rgba(16, 185, 129, 0.35)) !important;
    transform: translateX(-3px) !important;
}

[data-theme="light"] .health-back-link,
[data-theme="light"] a.health-back-link,
[data-theme="light"] body.health-tool-page .cat-back,
[data-theme="light"] body.health-tool-page a.cat-back {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #059669 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .health-back-link:hover,
[data-theme="light"] a.health-back-link:hover,
[data-theme="light"] body.health-tool-page .cat-back:hover,
[data-theme="light"] body.health-tool-page a.cat-back:hover {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #047857 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
    transform: translateX(-3px) !important;
}

/* Header & Intro */
.health-header {
    margin-bottom: 2rem;
}

.health-title {
    font-family: var(--health-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--health-text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.health-title-badge {
    font-family: var(--health-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--health-primary);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--health-border-strong);
    padding: 0.25rem 0.65rem;
    border-radius: var(--health-radius-full);
}

.health-subtitle {
    font-size: 1.05rem;
    color: var(--health-text-muted);
    max-width: 820px;
    margin: 0;
    line-height: 1.6;
}

/* Two-Column Calculator Grid */
.health-calc-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .health-calc-layout {
        grid-template-columns: 1fr;
    }
}

/* Calculator Form Card */
.health-card {
    background: var(--health-card);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-lg);
    box-shadow: var(--health-shadow);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

/* Unit Tabs */
.health-unit-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid var(--health-border);
}

.health-unit-tab {
    flex: 1;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    color: var(--health-text-muted);
    font-family: var(--health-display);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.health-unit-tab:hover {
    color: var(--health-text);
    background: rgba(255, 255, 255, 0.03);
}

.health-unit-tab.active {
    color: var(--health-primary);
    background: rgba(16, 185, 129, 0.08);
    border-bottom-color: var(--health-primary);
}

/* Form Body */
.health-form-body {
    padding: 1.5rem;
}

.health-form-group {
    margin-bottom: 1.25rem;
}

.health-form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--health-text);
    margin-bottom: 0.4rem;
}

.health-input-wrap {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Hide native up/down stepper arrows that overlap text and suffix */
.health-input::-webkit-inner-spin-button,
.health-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.health-input {
    width: 100%;
    padding: 0.75rem 4.5rem 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    color: var(--health-text);
    font-family: var(--health-mono);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

[data-theme="light"] .health-input,
body.theme-light .health-input {
    background: #ffffff;
    border-color: #cbd5e1;
}

.health-input:focus {
    outline: none;
    border-color: var(--health-primary);
    box-shadow: 0 0 0 3px var(--health-primary-glow);
}

.health-unit-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--health-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--health-text-dim);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

/* Specific inputs with wider text suffixes */
#water-exercise {
    padding-right: 7.25rem;
}

#deficit-maint {
    padding-right: 5.75rem;
}

.health-input-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Gender Radio Button Pills */
.health-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.health-radio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--health-text-muted);
    transition: all 0.2s ease;
    user-select: none;
}

.health-radio-btn input {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--health-border-strong);
    border-radius: 50%;
    outline: none;
    margin: 0;
    position: relative;
    cursor: pointer;
}

.health-radio-btn input:checked {
    border-color: var(--health-primary);
    background: var(--health-primary);
    box-shadow: inset 0 0 0 3px #0f172a;
}

.health-radio-btn.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--health-primary);
    color: var(--health-text);
}

/* Settings Toggle */
.health-settings-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--health-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0;
    margin-bottom: 1.25rem;
    transition: color 0.15s ease;
}

.health-settings-toggle:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.health-settings-panel {
    display: none;
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 1.15rem;
    margin-bottom: 1.25rem;
}

.health-settings-panel.open {
    display: block;
}

.health-select {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    color: var(--health-text);
    font-family: var(--health-font);
    font-size: 0.92rem;
    cursor: pointer;
    outline: none;
}

[data-theme="light"] .health-select,
body.theme-light .health-select {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Form Actions & Reset */
.health-form-actions,
.health-btn-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-light .health-form-actions,
body.theme-light .health-btn-row {
    border-top-color: rgba(0, 0, 0, 0.06);
}

.health-btn-reset,
.health-btn-clear {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    padding: 0.6rem 1.35rem !important;
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1.5px solid var(--health-border-strong, rgba(16, 185, 129, 0.45)) !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    font-family: var(--health-font, inherit) !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.health-btn-reset svg,
.health-btn-clear svg {
    width: 17px !important;
    height: 17px !important;
    stroke: var(--health-primary, #10b981) !important;
    stroke-width: 2.2 !important;
    transition: transform 0.3s ease, stroke 0.2s ease !important;
}

.health-btn-reset:hover,
.health-btn-clear:hover {
    background: rgba(16, 185, 129, 0.22) !important;
    border-color: var(--health-primary, #10b981) !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px var(--health-primary-glow, rgba(16, 185, 129, 0.45)), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1px) !important;
}

.health-btn-reset:hover svg,
.health-btn-clear:hover svg {
    stroke: #ffffff !important;
    transform: rotate(-90deg) !important;
}

/* Light Mode */
[data-theme="light"] .health-btn-reset,
[data-theme="light"] .health-btn-clear,
body.theme-light .health-btn-reset,
body.theme-light .health-btn-clear {
    background: #ffffff !important;
    border: 1.5px solid rgba(16, 185, 129, 0.55) !important;
    color: #065f46 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .health-btn-reset:hover,
[data-theme="light"] .health-btn-clear:hover,
body.theme-light .health-btn-reset:hover,
body.theme-light .health-btn-clear:hover {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: #10b981 !important;
    color: #047857 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

/* Results Panel */
.health-result-card {
    background: var(--health-card);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-lg);
    box-shadow: var(--health-shadow);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.health-result-header {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    padding: 0.9rem 1.5rem;
    font-family: var(--health-display);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.health-result-content {
    padding: 1.5rem;
}

.health-big-stat-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid var(--health-border-strong);
    border-radius: var(--health-radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.health-big-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--health-text-muted);
    font-family: var(--health-mono);
    margin-bottom: 0.35rem;
}

.health-big-stat-val {
    font-family: var(--health-display);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: var(--health-primary);
    line-height: 1.15;
}

.health-big-stat-val span {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--health-text-muted);
}

/* Data Table */
.health-table-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--health-text);
    margin: 0 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.health-table-wrap {
    overflow-x: auto;
    border-radius: var(--health-radius-md);
    border: 1px solid var(--health-border);
    margin-bottom: 1.5rem;
}

.health-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.health-table thead tr {
    background: rgba(16, 185, 129, 0.15);
}

.health-table th {
    padding: 0.75rem 1rem;
    font-family: var(--health-display);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--health-text);
    border-bottom: 1px solid var(--health-border-strong);
}

.health-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--health-border);
    color: var(--health-text-muted);
    vertical-align: middle;
}

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

.health-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.health-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.05);
}

.health-table td.table-calorie-col {
    font-family: var(--health-mono);
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--health-primary);
    text-align: right;
    white-space: nowrap;
}

.health-table th.table-calorie-col {
    text-align: right;
}

/* Activity Defs Notes Box */
.health-callout {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--health-radius-md);
    padding: 1rem 1.25rem;
    font-size: 0.84rem;
    color: var(--health-text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.health-callout strong {
    color: var(--health-text);
}

/* Goals Grid (Loss / Gain / Maintenance) */
.health-goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.health-goal-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 1rem;
    transition: all 0.2s ease;
}

.health-goal-card:hover {
    border-color: var(--health-border-strong);
    transform: translateY(-2px);
}

.health-goal-label {
    font-size: 0.8rem;
    color: var(--health-text-muted);
    text-transform: uppercase;
    font-family: var(--health-mono);
    margin-bottom: 0.25rem;
}

.health-goal-val {
    font-family: var(--health-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--health-text);
    margin-bottom: 0.25rem;
}

.health-goal-sub {
    font-size: 0.78rem;
    color: var(--health-text-dim);
}

/* Educational & FAQ Content */
.health-guide-section {
    background: var(--health-surface);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-lg);
    padding: 2.25rem;
    margin-top: 3rem;
    box-shadow: var(--health-shadow);
}

.health-guide-section h2 {
    font-family: var(--health-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--health-text);
    margin: 0 0 1rem;
}

.health-guide-section p {
    font-size: 0.95rem;
    color: var(--health-text-muted);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.health-formula-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 1.25rem;
    margin: 1.25rem 0;
    font-family: var(--health-mono);
    font-size: 0.88rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Hub Grid of Tools */
.health-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.health-tool-card {
    background: var(--health-card);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: var(--health-shadow);
}

.health-tool-card:hover {
    border-color: var(--health-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--health-primary-glow);
}

.health-tool-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.health-tool-card h3 {
    font-family: var(--health-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--health-text);
    margin: 0 0 0.5rem;
}

.health-tool-card p {
    font-size: 0.9rem;
    color: var(--health-text-muted);
    line-height: 1.55;
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.health-tool-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--health-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── BMI Visual Meter / Gauge ── */
.bmi-gauge-container {
    margin: 1.5rem 0;
}

.bmi-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-family: var(--health-mono);
    color: var(--health-text-dim);
    margin-bottom: 0.4rem;
}

.bmi-gauge-track {
    height: 14px;
    border-radius: var(--health-radius-full);
    background: linear-gradient(90deg, 
        #38bdf8 0%, #38bdf8 20%, 
        #10b981 20%, #10b981 48%, 
        #f59e0b 48%, #f59e0b 68%, 
        #ef4444 68%, #dc2626 100%
    );
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.bmi-gauge-needle {
    position: absolute;
    top: -6px;
    left: 45%;
    width: 6px;
    height: 26px;
    background: #ffffff;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7), 0 0 6px var(--health-primary);
    transform: translateX(-50%);
    transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bmi-category-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: var(--health-radius-full);
    font-family: var(--health-display);
    font-size: 0.92rem;
    font-weight: 700;
    margin-top: 0.5rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--health-primary);
    border: 1px solid currentColor;
}

/* ── TDEE Macro Breakdown Stack Bar ── */
.tdee-macro-bar-wrap {
    height: 14px;
    border-radius: var(--health-radius-full);
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    overflow: hidden;
    margin: 1.25rem 0;
    border: 1px solid var(--health-border);
}

.tdee-macro-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.macro-p { background: #10b981; } /* Protein - Emerald */
.macro-c { background: #06b6d4; } /* Carbs - Cyan */
.macro-f { background: #f59e0b; } /* Fat - Amber */

.tdee-macro-legend {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--health-text-muted);
}

.tdee-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tdee-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* ==========================================================================
   PREMIUM ENHANCEMENTS — HERO BANNERS, SLIDERS, CHARTS, & ACTIONS
   ========================================================================== */

/* ── Hero Banner with 3D Graphic ── */
.health-hero-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%),
                var(--health-card);
    border: 1px solid var(--health-border-strong);
    border-radius: var(--health-radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2.25rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.health-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--health-primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.health-hero-text {
    position: relative;
    z-index: 1;
}

.health-hero-graphic {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--health-radius-md);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--health-border);
    background: #060b10;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.health-hero-graphic:hover {
    transform: translateY(-2px);
    border-color: var(--health-primary);
}

.health-hero-graphic img,
.health-hero-graphic svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 860px) {
    .health-hero-card {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

/* ── Synchronized Range Sliders ── */
.health-slider-wrap {
    margin-top: 0.5rem;
    position: relative;
    padding: 4px 0;
}

.health-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    cursor: pointer;
    margin: 4px 0;
    touch-action: pan-y;
}

[data-theme="light"] .health-slider,
body.theme-light .health-slider {
    background: rgba(0, 0, 0, 0.08);
}

.health-slider:hover {
    filter: brightness(1.1);
}

.health-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--health-primary);
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px var(--health-primary-glow);
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.health-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.7);
}

.health-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--health-primary);
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px var(--health-primary-glow);
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.health-slider::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.7);
}

.health-slider::-moz-range-track {
    background: transparent;
    border: none;
}

.health-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-family: var(--health-mono);
    color: var(--health-text-dim);
    margin-top: 0.35rem;
    user-select: none;
}

/* ── Interactive Action Bar (Copy & Print) ── */
.health-action-bar {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--health-border);
}

.health-btn-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    color: var(--health-text-muted);
    font-family: var(--health-font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.health-btn-action:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--health-primary);
    color: var(--health-text);
    transform: translateY(-1px);
}

/* ── Floating Toast Notification ── */
.health-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0f231f;
    border: 1px solid var(--health-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--health-primary-glow);
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--health-radius-md);
    font-family: var(--health-font);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.health-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── Dynamic SVG Macro Donut Chart ── */
.tdee-donut-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.tdee-donut-svg {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.tdee-donut-circle {
    fill: none;
    stroke-width: 22;
    transition: stroke-dasharray 0.4s ease;
}

.tdee-donut-center {
    font-family: var(--health-display);
    font-weight: 800;
    fill: var(--health-text);
    text-anchor: middle;
    dominant-baseline: middle;
    transform: rotate(90deg);
    transform-origin: center;
}

/* ── Sample 4-Meal Plan Grid ── */
.meal-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.meal-plan-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 0.85rem;
    text-align: center;
}

.meal-plan-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--health-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.meal-plan-kcal {
    font-family: var(--health-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--health-text);
    margin-bottom: 0.2rem;
}

.meal-plan-protein {
    font-size: 0.75rem;
    color: var(--health-text-muted);
}

/* ── Animated Water Tank / Fill Meter ── */
.water-tank-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.water-tank-outer {
    width: 70px;
    height: 170px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--health-secondary);
    border-radius: 12px 12px 20px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.water-tank-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65%;
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
    transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.water-tank-tick {
    position: absolute;
    right: 4px;
    width: 8px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.water-stats-box {
    flex: 1;
}

/* ── 4-Stage Milestone Stepper (Calorie Deficit) ── */
.milestone-stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .milestone-stepper {
        grid-template-columns: 1fr 1fr;
    }
}

.step-card {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 0.85rem;
    position: relative;
    transition: all 0.2s ease;
}

.step-card:hover {
    border-color: var(--health-primary);
}

.step-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-family: var(--health-mono);
    font-weight: 700;
    color: var(--health-primary);
    background: rgba(16, 185, 129, 0.12);
    padding: 0.15rem 0.45rem;
    border-radius: var(--health-radius-full);
    margin-bottom: 0.35rem;
}

.step-weight {
    font-family: var(--health-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--health-text);
}

.step-date {
    font-size: 0.75rem;
    color: var(--health-text-dim);
    margin-top: 0.25rem;
}

/* ── 500-kcal Activity Burner Table ── */
.burner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.burner-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 0.85rem;
    text-align: center;
}

.burner-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.burner-activity {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--health-text);
}

.burner-time {
    font-family: var(--health-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--health-primary);
    margin-top: 0.25rem;
}

/* ==========================================================================
   WORKOUT & EXERCISE ROUTINE PLANNER STYLES
   ========================================================================== */

.workout-filter-section {
    margin-bottom: 1.75rem;
}

.workout-filter-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--health-text-dim);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Goal Selection Cards Grid */
.workout-goal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.workout-goal-card {
    background: rgba(0, 0, 0, 0.45);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--health-radius-md);
    padding: 0.95rem 1.05rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.workout-goal-card:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
}

.workout-goal-card.active {
    border: 2px solid #10b981;
    background: rgba(16, 185, 129, 0.18);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
}

.workout-goal-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    display: block;
}

.workout-goal-name {
    font-family: var(--health-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff !important;
    display: block;
    margin-bottom: 0.25rem;
}

.workout-goal-desc {
    font-size: 0.84rem;
    color: #cbd5e1 !important;
    line-height: 1.45;
    font-weight: 500;
    display: block;
}

/* Horizontal Pill Radio Options */
.workout-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.workout-pill-btn {
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    letter-spacing: 0.01em;
}

.workout-pill-btn:hover {
    border-color: #10b981;
    color: #ffffff !important;
    background: rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.workout-pill-btn.active {
    background: #10b981 !important;
    border-color: #34d399 !important;
    color: #042f2e !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    font-weight: 800 !important;
}

/* Light Mode Overrides for Filters */
[data-theme="light"] .workout-goal-card,
body.theme-light .workout-goal-card {
    background: #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .workout-goal-name,
body.theme-light .workout-goal-name {
    color: #0f172a !important;
}

[data-theme="light"] .workout-goal-desc,
body.theme-light .workout-goal-desc {
    color: #475569 !important;
}

[data-theme="light"] .workout-goal-card.active,
body.theme-light .workout-goal-card.active {
    background: #f0fdf4;
    border: 2px solid #10b981;
}

[data-theme="light"] .workout-pill-btn,
body.theme-light .workout-pill-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .workout-pill-btn:hover,
body.theme-light .workout-pill-btn:hover {
    background: #f0fdf4;
    border-color: #10b981;
    color: #065f46 !important;
}

[data-theme="light"] .workout-pill-btn.active,
body.theme-light .workout-pill-btn.active {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #042f2e !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
    font-weight: 800 !important;
}

/* Day Selector Navigation Tabs */
.workout-day-nav {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--health-border);
    scrollbar-width: thin;
}

.workout-day-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    font-family: var(--health-font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.workout-day-tab:hover {
    border-color: #10b981;
    color: #ffffff !important;
    background: rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.workout-day-tab.active {
    border-color: #34d399 !important;
    background: #10b981 !important;
    color: #042f2e !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6) !important;
    font-weight: 800 !important;
}

/* Workout Overview Banner */
.workout-overview-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%),
                rgba(0, 0, 0, 0.35);
    border: 1px solid var(--health-border-strong);
    border-radius: var(--health-radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.workout-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.workout-day-title {
    font-family: var(--health-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--health-text);
    margin: 0 0 0.35rem 0;
}

.workout-day-focus {
    font-size: 0.9rem;
    color: var(--health-text-dim);
    margin: 0;
}

.workout-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--health-border);
}

.workout-stat-item {
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-sm);
    padding: 0.65rem 0.5rem;
}

.workout-stat-label {
    font-size: 0.72rem;
    color: var(--health-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.25rem;
}

.workout-stat-value {
    font-family: var(--health-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--health-primary);
}

/* Exercise Cards List */
.exercise-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.exercise-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 1.15rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.exercise-card:hover {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.04);
}

.exercise-card.completed {
    border-color: rgba(16, 185, 129, 0.6);
    background: rgba(16, 185, 129, 0.08);
    opacity: 0.85;
}

.exercise-card.completed .exercise-name {
    text-decoration: line-through;
    color: var(--health-text-dim);
}

.exercise-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.exercise-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.exercise-check {
    width: 22px;
    height: 22px;
    accent-color: var(--health-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.exercise-num {
    font-family: var(--health-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--health-primary);
    background: rgba(16, 185, 129, 0.12);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exercise-name {
    font-family: var(--health-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--health-text);
    margin: 0;
}

.exercise-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.exercise-badge {
    font-size: 0.72rem;
    font-family: var(--health-mono);
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--health-text-muted);
    border: 1px solid var(--health-border);
}

.exercise-badge.muscle {
    background: rgba(6, 182, 212, 0.1);
    color: #38bdf8;
    border-color: rgba(6, 182, 212, 0.3);
}

.exercise-badge.intensity {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Parameters Row (Sets, Reps, Rest) */
.exercise-meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--health-radius-sm);
    padding: 0.6rem 0.85rem;
    margin: 0.65rem 0;
}

.exercise-meta-item {
    display: flex;
    flex-direction: column;
}

.exercise-meta-label {
    font-size: 0.68rem;
    color: var(--health-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.exercise-meta-val {
    font-family: var(--health-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--health-text);
}

.exercise-cues {
    font-size: 0.84rem;
    color: var(--health-text-dim);
    line-height: 1.45;
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.exercise-timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.05rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
    color: #ffffff !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.exercise-timer-btn:hover {
    background: rgba(16, 185, 129, 0.28) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px var(--health-primary-glow);
    transform: translateY(-1px);
}

.exercise-timer-btn.active {
    background: #10b981 !important;
    color: #042f2e !important;
    border-color: #34d399 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6) !important;
    animation: timerPulse 1.5s infinite ease-in-out;
}

@keyframes timerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); box-shadow: 0 0 22px rgba(16, 185, 129, 0.8); }
    100% { transform: scale(1); }
}

/* ── Interactive Rest Timer Widget ── */
.workout-timer-widget {
    background: linear-gradient(135deg, rgba(8, 27, 35, 0.95) 0%, rgba(4, 11, 14, 0.98) 100%);
    border: 1.5px solid var(--health-border-strong);
    border-radius: var(--health-radius-lg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.workout-timer-widget::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--health-primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.timer-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.25rem auto;
}

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

.timer-bg-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}

.timer-progress-circle {
    fill: none;
    stroke: #10b981;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 440;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.2s linear;
}

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

.timer-display {
    font-family: var(--health-mono);
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.timer-sublabel {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--health-text-dim);
    margin-top: 0.35rem;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.timer-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.8rem;
    border-radius: 999px;
    background: #10b981 !important;
    border: 1.5px solid #34d399 !important;
    color: #042f2e !important;
    font-family: var(--health-font);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 18px var(--health-primary-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.timer-btn-primary:hover {
    background: #34d399 !important;
    transform: translateY(-1px);
    box-shadow: 0 0 25px var(--health-primary-glow);
}

.timer-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    font-family: var(--health-font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn-secondary:hover {
    border-color: #10b981 !important;
    color: #ffffff !important;
    background: rgba(16, 185, 129, 0.18) !important;
    transform: translateY(-1px);
}

.timer-presets {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timer-preset-chip {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-family: var(--health-mono);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timer-preset-chip:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.timer-preset-chip.active {
    background: #10b981 !important;
    border-color: #34d399 !important;
    color: #042f2e !important;
    font-weight: 800 !important;
}

/* ── Sticky Floating Rest Timer ── */
.workout-floating-timer {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(6, 18, 24, 0.96);
    border: 2px solid #10b981;
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: floatingSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes floatingSlideUp {
    from { transform: translate(-50%, 40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.floating-timer-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.floating-timer-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.floating-timer-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
    from { transform: scale(0.8); opacity: 0.7; }
    to { transform: scale(1.3); opacity: 1; }
}

.floating-timer-label {
    font-family: var(--health-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.floating-timer-digits {
    font-family: var(--health-mono);
    font-size: 1.5rem;
    font-weight: 800;
    color: #10b981;
}

.floating-timer-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.floating-timer-btn {
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-family: var(--health-font);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floating-timer-btn:hover {
    background: #10b981;
    color: #042f2e;
    border-color: #34d399;
}

.floating-timer-btn.close {
    background: transparent;
    border: none;
    font-size: 1.15rem;
    color: #94a3b8;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
}

.floating-timer-btn.close:hover {
    color: #ffffff;
}

/* Light mode for floating timer */
[data-theme="light"] .workout-floating-timer,
body.theme-light .workout-floating-timer {
    background: rgba(255, 255, 255, 0.97);
    border: 2px solid #10b981;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 20px rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .floating-timer-label,
body.theme-light .floating-timer-label {
    color: #334155;
}

[data-theme="light"] .floating-timer-btn,
body.theme-light .floating-timer-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Warm-Up & Cool-Down Protocols */
.workout-protocol-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--health-border);
    border-radius: var(--health-radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.protocol-title {
    font-family: var(--health-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--health-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem 0;
}

.protocol-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--health-text-dim);
    font-size: 0.86rem;
    line-height: 1.6;
}

/* Light Mode Overrides for Workout Cards & Elements */
[data-theme="light"] .workout-day-tab,
body.theme-light .workout-day-tab {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a !important;
    font-weight: 700;
}

[data-theme="light"] .workout-day-tab:hover,
body.theme-light .workout-day-tab:hover {
    border-color: #10b981;
    color: #042f2e !important;
    background: #f0fdf4;
}

[data-theme="light"] .workout-day-tab.active,
body.theme-light .workout-day-tab.active {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #042f2e !important;
    font-weight: 800 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

[data-theme="light"] .workout-overview-card,
body.theme-light .workout-overview-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%), #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .workout-day-title,
body.theme-light .workout-day-title {
    color: #0f172a;
}

[data-theme="light"] .workout-stat-item,
body.theme-light .workout-stat-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .exercise-card,
body.theme-light .exercise-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .exercise-name,
body.theme-light .exercise-name {
    color: #0f172a;
}

[data-theme="light"] .exercise-meta-row,
body.theme-light .exercise-meta-row {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .exercise-meta-val,
body.theme-light .exercise-meta-val {
    color: #0f172a;
}

[data-theme="light"] .exercise-cues,
body.theme-light .exercise-cues {
    color: #475569;
}

[data-theme="light"] .workout-protocol-card,
body.theme-light .workout-protocol-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .protocol-title,
body.theme-light .protocol-title {
    color: #0f172a;
}

[data-theme="light"] .protocol-list,
body.theme-light .protocol-list {
    color: #475569;
}

[data-theme="light"] .workout-timer-widget,
body.theme-light .workout-timer-widget {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .workout-timer-widget h3,
body.theme-light .workout-timer-widget h3,
[data-theme="light"] .timer-display,
body.theme-light .timer-display {
    color: #0f172a;
}

[data-theme="light"] .timer-sublabel,
body.theme-light .timer-sublabel {
    color: #64748b;
}

[data-theme="light"] .timer-bg-circle,
body.theme-light .timer-bg-circle {
    stroke: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .timer-btn-secondary,
body.theme-light .timer-btn-secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

[data-theme="light"] .timer-preset-chip,
body.theme-light .timer-preset-chip {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    font-weight: 700;
}

[data-theme="light"] .timer-preset-chip:hover,
body.theme-light .timer-preset-chip:hover {
    background: #f0fdf4 !important;
    border-color: #10b981 !important;
    color: #042f2e !important;
}

[data-theme="light"] .timer-preset-chip.active,
body.theme-light .timer-preset-chip.active {
    background: #10b981 !important;
    border-color: #34d399 !important;
    color: #042f2e !important;
    font-weight: 800 !important;
}

/* ── Print Media Report Styling ── */
@media print {
    body.health-tool-page {
        background: #ffffff !important;
        color: #000000 !important;
    }

    #navbar-placeholder,
    #footer-placeholder,
    .health-back-link,
    .health-btn-row,
    .health-action-bar,
    .health-slider-wrap,
    .health-settings-toggle,
    .health-toast,
    .workout-filter-section,
    .workout-day-nav,
    .workout-timer-widget,
    .exercise-timer-btn {
        display: none !important;
    }

    .health-calc-layout {
        display: block !important;
    }

    .health-card {
        display: none !important;
    }

    .health-result-card,
    .workout-overview-card,
    .exercise-card {
        box-shadow: none !important;
        border: 1.5px solid #10b981 !important;
        background: #ffffff !important;
        color: #000000 !important;
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
    }

    .workout-stat-item {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        color: #000000 !important;
    }

    .exercise-meta-row {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        color: #000000 !important;
    }

    .exercise-name,
    .workout-day-title,
    .workout-stat-value,
    .exercise-meta-val {
        color: #000000 !important;
    }

    .health-big-stat-box,
    .health-goal-card,
    .health-callout {
        background: #f8fafc !important;
        color: #000000 !important;
        border: 1px solid #cbd5e1 !important;
    }

    .health-table th {
        background: #e2e8f0 !important;
        color: #000000 !important;
    }

    .health-table td {
        color: #1e293b !important;
    }
}


