* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --border-color: #e2e8f0;
    --text-color: #2d3748;
    --text-light: #718096;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Login & Register Page */
.login-page,
.register-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container,
.register-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box,
.register-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.register-box {
    max-width: 500px;
}

.logo {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.login-box h2,
.register-box h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 1.5em;
}

/* Form Styles */
.form-login,
.form-register,
.form-full {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #cbd5e0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #a0aec0;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #e53e3e;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: #fed7d7;
    color: #742a2a;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #feebc8;
    color: #7c2d12;
    border-left: 4px solid var(--warning-color);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-center a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.text-center a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--dark-color);
    color: white;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar-header h2 {
    font-size: 1.8em;
    color: var(--primary-color);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 15px;
}

.sidebar-nav a {
    color: #cbd5e0;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-nav a.logout {
    color: var(--danger-color);
}

.sidebar-nav a.logout:hover {
    background-color: var(--danger-color);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    margin: 0;
    color: var(--text-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info .badge {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Content Area */
.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Welcome Section */
.welcome-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.welcome-section h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.welcome-section p {
    color: var(--text-light);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quick-actions h3 {
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    color: var(--text-color);
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: #f7fafc;
    border-bottom: 2px solid var(--border-color);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: #f7fafc;
}

.table td .btn {
    margin-right: 8px;
}

/* Status Badge */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-ativo {
    background-color: #c6f6d5;
    color: #22543d;
}

.status-inativo {
    background-color: #fed7d7;
    color: #742a2a;
}

/* Aluno Details */
.aluno-details {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.student-info {
    margin-bottom: 30px;
}

.student-info p {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.student-info strong {
    color: var(--primary-color);
}

/* Treinos Section */
.treinos-section {
    margin-top: 20px;
}

.treino-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.treino-card h4 {
    margin-bottom: 12px;
    color: var(--text-color);
}

.treino-card .btn {
    margin-right: 10px;
}

/* Treino Editor */
.treino-editor {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-adicionar-exercicio {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Ficha Semanal */
.form-ficha-semanal {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-ficha-semanal {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table-ficha-semanal th,
.table-ficha-semanal td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-ficha-semanal th {
    background-color: #f7fafc;
    font-weight: 600;
    color: var(--text-color);
}

.table-ficha-semanal input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Materiais Grid */
.materiais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.material-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.material-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.material-card h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.material-card p {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 10px;
}

.material-card small {
    display: block;
    color: var(--text-light);
    font-size: 0.85em;
    margin-bottom: 5px;
}

.material-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.material-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: none;
        border-bottom: 2px solid var(--border-color);
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .materiais-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .login-box,
    .register-box {
        max-width: 90%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 10px;
    }

    .content {
        padding: 15px;
    }

    .table {
        font-size: 0.9em;
    }

    .table th,
    .table td {
        padding: 10px 5px;
    }

    .materiais-grid {
        grid-template-columns: 1fr;
    }
}
