/* ============================================================
   DS07 RUNNING — ELITE DESIGN SYSTEM v3.0
   Philosophy: Zero Cognitive Load · Numbers as Heroes · Breathe
   Inspired by: Apple Fitness, Linear App, Strava Premium
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Barlow+Condensed:wght@600;700;800;900&display=swap');

/* ===== 1. CSS RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ===== 2. DESIGN TOKENS — DARK (Default) ===== */
:root {
    /* Backgrounds — Deep Space Blue (Brand) */
    --bg-app:           #060811;
    --bg-card:          rgba(255,255,255,0.03);
    --bg-card-solid:    #0A0C16;
    --bg-elevated:      #0F1221;
    --bg-header-glass:  rgba(6, 8, 17, 0.85);
    --bg-glass:         rgba(255,255,255,0.05);

    /* Typography — soft white hierarchy */
    --text-primary:    #ffffff;
    --text-secondary:  #a1a1aa;
    --text-muted:      #52525b;

    /* Accent — Sleek Electric Blue (Apple Fitness / Linear vibe) */
    --accent-primary:  #0A84FF;
    --accent-hover:    #0060d1;
    --accent-secondary:#5E5CE6;
    --accent-dark:     #001122;
    --accent-light:    rgba(10, 132, 255, 0.12);
    --accent-glow:     rgba(10, 132, 255, 0.25);
    --accent-xglow:    rgba(10, 132, 255, 0.45);

    /* Success — emerald */
    --success:         #30D158;
    --success-glow:    rgba(48, 209, 88, 0.25);
    --success-light:   rgba(48, 209, 88, 0.10);

    /* Borders — extremely subtle */
    --border-color:    rgba(255,255,255,0.08);
    --border-strong:   rgba(255,255,255,0.12);
    --border-active:   rgba(10, 132, 255, 0.5);

    /* Shadows */
    --shadow-card:     0 4px 30px rgba(0,0,0,0.55);
    --shadow-float:    0 12px 40px rgba(10, 132, 255,0.35);
    --shadow-glow:     0 0 50px rgba(10, 132, 255,0.12);
    --shadow-up:       0 -4px 30px rgba(0,0,0,0.3);

    /* Radii */
    --radius-xs:  6px;
    --radius-sm:  10px;
    --radius-md:  16px;
    --radius-lg:  22px;
    --radius-xl:  30px;
    --radius-full:999px;

    /* Spacing */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-2xl: 48px;

    /* Typography Scale */
    --font-hero:    clamp(2.8rem, 8vw, 3.6rem);
    --font-display: clamp(1.8rem, 5vw, 2.4rem);
    --font-title:   1.25rem;
    --font-body:    0.95rem;
    --font-small:   0.8rem;
    --font-xs:      0.7rem;

    /* Transitions */
    --ease-spring:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out:     cubic-bezier(0.0, 0, 0.2, 1);
    --dur-fast:     150ms;
    --dur-normal:   300ms;
    --dur-slow:     500ms;
}

/* ===== 3. LIGHT THEME OVERRIDES ===== */
body.light-theme {
    --bg-app:          #F0F4F8;
    --bg-card:         rgba(255,255,255,0.7);
    --bg-card-solid:   #ffffff;
    --bg-elevated:     #ffffff;
    --bg-header-glass: rgba(240, 244, 248, 0.85);
    --bg-glass:        rgba(0,0,0,0.04);

    --text-primary:    #000000;
    --text-secondary:  #3c3c43;
    --text-muted:      #8e8e93;

    --border-color:    rgba(0,0,0,0.07);
    --border-strong:   rgba(0,0,0,0.12);

    --shadow-card:     0 4px 24px rgba(0,0,0,0.06);
    --shadow-up:       0 -4px 24px rgba(0,0,0,0.05);

    color-scheme: light;
}

body.light-theme .app-container {
    background: var(--bg-app);
    box-shadow: 0 0 80px rgba(0,0,0,0.12);
}

body.light-theme .treinos-header-area {
    background: rgba(240,242,248,0.9);
    border-bottom: 1px solid var(--border-color);
}

body.light-theme .bottom-nav {
    background: rgba(255,255,255,0.94);
    border-top: 1px solid var(--border-color);
}

body.light-theme .w-card {
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border-color: var(--border-color);
}

body.light-theme .cal-day {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border-color);
}

body.light-theme .cal-day.active {
    background: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(10, 132, 255,0.15);
}

body.light-theme .check-btn {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.light-theme .styled-input {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.light-theme select.styled-input option {
    background: #fff;
    color: #333;
}

body.light-theme input.modern-input,
body.light-theme select.modern-input {
    background: #fff;
    color: #0f172a;
    border-color: var(--border-color);
}

/* ===== 4. GLOBAL BASE ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color-scheme: dark;
}

/* ===== 5. APP SHELL ===== */
.app-container {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    max-height: 932px;
    background: var(--bg-app);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 40px 80px rgba(0,0,0,0.9);
}

@media (min-width: 431px) {
    .app-container {
        height: 90vh;
        border-radius: 40px;
        border: 8px solid #111520;
    }
}

/* ===== 6. SCREEN SYSTEM — Fluid transitions ===== */
.screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-app);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.99);
    transition:
        opacity var(--dur-normal) var(--ease-spring),
        transform var(--dur-normal) var(--ease-spring);
    padding-bottom: 160px;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.screen::-webkit-scrollbar { width: 0; background: transparent; }

/* ===== 7. TAB SYSTEM — Snap transitions ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabReveal var(--dur-normal) var(--ease-spring);
}

#tab-ia.active {
    display: flex;
}

@keyframes tabReveal {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 8. KEYFRAMES LIBRARY ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInStep {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

@keyframes kenBurns {
    from { transform: scale(1) translate(0,0); }
    to   { transform: scale(1.10) translate(-1%, 1%); }
}

@keyframes splashFadeIn {
    0%   { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
    70%  { box-shadow: 0 0 0 14px rgba(10, 132, 255,0); }
    100% { box-shadow: 0 0 0 0 rgba(10, 132, 255,0); }
}

@keyframes streakGlow {
    0%, 100% { text-shadow: 0 0 8px rgba(251,146,60,0.5); }
    50%       { text-shadow: 0 0 24px rgba(251,146,60,0.95), 0 0 40px rgba(251,146,60,0.4); }
}

@keyframes countUp {
    from { transform: translateY(6px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ===== 9. TYPOGRAPHY ===== */
/* Hero numbers — Barlow Condensed for athletic data */
.hero-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

/* ===== 10. PRIMARY CTA BUTTON ===== */
.btn-primary,
.login-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 58px;
    background: var(--accent-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 4px;
    transition:
        background var(--dur-fast) ease,
        transform var(--dur-fast) ease,
        box-shadow var(--dur-fast) ease;
    box-shadow: 0 8px 32px rgba(10, 132, 255,0.38);
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.login-btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

.btn-primary:hover, .login-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(10, 132, 255,0.45);
}

.btn-primary:active, .login-btn-primary:active {
    transform: translateY(0) scale(0.985);
    box-shadow: 0 4px 16px rgba(10, 132, 255,0.3);
}

/* ===== 11. CARD BASE ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color var(--dur-fast) ease;
}

/* ===== 12. LOGIN SCREEN — Premium Mesh Gradient & Glassmorphism ===== */
.login-screen-new {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #060811;
    padding: 24px;
}

.login-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 25%, rgba(0, 180, 216, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 80% 75%, rgba(0, 119, 182, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(10, 132, 255, 0.12) 0%, transparent 60%);
    filter: blur(50px);
    animation: pulseGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.85; }
    100% { transform: scale(1.1); opacity: 1; }
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 20%, rgba(6, 8, 17, 0.85) 100%);
    pointer-events: none;
}

.login-brand {
    margin-top: 10px;
    margin-bottom: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

.login-logo-mark {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 3.6rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -1.5px;
    text-shadow: 0 0 30px rgba(0, 180, 216, 0.5);
    line-height: 1;
}

.login-logo-mark span { color: var(--accent-primary); }

.login-tagline {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.45em;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
}

.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0;
}

.login-card-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(15, 23, 42, 0.70);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 180, 216, 0.12);
    border-radius: 28px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(0, 180, 216, 0.9), transparent);
    animation: shimmerBorder 6s linear infinite;
}

@keyframes shimmerBorder {
    0% { transform: translateX(-30%); }
    100% { transform: translateX(30%); }
}

.login-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -1.2px;
    font-family: 'Barlow Condensed', sans-serif;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.login-title span { color: var(--accent-primary); }

.login-subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 28px;
    font-weight: 400;
}

.login-form-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.login-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    padding: 0 18px;
    height: 58px;
    backdrop-filter: blur(12px);
    transition:
        border-color var(--dur-fast) ease,
        background var(--dur-fast) ease;
}

.login-input-group:focus-within {
    border-color: rgba(10, 132, 255, 0.65);
    background: rgba(255,255,255,0.10);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.08);
}

.login-input-group svg { flex-shrink: 0; }

.login-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0;
    min-height: unset;
}

.login-input-group input::placeholder {
    color: rgba(255,255,255,0.35);
}

.login-footer-link {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-top: 12px;
}

.login-footer-link a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}

/* ===== 13. ONBOARDING WIZARD ===== */
#onboarding-screen {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.onb-step {
    animation: fadeInStep var(--dur-normal) var(--ease-spring);
}

.modern-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modern-input-group label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

input.modern-input,
select.modern-input {
    width: 100%;
    padding: 16px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition:
        border-color var(--dur-fast) ease,
        background var(--dur-fast) ease,
        box-shadow var(--dur-fast) ease;
    outline: none;
}

input.modern-input:focus,
select.modern-input:focus {
    border-color: var(--accent-primary);
    background: rgba(10, 132, 255,0.04);
    box-shadow: 0 0 0 3px rgba(10, 132, 255,0.10);
}

select.modern-input option {
    background: var(--bg-card-solid);
    color: var(--text-primary);
}

/* Choice Cards — selectable options */
.choice-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-card {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
        border-color var(--dur-fast) ease,
        background var(--dur-fast) ease,
        transform var(--dur-fast) ease;
    user-select: none;
    position: relative;
}

.choice-card:active { transform: scale(0.985); }

.choice-card:has(input:checked) {
    border-color: var(--accent-primary);
    background: rgba(10, 132, 255,0.06);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.choice-card input[type="radio"],
.choice-card input[type="checkbox"] {
    display: none;
}

.choice-content {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) ease;
    flex-shrink: 0;
}

.choice-card:has(input:checked) .custom-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.choice-card:has(input:checked) .custom-checkbox::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.onb-form-scroll::-webkit-scrollbar { width: 3px; }
.onb-form-scroll::-webkit-scrollbar-track { background: transparent; }
.onb-form-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* ===== 14. LOADING SCREEN ===== */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    padding: 40px;
    text-align: center;
}

.loading-content h2 {
    font-size: var(--font-display);
    font-weight: 800;
    letter-spacing: -1px;
    font-family: 'Barlow Condensed', sans-serif;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: var(--font-body);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-rules {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    width: 100%;
    max-width: 280px;
    margin-top: 8px;
}

.loading-rules li {
    font-size: var(--font-small);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-rules .check {
    color: var(--success);
    font-weight: 800;
}

.loading-rules .highlight-rule { color: var(--text-primary); font-weight: 600; }

/* ===== 15. TOP BRAND HEADER ===== */
.top-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl) 0 var(--space-md);
    position: sticky;
    top: 0;
    background: var(--bg-header-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.top-brand-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.avatar-small {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ===== 16. DASHBOARD SCREEN ===== */
#dashboard-screen {
    padding: 0 var(--space-md) 120px;
}

/* ===== 17. WORKOUT CARDS — Fluid timeline ===== */
#tab-treinos { padding-bottom: 20px; }

.treinos-header-area {
    padding: 24px 20px 0;
    background: rgba(6,8,17,0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 24px;
}

.treinos-greeting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.treinos-greeting h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.sync-icon { color: var(--accent-primary); }

.treinos-month {
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.8px;
}

/* Calendar Ribbon */
.calendar-ribbon {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 18px;
    scrollbar-width: none;
}

.calendar-ribbon::-webkit-scrollbar { display: none; }

.cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 70px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-spring);
    position: relative;
}

.cal-day:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
}

.cal-day span.dw {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.6;
}

.cal-day span.dd {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
}

.cal-day::before {
    content: '';
    position: absolute;
    top: 6px;
    width: 3px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
}

.cal-day.active {
    background: rgba(10, 132, 255,0.07);
    color: var(--text-primary);
    border: 1.5px solid var(--accent-primary);
    box-shadow:
        0 4px 20px rgba(10, 132, 255,0.18),
        inset 0 0 16px rgba(10, 132, 255,0.07);
}

.cal-day.active::before {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

/* Workout List */
.full-workouts {
    padding: 0 20px 100px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workout-day-lbl {
    font-size: var(--font-small);
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 20px;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workout-day-lbl.active-day-lbl {
    color: var(--accent-primary);
}

/* THE W-CARD — Primary Training Block */
.w-card {
    background: var(--bg-card-solid);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.35);
    border: 1px solid var(--border-color);
    transition:
        border-color var(--dur-fast) ease,
        transform var(--dur-fast) ease,
        box-shadow var(--dur-fast) ease;
}

.w-card:hover {
    border-color: rgba(10, 132, 255,0.22);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(10, 132, 255,0.08);
}

.w-card:active { transform: translateY(0); }

/* Left accent stripe — the signature marker */
.w-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    border-radius: 3px 0 0 3px;
}

.w-card.rest::before { background: var(--text-muted); opacity: 0.4; }
.w-card.rest {
    background: rgba(0,0,0,0.15);
    padding: 12px 20px;
    border-color: transparent;
}
.w-card.rest:hover { transform: none; box-shadow: none; }

/* Completed state */
.w-card.completed {
    border-color: rgba(16,185,129,0.25);
    background: rgba(16,185,129,0.05);
}

.w-card.completed::before { background: var(--success); }
.w-card.completed .w-title { color: var(--success); }
.w-card.completed .w-arrow { color: var(--success); }

/* Uncompleted / Missed state */
.w-card.uncompleted {
    border-color: rgba(255, 59, 48, 0.25);
    background: rgba(255, 59, 48, 0.04);
}

.w-card.uncompleted::before { background: #FF3B30; }
.w-card.uncompleted .w-arrow { color: #FF3B30; }

.w-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.w-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 3px;
    letter-spacing: -0.2px;
}

.w-subtitle {
    font-size: var(--font-xs);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.w-arrow {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-primary);
    transition: transform var(--dur-fast) ease;
}

.w-metrics {
    display: flex;
    gap: 20px;
    font-size: var(--font-small);
    font-weight: 600;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

.w-metrics span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.w-rest-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.w-rest-content .w-title {
    color: var(--text-muted);
    margin-bottom: 0;
    font-weight: 600;
}

.moon-icon { font-size: 1.1rem; opacity: 0.6; }

/* ===== 18. WORKOUT DETAIL SCREEN ===== */
.w-details {
    display: none;
    padding-top: 24px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    animation: fadeIn var(--dur-normal) var(--ease-spring);
    cursor: default;
}

.w-details.open { display: block; }

.w-details h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.w-desc {
    font-size: var(--font-body);
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
}

/* ── WORKOUT BLOCKS TIMELINE ── */
.w-blocks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.w-blocks-container {
    position: relative;
    padding-left: 20px;
    margin-top: 16px;
}
.w-blocks-container::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 0;
    left: 8px; /* Timeline line */
    width: 2px;
    background: var(--border-color);
    z-index: 1;
}

.w-block-item {
    position: relative;
    background: transparent;
    border: none;
    padding: 0 0 24px 0;
    margin-bottom: 0;
}
.w-block-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    position: relative;
    display: flex;
    align-items: center;
}
.w-block-title::before {
    content: '';
    position: absolute;
    left: -18px; /* Align over the timeline line */
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 6px var(--bg-card);
    z-index: 2;
}
.w-block-row {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.w-block-num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.w-block-desc {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.w-tabs {
    display: flex;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border-color);
}

.w-tab {
    padding: 5px 12px;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all var(--dur-fast) ease;
}

.w-tab.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(10, 132, 255,0.3);
}

/* Workout block items */
.w-block-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--bg-glass);
}

.w-block-title {
    background: rgba(255,255,255,0.03);
    padding: 12px 16px;
    font-weight: 700;
    font-size: var(--font-body);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.w-block-row {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.w-block-row:last-child { border-bottom: none; }

.w-block-num {
    width: 24px;
    height: 24px;
    background: var(--bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    margin-right: 14px;
    flex-shrink: 0;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

.w-block-desc {
    font-size: var(--font-small);
    color: var(--text-primary);
    line-height: 1.45;
    flex: 1;
    display: flex;
    align-items: center;
}

/* ===== 19. PROGRESS SCREEN — Calendario + Stats ===== */
.prog-calendar-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 28px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
}

.prog-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.prog-cal-header h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.prog-cal-header .btn-icon {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) ease;
}

.prog-cal-header .btn-icon:hover {
    background: var(--bg-glass);
}

.prog-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.prog-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 14px;
    text-align: center;
}

.prog-cal-day {
    position: relative;
    font-size: var(--font-body);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
}

.prog-cal-day.empty { color: transparent; }

.prog-cal-day.today {
    color: var(--accent-primary);
    font-weight: 800;
}

.prog-cal-day .scribble {
    position: absolute;
    width: 26px;
    height: 26px;
    pointer-events: none;
    opacity: 0.9;
}

/* Resumo header */
.prog-resumo-header { margin-bottom: 16px; }

.prog-resumo-header h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.prog-resumo-header p {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Stats grid — big bold numbers */
.prog-resumo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.prog-box {
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 118px;
    transition: transform var(--dur-fast) ease;
    border: 1px solid transparent;
}

.prog-box:active { transform: scale(0.97); }

.box-premium-red {
    background: linear-gradient(135deg, #e8384f 0%, #b5112a 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(10, 132, 255,0.3);
}

.box-modern-gray {
    background: var(--bg-card-solid);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-card);
}

.p-icon-top { margin-bottom: 10px; opacity: 0.85; }
.box-premium-red .p-icon-top { color: rgba(255,255,255,0.9); }
.box-modern-gray .p-icon-top { color: var(--accent-primary); }

.p-content { display: flex; flex-direction: column; }

.prog-box .p-lbl {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
    font-weight: 700;
    opacity: 0.85;
}

.box-modern-gray .p-lbl { color: var(--text-muted); }

.prog-box .p-val {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
    animation: countUp var(--dur-normal) var(--ease-spring);
}

.prog-box .p-val small {
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.75;
}

.prog-box .p-sub {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.7;
}

.box-modern-gray .p-sub { color: var(--text-muted); }

/* ===== 20. CYCLE / PROGRESS CIRCLE ===== */
.cycle-card { padding: 24px; }

.cycle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.cycle-title h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.cycle-title p {
    font-size: var(--font-small);
    color: var(--text-secondary);
    font-weight: 500;
}

.cycle-badges { display: flex; gap: 6px; }

.badge {
    background: var(--bg-glass);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 1px solid var(--border-color);
}

.badge-light {
    background: transparent;
    border: 1px solid var(--border-color);
}

/* Circular progress */
.progress-container {
    display: flex;
    align-items: center;
    gap: 24px;
}

.progress-circle-wrapper {
    position: relative;
    width: 138px;
    height: 138px;
    flex-shrink: 0;
}

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

.circular-chart .circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 3.5;
}

.circular-chart .circle-path {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 3.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1.2s var(--ease-spring);
    filter: drop-shadow(0 0 6px rgba(10, 132, 255,0.4));
}

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

.progress-text .perc {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 3px;
}

.progress-text .perc-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon-wrapper {
    width: 20px;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.stat-info { display: flex; flex-direction: column; }

.stat-info .lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.stat-info .val {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-top: 1px;
    letter-spacing: -0.3px;
}

/* ===== 21. ESTIMATES ===== */
.estimates-card h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.estimates-subtitle {
    font-size: var(--font-small);
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.estimates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.est-box {
    background: var(--bg-app);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: border-color var(--dur-fast) ease;
}

.est-box:hover { border-color: var(--border-strong); }

.est-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.est-time {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

.est-pace {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* ===== 22. GAMIFICATION — Shield of Discipline ===== */
/* Streak lives and breathes */
#gamification-streak-count {
    animation: streakGlow 3s ease-in-out infinite;
    display: inline-block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
}

/* ===== 23. PROFILE SCREEN ===== */
.profile-header-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: var(--space-xl) 0 var(--space-md);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    position: relative;
    box-shadow: 0 8px 24px var(--accent-glow);
    animation: pulse-ring 3s ease infinite;
}

.edit-icon {
    position: absolute;
    bottom: -4px; right: -4px;
    width: 26px; height: 26px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.profile-info-text h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.profile-info-text p {
    font-size: var(--font-small);
    color: var(--text-secondary);
}

.actions-card h3 {
    font-size: var(--font-title);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    width: 100%;
}

.action-icon {
    width: 54px;
    height: 54px;
    background: var(--bg-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all var(--dur-fast) ease;
}

.action-icon:hover {
    background: var(--accent-light);
    border-color: var(--border-active);
}

.action-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.2;
}

/* App connections */
.apps-card h3 {
    font-size: var(--font-title);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.app-item:last-child { border-bottom: none; padding-bottom: 0; }

.app-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot.connected { background: var(--success); box-shadow: 0 0 8px var(--success-glow); }
.dot.disconnected { background: #f43f5e; }

.app-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 13px;
}

.app-icon.strava { background: #fc4c02; }
.app-icon.garmin { background: #000; }
.app-icon.zepp   { background: #3b82f6; }

.app-info span {
    font-weight: 600;
    font-size: var(--font-body);
}

.app-action {
    font-size: var(--font-small);
    font-weight: 700;
    cursor: pointer;
    transition: opacity var(--dur-fast);
}

.app-action:hover { opacity: 0.75; }
.app-action.disconnect { color: #f43f5e; }

.app-action.connect {
    color: var(--success);
    border: 1px solid var(--success);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    transition: all var(--dur-fast) ease;
}

.app-action.connect:hover {
    background: var(--success-light);
}

/* ===== 24. BOTTOM NAVIGATION ===== */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 14px 0 max(26px, env(safe-area-inset-bottom));
    background: rgba(10,12,18,0.94);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.045);
    box-shadow: var(--shadow-up);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 700;
    transition: color var(--dur-fast) ease;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.nav-item.active { color: var(--text-primary); }

.nav-item.active svg {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 6px rgba(10, 132, 255,0.55));
}

/* ===== 25. SETTINGS SCREEN ===== */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 16px 16px;
    background: var(--bg-app);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.settings-back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) ease;
}

.settings-back-btn:hover { background: var(--bg-glass); }

.settings-group { margin-bottom: 24px; }

.settings-group-title {
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.settings-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: background var(--dur-fast) ease;
}

.settings-item:hover { background: var(--bg-glass); }
.settings-item:last-child { border-bottom: none; }

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-body);
    font-weight: 500;
}

.settings-item-text { display: flex; flex-direction: column; }

.settings-item-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-logout-btn {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-full);
    color: var(--accent-primary);
    font-size: var(--font-body);
    font-weight: 800;
    cursor: pointer;
    margin-top: 16px;
    transition: all var(--dur-fast) ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-logout-btn:hover {
    background: rgba(10, 132, 255,0.08);
}

/* ===== 26. ADJUST SCREENS ===== */
.adjust-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.adjust-header button {
    position: absolute;
    left: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) ease;
}

.adjust-header button:hover { background: var(--bg-glass); }

.adjust-header h2 {
    font-size: var(--font-title);
    font-weight: 700;
    margin: 0;
}

.adjust-form-container {
    padding: 24px 20px 40px;
}

.styled-form-group { margin-bottom: 20px; }

.styled-form-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.styled-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: var(--font-body);
    color: var(--text-primary);
    outline: none;
    transition:
        border-color var(--dur-fast) ease,
        box-shadow var(--dur-fast) ease;
}

.styled-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(10, 132, 255,0.10);
}

select.styled-input option {
    background: var(--bg-app);
    color: var(--text-primary);
}

/* Distance warning / checks */
.distance-warning-block { margin-top: 32px; }
.distance-warning-block h3 { font-size: 1.05rem; margin-bottom: 6px; font-weight: 700; }
.distance-warning-block p { font-size: var(--font-small); color: var(--text-muted); margin-bottom: 20px; }

.check-question { margin-bottom: 20px; }

.check-question label {
    display: block;
    font-size: var(--font-body);
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.check-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: var(--font-body);
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--dur-fast) ease;
}

.check-btn:hover { border-color: var(--border-strong); }

.check-btn.selected-yes {
    background: rgba(16,185,129,0.10);
    color: #34d399;
    border-color: rgba(16,185,129,0.35);
    font-weight: 700;
}

.check-btn.selected-no {
    background: rgba(10, 132, 255,0.10);
    color: var(--accent-secondary);
    border-color: rgba(10, 132, 255,0.35);
    font-weight: 700;
}

body.light-theme .check-btn.selected-yes {
    background: #d1fae5; color: #065f46; border-color: #10b981;
}

body.light-theme .check-btn.selected-no {
    background: #fee2e2; color: #991b1b; border-color: #ef4444;
}

.btn-mudar-obj {
    width: 100%;
    padding: 16px;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-body);
    font-weight: 800;
    cursor: pointer;
    margin-top: 12px;
    transition: all var(--dur-fast) ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 24px rgba(10, 132, 255,0.3);
}

.btn-mudar-obj:hover { background: var(--accent-hover); }
.btn-mudar-obj:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-share-ig {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-size: var(--font-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.btn-share-ig:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 39, 67, 0.5);
}

.mudar-obj-help {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-small);
    margin-top: 12px;
}

/* ===== 27. ADJUST TREINOS ===== */
.day-sq-toggle {
    min-width: 44px;
    height: 44px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: var(--font-small);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast) ease;
}

.day-sq-toggle:hover { border-color: var(--border-strong); }

.day-sq-toggle.selected {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(10, 132, 255,0.3);
}

/* Pace Zones */
.zones-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-top: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
}

.zones-header {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.zone-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: var(--font-small);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.zone-row:last-child { border-bottom: none; }

.zone-name { flex: 2; font-weight: 700; color: var(--text-primary); }
.zone-pace { flex: 1; text-align: center; }
.zone-speed { flex: 1; text-align: right; }

/* ===== 28. INPUT LOG CARD ===== */
.input-action-wrapper { display: flex; gap: 8px; }

.btn-send {
    background: var(--accent-light);
    color: var(--accent-primary);
    border: 1px solid rgba(10, 132, 255,0.2);
    border-radius: var(--radius-md);
    width: 56px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--dur-fast) ease;
}

.btn-send:hover {
    background: var(--accent-primary);
    color: #fff;
}

.feedback-msg {
    margin-top: 10px;
    font-size: var(--font-small);
    font-weight: 700;
    min-height: 20px;
    color: var(--accent-secondary);
}

/* ===== 29. TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(20, 24, 36, 0.95);
    backdrop-filter: blur(20px);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px var(--border-strong);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9999;
    transition: top 0.45s var(--ease-spring);
}

.toast.show { top: 20px; }

.toast-icon { font-size: 24px; }

.toast-content h4 {
    font-size: var(--font-small);
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.toast-content p {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ===== 30. MODALS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    transition: opacity var(--dur-normal) ease;
}

.modal.show {
    display: block;
    animation: fadeIn var(--dur-normal) ease;
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    animation: slideUp var(--dur-normal) var(--ease-spring) forwards;
    border-top: 1px solid var(--border-color);
}

.photo-option-btn:active {
    background: var(--bg-glass) !important;
}

/* ===== 31. TIME PICKER (WHEEL) ===== */
.time-wheels-container {
    display: flex;
    position: relative;
    height: 160px;
    overflow: hidden;
    margin-bottom: 16px;
    mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
}

.time-wheel-highlight {
    position: absolute;
    top: 50%; left: 10px; right: 10px;
    height: 40px;
    margin-top: -20px;
    background: rgba(10, 132, 255,0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(10, 132, 255,0.15);
    pointer-events: none;
}

.time-wheel {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.time-wheel::-webkit-scrollbar { display: none; }

.wheel-spacer { height: 60px; }

.wheel-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--dur-fast) ease;
}

.wheel-item.selected {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
}

/* ===== 32. RADIO / DAY TOGGLES (Legacy) ===== */
.radio-option {
    min-height: 48px;
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--dur-fast) ease;
}

.radio-option.selected {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.day-toggle {
    width: calc(14.2% - 8px);
    height: 50px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-small);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--dur-fast) ease;
}

.day-toggle.selected {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(10, 132, 255,0.35);
}

/* ===== 33. FORMS — global inputs ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--font-body);
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--dur-fast) ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(10, 132, 255,0.08);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

/* ===== 34. SPLASH SCREEN (CINEMATIC CONTINUITY) ===== */
.splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 99999;
    background: #060811 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/runner.png');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    z-index: 1;
}

.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 4.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #00B4D8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    filter: drop-shadow(0 4px 20px rgba(0, 180, 216, 0.3));
}

.splash-subtitle {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: #94a3b8;
}

/* ===== 35. LIGHT THEME — specific overrides ===== */

body.light-theme .w-card {
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

body.light-theme .w-card:hover {
    border-color: rgba(10, 132, 255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

body.light-theme .cal-day::before { background: rgba(0,0,0,0.1); }
body.light-theme .cal-day.active::before { background: var(--accent-primary); }

body.light-theme .onboarding-header,
body.light-theme .top-brand-header { color: var(--text-primary); }

body.light-theme .modern-input-group label { color: var(--text-secondary); }
body.light-theme input.modern-input:focus,
body.light-theme select.modern-input:focus {
    background: rgba(10, 132, 255,0.03);
}

body.light-theme .choice-card:has(input:checked) {
    background: rgba(10, 132, 255,0.04);
}

body.light-theme .custom-checkbox {
    border-color: rgba(0,0,0,0.2);
}

body.light-theme .toast {
    background: rgba(255,255,255,0.96);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

body.light-theme .toast-content h4 { color: #0f172a; }
body.light-theme .toast-content p { color: #475569; }


/* ============================================================
   COCKPIT DO CORREDOR — Redesign v4.0
   Tabs: Treinos · Progresso · Perfil
   ============================================================ */

/* ── ABA TREINOS: Cockpit Header ── */
.ck-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 12px;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-app);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ck-hello {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}
.ck-month {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}
.ck-sync-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-normal) var(--ease-spring);
    flex-shrink: 0;
    margin-top: 4px;
}
.ck-sync-btn:active { transform: rotate(180deg) scale(0.9); }
@keyframes spin { 100% { transform: rotate(360deg); } }
.ck-sync-btn.spinning svg { animation: spin 0.6s linear infinite; }

/* ── Workout Cards: Cockpit Style ── */
.ck-workouts-wrap {
    padding: 0 16px 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ck-workouts-wrap .workout-group {
    margin-bottom: 0;
}
.ck-workouts-wrap .workout-day-lbl {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0 4px;
    margin-bottom: 5px;
    margin-top: 12px;
}
.ck-workouts-wrap .workout-day-lbl.active-day-lbl {
    color: var(--accent-primary);
}
.ck-workouts-wrap .w-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background var(--dur-fast) ease;
}
.ck-workouts-wrap .w-card:active {
    transform: scale(0.98);
    background: var(--bg-elevated);
}
/* Today's card - big featured */
.ck-workouts-wrap .workout-day-lbl.active-day-lbl + .w-card {
    background: var(--bg-card-solid);
    border-color: rgba(10, 132, 255, 0.4);
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.15);
}
.ck-workouts-wrap .w-card.rest {
    opacity: 0.7;
}
.ck-workouts-wrap .w-card.completed {
    border-color: rgba(48, 209, 88, 0.3);
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.05), rgba(0,0,0,0.0));
}
.ck-workouts-wrap .w-card.uncompleted {
    border-color: rgba(255, 59, 48, 0.3);
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.05), rgba(0,0,0,0.0));
}
.ck-workouts-wrap .w-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    line-height: 1.2;
}
.ck-workouts-wrap .w-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}
.ck-workouts-wrap .w-metrics {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.ck-workouts-wrap .w-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.ck-workouts-wrap .w-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.ck-workouts-wrap .w-rest-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}


/* ── ABA PROGRESSO: Painel de Desempenho ── */
.perf-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 16px;
    gap: 12px;
}
.perf-label-sm {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.perf-goal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.perf-cycle-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-weight: 500;
}
.perf-badge-wrap {
    flex-shrink: 0;
    padding-top: 4px;
}
.perf-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-active);
}

/* Horizontal Progress Bar */
.perf-bar-section {
    margin: 0 16px 20px;
    padding: 20px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 24px;
}
.perf-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.perf-bar-val {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
}
.perf-bar-val small { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-left: 2px; }
.perf-bar-pct {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-primary);
}
.perf-bar-track {
    width: 100%;
    height: 8px;
    background: var(--border-strong);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}
.perf-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 1s var(--ease-spring);
}
.perf-bar-sublabels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* 3 Stat Blocks */
.perf-stats-trio {
    display: flex;
    margin: 0 16px 20px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.perf-stat-block {
    flex: 1;
    padding: 14px 12px;
    text-align: center;
}
.perf-stat-center {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}
.psb-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.psb-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.psb-value small { font-size: 0.7rem; color: var(--text-secondary); }

/* Progresso Calendar Restyled */
.perf-cal-card {
    margin: 0 16px 20px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}
.perf-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.perf-cal-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: capitalize;
}
.perf-nav-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
}
.perf-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 6px;
}
.perf-cal-weekdays span {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 4px 0;
}
.perf-cal-grid .prog-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
    border-radius: 8px;
    position: relative;
    font-weight: 500;
}
.perf-cal-grid .prog-cal-day.today {
    background: var(--accent-light);
    color: var(--accent-primary);
    font-weight: 800;
    border: 1px solid var(--border-active);
}
.perf-resumo-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}
.perf-resumo-period {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* 4 Metrics Grid */
.perf-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 16px 100px;
}
.perf-metric-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.perf-metric-card svg { color: var(--text-muted); }
.perf-metric-accent {
    border-color: var(--border-active);
    background: linear-gradient(135deg, rgba(10, 132, 255,0.07), var(--bg-card-solid));
}
.perf-metric-accent svg { color: var(--accent-primary); }
.pm-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}
.pm-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.pm-value small { font-size: 0.75rem; color: var(--text-secondary); }


/* ── ABA PERFIL: Cartão de Atleta ── */
.athlete-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}
.athlete-avatar-wrap {
    position: relative;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #ff6b7a);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--bg-app), 0 0 0 5px var(--border-active);
}
.athlete-initial {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.athlete-edit-badge {
    position: absolute;
    bottom: 0; right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem;
}
.athlete-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1;
    margin-bottom: 4px;
}
.athlete-email {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 400;
}
.athlete-level-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-primary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-active);
    text-transform: uppercase;
}

/* Tools section label */
.tools-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 16px 20px 8px;
}

/* Tools 2-col grid */
.tools-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px;
}
.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 12px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-spring);
    color: var(--text-primary);
    text-align: center;
}
.tool-btn:active {
    transform: scale(0.96);
    background: var(--bg-elevated);
}
.tool-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-primary);
    border: 1px solid var(--border-active);
}
.tool-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Connections */
.athlete-connections {
    margin: 0 16px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.conn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}
.conn-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.conn-strava-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: #FC4C02;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
}
.conn-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}
.conn-action {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Settings row */
.athlete-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 32px);
    margin: 10px 16px 0;
    padding: 16px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--dur-fast) ease;
}
.athlete-settings-row:active { background: var(--bg-elevated); }

/* Danger zone */
.athlete-danger-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 8px 16px 100px;
    padding: 14px;
    background: transparent;
    border: 1px solid rgba(232, 56, 79, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    cursor: pointer;
    opacity: 0.65;
    transition: opacity var(--dur-fast) ease;
}
.athlete-danger-row:active { opacity: 1; }

/* ── Light theme overrides for Cockpit ── */
body.light-theme .ck-hello { color: var(--text-primary); }
body.light-theme .perf-bar-fill { background: linear-gradient(90deg, var(--accent-primary), #ff8a96); }
body.light-theme .athlete-banner { border-color: rgba(0,0,0,0.07); }
body.light-theme .tool-btn { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-theme .athlete-connections { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-theme .athlete-settings-row { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-theme .perf-bar-section,
body.light-theme .perf-stats-trio,
body.light-theme .perf-cal-card,
body.light-theme .perf-metric-card { background: #fff; border-color: rgba(0,0,0,0.08); }
/* ── FLOATING PILL NAV ── */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(28, 28, 30, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    display: flex;
    justify-content: space-evenly;
    padding: 10px 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 1000;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #8e8e93;
    text-decoration: none;
    transition: color var(--dur-normal) var(--ease-spring);
    background: transparent;
    padding: 0 4px;
    min-width: 0;
}
.nav-item.active {
    color: var(--accent-primary);
    background: transparent;
}
.nav-item span {
    font-size: 0.65rem;
    font-weight: 600;
}
.nav-item.action-btn-center {
    position: relative;
    top: -24px;
    margin-bottom: -24px;
    z-index: 1001;
    cursor: pointer;
}
.ia-btn-wrap {
    background: var(--bg-app);
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ia-btn-inner {
    background: linear-gradient(135deg, var(--accent-primary), #00d2ff);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--accent-glow);
    font-size: 28px;
}
body.light-theme .bottom-nav {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
body.light-theme .nav-item { color: #8e8e93; }
body.light-theme .nav-item.active { color: var(--accent-primary); }

/* ── WORKOUT DETAILS GRID ── */
.metrics-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}
.metric-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}
.metric-val {
    font-size: 1.15rem;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}
.metric-val small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── SETTINGS INSET GROUPED ── */
.settings-list {
    background: var(--bg-card-solid);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.settings-item {
    border-bottom: 1px solid var(--border-color);
}
.settings-item:last-child {
    border-bottom: none;
}
.settings-item-left svg {
    background: var(--accent-light);
    color: var(--accent-primary);
    padding: 6px;
    border-radius: 8px;
    width: 28px;
    height: 28px;
}
body.light-theme .settings-item-left svg {
    background: rgba(10, 132, 255, 0.1);
}

/* ===== 26. CHAT IA (iMessage Style) ===== */
.chat-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-container::-webkit-scrollbar { display: none; }

.message-bot, .message-user {
    display: flex;
    width: 100%;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 4px;
}
.message-bot { justify-content: flex-start; }
.message-user { justify-content: flex-end; }

/* Bot Avatar */
.bot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-bottom: 2px;
}

/* Base Bubble Style */
.msg-bubble {
    max-width: 75%;
    padding: 10px 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* User (Right) */
.message-user .msg-bubble {
    background: var(--accent-primary);
    color: #fff;
    border-radius: 20px 20px 4px 20px;
}

/* Bot (Left) */
.message-bot .msg-bubble {
    background: #E5E5EA; /* Light mode fallback */
    color: #000;
    border-radius: 20px 20px 20px 4px;
}

/* Dark Theme Adjustments for Bot Bubble */
[data-theme="dark"] .message-bot .msg-bubble,
body:not(.light-theme) .message-bot .msg-bubble {
    background: #262628; /* iMessage dark mode bot bubble */
    color: #fff;
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    flex-shrink: 0;
    margin-bottom: 24px;
    background: transparent;
}
#chat-input {
    flex-grow: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.95rem;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
#chat-input:focus {
    border-color: var(--accent-primary);
}
#chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-primary);
}
.nav-item.active {
    color: var(--accent-primary);
    background: transparent;
}
.nav-item span {
    font-size: 0.65rem;
    font-weight: 600;
}
.nav-item.action-btn-center {
    position: relative;
    top: -24px;
    margin-bottom: -24px;
    z-index: 1001;
    cursor: pointer;
}
.ia-btn-wrap {
    background: var(--bg-app);
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ia-btn-inner {
    background: linear-gradient(135deg, var(--accent-primary), #00d2ff);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--accent-glow);
    font-size: 28px;
}
body.light-theme .bottom-nav {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
body.light-theme .nav-item { color: #8e8e93; }
body.light-theme .nav-item.active { color: var(--accent-primary); }

/* ── WORKOUT DETAILS GRID ── */
.metrics-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}
.metric-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}
.metric-val {
    font-size: 1.15rem;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}
.metric-val small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── SETTINGS INSET GROUPED ── */
.settings-list {
    background: var(--bg-card-solid);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.settings-item {
    border-bottom: 1px solid var(--border-color);
}
.settings-item:last-child {
    border-bottom: none;
}
.settings-item-left svg {
    background: var(--accent-light);
    color: var(--accent-primary);
    padding: 6px;
    border-radius: 8px;
    width: 28px;
    height: 28px;
}
body.light-theme .settings-item-left svg {
    background: rgba(10, 132, 255, 0.1);
}

/* ===== 26. CHAT IA (iMessage Style) ===== */
.chat-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-container::-webkit-scrollbar { display: none; }

.message-bot, .message-user {
    display: flex;
    width: 100%;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 4px;
}
.message-bot { justify-content: flex-start; }
.message-user { justify-content: flex-end; }

/* Bot Avatar */
.bot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-bottom: 2px;
}

/* Base Bubble Style */
.msg-bubble {
    max-width: 75%;
    padding: 10px 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* User (Right) */
.message-user .msg-bubble {
    background: var(--accent-primary);
    color: #fff;
    border-radius: 20px 20px 4px 20px;
}

/* Bot (Left) */
.message-bot .msg-bubble {
    background: #E5E5EA; /* Light mode fallback */
    color: #000;
    border-radius: 20px 20px 20px 4px;
}

/* Dark Theme Adjustments for Bot Bubble */
[data-theme="dark"] .message-bot .msg-bubble,
body:not(.light-theme) .message-bot .msg-bubble {
    background: #262628; /* iMessage dark mode bot bubble */
    color: #fff;
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    flex-shrink: 0;
    margin-bottom: 24px;
    background: transparent;
}
#chat-input {
    flex-grow: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.95rem;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
#chat-input:focus {
    border-color: var(--accent-primary);
}
#chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* ===== 27. NEW FEATURES (Weekly Alert, Tips, Leaderboard) ===== */
.weekly-alert-box {
    background: linear-gradient(90deg, rgba(10, 132, 255, 0.15) 0%, rgba(10, 132, 255, 0.05) 100%);
    border-left: 3px solid var(--accent-primary);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 24px 20px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}
.weekly-alert-icon {
    font-size: 1.2rem;
}

.goal-tips-header {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0 24px 16px 24px;
    font-weight: 500;
}

.goal-tip-item {
    background: var(--bg-card-solid);
    border-radius: 16px;
    padding: 16px;
    margin: 0 24px 12px 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.goal-tip-icon {
    color: #ff9500;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.goal-tip-content h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.goal-tip-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-body);
    border-radius: 12px;
    gap: 12px;
}
.leaderboard-pos {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
}
.leaderboard-pos.top-1 { color: #FFD700; font-size: 1.4rem; }
.leaderboard-pos.top-2 { color: #C0C0C0; font-size: 1.3rem; }
.leaderboard-pos.top-3 { color: #CD7F32; font-size: 1.2rem; }

.leaderboard-name {
    flex-grow: 1;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leaderboard-xp {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 0.95rem;
    background: rgba(10, 132, 255, 0.1);
    padding: 4px 8px;
    border-radius: 20px;
}

/* ===== 31. WELCOME CINEMATIC STAGE ===== */
.welcome-stage {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 440px;
    max-height: 950px;
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    overflow: hidden;
    animation: stage-breathe 8s ease-in-out infinite alternate;
    transform-origin: center center;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

@keyframes stage-breathe {
    0% { transform: scale(1); }
    100% { transform: scale(1.04); }
}

.welcome-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    user-select: none;
    pointer-events: none;
    filter: contrast(1.08) saturate(1.15) brightness(1.02);
    image-rendering: -webkit-optimize-contrast;
}

.welcome-crisp-btn {
    position: absolute;
    border: none;
    outline: none;
    cursor: pointer;
    z-index: 25;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.welcome-top-brand {
    position: absolute;
    top: 7%;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 20;
    pointer-events: none;
}

.welcome-brand-title {
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-size: 3.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -1px;
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
}

.welcome-brand-title span {
    color: var(--accent-primary);
}

.welcome-brand-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 3.5px;
    margin-top: 4px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.crisp-start {
    top: 76%;
    left: 9%;
    width: 82%;
    height: 7.8%;
    border-radius: 50px;
    background: linear-gradient(135deg, #0A84FF 0%, #0051D5 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 35px rgba(10, 132, 255, 0.65), inset 0 0 15px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crisp-start:active {
    transform: scale(0.97);
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.4);
}

.crisp-login {
    top: 86.5%;
    left: 20%;
    width: 60%;
    height: 6%;
    border-radius: 30px;
    background: rgba(6, 8, 17, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.crisp-login:active {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== 36. OTP VERIFICATION SCREEN ===== */
.otp-digit-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 16px rgba(0, 180, 216, 0.5);
    transform: scale(1.08);
    background: rgba(0, 180, 216, 0.1) !important;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.otp-error-shake {
    animation: shakeError 0.4s ease;
}

