/* ═══════════════════════════════════════════════════════
   FitBody Premium — Multi-Theme System
   Themes: lime (default dark), orange (black/orange), blue (light/blue)
   ═══════════════════════════════════════════════════════ */

:root, [data-theme="lime"] {
    color-scheme: dark;
    --bg: #090d0b;
    --bg2: #101714;
    --card: #151d19;
    --card2: #1b2721;
    --card3: #243229;
    --lime: #c9f052;
    --lime-dim: #9fca34;
    --accent-rgb: 201,240,82;
    --text: #f5f8f4;
    --text2: #cbd7ce;
    --muted: #8b9b90;
    --line: rgba(220,242,226,0.1);
    --line-strong: rgba(220,242,226,0.18);
    --on-accent: #091008;
    --icon-bg: #0e1712;
    --radius: 20px;
    --radius-sm: 13px;
    --radius-lg: 28px;
    --shadow: 0 18px 48px rgba(0,0,0,0.25);
    --hero-p: #294711;
    --auth-glow: rgba(201,240,82,0.16);
}

/* ── Theme: Black / Orange ───────────────────────────── */
[data-theme="orange"] {
    color-scheme: dark;
    --bg: #0b0b0d;
    --bg2: #131316;
    --card: #19191e;
    --card2: #232329;
    --card3: #2e2e36;
    --lime: #ff8a32;
    --lime-dim: #e86b18;
    --accent-rgb: 255,138,50;
    --text: #fff8f1;
    --text2: #ded6cf;
    --muted: #a49a91;
    --line: rgba(255,236,222,0.11);
    --line-strong: rgba(255,236,222,0.2);
    --on-accent: #1d0c02;
    --icon-bg: #1b1b21;
    --hero-p: #55250b;
    --auth-glow: rgba(255,138,50,0.18);
}

/* ── Theme: Light / Blue ─────────────────────────────── */
[data-theme="blue"] {
    color-scheme: light;
    --bg: #f4f7fb;
    --bg2: #ffffff;
    --card: #ffffff;
    --card2: #f0f4f9;
    --card3: #e5edf7;
    --lime: #256fe8;
    --lime-dim: #1d55b7;
    --accent-rgb: 37,111,232;
    --text: #132238;
    --text2: #344963;
    --muted: #71839b;
    --line: rgba(36,67,105,0.12);
    --line-strong: rgba(36,67,105,0.2);
    --on-accent: #ffffff;
    --icon-bg: #e9f1ff;
    --hero-p: #dbeafe;
    --auth-glow: rgba(37,111,232,0.14);
    --shadow: 0 18px 48px rgba(24,58,104,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
    background:
        radial-gradient(circle at 8% -4%, rgba(var(--accent-rgb),0.1), transparent 28rem),
        radial-gradient(circle at 95% 105%, rgba(var(--accent-rgb),0.06), transparent 25rem),
        var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

button, input, select, textarea { font-family: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(var(--accent-rgb),0.28); color: var(--text); }

/* ── Layout ─────────────────────────────────────────── */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.sidebar { display: none; }
main { flex: 1; width: 100%; }
.top-row { display: none; }
.content { padding: 0 !important; }

.mobile-shell {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: 20px 18px 116px;
    min-height: 100vh;
}

/* ── Hero Card ──────────────────────────────────────── */
.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dim) 100%);
    color: var(--on-accent);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    margin-bottom: 20px;
    box-shadow: 0 12px 40px rgba(var(--accent-rgb),0.2);
    position: relative;
    overflow: hidden;
}
.hero-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.hero-card h1 { font-size: clamp(20px, 5vw, 28px); font-weight: 800; margin: 4px 0; line-height: 1.3; }
.hero-card p { margin: 0; color: var(--hero-p); font-size: 13px; font-weight: 500; }
.hero-logo { z-index: 1; flex-shrink: 0; }
.hero-logo img { height: 128px; width: auto; }

.page-heading-logo-link {
    display: inline-flex;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
}
.page-heading-logo {
    width: 64px; height: 64px; min-width: 64px;
    border-radius: 16px;
    object-fit: contain;
    background: var(--card);
    border: 2px solid var(--accent);
    padding: 5px;
    box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.2);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.page-heading-logo-link:hover .page-heading-logo {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.4);
}
.eyebrow { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; opacity: 0.7; font-weight: 700; }

/* ── Profile Wizard ─────────────────────────────────── */
.wizard-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow);
}
.wizard-progress {
    height: 6px;
    background: var(--card3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}
.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lime), var(--lime-dim));
    border-radius: 3px;
    transition: width 0.4s ease;
}
.wizard-step-label {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 20px;
}
.wizard-body {
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.wizard-body h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 8px;
}
.wizard-hint {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 24px;
}
.gender-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    width: 100%;
}
.gender-options-sm {
    gap: 8px;
}
.gender-card {
    flex: 1;
    max-width: 160px;
    background: var(--card2);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}
.gender-card:hover {
    border-color: var(--lime);
    background: var(--card3);
}
.gender-selected {
    border-color: var(--lime) !important;
    background: rgba(var(--accent-rgb), 0.12) !important;
    color: var(--lime) !important;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}
.gender-svg {
    width: 80px;
    height: 120px;
    color: inherit;
}
.gender-svg-sm {
    width: 40px;
    height: 60px;
}
.gender-card span {
    font-size: 16px;
    font-weight: 700;
    color: inherit;
}
.wizard-input-wrap {
    position: relative;
    width: 100%;
    max-width: 280px;
}
.wizard-big-input {
    font-size: 32px !important;
    text-align: center !important;
    padding: 16px !important;
    font-weight: 800;
}
.wizard-unit {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}
.goal-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.goal-chip {
    background: var(--card2);
    border: 2px solid var(--line);
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    transition: all 0.2s;
}
.goal-chip:hover {
    border-color: var(--lime);
    color: var(--text);
}
.goal-selected {
    border-color: var(--lime) !important;
    background: rgba(var(--accent-rgb), 0.15) !important;
    color: var(--lime) !important;
}
.wizard-nav {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.avatar-composer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.avatar-preview-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--lime);
    box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.3);
    background: var(--card3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
}
.avatar-body-svg {
    width: 50px;
    height: 75px;
    color: var(--muted);
}
.avatar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.profile-avatar-section {
    display: flex;
    justify-content: center;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

/* ── Shared avatar uploader (all roles) ──────────────── */
.avatar-uploader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 18px;
    margin-bottom: 20px;
}
.avatar-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.avatar-uploader-preview {
    position: relative;
    width: 150px;
    height: 150px;
    overflow: hidden;
    border: 3px solid var(--lime);
    box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.3);
    background: var(--card3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-uploader-preview.is-round { border-radius: 50%; }
.avatar-uploader-preview.is-square { border-radius: var(--radius-lg); }
.avatar-uploader-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-uploader-busy {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    font-size: 22px;
}
.avatar-uploader-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    color: var(--lime);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.avatar-uploader-btn:hover { background: rgba(var(--accent-rgb), 0.22); }
.avatar-uploader-btn.is-busy { opacity: 0.65; pointer-events: none; }
.avatar-uploader-btn input[type=file] { display: none; }
.avatar-uploader-hint {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    max-width: 280px;
    line-height: 1.7;
}
.coach-rating-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--lime);
    font-weight: 700;
}

/* ── Programs Hero Header ───────────────────────────── */
.programs-hero {
    position: relative;
    background: linear-gradient(135deg, #1a2f4a 0%, #0f1a2e 50%, #162840 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.programs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(var(--accent-rgb), 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(var(--accent-rgb), 0.08) 0%, transparent 50%);
    pointer-events: none;
}
.programs-hero::after {
    content: '';
    position: absolute;
    top: -40px; left: -40px;
    width: 160px; height: 160px;
    border: 2px solid rgba(var(--accent-rgb), 0.1);
    border-radius: 50%;
    pointer-events: none;
}
.programs-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    color: var(--lime);
}
.ph-sil {
    position: absolute;
    opacity: 0.08;
}
.ph-sil-1 {
    width: 160px;
    bottom: 15%;
    left: 8%;
    transform: rotate(-15deg);
}
.ph-sil-2 {
    width: 90px;
    top: 20%;
    right: 12%;
    transform: rotate(20deg);
}
.programs-hero-content {
    position: relative;
    z-index: 1;
}
.programs-hero h1 {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 900;
    color: var(--text);
    margin: 8px 0 6px;
    line-height: 1.2;
}
.programs-hero p {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 16px;
}
.programs-hero-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.ph-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text2);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 8px 16px;
    backdrop-filter: blur(8px);
}
.ph-stat strong {
    color: var(--lime);
    font-size: 18px;
    font-weight: 800;
}
.ph-stat-active {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.3);
}

/* ── Programs: athlete-first list ───────────────────── */
.programs-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 14px;
}
.programs-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 14px;
    transition: border-color 0.2s;
}
.programs-search:focus-within { border-color: var(--lime); }
.programs-search span { color: var(--muted); font-size: 15px; }
.programs-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}
.programs-search input::placeholder { color: var(--muted); }
.programs-result-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.avatar.client-avatar { border-radius: 50%; font-size: 15px; font-weight: 800; }
.client-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}
.athlete-row { cursor: pointer; }

/* ── Profile Wizard ─────────────────────────────────── */
.wiz-launch {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dim) 100%);
    color: var(--on-accent);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.wiz-launch:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.4);
}
.wiz-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow);
}
.wiz-progress {
    height: 6px;
    background: var(--card3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.wiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lime), var(--lime-dim));
    border-radius: 3px;
    transition: width 0.4s ease;
}
.wiz-step-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px;
    text-align: center;
}
.wiz-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 8px;
    text-align: center;
}
.wiz-hint {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    margin: 0 0 24px;
}
.wiz-gender-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.wiz-gender-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 12px;
    background: var(--card2);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    transition: all 0.2s;
}
.wiz-gender-card:hover {
    border-color: var(--lime);
    transform: translateY(-2px);
}
.wiz-gender-selected {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb), 0.1);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}
.wiz-gender-svg {
    width: 100px;
    height: 150px;
}
.wiz-photo-stage {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
#wiz-photo-canvas {
    width: 280px;
    height: 364px;
    border-radius: var(--radius);
    border: 2px solid var(--line);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.wiz-photo-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
}
.wiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.wiz-btn-primary {
    background: linear-gradient(135deg, var(--lime), var(--lime-dim));
    color: var(--on-accent);
}
.wiz-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.4);
}
.wiz-btn-secondary {
    background: var(--card3);
    color: var(--text);
    border: 1px solid var(--line);
}
.wiz-btn-secondary:hover {
    border-color: var(--lime);
}
.wiz-btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
}
.wiz-btn-skip {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--muted);
    border: 1px dashed var(--line);
    margin-top: 8px;
}
.wiz-big-input {
    font-size: 24px;
    text-align: center;
    padding: 20px;
    margin-bottom: 24px;
}
.wiz-goal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.wiz-goal-card {
    padding: 14px 12px;
    background: var(--card2);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
.wiz-goal-card:hover {
    border-color: var(--lime);
}
.wiz-goal-selected {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--lime);
}
.wiz-sessions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}
.wiz-session-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card2);
    border: 2px solid var(--line);
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
.wiz-session-dot:hover {
    border-color: var(--lime);
}
.wiz-session-selected {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--on-accent);
    transform: scale(1.1);
}
.wiz-nav {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
}
.wiz-nav .wiz-btn-primary {
    flex: 1;
}
.wiz-skip-all {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
}
.wiz-skip-all:hover {
    border-color: var(--lime);
    color: var(--lime);
}

/* ── Stats Grid ─────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--lime); }
.stat-card span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card strong { display: block; font-size: 28px; margin-top: 6px; color: var(--lime); font-weight: 800; }

/* ── Section Cards ──────────────────────────────────── */
.section-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-title h2 { font-size: 17px; font-weight: 700; }
.section-title span { font-size: 12px; color: var(--muted); }
.section-title a { color: var(--lime); text-decoration: none; font-size: 12px; font-weight: 600; }

/* ── Admin Menu Grid ────────────────────────────────── */
.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.admin-menu-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card2);
    color: var(--text);
    padding: 18px 12px;
    text-align: center;
    font: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.admin-menu-item span { font-size: 28px; }
.admin-menu-item strong { font-size: 13px; font-weight: 600; }
.admin-menu-item small { color: var(--muted); font-size: 10px; }
.admin-menu-item:hover { border-color: var(--lime); background: var(--card3); transform: translateY(-2px); }

/* ── List Styles ────────────────────────────────────── */
.list-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    border-top: 1.5px solid var(--accent);
}
.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s, transform 0.15s;
}
.list-row:hover { background: var(--card2); }
.list-row:active { background: var(--card3); transform: scale(1.005); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--card2); }
.list-row strong, .list-row small { display: block; }
.list-row strong { font-size: 14.5px; font-weight: 800; color: var(--text); }
.list-row small { color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.5; }

/* ── Avatar ─────────────────────────────────────────── */
.avatar {
    width: 46px; height: 46px;
    min-width: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--card3);
    color: var(--lime);
    font-size: 21px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Page Heading ───────────────────────────────────── */
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 18px;
}
.page-heading > div { flex: 1; }
.page-heading a:not(.page-heading-logo-link) {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 44px; height: 44px;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: var(--text);
    font-size: 18px;
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.page-heading a:not(.page-heading-logo-link):hover { border-color: var(--lime); }
.page-heading h1 { font-size: 22px; font-weight: 800; margin: 0; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ── Bottom Navigation ──────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    height: 62px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--muted);
    font-size: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s;
}
.bottom-nav a .nav-icon { font-size: 20px; }
.bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.bottom-nav button:hover { color: var(--lime); background: rgba(var(--accent-rgb),0.1); }
.bottom-nav a.active, .bottom-nav a:hover {
    color: var(--lime);
    background: rgba(var(--accent-rgb),0.1);
}

/* ── Logout ─────────────────────────────────────────── */
.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.15);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); }

/* ── Progress Card ──────────────────────────────────── */
.progress-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--lime) calc(var(--pct) * 3.6deg), var(--card3) 0);
    display: grid;
    place-items: center;
    position: relative;
}
.progress-ring::after {
    content: attr(data-label);
    position: absolute;
    width: 60px; height: 60px;
    background: var(--card);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--lime);
}

/* ── Quick Stats Row ────────────────────────────────── */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}
.quick-stat {
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.quick-stat-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    background: var(--card3);
}
.quick-stat-value { font-size: 20px; font-weight: 800; color: var(--text); }
.quick-stat-label { font-size: 11px; color: var(--muted); }

/* ── Empty State ────────────────────────────────────── */
.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 16px;
    font-size: 14px;
}

/* ── Auth Pages ─────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 20%, var(--auth-glow), var(--bg) 60%);
}
.auth-card {
    width: min(100%, 400px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow);
}
.brand-mark {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--lime);
    color: var(--on-accent);
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 16px;
}
.auth-card h1 { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.auth-card label { display: block; margin: 16px 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.auth-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg2);
    color: var(--text);
    outline: none;
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s;
}
.auth-input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.1); }
.auth-error {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 12px;
    border: 1px solid rgba(239,68,68,0.15);
}
.primary-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--lime);
    color: var(--on-accent);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}
.primary-btn:hover { background: var(--lime-dim); transform: translateY(-1px); }
.auth-footer { margin-top: 20px; color: var(--muted); text-align: center; font-size: 13px; }
.auth-footer a { color: var(--lime); text-decoration: none; font-weight: 600; }

/* ── CRUD ───────────────────────────────────────────── */
.btn-add {
    display: block;
    width: 100%;
    padding: 16px;
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    background: transparent;
    color: var(--lime);
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 14px;
    transition: all 0.2s;
}
.btn-add:hover { border-color: var(--lime); background: rgba(var(--accent-rgb),0.05); }

.item-actions { display: flex; gap: 6px; margin-left: auto; align-self: center; }
.btn-edit, .btn-delete {
    width: 36px; height: 36px;
    border: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.btn-edit, .btn-delete {
    width: 34px; height: 34px;
    border: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-edit { background: var(--card3); color: var(--lime); }
.btn-delete { background: rgba(239,68,68,0.12); color: #ef4444; }
.btn-edit:hover { background: rgba(var(--accent-rgb),0.18); }
.btn-edit:active { transform: scale(0.94); }
.btn-delete:hover { background: rgba(239,68,68,0.2); }
.btn-delete:active { transform: scale(0.94); }

.crud-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn-save {
    flex: 1;
    padding: 14px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--lime);
    color: var(--on-accent);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font: inherit;
}
.btn-cancel {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card2);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
}

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-card {
    width: min(100%, 480px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-card h2 { margin: 0 0 20px; font-size: 20px; font-weight: 800; color: var(--lime); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-select {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg2);
    color: var(--text);
    outline: none;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus { border-color: var(--lime); }
.form-select option { background: var(--card); color: var(--text); }

/* ── Utility ────────────────────────────────────────── */
.muted { color: var(--muted); font-size: 14px; }
.online-dot { color: var(--lime) !important; font-weight: 600; }
.text-lime { color: var(--lime); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
    .mobile-shell { padding: 12px 12px 100px; }
    .stats-grid { gap: 8px; }
    .stat-card { padding: 14px 8px; }
    .stat-card strong { font-size: 24px; }
    .admin-menu-grid { gap: 8px; }
    .admin-menu-item { padding: 14px 8px; }
    .hero-card { padding: 18px 16px; }
    .hero-card h1 { font-size: 20px; }
    .profile-training-settings { gap:8px; }
    .profile-session-options { gap:4px; }
    .profile-session-options .size-chip { height:40px; font-size:14px; }
    .profile-experience-options { gap:4px; }
    .profile-experience-options .size-chip { height:40px; font-size:11px; }
}

/* Real PNG icon overrides (must come after legacy emoji styles). */
.menu-icon { width: 28px !important; height: 28px !important; display: inline-block !important; object-fit: contain !important; vertical-align: middle !important; }
[data-theme="orange"] .menu-icon { filter: hue-rotate(-50deg) saturate(1.2); }
[data-theme="blue"] .menu-icon { filter: hue-rotate(140deg) saturate(0.9); }
.dashboard-menu-icon { width: 48px !important; height: 48px !important; display: block !important; margin: 0 auto 8px !important; border-radius: 12px !important; object-fit: contain !important; background-color: transparent !important; }
.admin-menu-grid .admin-menu-item > img.dashboard-menu-icon { opacity: 1 !important; visibility: visible !important; }
.admin-menu-grid a.admin-menu-item { text-decoration: none !important; color: inherit !important; cursor: pointer !important; }
[data-theme="orange"] .dashboard-menu-icon { filter: hue-rotate(-50deg) saturate(1.2); }
[data-theme="blue"] .dashboard-menu-icon { filter: hue-rotate(140deg) saturate(0.9); }

/* ── AI Status Badge ────────────────────────────────── */
.ai-status-badge {
    position: fixed;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 100;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
    cursor: default;
    pointer-events: none;
}
.ai-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ai-online {
    background: rgba(74,222,128,0.15);
    border: 1px solid rgba(74,222,128,0.3);
    color: #4ade80;
}
.ai-online .ai-status-dot {
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    animation: ai-pulse 2s ease-in-out infinite;
}
.ai-offline {
    background: rgba(248,113,113,0.15);
    border: 1px solid rgba(248,113,113,0.3);
    color: #f87171;
}
.ai-offline .ai-status-dot {
    background: #f87171;
    box-shadow: 0 0 6px #f87171;
}
@keyframes ai-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Bottom Nav Icons ───────────────────────────────── */
.bottom-nav a .nav-icon { width: 25px !important; height: 25px !important; font-size: 0 !important; display: inline-block !important; background-color: var(--icon-bg) !important; background-position: center !important; background-size: contain !important; background-repeat: no-repeat !important; }
.bottom-nav a:nth-child(1) .nav-icon { background-image: url('../icons/home.png') !important; }
.bottom-nav a:nth-child(2) .nav-icon { background-image: url('../icons/programs.png') !important; }
.bottom-nav a:nth-child(3) .nav-icon { background-image: url('../icons/consultation.png') !important; }
.bottom-nav .profile-link .nav-icon { background-image: url('../icons/profile.png') !important; }
.bottom-nav .messages-link .nav-icon { background-image: url('../icons/messages.png') !important; }
.bottom-nav .theme-toggle-btn .nav-icon { width: 25px !important; height: 25px !important; font-size: 0 !important; display: inline-block !important; background-color: var(--icon-bg) !important; background-position: center !important; background-size: contain !important; background-repeat: no-repeat !important; background-image: url('../icons/theme.png') !important; }

[data-theme="orange"] .bottom-nav a:nth-child(1) .nav-icon { background-image: url('../icons/orange-home.png') !important; }
[data-theme="orange"] .bottom-nav a:nth-child(2) .nav-icon { background-image: url('../icons/orange-programs.png') !important; }
[data-theme="orange"] .bottom-nav a:nth-child(3) .nav-icon { background-image: url('../icons/orange-consultation.png') !important; }
[data-theme="orange"] .bottom-nav .profile-link .nav-icon { background-image: url('../icons/orange-profile.png') !important; }
[data-theme="orange"] .bottom-nav .messages-link .nav-icon { background-image: url('../icons/orange-messages.png') !important; }
[data-theme="orange"] .bottom-nav .theme-toggle-btn .nav-icon { background-image: url('../icons/orange-theme.png') !important; }

[data-theme="blue"] .bottom-nav a:nth-child(1) .nav-icon { background-image: url('../icons/blue-home.png') !important; }
[data-theme="blue"] .bottom-nav a:nth-child(2) .nav-icon { background-image: url('../icons/blue-programs.png') !important; }
[data-theme="blue"] .bottom-nav a:nth-child(3) .nav-icon { background-image: url('../icons/blue-consultation.png') !important; }
[data-theme="blue"] .bottom-nav .profile-link .nav-icon { background-image: url('../icons/blue-profile.png') !important; }
[data-theme="blue"] .bottom-nav .messages-link .nav-icon { background-image: url('../icons/blue-messages.png') !important; }
[data-theme="blue"] .bottom-nav .theme-toggle-btn .nav-icon { background-image: url('../icons/blue-theme.png') !important; }

/* ── Theme Switcher ─────────────────────────────────── */
.theme-switcher {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 60;
}
.theme-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
}
.theme-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    min-width: 150px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    display: none;
    flex-direction: column;
    gap: 6px;
}
.theme-panel-open { display: flex; }
.theme-panel-title {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-align: center;
}
.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: right;
    width: 100%;
    transition: background 0.15s, border-color 0.15s;
}
.theme-option:hover { background: var(--card2); border-color: var(--line); }
.theme-option.theme-option-active { background: rgba(var(--accent-rgb),0.1); border-color: rgba(var(--accent-rgb),0.3); color: var(--lime); }
.theme-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--card3);
}
.theme-dot[data-theme="lime"] { background: #c8e64c; }
.theme-dot[data-theme="orange"] { background: #ff7a1a; }
.theme-dot[data-theme="blue"] { background: #1e7ae8; }
.theme-option.theme-option-active .theme-dot { border-color: var(--text); }

/* ── Blazor Error ───────────────────────────────────── */
#blazor-error-ui {
    background: rgba(239,68,68,0.9);
    color: white;
    bottom: 0;
    display: none;
    left: 0;
    padding: 12px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 13px;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 12px; }

/* ── Exercise GIF ───────────────────────────────────── */
.exercise-gif-thumb {
    width: 52px; height: 52px;
    min-width: 52px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--lime);
    position: relative;
}
.exercise-gif-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.exercise-info { flex: 1; min-width: 0; }
.exercise-row { gap: 10px; }

.btn-gif {
    width: 34px; height: 34px;
    border: 0;
    border-radius: 10px;
    background: var(--card3);
    color: #facc15;
    display: grid;
    place-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-gif:hover { background: rgba(250,204,21,0.15); }

.gif-preview-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 12px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--lime);
}
.gif-preview-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gif-upload-zone {
    position: relative;
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    padding: 32px 16px;
    margin-top: 16px;
    transition: border-color 0.2s;
    cursor: pointer;
}
.gif-upload-zone:hover { border-color: var(--lime); }
.gif-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.gif-upload-content p { color: var(--text); font-size: 14px; margin: 0; }
.gif-file-input {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.gif-progress {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.gif-progress-bar {
    width: 200px;
    height: 4px;
    background: var(--card3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.gif-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--lime);
    animation: gifSlide 1.2s infinite ease-in-out;
}
@keyframes gifSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}
.gif-progress span { font-size: 12px; color: var(--muted); }

.btn-delete-gif {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius-sm);
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s;
}
.btn-delete-gif:hover { background: rgba(239,68,68,0.15); }

/* ── Superset & Dropset ─────────────────────────────── */
.superset-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #60a5fa;
}
.superset-icon { font-size: 16px; }

.superset-row {
    border-right: 3px solid #3b82f6 !important;
    background: rgba(59,130,246,0.03);
}
.dropset-row {
    border-right: 3px solid #f59e0b !important;
    background: rgba(245,158,11,0.03);
}

.avatar-superset {
    background: rgba(59,130,246,0.15) !important;
    color: #60a5fa !important;
}
.avatar-dropset {
    background: rgba(245,158,11,0.15) !important;
    color: #f59e0b !important;
}

.exercise-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.type-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}
.superset-type {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
}
.dropset-type {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
}

.dropset-info {
    color: #f59e0b !important;
    font-size: 11px;
}
.rest-info {
    color: #a78bfa !important;
    font-size: 11px;
}

.superset-form, .dropset-form {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.superset-form {
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
}
.dropset-form {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
}

/* ── Program Cards ──────────────────────────────────── */
.program-row { align-items: flex-start; gap: 14px; }
.program-cover { flex:0 0 72px; width:72px; height:72px; margin-top:2px; object-fit:cover; object-position:center; border:1px solid var(--line-strong); border-radius:17px; background:var(--card2); box-shadow:0 7px 20px rgba(0,0,0,.18); }
.program-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.program-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.program-title-row strong { font-size: 15px; font-weight: 700; color: var(--text); }
.program-client {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--lime); font-weight: 600;
}
.program-client {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; color: var(--lime); font-weight: 700;
}
.client-icon { font-size: 13px; }
.program-coach {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #60a5fa; font-weight: 500;
}
.coach-icon { font-size: 11px; }
.program-meta {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 11px; color: var(--muted);
}
.pm-item {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--card3);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px 9px;
}
.program-meta .difficulty-badge { margin-left: auto; }
.program-days-summary {
    font-size: 11px; color: #a78bfa;
}
.program-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; flex-wrap: wrap;
}
.program-foot .item-actions { margin-left: 0; }
.program-foot .program-detail-link { margin-top: 0; padding: 7px 16px; border-radius: 10px; }
.program-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 16px;
    background: rgba(var(--accent-rgb),0.12);
    color: var(--lime);
    border: 1.5px solid rgba(var(--accent-rgb),0.45);
    font-size: 12.5px;
    font-weight: 800;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.program-detail-link:hover {
    background: rgba(var(--accent-rgb),0.22);
    color: var(--bg);
}
.status-badge {
    font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 600;
}
.active-badge {
    background: rgba(34,197,94,0.15); color: #22c55e;
}
.inactive-badge {
    background: rgba(239,68,68,0.1); color: #ef4444;
}
.difficulty-badge {
    font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 600;
}
.diff-beginner { background: rgba(34,197,94,0.12); color: #22c55e; }
.diff-intermediate { background: rgba(234,179,8,0.12); color: #eab308; }
.diff-advanced { background: rgba(239,68,68,0.12); color: #ef4444; }
.start-date { opacity: 0.7; }
.program-active { background: rgba(34,197,94,0.1) !important; border: 1px solid rgba(34,197,94,0.2) !important; }
.program-inactive { background: var(--card3); opacity: 0.7; }

/* ── Athlete strip (programs/athlete) ───────────────── */
.athlete-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.athlete-strip .avatar {
    width: 46px; height: 46px; min-width: 46px;
    border-radius: 50%;
    font-size: 16px; font-weight: 800;
}
.athlete-strip-main { flex: 1; min-width: 0; }
.athlete-strip-main strong {
    display: block;
    font-size: 15px; font-weight: 700; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.athlete-strip-sub {
    display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap;
    font-size: 12px; color: var(--muted); margin-top: 5px;
}
.athlete-strip-sub span { display: inline-flex; align-items: center; gap: 4px; }

/* ── Detail summary card (program / nutrition) ─────── */
.di-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 18px;
}
.di-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.di-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
}
.di-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.di-tile {
    background: var(--card3);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 11px;
    min-width: 0;
}
.di-tile-wide { grid-column: 1 / -1; }
.di-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}
.di-value {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    overflow-wrap: anywhere;
}
@media (max-width: 360px) {
    .di-grid { grid-template-columns: 1fr; }
}

/* ── Nutrition Card ─────────────────────────────────── */
.nutrition-row { align-items: flex-start; }
.nutrition-info { flex: 1; min-width: 0; }
.nutrition-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.nutrition-title-row strong { font-size: 0.95rem; color: var(--text); }
.nutrition-client, .nutrition-coach {
    font-size: 0.8rem; color: var(--muted); margin-top: 2px;
    display: flex; align-items: center; gap: 4px;
}
.nutrition-meta {
    display: flex; gap: 12px; margin-top: 6px;
    font-size: 0.8rem; color: var(--muted);
}
.macro-summary {
    display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap;
}
.macro-pill {
    font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.macro-pill.protein { background: rgba(59,130,246,0.15); color: #60a5fa; }
.macro-pill.carbs { background: rgba(234,179,8,0.15); color: #facc15; }
.macro-pill.fat { background: rgba(239,68,68,0.15); color: #f87171; }

/* ── Shared detail info card + section heading (program & nutrition) ── */
.detail-info-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--muted); font-size: 0.85rem; }
.detail-value { color: var(--text); font-weight: 600; font-size: 0.9rem; text-align: left; }
.text-active { color: #4ade80; }
.text-inactive { color: #f87171; }
.section-heading {
    color: var(--lime);
    font-size: 1.1rem;
    margin: 20px 0 12px;
}

/* ── Nutrition Detail ───────────────────────────────── */
.meal-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}
.meal-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.meal-time-badge {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--lime); color: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 800; flex-shrink: 0;
}
.meal-name { color: var(--text); font-weight: 700; font-size: 0.95rem; }
.meal-time-label { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.meal-body { padding: 12px 16px; }
.food-items {
    color: var(--text2); font-size: 0.85rem; line-height: 1.6;
    white-space: pre-line; margin-bottom: 8px;
}
.meal-macros {
    display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px;
}
.meal-macro {
    font-size: 0.75rem; padding: 3px 10px; border-radius: 10px; font-weight: 600;
}
.meal-macro.cal { background: rgba(234,179,8,0.12); color: #facc15; }
.meal-macro.pro { background: rgba(59,130,246,0.12); color: #60a5fa; }
.meal-macro.cb { background: rgba(34,197,94,0.12); color: #4ade80; }
.meal-macro.ft { background: rgba(239,68,68,0.12); color: #f87171; }
.meal-completed { margin-right: auto; font-size: 1.1rem; }
.no-meals {
    padding: 24px 16px; text-align: center;
    color: var(--muted); font-size: 0.9rem;
}

/* ── Free Meal ──────────────────────────────────────── */
.free-meal-card {
    border: 1px solid rgba(234,179,8,0.3) !important;
    background: rgba(234,179,8,0.05) !important;
}
.free-badge {
    background: #f59e0b !important;
    color: var(--on-accent) !important;
}
.free-meal-icon {
    margin-right: auto;
    font-size: 1.1rem;
}
.btn-add-free-meal {
    display: block;
    width: 100%;
    padding: 16px;
    border: 2px dashed #f59e0b;
    border-radius: var(--radius);
    background: rgba(234,179,8,0.05);
    color: #f59e0b;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
    margin-bottom: 16px;
    transition: all 0.2s;
}
.btn-add-free-meal:hover {
    border-color: #f59e0b;
    background: rgba(234,179,8,0.1);
}

/* ── AI Consultation Button ──────────────────────────── */
.btn-ai-consultation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: 2px solid #6366f1;
    border-radius: 12px;
    background: rgba(99,102,241,0.1);
    color: #818cf8;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}
.btn-ai-consultation:hover {
    background: rgba(99,102,241,0.2);
    border-color: #818cf8;
}

/* ── Exercise Record ──────────────────────────────────── */
.btn-record-exercise {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--lime);
    border-radius: 10px;
    background: rgba(var(--accent-rgb),0.1);
    color: var(--lime);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-record-exercise:hover {
    background: rgba(var(--accent-rgb),0.2);
}
.exercise-records-preview {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}
.records-title {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 600;
}
.record-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 4px;
}
.record-date {
    color: var(--muted);
    min-width: 45px;
}
.record-value {
    color: var(--lime);
    font-weight: 700;
}
.record-weight {
    color: #60a5fa;
}
.record-time {
    color: #f59e0b;
}

/* ── Progress Report ──────────────────────────────────── */
.time-range-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.range-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.range-btn:hover {
    border-color: var(--lime);
    color: var(--text);
}
.range-btn.active {
    background: var(--lime);
    color: var(--bg);
    border-color: var(--lime);
}
.chart-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    min-height: 250px;
}
.record-info {
    flex: 1;
    min-width: 0;
}
.record-info strong {
    font-size: 14px;
    color: var(--text);
}
.record-info small {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}
.record-details {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 12px;
}
.record-details span {
    color: var(--lime);
    font-weight: 600;
}
.summary-row {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.summary-pill {
    padding: 6px 14px; border-radius: 12px;
    font-size: 0.8rem; font-weight: 600;
}
.summary-pill.total-cal { background: rgba(234,179,8,0.12); color: #facc15; }
.summary-pill.total-meals { background: rgba(34,197,94,0.12); color: #4ade80; }
.summary-pill.total-pro { background: rgba(59,130,246,0.12); color: #60a5fa; }
.summary-pill.total-carb { background: rgba(34,197,94,0.08); color: #4ade80; }
.summary-pill.total-fat { background: rgba(239,68,68,0.1); color: #f87171; }

/* ── Client Thumbnail Cards ────────────────────────── */
.thumb-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 4px 0;
}
.thumb-card-photo {
    background: linear-gradient(135deg, var(--card2) 0%, var(--card3) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    transition: border-color 0.2s, transform 0.2s;
}
.thumb-card-photo:hover {
    border-color: var(--lime);
    transform: translateY(-2px);
}
.thumb-photo {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid var(--lime);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}
.thumb-avatar {
    width: 56px; height: 56px;
    min-width: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--card3);
    color: var(--lime);
    font-size: 26px;
    font-weight: 700;
    border: 1px solid var(--line);
}
.thumb-gym {
    background: rgba(234,179,8,0.12);
    color: #facc15;
}
.thumb-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 3px;
}
.thumb-info strong {
    font-size: 15px; font-weight: 700; color: var(--text);
}
.thumb-info small {
    font-size: 12px; color: var(--muted);
}
.thumb-bio {
    margin-top: 2px;
    color: var(--text2) !important;
    font-size: 12px !important;
    line-height: 1.5;
}
.thumb-address {
    font-size: 11px !important;
    opacity: 0.7;
}
.thumb-meta {
    display: flex; align-items: center; gap: 10px;
    margin-top: 4px;
}
.thumb-rating {
    font-size: 12px; color: #facc15; font-weight: 600;
}
.thumb-fee {
    font-size: 12px; color: var(--lime); font-weight: 600;
}
.thumb-active {
    font-size: 11px; padding: 2px 8px; border-radius: 20px;
    background: rgba(34,197,94,0.15); color: #22c55e; font-weight: 600;
}
.thumb-inactive {
    font-size: 11px; padding: 2px 8px; border-radius: 20px;
    background: rgba(239,68,68,0.1); color: #ef4444; font-weight: 600;
}

/* ── Client Chat Button ─────────────────────────────── */
.btn-chat {
    background: rgba(34,197,94,0.12);
    border: none; border-radius: 10px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem;
    transition: background 0.2s;
}
.btn-chat:hover { background: rgba(34,197,94,0.25); }
.client-info { flex: 1; min-width: 0; }
.client-row { align-items: center; }

/* ── Chat Panel ─────────────────────────────────────── */
.chat-overlay {
    position: fixed; inset-inline: 0; bottom: auto;
    top: var(--chat-vv-top, 0px);
    height: var(--chat-vv-height, 100dvh);
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex; align-items: flex-end;
    justify-content: center;
}
.chat-panel {
    width: 100%; max-width: 480px;
    height: 92vh; height: min(92dvh, 100%);
    max-height: 100%; min-height: 0;
    background: var(--bg);
    border-radius: 20px 20px 0 0;
    display: flex; flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-bottom: none;
    animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.chat-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.chat-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--lime); color: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.chat-user-info { flex: 1; min-width: 0; }
.chat-name { color: var(--text); font-weight: 700; font-size: 0.95rem; }
.chat-status { color: var(--lime); font-size: 0.75rem; margin-top: 1px; }

.chat-messages {
    flex: 1; min-height: 0; overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    display: flex; flex-direction: column;
    gap: 8px;
}
.chat-empty {
    text-align: center; color: var(--muted);
    padding: 40px 0; font-size: 0.9rem;
}
.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}
.bubble-sent {
    align-self: flex-end;
    background: var(--lime);
    color: var(--bg);
    border-bottom-right-radius: 4px;
}
.bubble-received {
    align-self: flex-start;
    background: var(--card2);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.chat-audio-bubble {
    width: min(80%, 320px);
    max-width: 80%;
    min-width: 0;
    box-sizing: border-box;
}
.chat-audio-player {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    line-height: 0;
}
.chat-audio-player audio {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 42px;
    box-sizing: border-box;
}
.chat-audio-duration-status {
    display: block;
    padding: 5px 8px 0;
    line-height: 1.5;
    color: inherit;
    opacity: .75;
    font-size: .72rem;
}
.chat-audio-duration-status[hidden] { display: none; }
.bubble-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 4px;
    text-align: left;
}
.bubble-sent .bubble-time { color: var(--bg); }
.bubble-received .bubble-time { color: var(--muted); }

.chat-composer {
    flex: 0 0 auto; min-width: 0;
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
}
.chat-input-area {
    display: grid; grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center; gap: 8px; min-width: 0;
}
.chat-input {
    width: 100%; min-width: 0; box-sizing: border-box;
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
}
.chat-input::placeholder { color: var(--muted); }
.chat-input:focus { border-color: var(--lime); }
.chat-send {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--lime);
    color: var(--bg);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.chat-send:hover { opacity: 0.85; }
.chat-send:disabled { opacity: 0.3; cursor: not-allowed; }
.chat-attachment-tools {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px; padding-top: 8px;
}
.chat-attachment-tools .chat-attachment {
    min-width: 0; min-height: 44px; width: 100%; box-sizing: border-box;
    gap: 4px; padding: 6px 2px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--card2);
    font: inherit; font-size: 11px; white-space: nowrap;
}
.chat-attachment-tools .chat-attachment:disabled { opacity: .45; cursor: not-allowed; }
.chat-attachment-tools .chat-attachment span:first-child { font-size: 17px; }

/* ── Messages List ─────────────────────────────────── */
.msg-row { align-items: flex-start; }
.msg-info { flex: 1; min-width: 0; }
.msg-parties { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.msg-parties strong { font-size: 0.9rem; color: var(--text); }
.msg-unread-dot { color: var(--lime); font-size: 0.7rem; }
.msg-preview {
    color: var(--muted); font-size: 0.8rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 280px;
}
.msg-unread .msg-preview { color: var(--text2); font-weight: 500; }
.msg-time { color: var(--muted); font-size: 0.7rem; margin-top: 4px; opacity: 0.7; }

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--card3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Client Exercises — Visual Gallery ──────────── */
.client-ex-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.client-ex-card:hover {
    border-color: rgba(var(--accent-rgb),0.3);
}

.client-ex-media {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 180px;
    background: linear-gradient(135deg, var(--card2), var(--card3));
    border-radius: var(--radius) var(--radius) 0 0;
}
.client-ex-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.client-ex-placeholder {
    display: grid;
    place-items: center;
    font-size: 56px;
    background: linear-gradient(135deg, var(--card2), var(--card3));
    width: 100%;
    height: 100%;
}

.client-ex-gif-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(var(--accent-rgb),0.9);
    color: var(--bg);
    font-size: 18px;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transition: transform 0.2s, background 0.2s;
    z-index: 2;
}
.client-ex-gif-btn:hover {
    transform: scale(1.1);
    background: var(--lime);
}

.client-ex-body {
    padding: 14px 16px 16px;
}
.client-ex-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.client-ex-notes {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* ── Client Exercises Lightbox ───────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.lightbox-content {
    width: 100%;
    max-width: 480px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    animation: scaleIn 0.2s ease;
}
@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 16px;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
}
.lightbox-close:hover {
    background: rgba(239,68,68,0.7);
}
.lightbox-name {
    padding: 16px 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--lime);
}
.lightbox-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    display: block;
    background: var(--bg2);
    margin-top: 12px;
}
.lightbox-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--bg2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}
.lightbox-notes {
    padding: 14px 16px 18px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* ── Category Tabs ────────────────────────────────── */
.cat-tabs-wrap {
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cat-tabs-wrap::-webkit-scrollbar { display: none; }
.cat-tabs {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    min-width: max-content;
}
.cat-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.cat-tab-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line);
}
.cat-tab.active .cat-tab-img {
    border-color: rgba(0,0,0,0.25);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
}
.cat-tab:hover {
    border-color: var(--lime);
    color: var(--text);
}
.cat-tab.active {
    background: var(--lime);
    color: var(--bg);
    border-color: var(--lime);
}
.cat-tab.active .cat-count {
    background: rgba(0,0,0,0.2);
    color: var(--bg);
}
.cat-count {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--card3);
    color: var(--muted);
}

/* ── Search ───────────────────────────────────────── */
.ex-search-wrap {
    margin-bottom: 14px;
}
.ex-search-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.ex-search-input::placeholder { color: var(--muted); }
.ex-search-input:focus { border-color: var(--lime); }

/* ── Load More ────────────────────────────────────── */
.load-more-wrap {
    text-align: center;
    padding: 20px 0;
}
.load-more-btn {
    padding: 12px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.load-more-btn:hover:not(:disabled) {
    border-color: var(--lime);
    color: var(--lime);
}
.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.load-more-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--line);
    border-top-color: var(--lime);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.load-end-msg {
    text-align: center;
    padding: 16px 0 24px;
    color: var(--muted);
    font-size: 13px;
}

/* ── Progress Chart ───────────────────────────────── */
.progress-section {
    margin-top: 14px;
}
.progress-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}
.progress-summary-item {
    text-align: center;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
}
.progress-summary-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--lime);
}
.progress-summary-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.chart-container {
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: 14px;
}
.chart-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 12px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    padding-top: 16px;
}
.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.bar-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--lime);
    margin-bottom: 4px;
    min-height: 14px;
}
.bar-track {
    flex: 1;
    width: 100%;
    background: var(--card3);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.bar-fill {
    width: 100%;
    background: linear-gradient(to top, var(--lime), var(--lime-dim));
    border-radius: 6px;
    transition: height 0.6s ease;
    min-height: 4px;
}
.bar-label {
    font-size: 10px;
    color: var(--muted);
    margin-top: 6px;
    white-space: nowrap;
}

.calorie-chart {
    position: relative;
    height: 80px;
    margin-top: 8px;
}
.calorie-point {
    position: absolute;
    left: 0;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    z-index: 2;
}
.calorie-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245,158,11,0.4);
}
.calorie-label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #f59e0b;
    white-space: nowrap;
}
.calorie-line {
    position: absolute;
    height: 2px;
    background: #f59e0b;
    transform-origin: left center;
    opacity: 0.5;
    z-index: 1;
}

.progress-rings {
    display: flex;
    justify-content: space-around;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.ring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.ring-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--card);
    display: grid;
    place-items: center;
}
.ring-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--lime);
}
.ring-label {
    font-size: 11px;
    color: var(--muted);
}

/* ── AI Consultation Chat ────────────────────────── */
.ai-hero {
    text-align: center;
    padding: 20px 16px 16px;
    margin-bottom: 14px;
}
.ai-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: inline-grid;
    place-items: center;
    font-size: 32px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.ai-hero-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.ai-hero-desc {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}
.ai-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.ai-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text2);
}

.chat-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 4px 0;
    scroll-behavior: smooth;
}

.chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.msg-user {
    flex-direction: row-reverse;
}
.msg-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: grid;
    place-items: center;
    font-size: 14px;
    flex-shrink: 0;
}
.user-avatar {
    background: var(--lime);
}
.msg-bubble {
    max-width: 82%;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.7;
    word-wrap: break-word;
}
.msg-ai .msg-bubble {
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    border-bottom-right-radius: 4px;
}
.msg-user .msg-bubble {
    background: var(--lime);
    color: var(--bg);
    border-bottom-left-radius: 4px;
}
.msg-text b { color: var(--lime); }
.msg-user .msg-text b { color: var(--bg); }
.msg-text { white-space: pre-line; }
.msg-time {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 4px;
}
.msg-user .msg-time { text-align: left; color: var(--bg); }
.msg-ai .msg-time { color: var(--muted); }

.typing-bubble {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 14px 18px;
}
.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    animation: typingPulse 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingPulse {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1.1); }
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.chip {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.chip:hover {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb),0.08);
    color: var(--lime);
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid var(--line);
    border-top-color: var(--bg);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

/* ── Paywall ──────────────────────────────────────── */
.paywall-card {
    text-align: center;
}
.paywall-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.paywall-features {
    text-align: right;
    margin-bottom: 20px;
}
.paywall-feature {
    padding: 8px 0;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
}
.paywall-feature:last-child { border-bottom: none; }
.paywall-plans {
    display: flex;
    gap: 10px;
}
.plan-btn {
    flex: 1;
    padding: 14px 10px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--line);
    background: var(--card2);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.plan-btn:hover {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb),0.08);
}
.plan-yearly {
    border-color: var(--lime);
    position: relative;
}
.plan-badge {
    position: absolute;
    top: -10px;
    background: var(--lime);
    color: var(--bg);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
}
.plan-duration {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}
.plan-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--lime);
}
.plan-per {
    font-size: 11px;
    color: var(--muted);
}

/* ── Login Page ────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    justify-items: center;
    align-content: start;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding-block: 24px;
    background: radial-gradient(circle at 50% 20%, var(--auth-glow) 0%, var(--bg) 60%);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Keyboard open: lift form above keyboard */
html.kb-open .login-page,
body.kb-open .login-page {
    align-content: start;
    min-height: var(--vv-h, 100dvh);
    height: auto;
    padding-block: 8px;
}
html.kb-open .login-brand,
body.kb-open .login-brand {
    display: none !important;
}
html.kb-open .login-features,
body.kb-open .login-features {
    display: none !important;
}
html.kb-open .bg-circle-3,
body.kb-open .bg-circle-3 {
    display: none;
}
html.kb-open .login-container,
body.kb-open .login-container {
    padding-top: 4px;
    padding-bottom: calc(var(--kb-h, 0px) + 12px);
}
html.kb-open .login-card,
body.kb-open .login-card {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    width: min(100%, 420px);
}
html.kb-open .login-header h1,
body.kb-open .login-header h1 {
    font-size: 22px;
    margin-bottom: 4px;
}
html.kb-open .login-header,
body.kb-open .login-header {
    margin-bottom: 14px;
}

.login-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}
.bg-circle-1 {
    width: 400px;
    height: 400px;
    background: var(--lime);
    top: -100px;
    right: -100px;
    animation: floatCircle 12s ease-in-out infinite;
}
.bg-circle-2 {
    width: 300px;
    height: 300px;
    background: #6366f1;
    bottom: -80px;
    left: -80px;
    animation: floatCircle 15s ease-in-out infinite reverse;
}
.bg-circle-3 {
    width: 200px;
    height: 200px;
    background: var(--lime);
    bottom: 30%;
    right: 10%;
    animation: floatCircle 10s ease-in-out infinite 2s;
}
@keyframes floatCircle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Login BG: grid + silhouettes + particles + energy ── */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--accent-rgb), 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
    animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 48px 48px, 48px 48px; }
}
.bg-silhouettes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    color: var(--lime);
}
.sil {
    position: absolute;
    opacity: 0.1;
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.35));
}
.sil-dumbbell {
    width: 140px;
    top: 12%;
    left: -20px;
    animation: silFloat1 14s ease-in-out infinite;
}
.sil-plate {
    width: 90px;
    top: 55%;
    right: 6%;
    animation: silFloat2 16s ease-in-out infinite;
}
.sil-kettle {
    width: 70px;
    bottom: 12%;
    left: 12%;
    animation: silFloat1 18s ease-in-out infinite reverse;
}
.sil-runner {
    width: 80px;
    top: 22%;
    right: -10px;
    opacity: 0.12;
    animation: silRun 12s ease-in-out infinite;
}
@keyframes silFloat1 {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(-24px) rotate(6deg); }
}
@keyframes silFloat2 {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(20px) rotate(-10deg); }
}
@keyframes silRun {
    0%, 100% { transform: translate(0, 0) scaleX(1); }
    50% { transform: translate(-18px, -12px) scaleX(1); }
}
.bg-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
    animation: particleRise linear infinite;
}
@keyframes particleRise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-110vh) scale(0.4); opacity: 0; }
}
.bg-energy {
    position: absolute;
    inset: -40%;
    background:
        conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(var(--accent-rgb), 0.06) 40deg,
            transparent 80deg,
            transparent 180deg,
            rgba(var(--accent-rgb), 0.05) 220deg,
            transparent 270deg);
    animation: energySpin 28s linear infinite;
    pointer-events: none;
}
@keyframes energySpin {
    to { transform: rotate(360deg); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    padding: 24px 20px;
    position: relative;
    z-index: 1;
}

/* Brand */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    text-align: center;
}
.brand-logo {
    position: relative;
    width: 600px;
    height: 600px;
    max-width: min(600px, 92vw);
    max-height: min(600px, 92vw);
    margin-bottom: 4px;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 0;
    filter: drop-shadow(0 4px 20px rgba(var(--accent-rgb),0.25));
}
.logo-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dim) 100%);
    display: grid;
    place-items: center;
    font-size: 36px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(var(--accent-rgb),0.3);
}
.logo-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120px; height: 120px;
    border-radius: 50%;
    background: var(--lime);
    opacity: 0.12;
    filter: blur(30px);
    animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.08; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.18; transform: translate(-50%, -50%) scale(1.15); }
}
.brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.brand-name {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.1;
}
.brand-sub {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--lime);
    font-weight: 700;
}

/* Card */
.login-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 2;
}
.login-header {
    text-align: center;
    margin-bottom: 28px;
}
.login-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
}
.login-header p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    border: 1px solid rgba(239,68,68,0.15);
    animation: shakeIn 0.4s ease;
}
@keyframes shakeIn {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.error-icon { font-size: 16px; }

.input-group {
    position: relative;
    margin-bottom: 14px;
}
.input-icon {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 2;
}
.login-input {
    width: 100%;
    padding-block: 15px;
    padding-inline-start: 16px;
    padding-inline-end: 48px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--line);
    background: var(--bg2);
    color: var(--text);
    outline: none;
    font: inherit;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}
.login-input::placeholder { color: var(--muted); }
.login-input:focus {
    border-color: var(--lime);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.1);
}

.remember-login-option {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 14px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}
.remember-login-option input { accent-color: var(--lime); }

.login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dim) 100%);
    color: var(--on-accent);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(var(--accent-rgb),0.3);
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--accent-rgb),0.4);
}
.login-btn:active {
    transform: translateY(0);
}
.btn-arrow {
    font-size: 18px;
    transition: transform 0.2s;
}
.login-btn:hover .btn-arrow {
    transform: translateX(-4px);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted);
}
.login-footer a {
    color: var(--lime);
    text-decoration: none;
    font-weight: 700;
    margin-right: 6px;
    transition: opacity 0.2s;
}
.login-footer a:hover { opacity: 0.8; }

/* Features */
.login-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
}
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
}
.feature-icon {
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
}

/* Responsive */
@media (max-width: 480px) {
    .login-page { padding-block: 16px; }
    .login-container { padding: 16px 14px; }
    .login-card { padding: 24px 18px; }
    .brand-name { font-size: 24px; }
    .logo-icon { width: 60px; height: 60px; font-size: 30px; border-radius: 18px; }
    .brand-logo { width: 480px; height: 480px; max-width: 92vw; max-height: 92vw; margin-bottom: 0; }
    .login-brand { margin-bottom: 8px; }
    .login-header { margin-bottom: 20px; }
    .login-features { gap: 16px; margin-top: 20px; }
    .bg-circle-1 { width: 240px; height: 240px; }
    .bg-circle-2 { width: 180px; height: 180px; }
    .bg-circle-3 { display: none; }
    .login-input { font-size: 16px; }
    .login-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
}
@media (max-height: 700px) {
    .login-brand { margin-bottom: 8px; }
    .brand-logo { width: 400px; height: 400px; max-width: 92vw; max-height: 92vw; }
    .login-header { margin-bottom: 18px; }
    .login-features { display: none; }
}

/* ═══════════════════════════════════════════════════════
   AI Plan Request & Coach Review
   ═══════════════════════════════════════════════════════ */

/* Plan Type Selector */
.plan-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.plan-type-btn {
    padding: 16px;
    border-radius: var(--radius);
    border: 2px solid var(--line);
    background: var(--card);
    color: var(--text2);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.plan-type-btn.active {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb),0.1);
    color: var(--lime);
}
.plan-type-btn:hover { border-color: var(--lime-dim); }

/* Day Grid */
.day-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.day-btn {
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text2);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.day-btn.active {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--on-accent);
    font-weight: 600;
}
.day-btn:hover { border-color: var(--lime-dim); }

/* Form Card */
.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
}
.form-card h3 {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 12px;
}
.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg2);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--lime);
}

/* MyProfile */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-training-settings { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; align-items:start; }
.profile-training-settings .form-group { min-width:0; }
.profile-session-options, .profile-experience-options, .profile-goal-options { display:flex; flex-direction:column; gap:0; height:56px; max-height:56px; overflow-x:hidden; overflow-y:auto; padding:4px 4px 4px 2px; scrollbar-width:thin; scrollbar-color:var(--lime-dim) var(--card2); overscroll-behavior:contain; scroll-snap-type:y mandatory; }
.profile-session-options .size-chip, .profile-experience-options .size-chip, .profile-goal-options .size-chip { box-sizing:border-box; flex:0 0 48px; width:100%; min-width:0; height:48px; min-height:48px; padding:6px 10px; white-space:normal; scroll-snap-align:start; scroll-snap-stop:always; }
.profile-experience-options .size-chip { font-size:12px; }
.profile-goal-options .size-chip { font-size:13px; }
.health-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.health-card { border-color: #e74c3c55; }
.health-badge { display: inline-block; color: #e74c3c; font-size: 12px; }
.supplement-badge { display: inline-block; color: #9b59b6; font-size: 12px; background: rgba(155,89,182,0.12); border: 1px solid rgba(155,89,182,0.3); border-radius: 8px; padding: 2px 8px; margin-top: 4px; }
.profile-warn { margin-top: 8px; font-size: 13px; color: #f39c12; }
.profile-warn a { color: var(--lime); font-weight: bold; }
.alert { padding: 12px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 14px; }
.alert-success { background: #2ecc7133; border: 1px solid #2ecc71; color: var(--text); }
.alert-error { background: #e74c3c33; border: 1px solid #e74c3c; color: var(--text); }

/* Info Card */
.info-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
}
.info-card h3 {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 12px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: var(--muted); }
.info-row span:last-child { color: var(--text); font-weight: 500; }

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius);
    border: none;
    background: var(--lime);
    color: var(--on-accent);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
}
.btn-submit:hover { background: var(--lime-dim); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-header h3 {
    font-size: 15px;
    color: var(--text);
}

/* Request Row */
.request-row { cursor: pointer; transition: background 0.2s; }
.request-row:hover { background: var(--card2); }
.request-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.request-info small { color: var(--muted); font-size: 12px; }
.request-info .status-pending { color: #f59e0b; }
.request-info .status-approved { color: #22c55e; }
.request-info .status-rejected { color: #ef4444; }

/* Avatar Status Colors */
.avatar.approved { background: #1a2a1a !important; color: #22c55e !important; }
.avatar.rejected { background: #2a1a1a !important; color: #ef4444 !important; }
.avatar.pending { background: #2a2a1a !important; color: #f59e0b !important; }

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text2);
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-tab.active {
    background: var(--lime);
    color: var(--on-accent);
    border-color: var(--lime);
    font-weight: 600;
}
.filter-tab:hover { border-color: var(--lime-dim); }

/* Review Row */
.review-row { cursor: pointer; }
.review-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.review-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.badge.pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge.approved { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge.rejected { background: rgba(239,68,68,0.15); color: #ef4444; }
.review-info small { color: var(--muted); font-size: 12px; }
.review-info .time { color: var(--muted); font-size: 11px; }

/* Review Modal */
.review-modal {
    max-width: 90vw;
    width: 480px;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-header h2 { font-size: 18px; color: var(--lime); }
.btn-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
}
.btn-close:hover { color: var(--text); }

.review-client-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 12px;
}
.review-type {
    font-size: 14px;
    color: var(--lime);
    margin-bottom: 8px;
    font-weight: 600;
}
.review-goal {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg2);
    border-radius: var(--radius-sm);
}
.review-message {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg2);
    border-radius: var(--radius-sm);
}
.review-message p { margin-top: 4px; }

.ai-response-review {
    background: var(--card2);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}
.ai-response-review h3 {
    font-size: 14px;
    color: var(--lime);
    margin-bottom: 12px;
}
.response-content {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text2);
}

.review-actions { margin-top: 16px; }
.coach-notes-input {
    margin-bottom: 12px;
}
.coach-notes-input label {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 6px;
    display: block;
}
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.btn-approve {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: none;
    background: #22c55e;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-approve:hover { background: #16a34a; }
.btn-reject {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: none;
    background: #ef4444;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-reject:hover { background: #dc2626; }

.review-result {
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 12px;
}
.review-result.approved {
    background: rgba(34,197,94,0.1);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.3);
}
.review-result.rejected {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}
.coach-note-display {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text2);
}

/* Detail Modal */
.detail-modal {
    max-width: 90vw;
    width: 480px;
    max-height: 85vh;
    overflow-y: auto;
}
.detail-status {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
    margin-bottom: 12px;
}
.detail-status.pending {
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
}
.detail-status.approved {
    background: rgba(34,197,94,0.1);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.3);
}
.detail-status.rejected {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}
.coach-notes {
    padding: 12px;
    background: var(--card2);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
}
.coach-notes p { margin-top: 4px; color: var(--text2); }
.ai-response {
    background: var(--card2);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}
.ai-response h3 {
    font-size: 14px;
    color: var(--lime);
    margin-bottom: 12px;
}
.btn-apply {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--lime);
    color: var(--on-accent);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-apply:hover { background: var(--lime-dim); }

/* Spinner */
.spinner-sm {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(13,15,14,0.3);
    border-top-color: var(--on-accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Notification Badge ────────────────────────────── */
.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239,68,68,0.4);
    animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.bottom-nav a {
    position: relative;
}

/* ── Quick Stat Highlight ──────────────────────────── */
.quick-stat-highlight {
    border-color: rgba(239,68,68,0.3) !important;
    background: rgba(239,68,68,0.08) !important;
}
.quick-stat-highlight .quick-stat-icon {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}
.quick-stat-highlight .quick-stat-value {
    color: #ef4444;
}

/* ── Notification Banner ───────────────────────────── */
.notif-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb),0.1), rgba(var(--accent-rgb),0.05));
    border: 1px solid rgba(var(--accent-rgb),0.2);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.notif-denied {
    background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.03));
    border-color: rgba(239,68,68,0.2);
}
.notif-banner-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.notif-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.notif-banner-text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.notif-banner-text span {
    font-size: 11px;
    color: var(--muted);
}
.notif-banner-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: var(--lime);
    color: var(--bg);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.notif-banner-btn:hover {
    background: var(--lime-dim);
}

/* ── Reminders Page ────────────────────────────────── */
.btn-add-reminder {
    display: block;
    width: 100%;
    padding: 16px;
    border: 2px dashed var(--lime);
    border-radius: var(--radius);
    background: rgba(var(--accent-rgb),0.05);
    color: var(--lime);
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}
.btn-add-reminder:hover {
    background: rgba(var(--accent-rgb),0.1);
    border-color: var(--lime-dim);
}

.badge-count {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
    animation: badgePulse 2s infinite;
}

.reminder-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: all 0.2s;
}
.reminder-card:hover {
    border-color: rgba(var(--accent-rgb),0.3);
}
.reminder-active {
    border-color: rgba(239,68,68,0.3) !important;
    background: rgba(239,68,68,0.05) !important;
    animation: reminderGlow 2s infinite;
}
@keyframes reminderGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    50% { box-shadow: 0 0 12px 2px rgba(239,68,68,0.15); }
}
.reminder-disabled {
    opacity: 0.5;
}
.reminder-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: var(--card3);
    display: grid;
    place-items: center;
    font-size: 22px;
}
.reminder-active .reminder-icon {
    background: rgba(239,68,68,0.15);
}
.reminder-info {
    flex: 1;
    min-width: 0;
}
.reminder-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.reminder-off-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    font-weight: 600;
}
.reminder-time {
    font-size: 12px;
    color: var(--lime);
    font-weight: 600;
    margin-top: 2px;
}
.reminder-desc {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.reminder-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.reminder-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card3);
    color: var(--muted);
}
.reminder-action-btn:hover {
    background: var(--card2);
    color: var(--text);
}
.edit-btn:hover {
    color: var(--lime) !important;
}
.delete-btn:hover {
    background: rgba(239,68,68,0.15) !important;
    color: #ef4444 !important;
}

/* ── Toggle Switch ─────────────────────────────────── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--card3);
    border-radius: 12px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--muted);
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background: rgba(var(--accent-rgb),0.3);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--lime);
}

/* ── Type Selector ─────────────────────────────────── */
.type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card2);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.type-btn span:first-child {
    font-size: 24px;
}
.type-btn:hover {
    border-color: var(--lime);
    color: var(--text);
}
.type-active {
    border-color: var(--lime) !important;
    background: rgba(var(--accent-rgb),0.1) !important;
    color: var(--lime) !important;
}

/* ── Day Selector ──────────────────────────────────── */
.day-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.day-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card2);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.day-btn:hover {
    border-color: var(--lime);
    color: var(--text);
}
.day-active {
    background: var(--lime) !important;
    color: var(--bg) !important;
    border-color: var(--lime) !important;
}

/* ── Chat Send Button (Consultation) ──────────────── */
.chat-send-btn {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--lime);
    color: var(--bg);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.chat-send-btn:hover { opacity: 0.85; }
.chat-send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════
   Equipment Pages
   ═══════════════════════════════════════════════════════ */

/* Equipment Row */
.equipment-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.equipment-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--card2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.equipment-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.equipment-icon {
    font-size: 24px;
}
.equipment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.equipment-info strong {
    font-size: 14px;
    color: var(--text);
}
.equipment-info small {
    font-size: 11px;
    color: var(--muted);
}

/* Equipment Toggle Row (Gym Equipment) */
.equipment-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: all 0.2s;
}
.equipment-toggle-row.active {
    border-color: rgba(34,197,94,0.3);
    background: rgba(34,197,94,0.05);
}
.equipment-img-small {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.equipment-img-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.equipment-img-small span {
    font-size: 18px;
}
.toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--card2);
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toggle-btn.on {
    border-color: #22c55e;
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}
.toggle-btn.off {
    border-color: var(--line);
    background: var(--card2);
    color: var(--muted);
}
.toggle-btn:hover {
    transform: scale(1.1);
}

/* Gym Info Card */
.gym-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.gym-info-card span {
    font-size: 24px;
}
.gym-info-card strong {
    font-size: 15px;
    color: var(--text);
}
.gym-info-card small {
    font-size: 12px;
    color: var(--muted);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-header h3 {
    font-size: 15px;
    color: var(--text);
}

/* Equipment Grid (Client) */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.equipment-card {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.equipment-card:hover {
    border-color: rgba(var(--accent-rgb),0.3);
    transform: translateY(-2px);
}
.equipment-card.selected {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb),0.05);
}
.equipment-card-img {
    position: relative;
    width: 100%;
    height: 120px;
    background: var(--card2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.equipment-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.equipment-icon-lg {
    font-size: 40px;
}
.check-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--bg);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.equipment-card-info {
    padding: 10px 12px;
}
.equipment-card-info strong {
    font-size: 13px;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}
.equipment-card-info small {
    font-size: 11px;
    color: var(--muted);
    display: block;
}
.equipment-card-info .exercise-count {
    color: var(--lime);
    font-weight: 600;
}

/* Selected Summary */
.selected-summary {
    text-align: center;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--lime);
    font-weight: 600;
}

/* Image Preview */
.image-preview {
    margin-top: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
}
.image-preview img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
}

/* Exercise Selector */
.exercise-selector {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: var(--bg2);
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text2);
    transition: background 0.2s;
}
.checkbox-item:hover {
    background: var(--card2);
}
.checkbox-item input[type="checkbox"] {
    accent-color: var(--lime);
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════
   Workout Issue Report Styles
   ═══════════════════════════════════════════════════════ */

/* ── Issue Report Card ─────────────────────────────── */
.issue-report-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.issue-report-card:hover { border-color: var(--lime-dim); }
.issue-resolved { opacity: 0.7; border-color: #22c55e33; }

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.issue-client {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}
.issue-client-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--card2);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}

.issue-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--card2);
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}
.issue-type-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.issue-body-part-inline {
    font-size: 11px;
    color: var(--muted);
}

.issue-severity {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.severity-low { background: #22c55e22; color: #22c55e; }
.severity-medium { background: #f59e0b22; color: #f59e0b; }
.severity-high { background: #ef444422; color: #ef4444; }
.severity-critical { background: #ef4444; color: white; }

.issue-body {
    margin-bottom: 8px;
}
.issue-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 6px;
}
.issue-exercise {
    font-size: 12px;
    color: var(--lime);
    margin-bottom: 4px;
}
.issue-time {
    font-size: 11px;
    color: var(--muted);
}
.issue-body-part {
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 4px;
}

.issue-resolved-badge, .issue-pending-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}
.issue-resolved-badge {
    background: #22c55e22;
    color: #22c55e;
}
.issue-pending-badge {
    background: #f59e0b22;
    color: #f59e0b;
}

.issue-coach-response {
    margin-top: 8px;
    padding: 10px;
    background: var(--card2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    border-right: 3px solid var(--lime);
}
.issue-coach-response strong {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
}

.issue-response-section {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 8px;
}
.issue-action-btns {
    display: flex;
    gap: 8px;
}
.issue-resolved-section {
    border-top: 1px solid var(--line);
    padding-top: 8px;
    margin-top: 8px;
}

/* ── Issue Type Grid (report form) ─────────────────── */
.issue-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.issue-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card2);
    color: var(--text2);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.issue-type-btn:hover {
    border-color: var(--lime-dim);
    color: var(--text);
}
.issue-type-active {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb),0.1);
    color: var(--lime);
}
.issue-type-icon {
    font-size: 22px;
}
.issue-type-label {
    font-weight: 600;
}

/* ── Severity Selector ─────────────────────────────── */
.severity-selector {
    display: flex;
    gap: 6px;
}
.severity-btn {
    flex: 1;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card2);
    color: var(--text2);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.severity-btn:hover { border-color: var(--lime-dim); }
.severity-active {
    border-color: var(--lime);
    background: rgba(var(--accent-rgb),0.1);
    color: var(--lime);
}
.severity-btn-low.severity-active { border-color: #22c55e; background: #22c55e22; color: #22c55e; }
.severity-btn-medium.severity-active { border-color: #f59e0b; background: #f59e0b22; color: #f59e0b; }
.severity-btn-high.severity-active { border-color: #ef4444; background: #ef444422; color: #ef4444; }
.severity-btn-critical.severity-active { border-color: #ef4444; background: #ef4444; color: white; }

/* ── FAB Button (report issue) ──────────────────────── */
.fab-issue-report {
    position: fixed;
    bottom: 74px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(239,68,68,0.4);
    z-index: 50;
    transition: transform 0.2s, box-shadow 0.2s;
}
.fab-issue-report:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(239,68,68,0.5);
}

/* ═══════════════════════════════════════════════════════
   Performance Rating Styles
   ═══════════════════════════════════════════════════════ */

/* ── Rating Selector (in record modal) ──────────────── */
.performance-rating-selector {
    display: flex;
    gap: 8px;
}
.rating-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--card2);
    color: var(--text2);
    font: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.rating-btn:hover {
    border-color: var(--lime-dim);
    transform: translateY(-1px);
}
.rating-icon {
    font-size: 28px;
    line-height: 1;
}
.rating-label {
    font-size: 13px;
    font-weight: 700;
}
.rating-active-good {
    border-color: #22c55e;
    background: #22c55e15;
    color: #22c55e;
    box-shadow: 0 0 16px rgba(34,197,94,0.15);
}
.rating-active-medium {
    border-color: #f59e0b;
    background: #f59e0b15;
    color: #f59e0b;
    box-shadow: 0 0 16px rgba(245,158,11,0.15);
}
.rating-active-poor {
    border-color: #ef4444;
    background: #ef444415;
    color: #ef4444;
    box-shadow: 0 0 16px rgba(239,68,68,0.15);
}

/* ── Rating Badge (in records preview) ───────────────── */
.record-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}
.record-rating-good {
    background: #22c55e22;
    color: #22c55e;
}
.record-rating-medium {
    background: #f59e0b22;
    color: #f59e0b;
}
.record-rating-poor {
    background: #ef444422;
    color: #ef4444;
}

/* ── News Page ──────────────────────────────────────── */
.news-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.news-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.news-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line-strong);
    background: var(--card2);
    color: var(--text);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font: inherit;
}
.news-refresh-btn:disabled { opacity: 0.6; cursor: wait; }
.news-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 10px;
}
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-card {
    display: block;
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.news-card:hover {
    border-color: var(--lime);
    background: var(--card3);
    transform: translateY(-1px);
}
.news-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.news-region-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}
.region-ir { background: rgba(34,197,94,0.12); color: #22c55e; }
.region-world { background: rgba(59,130,246,0.12); color: #60a5fa; }
.news-date { font-size: 11px; color: var(--muted); }
.news-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.55;
    color: var(--text);
}
.news-summary {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}
.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.news-source {
    font-size: 12px;
    font-weight: 700;
    color: var(--lime);
    border: 1px solid rgba(190,242,100,0.35);
    background: rgba(190,242,100,0.08);
    border-radius: 20px;
    padding: 5px 12px;
}
.news-open {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}
.news-card:hover .news-open { color: var(--lime); }
.loading-state {
    text-align: center;
    color: var(--muted);
    padding: 28px 12px;
    font-size: 14px;
}

/* ── Body photos ─────────────────────────────────────── */
.bp-coach-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.bp-coach-label {
    font-size: 12px;
    color: var(--muted);
    background: var(--card3);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 4px 10px;
}
.bp-coach-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--lime);
}
.bp-hint {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}
.bp-actions {
    display: flex;
    gap: 10px;
}
.bp-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s, transform 0.15s;
    text-align: center;
    min-width: 0;
}
.bp-btn:disabled { opacity: 0.55; cursor: wait; }
.bp-btn:not(:disabled):active { transform: scale(0.98); }
.bp-btn-primary {
    background: var(--lime);
    color: var(--on-accent);
    border-color: var(--lime);
}
.bp-btn-secondary {
    background: var(--card2);
    color: var(--text);
    border-color: var(--line-strong);
}
.bp-btn-secondary:not(:disabled):hover { border-color: var(--lime); color: var(--lime); }
.bp-btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--line);
}
.bp-btn-ghost:not(:disabled):hover { color: var(--text); border-color: var(--line-strong); }
.bp-status {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    padding: 10px;
    background: var(--card3);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
}
.bp-preview-card {
    margin-top: 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card3);
}
.bp-preview-card[hidden] { display: none !important; }
.bp-preview-img {
    display: block;
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    background: #000;
}
.bp-preview-img[hidden] { display: none !important; }
.bp-preview-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}
.bp-preview-meta strong { color: var(--text); }
.bp-preview-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px;
}
.bp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.bp-cell {
    background: var(--card3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.bp-cell img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg2);
}
.bp-cell span {
    display: block;
    padding: 6px 8px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}
.bp-cell img { cursor: zoom-in; }

/* Fullscreen camera overlay */
.bp-camera-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #000;
    display: flex;
    flex-direction: column;
}
.bp-camera-overlay[hidden] { display: none !important; }
.bp-camera-overlay video {
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}
.bp-camera-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 16px 28px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
}
.bp-camera-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.bp-camera-shutter {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: var(--lime);
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.35);
}
.bp-camera-shutter:active { transform: scale(0.94); }
.bp-camera-hint {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
}

/* Fullscreen lightbox */
.bp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0,0,0,0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 16px;
}
.bp-lightbox[hidden] { display: none !important; }
.bp-lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.bp-lightbox-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 1;
}
.chat-photo {
    display: block;
    max-width: 220px;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 4px;
}

/* ── Photo decorations (theme-aware) ────────────────── */
.bg-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(0.55) contrast(1.08) brightness(0.75);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}
.bg-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 15%, rgba(var(--accent-rgb), 0.35), transparent 60%),
        linear-gradient(to bottom, rgba(0,0,0,0.25), var(--bg) 95%);
}
.bg-photo-login {
    background-image: url('../photos/login-bg.jpg');
}
.bg-photo-register {
    background-image: url('../photos/register-bg.jpg');
}
[data-theme="orange"] .bg-photo-login {
    background-image: url('../photos/login-bg-orange.jpg');
}
[data-theme="orange"] .bg-photo-register {
    background-image: url('../photos/register-bg-orange.jpg');
}
[data-theme="blue"] .bg-photo-login {
    background-image: url('../photos/login-bg-blue.jpg');
}
[data-theme="blue"] .bg-photo-register {
    background-image: url('../photos/register-bg-blue.jpg');
}
[data-theme="blue"] .bg-photo {
    filter: grayscale(0.4) brightness(1.05);
    opacity: 0.35;
}
[data-theme="blue"] .bg-photo::after {
    background:
        radial-gradient(ellipse at 50% 15%, rgba(var(--accent-rgb), 0.22), transparent 60%),
        linear-gradient(to bottom, rgba(255,255,255,0.35), var(--bg) 95%);
}
[data-theme="orange"] .bg-photo::after {
    background:
        radial-gradient(ellipse at 50% 15%, rgba(var(--accent-rgb), 0.32), transparent 60%),
        linear-gradient(to bottom, rgba(0,0,0,0.3), var(--bg) 95%);
}
.login-bg .bg-circle,
.login-bg .bg-grid,
.login-bg .bg-silhouettes,
.login-bg .bg-particles,
.login-bg .bg-energy { z-index: 1; }
.login-container { position: relative; z-index: 2; }

/* Dashboard hero photo */
.hero-photo {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 52%;
    background: url('../photos/dashboard-hero.jpg') center 30% / cover no-repeat;
    background-image: url('../photos/dashboard-hero.jpg');
    opacity: 0.4;
    filter: grayscale(0.5) contrast(1.05);
    -webkit-mask-image: linear-gradient(to left, black 10%, transparent 95%);
    mask-image: linear-gradient(to left, black 10%, transparent 95%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}
.hero-card > div { position: relative; z-index: 1; }
[data-theme="blue"] .hero-photo {
    opacity: 0.3;
    filter: grayscale(0.35) brightness(1.1);
    background-image: url('../photos/dashboard-hero-blue.jpg');
}
[data-theme="orange"] .hero-photo {
    opacity: 0.45;
    background-image: url('../photos/dashboard-hero-orange.jpg');
}

/* Programs hero photo */
.ph-photo {
    position: absolute;
    inset: 0;
    background: url('../photos/programs-banner.jpg') center 35% / cover no-repeat;
    background-image: url('../photos/programs-banner.jpg');
    opacity: 0.38;
    filter: grayscale(0.55) contrast(1.1);
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 45%);
    mask-image: linear-gradient(to left, transparent 0%, black 45%);
    pointer-events: none;
}
.programs-hero::before { z-index: 1; }
.programs-hero-bg { z-index: 2; }
.programs-hero-content { z-index: 3; }
[data-theme="blue"] .ph-photo {
    opacity: 0.3;
    filter: grayscale(0.4) brightness(1.15);
    background-image: url('../photos/programs-banner-blue.jpg');
}
[data-theme="orange"] .ph-photo {
    background-image: url('../photos/programs-banner-orange.jpg');
}

/* Generic page banner */
.page-banner {
    position: relative;
    height: 140px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    background: var(--card2);
}
.page-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.35) contrast(1.05);
}
.page-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to left, rgba(var(--accent-rgb), 0.28), transparent 55%),
        linear-gradient(to top, rgba(0,0,0,0.45), transparent 60%);
    pointer-events: none;
}
.page-banner .banner-label {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(6px);
    padding: 5px 12px;
    border-radius: 20px;
}
[data-theme="blue"] .page-banner::after {
    background:
        linear-gradient(to left, rgba(var(--accent-rgb), 0.22), transparent 55%),
        linear-gradient(to top, rgba(255,255,255,0.35), transparent 55%);
}
[data-theme="blue"] .page-banner .banner-label {
    color: var(--text);
    background: rgba(255,255,255,0.55);
    border-color: var(--line-strong);
}

/* News card thumbs */
.news-card {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.news-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--line);
    filter: grayscale(0.25) contrast(1.05);
    align-self: flex-start;
    background: var(--card3);
}
.news-card-body { flex: 1; min-width: 0; }

/* List avatar photos */
.avatar-photo {
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(var(--accent-rgb), 0.35);
}
.avatar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.2) contrast(1.05);
}

/* Thumb cards on dashboard */
.thumb-photo[src*="photos/"] {
    object-fit: cover;
}

/* AI hero photo */
.ai-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
}
.ai-hero-photo {
    position: absolute;
    inset: 0;
    background: url('../photos/ai-hero.jpg') center 20% / cover no-repeat;
    background-image: url('../photos/ai-hero.jpg');
    opacity: 0.22;
    filter: grayscale(0.6) contrast(1.1);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
    mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
    pointer-events: none;
}
.ai-hero > *:not(.ai-hero-photo) { position: relative; z-index: 1; }
[data-theme="blue"] .ai-hero-photo {
    opacity: 0.18;
    filter: grayscale(0.45) brightness(1.1);
    background-image: url('../photos/ai-hero-blue.jpg');
}
[data-theme="orange"] .ai-hero-photo {
    background-image: url('../photos/ai-hero-orange.jpg');
}

/* Shop store covers */
.shop-card {
    padding: 0 !important;
    overflow: hidden;
}
.shop-card-cover {
    width: 100%;
    height: 88px;
    background-size: cover;
    background-position: center;
    filter: grayscale(0.35) contrast(1.05);
    border-bottom: 1px solid var(--line);
}
.shop-card-icon,
.shop-card-name,
.shop-card-type,
.shop-card-count { padding-left: 10px; padding-right: 10px; }
.shop-card-icon { margin-top: 10px; }

/* Shop banner */
.shop-banner {
    position: relative;
    height: 130px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}
.shop-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.3) contrast(1.05);
}
.shop-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to left, rgba(var(--accent-rgb), 0.35), transparent 60%),
        linear-gradient(to top, rgba(0,0,0,0.5), transparent 55%);
}
.shop-banner-copy {
    position: absolute;
    right: 16px;
    bottom: 14px;
    z-index: 1;
    color: #fff;
}
.shop-banner-copy strong { display: block; font-size: 16px; font-weight: 800; }
.shop-banner-copy span { font-size: 12px; opacity: 0.85; }
[data-theme="blue"] .shop-banner::after {
    background:
        linear-gradient(to left, rgba(var(--accent-rgb), 0.28), transparent 60%),
        linear-gradient(to top, rgba(255,255,255,0.4), transparent 55%);
}
[data-theme="blue"] .shop-banner-copy { color: var(--text); }

/* Product image box with optional photo */
.product-image.has-photo {
    padding: 0;
    overflow: hidden;
}
.product-image.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* BodyPhotos empty / upload hint art */
.bp-art {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    opacity: 0.85;
    filter: grayscale(0.35) contrast(1.05);
    border: 1px solid var(--line);
}

/* Hide download-app UI inside Android WebView ─────── */
html.in-app a[href*="download/iranfits"],
html.in-app a[href*="download/iranfits.apk"],
html.in-app [data-hide-in-app],
html.in-app .if-app-banner {
    display: none !important;
}

.ai-alternative-list,
.ai-alternative-manual {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.ai-alternative-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md, 14px);
    background: var(--card2);
}
.ai-alternative-copy strong { display: block; color: var(--text); }
.ai-alternative-copy p,
.ai-alternative-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.ai-alternative-map { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.ai-alternative-gif {
    display: block;
    width: min(100%, 280px);
    max-height: 220px;
    margin-inline: auto;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.jalali-date-picker { display:grid; grid-template-columns: 1fr 1.5fr 1fr; gap:8px; }
.measurement-history { border-top:1px solid var(--line); padding:10px 0; color:var(--text2); font-size:13px; }
.measurement-history summary { cursor:pointer; color:var(--text); font-weight:700; margin-bottom:6px; }
.profile-warn { padding:10px 12px; border-radius:10px; color:var(--text); background:rgba(var(--accent-rgb),.12); border:1px solid rgba(var(--accent-rgb),.35); margin:8px 0; }
.wiz-launch-pulse { animation: profile-nudge 1.6s ease-in-out infinite; }
@keyframes profile-nudge { 0%,100% { box-shadow:0 0 0 0 rgba(var(--accent-rgb),.25); } 50% { box-shadow:0 0 0 7px rgba(var(--accent-rgb),.08); } }
@media (prefers-reduced-motion: reduce) { .wiz-launch-pulse { animation:none; } }
.chat-attachment { position:relative; display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:36px; cursor:pointer; border:0; color:var(--lime); background:transparent; }
.chat-attachment input[type=file] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.chat-input-area audio { max-width:100%; }
.chat-attachment-notice { display:block; color:var(--muted); padding:4px 10px; line-height:1.7; }
.chat-voice-record.is-recording { color:#ef4444; animation: chat-record-pulse 1s ease-in-out infinite; }
@keyframes chat-record-pulse { 50% { opacity:.45; } }
.jalali-date-picker select { min-width:0; }

/* ── Profile size selectors (scroll chips + sliders) ── */
.size-scroll-row { display:flex; gap:8px; overflow-x:auto; padding:4px 2px 6px; scrollbar-width:thin; -webkit-overflow-scrolling:touch; }
.size-chip { flex:0 0 auto; min-width:44px; height:44px; padding:0 14px; border-radius:12px; border:1px solid var(--line); background:var(--card2,#1b1b1b); color:var(--text); font-family:inherit; font-weight:700; font-size:15px; cursor:pointer; transition:all .15s ease; }
.size-chip-wide { min-width:96px; font-size:14px; }
.size-chip.is-active { background:var(--lime); color:var(--bg); border-color:var(--lime); box-shadow:0 4px 14px rgba(var(--accent-rgb),.35); }
.size-chip:active { transform:scale(.96); }
.size-slider { -webkit-appearance:none; appearance:none; width:100%; height:6px; border-radius:999px; background:var(--line); outline:none; margin:14px 0 4px; }
.size-slider::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:26px; height:26px; border-radius:50%; background:var(--lime); border:3px solid var(--bg); box-shadow:0 2px 8px rgba(0,0,0,.35); cursor:pointer; }
.size-slider::-moz-range-thumb { width:22px; height:22px; border-radius:50%; background:var(--lime); border:3px solid var(--bg); cursor:pointer; }
.size-value { display:inline-block; margin-top:2px; font-weight:700; color:var(--lime); }

/* ── Unread message badge ── */
.msg-badge { position:absolute; top:-4px; left:-4px; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:#ef4444; color:#fff; font-size:10px; font-weight:800; line-height:18px; text-align:center; box-shadow:0 0 0 2px var(--card); }
.menu-icon-wrap { position:relative; display:inline-flex; }

/* ── AI plan coach-select link ── */
.coach-select-link { display:block; margin:12px 0; padding:12px; border-radius:12px; text-align:center; font-weight:700; text-decoration:none; background:var(--lime); color:var(--bg); }

/* ── Expired program notice ── */
.program-expired { margin-top:8px; padding:10px 12px; border-radius:12px; background:rgba(239,68,68,0.12); border:1px solid rgba(239,68,68,0.35); color:var(--text); font-size:13px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.btn-renew { padding:6px 12px; border-radius:10px; border:1px solid var(--lime); background:transparent; color:var(--lime); font-weight:700; font-family:inherit; cursor:pointer; text-decoration:none; }
.btn-renew:hover { background:var(--lime); color:var(--bg); }
#components-reconnect-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 9, 7, .78);
    backdrop-filter: blur(6px);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-paused,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

#components-reconnect-modal .reconnect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(100%, 360px);
    padding: 28px 24px;
    color: var(--text-primary, #f4f7f5);
    text-align: center;
    background: var(--surface-card, #142019);
    border: 1px solid var(--border-color, rgba(255,255,255,.12));
    border-radius: 24px;
    box-shadow: 0 18px 60px rgba(0,0,0,.4);
}

#components-reconnect-modal .reconnect-card small { color: var(--text-secondary, #a9b6ad); }
#components-reconnect-modal .reconnect-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255,255,255,.18);
    border-top-color: var(--accent, #c6f03f);
    border-radius: 50%;
    animation: reconnect-spin .8s linear infinite;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .reconnect-spinner { display: none; }
#components-reconnect-modal #reconnect-retry { display: none; }
#components-reconnect-modal.components-reconnect-failed #reconnect-retry { display: inline-flex; }
#components-reconnect-modal #reconnect-retry {
    margin-top: 8px;
    padding: 11px 24px;
    color: #10170b;
    font-weight: 700;
    background: var(--accent, #c6f03f);
    border: 0;
    border-radius: 12px;
}

@keyframes reconnect-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #components-reconnect-modal .reconnect-spinner { animation-duration: 2s; } }

.voice-prompt-actions { display:flex; align-items:center; gap:10px; margin-top:8px; }
.btn-voice-prompt { min-height:42px; padding:9px 14px; border:1px solid var(--border-color, rgba(255,255,255,.14)); border-radius:12px; background:var(--surface-card, #17221c); color:var(--text-primary, #f4f7f5); font:inherit; font-weight:700; cursor:pointer; }
.btn-voice-prompt.recording { border-color:#ef4444; color:#fca5a5; }
.btn-voice-prompt:disabled { opacity:.55; cursor:not-allowed; }
.voice-prompt-status { color:var(--text-secondary, #a9b6ad); font-size:13px; }
