/* ====================================
   PowerApp — Dark Fitness Theme
   Mobile-first, polished SPA
   ==================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-card-hover: #22222f;
    --bg-input: #15151f;
    --border: #2a2a3a;
    --border-light: #1e1e2e;

    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;

    --accent: #6c5ce7;
    --accent-rgb: 108, 92, 231;
    --accent-light: #a29bfe;
    --accent-dark: #4a3cb5;
    --accent-glow: rgba(108, 92, 231, 0.3);

    --green: #00b894;
    --green-dark: #008060;
    --red: #e17055;
    --orange: #fdcb6e;
    --yellow: #ffeaa7;
    --blue: #74b9ff;
    --pink: #fd79a8;

    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-workout: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    --gradient-fire: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%);
    --gradient-gold: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);

    --nav-height: 64px;
    --header-height: 56px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- Material Icons ---- */
.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

#app {
    height: 100%;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* ---- Screens ---- */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 16px calc(var(--nav-height) + var(--safe-bottom) + 16px);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.screen.no-padding-bottom { padding-bottom: 0; }

.screen.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

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

/* ---- Screen Header ---- */
.screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    position: sticky;
    top: -16px;
    margin: -16px -16px 0;
    padding: 16px;
    background: linear-gradient(to bottom, var(--bg-primary) 80%, transparent);
    z-index: 10;
}

.screen-header h2 {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 700;
}

.screen-desc {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---- Typography ---- */
h1 { font-size: 2rem; font-weight: 900; letter-spacing: -0.5px; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
.text-muted { color: var(--text-secondary); font-size: 0.85rem; }
.field-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }

/* ---- Buttons ---- */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: var(--shadow-glow);
}

.btn-primary:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-full { width: 100%; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:active { background: var(--bg-card-hover); }

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:active { background: var(--bg-card); }

.text-btn {
    background: none;
    border: none;
    color: var(--accent-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}

/* ---- Inputs ---- */
.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-with-icon {
    position: relative;
}
.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}
.input-with-icon input { padding-left: 44px; }

.input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-group:has(.input-icon) {
    position: relative;
}

.input-group:has(.input-icon) input {
    padding-left: 44px;
}

.input-with-suffix {
    position: relative;
}
.input-with-suffix input { padding-right: 36px; }
.input-with-suffix .suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.input-row { display: flex; gap: 12px; }
.input-trio { display: flex; gap: 10px; }
.input-trio .input-group { flex: 1; }

.flex-1 { flex: 1; }

select {
    appearance: none;
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 36px 10px 12px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    outline: none;
    cursor: pointer;
}
select:focus { border-color: var(--accent); }
select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

/* ---- Toggle Switch ---- */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}
.toggle-row .material-icons-round { font-size: 1.3rem; flex-shrink: 0; }
.toggle-info { flex: 1; }
.toggle-info strong { display: block; font-size: 0.9rem; }
.toggle-info span { font-size: 0.75rem; color: var(--text-secondary); }

.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    left: 2px; top: 2px;
    width: 20px; height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { left: 22px; }

/* ---- Cards ---- */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
}

/* ---- Info Banner ---- */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.info-banner .material-icons-round { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.info-banner.blue { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.15); }
.info-banner.blue .material-icons-round { color: var(--blue); }
.info-banner.purple { background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.15); }
.info-banner.purple .material-icons-round { color: #a78bfa; }

.info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.info-note .material-icons-round { font-size: 1rem; flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }

/* ============ WIZARD (Create Profile) ============ */
.wizard-progress {
    padding: 16px 16px 0;
}
.wp-bar-row { display: flex; gap: 4px; }
.wp-bar {
    flex: 1; height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.wp-bar-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    transition: width 0.35s ease;
    width: 20%;
}
.wp-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.wizard-steps {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.wizard-step {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.25s ease;
}
.wizard-step.active { display: flex; }

.step-icon-circle {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}
.step-icon-circle .material-icons-round { font-size: 36px; }
.step-icon-circle.blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.step-icon-circle.green { background: rgba(34,197,94,0.12); color: #22c55e; }
.step-icon-circle.purple { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.step-icon-circle.red { background: rgba(239,68,68,0.12); color: #ef4444; }

.step-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 12px;
    text-align: center;
}
.step-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
}

/* Gender cards */
.gender-row {
    display: flex;
    gap: 12px;
    width: 100%;
}
.gender-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 500;
}
.gender-card .material-icons-round { font-size: 2rem; color: var(--text-muted); }
.gender-card.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.08);
}
.gender-card.active .material-icons-round { color: #3b82f6; }
.gender-card.active span:last-child { color: #3b82f6; font-weight: 700; }

/* Training type cards */
.type-cards, .goal-cards { width: 100%; }

/* ============ WIZARD CARDS (typ treningu + cel) ============ */
.wiz-card {
    display: flex; gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 10px;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.wiz-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.02));
    pointer-events: none;
}
.wiz-card:active { transform: scale(0.98); }
.wiz-card.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(108,92,231,0.08), var(--bg-card));
    box-shadow: 0 0 20px rgba(108,92,231,0.15), inset 0 0 0 1px rgba(108,92,231,0.1);
}
.wiz-card-left { flex-shrink: 0; padding-top: 2px; }
.wiz-card-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.wiz-card-icon .material-icons-round { font-size: 1.4rem; color: white; }
.wiz-card-icon.orange { background: linear-gradient(135deg, #fdcb6e, #e17055); }
.wiz-card-icon.red { background: linear-gradient(135deg, #e17055, #d63031); }
.wiz-card-icon.green { background: linear-gradient(135deg, #55efc4, #00b894); }
.wiz-card-icon.purple { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.wiz-card-icon.blue { background: linear-gradient(135deg, #74b9ff, #0984e3); }
.wiz-card-icon.teal { background: linear-gradient(135deg, #81ecec, #00cec9); }

.wiz-card-body { flex: 1; min-width: 0; }
.wiz-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wiz-card-top h4 { font-size: 1rem; font-weight: 700; margin: 0; }
.wiz-card-check { flex-shrink: 0; }
.wiz-card-check .material-icons-round {
    font-size: 1.3rem; color: var(--text-muted); transition: all 0.2s;
}
.wiz-card.active .wiz-card-check .material-icons-round {
    color: var(--accent-light);
}
.wiz-card-desc {
    font-size: 0.8rem; color: var(--text-secondary);
    margin: 4px 0 8px; line-height: 1.4;
}

/* Features list (training type) */
.wiz-card-features { display: flex; flex-direction: column; gap: 3px; }
.wiz-feat {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; color: var(--text-muted);
}
.wiz-feat .material-icons-round {
    font-size: 0.85rem; color: var(--green); flex-shrink: 0;
}
.wiz-card.active .wiz-feat { color: var(--text-secondary); }

/* Tags (goal cards) */
.wiz-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.wiz-tag {
    display: inline-block; padding: 2px 8px;
    border-radius: 10px; font-size: 0.68rem; font-weight: 500;
    background: rgba(255,255,255,0.05); color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.06);
}
.wiz-tag.param {
    background: rgba(108,92,231,0.12); color: var(--accent-light);
    border-color: rgba(108,92,231,0.2); font-weight: 700;
}
.wiz-card.active .wiz-tag {
    background: rgba(255,255,255,0.08); color: var(--text-secondary);
    border-color: rgba(255,255,255,0.1);
}
.wiz-card.active .wiz-tag.param {
    background: rgba(108,92,231,0.2); color: var(--accent-light);
    border-color: rgba(108,92,231,0.3);
}

/* Legacy card styles kept for compatibility */
.type-card, .goal-card {
    display: flex; flex-direction: column;
    padding: 16px; border-radius: var(--radius-lg);
    border: 2px solid var(--border); background: var(--bg-card);
    cursor: pointer; transition: all 0.2s; margin-bottom: 10px; width: 100%;
}
.type-card.active, .goal-card.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(108,92,231,0.08), var(--bg-card));
}

/* Core lifts */
.core-lifts-counter {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 12px;
}
.core-lifts-counter.ok { background: rgba(34,197,94,0.15); color: #22c55e; }
.core-lifts-counter.bad { background: rgba(239,68,68,0.15); color: #ef4444; }

.core-lifts-list { width: 100%; }

.core-lift-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s;
    width: 100%;
}
.core-lift-item .material-icons-round { color: var(--text-muted); font-size: 1.3rem; }
.core-lift-item span:last-child { font-size: 0.95rem; }
.core-lift-item.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.08);
}
.core-lift-item.active .material-icons-round { color: #3b82f6; }
.core-lift-item.active span:last-child { color: #3b82f6; font-weight: 700; }

.core-lifts-rotation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(59,130,246,0.08);
    margin-top: 12px;
    width: 100%;
    font-size: 0.8rem;
}
.core-lifts-rotation .material-icons-round { color: #3b82f6; font-size: 1.2rem; }

/* Summary card */
.summary-card {
    width: 100%;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(30,58,95,0.4);
    border: 1px solid rgba(59,130,246,0.2);
}
.summary-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
}
.summary-row .material-icons-round { color: #3b82f6; font-size: 1.1rem; margin-right: 12px; }
.summary-row .sr-label { flex: 1; font-size: 0.85rem; color: var(--text-secondary); }
.summary-row .sr-value { font-size: 0.9rem; font-weight: 600; text-align: right; }
.summary-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 2px 0; }

/* Wizard nav */
.wizard-nav {
    display: flex;
    gap: 12px;
    padding: 12px 16px calc(16px + var(--safe-bottom));
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}
.btn-wizard-back, .btn-wizard-next {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-wizard-back {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.btn-wizard-back .material-icons-round { font-size: 1.1rem; }
.btn-wizard-next {
    background: #3b82f6;
    color: white;
}
.btn-wizard-next .material-icons-round { font-size: 1.1rem; }
.btn-wizard-next.green { background: #22c55e; }
.btn-wizard-next:active { transform: scale(0.97); }
.btn-wizard-next:disabled { opacity: 0.5; pointer-events: none; }

/* ============ AUTH ============ */
.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    padding: 32px 0;
}

.auth-logo { text-align: center; margin-bottom: 40px; }

.logo-icon {
    width: 80px; height: 80px;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-glow);
}
.logo-icon .material-icons-round { font-size: 40px; color: white; }

.auth-logo h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle { color: var(--text-secondary); margin-top: 6px; font-size: 0.95rem; }

.auth-tabs {
    display: flex; gap: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px; margin-bottom: 24px;
}

.auth-tab {
    flex: 1; padding: 10px;
    border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-secondary);
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active { background: var(--bg-card); color: var(--text-primary); }

.auth-form { display: flex; flex-direction: column; }
.auth-form.hidden { display: none; }

/* ============ PROFILES ============ */
.profiles-grid { display: grid; gap: 12px; }

.profile-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 16px; cursor: pointer;
    transition: all 0.2s;
}
.profile-card:active { background: var(--bg-card-hover); transform: scale(0.98); }

.profile-card .profile-avatar {
    width: 48px; height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 700; color: white; flex-shrink: 0;
}

.profile-card .profile-info { flex: 1; }
.profile-card .profile-info h3 { font-size: 1rem; }
.profile-card .profile-info p { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* ============ DASHBOARD ============ */
.dashboard-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.dh-left h2 { font-size: 1.5rem; }
.dh-left p { margin-top: 2px; }

.level-badge {
    width: 44px; height: 44px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800; color: white;
    box-shadow: var(--shadow-glow); cursor: pointer;
}

.xp-bar-container { margin-bottom: 20px; cursor: pointer; }
.xp-bar { height: 8px; background: var(--bg-card); border-radius: var(--radius-full); overflow: hidden; }
.xp-fill {
    height: 100%; background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); width: 0%;
}
.xp-text { display: block; text-align: right; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px 10px;
    text-align: center; display: flex; flex-direction: column;
    align-items: center; gap: 4px; cursor: pointer; transition: all 0.2s;
}
.stat-card:active { background: var(--bg-card-hover); }
.stat-card .material-icons-round { color: var(--accent-light); font-size: 1.3rem; }
.stat-value { font-size: 1.4rem; font-weight: 800; }
.stat-label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; }

.warning-card {
    display: flex; align-items: center; gap: 12px;
    background: rgba(225, 112, 85, 0.1); border: 1px solid rgba(225, 112, 85, 0.3);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 16px; cursor: pointer;
}
.warning-card .material-icons-round:first-child { color: var(--orange); font-size: 1.5rem; }
.warning-card div { flex: 1; }
.warning-card div strong { font-size: 0.9rem; display: block; }
.warning-card div p { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.warning-card .material-icons-round:last-child { color: var(--text-muted); }

.btn-workout {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 18px 20px;
    background: var(--gradient-workout); border: none;
    border-radius: var(--radius-lg); color: #0a0a0f;
    font-weight: 700; font-size: 1rem; cursor: pointer;
    transition: all 0.2s; box-shadow: 0 4px 20px rgba(0, 184, 148, 0.3);
    margin-bottom: 8px;
}
.btn-workout:active { transform: scale(0.97); }
.btn-workout .material-icons-round { font-size: 2rem; }
.btn-workout div { text-align: left; }
.btn-workout div strong { display: block; font-size: 1.05rem; }
.btn-workout div span { font-size: 0.8rem; opacity: 0.8; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-header h3 { font-size: 0.95rem; }

/* ============ HISTORY ============ */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px;
}
.history-item .hi-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.history-item .hi-icon .material-icons-round { font-size: 1.2rem; color: white; }
.history-item .hi-info { flex: 1; }
.history-item .hi-info h4 { font-size: 0.9rem; font-weight: 600; }
.history-item .hi-info p { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.history-item.clickable { cursor: pointer; transition: border-color 0.15s; }
.history-item.clickable:hover { border-color: var(--accent); }
.history-item .hi-right { display: flex; align-items: center; gap: 4px; }
.history-item .hi-xp { font-size: 0.8rem; font-weight: 700; color: var(--accent-light); }
.history-item .hi-chevron { font-size: 1.1rem; color: var(--text-muted); }

/* Workout detail view */
.wd-date { text-align: center; color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 16px; }
.wd-core-section { background: var(--bg-input); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.wd-core-exercise { font-size: 1.05rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.wd-core-stats { display: flex; justify-content: space-around; gap: 8px; margin-bottom: 12px; }
.wd-stat { text-align: center; }
.wd-stat-val { display: block; font-size: 1.3rem; font-weight: 800; color: var(--accent-light); }
.wd-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.wd-feedback { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.85rem; font-weight: 600; padding: 8px; border-radius: var(--radius-sm); }
.wd-feedback.fb-easy { background: rgba(0,184,148,0.15); color: #00b894; }
.wd-feedback.fb-good { background: rgba(9,132,227,0.15); color: #0984e3; }
.wd-feedback.fb-hard { background: rgba(253,203,110,0.15); color: #fdcb6e; }
.wd-feedback.fb-fail { background: rgba(214,48,49,0.15); color: #d63031; }
.wd-tm { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.85rem; font-weight: 600; margin-top: 10px; padding: 6px; border-radius: var(--radius-sm); }
.wd-tm.tm-up { color: #00b894; }
.wd-tm.tm-down { color: #d63031; }
.wd-tm.tm-same { color: var(--text-secondary); }
.tm-diff { font-size: 0.8rem; opacity: 0.8; }
.wd-section { margin-bottom: 16px; }
.wd-section h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: var(--text-secondary); }
.wd-acc-list { display: flex; flex-direction: column; gap: 6px; }
.wd-acc-item { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border-radius: var(--radius-sm); padding: 10px 12px; }
.wd-acc-name { flex: 1; font-size: 0.85rem; font-weight: 600; }
.wd-acc-detail { font-size: 0.8rem; color: var(--accent-light); font-weight: 700; }
.wd-fb-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.wd-fb-badge.fb-easy { background: rgba(0,184,148,0.2); color: #00b894; }
.wd-fb-badge.fb-good { background: rgba(9,132,227,0.2); color: #0984e3; }
.wd-fb-badge.fb-hard { background: rgba(253,203,110,0.2); color: #fdcb6e; }
.wd-fb-badge.fb-fail { background: rgba(214,48,49,0.2); color: #d63031; }
.wd-notes { font-size: 0.85rem; color: var(--text-secondary); background: var(--bg-input); border-radius: var(--radius-sm); padding: 10px 12px; white-space: pre-wrap; }

/* ============ WORKOUT — Exercise by exercise ============ */
.workout-timer {
    font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--green); background: rgba(0, 184, 148, 0.1);
    padding: 4px 12px; border-radius: var(--radius-full);
}

.exercise-progress {
    display: flex; gap: 4px; padding: 0 16px 12px; justify-content: center;
}
.ep-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border); transition: all 0.3s;
}
.ep-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }
.ep-dot.done { background: var(--green); }

.exercise-view {
    flex: 1; overflow-y: auto; padding: 0 16px 16px;
}

/* Exercise card in workout */
.exv-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}
.exv-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
}
.exv-name { font-size: 1.15rem; font-weight: 700; }
.exv-badge {
    font-size: 0.7rem; padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600; text-transform: uppercase;
}
.exv-badge.core { background: rgba(108, 92, 231, 0.15); color: var(--accent-light); }
.exv-badge.accessory { background: rgba(0, 184, 148, 0.15); color: var(--green); }
.exv-badge.warmup { background: rgba(255,255,255,0.08); color: var(--text-muted); }

.exv-stats {
    display: flex; gap: 14px; margin: 8px 0 12px;
    font-size: 0.85rem; color: var(--text-secondary);
}
.exv-stat { display: flex; align-items: center; gap: 4px; }
.exv-stat .material-icons-round { font-size: 1rem; }

/* Set rows in exercise view */
.set-row {
    display: flex; align-items: center; gap: 8px;
    margin-top: 8px; padding: 10px;
    background: var(--bg-input); border-radius: var(--radius-sm);
}
.set-row .set-num {
    font-size: 0.75rem; font-weight: 700;
    color: var(--text-muted); min-width: 28px;
}
.set-row .set-check {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--border); display: flex;
    align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.set-row .set-check.done {
    border-color: var(--green); background: var(--green);
}
.set-row .set-check.done::after { content: '\2713'; color: white; font-size: 0.7rem; font-weight: 700; }
.set-row input {
    width: 64px; padding: 6px 8px; text-align: center;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 0.9rem; font-family: inherit; outline: none;
}
.set-row input:focus { border-color: var(--accent); }
.set-row .set-x { color: var(--text-muted); font-size: 0.8rem; }
.set-row .set-unit { color: var(--text-muted); font-size: 0.75rem; }
.set-row.warmup-set { opacity: 0.6; }

/* Plate calc button */
.exv-actions {
    display: flex; gap: 8px; margin-top: 12px;
}
.exv-action-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: var(--radius-sm);
    background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.15);
    color: var(--blue); font-size: 0.78rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.exv-action-btn .material-icons-round { font-size: 1rem; }
.exv-action-btn:active { background: rgba(59,130,246,0.15); }

/* Rest timer inline */
.rest-timer {
    margin-top: 12px; padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: all 0.3s;
}
.rest-timer.idle { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.12); }
.rest-timer.running { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); }
.rest-timer.warning { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); }
.rest-timer.finished { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); }

/* ===== Stretch timer (sticky na górze rozciągania) ===== */
.stretch-timer {
    position: sticky; top: 8px; z-index: 20;
    margin: 0 0 14px; padding: 12px 14px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}
.stretch-timer.idle { background: rgba(59,130,246,0.14); border: 1px solid rgba(59,130,246,0.25); }
.stretch-timer.running { background: rgba(59,130,246,0.2); border: 1px solid rgba(59,130,246,0.4); }
.stretch-timer.warning { background: rgba(239,68,68,0.2); border: 1px solid rgba(239,68,68,0.45); }
.stretch-timer.finished { background: rgba(34,197,94,0.2); border: 1px solid rgba(34,197,94,0.45); }
.stretch-timer .st-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.stretch-timer .st-time { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.stretch-timer.finished .st-time { color: var(--green); }
.stretch-timer.warning .st-time { color: var(--red); }
.stretch-timer .st-controls { display: flex; gap: 6px; align-items: center; }

.rt-top { display: flex; align-items: center; gap: 8px; }
.rt-top .material-icons-round { font-size: 1rem; }
.rt-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.rt-bar-fill { height: 100%; border-radius: 3px; transition: width 1s linear; }
.rt-time {
    font-size: 1rem; font-weight: 700;
    font-variant-numeric: tabular-nums; min-width: 40px; text-align: right;
}
.rt-play {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; background: none; border: none; padding: 0;
}
.rt-play .material-icons-round { font-size: 1.5rem; }

.rt-chips { display: flex; gap: 4px; margin-top: 6px; }
.rt-chip {
    flex: 1; padding: 4px 0; text-align: center;
    border-radius: 6px; font-size: 0.65rem;
    cursor: pointer; transition: all 0.15s;
    background: transparent; border: none; color: var(--text-muted);
}
.rt-chip.active { font-weight: 700; }

/* Per-exercise feedback */
.exv-feedback {
    margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--border-light);
}
.exv-feedback-label {
    font-size: 0.75rem; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.3px;
    margin-bottom: 8px;
}
.feedback-buttons { display: flex; gap: 8px; }
.feedback-btn {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    padding: 10px 6px; border: 2px solid var(--border);
    border-radius: var(--radius-md); background: var(--bg-input);
    color: var(--text-secondary); cursor: pointer;
    font-size: 0.75rem; font-weight: 500; transition: all 0.2s;
}
.feedback-btn .material-icons-round { font-size: 1.4rem; }
.feedback-btn.active { border-color: var(--accent); color: var(--accent-light); background: rgba(108, 92, 231, 0.1); }
.feedback-btn[data-feedback="easy"].active { border-color: var(--green); color: var(--green); background: rgba(0, 184, 148, 0.1); }
.feedback-btn[data-feedback="hard"].active { border-color: var(--red); color: var(--red); background: rgba(225, 112, 85, 0.1); }

/* Finish workout section */
.finish-workout-section {
    padding: 16px;
}
.notes-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    outline: none;
    margin-bottom: 12px;
}
.notes-input:focus { border-color: var(--accent); }

/* Workout bottom nav */
.workout-bottom-nav {
    display: flex; gap: 12px;
    padding: 12px 16px calc(16px + var(--safe-bottom));
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}

/* ============ PLATE CALCULATOR MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(10,10,15,0.8);
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 1000; backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none; }
.modal-content {
    width: 100%; max-width: 480px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px;
    max-height: 80vh; overflow-y: auto;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.modal-header h3 { font-size: 1.1rem; }

/* Plate calc content */
.plate-input-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.plate-input-row input {
    flex: 1; padding: 10px 12px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary);
    font-size: 1rem; font-family: inherit; outline: none;
}
.plate-input-row input:focus { border-color: var(--accent); }

.plate-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.plate-quick-btn {
    padding: 6px 12px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 0.8rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.plate-quick-btn.active { background: rgba(59,130,246,0.15); border-color: #3b82f6; color: #3b82f6; }

.plate-visual {
    display: flex; align-items: center; justify-content: center;
    min-height: 90px; margin: 12px 0;
}
.plate-bar {
    width: 60px; height: 12px;
    background: #6b7280; border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.5rem; font-weight: 700; color: white;
}
.plate-disc {
    display: flex; align-items: center; justify-content: center;
    border-radius: 2px; margin: 0 1px;
}

.plate-summary {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.plate-chip {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 16px;
    background: var(--bg-card); font-size: 0.8rem;
}
.plate-chip-dot {
    width: 14px; height: 14px; border-radius: 50%;
}
.plate-side-text {
    font-size: 0.9rem; font-weight: 700; text-align: center; margin-bottom: 8px;
}
.plate-message {
    text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.85rem;
}

/* ============ WORKOUT SUMMARY ============ */
.summary-container {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; min-height: 100%;
    text-align: center; padding: 32px 0;
}
.summary-icon {
    width: 80px; height: 80px; border-radius: var(--radius-full);
    background: var(--gradient-gold);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.summary-icon .material-icons-round { font-size: 40px; color: white; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

#summary-details {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 10px; width: 100%; margin-top: 20px;
}
.summary-stat { background: var(--bg-card); border-radius: var(--radius-md); padding: 14px; }
.summary-stat .ss-value { font-size: 1.5rem; font-weight: 800; display: block; }
.summary-stat .ss-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; }

#summary-prs, #summary-achievements { width: 100%; margin-top: 16px; }
.pr-badge, .ach-badge {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-card); border: 1px solid rgba(253, 203, 110, 0.3);
    border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 8px;
    text-align: left;
}
.pr-badge .material-icons-round { color: var(--orange); font-size: 1.5rem; }
.ach-badge .material-icons-round { color: var(--yellow); font-size: 1.5rem; }

/* ============ STATS ============ */
.level-card-big {
    background: var(--gradient-primary); border-radius: var(--radius-lg);
    padding: 12px 16px; text-align: center; margin-bottom: 12px;
    position: relative; overflow: visible;
}
.level-card-big::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}
.level-card-big .lcb-level { font-size: 1.8rem; font-weight: 900; position: relative; line-height: 1.2; }
.level-card-big .lcb-title { font-size: 0.8rem; opacity: 0.85; margin-top: 2px; position: relative; }
.level-card-big .lcb-xp { font-size: 0.75rem; opacity: 0.7; margin-top: 4px; position: relative; }

.stats-section { margin-bottom: 20px; }
.stats-section h3 {
    font-size: 0.85rem; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
}

.strength-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.strength-bar .sb-label { width: 90px; font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strength-bar .sb-track { flex: 1; height: 24px; background: var(--bg-card); border-radius: var(--radius-full); overflow: hidden; position: relative; }
.strength-bar .sb-fill {
    height: 100%; border-radius: var(--radius-full);
    transition: width 0.6s ease;
    display: flex; align-items: center; justify-content: flex-end;
    padding-right: 8px; font-size: 0.65rem; font-weight: 700;
    color: white; min-width: 50px;
}
.sb-fill.tier-beginner { background: var(--blue); }
.sb-fill.tier-intermediate { background: var(--green); }
.sb-fill.tier-advanced { background: var(--orange); }
.sb-fill.tier-elite { background: linear-gradient(90deg, var(--orange), var(--red)); }

.pr-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px; background: var(--bg-card); border-radius: var(--radius-md); margin-bottom: 6px;
}
.pr-item .pri-name { font-size: 0.9rem; font-weight: 500; }
.pr-item .pri-value { font-size: 0.95rem; font-weight: 700; color: var(--accent-light); }

/* ============ ACHIEVEMENTS ============ */
.achievement-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 8px;
    transition: all 0.2s;
}
.achievement-card.locked { opacity: 0.45; }
.achievement-card .ac-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.ac-icon.bronze { background: linear-gradient(135deg, #cd7f32, #8b4513); }
.ac-icon.silver { background: linear-gradient(135deg, #c0c0c0, #808080); }
.ac-icon.gold { background: linear-gradient(135deg, #ffd700, #ff8c00); }
.ac-icon.diamond { background: linear-gradient(135deg, #b9f2ff, #00bfff); }
.achievement-card .ac-info { flex: 1; }
.achievement-card .ac-info h4 { font-size: 0.9rem; font-weight: 600; }
.achievement-card .ac-info p { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.achievement-card .ac-check { color: var(--green); }

/* Achievement category grouping */
.ach-summary {
    text-align: center; padding: 12px 0 16px;
    font-size: 0.95rem; color: var(--text-secondary);
}
.ach-summary .ach-count {
    font-weight: 700; font-size: 1.2rem; color: var(--accent-light);
}
.ach-category-header {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 4px 8px; margin-top: 8px;
    font-weight: 600; font-size: 0.95rem; color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}
.ach-category-header .material-icons-round { font-size: 1.2rem; color: var(--accent); }
.ach-cat-count {
    margin-left: auto; font-size: 0.8rem; font-weight: 500;
    color: var(--text-secondary); background: var(--bg-secondary);
    padding: 2px 8px; border-radius: 12px;
}

/* Level list popup */
.level-list-header {
    text-align: center; padding: 8px 0 16px;
    border-bottom: 1px solid var(--border-light); margin-bottom: 12px;
}
.ll-current { font-size: 1rem; color: var(--text-primary); }
.ll-xp { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }
.ll-tier-divider {
    padding: 10px 4px 4px; margin-top: 8px;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; border-bottom: 2px solid;
}
.ll-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ll-item.current { background: rgba(var(--accent-rgb), 0.1); border-radius: var(--radius-sm); }
.ll-item.future { opacity: 0.45; }
.ll-num {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: #fff; flex-shrink: 0;
}
.ll-info { flex: 1; display: flex; flex-direction: column; }
.ll-name { font-size: 0.9rem; font-weight: 500; }
.ll-xp-req { font-size: 0.75rem; color: var(--text-secondary); }

/* Level card progress bar */
.lcb-bar {
    width: 100%; height: 6px; background: rgba(255,255,255,0.1);
    border-radius: 3px; margin-top: 8px; overflow: hidden;
}
.lcb-bar-fill {
    height: 100%; background: var(--accent);
    border-radius: 3px; transition: width 0.5s ease;
}
.lcb-hint {
    font-size: 0.7rem; color: var(--text-secondary);
    margin-top: 4px; text-align: center; opacity: 0.6;
}

/* ============ SOCIAL ============ */
/* ============ SOCIAL TABS ============ */
.social-tabs {
    display: flex; gap: 2px; background: var(--bg-secondary);
    border-radius: var(--radius-md); padding: 3px; margin-bottom: 16px;
}
.social-tab {
    flex: 1 1 0; min-width: 0; padding: 8px 4px; border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-secondary);
    font-weight: 600; font-size: 0.68rem; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 3px;
    position: relative; white-space: nowrap; overflow: hidden;
}
.social-tab .material-icons-round { font-size: 15px; flex-shrink: 0; }
.social-tab.active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.social-content.hidden { display: none; }

/* Tab & nav badges */
.tab-badge, .nav-badge {
    position: absolute; top: 2px; right: 6px;
    background: #e53935; color: white; font-size: 0.6rem; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
}
.nav-badge { top: 4px; right: 8px; }
.tab-badge.hidden, .nav-badge.hidden { display: none; }

/* Section headers in social */
.social-section-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.05em; margin: 16px 0 8px; padding: 0 4px;
}
.social-section-header .material-icons-round { font-size: 16px; }

/* ============ FEED V2 ============ */
.feed-date-group { margin-bottom: 20px; }
.feed-date-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.03em; margin-bottom: 10px; padding: 0 4px;
    text-transform: uppercase;
}
.feed-date-header .material-icons-round { font-size: 14px; }

.feed-card-v2 {
    display: flex; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
    transition: border-color 0.2s;
}
.feed-card-v2:hover { border-color: var(--accent-muted, var(--border)); }
.feed-card-left { flex-shrink: 0; }
.feed-card-right { flex: 1; min-width: 0; }

.fc-avatar {
    width: 38px; height: 38px; border-radius: var(--radius-full);
    background: var(--gradient-primary); display: flex; align-items: center;
    justify-content: center; font-size: 0.85rem; font-weight: 700;
    color: white; flex-shrink: 0;
}

.feed-card-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 4px;
}
.feed-username { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.feed-time { font-size: 0.7rem; color: var(--text-muted); }

.feed-card-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.9rem; margin-bottom: 4px;
}
.feed-card-title strong { color: var(--text-primary); }

.feed-core-info {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 4px;
}

.feed-tm-change {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.75rem; font-weight: 600; padding: 2px 8px;
    border-radius: 4px; margin-bottom: 6px;
}
.feed-tm-change.up { color: #43a047; background: rgba(67,160,71,0.12); }
.feed-tm-change.down { color: #e53935; background: rgba(229,57,53,0.12); }
.feed-tm-change .material-icons-round { font-size: 14px; }

.feed-accessories {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
}
.feed-acc-chip {
    font-size: 0.7rem; padding: 3px 8px;
    background: var(--bg-secondary); border-radius: var(--radius-sm);
    color: var(--text-secondary); white-space: nowrap;
}

.feed-desc {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-top: 6px; line-height: 1.4; font-style: italic;
}

/* Old feed-card kept for backward compat */
.feed-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
}
.feed-card .fc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-card .fc-meta { flex: 1; }
.feed-card .fc-meta h4 { font-size: 0.85rem; }
.feed-card .fc-meta span { font-size: 0.7rem; color: var(--text-muted); }
.feed-card .fc-body { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }

/* ============ FRIENDS ============ */
.friend-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); margin-bottom: 8px; cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.friend-card:active { background: var(--bg-card-hover); }
.friend-card.pending { border-left: 3px solid var(--accent); }
.friend-card .fr-avatar {
    width: 40px; height: 40px; border-radius: var(--radius-full);
    background: var(--gradient-primary); display: flex; align-items: center;
    justify-content: center; font-weight: 700; color: white; flex-shrink: 0;
    font-size: 0.9rem;
}
.friend-card .fr-avatar.has-unread {
    box-shadow: 0 0 0 3px var(--accent);
}
.friend-card .fr-avatar.pending-pulse {
    animation: pulse-ring 1.5s ease infinite;
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(100,100,255,0.4); }
    70% { box-shadow: 0 0 0 6px rgba(100,100,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(100,100,255,0); }
}
.friend-card .fr-info { flex: 1; min-width: 0; }
.friend-card .fr-info h4 { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-card .fr-info span { font-size: 0.75rem; }

.fr-actions { display: flex; gap: 6px; }
.fr-actions-row { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.btn-accept {
    background: var(--accent); color: white; border: none; border-radius: var(--radius-sm);
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: opacity 0.2s;
}
.btn-accept:hover { opacity: 0.85; }
.btn-accept .material-icons-round { font-size: 18px; }
.btn-reject {
    background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-reject:hover { color: #e53935; border-color: #e53935; }
.btn-reject .material-icons-round { font-size: 18px; }

.chat-unread-badge {
    background: #e53935; color: white; font-size: 0.7rem; font-weight: 700;
    min-width: 22px; height: 22px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 6px;
}

.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input {
    flex: 1; background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-primary); padding: 10px 14px; border-radius: var(--radius-md);
    font-size: 0.9rem; font-family: inherit; outline: none;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar button {
    width: 42px; display: flex; align-items: center; justify-content: center;
}
.search-bar button .material-icons-round { font-size: 20px; }

/* ============ CHAT ============ */
.chat-messages {
    flex: 1; overflow-y: auto; padding: 8px 0;
    display: flex; flex-direction: column; gap: 6px;
}
.chat-bubble {
    max-width: 80%; padding: 10px 14px;
    border-radius: var(--radius-md); font-size: 0.9rem; line-height: 1.4;
    animation: bubbleIn 0.2s ease-out;
}
@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-bubble.mine {
    background: var(--accent); color: white;
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
    background: var(--bg-card); border: 1px solid var(--border-light);
    align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-bubble .cb-time { font-size: 0.65rem; opacity: 0.6; margin-top: 4px; display: block; }

.chat-input-bar {
    display: flex; gap: 8px; padding: 12px 0;
    border-top: 1px solid var(--border-light);
}
.chat-input-bar input {
    flex: 1; background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-primary); padding: 10px 14px; border-radius: var(--radius-full);
    font-size: 0.9rem; font-family: inherit; outline: none;
}
.chat-input-bar input:focus { border-color: var(--accent); }
.chat-input-bar .icon-btn { background: var(--accent); color: white; width: 40px; height: 40px; }

/* ============ EQUIPMENT ============ */
.equip-controls {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 0 8px; font-size: 0.8rem;
}
.equip-count { color: var(--text-muted); }

.presets-header { margin-bottom: 6px; }

.presets-row {
    display: flex; gap: 8px; margin-bottom: 14px;
}

.preset-chip {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 8px; border: 2px solid var(--border);
    border-radius: var(--radius-md); background: var(--bg-card);
    color: var(--text-secondary); font-size: 0.78rem; font-weight: 600;
    white-space: nowrap; cursor: pointer; transition: all 0.2s;
}
.preset-chip .material-icons-round { font-size: 1.1rem; }
.preset-chip.active {
    border-color: #3b82f6; background: rgba(59,130,246,0.1); color: #3b82f6;
}
.preset-chip:active { transform: scale(0.97); }

.equipment-list { display: flex; flex-direction: column; gap: 6px; }

.equip-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: var(--bg-card);
    border: 2px solid var(--border-light); border-radius: var(--radius-md);
    cursor: pointer; transition: all 0.2s;
}
.equip-item.selected { border-color: var(--accent); background: rgba(108, 92, 231, 0.06); }

.equip-item .ei-check {
    width: 22px; height: 22px; border-radius: 4px;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s;
}
.equip-item.selected .ei-check { background: var(--accent); border-color: var(--accent); }
.equip-item.selected .ei-check::after { content: '\2713'; color: white; font-size: 0.7rem; font-weight: 700; }

.equip-item .ei-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.equip-item .ei-icon .material-icons-round { font-size: 1.3rem; color: var(--text-muted); }
.equip-item.selected .ei-icon .material-icons-round { color: var(--accent-light); }

.equip-item .ei-info { flex: 1; }
.equip-item .ei-info h4 { font-size: 0.9rem; font-weight: 600; }
.equip-item .ei-info p { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ============ CALIBRATION — Instruction Cards ============ */
.cal-instructions {
    padding: 16px; border-radius: var(--radius-lg); margin-bottom: 16px;
}
.cal-instructions.barbell { background: rgba(30,58,95,0.6); }
.cal-instructions.calisthenics { background: rgba(45,27,105,0.6); }

.cal-instructions h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.cal-instructions .ci-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }

.cal-step {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px;
}
.cal-step-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: #3b82f6;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: white;
    flex-shrink: 0;
}
.cal-step-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

.cal-info-box {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px; border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.2); margin-top: 12px;
}
.cal-info-box .material-icons-round { font-size: 1rem; color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.cal-info-box span { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; }

/* Calibration lift cards */
.cal-lift-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
}
.cal-lift-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.cal-lift-card .clf-row { display: flex; gap: 10px; align-items: center; }
.cal-lift-card .clf-row input {
    flex: 1; padding: 10px; text-align: center;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 1rem; outline: none;
}
.cal-lift-card .clf-row input:focus { border-color: var(--accent); }
.cal-lift-card .clf-row span { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

.cal-result {
    display: flex; align-items: center; gap: 8px;
    margin-top: 8px; font-size: 0.82rem; color: var(--blue);
}
.cal-result .material-icons-round { font-size: 0.9rem; }

/* ============ SETTINGS ============ */
.settings-list { display: flex; flex-direction: column; gap: 2px; }
.settings-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; background: var(--bg-card);
    cursor: pointer; transition: all 0.2s;
}
.settings-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.settings-item:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.settings-item:active { background: var(--bg-card-hover); }
.settings-item .material-icons-round:first-child { color: var(--text-secondary); font-size: 1.3rem; }
.settings-item span:nth-child(2) { flex: 1; font-weight: 500; }
.settings-item .material-icons-round:last-child { color: var(--text-muted); font-size: 1.2rem; }
.settings-item.danger { color: var(--red); }
.settings-item.danger .material-icons-round:first-child { color: var(--red); }

/* ============ BOTTOM NAV ============ */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    display: flex; background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 6px 0 calc(6px + var(--safe-bottom));
    z-index: 100;
}
.bottom-nav.hidden { display: none; }
.nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 2px; padding: 6px 0;
    border: none; background: none; color: var(--text-muted);
    font-size: 0.6rem; font-weight: 500; cursor: pointer; transition: color 0.2s;
}
.nav-item .material-icons-round { font-size: 1.4rem; }
.nav-item.active { color: var(--accent-light); }

/* ============ TOAST ============ */
#toast-container {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: 8px;
    width: calc(100% - 32px); max-width: 440px; pointer-events: none;
}
.toast {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.9rem; box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease; pointer-events: auto;
}
.toast.success { border-color: rgba(0, 184, 148, 0.5); }
.toast.success .material-icons-round { color: var(--green); }
.toast.error { border-color: rgba(225, 112, 85, 0.5); }
.toast.error .material-icons-round { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ============ LOADING ============ */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(10, 10, 15, 0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 9998; backdrop-filter: blur(4px);
}
.loading-overlay.hidden { display: none; }
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ EMPTY STATES ============ */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 48px 16px;
    text-align: center; color: var(--text-muted);
}
.empty-state.hidden { display: none; }
.empty-state .material-icons-round { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* ============ UTILITIES ============ */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }

/* ============ EXERCISE-BY-EXERCISE — New workout view ============ */
.exercise-card-big {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.ecb-header {
    margin-bottom: 12px;
}
.ecb-header h3 {
    font-size: 1.3rem; font-weight: 800; margin-top: 8px;
}
.ecb-stats {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
    align-items: center;
}
.ecb-stat {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.85rem; color: var(--text-secondary);
    background: var(--bg-input); padding: 6px 12px;
    border-radius: var(--radius-full);
}
.ecb-stat .material-icons-round { font-size: 1rem; }
.ecb-plate-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 14px; border-radius: var(--radius-full);
    background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
    color: var(--blue); font-size: 0.8rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.ecb-plate-btn:active { background: rgba(59,130,246,0.2); }
.ecb-plate-btn .material-icons-round { font-size: 1rem; }

/* Exercise progress dots */
.exercise-progress .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border); transition: all 0.3s;
    cursor: pointer;
}
.exercise-progress .dot.active {
    background: var(--accent); width: 24px; border-radius: 4px;
}
.exercise-progress .dot.done { background: var(--green); }
.exercise-progress .dot.core { border: 2px solid var(--accent); }
.exercise-progress .dot.warmup { border: 2px solid var(--green); }
.exercise-progress .dot.cooldown { border: 2px solid var(--purple, #9C27B0); }
.exercise-progress .dot.finish { border: 2px solid var(--orange); }

/* Set rows in exercise-by-exercise view */
.set-row-ex {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 6px; padding: 10px 12px;
    background: var(--bg-input); border-radius: var(--radius-sm);
}
.set-row-ex .set-num {
    font-size: 0.75rem; font-weight: 700;
    color: var(--text-muted); min-width: 28px;
}
.set-row-ex .set-info {
    flex: 1; font-size: 0.9rem; color: var(--text-secondary);
}
.set-row-ex .set-inputs {
    display: flex; align-items: center; gap: 6px; flex: 1;
}
.set-row-ex input {
    width: 60px; padding: 6px 8px; text-align: center;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 0.9rem; font-family: inherit; outline: none;
}
.set-row-ex input:focus { border-color: var(--accent); }
.set-row-ex .set-x { color: var(--text-muted); font-size: 0.8rem; }
.set-row-ex .set-unit { color: var(--text-muted); font-size: 0.75rem; }

.set-check {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: all 0.2s;
}
.set-check .material-icons-round { font-size: 1.5rem; color: var(--border); transition: all 0.2s; }
.set-check.done .material-icons-round { color: var(--green); }

.exercise-sets { margin-bottom: 12px; }
.warmup-sets { margin-bottom: 12px; }

/* Rest timer — enhanced */
.rt-header {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 6px; font-size: 0.8rem; color: var(--text-secondary);
}
.rt-header .material-icons-round { font-size: 1rem; }
.rt-label { font-weight: 600; }
.rest-timer.finished .rt-label { color: var(--green); font-size: 1rem; }

.rt-progress {
    height: 4px; background: rgba(255,255,255,0.06);
    border-radius: 2px; overflow: hidden; margin-bottom: 8px;
}
.rt-progress-fill {
    height: 100%; border-radius: 2px;
    background: var(--blue); transition: width 1s linear;
}
.rest-timer.warning .rt-progress-fill { background: var(--red); }
.rest-timer.finished .rt-progress-fill { background: var(--green); width: 100% !important; }

.rt-time {
    font-size: 1.8rem; font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center; margin: 4px 0;
    color: var(--text-primary);
}
.rest-timer.warning .rt-time { color: var(--red); }
.rest-timer.finished .rt-time { color: var(--green); font-size: 2.2rem; }

.rt-controls {
    display: flex; gap: 12px; justify-content: center;
    margin-bottom: 8px;
}
.rt-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-input); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s; color: var(--text-primary);
}
.rt-btn:active { background: var(--bg-card-hover); }
.rt-btn .material-icons-round { font-size: 1.4rem; }

.rt-presets {
    display: flex; gap: 4px; flex-wrap: wrap; justify-content: center;
}
.rt-preset {
    padding: 5px 10px; border-radius: var(--radius-full);
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); font-size: 0.7rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.rt-preset.active {
    border-color: var(--blue); color: var(--blue);
    background: rgba(59,130,246,0.1);
}
.rt-preset:active { transform: scale(0.95); }

/* Feedback section */
.feedback-section {
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border-light);
}
.feedback-section .field-label {
    font-size: 0.75rem; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.3px;
    margin-bottom: 8px; display: block;
}
.feedback-row { display: flex; gap: 8px; }
.feedback-btn.green.active {
    border-color: var(--green); color: var(--green); background: rgba(0, 184, 148, 0.1);
}
.feedback-btn.blue.active {
    border-color: var(--blue); color: var(--blue); background: rgba(59,130,246, 0.1);
}
.feedback-btn.red.active {
    border-color: var(--red); color: var(--red); background: rgba(225, 112, 85, 0.1);
}

/* Finish card */
.finish-card {
    text-align: center;
}
.finish-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--gradient-workout);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.finish-icon .material-icons-round { font-size: 32px; color: white; }
.workout-notes {
    width: 100%; background: var(--bg-input);
    border: 1px solid var(--border); color: var(--text-primary);
    padding: 12px 14px; border-radius: var(--radius-md);
    font-size: 0.9rem; font-family: inherit;
    resize: vertical; min-height: 60px; outline: none;
}
.workout-notes:focus { border-color: var(--accent); }

/* Plate calculator — new classes */
.pc-input-row {
    display: flex; gap: 8px; align-items: center; margin-bottom: 12px;
}
.pc-input-row label { font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; }
.pc-input-row .input-with-suffix { flex: 1; }

.pc-quick {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.pc-quick-btn {
    padding: 6px 12px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 0.8rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.pc-quick-btn.active {
    background: rgba(59,130,246,0.15); border-color: #3b82f6; color: #3b82f6;
}
.pc-quick-btn:active { transform: scale(0.95); }

.pc-barbell { margin-top: 12px; }
.pc-bar-label {
    font-size: 0.85rem; font-weight: 600; text-align: center; margin-bottom: 12px;
    color: var(--text-secondary);
}
.pc-bar-visual {
    display: flex; align-items: center; justify-content: center;
    min-height: 80px; gap: 0;
}
.pc-plates-left, .pc-plates-right {
    display: flex; align-items: center; gap: 2px;
}
.pc-bar-center {
    width: 60px; height: 10px;
    background: #6b7280; border-radius: 2px;
}
.pc-plate {
    width: 18px; min-height: 24px;
    border-radius: 3px; display: flex;
    align-items: center; justify-content: center;
    font-size: 0.5rem; font-weight: 700;
    writing-mode: vertical-rl; text-orientation: mixed;
}
.pc-summary {
    display: flex; flex-wrap: wrap; gap: 6px;
    justify-content: center; margin-top: 12px;
}
.pc-chip {
    padding: 4px 10px; border-radius: 16px;
    border: 2px solid; font-size: 0.78rem; font-weight: 600;
    background: var(--bg-card);
}

/* Calibration — live preview */
.cal-lift, .cal-cali-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
}
.cal-cali-card .text-xs { font-size: 0.75rem; margin-top: 2px; margin-bottom: 6px; }
.cl-header { margin-bottom: 8px; }
.cl-header h4 { font-size: 1rem; font-weight: 700; }
.cal-inputs {
    display: flex; gap: 8px; align-items: center;
}
.cal-inputs .input-with-suffix { flex: 1; }
.cal-x { color: var(--text-muted); font-size: 1rem; font-weight: 700; }

.cal-preview {
    display: flex; gap: 16px; margin-top: 10px;
    font-size: 0.85rem; color: var(--text-secondary);
}
.cal-preview .cp-e1rm, .cal-preview .cp-tm {
    padding: 4px 10px; border-radius: var(--radius-sm);
    background: var(--bg-input);
}
.cal-preview strong { color: var(--blue); }
.cal-preview .cp-tm strong { color: var(--green); }

/* Calibration instructions — new classes */
.ci-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.ci-header .material-icons-round { font-size: 1.5rem; color: var(--blue); }
.ci-header h4 { font-size: 1.05rem; font-weight: 700; }
.ci-steps { margin-bottom: 12px; }
.ci-step {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px;
}
.ci-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: #3b82f6;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: white; flex-shrink: 0;
}
.ci-step span:last-child { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }
.ci-info {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px; border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.2); margin-top: 4px;
}
.ci-info .material-icons-round { font-size: 1rem; color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.ci-info div { font-size: 0.72rem; color: var(--text-muted); line-height: 1.6; }

/* Equipment item — use material icon for checkbox */
.equip-item .ei-check { border: none; background: none; width: auto; height: auto; }
.equip-item .ei-check .material-icons-round { font-size: 1.4rem; color: var(--border); }
.equip-item.selected .ei-check .material-icons-round { color: var(--accent); }
.equip-item.selected .ei-check::after { display: none; }
.ei-name { flex: 1; font-size: 0.88rem; }
.ei-icon { color: var(--text-muted); }
.equip-item.selected .ei-icon { color: var(--accent-light); }

/* Exercise badges */
.ec-badge {
    font-size: 0.7rem; padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600; text-transform: uppercase;
    display: inline-block;
}
.ec-badge.core { background: rgba(108, 92, 231, 0.15); color: var(--accent-light); }
.ec-badge.accessory { background: rgba(0, 184, 148, 0.15); color: var(--green); }
.ec-badge.warmup { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* Core lifts selection */
.core-lift-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; background: var(--bg-card);
    border: 2px solid var(--border-light); border-radius: var(--radius-md);
    cursor: pointer; transition: all 0.2s; margin-bottom: 6px;
}
.core-lift-item.selected { border-color: var(--accent); background: rgba(108, 92, 231, 0.06); }
.core-lift-item .cli-check .material-icons-round {
    font-size: 1.3rem; color: var(--border); transition: all 0.2s;
}
.core-lift-item.selected .cli-check .material-icons-round { color: var(--accent); }
.cli-info { flex: 1; }
.cli-info h4 { font-size: 0.95rem; font-weight: 600; }
.cli-cat { font-size: 0.75rem; color: var(--text-muted); }

.core-lifts-counter {
    font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
    text-align: center;
}

.rotation-preview {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.rot-item {
    padding: 6px 12px; border-radius: var(--radius-full);
    background: rgba(108, 92, 231, 0.1); border: 1px solid rgba(108, 92, 231, 0.2);
    color: var(--accent-light); font-size: 0.8rem; font-weight: 600;
}

/* Goal card colors */
.gc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.gc-icon-wrap {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gc-icon-wrap .material-icons-round { font-size: 1.3rem; color: white; }
.gc-icon-wrap.red { background: linear-gradient(135deg, #e17055, #d63031); }
.gc-icon-wrap.orange { background: linear-gradient(135deg, #fdcb6e, #e17055); }
.gc-icon-wrap.blue { background: linear-gradient(135deg, #74b9ff, #0984e3); }
.gc-icon-wrap.purple { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.gc-icon-wrap.green { background: linear-gradient(135deg, #55efc4, #00b894); }
.gc-icon-wrap.teal { background: linear-gradient(135deg, #81ecec, #00cec9); }
.gc-text { flex: 1; }
.gc-text h4 { font-size: 0.95rem; font-weight: 700; }
.gc-params {
    font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-input); padding: 2px 8px; border-radius: var(--radius-full);
    display: inline-block; margin-top: 2px;
}
.gc-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }

/* Summary card in wizard */
.summary-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 16px;
}
.sum-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}
.sum-row:last-child { border-bottom: none; }
.sum-row .material-icons-round { font-size: 1.2rem; color: var(--text-muted); flex-shrink: 0; }

/* Info note */
.info-note {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: rgba(59,130,246,0.06);
    font-size: 0.78rem; color: var(--text-secondary);
    line-height: 1.4;
}
.info-note .material-icons-round { font-size: 1rem; color: var(--blue); flex-shrink: 0; margin-top: 1px; }

/* Cycle phase banner */
#workout-cycle-banner {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; margin: 0 16px 8px;
    background: rgba(253, 121, 168, 0.1); border: 1px solid rgba(253, 121, 168, 0.2);
    border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--pink);
}
#workout-cycle-banner .material-icons-round { font-size: 1rem; }

/* Accessory badge colors */
.ec-badge.blue { background: rgba(59,130,246,0.15); color: #74b9ff; }
.ec-badge.purple { background: rgba(108,92,231,0.15); color: var(--accent-light); }
.ec-badge.orange { background: rgba(253,203,110,0.15); color: var(--orange); }
.ec-badge.red { background: rgba(225,112,85,0.15); color: var(--red); }
.ec-badge.green { background: rgba(0,184,148,0.15); color: var(--green); }

/* ============ WIZARD SKILLS ============ */
.skill-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; background: var(--bg-card);
    border: 2px solid var(--border-light); border-radius: var(--radius-md);
    cursor: pointer; transition: all 0.2s; margin-bottom: 6px;
}
.skill-card.checked { border-color: var(--green); background: rgba(0, 184, 148, 0.06); }
.skill-card .sc-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); flex-shrink: 0;
}
.skill-card .sc-icon .material-icons-round { font-size: 1.2rem; color: var(--text-muted); }
.skill-card.checked .sc-icon { background: rgba(0, 184, 148, 0.15); }
.skill-card.checked .sc-icon .material-icons-round { color: var(--green); }
.skill-card .sc-info { flex: 1; }
.skill-card .sc-info h4 { font-size: 0.95rem; font-weight: 600; }
.skill-card .sc-info p { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.sc-current-level { font-size: 0.72rem; color: var(--accent); font-weight: 600; margin-top: 3px; }
.sc-current-level.sc-done { color: var(--green); }
.sc-current-level.sc-active { color: var(--accent-light); }
.sc-prog-target { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.sc-level-select { background: var(--card-bg); color: var(--text-primary); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 4px 8px; font-size: 0.75rem; margin-top: 4px; width: 100%; cursor: pointer; appearance: auto; }
.sc-level-select:focus { outline: none; border-color: var(--accent); }
.sc-actions { display: flex; align-items: center; gap: 6px; }
.sc-prog-btn { background: rgba(255,255,255,0.08); border: none; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); }
.sc-prog-btn:hover { background: rgba(255,255,255,0.15); color: var(--accent-light); }
.sb-prog-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.skill-card .sc-check .material-icons-round {
    font-size: 1.3rem; color: var(--border); transition: all 0.2s;
}
.skill-card.checked .sc-check .material-icons-round { color: var(--green); }
.skill-card.disabled { opacity: 0.5; }
.skill-card:not(.checked):not(.disabled) .sc-check .material-icons-round { color: var(--red); }

/* Exercise info inline button (in workout) */
.exercise-info-inline {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255,255,255,0.08); border: none;
    cursor: pointer; vertical-align: middle; margin-left: 6px;
    padding: 0; flex-shrink: 0; transition: all 0.2s;
}
.exercise-info-inline .material-icons-round { font-size: 0.9rem; color: var(--text-muted); }
.exercise-info-inline:hover { background: rgba(253, 203, 110, 0.2); }
.exercise-info-inline:hover .material-icons-round { color: var(--orange); }
.wp-item .exercise-info-inline { margin-left: auto; }

/* Exercise info button (exercise manager) */
.exercise-info-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; flex-shrink: 0; margin-right: 4px;
}
.exercise-info-btn .material-icons-round {
    font-size: 1.2rem; color: var(--text-secondary); transition: color 0.2s;
}
.exercise-info-btn:hover .material-icons-round { color: var(--orange); }

/* Exercise info popup */
.exercise-info-popup-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: fadeIn 0.2s ease;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.exercise-info-popup {
    background: #1a1a2e; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    max-width: 420px; width: 100%; max-height: 80vh;
    overflow-y: auto; padding: 24px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.7);
}
.exercise-info-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 20px; gap: 12px;
    padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.exercise-info-header h3 { margin: 0; font-size: 1.2rem; color: #fff; font-weight: 700; }
.icon-btn.muted { color: var(--text-muted, #888); opacity: 0.6; }

/* ===== Podsumowanie treningu przed startem ===== */
.ws-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 18px;
}
.ws-card {
    background: #1a1a2e; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px; padding: 22px; width: 100%; max-width: 440px;
    box-shadow: 0 16px 56px rgba(0,0,0,0.7);
}
.ws-kicker { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent, #4f8cff); font-weight: 700; }
.ws-head h3 { margin: 4px 0 16px; font-size: 1.25rem; color: #fff; }
.ws-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-tile {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 14px; text-align: center;
}
.ws-tile .material-icons-round { font-size: 1.5rem; color: var(--accent, #4f8cff); }
.ws-val { font-size: 1.35rem; font-weight: 800; color: #fff; margin-top: 4px; line-height: 1.1; }
.ws-val small { font-size: 0.7rem; font-weight: 600; color: var(--text-secondary, #aab); }
.ws-stars { color: #ffd166; letter-spacing: 2px; font-size: 1.1rem; }
.ws-lbl { font-size: 0.75rem; color: var(--text-secondary, #9aa); margin-top: 2px; }
.ws-note { font-size: 0.72rem; color: var(--text-muted, #888); margin: 14px 0 16px; line-height: 1.4; }
.ws-actions { display: flex; gap: 10px; }
.ws-actions button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ws-actions .material-icons-round { font-size: 1.1rem; }

.exercise-info-image {
    margin: 0 0 16px; border-radius: 12px; overflow: hidden;
    background: #0f0f1a; line-height: 0;
    border: 1px solid rgba(255,255,255,0.08);
}
.exercise-info-image img {
    width: 100%; height: auto; display: block;
    max-height: 200px;            /* podgląd, nie zasłania reszty */
    object-fit: contain;          /* cały ruch widoczny, bez przycinania */
    object-position: center;
}
.exercise-info-section {
    margin-bottom: 18px; padding: 12px 14px;
    background: rgba(255,255,255,0.04); border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.exercise-info-section h4 {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; letter-spacing: 0.5px;
    color: var(--orange, #f59e0b); margin: 0 0 8px 0; text-transform: uppercase;
    font-weight: 700;
}
.exercise-info-section h4 .material-icons-round { font-size: 1rem; }
.exercise-info-section p {
    margin: 0; font-size: 0.88rem; color: rgba(255,255,255,0.85); line-height: 1.6;
}
.exercise-info-links {
    display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.exercise-link {
    display: flex; align-items: center; gap: 4px;
    padding: 8px 14px; border-radius: 8px; font-size: 0.85rem;
    font-weight: 600; text-decoration: none; transition: all 0.2s;
}
.exercise-link .material-icons-round { font-size: 1rem; }
.exercise-link.exrx {
    background: rgba(59,130,246,0.15); color: #60a5fa;
}
.exercise-link.exrx:hover { background: rgba(59,130,246,0.3); }
.exercise-link.yt {
    background: rgba(239,68,68,0.15); color: #f87171;
}
.exercise-link.yt:hover { background: rgba(239,68,68,0.3); }

.step-icon-circle.orange {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

/* ============ EXERCISE SUGGESTION BANNER ============ */
.suggestion-banner {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.12) 0%, rgba(162, 155, 254, 0.08) 100%);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: var(--radius-md); padding: 14px 16px;
    margin: 8px 16px; display: flex; gap: 12px; align-items: flex-start;
}
.suggestion-banner .sb-icon {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
}
.suggestion-banner .sb-icon .material-icons-round { font-size: 1.2rem; color: white; }
.suggestion-banner .sb-content { flex: 1; }
.suggestion-banner .sb-title { font-size: 0.85rem; font-weight: 600; color: var(--accent-light); }
.suggestion-banner .sb-text { font-size: 0.8rem; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }
.suggestion-banner .sb-actions { display: flex; gap: 8px; margin-top: 10px; }
.suggestion-banner .sb-btn {
    font-size: 0.75rem; font-weight: 600; padding: 6px 14px;
    border-radius: var(--radius-full); border: none; cursor: pointer; transition: all 0.2s;
}
.suggestion-banner .sb-btn.primary { background: var(--accent); color: white; }
.suggestion-banner .sb-btn.primary:hover { background: var(--accent-dark); }
.suggestion-banner .sb-btn.secondary { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.suggestion-banner .sb-btn.secondary:hover { background: rgba(255,255,255,0.12); }
.suggestion-banner.skill-suggestion {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.12) 0%, rgba(225, 112, 85, 0.08) 100%);
    border-color: rgba(253, 203, 110, 0.25);
}
.suggestion-banner.skill-suggestion .sb-icon {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}
.suggestion-banner.skill-suggestion .sb-title { color: #fdcb6e; }

/* Skill progression in suggestions */
.sb-progression { background: rgba(0,0,0,0.2); border-radius: var(--radius-sm); padding: 10px; margin-top: 8px; }
.sb-prog-exercise { font-weight: 700; font-size: 0.9rem; color: var(--accent-light); }
.sb-prog-target { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.sb-prog-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-style: italic; }

/* Skill progression popup */
.sp-levels { display: flex; flex-direction: column; gap: 0; }
.sp-level { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.sp-level:last-child { border-bottom: none; }
.sp-level-marker { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-input); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sp-level-num { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.sp-level.sp-done .sp-level-marker { background: rgba(0,184,148,0.15); }
.sp-level.sp-current .sp-level-marker { background: var(--accent); }
.sp-level.sp-current .sp-level-num { color: white; }
.sp-level-info { flex: 1; }
.sp-level-exercise { font-weight: 700; font-size: 0.9rem; }
.sp-level.sp-done .sp-level-exercise { color: var(--text-muted); text-decoration: line-through; }
.sp-level.sp-current .sp-level-exercise { color: var(--accent-light); }
.sp-level-target { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-top: 2px; }
.sp-level-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }
.sp-level-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-style: italic; }

/* ============ WARMUP PHASES ============ */
.warmup-phase { margin-bottom: 16px; }
.wp-header {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0; font-weight: 600; font-size: 0.9rem;
}
.wp-header .material-icons-round { font-size: 1.1rem; }
.wp-title { flex: 1; }
.wp-items { display: flex; flex-direction: column; gap: 4px; }
.wp-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 12px; background: var(--bg-secondary); border-radius: var(--radius-sm);
}
.wp-item .set-check { flex-shrink: 0; margin-top: 2px; }
.wp-item-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wp-item-name { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }
.wp-item-detail { font-size: 0.75rem; color: var(--text-muted); }

/* ============ COOLDOWN ============ */
.ec-badge.cooldown {
    background: rgba(108,92,231,0.15); color: var(--accent-light);
}
.cooldown-list { display: flex; flex-direction: column; gap: 4px; }

/* ============ STRENGTH MANNEQUIN ============ */
.strength-analysis { }
.strength-analysis h3 { margin-bottom: 12px; }
.sa-overall {
    display: flex; flex-direction: column; align-items: center;
    margin-bottom: 16px;
}
.sa-overall-tier {
    font-size: 1.4rem; font-weight: 700;
}
.sa-mannequin-wrap {
    display: flex; justify-content: center;
    padding: 8px 0; margin-bottom: 12px;
}
.mannequin-container { display: flex; justify-content: center; margin: 8px 0; }
.body-mannequin {
    width: 180px; height: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.05));
}

.tier-legend {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
    margin-bottom: 12px;
}
.tier-legend-item {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.7rem; color: var(--text-muted);
}
.tier-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block;
}

.bp-details { display: flex; flex-direction: column; gap: 4px; }
.bp-detail-row {
    display: grid; grid-template-columns: 10px 60px 60px 1fr;
    align-items: center; gap: 6px;
    padding: 8px 10px; background: var(--bg-secondary);
    border-radius: var(--radius-sm); font-size: 0.8rem;
}
.bp-dot { width: 8px; height: 8px; border-radius: 50%; }
.bp-name { color: var(--text-primary); font-weight: 500; white-space: nowrap; }
.bp-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.bp-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }
.bp-tier { font-weight: 600; font-size: 0.7rem; white-space: nowrap; text-align: right; }
.bp-trend { font-weight: 700; font-size: 0.85rem; }

/* ============ GROUP INVITE ============ */
.invite-friends-list { display: flex; flex-direction: column; gap: 8px; }
.invite-friend-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: 10px; cursor: pointer; }
.invite-friend-item input { accent-color: var(--accent); width: 18px; height: 18px; }
.invite-friend-name { font-size: 0.95rem; }

/* ============ ONE-OFF WORKOUT ============ */
.btn-oneoff { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 16px; border: 1px dashed var(--border-light); border-radius: 12px; background: transparent; color: var(--text-secondary); font-size: 0.9rem; cursor: pointer; margin-top: 8px; transition: all 0.2s; }
.btn-oneoff:hover { border-color: var(--accent); color: var(--accent-light); }
.oneoff-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.oneoff-type-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 12px; background: var(--surface); border: 2px solid transparent; cursor: pointer; color: var(--text-primary); transition: all 0.2s; }
.oneoff-type-btn.selected { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.15); }
.oneoff-type-btn .material-icons-round { font-size: 1.8rem; }

/* ============ BLOCK STATS ============ */
.block-stat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.block-stat-name { font-size: 0.85rem; min-width: 100px; flex-shrink: 0; }
.block-stat-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.block-stat-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }
.block-stat-count { font-size: 0.8rem; font-weight: 600; color: var(--accent-light); min-width: 24px; text-align: right; }

/* ============ MESSAGE STATUS ============ */
.msg-status { font-size: 0.7rem; margin-left: 4px; }
.msg-status.sent { color: rgba(255,255,255,0.4); }
.msg-status.read { color: var(--accent-light); }

/* ============ CALISTHENICS STATS ============ */
.cal-overview-row { display: flex; gap: 8px; margin-bottom: 12px; }
.cal-overview-stat { flex: 1; background: var(--surface); border-radius: 10px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.cal-ov-num { font-size: 1.4rem; font-weight: 700; color: var(--accent-light); }
.cal-ov-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.cal-card { background: var(--surface); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.cal-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.cal-card-left { flex: 1; }
.cal-card-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.cal-card-sub { font-size: 0.75rem; color: var(--text-muted); }
.cal-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cal-card-reps { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.cal-card-trend { font-size: 0.85rem; margin-left: 2px; }
.cal-card-trend.trend-up { color: #4ade80; }
.cal-card-trend.trend-down { color: #f87171; }
.cal-card-trend.trend-flat { color: var(--text-muted); }
.cal-sparkline { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
.cal-spark-bar { width: 6px; background: var(--accent); border-radius: 2px; opacity: 0.7; }
.cal-spark-bar:last-child { opacity: 1; }
.cal-progress-track { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.cal-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light)); border-radius: 3px; transition: width 0.4s; }
.cal-progress-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; text-align: right; }
.cal-skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.cal-skill-card { background: var(--surface); border-radius: 10px; padding: 10px; text-align: center; }
.cal-skill-card.active { border: 1px solid var(--accent); }
.cal-skill-card.inactive { opacity: 0.45; }
.cal-skill-name { font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; text-transform: capitalize; }
.cal-skill-dots { display: flex; justify-content: center; gap: 3px; margin-bottom: 4px; }
.cal-skill-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.cal-skill-dot.filled { background: var(--accent); }
.cal-skill-lvl { font-size: 0.65rem; color: var(--text-muted); }

/* ============ GROUP PANEL ============ */
.gp-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; margin: 0 -16px 12px;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border-light);
    overflow-x: auto; scrollbar-width: none;
}
.gp-bar::-webkit-scrollbar { display: none; }
.gp-title { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; margin-right: 4px; }
.gp-loading { padding: 8px 12px; font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.gp-member {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    min-width: 56px; position: relative;
}
.gp-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--surface); display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
    border: 2px solid var(--border-light); position: relative;
}
.gp-avatar.pending { border-color: var(--text-muted); opacity: 0.6; }
.gp-avatar.accepted { border-color: var(--accent); }
.gp-avatar.training { border-color: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.3); }
.gp-avatar.finished { border-color: #facc15; }
.gp-avatar.declined { border-color: #f87171; opacity: 0.4; }
.gp-status-icon {
    position: absolute; bottom: -2px; right: -2px;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.55rem; color: #fff; font-weight: 700;
}
.gp-status-icon.pending { background: var(--text-muted); }
.gp-status-icon.accepted { background: var(--accent); }
.gp-status-icon.training { background: #4ade80; }
.gp-status-icon.finished { background: #facc15; color: #000; }
.gp-status-icon.declined { background: #f87171; }
.gp-name {
    font-size: 0.6rem; color: var(--text-secondary);
    max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}
.gp-progress {
    font-size: 0.55rem; color: var(--accent-light); font-weight: 600;
}

/* ============ GROUP INVITES TAB ============ */
.group-invite-card {
    background: var(--surface); border-radius: 12px; padding: 12px;
    margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
}
.group-invite-card .gi-info { flex: 1; }
.group-invite-card .gi-host { font-weight: 600; font-size: 0.95rem; }
.group-invite-card .gi-type { font-size: 0.8rem; color: var(--text-secondary); }
.group-invite-card .gi-actions { display: flex; gap: 6px; }
.group-invite-card .gi-actions button {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.gi-accept { background: var(--accent); color: #fff; }
.gi-decline { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* ============ PROFILE STATS CARD ============ */
.ps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ps-card {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(var(--accent-rgb), 0.06) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.12); border-radius: 14px; padding: 14px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ps-icon { font-size: 1.2rem; color: var(--accent); margin-bottom: 2px; opacity: 0.8; width: 24px; height: 24px; line-height: 24px; text-align: center; }
.ps-val { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.ps-label { font-size: 0.68rem; color: var(--text-muted); }
.ps-subrow {
    display: flex; justify-content: space-around; padding: 8px 0;
    font-size: 0.8rem; color: var(--text-secondary);
    border-top: 1px solid var(--border-light); margin-top: 4px;
}
.ps-subrow strong { color: var(--accent-light); }
.streak-deadline { display: block; margin-top: 2px; line-height: 1.2; }
.ps-card { cursor: pointer; transition: transform 0.15s; }
.ps-card:active { transform: scale(0.95); }

/* ============ PR ITEMS ============ */
.pr-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: var(--surface); border-radius: 10px;
    margin-bottom: 6px; cursor: pointer; transition: background 0.15s;
}
.pr-item:active { background: var(--bg-secondary); }
.pri-icon { font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.pri-name { flex: 1; font-size: 0.9rem; }
.pri-value { font-weight: 700; font-size: 1rem; color: var(--accent-light); }
.pri-chevron { font-size: 1rem; color: var(--text-muted); flex-shrink: 0; }

/* ============ STAT POPUP ============ */
.stat-popup-overlay {
    position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.6);
    display: flex; align-items: flex-end; justify-content: center;
    animation: fadeIn 0.15s;
}
.stat-popup-overlay.hidden { display: none; }
.stat-popup {
    width: 100%; max-width: 420px; max-height: 80vh;
    background: var(--bg-primary); border-radius: 16px 16px 0 0;
    padding: 16px; overflow-y: auto;
    animation: slideUp 0.2s;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.stat-popup-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stat-popup-header h3 { margin: 0; font-size: 1.1rem; }
.stat-popup-body {}
.popup-stat-row { display: flex; gap: 8px; margin-bottom: 8px; }
.popup-stat { flex: 1; background: var(--surface); border-radius: 10px; padding: 10px; text-align: center; }
.popup-stat-val { display: block; font-size: 1.3rem; font-weight: 700; color: var(--accent-light); }
.popup-stat-label { font-size: 0.7rem; color: var(--text-muted); }

/* ============ ACHIEVEMENT ACTIONS ============ */
.ac-actions {
    display: flex; gap: 4px; margin-left: auto; flex-shrink: 0;
}
.ac-btn {
    background: rgba(255,255,255,0.06); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary); transition: all 0.2s;
}
.ac-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }
.ac-btn-active { background: rgba(var(--accent-rgb), 0.2); color: var(--accent); border-color: var(--accent); }
.ac-btn .material-icons-round { font-size: 1rem; }

/* ============ FRIEND PROFILE POPUP ============ */
.fp-header {
    display: flex; gap: 14px; align-items: center; margin-bottom: 16px;
}
.fp-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; color: white; flex-shrink: 0;
}
.fp-info h3 { margin: 0; font-size: 1.1rem; }
.fp-level { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.fp-pinned {
    padding: 10px;
    background: rgba(255,255,255,0.04); border-radius: var(--radius-md);
    margin-bottom: 14px; border: 1px solid rgba(255,215,0,0.15);
}
.fp-pinned-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.fp-pinned-content { display: flex; gap: 10px; align-items: center; }
.fp-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin-bottom: 14px;
}
.fp-stat {
    text-align: center; padding: 8px 4px;
    background: rgba(255,255,255,0.04); border-radius: var(--radius-sm);
}
.fp-stat-val { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.fp-stat-lbl { font-size: 0.7rem; color: var(--text-secondary); }
.fp-achs {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}

/* ============ CHALLENGE CARDS ============ */
.challenge-card {
    background: var(--card-bg); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
    cursor: pointer; transition: border-color 0.2s;
}
.challenge-card:hover { border-color: var(--accent); }
.ch-top {
    display: flex; align-items: center; gap: 10px;
}
.ch-info { flex: 1; }
.ch-title { font-weight: 600; font-size: 0.9rem; }
.ch-creator { font-size: 0.75rem; color: var(--text-secondary); }
.ch-progress {
    display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.ch-progress .lcb-bar { flex: 1; }
.ch-pct { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; }
.ch-actions {
    display: flex; gap: 8px; margin-top: 10px;
}
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* Challenge detail popup */
.ch-detail-type {
    font-size: 0.8rem; color: var(--accent); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.ch-detail-target {
    font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px;
}
.ch-winner {
    display: flex; align-items: center; gap: 8px; padding: 10px;
    background: rgba(255,215,0,0.08); border-radius: var(--radius-sm);
    font-weight: 600; margin-bottom: 12px;
}
.ch-participants { display: flex; flex-direction: column; gap: 10px; }
.ch-participant {
    padding: 10px; background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
}
.ch-p-top { display: flex; align-items: center; gap: 8px; }
.ch-p-name { font-weight: 600; font-size: 0.9rem; }
.ch-p-bar { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.ch-p-bar .lcb-bar { flex: 1; }

/* Challenge create popup */
.ch-create h4 { margin: 0 0 14px; }
.ch-create-section { margin-bottom: 14px; }
.ch-create-section label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
}
.ch-create-section select,
.ch-create-section input {
    width: 100%; padding: 10px; background: var(--input-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    color: var(--text-primary); font-size: 0.9rem;
}
.ch-participant-list {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 150px; overflow-y: auto;
}
.ch-p-check {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px;
    background: rgba(255,255,255,0.04); border-radius: var(--radius-sm);
    font-size: 0.9rem; cursor: pointer;
}
.ch-p-check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Feed achievement card */
.feed-ach-card {
    border-left: 3px solid var(--accent); padding-left: 10px;
}

/* ============ DESKTOP ENHANCEMENT ============ */
@media (min-width: 481px) {
    #app { border-left: 1px solid var(--border-light); border-right: 1px solid var(--border-light); }
    body { background: #050508; }
}
