/* ==================== PANOBIANCO - TEMA CLARO ==================== */

/* Cores do App */
:root {
    --primary: #FF6B35;
    --primary-light: #FF8A5C;
    --primary-dark: #E55A2B;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-card: #FFF5F2;
    --bg-card-pink: #FFE8E0;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #E0E0E0;
    --badge-active-bg: #FFE4DB;
    --badge-active-text: #FF6B35;
    --badge-inactive-bg: #FFF0EB;
    --success: #4CAF50;
    --error: #F44336;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ==================== APP CONTAINER ==================== */
.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    background: var(--bg-primary);
    position: relative;
    padding-bottom: calc(70px + var(--safe-area-bottom));
}

/* ==================== HEADER ==================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    padding-top: calc(16px + var(--safe-area-top));
    padding-left: calc(20px + var(--safe-area-left));
    padding-right: calc(20px + var(--safe-area-right));
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-icon {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    position: relative;
}

.header-icon .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.header-back {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

/* ==================== BOTTOM NAVIGATION ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(8px + var(--safe-area-left));
    padding-right: calc(8px + var(--safe-area-right));
    max-width: 480px;
    margin: 0 auto;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 16px;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.nav-item.active {
    background: var(--bg-card-pink);
    color: var(--primary);
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

/* ==================== PAGE CONTENT ==================== */
.page-content {
    padding: 0 20px 20px;
    padding-left: calc(20px + var(--safe-area-left));
    padding-right: calc(20px + var(--safe-area-right));
}

/* ==================== SECTIONS ==================== */
.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* ==================== FAVORITOS GRID ==================== */
.favoritos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.favorito-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.favorito-item:active {
    transform: scale(0.95);
}

.favorito-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.favorito-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

/* ==================== AULAS CARDS ==================== */
.aulas-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.aulas-scroll::-webkit-scrollbar {
    display: none;
}

.aula-card {
    min-width: 280px;
    background: var(--bg-card-pink);
    border-radius: 16px;
    padding: 16px;
    position: relative;
}

.aula-horario {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.aula-icon {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    margin: 20px auto;
    display: block;
}

.aula-nome {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 16px;
}

.aula-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.aula-local {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.aula-local svg {
    width: 16px;
    height: 16px;
}

.aula-vagas {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.aula-vagas svg {
    width: 16px;
    height: 16px;
}

.aula-agendar {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.aula-agendar svg {
    width: 16px;
    height: 16px;
}

/* ==================== WOD SECTION ==================== */
.wod-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wod-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.wod-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.wod-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-active {
    background: var(--badge-active-bg);
    color: var(--primary);
}

.badge-inactive {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-text {
    background: transparent;
    color: var(--primary);
    font-weight: 500;
}

/* ==================== INPUTS ==================== */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    padding-left: 4px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.input-wrapper .input-field {
    padding-left: 44px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* ==================== PERFIL ==================== */
.perfil-header {
    text-align: center;
    padding: 24px 20px;
    background: var(--bg-card);
    border-radius: 0 0 24px 24px;
    margin-bottom: 20px;
}

.perfil-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    object-fit: cover;
    margin-bottom: 12px;
}

.perfil-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 3px dashed var(--border-color);
}

.perfil-avatar-placeholder svg {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
}

.perfil-id {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.perfil-nome {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.perfil-academia {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* ==================== MENU LIST ==================== */
.menu-list {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    margin: 0 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: var(--bg-secondary);
}

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

.menu-item-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.menu-item-label {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.menu-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.menu-item-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* ==================== TOGGLE SWITCH ==================== */
.toggle-switch {
    width: 50px;
    height: 28px;
    background: var(--border-color);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* ==================== TIMELINE / FEED ==================== */
.post {
    background: var(--bg-primary);
    margin-bottom: 16px;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-username {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.post-more {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.post-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.post-content {
    padding: 12px 20px;
}

.post-description {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-actions {
    display: flex;
    gap: 16px;
    padding: 8px 20px 12px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

.post-action svg {
    width: 24px;
    height: 24px;
}

/* ==================== FAB ==================== */
.fab {
    position: fixed;
    bottom: calc(90px + var(--safe-area-bottom));
    right: calc(20px + var(--safe-area-right));
    width: 56px;
    height: 56px;
    background: var(--bg-card-pink);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.fab svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: color 0.2s ease;
}

.tab.active {
    color: var(--primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* ==================== CALENDARIO ==================== */
.calendario-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.calendario-mes {
    background: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.calendario-dias {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
}

.calendario-dia {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 20px;
    min-width: 40px;
}

.calendario-dia-nome {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.calendario-dia-num {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.calendario-dia.active {
    background: var(--primary);
}

.calendario-dia.active .calendario-dia-nome,
.calendario-dia.active .calendario-dia-num {
    color: white;
}

/* ==================== SESSOES ==================== */
.sessao-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.sessao-item.loading {
    height: 100px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.3; }
}

/* ==================== LISTA PLANOS ==================== */
.plano-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.plano-item:last-child {
    border-bottom: none;
}

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

.plano-nome {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.plano-valor {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.plano-tipo {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.pagamento-item:last-child {
    border-bottom: none;
}

.pagamento-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pagamento-data {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.pagamento-metodo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagamento-metodo svg {
    width: 16px;
    height: 16px;
}

.pagamento-valor {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== CARTEIRA ==================== */
.saldo-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 24px;
}

.saldo-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.saldo-label svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.saldo-valor {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

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

.cartao-bandeira {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1A1F71;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
}

.cartao-dados {
    display: flex;
    flex-direction: column;
}

.cartao-nome {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.cartao-numero {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cartao-actions {
    display: flex;
    gap: 12px;
}

.cartao-action {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

/* ==================== MENU LATERAL ==================== */
.menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 9998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.menu-lateral {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85vw;
    max-width: 320px;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    background: var(--bg-primary);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.menu-lateral.active {
    right: 0;
}

.menu-lateral-header {
    padding: 20px;
    padding-top: calc(20px + var(--safe-area-top));
    background: var(--bg-card-pink);
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-lateral-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.menu-lateral-user {
    display: flex;
    flex-direction: column;
}

.menu-lateral-nome {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-lateral-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.menu-lateral-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.menu-lateral-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    transition: background 0.2s ease;
}

.menu-lateral-item:active {
    background: var(--bg-secondary);
}

.menu-lateral-item svg {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.menu-lateral-item span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.menu-lateral-sair {
    color: var(--error);
}

.menu-lateral-sair svg {
    color: var(--error);
}

.menu-lateral-sair span {
    color: var(--error);
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 40px 24px;
    padding-top: calc(40px + var(--safe-area-top));
    padding-left: calc(24px + var(--safe-area-left));
    padding-right: calc(24px + var(--safe-area-right));
    padding-bottom: calc(40px + var(--safe-area-bottom));
    background: var(--bg-primary);
}

.login-logo {
    width: 200px;
    height: auto;
    margin: 0 auto 40px;
    display: block;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.login-form {
    flex: 1;
}

.login-links {
    text-align: center;
    margin-top: 16px;
}

.login-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-footer {
    text-align: center;
    padding-top: 24px;
}

.login-version {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== WOD PAGE ==================== */
.wod-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.wod-date {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.wod-illustration {
    width: 150px;
    height: 150px;
    margin: 40px auto;
}

.wod-message {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ==================== UNIDADE SELECTOR ==================== */
.unidade-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    margin: 0 20px 16px;
}

.unidade-selector span {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unidade-selector svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.px-20 {
    padding-left: 20px;
    padding-right: 20px;
}

/* ==================== LOADING ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==================== AULA ITEM (Grade) ==================== */
.aula-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card-pink);
    border-radius: 12px;
    margin-bottom: 12px;
}

.aula-item-horario {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
}

.aula-item-info {
    flex: 1;
}

.aula-item-nome {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.aula-item-local {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.aula-item-vagas {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 50px;
    text-align: center;
}

.aula-item-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aula-item-btn svg {
    color: white;
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: calc(100px + var(--safe-area-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== SERVICOS ==================== */
.servico-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 12px;
}

.servico-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.servico-nome {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.servico-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.servico-preco {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

/* ==================== HISTORICO WOD ==================== */
.historico-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 12px;
}

.historico-data {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.historico-exercicio {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.historico-resultado {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== MINHA AGENDA ==================== */
.agenda-vazia {
    text-align: center;
    padding: 60px 20px;
}

.agenda-vazia img {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.agenda-vazia p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==================== PERFIL AVATAR REAL ==================== */
.perfil-avatar-real {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    margin-bottom: 12px;
}

/* ==================== PROMOCAO PIX BANNER ==================== */
/* ==================== BANNER PROMOCAO PIX ==================== */
.promo-banner {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.promo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.promo-pix-icon {
    width: 40px;
    height: 40px;
    background: #32BCAD;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.promo-pix-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.promo-header-text {
    flex: 1;
}

.promo-header-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.promo-header-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.promo-plano {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.promo-plano-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.promo-plano-nome {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.promo-valores {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.promo-valor-original {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.promo-valor-desconto {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.promo-badge {
    display: inline-block;
    background: var(--badge-active-bg);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.promo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.promo-btn {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

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

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

.promo-btn svg {
    width: 18px;
    height: 18px;
}

.promo-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.promo-timer-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.promo-timer-value {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==================== MODAL PIX ==================== */
.modal-pix {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: calc(20px + var(--safe-area-top)) calc(20px + var(--safe-area-right)) calc(20px + var(--safe-area-bottom)) calc(20px + var(--safe-area-left));
}

.modal-pix.active {
    display: flex;
}

.modal-pix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-pix-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 360px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.3s ease;
}

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

.modal-pix-fechar {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.modal-pix-fechar:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-pix-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    padding-right: 24px;
}

.pix-qrcode {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin: 0 auto 20px;
    width: fit-content;
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.pix-qrcode canvas,
.pix-qrcode img {
    display: block;
    max-width: 180px;
    height: auto;
}

.pix-instrucao {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 12px;
}

.pix-codigo-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.pix-codigo-container input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.btn-copiar {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-copiar:active {
    transform: scale(0.95);
}

.btn-copiar.copiado {
    background: var(--success);
}

.pix-status {
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.pix-status.aguardando {
    background: #FFF8E1;
    color: #F57C00;
}

.pix-status.aprovado {
    background: #E8F5E9;
    color: var(--success);
}

.pix-status.expirado {
    background: #FFEBEE;
    color: var(--error);
}

.pix-status span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.pix-status svg {
    width: 20px;
    height: 20px;
}

.pix-loading {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.pix-valor {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.pix-valor strong {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Botão tentar novamente */
.pix-tentar-novamente {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

/* ==================== MOBILE ==================== */
@media (max-width: 430px) {
    .header {
        padding: 12px 16px;
        padding-top: calc(12px + var(--safe-area-top));
        padding-left: calc(16px + var(--safe-area-left));
        padding-right: calc(16px + var(--safe-area-right));
    }

    .page-content {
        padding-left: calc(16px + var(--safe-area-left));
        padding-right: calc(16px + var(--safe-area-right));
        padding-bottom: 16px;
    }

    .promo-banner {
        margin: 12px 16px;
        padding: 16px;
    }

    .promo-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .promo-valores {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .promo-timer {
        justify-content: center;
    }

    .favoritos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .favorito-item {
        padding: 12px 6px;
    }

    .wod-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aulas-scroll {
        gap: 10px;
    }

    .aula-card {
        min-width: 240px;
    }

    .nav-item {
        padding: 6px 10px;
    }

    .nav-item span {
        font-size: 0.65rem;
    }

    .bottom-nav {
        padding-top: 6px;
        padding-bottom: calc(6px + var(--safe-area-bottom));
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        white-space: nowrap;
    }

    .menu-lateral {
        width: 90vw;
    }

    .login-logo {
        width: 160px;
        margin-bottom: 28px;
    }

    .login-title {
        font-size: 1.35rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
    }
}

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

    .promo-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .promo-header-text {
        width: 100%;
    }

    .promo-valores {
        gap: 8px;
    }
}

/* ==================== DESKTOP ==================== */
@media (min-width: 768px) {
    body {
        background: var(--bg-secondary);
    }
    
    .app {
        margin: 20px auto;
        border-radius: 24px;
        box-shadow: var(--shadow-lg);
        min-height: calc(100vh - 40px);
    }
    
    .bottom-nav {
        border-radius: 0 0 24px 24px;
    }
    
    .promo-banner {
        margin: 16px 20px;
    }
    
    .modal-pix-content {
        max-width: 400px;
    }
}

/* ==================== MODAL PARCELAS ==================== */
.modal-parcelas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: calc(20px + var(--safe-area-top)) calc(20px + var(--safe-area-right)) calc(20px + var(--safe-area-bottom)) calc(20px + var(--safe-area-left));
}

.modal-parcelas.active {
    display: flex;
}

.modal-parcelas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-parcelas-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.3s ease;
}

.modal-parcelas-fechar {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
}

.modal-parcelas-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-parcelas-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.parcelas-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.parcela-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.parcela-item:hover {
    border-color: var(--primary-light);
}

.parcela-item.selected {
    border-color: var(--primary);
    background: var(--bg-card);
}

.parcela-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.parcela-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.parcela-item.selected .parcela-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.parcela-checkbox svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.parcela-item.selected .parcela-checkbox svg {
    opacity: 1;
}

.parcela-info {
    flex: 1;
}

.parcela-numero {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.parcela-vencimento {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.parcela-valores {
    text-align: right;
}

.parcela-valor-original {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.parcela-valor-desconto {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.parcela-badge {
    display: inline-block;
    background: var(--badge-active-bg);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
}

.parcela-status-paga {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
}

.parcelas-resumo {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.resumo-linha:last-child {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.resumo-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.resumo-valor {
    font-size: 0.9rem;
    font-weight: 500;
}

.resumo-valor.destaque {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.resumo-economia {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
}

.parcelas-btn-pagar {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.parcelas-btn-pagar:hover {
    background: var(--primary-dark);
}

.parcelas-btn-pagar:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.parcelas-btn-pagar svg {
    width: 20px;
    height: 20px;
}

.parcelas-aviso {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.parcelas-aviso svg {
    width: 16px;
    height: 16px;
    color: #3B82F6;
    flex-shrink: 0;
    margin-top: 2px;
}
