/* ═══════════════════════════════════════════════════════════
   IRONTRACK — MAIN STYLESHEET
   Reads all design tokens (colors, fonts, spacing, shadows,
   radius) from tokens.css. This file consumes those tokens
   only — no hardcoded colors or fonts below.
═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
html, body { width: 100%; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; background: none; border: none; }
input, textarea, select { font-family: inherit; }

body { max-width: 100vw; }
body.menu-open { overflow: hidden; }

body {
    background: var(--bg);
    color: var(--white);
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--lh-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    transition: background var(--t-lg) var(--ease), color var(--t-lg) var(--ease);
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: var(--r-full); }
html { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
::selection { background: var(--lime); color: #000; }
[data-theme="light"] ::selection { background: var(--lime); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   SKELETON / SHIMMER LOADING
═══════════════════════════════════════════════════════════ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--card2) 25%, var(--card3) 50%, var(--card2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--r-sm);
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}
.skeleton-text { height: 1em; width: 100%; margin-bottom: 0.5em; }
.skeleton-text-sm { height: 0.75em; width: 60%; }
.skeleton-block { height: 120px; width: 100%; border-radius: var(--r-md); }
.skeleton-circle { width: 48px; height: 48px; border-radius: var(--r-full); }

/* Screen-reader only utility */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════════════════════
   BACKGROUND EFFECTS
═══════════════════════════════════════════════════════════ */
.cursor-glow {
    position: fixed;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--lime-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: left 0.08s linear, top 0.08s linear;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.glass {
    background: rgba(4,4,4,0.4);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid var(--line);
}
[data-theme="light"] .glass { background: rgba(250,249,247,0.5); }

.tilt-3d {
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
    will-change: transform;
}
.tilt-3d:hover {
    transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-glow {
    position: relative;
    isolation: isolate;
}
.card-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(600px circle at var(--mx,50%) var(--my,50%), var(--lime-glow) 0%, transparent 60%);
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: -1;
}
.card-glow:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   GUEST / VERIFY BANNERS
═══════════════════════════════════════════════════════════ */
.guest-banner {
    background: var(--lime-glow);
    border-bottom: 1px solid var(--lime-glow2);
    padding: var(--space-3) var(--space-8);
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-4); flex-wrap: wrap;
    font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g1);
    position: sticky; top: 58px; z-index: 99;
    backdrop-filter: blur(12px);
}
.guest-banner span { display: flex; align-items: center; gap: var(--space-2); }
.verify-banner { background: rgba(255,176,32,0.07); border-bottom-color: rgba(255,176,32,0.25); }

.guest-banner-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.guest-banner-btn {
    background: var(--lime); color: #000;
    padding: 0.3rem var(--space-4); border-radius: var(--r-full);
    font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold);
    transition: all var(--t) var(--ease);
}
.guest-banner-btn:hover { background: var(--lime-dim); }
.guest-banner-link { color: var(--lime); font-size: var(--text-xs); font-weight: var(--fw-medium); transition: opacity var(--t); }
.guest-banner-link:hover { opacity: 0.7; }
[data-theme="light"] .guest-banner-btn { color: #fff; }

@media (max-width: 768px) {
    .guest-banner { padding: var(--space-3) var(--space-4); flex-direction: column; text-align: center; }
    .guest-banner-actions { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════ */
.navbar {
    height: 58px;
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--space-8);
    background: rgba(4,4,4,0.75);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 100;
    transition: background var(--t-lg) var(--ease), box-shadow var(--t-md) var(--ease), border-color var(--t-md) var(--ease);
}
.navbar.scrolled { background: rgba(4,4,4,0.95); box-shadow: var(--shadow-md); border-bottom-color: var(--line2); }
[data-theme="light"] .navbar { background: rgba(250,249,247,0.85); }
[data-theme="light"] .navbar.scrolled { background: rgba(250,249,247,0.97); box-shadow: var(--shadow-sm); }

.nav-logo { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: 1.55rem; font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); transition: opacity var(--t); }
.nav-logo:hover { opacity: 0.85; transform: scale(1.03); }
.nav-logo-img { width: 30px; height: 30px; }
.nav-logo-iron { color: var(--white); }
.nav-logo-track { color: var(--lime); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--g2); padding: 0.38rem 0.8rem; border-radius: var(--r-full); transition: all var(--t) var(--ease); }
.nav-links a:hover { color: var(--white); background: var(--card2); }
.nav-links a.active { color: #000; background: var(--lime); font-weight: var(--fw-bold); box-shadow: 0 0 20px var(--lime-glow2); }
[data-theme="light"] .nav-links a.active { color: #fff; }

.theme-toggle { background: var(--card2); border: 1px solid var(--line2); border-radius: var(--r-full); padding: 0.32rem 0.6rem; color: var(--g2); margin-left: var(--space-2); transition: all var(--t) var(--ease); display: flex; align-items: center; }
.theme-toggle:hover { border-color: var(--lime); color: var(--lime); transform: scale(1.08); }

.nav-user { display: flex; align-items: center; gap: var(--space-3); margin-left: var(--space-2); padding-left: var(--space-3); border-left: 1px solid var(--line2); }
.nav-user-name { display: flex; align-items: center; gap: var(--space-1); font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2); font-weight: var(--fw-medium); white-space: nowrap; transition: color var(--t); }
.nav-user-name:hover { color: var(--lime); }
.nav-user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--lime); flex-shrink: 0; }

.btn-nav-logout { background: var(--card2); color: var(--g2); border: 1px solid var(--line2); }
.btn-nav-logout:hover { background: rgba(255,59,59,0.08); color: var(--red); border-color: rgba(255,59,59,0.25); }

.nav-mobile-controls { display: none; align-items: center; gap: var(--space-3); }
.nav-burger { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 38px; height: 38px; background: var(--card2); border: 1px solid var(--line2); border-radius: var(--r-sm); transition: all var(--t) var(--ease); }
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.25s var(--ease); }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-burger:hover { border-color: var(--lime); transform: scale(1.06); }

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU
═══════════════════════════════════════════════════════════ */
.mobile-menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 199; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); }
.mobile-menu-overlay.open { opacity: 1; pointer-events: all; }

.mobile-menu {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
    background: var(--card); border-left: 1px solid var(--line); z-index: 200;
    transform: translateX(100%); transition: transform 0.35s var(--ease-spring);
    display: flex; flex-direction: column; overflow-y: auto;
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line); }
.mobile-menu-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); color: var(--g3); }
.mobile-menu-close { width: 36px; height: 36px; background: var(--card2); border: 1px solid var(--line2); border-radius: 50%; color: var(--white); display: flex; align-items: center; justify-content: center; transition: all var(--t) var(--ease); }
.mobile-menu-close:hover { border-color: var(--lime); color: var(--lime); transform: scale(1.08) rotate(90deg); }

.mobile-menu-user { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line); background: var(--card2); transition: background var(--t); }
.mobile-menu-user:hover { background: var(--card3); }
.mobile-menu-avatar { width: 44px; height: 44px; background: var(--lime); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.3rem; font-weight: var(--fw-bold); flex-shrink: 0; }
.mobile-menu-avatar-img { object-fit: cover; border: 2px solid var(--lime); }
.mobile-menu-user-name { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--white); }
.mobile-menu-user-sub { font-size: var(--text-xs); color: var(--lime); font-family: var(--font-ui); }

.mobile-menu-links { flex: 1; padding: var(--space-2) 0; }
.mobile-menu-links a { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-6); font-family: var(--font-ui); font-size: 0.95rem; font-weight: var(--fw-medium); color: var(--g1); border-left: 3px solid transparent; transition: all var(--t) var(--ease); }
.mobile-menu-links a:hover { background: var(--card2); color: var(--white); }
.mobile-menu-links a:hover .icon { color: var(--lime); transform: scale(1.15); }
.mobile-menu-links a.active { background: var(--lime-glow); color: var(--lime); border-left-color: var(--lime); font-weight: var(--fw-bold); }
.mobile-menu-footer { padding: var(--space-5) var(--space-6); border-top: 1px solid var(--line); }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-mobile-controls { display: flex; }
    .navbar { padding: 0 var(--space-4); }
    .nav-logo span { font-size: 1.3rem; }
    .nav-logo-img { width: 28px; height: 28px; }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT / MAIN
═══════════════════════════════════════════════════════════ */
.main-content { flex: 1; width: 100%; max-width: 100vw; margin: 0 auto; padding: var(--space-8) var(--space-8); position: relative; z-index: 2; overflow-x: hidden; }

.flash-message {
    background: rgba(255,176,32,0.07); border: 1px solid rgba(255,176,32,0.25); color: var(--amber);
    padding: var(--space-3) var(--space-5); border-radius: var(--r-sm); margin-bottom: var(--space-6);
    font-size: var(--text-sm); font-family: var(--font-ui); display: flex; align-items: center; gap: var(--space-2);
}

.page-header { margin-bottom: var(--space-6); }
.page-header h1 { color: var(--white); }
.page-header p { color: var(--g2); margin-top: var(--space-2); font-size: var(--text-sm); font-family: var(--font-ui); }

/* ── FIELD VALIDATION ── */
.field-error {
    color: var(--red); font-size: var(--text-xs); font-family: var(--font-ui);
    margin-top: 0.3rem; display: flex; align-items: center; gap: 0.3rem;
    animation: fadeUp 0.2s var(--ease-out);
}
.input-wrap.error .auth-input,
.input-wrap.error .text-input { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,59,59,0.1); }

/* ── TOAST NOTIFICATIONS ── */
.toast-container {
    position: fixed; top: 72px; right: 1rem; z-index: 99998;
    display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none;
}
.toast {
    pointer-events: auto;
    padding: 0.75rem 1.25rem; border-radius: var(--r-sm);
    font-family: var(--font-ui); font-size: var(--text-sm);
    display: flex; align-items: center; gap: 0.5rem;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s var(--ease-out);
    max-width: 380px;
}
.toast-success { background: var(--emerald); color: #000; }
.toast-error { background: var(--red); color: #fff; }
.toast-info { background: var(--card3); color: var(--white); border: 1px solid var(--line); }
.toast-out { animation: toastOut 0.25s var(--ease-in) forwards; }
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ── CUSTOM MODAL ── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.15s var(--ease-out);
}
.modal {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 2rem; max-width: 420px; width: 90%;
    box-shadow: var(--shadow-lg); animation: modalIn 0.2s var(--ease-out);
    position: relative;
}
.modal h3 { margin-bottom: 0.75rem; }
.modal p { color: var(--g2); font-size: var(--text-sm); margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }
@keyframes modalIn { from { transform: scale(0.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Shortcut modal grid (base.html) — collapses to one column on phones */
.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1rem 0; }
@media (max-width: 480px) { .shortcut-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 0.6rem 1.3rem; border-radius: var(--r-sm); font-size: var(--text-sm); transition: all var(--t) var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary { background: var(--lime); color: #000; box-shadow: 0 4px 20px var(--lime-glow2); }
.btn-primary:hover { background: var(--lime-dim); }
[data-theme="light"] .btn-primary { color: #fff; }

.btn-outline { background: transparent; color: var(--lime); border: 1.5px solid var(--lime); }
.btn-outline:hover { background: var(--lime-glow); }

.btn-success { background: var(--emerald); color: #000; box-shadow: 0 4px 16px rgba(0,255,135,0.2); }
.btn-success:hover { filter: brightness(0.9); }

.btn-danger { background: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(255,59,59,0.2); }
.btn-danger:hover { filter: brightness(0.9); }

.btn-ghost { background: var(--card2); color: var(--g2); border: 1px solid var(--line2); }
.btn-ghost:hover { color: var(--white); background: var(--card3); }

.btn-sm { padding: 0.28rem 0.72rem; font-size: var(--text-xs); border-radius: var(--r-xs); }
.btn-lg { padding: 0.82rem 2rem; font-size: var(--text-h5); border-radius: var(--r-md); }
.btn-full { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ═══════════════════════════════════════════════════════════
   INPUTS
═══════════════════════════════════════════════════════════ */
.text-input { background: var(--card2); border: 1.5px solid var(--line); color: var(--white); padding: 0.58rem 0.95rem; border-radius: var(--r-sm); font-family: var(--font-body); font-size: var(--text-sm); width: 100%; outline: none; transition: border-color var(--t), box-shadow var(--t); }
.text-input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-glow); }
.text-input::placeholder { color: var(--g3); }
.text-input:disabled { opacity: 0.5; cursor: not-allowed; }

.form-group { margin-bottom: var(--space-5); }
.form-group label { display: block; margin-bottom: 0.42rem; }

.input-wrap { position: relative; display: flex; align-items: center; }
.inline-form { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.inline-form .text-input { flex: 1; min-width: 200px; }

/* ═══════════════════════════════════════════════════════════
   ICON SYSTEM (SVG SPRITE)
═══════════════════════════════════════════════════════════ */
.icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; vertical-align: middle; position: relative; top: -1px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.icon-xs { width: 14px; height: 14px; stroke-width: 2; }
.icon-sm { width: 16px; height: 16px; stroke-width: 2; }
.icon-md { width: 20px; height: 20px; stroke-width: 2; }
.icon-lg { width: 28px; height: 28px; stroke-width: 1.75; }
.icon-xl { width: 40px; height: 40px; stroke-width: 1.5; }
.icon-float { width: 24px; height: 24px; stroke-width: 2; color: #000; }
.icon-feature { width: 36px; height: 36px; stroke-width: 1.75; color: var(--lime); }
.icon-input { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke-width: 2; color: var(--g3); pointer-events: none; z-index: 1; }
.feature-icon-wrap { margin-bottom: var(--space-4); display: flex; align-items: center; height: 40px; }
@media (max-width: 480px) { .icon-feature { width: 28px; height: 28px; } .icon-xl { width: 32px; height: 32px; } }

/* ═══════════════════════════════════════════════════════════
   HOME — HERO
═══════════════════════════════════════════════════════════ */
.hero { display: grid; grid-template-columns: 1fr 400px; gap: var(--space-16); align-items: center; padding: var(--space-12) 0; position: relative; min-height: 70vh; }
.hero::before { content: ''; position: absolute; width: 800px; height: 800px; background: radial-gradient(circle, var(--lime-glow) 0%, transparent 65%); top: 50%; left: 25%; transform: translate(-50%, -50%); pointer-events: none; }

.hero-label { display: inline-flex; align-items: center; gap: var(--space-3); font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); color: var(--lime); text-transform: uppercase; margin-bottom: var(--space-6); padding: 0.32rem var(--space-4); background: var(--lime-glow); border: 1px solid var(--lime-glow2); border-radius: var(--r-full); width: fit-content; }
.hero-label-dot { width: 6px; height: 6px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 8px var(--lime); animation: blink 1.5s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.hero-heading { font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 6.5rem); font-weight: var(--fw-bold); letter-spacing: 0.02em; line-height: 1.05; margin-bottom: var(--space-8); color: var(--white); }
.hero-heading-accent { color: var(--lime); }
.hero-heading-outline { -webkit-text-stroke: 1px var(--white); color: transparent; paint-order: stroke fill; }

.hero-sub { color: var(--g2); max-width: 420px; margin-top: var(--space-6); margin-bottom: var(--space-10); font-size: var(--text-h5); line-height: var(--lh-relaxed); font-weight: var(--fw-light); }
.hero-buttons { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-10); }

.hero-meta { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2); flex-wrap: wrap; }
.hero-meta-sep { color: var(--line3); }
.hero-meta-item { display: flex; align-items: center; gap: var(--space-2); }

.hero-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-6); text-align: center; transition: all var(--t-md) var(--ease); position: relative; overflow: hidden; }
.stat-card:hover { border-color: var(--line2); transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-md); }
.stat-card-lg { grid-column: 1 / -1; padding: var(--space-8); border-color: var(--lime-glow2); }
.stat-card-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 80%, var(--lime-glow), transparent 70%); pointer-events: none; }

.stat-number { display: block; font-family: var(--font-display); font-size: 3rem; font-weight: var(--fw-bold); color: var(--white); line-height: 1; margin-bottom: 0.3rem; }
.stat-card-lg .stat-number { font-size: 4.5rem; color: var(--amber); }
.stat-label { display: flex; align-items: center; justify-content: center; gap: var(--space-1); font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g2); letter-spacing: var(--ls-wide); text-transform: uppercase; font-weight: var(--fw-medium); }

/* ═══════════════════════════════════════════════════════════
   MARQUEE
═══════════════════════════════════════════════════════════ */
.marquee-wrap {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 0;
    background: var(--card);
    position: relative;
    z-index: 2;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.marquee-track {
    display: flex; gap: var(--space-10); align-items: center;
    animation: marquee 25s linear infinite;
    width: max-content;
    font-family: var(--font-display); font-size: var(--text-sm);
    font-weight: var(--fw-bold); letter-spacing: var(--ls-wider);
    color: var(--g3); will-change: transform;
}
.marquee-track span { white-space: nowrap; }
.marquee-track .dot { color: var(--g3); font-size: 0.6rem; margin: 0 calc(var(--space-5) * -1); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }

/* Highlight the active workout day (current in rotation) */
.marquee-track .day-active {
    color: #000;
    background: var(--lime);
    padding: 0.15rem 0.7rem;
    border-radius: var(--r-full);
    box-shadow: 0 0 16px var(--lime-glow2);
}
[data-theme="light"] .marquee-track .day-active { color: #fff; }

/* ═══════════════════════════════════════════════════════════
   FEATURES SECTION
═══════════════════════════════════════════════════════════ */
.features-section { padding: var(--space-10) 0 var(--space-8); }
.features-header { margin-bottom: var(--space-10); }
.features-eyebrow { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); color: var(--g2); text-transform: uppercase; margin-bottom: var(--space-3); }
.section-title { font-family: var(--font-display); font-size: 3.5rem; font-weight: var(--fw-bold); letter-spacing: 1px; line-height: 1; color: var(--white); }
.section-title span { color: var(--white); }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); grid-auto-rows: 1fr; }
.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--space-8);
    transition: all var(--t-md) var(--ease);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.feature-card::before { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--lime), var(--emerald)); transform: scaleX(0); transform-origin: left; transition: transform var(--t-md) var(--ease); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover .feature-arrow { transform: translateX(4px); color: var(--lime); }
.feature-card-accent { background: var(--lime-glow); }

.feature-card h3 { font-family: var(--font-ui); font-size: 0.95rem; font-weight: var(--fw-bold); margin-bottom: var(--space-2); color: var(--white); min-height: 2.5rem; display: flex; align-items: center; }
.feature-card p { color: var(--g2); font-size: var(--text-sm); line-height: var(--lh-relaxed); flex: 1; }
.feature-card strong { color: var(--white); font-weight: var(--fw-bold); }
.feature-arrow { margin-top: var(--space-5); color: var(--g3); display: flex; transition: all var(--t-md) var(--ease); }

/* ═══════════════════════════════════════════════════════════
   WORKOUT PAGE
═══════════════════════════════════════════════════════════ */
.add-day-bar { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-5); }
.add-day-bar .inline-form { flex: 1; min-width: 240px; }
.template-link-btn { flex-shrink: 0; white-space: nowrap; }

.day-tabs {
    display: flex; flex-wrap: nowrap; gap: var(--space-2);
    margin-bottom: var(--space-6); overflow-x: auto;
    padding-bottom: var(--space-2); -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
}
.day-tabs.scrolled-end { mask-image: none; -webkit-mask-image: none; }
.day-tabs::-webkit-scrollbar { height: 3px; }
.day-tab { background: var(--card); border: 1px solid var(--line); color: var(--g2); padding: 0.38rem 0.85rem; border-radius: var(--r-full); font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-medium); transition: all var(--t) var(--ease); flex-shrink: 0; white-space: nowrap; }
.day-tab:hover { border-color: var(--line2); color: var(--white); transform: scale(1.05); box-shadow: var(--shadow-sm); }
.day-tab.active { background: var(--lime); color: #000; border-color: var(--lime); font-weight: var(--fw-bold); box-shadow: 0 4px 20px var(--lime-glow2); }
[data-theme="light"] .day-tab.active { color: #fff; }

.workout-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.workout-panel-header { display: flex; justify-content: space-between; align-items: center; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line); background: var(--card2); }
.workout-panel-header h2 { font-size: 1.4rem; letter-spacing: 1px; }

.exercise-list { padding: 0; }
.exercise-item { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem var(--space-6); border-bottom: 1px solid var(--line); transition: background var(--t), padding var(--t); gap: var(--space-4); cursor: pointer; }
.exercise-item:last-child { border-bottom: none; }
.exercise-item:hover { background: var(--card2); padding-left: var(--space-8); }
.exercise-item.empty { justify-content: center; color: var(--g3); font-style: italic; padding: var(--space-10); font-size: var(--text-sm); cursor: default; flex-direction: column; align-items: center; text-align: center; }
.empty-mini-icon { margin-bottom: 0.5rem; color: var(--g4); }
.empty-mini-text { font-style: normal; font-weight: var(--fw-bold); color: var(--g2); font-size: var(--text-body); }
.empty-mini-sub { font-style: normal; color: var(--g3); font-size: var(--text-xs); margin-top: 0.25rem; }
.exercise-item.completed { opacity: 0.5; }
.exercise-item.completed .exercise-name { text-decoration: line-through; }
.exercise-actions { display: flex; gap: var(--space-2); flex-shrink: 0; cursor: default; }
.exercise-name { display: flex; align-items: center; gap: var(--space-3); flex: 1; font-family: var(--font-ui); font-weight: var(--fw-medium); font-size: 0.9rem; }
.exercise-link { color: var(--white); transition: color var(--t); }
.exercise-item:hover .exercise-link { color: var(--lime); }
.icon-success { color: var(--emerald); }
.icon-muted { color: var(--g3); }

.note-row { background: var(--bg2); border-bottom: 1px solid var(--line); padding: var(--space-3) var(--space-6); }
.note-form { display: flex; gap: var(--space-2); }
.note-input { flex: 1; font-size: var(--text-sm); padding: 0.36rem 0.8rem; }

.add-exercise-form { padding: var(--space-5) var(--space-6); border-top: 1px solid var(--line); background: var(--card2); }
.add-exercise-form h3 { font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--ls-wider); color: var(--g3); margin-bottom: var(--space-3); font-weight: var(--fw-bold); }

@media (max-width: 480px) {
    .exercise-item { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
    .exercise-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════
   REST TIMER
═══════════════════════════════════════════════════════════ */
.rest-timer { position: fixed; inset: 0; background: rgba(0,0,0,0.96); display: flex; align-items: center; justify-content: center; z-index: 500; backdrop-filter: blur(24px); }
.rest-timer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-6); animation: popIn 0.4s var(--ease-spring); }
.rest-timer-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
@keyframes popIn { from { transform:scale(0.6); opacity:0; } to { transform:scale(1); opacity:1; } }
.rest-timer-label { font-family: var(--font-display); font-size: 0.85rem; font-weight: var(--fw-bold); letter-spacing: 6px; color: var(--g3); text-transform: uppercase; }
.rest-timer-circle { position: relative; width: 250px; height: 250px; }
.rest-timer-circle svg { transform: rotate(-90deg); width: 100%; height: 100%; filter: drop-shadow(0 0 40px var(--lime-glow2)); }
.rest-timer-bg { fill: none; stroke: var(--card3); stroke-width: 4; }
.rest-timer-ring { fill: none; stroke: var(--lime); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.5s; }
.rest-timer-count { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-family: var(--font-display); font-size: 5.5rem; font-weight: var(--fw-bold); color: var(--white); line-height: 1; }
.rest-timer-sub { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); letter-spacing: var(--ls-wider); text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════
   AI GENERATOR (workout page)
═══════════════════════════════════════════════════════════ */
.ai-generator { margin-top: var(--space-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; position: relative; }
.ai-generator::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--lime), var(--emerald), var(--lime), transparent); background-size: 300% 100%; animation: gradientShift 4s linear infinite; }
@keyframes gradientShift { 0% { background-position:0% 0; } 100% { background-position:300% 0; } }
.ai-generator-header { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line); background: var(--card2); }
.ai-generator-header h3 { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-ui); font-size: 0.85rem; font-weight: var(--fw-bold); letter-spacing: 1px; margin-bottom: 0.15rem; }
.ai-generator-header p { font-size: var(--text-xs); color: var(--g3); }
.ai-generator-controls { display: flex; gap: var(--space-3); padding: var(--space-5) var(--space-6); align-items: center; flex-wrap: wrap; }
.generator-result { padding: var(--space-5) var(--space-6); border-top: 1px solid var(--line); }
.generator-result-title { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); margin-bottom: var(--space-3); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.generated-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.generated-exercise-btn { background: var(--card2); border: 1px solid var(--line2); color: var(--g1); padding: 0.38rem var(--space-4); border-radius: var(--r-full); font-size: var(--text-sm); font-family: var(--font-ui); transition: all var(--t) var(--ease); font-weight: var(--fw-medium); }
.generated-exercise-btn:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); background: var(--lime-glow); transform: scale(1.05); box-shadow: var(--shadow-sm); }
.generated-exercise-btn:disabled { opacity: 0.5; }
.generator-error { padding: var(--space-3) var(--space-6); color: var(--red); font-size: var(--text-sm); border-top: 1px solid var(--line); }

@media (max-width: 480px) {
    .ai-generator-controls { flex-direction: column; align-items: stretch; }
}

/* ═══════════════════════════════════════════════════════════
   BMI PAGE
═══════════════════════════════════════════════════════════ */
.bmi-container { max-width: 520px; margin: 0 auto; }
.bmi-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-8); margin-bottom: var(--space-5); box-shadow: var(--shadow-sm); }
.bmi-result { text-align: center; padding: var(--space-10); border-radius: var(--r-lg); margin-bottom: var(--space-5); border: 1px solid; animation: fadeUp 0.5s var(--ease-out); }
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.bmi-result.bmi-normal     { background: rgba(0,255,135,0.04);  border-color: rgba(0,255,135,0.25); }
.bmi-result.bmi-underweight{ background: rgba(79,142,255,0.04); border-color: rgba(79,142,255,0.25); }
.bmi-result.bmi-overweight { background: rgba(255,176,32,0.04); border-color: rgba(255,176,32,0.25); }
.bmi-result.bmi-obese      { background: rgba(255,59,59,0.04);  border-color: rgba(255,59,59,0.25); }
.bmi-value { font-family: var(--font-display); font-size: 6rem; font-weight: var(--fw-bold); line-height: 1; margin-bottom: var(--space-2); }
.bmi-category { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--g2); }
.bmi-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; max-width: 100%; overflow-x: auto; }
.bmi-table h3 { padding: var(--space-4) var(--space-6); font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--g3); border-bottom: 1px solid var(--line); font-weight: var(--fw-bold); }
.bmi-table table { width: 100%; border-collapse: collapse; }
.bmi-table th, .bmi-table td { padding: var(--space-3) var(--space-6); font-size: var(--text-sm); border-bottom: 1px solid var(--line); text-align: left; }
.bmi-table tr:last-child td { border-bottom: none; }
.bmi-table th { color: var(--g3); font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.bmi-table tr:hover td { background: var(--card2); }
.tag { display: inline-block; padding: 0.2rem 0.65rem; border-radius: var(--r-full); font-size: var(--text-xs); font-weight: var(--fw-bold); font-family: var(--font-ui); }
.tag.underweight { background: rgba(79,142,255,0.1); color: var(--blue); }
.tag.normal      { background: rgba(0,255,135,0.1);  color: var(--emerald); }
.tag.overweight  { background: rgba(255,176,32,0.1); color: var(--amber); }
.tag.obese       { background: rgba(255,59,59,0.1);  color: var(--red); }

/* ═══════════════════════════════════════════════════════════
   SUMMARY PAGE
═══════════════════════════════════════════════════════════ */
.summary-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-bottom: var(--space-5); }
.overview-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--space-7) var(--space-5);
    text-align: center;
    transition: all var(--t-md) var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-sm);
}
.overview-card:hover {
    background: var(--card2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--lime);
}
.overview-card.highlight {
    background: var(--lime);
    border: 1px solid var(--lime);
    box-shadow: 0 4px 24px var(--lime-glow2);
}
.overview-card.highlight .overview-number,
.overview-card.highlight .overview-label,
.overview-card.highlight .overview-icon { color: #000; }
[data-theme="light"] .overview-card.highlight .overview-number,
[data-theme="light"] .overview-card.highlight .overview-label,
[data-theme="light"] .overview-card.highlight .overview-icon { color: #fff; }
.overview-icon { display: flex; justify-content: center; color: var(--lime); }
.overview-card.highlight .overview-icon { color: #000; }
[data-theme="light"] .overview-card.highlight .overview-icon { color: #fff; }
.overview-number { display: block; font-family: var(--font-display); font-size: 2.8rem; font-weight: var(--fw-bold); line-height: 1; color: var(--white); margin-bottom: 0.1rem; }
.overview-label { font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--g3); font-weight: var(--fw-bold); }

.progress-bar-container { background: var(--card2); border-radius: var(--r-full); height: 6px; margin-bottom: var(--space-2); overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--lime), var(--emerald)); border-radius: var(--r-full); transition: width 1.5s cubic-bezier(0.34,1.2,0.64,1); box-shadow: 0 0 16px var(--lime-glow2); }
.progress-label { font-size: var(--text-sm); color: var(--g3); margin-bottom: var(--space-10); font-family: var(--font-ui); }

.charts-row { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-4); margin-bottom: var(--space-6); }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-6); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); transition: all var(--t-md) var(--ease); }
.chart-card-wide { align-items: stretch; }
.chart-card:hover { background: var(--card2); }
.chart-title { font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--g3); align-self: flex-start; font-weight: var(--fw-bold); }
.chart-sub { font-size: var(--text-xs); color: var(--g3); font-family: var(--font-ui); }

.day-breakdown { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-6); transition: all var(--t-md) var(--ease); }
.day-breakdown-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.day-breakdown h2 { font-size: 1.3rem; letter-spacing: 1px; }
.day-breakdown-badge { font-family: var(--font-ui); font-size: var(--text-xs); background: var(--lime); color: #000; padding: 0.15rem 0.7rem; border-radius: var(--r-full); font-weight: var(--fw-bold); }
[data-theme="light"] .day-breakdown-badge { color: #fff; }
.day-row { display: grid; grid-template-columns: 200px 1fr 55px 50px; gap: var(--space-4); align-items: center; padding: 0.78rem 0; border-bottom: 1px solid var(--line); transition: all var(--t) var(--ease); }
.day-row:last-child { border-bottom: none; }
.day-row:hover { padding-left: var(--space-2); background: var(--card2); border-radius: var(--r-sm); }
.day-name { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-medium); }
.day-bar-wrap { background: var(--card2); border-radius: var(--r-full); height: 5px; overflow: hidden; }
.day-bar { height: 100%; background: linear-gradient(90deg, var(--lime), var(--emerald)); border-radius: var(--r-full); min-width: 3px; transition: width 1s var(--ease); box-shadow: 0 0 10px var(--lime-glow2); }
.day-count { font-size: var(--text-xs); color: var(--g3); text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-ui); }
.day-percent { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--g1); text-align: right; }

@media (max-width: 900px) { .charts-row { grid-template-columns: 1fr; } .summary-overview { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .day-row { grid-template-columns: 1fr 1fr; } .day-name { grid-column: 1/-1; } }

/* ═══════════════════════════════════════════════════════════
   HISTORY PAGE
═══════════════════════════════════════════════════════════ */
.history-table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th { background: var(--card2); color: var(--g3); font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); padding: var(--space-4) var(--space-5); text-align: left; border-bottom: 1px solid var(--line); font-weight: var(--fw-bold); }
.history-table td { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); transition: background var(--t); }
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--card2); }
.history-num { color: var(--g3); font-size: var(--text-xs); width: 40px; font-variant-numeric: tabular-nums; }
.history-day-tag { background: var(--card3); border: 1px solid var(--line2); padding: 0.16rem 0.6rem; border-radius: var(--r-full); font-family: var(--font-ui); font-size: var(--text-xs); white-space: nowrap; font-weight: var(--fw-medium); }
.history-exercise { font-family: var(--font-ui); font-weight: var(--fw-medium); font-size: 0.86rem; }
.history-time { color: var(--g3); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }

.empty-state { text-align: center; padding: var(--space-16) var(--space-8); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.empty-icon { margin-bottom: var(--space-4); display: flex; justify-content: center; }
.empty-icon .icon { color: var(--g3); }
.empty-text { font-family: var(--font-ui); font-size: var(--text-h5); font-weight: var(--fw-bold); margin-bottom: var(--space-2); }
.empty-sub { color: var(--g3); margin-bottom: var(--space-6); font-size: var(--text-sm); }

/* ═══════════════════════════════════════════════════════════
   EXERCISE DETAIL PAGE
═══════════════════════════════════════════════════════════ */
.ex-back { margin-bottom: var(--space-6); }
.back-link { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g3); transition: color var(--t); }
.back-link:hover { color: var(--lime); }

.ex-hero { display: grid; grid-template-columns: 1fr 340px; margin-bottom: var(--space-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.ex-hero-text { padding: var(--space-10); }
.ex-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.ex-tag { background: var(--card3); border: 1px solid var(--line2); padding: 0.2rem 0.7rem; border-radius: var(--r-full); font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--g2); letter-spacing: 0.5px; text-transform: uppercase; }
.ex-tag.difficulty-beginner     { border-color: rgba(0,255,135,0.3);  color: var(--emerald); }
.ex-tag.difficulty-intermediate { border-color: rgba(255,176,32,0.3); color: var(--amber); }
.ex-tag.difficulty-advanced     { border-color: rgba(255,59,59,0.3);  color: var(--red); }

.ex-hero h1 { color: var(--white); line-height: 1; margin-bottom: var(--space-3); padding-left: var(--space-4); border-left: 4px solid var(--lime); }
.ex-sets { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--g2); letter-spacing: var(--ls-wider); margin-bottom: var(--space-4); text-transform: uppercase; }
.ex-summary-text { color: var(--g2); font-size: var(--text-sm); line-height: var(--lh-relaxed); }
.ex-hero-img {
    position: relative; height: 100%; min-height: 260px;
    border-radius: var(--r-lg); overflow: hidden;
    background: var(--card2);
    display: flex; align-items: center; justify-content: center;
}
.ex-hero-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.ex-hero-img.img-fallback img { display: none; }
.ex-img-placeholder {
    display: flex; align-items: center; justify-content: center;
    color: var(--g4); opacity: 0.5;
}
.ex-hero-img:not(.img-fallback) .ex-img-placeholder { display: none; }
.icon-2xl { width: 48px; height: 48px; stroke-width: 1.5; }
.shortcut-key {
    font-family: var(--font-ui); font-size: var(--text-xs);
    background: var(--card2); border: 1px solid var(--line);
    border-radius: var(--r-xs); padding: 0.15rem 0.5rem;
    color: var(--lime); font-weight: var(--fw-bold);
    display: inline-block; text-align: center;
    letter-spacing: var(--ls-wide);
}

.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--space-5); }
.ex-card { background: var(--card); padding: var(--space-7); }
.ex-card-title { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: var(--ls-wide); text-transform: uppercase; margin-bottom: var(--space-5); color: var(--g3); font-weight: var(--fw-bold); }
.ex-card-title .icon { color: var(--lime); }

.ex-steps { padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.ex-steps li { color: var(--g2); font-size: var(--text-sm); line-height: var(--lh-relaxed); }
.ex-steps li::marker { color: var(--g2); font-weight: var(--fw-bold); }

.ex-benefits { display: flex; flex-direction: column; gap: var(--space-2); }
.ex-benefits li { color: var(--g2); font-size: var(--text-sm); padding-left: 1.4rem; position: relative; line-height: var(--lh-relaxed); }
.ex-benefits li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: var(--fw-bold); }

.ex-video-section { margin-bottom: var(--space-8); }
.ex-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); margin-top: var(--space-3); }
.ex-video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ── YouTube search box (for AI-generated exercises) ── */
.yt-search-box {
    display: flex; gap: var(--space-3); align-items: center;
    background: var(--card2); border: 1px solid var(--line);
    border-radius: var(--r-sm); padding: 0.35rem;
}
.yt-search-box .text-input {
    border: none; background: transparent; box-shadow: none;
    padding: 0.5rem 0.75rem;
}
.yt-search-box .text-input:focus { box-shadow: none; background: transparent; }
.yt-results { animation: fadeUp 0.3s var(--ease-out); }

@media (max-width: 960px) { .ex-hero { grid-template-columns: 1fr; } .ex-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════
   AI EXERCISE DETAIL GENERATOR PAGE
═══════════════════════════════════════════════════════════ */
.exgen-container { max-width: 580px; margin: var(--space-12) auto; }
.exgen-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--space-12) var(--space-10); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.exgen-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--lime), var(--emerald)); }
.exgen-icon { display: flex; justify-content: center; }
.exgen-icon .icon { color: var(--lime); }
.exgen-error .exgen-icon .icon { color: var(--red); }
.exgen-title { color: var(--white); font-size: 2.8rem; }
.exgen-desc { color: var(--g2); font-size: var(--text-sm); line-height: var(--lh-relaxed); max-width: 400px; }
.exgen-note { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); }

.exgen-loading { gap: var(--space-6); }
.exgen-loading h2 { font-family: var(--font-ui); font-size: var(--text-h5); font-weight: var(--fw-bold); color: var(--white); }
.exgen-loading p { color: var(--g2); font-size: var(--text-sm); }
.exgen-spinner { width: 52px; height: 52px; border: 3px solid var(--line); border-top-color: var(--lime); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.exgen-progress { width: 100%; max-width: 320px; height: 4px; background: var(--line); border-radius: var(--r-full); overflow: hidden; }
.exgen-progress-bar { height: 100%; background: linear-gradient(90deg, var(--lime), var(--emerald)); border-radius: var(--r-full); width: 0%; transition: width 0.3s ease; }

.exgen-error h2 { font-family: var(--font-ui); font-weight: var(--fw-bold); color: var(--red); }
.exgen-error p { color: var(--g2); font-size: var(--text-sm); }

.exgen-img-placeholder { width: 100%; height: 100%; min-height: 260px; background: var(--card2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); }
.exgen-img-placeholder .icon { color: var(--g3); }
.exgen-img-placeholder p { font-family: var(--font-display); font-size: 1rem; font-weight: var(--fw-bold); letter-spacing: 1px; color: var(--g3); }

.exgen-video-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-10) var(--space-8); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); margin-top: var(--space-3); }
.exgen-video-icon { width: 64px; height: 64px; background: var(--red); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(255,59,59,0.3); }
.exgen-video-title { font-family: var(--font-ui); font-size: var(--text-h5); font-weight: var(--fw-bold); color: var(--white); }
.exgen-video-sub { font-size: var(--text-xs); color: var(--g3); font-family: var(--font-ui); }

/* ═══════════════════════════════════════════════════════════
   AI ASSISTANT (full page chat)
═══════════════════════════════════════════════════════════ */
.chat-container { max-width: 800px; display: flex; flex-direction: column; gap: var(--space-4); }
.chat-messages { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-6); min-height: 420px; max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-4); scroll-behavior: smooth; }
.chat-message { display: flex; align-items: flex-end; gap: var(--space-3); }
.chat-message.user { flex-direction: row-reverse; }
.chat-avatar { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--card2); color: var(--lime); flex-shrink: 0; }
.chat-bubble { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 1.1rem; font-size: var(--text-sm); line-height: var(--lh-relaxed); max-width: 76%; white-space: pre-wrap; color: var(--g1); }
.chat-message.user .chat-bubble { background: var(--lime); color: #000; border-color: var(--lime); font-weight: var(--fw-medium); }
[data-theme="light"] .chat-message.user .chat-bubble { color: #fff; }

.typing-dots { display: flex; gap: 5px; padding: 0.8rem 1.1rem; }
.typing-dots span { width: 6px; height: 6px; background: var(--g3); border-radius: 50%; animation: typingBounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100% { transform:translateY(0); opacity:0.4; } 30% { transform:translateY(-6px); opacity:1; } }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.suggestion-btn { background: var(--card); border: 1px solid var(--line); color: var(--g2); padding: 0.38rem var(--space-4); border-radius: var(--r-full); font-size: var(--text-sm); font-family: var(--font-ui); transition: all var(--t) var(--ease); }
.suggestion-btn:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-glow); transform: scale(1.05); box-shadow: var(--shadow-sm); }

.chat-input-area { display: flex; gap: var(--space-3); }
.chat-input { flex: 1; background: var(--card); border: 1.5px solid var(--line); color: var(--white); padding: 0.8rem 1.2rem; border-radius: var(--r-full); font-family: var(--font-body); font-size: var(--text-sm); outline: none; transition: border-color var(--t), box-shadow var(--t); }
.chat-input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-glow); }
.chat-input:disabled { opacity: 0.5; }
.chat-send-btn { background: var(--lime); color: #000; padding: 0.8rem 1.75rem; border-radius: var(--r-full); font-weight: var(--fw-bold); font-size: var(--text-sm); transition: all var(--t) var(--ease); box-shadow: 0 4px 20px var(--lime-glow2); }
.chat-send-btn:hover { background: var(--lime-dim); transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow-md); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
[data-theme="light"] .chat-send-btn { color: #fff; }

/* ═══════════════════════════════════════════════════════════
   FLOATING CHAT BUBBLE
═══════════════════════════════════════════════════════════ */
.float-bubble { position: fixed; bottom: 1.75rem; right: 1.75rem; width: 54px; height: 54px; background: var(--lime); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 999; box-shadow: 0 4px 24px var(--lime-glow2); transition: all var(--t) var(--ease-spring); }
.float-bubble:hover { transform: scale(1.12); }
.float-bubble.hidden { transform: scale(0); opacity: 0; }
.float-bubble-ring { position: absolute; inset: -4px; border: 2px solid var(--lime-glow2); border-radius: 50%; animation: ringPulse 2s ease-in-out infinite; }
@keyframes ringPulse { 0%,100% { transform:scale(1); opacity:0.6; } 50% { transform:scale(1.2); opacity:0; } }

.float-chat { position: fixed; bottom: 5.5rem; right: 1.75rem; width: 340px; background: rgba(4,4,4,0.55); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border: 1px solid var(--line); border-radius: var(--r-xl); z-index: 998; display: none; flex-direction: column; box-shadow: var(--shadow-lg); overflow: hidden; }
[data-theme="light"] .float-chat { background: rgba(250,249,247,0.7); }
.float-chat.open { display: flex; animation: slideUp 0.35s var(--ease-spring); }
@keyframes slideUp { from { transform:translateY(20px) scale(0.95); opacity:0; } to { transform:translateY(0) scale(1); opacity:1; } }

.float-chat-header { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.15rem; background: var(--lime); color: #000; }
[data-theme="light"] .float-chat-header { color: #fff; }
.float-chat-header-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    color: inherit;
    border-radius: var(--r-md);
    padding: 0.25rem 0.4rem;
    margin: -0.25rem -0.4rem;
    transition: background var(--t) var(--ease), transform var(--t) var(--ease);
    cursor: pointer;
}
.float-chat-header-info:hover {
    background: rgba(0,0,0,0.1);
    transform: scale(1.01);
}
[data-theme="light"] .float-chat-header-info:hover { background: rgba(255,255,255,0.2); }
.float-chat-avatar { display: flex; align-items: center; justify-content: center; }
.float-chat-name { font-family: var(--font-ui); font-weight: var(--fw-bold); font-size: var(--text-sm); line-height: 1; }
.float-chat-status { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-medium); display: flex; align-items: center; gap: 0.3rem; opacity: 0.75; }
.status-dot { width: 5px; height: 5px; background: currentColor; border-radius: 50%; animation: blink 1.5s infinite; flex-shrink: 0; }
.float-close { display: flex; align-items: center; justify-content: center; opacity: 0.7; transition: opacity var(--t); color: inherit; flex-shrink: 0; }
.float-close:hover { opacity: 1; }

.float-chat-messages { padding: 0.9rem; min-height: 240px; max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-3); scroll-behavior: smooth; }
.float-chat-messages .chat-bubble { font-size: var(--text-sm); max-width: 88%; }

.float-chat-input { display: flex; gap: var(--space-2); padding: 0.65rem 0.75rem; border-top: 1px solid var(--line); background: var(--card2); }
.float-chat-input input { flex: 1; background: var(--card); border: 1px solid var(--line); color: var(--white); padding: 0.43rem 0.82rem; border-radius: var(--r-full); font-family: var(--font-body); font-size: var(--text-sm); outline: none; transition: border-color var(--t); }
.float-chat-input input:focus { border-color: var(--lime); }
.float-chat-input button { display: flex; align-items: center; justify-content: center; background: var(--lime); color: #000; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; transition: all var(--t) var(--ease); }
.float-chat-input button:hover { transform: scale(1.08); }
.float-chat-input button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
[data-theme="light"] .float-chat-input button { color: #fff; }

@media (max-width: 768px) { .float-chat { width: calc(100vw - 2rem); right: 1rem; } }

/* ═══════════════════════════════════════════════════════════
   PROFILE / SETTINGS PAGE
═══════════════════════════════════════════════════════════ */
.settings-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-6); align-items: start; }
.settings-sidebar { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm); position: sticky; top: 80px; }
.settings-avatar-wrap { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-6); border-bottom: 1px solid var(--line); background: var(--card2); }
.settings-avatar { width: 48px; height: 48px; background: var(--lime); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.4rem; font-weight: var(--fw-bold); flex-shrink: 0; box-shadow: 0 0 16px var(--lime-glow2); }
[data-theme="light"] .settings-avatar { color: #fff; }
.settings-avatar-name { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--white); margin-bottom: 0.15rem; }
.settings-avatar-email { font-size: var(--text-xs); color: var(--g3); font-family: var(--font-ui); }
.settings-avatar-img { object-fit: cover; }

.settings-nav { padding: var(--space-2) 0; }
.settings-nav-item { display: flex; align-items: center; gap: var(--space-3); padding: 0.85rem var(--space-5); font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--g2); cursor: pointer; transition: all var(--t) var(--ease); border-left: 3px solid transparent; }
.settings-nav-item .icon { color: var(--g3); }
.settings-nav-item:hover { color: var(--white); background: var(--card2); }
.settings-nav-item:hover .icon { color: var(--lime); transform: scale(1.1); }
.settings-nav-item.active { color: var(--lime); background: var(--lime-glow); border-left-color: var(--lime); font-weight: var(--fw-bold); }
.settings-nav-item.active .icon { color: var(--lime); }


.settings-main { display: flex; flex-direction: column; }
.settings-section { display: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--space-8); box-shadow: var(--shadow-sm); }
.settings-section.active { display: block; }
.settings-section-header { margin-bottom: var(--space-8); padding-bottom: var(--space-5); border-bottom: 1px solid var(--line); }
.settings-section-header h2 { font-size: 1.5rem; letter-spacing: 1px; color: var(--white); margin-bottom: var(--space-1); }
.settings-section-header p { font-size: var(--text-sm); color: var(--g2); font-family: var(--font-ui); }

.settings-form { display: flex; flex-direction: column; gap: var(--space-4); }
.settings-form .form-group { margin-bottom: 0; }
.settings-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.settings-form-actions { display: flex; gap: var(--space-3); padding-top: var(--space-2); }
.settings-textarea { min-height: 100px; resize: vertical; padding: 0.65rem 1rem !important; }
.settings-divider { height: 1px; background: var(--line); margin: var(--space-7) 0; }
.settings-sub-title { font-family: var(--font-ui); font-size: var(--text-h5); font-weight: var(--fw-bold); color: var(--white); margin-bottom: var(--space-5); }

.settings-info-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--card2); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--space-6); }
.settings-info-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.settings-info-icon .icon { color: var(--lime); width: 22px; height: 22px; }
.settings-info-title { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--g2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
.settings-info-value { font-family: var(--font-ui); font-size: var(--text-h5); color: var(--white); font-weight: var(--fw-medium); }
.settings-badge { margin-left: auto; background: rgba(0,255,135,0.1); color: var(--emerald); border: 1px solid rgba(0,255,135,0.2); padding: 0.2rem 0.7rem; border-radius: var(--r-full); font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); flex-shrink: 0; }
.settings-badge.unverified { background: rgba(255,176,32,0.1); color: var(--amber); border-color: rgba(255,176,32,0.25); }
.settings-verify-prompt { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); background: rgba(255,176,32,0.05); border: 1px solid rgba(255,176,32,0.2); border-radius: var(--r-md); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-6); flex-wrap: wrap; }
.settings-verify-prompt p { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2); }

.settings-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--space-6); }
.settings-stat-card { background: var(--card2); padding: var(--space-6); text-align: center; transition: background var(--t); }
.settings-stat-card:hover { background: var(--card3); }
.settings-stat-number { display: block; font-family: var(--font-display); font-size: 3rem; font-weight: var(--fw-bold); color: var(--white); line-height: 1; margin-bottom: 0.3rem; }
.settings-stat-label { display: flex; align-items: center; justify-content: center; gap: var(--space-1); font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g2); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.settings-progress-wrap { margin-bottom: var(--space-6); }
.settings-progress-label { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2); margin-bottom: var(--space-2); }
.settings-actions-row { display: flex; gap: var(--space-3); }

.goals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin-bottom: var(--space-6); }
.goal-card { background: var(--card2); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: var(--space-5); cursor: pointer; transition: all var(--t) var(--ease); display: flex; flex-direction: column; gap: var(--space-2); }
.goal-card:hover { border-color: var(--line2); background: var(--card3); transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-sm); }
.goal-card.selected { border-color: var(--lime); background: var(--lime-glow); box-shadow: 0 0 0 1px var(--lime); }
.goal-icon { display: flex; }
.goal-icon .icon { color: var(--g2); width: 28px; height: 28px; }
.goal-card.selected .goal-icon .icon { color: var(--lime); }
.goal-title { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--white); }
.goal-desc { font-size: var(--text-xs); color: var(--g3); line-height: var(--lh-relaxed); }
.goal-card.selected .goal-title { color: var(--lime); }
.goal-card.selected .goal-desc { color: var(--g2); }

.settings-account-item { display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); padding: var(--space-5) 0; flex-wrap: wrap; }
.settings-account-title { font-family: var(--font-ui); font-size: var(--text-h5); font-weight: var(--fw-bold); color: var(--white); margin-bottom: var(--space-1); }
.settings-account-desc { font-size: var(--text-sm); color: var(--g2); font-family: var(--font-ui); line-height: var(--lh-relaxed); }

@media (max-width: 900px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-sidebar { position: static; }
    .settings-nav { display: flex; flex-wrap: wrap; padding: var(--space-2); }
    .settings-nav-item { border-left: none; border-radius: var(--r-sm); padding: 0.6rem var(--space-4); border-bottom: 2px solid transparent; }
    .settings-nav-item.active { border-left: none; border-bottom-color: var(--lime); }
}
@media (max-width: 600px) {
    .settings-form-row { grid-template-columns: 1fr; }
    .settings-stats-grid { grid-template-columns: 1fr; }
    .goals-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   ACCOUNT LIFECYCLE (deactivate / delete)
═══════════════════════════════════════════════════════════ */
.modal.modal-lg { max-width: 480px; }
.modal-close {
    position: absolute; top: 0.9rem; right: 1rem;
    background: var(--card2); color: var(--g2); border: 1px solid var(--line);
    width: 30px; height: 30px; border-radius: var(--r-full);
    font-size: 1.1rem; line-height: 1; cursor: pointer;
    transition: color var(--t), border-color var(--t);
}
.modal-close:hover { color: var(--white); border-color: var(--line2); }

.delete-hint {
    display: flex; align-items: center; gap: var(--space-2);
    background: rgba(0,255,135,0.08); border: 1px solid rgba(0,255,135,0.2);
    color: var(--emerald); border-radius: var(--r-md);
    padding: 0.6rem 0.9rem; font-family: var(--font-ui); font-size: var(--text-xs);
    margin-bottom: var(--space-3);
}
.delete-code-input {
    letter-spacing: 0.6em; font-size: 1.2rem !important;
    text-align: center; font-weight: var(--fw-bold); font-family: var(--font-ui) !important;
    max-width: 200px;
}
.delete-warning-box {
    background: rgba(255,59,59,0.06); border: 1px solid rgba(255,59,59,0.22);
    border-radius: var(--r-md); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-4);
}
.delete-warning-box ul {
    margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: var(--space-2);
    font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2); line-height: var(--lh-relaxed);
}
.delete-warning-box b { color: var(--white); }

.reason-options { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.reason-option {
    display: flex; align-items: flex-start; gap: var(--space-3);
    background: var(--card2); border: 1.5px solid var(--line); border-radius: var(--r-md);
    padding: 0.7rem 0.95rem; cursor: pointer; font-family: var(--font-ui);
    font-size: var(--text-sm); color: var(--g2);
    transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t);
}
.reason-option:hover { border-color: var(--line2); background: var(--card3); }
.reason-option input[type="radio"] { accent-color: var(--lime); margin-top: 0.15rem; }
.reason-option:has(input[type="radio"]:checked),
.reason-option:has(input[type="checkbox"]:checked) {
    border-color: var(--lime); background: var(--lime-glow); color: var(--white);
}
.reason-option input[type="checkbox"] { accent-color: var(--lime); margin-top: 0.15rem; }
.reason-option.confirm-option { color: var(--g1); }

/* account status page */
.lifecycle-wrap { display: flex; justify-content: center; padding: var(--space-8) 0; }
.lifecycle-card {
    width: 100%; max-width: 520px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
    padding: var(--space-8) var(--space-7); text-align: center;
    box-shadow: var(--shadow-lg);
}
.lifecycle-icon {
    width: 58px; height: 58px; margin: 0 auto var(--space-5);
    background: rgba(0,255,135,0.1); border: 1px solid rgba(0,255,135,0.25);
    color: var(--emerald); border-radius: var(--r-full);
    display: flex; align-items: center; justify-content: center;
}
.lifecycle-icon.danger { background: rgba(255,59,59,0.1); border-color: rgba(255,59,59,0.28); color: var(--red); }
.lifecycle-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); margin-bottom: var(--space-3); line-height: 1.2; }
.lifecycle-desc { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2); line-height: var(--lh-relaxed); margin-bottom: var(--space-5); }
.lifecycle-desc b { color: var(--white); }
.lifecycle-desc.small { font-size: var(--text-xs); color: var(--g3); margin-top: var(--space-4); }
.lifecycle-count { margin: var(--space-2) 0 var(--space-4); }
.lifecycle-count-num {
    display: block; font-family: var(--font-display); font-size: 4.5rem; font-weight: var(--fw-bold);
    color: var(--red); line-height: 1;
}
.lifecycle-count-label { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.lifecycle-percent-bar {
    height: 8px; border-radius: var(--r-full); background: var(--card2);
    border: 1px solid var(--line); overflow: hidden; margin-bottom: var(--space-5);
}
.lifecycle-percent-fill { height: 100%; background: linear-gradient(90deg, var(--lime), var(--red)); border-radius: inherit; }
.lifecycle-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.lifecycle-account { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════
   WORKOUT TEMPLATES PAGE
═══════════════════════════════════════════════════════════ */
.template-warning { display: flex; align-items: center; gap: var(--space-2); background: rgba(255,176,32,0.06); border: 1px solid rgba(255,176,32,0.25); color: var(--amber); padding: 0.85rem var(--space-5); border-radius: var(--r-md); font-family: var(--font-ui); font-size: var(--text-sm); margin-bottom: var(--space-6); }
.template-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.template-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--space-7); display: flex; flex-direction: column; gap: var(--space-4); transition: all var(--t-md) var(--ease); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.template-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--lime), var(--emerald)); transform: scaleX(0); transform-origin: left; transition: transform var(--t-md) var(--ease); }
.template-card:hover { border-color: var(--line2); transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-md); }
.template-card:hover::before { transform: scaleX(1); }
.template-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.template-icon { display: flex; }
.template-icon .icon { width: 36px; height: 36px; stroke-width: 1.75; color: var(--lime); }
.template-tags { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.template-name { font-size: 1.8rem; letter-spacing: 1px; color: var(--white); line-height: 1.1; }
.template-desc { color: var(--g2); font-size: var(--text-sm); line-height: var(--lh-relaxed); flex: 1; }
.template-days { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.template-day-chip { background: var(--card2); border: 1px solid var(--line); color: var(--g2); padding: 0.25rem 0.7rem; border-radius: var(--r-full); font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-medium); }

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

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.footer { background: var(--card); border-top: 1px solid var(--line); padding: var(--space-10) var(--space-8); position: relative; z-index: 2; }
.footer-inner { max-width: 1160px; margin: 0 auto; text-align: center; }
.footer-logo-wrap { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.footer-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); color: var(--white); }
.footer-logo span { color: var(--lime); }
.footer p { color: var(--g3); font-size: var(--text-sm); font-family: var(--font-ui); margin-bottom: 0.25rem; }
.footer-copy { font-size: var(--text-xs) !important; color: var(--g3) !important; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); margin: var(--space-4) 0; }
.footer-links a { color: var(--g2); font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); transition: color var(--t) var(--ease); }
.footer-links a:hover { color: var(--lime); }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.35rem var(--space-4); margin: var(--space-3) 0 0; }
.footer-contact a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--g2); font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: var(--ls-wide); transition: color var(--t) var(--ease); }
.footer-contact a:hover { color: var(--lime); }
.footer-contact-sep { color: var(--line3); }

/* ═══════════════════════════════════════════════════════════
   ABOUT PAGE
═══════════════════════════════════════════════════════════ */
.about-story { max-width: 720px; margin: 0 auto; text-align: center; padding: var(--space-12) 0 var(--space-10); }
.about-story-badge { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--lime); padding: var(--space-2) var(--space-4); border: 1px solid var(--lime-glow2); border-radius: var(--r-full); margin-bottom: var(--space-6); }
.about-story-badge .icon { color: var(--lime); }
.about-story .section-title { margin-bottom: var(--space-6); }
.about-story .section-title span { color: var(--lime); }
.about-story-text { font-family: var(--font-ui); font-size: var(--text-md); line-height: 1.8; color: var(--g2); }
.about-story-text + .about-story-text { margin-top: var(--space-5); }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); max-width: 960px; margin: var(--space-12) auto 0; }

/* ── About: values grid stays even (2x2 not 3+1) ── */
.features-grid-values { grid-template-columns: repeat(2, 1fr); }

/* ── About: divider between values and stats ── */
.about-divider { max-width: 720px; padding: var(--space-12) 0 0; }
.about-divider-text { font-family: var(--font-ui); font-size: var(--text-md); line-height: 1.7; color: var(--g2); margin-top: var(--space-5); }

.about-contact .features-header { text-align: center; }
.about-contact .section-title span { color: var(--lime); }
.about-cta { text-align: center; padding: var(--space-14) 0; }
.about-cta p { font-family: var(--font-ui); font-size: var(--text-md); color: var(--g2); margin-bottom: var(--space-8); }
.about-cta .section-title { margin-bottom: var(--space-4); }
.about-cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); }

/* ── Centered page header (about / health) ── */
.page-header-center { text-align: center; }
.page-header-center p { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── About: contact grid ── */
.about-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); max-width: 960px; margin: 0 auto; }
.about-contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--space-7); display: flex; flex-direction: column; gap: var(--space-2); transition: all var(--t-md) var(--ease); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.about-contact-card::before { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--lime), var(--emerald)); transform: scaleX(0); transform-origin: left; transition: transform var(--t-md) var(--ease); }
.about-contact-card:hover::before { transform: scaleX(1); }
.about-contact-card:hover { background: var(--card2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.about-contact-card h3 { font-family: var(--font-ui); font-size: 0.95rem; font-weight: var(--fw-bold); color: var(--white); }
.about-contact-card p { color: var(--g2); font-size: var(--text-sm); line-height: var(--lh-relaxed); flex: 1; }
.about-contact-address { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--lime); letter-spacing: var(--ls-wide); }
.about-contact-card:hover .feature-arrow { transform: translateX(4px); color: var(--lime); }
@media (max-width: 768px) { .about-contact-grid { grid-template-columns: 1fr; } }
.about-feedback { max-width: 720px; margin: 0 auto; }
.about-feedback .features-header { text-align: center; }
.feedback-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-8); box-shadow: var(--shadow-sm); }
.feedback-form select.text-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--g3) 50%), linear-gradient(135deg, var(--g3) 50%, transparent 50%); background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px); background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.fb-optional { color: var(--g3); font-weight: var(--fw-regular); font-size: var(--text-xs); }

/* ── Admin: feedback inbox ── */
.admin-page-header { text-align: center; }
.admin-page-header p:last-child { max-width: 560px; margin-left: auto; margin-right: auto; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); max-width: 860px; margin: 0 auto var(--space-8); }
.stat-number-warn { color: var(--amber); }
.admin-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); }
.admin-tab { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--g2); padding: 0.45rem 1.1rem; border-radius: var(--r-full); border: 1px solid var(--line); transition: all var(--t) var(--ease); text-decoration: none; }
.admin-tab:hover { color: var(--lime); border-color: var(--line2); }
.admin-tab.active { color: #000; background: var(--lime); border-color: var(--lime); font-weight: var(--fw-bold); }
.fb-empty { text-align: center; color: var(--g3); padding: var(--space-14) 0; }
.fb-empty .icon { margin-bottom: var(--space-4); color: var(--g2); }
.fb-empty p { font-family: var(--font-ui); font-size: var(--text-sm); }
.fb-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-6); margin-bottom: var(--space-5); box-shadow: var(--shadow-sm); }
.fb-item:hover { border-color: var(--line2); }
.fb-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.fb-badges { display: flex; align-items: center; gap: var(--space-2); }
.fb-date { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); }
.fb-status { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); text-transform: uppercase; padding: 0.2rem 0.7rem; border-radius: var(--r-full); }
.status-new { color: var(--amber); background: rgba(255,176,32,0.08); border: 1px solid rgba(255,176,32,0.3); }
.status-replied { color: var(--lime); background: var(--lime-glow); border: 1px solid rgba(163,230,53,0.3); }
.status-reviewed { color: var(--g2); background: var(--card2); border: 1px solid var(--line); }
.fb-meta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-3); font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g2); }
.fb-name, .fb-email { display: inline-flex; align-items: center; gap: 5px; }
.fb-email { color: var(--lime); }
.fb-muted { display: inline-flex; align-items: center; gap: 5px; color: var(--g3); }
.fb-body { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g1); line-height: var(--lh-normal); background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-4); white-space: pre-wrap; word-break: break-word; }
.fb-reply { border-left: 3px solid var(--lime); padding: var(--space-3) var(--space-5); margin-bottom: var(--space-4); background: var(--lime-glow); border-radius: var(--r-sm); }
.fb-reply-label { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--lime); display: flex; align-items: center; gap: 5px; margin-bottom: var(--space-2); }
.fb-reply-label em { font-style: normal; color: var(--g3); font-weight: var(--fw-regular); text-transform: none; letter-spacing: normal; }
.fb-reply p { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g1); white-space: pre-wrap; word-break: break-word; }
.fb-reply-form { display: flex; flex-direction: column; gap: var(--space-3); }
.fb-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

@media (max-width: 768px) {
    .about-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES — SHARED CLASSES (rest in auth.css)
═══════════════════════════════════════════════════════════ */
.explore-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; width: 100%; padding: 0.9rem 1rem; background: transparent; border: 1.5px dashed var(--line2); border-radius: var(--r-sm); color: var(--g2); font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-bold); transition: all var(--t) var(--ease); margin-bottom: var(--space-6); cursor: pointer; }
.explore-btn:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-glow); transform: translateY(-1px); }
.explore-btn-icon { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.explore-btn-sub { font-size: var(--text-xs); font-weight: var(--fw-regular); color: var(--g3); }
.explore-btn:hover .explore-btn-sub { color: var(--lime); opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — GLOBAL
═══════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; min-height: auto; gap: var(--space-10); }
    .hero-heading { font-size: 4.5rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-content { padding: var(--space-5) var(--space-4); }
    .hero-heading { font-size: 3.2rem; line-height: 1.05; }
    .hero-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .inline-form { flex-direction: column; align-items: stretch; }
    .cursor-glow { display: none; }
}

@media (max-width: 480px) {
    .hero-heading { font-size: 2.6rem; letter-spacing: 0.01em; line-height: 1.05; }
    .page-header h1 { font-size: 2.2rem; }
    .ex-hero h1 { font-size: 2.4rem; }
    .exgen-title { font-size: 2rem; }
    .main-content { padding: var(--space-4) var(--space-3); }
    .ex-hero-text { padding: var(--space-8) var(--space-6); }
    .exgen-card { padding: var(--space-8) var(--space-6); }
    .settings-section { padding: var(--space-6) var(--space-5); }
    .footer { padding: var(--space-8) var(--space-4); }
}

/* History filter bar — stack on phones */
.history-search-input { min-width: 180px; }
.history-date-input { min-width: 140px; }
@media (max-width: 600px) {
    .history-filter-bar { flex-direction: column; align-items: stretch; }
    .history-filter-bar label { width: 100%; }
    .history-search-input, .history-date-input { min-width: 0; flex: 1; }
}

/* Admin tabs — wrap on small screens */
.admin-tabs { flex-wrap: wrap; }

/* Profile/settings action rows — wrap on small screens */
.settings-actions-row { flex-wrap: wrap; }

/* Generic: keep form inputs from overflowing tiny screens */
.text-input, select.text-input { max-width: 100%; }

/* ═══════════════════════════════════════════════════════════
   HOVER ANIMATION SYSTEM — additions
   Consistent pattern across the app:
   - Standalone cards (gap spacing, not clipped by a parent):
     lift + scale + shadow, combined in one transform.
   - Seamless 1px-gap grid cells (parent has overflow:hidden):
     lift only, no scale — avoids clipping at the grid edges.
   - Icons inside a hoverable parent: scale + shift to lime.
   - All transitions ride the existing base `transition: all ...`
     already declared on each base selector, so these stay smooth.
═══════════════════════════════════════════════════════════ */

/* ── Feature cards (seamless grid, overflow:hidden parent) ── */
.feature-card:hover { background: var(--card2); transform: translateY(-3px); box-shadow: var(--shadow-md); z-index: 1; }
.feature-card:hover .icon-feature { transform: scale(1.12); filter: drop-shadow(0 0 8px var(--lime-glow2)); }
.feature-card:hover .feature-icon-wrap { transform: translateY(-1px); }

/* ── Light mode: vivid lime color theme on hover ── */
[data-theme="light"] .feature-card:hover {
    background: #fff;
    border-color: var(--lime);
    box-shadow: 0 8px 32px rgba(90,122,0,0.15), 0 0 0 1px var(--lime);
}
[data-theme="light"] .feature-card:hover h3 { color: var(--lime); }
[data-theme="light"] .feature-card:hover .icon-feature { color: var(--lime); filter: drop-shadow(0 0 8px rgba(90,122,0,0.4)); }
[data-theme="light"] .feature-card:hover .feature-arrow { color: var(--lime); }
[data-theme="light"] .feature-card:hover p { color: var(--g1); }

/* ── Summary overview cards (seamless grid) ── */
.overview-card:hover { transform: translateY(-2px); }

/* ── Chart cards (seamless grid) ── */
.chart-card:hover { background: var(--card2); }

/* ── Settings stat cards (seamless grid) ── */
.settings-stat-card:hover { transform: translateY(-2px); }

/* ── Exercise detail info cards (seamless grid) ── */
.ex-card:hover { background: var(--card2); }
.ex-card:hover .ex-card-title .icon { transform: scale(1.1); }

/* ── Template card icon ── */
.template-card:hover .template-icon .icon { transform: scale(1.15) rotate(-4deg); }

/* ── Goal card icon (only when not already selected) ── */
.goal-card:not(.selected):hover .goal-icon .icon { color: var(--lime); transform: scale(1.15); }

/* ── Workout exercise row — icon feedback alongside existing hover ── */
.exercise-item:hover .icon-success,
.exercise-item:hover .icon-muted { transform: scale(1.15); }

/* ── Day-by-day breakdown rows ── */
.day-row:hover .day-percent { color: var(--lime); transform: scale(1.05); display: inline-block; }

/* ── History table rows — subtle icon-free affordance ── */
.history-table tr:hover .history-day-tag { border-color: var(--lime); color: var(--lime); }

/* ── Back link arrow nudge ── */
.back-link:hover .icon { transform: translateX(-3px); }

/* ── Explore button icon ── */
.explore-btn:hover .icon { transform: scale(1.15); color: var(--lime); }

/* ── Footer logo ── */
.footer-logo-wrap { transition: transform var(--t) var(--ease); cursor: default; }
.footer-logo-wrap:hover { transform: scale(1.04); }

/* ── Float bubble icon nudge to match existing scale on the bubble ── */
.float-bubble:hover .icon-float { transform: scale(1.1); }

/* ── Mobile menu user card avatar ── */
.mobile-menu-user:hover .mobile-menu-avatar { transform: scale(1.08); }

/* ── Guest banner action icon ── */
.guest-banner-btn:hover { transform: scale(1.05); }

/* ── Generic small-icon-only buttons (close icons, etc) ── */
.float-close:hover { transform: scale(1.15); }

/* ── Empty state CTA inside button ── */
.empty-state .btn:hover .icon { transform: translateX(2px); }

/* ── Settings account action buttons keep existing .btn hover — no change needed ── */

/* ── Auth input icons brighten slightly when their field is focused ── */
.auth-input:focus ~ .input-icon-svg,
.text-input:focus + .icon-input,
.input-wrap:focus-within .icon-input,
.input-wrap:focus-within .input-icon-svg {
    color: var(--lime);
}

/* ═══════════════════════════════════════════════════════════
   HEALTH CALCULATOR PAGE (formerly BMI) — responsive additions
═══════════════════════════════════════════════════════════ */
.bmi-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

/* Card hover consistency — matches stat-card / template-card pattern */
.bmi-form,
.bmi-table {
    transition: all var(--t-md) var(--ease);
}
.bmi-form:hover,
.bmi-table:hover {
    border-color: var(--line2);
    box-shadow: var(--shadow-md);
}

.bmi-result:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.tag { transition: all var(--t) var(--ease); }
.bmi-table tr:hover .tag { transform: scale(1.05); }

/* Mobile responsiveness */
@media (max-width: 600px) {
    .bmi-container { max-width: 100%; }
    .bmi-form-row { grid-template-columns: 1fr; gap: var(--space-3); }
    .bmi-form { padding: var(--space-6); }
    .bmi-value { font-size: 4rem; }
    .bmi-result { padding: var(--space-6); }
    .bmi-table th, .bmi-table td { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
}

@media (max-width: 380px) {
    .bmi-value { font-size: 3.2rem; }
}

/* ═══════════════════════════════════════════════════════════
   HISTORY PAGE — date-grouped timeline with day subtables
═══════════════════════════════════════════════════════════ */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.history-date-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.history-date-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    background: var(--card2);
    border-bottom: 1px solid var(--line);
}
.history-date-header .icon { color: var(--lime); }

.history-date-heading {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: var(--fw-bold);
    letter-spacing: 0.5px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.history-count-badge {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    color: var(--g3);
    background: var(--card3);
    border: 1px solid var(--line2);
    padding: 0.15rem 0.65rem;
    border-radius: var(--r-full);
}

.history-count-badge-date {
    color: var(--lime);
    border-color: var(--lime-glow2);
    background: var(--lime-glow);
}

.history-subtable {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--line);
}
.history-subtable:last-child { border-bottom: none; }

.history-subtable-heading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--g2);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    margin-bottom: var(--space-3);
}
.history-subtable-heading .icon { color: var(--lime); flex-shrink: 0; }

.history-table-wrap {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table-wrap .history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 280px;
}

.history-table-wrap .history-table th {
    background: var(--card2);
    color: var(--g3);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-weight: var(--fw-bold);
}

.history-table-wrap .history-table td {
    padding: 0.65rem var(--space-4);
    border-bottom: 1px solid var(--line);
    font-size: var(--text-sm);
}

.history-table-wrap .history-table tr:last-child td { border-bottom: none; }
.history-table-wrap .history-table tr:hover td { background: var(--card2); }

.history-table-wrap .history-exercise {
    font-family: var(--font-ui);
    font-weight: var(--fw-medium);
    color: var(--white);
}

.history-table-wrap .history-time {
    color: var(--g3);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

/* Hover elevation consistency with the rest of the app */
.history-date-block { transition: all var(--t-md) var(--ease); }
.history-date-block:hover { border-color: var(--line2); box-shadow: var(--shadow-md); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .history-date-header { padding: var(--space-4); flex-wrap: wrap; }
    .history-date-heading { font-size: 1.1rem; }
    .history-subtable { padding: var(--space-4); }
    .history-table-wrap .history-table th,
    .history-table-wrap .history-table td { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
}

@media (max-width: 400px) {
    .history-count-badge { font-size: 0.65rem; padding: 0.1rem 0.5rem; }
}

/* ═══════════════════════════════════════════════════════════
   FLOATING CHAT — additions (smart suggestions)
═══════════════════════════════════════════════════════════ */
.float-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: 0 0.9rem 0.65rem;
}

.float-suggestion-chip {
    background: var(--card2);
    border: 1px solid var(--line);
    color: var(--g2);
    padding: 0.3rem 0.7rem;
    border-radius: var(--r-full);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: var(--fw-medium);
    transition: all var(--t) var(--ease);
    text-align: left;
}
.float-suggestion-chip:hover {
    border-color: var(--lime);
    color: var(--lime);
    background: var(--lime-glow);
    transform: scale(1.04);
}

@media (max-width: 768px) {
    .float-chat-suggestions { padding: 0 0.75rem 0.6rem; }
    .float-suggestion-chip { font-size: 0.68rem; }
}

/* ═══════════════════════════════════════════════════════════
   IRONBOT — CHATGPT-STYLE FULL PAGE CHAT
═══════════════════════════════════════════════════════════ */
.iron-chat-layout {
    display: grid;
    grid-template-columns: 264px 1fr;
    gap: var(--space-5);
    height: calc(100vh - 58px - 3rem);
    min-height: 540px;
    max-width: 1160px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.iron-chat-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg);
    padding: 0 var(--space-5);
}

/* Chat history sidebar (Gemini-style) */
.chat-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: var(--space-4);
    overflow: hidden;
}
.chat-sidebar-top { margin-bottom: var(--space-3); }
.chat-new-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: var(--lime);
    color: #000;
    font-family: var(--font-ui);
    font-weight: var(--fw-semibold);
    border: none;
    border-radius: var(--r-md);
    padding: 0.62rem;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.chat-new-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
[data-theme="light"] .chat-new-btn { color: #fff; }

.chat-history-heading {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--g3);
    padding: 0 var(--space-2) var(--space-2);
    margin: 0;
}
.chat-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-right: calc(-1 * var(--space-2));
    padding-right: var(--space-2);
}
.chat-history-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.84rem;
    color: var(--g2);
    background: transparent;
    border: 1px solid transparent;
    transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.chat-history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
[data-theme="light"] .chat-history-item:hover { background: rgba(0, 0, 0, 0.05); }
.chat-history-item.active {
    background: rgba(189, 224, 0, 0.12);
    border-color: rgba(189, 224, 0, 0.28);
    color: var(--white);
}
[data-theme="light"] .chat-history-item.active { color: #000; }
.chat-history-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-history-delete {
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: none;
    border-radius: var(--r-xs);
    color: var(--g3);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.chat-history-item:hover .chat-history-delete { display: inline-flex; }
.chat-history-delete:hover { color: #ff5861; background: rgba(255, 88, 97, 0.12); }
.chat-history-empty {
    text-align: center;
    color: var(--g3);
    font-size: 0.8rem;
    font-family: var(--font-ui);
    padding: var(--space-6) 0;
}

.chat-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--g1);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.chat-sidebar-toggle:hover { border-color: var(--lime); color: var(--lime); }
.chat-sidebar-backdrop {
    display: none;
}

/* Header */
.iron-chat-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--line);
    margin-bottom: var(--space-4);
    flex-shrink: 0;
}

.iron-chat-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--lime);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="light"] .iron-chat-header-avatar { color: #fff; }

.iron-chat-title {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: var(--fw-bold);
    color: var(--white);
    line-height: 1.2;
}

.iron-chat-subtitle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    color: var(--g3);
}
.iron-chat-subtitle .status-dot { background: var(--emerald); }

/* Scrollable message area */
.iron-chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-4) var(--space-2) var(--space-6);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Smooth entrance animation for every message */
.iron-msg-in {
    animation: ironMsgIn 0.3s var(--ease-out);
}
@keyframes ironMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Fixed input bar */
.iron-chat-input-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--bg) 60%, transparent);
    padding: var(--space-3) 0 var(--space-2);
    flex-shrink: 0;
}

.iron-chat-input-inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--r-lg);
    padding: 0.35rem 0.35rem 0.35rem var(--space-5);
    box-shadow: var(--shadow-lg);
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.iron-chat-input-inner:focus-within {
    border-color: var(--lime);
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--lime-glow);
}
.iron-chat-input-inner .chat-input {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0.55rem 0;
    font-size: 0.92rem;
}
.iron-chat-input-inner .chat-input:focus { box-shadow: none; }

.iron-chat-input-inner .chat-send-btn {
    border-radius: var(--r-md);
    width: 36px;
    height: 36px;
    padding: 0;
    flex-shrink: 0;
}

.iron-chat-disclaimer {
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.68rem;
    color: var(--g3);
    margin-top: var(--space-2);
}

/* Wider message bubbles in the full page chat */
.iron-chat-page .chat-bubble {
    max-width: 85%;
    font-size: 0.92rem;
    padding: 0.7rem 1rem;
    line-height: 1.6;
}
.iron-chat-page .chat-suggestions {
    padding: 0 var(--space-2);
}

/* Responsive */
@media (max-width: 900px) {
    .iron-chat-layout { grid-template-columns: 1fr; }
    .chat-sidebar-toggle { display: inline-flex; }
    .chat-sidebar {
        position: fixed;
        top: calc(58px + var(--space-3));
        bottom: var(--space-3);
        left: var(--space-3);
        width: 264px;
        z-index: 200;
        transform: translateX(-130%);
        transition: transform var(--t) var(--ease);
        box-shadow: var(--shadow-lg);
    }
    .chat-sidebar.open { transform: translateX(0); }
    .chat-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 199;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--t) var(--ease);
    }
    .chat-sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
    .iron-chat-page { padding: 0 var(--space-4); }
}

@media (max-width: 768px) {
    .iron-chat-layout {
        height: calc(100vh - 58px - 1.5rem);
    }
    .iron-chat-title { font-size: 1rem; }
    .iron-chat-header-avatar { width: 34px; height: 34px; }
    .chat-bubble { max-width: 90%; }
    .iron-chat-input-inner { padding: 0.3rem 0.3rem 0.3rem var(--space-4); }
}

@media (max-width: 480px) {
    .iron-chat-layout { height: calc(100vh - 58px - 1rem); min-height: 400px; }
    .chat-bubble { font-size: 0.88rem; max-width: 92%; }
    .iron-chat-disclaimer { font-size: 0.6rem; }
}

/* ═══════════════════════════════════════════════════════════
   PROFILE — INSTAGRAM-STYLE
   ─────────────────────────────────────────────────────────
   Centered identity header (avatar ring, name + verified,
   stats row, bio), tab bar, then section content below.
═══════════════════════════════════════════════════════════ */
.ig-profile { max-width: 960px; margin: 0 auto; }
.ig-header {
    display: flex; align-items: center; gap: var(--space-8);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
    padding: var(--space-10); box-shadow: var(--shadow-sm); margin-bottom: var(--space-6);
}
.ig-avatar-ring {
    position: relative;
    padding: 4px; background: linear-gradient(135deg, var(--lime), var(--emerald));
    border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 24px var(--lime-glow2);
}
.ig-avatar-edit {
    position: absolute; right: -2px; bottom: -2px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--lime); color: #000;
    border: 3px solid var(--card);
    cursor: pointer; box-shadow: var(--shadow-sm);
    transition: all var(--t) var(--ease);
}
.ig-avatar-edit:hover { transform: scale(1.1); background: var(--emerald); color: #fff; }
.ig-avatar {
    width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
    display: flex; align-items: center; justify-content: center;
    background: var(--card); font-family: var(--font-display);
    font-size: 2.6rem; font-weight: var(--fw-bold); color: var(--white);
}
.ig-avatar-img { background: var(--card); }
.ig-avatar-initials { background: var(--lime); color: #000; }
/* Light mode: initials stay readable on the lime badge */
[data-theme="light"] .ig-avatar-img { background: var(--card3); }
.ig-identity { flex: 1; display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.ig-name-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.ig-username { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: 1px; color: var(--white); line-height: 1; }
.ig-verified {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--lime); color: #000; flex-shrink: 0;
}
.ig-actions { margin-left: auto; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ig-stats { display: flex; gap: var(--space-8); }
.ig-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.ig-stat-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: var(--fw-bold); color: var(--white); line-height: 1; }
.ig-stat-label { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g2); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.ig-bio { display: flex; flex-direction: column; gap: 0.2rem; }
.ig-bio-name { font-family: var(--font-ui); font-weight: var(--fw-bold); color: var(--white); }
.ig-bio-text { color: var(--g2); font-size: var(--text-sm); line-height: var(--lh-relaxed); }
.ig-bio-meta { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--g3); font-size: var(--text-xs); font-family: var(--font-ui); }
.ig-bio-meta .icon { color: var(--g3); }

.ig-tabs { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.ig-tab {
    background: var(--card); border: 1px solid var(--line); color: var(--g2);
    padding: 0.6rem 1.1rem; border-radius: var(--r-full);
    font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-medium);
    cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem;
    transition: all var(--t) var(--ease);
}
.ig-tab:hover { border-color: var(--line2); color: var(--white); }
.ig-tab.active { background: var(--lime); color: #000; border-color: var(--lime); font-weight: var(--fw-bold); box-shadow: 0 4px 20px var(--lime-glow2); }
[data-theme="light"] .ig-tab.active { color: #fff; }

.ig-content { display: flex; flex-direction: column; gap: var(--space-6); }

@media (max-width: 768px) {
    .ig-header { flex-direction: column; text-align: center; padding: var(--space-8) var(--space-6); gap: var(--space-5); }
    .ig-name-row { justify-content: center; }
    .ig-actions { margin-left: 0; justify-content: center; width: 100%; }
    .ig-stats { justify-content: center; gap: var(--space-6); }
    .ig-bio { align-items: center; }
}

/* ═══════════════════════════════════════════════════════════
   BODY SHAPE ANALYZER
═══════════════════════════════════════════════════════════ */
.bs-container { max-width: 700px; margin: 0 auto; }

.bs-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); flex-wrap: wrap; }
.bs-tab {
    background: var(--card); border: 1px solid var(--line); color: var(--g2);
    padding: 0.6rem 1.1rem; border-radius: var(--r-full);
    font-family: var(--font-ui); font-size: var(--text-sm); font-weight: var(--fw-medium);
    cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem;
    transition: all var(--t) var(--ease);
}
.bs-tab:hover:not(:disabled) { border-color: var(--line2); color: var(--white); }
.bs-tab.active { background: var(--lime); color: #000; border-color: var(--lime); font-weight: var(--fw-bold); box-shadow: 0 4px 20px var(--lime-glow2); }
.bs-tab:disabled { opacity: 0.4; cursor: not-allowed; }
[data-theme="light"] .bs-tab.active { color: #fff; }

.bs-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--space-8); margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm); transition: all var(--t) var(--ease);
}
.bs-card:hover { border-color: var(--line2); }
.bs-card-header h3 { font-family: var(--font-display); font-size: var(--text-h4); color: var(--white); display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.bs-card-header p { font-size: var(--text-sm); color: var(--g3); }

/* ── Section Dividers ── */
.bs-section { margin-bottom: var(--space-2); }
.bs-section-label {
    font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold);
    text-transform: uppercase; letter-spacing: var(--ls-wider); color: var(--g3);
    display: flex; align-items: center; gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.bs-section-label .icon { color: var(--lime); width: 14px; height: 14px; }
.bs-section-line {
    height: 1px; background: linear-gradient(90deg, transparent, var(--line2), transparent);
    margin: var(--space-5) 0;
}

/* ── Gender Icons ── */
.bs-gender-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Form Fields ── */
.bs-field { margin-bottom: var(--space-5); flex: 1; }
.bs-label { display: block; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-wider); color: var(--g2); margin-bottom: var(--space-2); }
.bs-hint { display: block; font-size: var(--text-xs); color: var(--g3); margin-top: var(--space-1); }
.bs-field-row { display: flex; gap: var(--space-4); }
.bs-divider { height: 1px; background: var(--line); margin: var(--space-2) 0 var(--space-5); }

.bs-radio-row { display: flex; gap: var(--space-3); }
.bs-radio-card {
    flex: 1; background: var(--card2); border: 1.5px solid var(--line); border-radius: var(--r-md);
    padding: var(--space-4) var(--space-5); cursor: pointer; text-align: center;
    font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2);
    display: flex; align-items: center; justify-content: center; gap: var(--space-2);
    transition: all var(--t) var(--ease);
}
.bs-radio-card input { display: none; }
.bs-radio-card:hover { border-color: var(--line2); color: var(--white); }
.bs-radio-card.selected { border-color: var(--lime); background: var(--lime-glow); color: var(--lime); font-weight: var(--fw-bold); box-shadow: 0 0 0 1px var(--lime); }
[data-theme="light"] .bs-radio-card.selected { color: var(--lime); }

/* ── Body Type Row ── */
.bs-bodytype-row { flex-wrap: wrap; }
.bs-bodytype-row .bs-radio-card { flex: 0 1 auto; padding: 0.5rem 0.9rem; font-size: var(--text-xs); }

/* ── Result Hero Card ── */
.bs-result-hero {
    display: flex; align-items: center; gap: var(--space-8); padding: var(--space-8);
    background: linear-gradient(135deg, var(--card) 0%, var(--lime-glow) 100%);
    border-color: rgba(200,255,0,0.2); animation: fadeUp 0.5s var(--ease-out);
}
.bs-result-bmi { text-align: center; flex-shrink: 0; }
.bs-result-bmi-value { font-family: var(--font-display); font-size: 4rem; font-weight: var(--fw-black); color: var(--lime); line-height: 1; }
.bs-result-bmi-label { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); text-transform: uppercase; letter-spacing: var(--ls-wider); margin-top: var(--space-1); }
.bs-result-bodytype { display: flex; flex-direction: column; gap: var(--space-2); }
.bs-result-bt-name { font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--fw-bold); color: var(--white); }
.bs-result-bt-cat { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--g2); }

.bs-section-collapsed details summary { list-style: none; }
.bs-section-collapsed details summary::-webkit-details-marker { display: none; }
.bs-section-collapsed details[open] summary { margin-bottom: 0; }

.bs-results-grid { display: flex; flex-direction: column; gap: var(--space-5); }

/* ── Shape Result Card ── */
.bs-shape-card { text-align: center; padding: var(--space-10); border: 1px solid; animation: fadeUp 0.5s var(--ease-out); }
.bs-shape-icon { font-size: 3.5rem; margin-bottom: var(--space-3); }
.bs-shape-name { font-family: var(--font-display); font-size: var(--text-h2); color: var(--white); margin-bottom: var(--space-2); }
.bs-shape-desc { font-size: var(--text-body); color: var(--g2); line-height: var(--lh-relaxed); max-width: 500px; margin: 0 auto; }

.bs-shape-hourglass { background: rgba(200,255,0,0.04); border-color: rgba(200,255,0,0.25); }
.bs-shape-pear { background: rgba(0,255,135,0.04); border-color: rgba(0,255,135,0.25); }
.bs-shape-apple { background: rgba(255,176,32,0.04); border-color: rgba(255,176,32,0.25); }
.bs-shape-rectangle { background: rgba(79,142,255,0.04); border-color: rgba(79,142,255,0.25); }
.bs-shape-inverted_triangle { background: rgba(200,255,0,0.04); border-color: rgba(200,255,0,0.25); }
.bs-shape-triangle { background: rgba(0,255,135,0.04); border-color: rgba(0,255,135,0.25); }

.bs-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-3); }
.bs-stat-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: var(--space-5); text-align: center; transition: all var(--t) var(--ease);
}
.bs-stat-card:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bs-stat-value { font-family: var(--font-display); font-size: var(--text-h3); font-weight: var(--fw-bold); color: var(--white); }
.bs-stat-label { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--g3); text-transform: uppercase; letter-spacing: var(--ls-wider); margin-top: var(--space-1); }
.bs-stat-tag { display: inline-block; margin-top: var(--space-2); padding: 0.15rem 0.6rem; border-radius: var(--r-full); font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); background: var(--lime-glow); color: var(--lime); }
.bs-stat-bmi { grid-column: 1 / -1; }
.bs-stat-bmi .bs-stat-value { font-size: var(--text-h2); }
.bs-stat-bmi .bs-stat-tag { font-size: var(--text-sm); padding: 0.25rem 0.9rem; }
.bs-tag-severely-underweight { background: rgba(79,142,255,0.1); color: var(--blue); }
.bs-tag-underweight { background: rgba(79,142,255,0.1); color: var(--blue); }
.bs-tag-mildly-underweight { background: rgba(0,200,200,0.1); color: #00c8c8; }
.bs-tag-lower-normal { background: rgba(0,255,135,0.1); color: var(--emerald); }
.bs-tag-normal { background: rgba(0,255,135,0.1); color: var(--emerald); }
.bs-tag-upper-normal { background: rgba(200,255,0,0.1); color: var(--lime); }
.bs-tag-mildly-overweight { background: rgba(255,200,0,0.1); color: #ffc800; }
.bs-tag-overweight { background: rgba(255,176,32,0.1); color: var(--amber); }
.bs-tag-obese { background: rgba(255,120,59,0.1); color: #ff7838; }
.bs-tag-severely-obese { background: rgba(255,59,59,0.1); color: var(--red); }

.bs-tips-card h3 { font-family: var(--font-display); font-size: var(--text-h4); color: var(--white); display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); }
.bs-tips-grid { display: flex; flex-direction: column; gap: var(--space-4); }
.bs-tip { display: flex; flex-direction: column; gap: var(--space-1); }
.bs-tip-label { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-wider); color: var(--lime); }
.bs-tip-text { font-size: var(--text-body); color: var(--g1); line-height: var(--lh-normal); }

.bs-plan-tips { background: var(--lime-glow); border-color: rgba(200,255,0,0.2); font-size: var(--text-body); color: var(--g1); line-height: var(--lh-relaxed); }
.bs-plan-tips strong { color: var(--lime); }

.bs-day-card { animation: fadeUp 0.4s var(--ease-out); }
.bs-day-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.bs-day-num { background: var(--lime); color: #000; width: 32px; height: 32px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--text-sm); flex-shrink: 0; }
[data-theme="light"] .bs-day-num { color: #fff; }
.bs-day-header h4 { font-family: var(--font-display); font-size: var(--text-h5); color: var(--white); }
.bs-day-focus { font-size: var(--text-sm); color: var(--g3); margin-bottom: var(--space-4); }

.bs-exercise-list { display: flex; flex-direction: column; gap: var(--space-2); }
.bs-exercise {
    background: var(--card2); border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: var(--space-3) var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
    transition: border-color var(--t) var(--ease);
}
.bs-exercise:hover { border-color: var(--line2); }
.bs-ex-name { font-family: var(--font-ui); font-weight: var(--fw-bold); color: var(--white); font-size: var(--text-sm); flex: 1; min-width: 120px; }
.bs-ex-detail { font-family: var(--font-display); font-size: var(--text-sm); color: var(--lime); white-space: nowrap; }
.bs-ex-note { font-size: var(--text-xs); color: var(--g3); width: 100%; }

.bs-loading { text-align: center; padding: var(--space-10); }
.bs-loading p { margin-top: var(--space-4); color: var(--g2); font-family: var(--font-ui); }
.bs-error { background: rgba(255,59,59,0.06); border: 1px solid rgba(255,59,59,0.2); border-radius: var(--r-lg); padding: var(--space-6); color: var(--red); font-family: var(--font-ui); text-align: center; }
.bs-empty { text-align: center; padding: var(--space-12); color: var(--g3); }
.bs-empty .icon { width: 48px; height: 48px; color: var(--g3); margin-bottom: var(--space-4); }
.bs-empty p { font-size: var(--text-body); }

@media (max-width: 768px) {
    .bs-field-row { flex-direction: column; gap: 0; }
    .bs-radio-row { flex-direction: column; }
    .bs-bodytype-row { flex-direction: row; flex-wrap: wrap; gap: var(--space-2); }
    .bs-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .bs-card { padding: var(--space-6); }
    .bs-result-hero { flex-direction: column; text-align: center; gap: var(--space-4); }
    .bs-result-bmi-value { font-size: 3rem; }
}
@media (max-width: 480px) {
    .bs-bodytype-row { flex-direction: row; flex-wrap: wrap; gap: var(--space-2); }
    .bs-stats-grid { grid-template-columns: 1fr 1fr; }
    .bs-tab { padding: 0.5rem 0.8rem; font-size: var(--text-xs); }
}

/* ═══════════════════════════════════════════════════════════
   PLAN ACTIONS + SAVE TEMPLATE MODAL
═══════════════════════════════════════════════════════════ */
.bs-plan-actions {
    display: flex; gap: var(--space-3); margin-bottom: var(--space-4);
}
.bs-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.bs-modal {
    background: var(--card1); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--space-8);
    width: 90%; max-width: 420px;
}
.bs-modal h3 { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 1px; color: var(--white); margin-bottom: var(--space-2); }
.bs-modal p { color: var(--text-secondary); font-size: var(--text-sm); margin-bottom: var(--space-5); }
.bs-modal-actions { display: flex; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-6); }

/* ═══════════════════════════════════════════════════════════
   CUSTOM TEMPLATES
═══════════════════════════════════════════════════════════ */
.template-section { margin-top: var(--space-10); }
.template-section-title {
    font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 1px;
    color: var(--text-secondary); text-transform: uppercase; margin-bottom: var(--space-6);
}
.template-card-custom { border-color: var(--lime); }
.template-custom-actions { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.template-custom-actions form { flex: 1; }
.template-empty {
    display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
    padding: var(--space-10) var(--space-6);
    background: var(--card2); border: 1px dashed var(--border);
    border-radius: var(--radius-lg); color: var(--text-secondary); text-align: center;
}
.template-empty a { color: var(--lime); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .cursor-glow { display: none; }
    .noise-overlay { display: none; }
    .auth-bg-orb1, .auth-bg-orb2 { display: none; }
    .hero-label-dot { display: none; }
    .status-dot { display: none; }
    .marquee-inner { animation: none; }
    .marquee:hover .marquee-inner { animation-play-state: paused; }
}