/**
 * PWA Treinos - Inovarun
 * Estilos mobile-first com design system Inovarun
 */

/* =============================================
   DESIGN TOKENS (alinhados com design-system.md)
   ============================================= */
:root {
    --primary: #daff02;
    --primary-dim: rgba(218, 255, 2, 0.15);
    --primary-hover: #c4e600;
    --dark: #080808;
    --dark-surface: #111111;
    --dark-card: #1a1a1a;
    --dark-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f5f5;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --success: #4CAF50;
    --success-dim: rgba(76, 175, 80, 0.15);
    --warning: #FF9800;
    --warning-dim: rgba(255, 152, 0, 0.15);
    --danger: #F44336;
    --danger-dim: rgba(244, 67, 54, 0.15);
    --radius-card: 16px;
    --radius-btn: 25px;
    --radius-input: 12px;
    --transition: all 0.3s ease;
    --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--dark);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   APP LAYOUT
   ============================================= */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* =============================================
   HEADER / TOPBAR
   ============================================= */
.app-header {
    background: var(--dark-surface);
    padding: calc(var(--safe-top) + 16px) 20px 16px;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.app-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.app-logo-img {
    height: 18px;
    width: auto;
    display: block;
    object-fit: contain;
}

.header-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.header-back:hover {
    color: var(--primary);
}

.header-back svg {
    width: 18px;
    height: 18px;
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.app-content {
    flex: 1;
    padding: 20px 16px;
    padding-bottom: calc(var(--safe-bottom) + 80px);
}

/* =============================================
   LOGIN SCREEN
   ============================================= */
.login-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(218, 255, 2, 0.08) 0%, transparent 70%);
    top: -80px;
    right: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.login-screen::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(218, 255, 2, 0.05) 0%, transparent 70%);
    bottom: 60px;
    left: -60px;
    border-radius: 50%;
    pointer-events: none;
}

.login-brand {
    margin-bottom: 40px;
    text-align: center;
}

.login-brand-logo-img {
    height: 56px;
    width: auto;
    display: block;
    margin: 0 auto 8px;
    object-fit: contain;
}

.login-brand-tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-card);
    padding: 28px 24px;
}

.login-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 28px;
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-input);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(218, 255, 2, 0.05);
    box-shadow: 0 0 0 3px rgba(218, 255, 2, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger);
    background: var(--danger-dim);
}

.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
}

.form-error.visible {
    display: block;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--dark);
}

.btn-primary:hover, .btn-primary:active {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(218, 255, 2, 0.25);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--dark-border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 16px;
}

.btn-ghost:hover {
    color: var(--primary);
}

.btn-danger {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(244, 67, 54, 0.25);
}

.btn-block {
    width: 100%;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(218, 255, 2, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-body {
    padding: 16px;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--dark-border);
    background: rgba(255,255,255,0.02);
}

/* =============================================
   TREINO CARD (Lista)
   ============================================= */
.treino-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
}

.treino-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-card);
    transition: var(--transition);
}

.treino-card:hover .treino-card-inner,
.treino-card:active .treino-card-inner {
    border-color: rgba(218, 255, 2, 0.25);
    background: rgba(218, 255, 2, 0.04);
}

.treino-dia-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.treino-dia-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.treino-dia-num {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.2;
}

.treino-info {
    flex: 1;
    min-width: 0;
}

.treino-nome {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.treino-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.treino-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.treino-meta-item svg {
    width: 12px;
    height: 12px;
}

.treino-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

.treino-arrow svg {
    width: 16px;
    height: 16px;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pendente {
    background: var(--warning-dim);
    color: var(--warning);
}

.status-concluido {
    background: var(--success-dim);
    color: var(--success);
}

.status-cancelado {
    background: var(--danger-dim);
    color: var(--danger);
}

/* =============================================
   TREINO DETALHE
   ============================================= */
.treino-hero {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 16px;
}

.treino-hero-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.treino-hero-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.2;
}

.treino-hero-week {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

.treino-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.treino-stat {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.treino-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    line-height: 1.2;
}

.treino-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
    display: block;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dark-border);
}

.orientacoes-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--dark-border);
    border-left: 3px solid var(--primary);
    border-radius: 12px;
    padding: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Dias da semana - detalhe */
.dias-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dia-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    overflow: hidden;
}

.dia-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dia-item-header:hover {
    background: rgba(255,255,255,0.03);
}

.dia-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.dia-nome {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.dia-tipo {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dia-item-body {
    padding: 0 16px 14px;
    border-top: 1px solid var(--dark-border);
    display: none;
}

.dia-item-body.open {
    display: block;
    padding-top: 12px;
}

.dia-descricao {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =============================================
   FEEDBACK SCREEN
   ============================================= */
.rating-stars {
    display: flex;
    gap: 10px;
    margin: 8px 0;
}

.rating-star {
    width: 44px;
    height: 44px;
    border: 2px solid var(--dark-border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.rating-star.active,
.rating-star:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--primary);
    transform: scale(1.1);
}

.esforco-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.esforco-btn {
    padding: 10px 16px;
    border: 1.5px solid var(--dark-border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font);
}

.esforco-btn.active {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--primary);
}

textarea.form-control {
    resize: none;
    min-height: 100px;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* =============================================
   WEEK HEADER
   ============================================= */
.week-header {
    margin-bottom: 20px;
}

.week-greeting {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.week-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.2;
}

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

.week-progress {
    margin-top: 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    height: 6px;
    overflow: hidden;
}

.week-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 8px;
    transition: width 0.8s ease;
}

.week-progress-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

/* =============================================
   OFFLINE BANNER
   ============================================= */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--danger);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-banner.show {
    transform: translateY(0);
}

/* =============================================
   LOADER / SPINNER
   ============================================= */
.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(218, 255, 2, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =============================================
   TOAST / ALERTS
   ============================================= */
.toast-container {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 448px;
}

.toast {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error   { border-left: 3px solid var(--danger);  }
.toast.toast-info    { border-left: 3px solid var(--primary); }

/* =============================================
   DIVIDER
   ============================================= */
.divider {
    height: 1px;
    background: var(--dark-border);
    margin: 20px 0;
}

/* =============================================
   UTILIDADES
   ============================================= */
.text-primary-color { color: var(--primary); }
.text-secondary     { color: var(--text-secondary); }
.text-muted         { color: var(--text-muted); }
.text-success       { color: var(--success); }
.text-warning       { color: var(--warning); }
.text-danger        { color: var(--danger); }

.fw-900 { font-weight: 900; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }

.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }

.w-full { width: 100%; }

/* =============================================
   RESPONSIVE DESKTOP (fallback)
   ============================================= */
@media (min-width: 480px) {
    .app-container {
        border-left: 1px solid var(--dark-border);
        border-right: 1px solid var(--dark-border);
        box-shadow: 0 0 60px rgba(0,0,0,0.5);
    }
}

/* =============================================
   ACESSIBILIDADE
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   WORKOUT DETAIL BLOCKS (PREMIUM)
   ============================================= */
.detalhe-bloco {
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.detalhe-bloco-titulo {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detalhe-bloco-conteudo {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tiros-box {
    border: 1.5px dashed rgba(244, 67, 54, 0.35);
    background: rgba(244, 67, 54, 0.03);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

.tiros-box .detalhe-bloco-titulo {
    color: var(--danger);
}

.tiros-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.tiros-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
}

.tiros-item-value {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}

.tiros-item-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-top: 1px;
}

.grid-detalhes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.grid-detalhe-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.grid-detalhe-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.grid-detalhe-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
}

.obs-treinador {
    background: rgba(218, 255, 2, 0.03);
    border: 1px solid rgba(218, 255, 2, 0.15);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
    position: relative;
}

.obs-treinador-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}

.obs-treinador-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 950;
}

/* =============================================
   INLINE FEEDBACK FORM
   ============================================= */
.feedback-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1.5px dashed var(--dark-border);
}

.feedback-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.concluido-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 3px;
    border: 1px solid var(--dark-border);
    margin-bottom: 16px;
}

.concluido-option {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.concluido-option.active[data-val="1"] {
    background: var(--success);
    color: var(--dark);
}

.concluido-option.active[data-val="0"] {
    background: var(--danger);
    color: var(--text-primary);
}

.pse-slider-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

.pse-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pse-badge {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 900;
    background: var(--primary-dim);
    color: var(--primary);
    min-width: 42px;
    text-align: center;
}

.pse-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #4CAF50, #8BC34A, #CDDC39, #FFEB3B, #FFC107, #FF9800, #FF5722, #F44336);
    outline: none;
    margin: 12px 0 6px;
}

.pse-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 3px solid var(--dark);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.pse-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.pse-legend {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

.feedback-status-box {
    background: rgba(76, 175, 80, 0.05);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    padding: 14px;
    margin-top: 14px;
}

.feedback-status-box.nao-realizado {
    background: rgba(244, 67, 54, 0.05);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.feedback-status-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feedback-status-title.concluido { color: var(--success); }
.feedback-status-title.nao-realizado { color: var(--danger); }

.feedback-status-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* =============================================
   BLOCOS DE TREINAMENTO RICO (PWA)
   ============================================= */
.workout-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

.workout-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.workout-block-title svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--primary);
}

.workout-block p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.workout-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.workout-meta-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
}

.workout-meta-item .label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.workout-meta-item .value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Customização para observações do treinador */
.obs-treinador-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.obs-treinador-title svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--primary);
}

.obs-treinador p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ---- Banner de Instalação PWA ---- */
#pwa-install-banner {
    position: fixed;
    bottom: -120px;
    left: 0; right: 0;
    z-index: 9999;
    padding: 0 12px 12px;
    transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#pwa-install-banner.show { bottom: 0; }

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    border: 1px solid rgba(218, 255, 2, 0.25);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}

.pwa-install-icon { font-size: 1.6rem; flex-shrink: 0; }

.pwa-install-text {
    flex: 1;
    min-width: 0;
}
.pwa-install-text strong {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.pwa-install-text small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

.pwa-install-btn {
    flex-shrink: 0;
    background: #daff02;
    color: #080808;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.pwa-install-btn:active { opacity: 0.85; }

.pwa-install-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.pwa-install-dismiss:hover { color: #fff; }
