/* Reset e Variáveis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A2A;
    --secondary: #004E89;
    --success: #2ECC71;
    --danger: #E74C3C;
    --warning: #F39C12;
    --dark: #2C3E50;
    --gray: #7F8C8D;
    --light-gray: #ECF0F1;
    --white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* Telas e Navegação */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Tela de Login */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
    color: var(--white);
}

.logo-container i {
    font-size: 80px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-container h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-container .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.login-form {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--light-gray);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.3s;
}

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

.tab-btn i {
    margin-right: 5px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.register-link {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: var(--gray);
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--gray);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.3s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.btn-close:hover {
    color: var(--danger);
}

/* Header da Aplicação */
.app-header {
    background: var(--primary);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left i {
    font-size: 24px;
}

.header-left h2 {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right span {
    font-size: 14px;
    font-weight: 500;
}

/* Navegação Inferior */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
    font-size: 12px;
}

.nav-item i {
    font-size: 20px;
}

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

/* Conteúdo Principal */
.app-content {
    padding: 20px;
    padding-bottom: 80px;
    background: var(--light-gray);
    min-height: calc(100vh - 60px);
}

.aluno-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

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

.section-header h3,
.section-header h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.aluno-content .section-header h3 {
    color: var(--white);
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--white);
    border-radius: 10px;
    font-size: 14px;
    background: var(--white);
}

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

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--light-gray);
    background: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    white-space: nowrap;
    transition: all 0.3s;
}

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

/* Cards */
.cards-list {
    display: grid;
    gap: 15px;
}

.card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--gray);
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-action-btn {
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

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

.card-action-btn.delete:hover {
    color: var(--danger);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
}

.card-info i {
    color: var(--primary);
    width: 18px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

/* Welcome Card */
.welcome-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.welcome-card h3 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 10px;
}

.welcome-card p {
    color: var(--gray);
    font-size: 14px;
}

/* Profile Card */
.profile-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.profile-avatar {
    margin-bottom: 20px;
}

.profile-avatar i {
    font-size: 80px;
    color: var(--primary);
}

#perfilInfo {
    margin-bottom: 25px;
}

#perfilInfo .card-info {
    justify-content: center;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid var(--light-gray);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px 25px;
    border-top: 2px solid var(--light-gray);
}

.modal-footer .btn {
    flex: 1;
}

/* Seção de Exercícios */
.exercicios-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--light-gray);
}

.exercicio-item {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.exercicio-item .btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.exercicio-item .form-group {
    margin-bottom: 12px;
}

.exercicio-item .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.exercicio-display {
    margin-top: 15px;
}

.exercicio-card {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.exercicio-card h5 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 15px;
}

.exercicio-card p {
    font-size: 13px;
    color: var(--gray);
    margin: 3px 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

/* Responsividade */
@media (min-width: 768px) {
    .cards-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bottom-nav {
        position: static;
        background: var(--white);
        border-radius: 15px;
        margin-bottom: 20px;
        box-shadow: var(--shadow);
    }
    
    .app-content {
        padding-bottom: 20px;
    }
    
    .logo-container h1 {
        font-size: 40px;
    }
}

@media (min-width: 1024px) {
    .cards-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    body {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    #dashboardProfessor,
    #dashboardAluno {
        max-width: 1200px;
        width: 100%;
        margin: 20px auto;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: var(--shadow-lg);
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.modal-content {
    animation: fadeIn 0.3s ease;
}

/* Utilitários */
.text-center {
    text-align: center;
}

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

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

.mb-3 {
    margin-bottom: 15px;
}

.mb-2 {
    margin-bottom: 10px;
}

/* Info Box */
.info-box {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box i {
    color: #2196F3;
    font-size: 18px;
}

.info-box p {
    margin: 0;
    font-size: 14px;
    color: #1976D2;
}

/* Checkbox List para Atribuição */
.checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--white);
    border: 2px solid var(--light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background: #F5F5F5;
    border-color: var(--primary);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-item label {
    flex: 1;
    cursor: pointer;
    font-weight: 500;
    color: var(--dark);
}

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

/* Selected Count */
.selected-count {
    background: var(--primary);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Badge para Categorias */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
}

.badge.hipertrofia {
    background: #FFEBEE;
    color: #C62828;
}

.badge.emagrecimento {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge.funcional {
    background: #E3F2FD;
    color: #1565C0;
}

.badge.condicionamento {
    background: #FFF3E0;
    color: #EF6C00;
}

.badge.iniciante {
    background: #F3E5F5;
    color: #6A1B9A;
}

.badge.intermediario {
    background: #FFF9C4;
    color: #F57F17;
}

.badge.avancado {
    background: #FFCCBC;
    color: #BF360C;
}

/* Card Actions - Botões no card */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Lista de Treinos do Aluno */
.treinos-aluno-list {
    max-height: 400px;
    overflow-y: auto;
}

.treino-item {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.treino-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.treino-item-title {
    flex: 1;
    font-weight: 600;
    color: var(--dark);
    font-size: 16px;
    margin-bottom: 5px;
}

.treino-item-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 5px;
}

.treino-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.treino-item-actions .btn {
    flex: 1;
}

.empty-treinos {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-treinos i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-treinos p {
    font-size: 14px;
}
