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

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #27ae60;
    --warning: #f39c12;
    --info: #17a2b8;
    --gray: #95a5a6;
}

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

/* Login & Register Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
    font-size: 28px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

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

.btn-success:hover {
    background: #219a52;
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

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

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.error {
    background: #e74c3c;
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.success {
    background: var(--success);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* Dashboard Styles */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--primary);
    color: white;
    padding: 25px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar h2 {
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
    color: white;
}

.user-info {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.user-role {
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 14px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.logout-btn {
    background: #e74c3c !important;
    margin-top: 20px;
    justify-content: center;
}

.logout-btn:hover {
    background: #c0392b !important;
}

.main-content {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
    overflow-y: auto;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    border: 1px solid #e1e8ed;
}

.card h1 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 32px;
}

.card h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 24px;
}

.card h3 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 20px;
}

.card h4 {
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 18px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin: 15px 0;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.action-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.action-card i {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: var(--secondary);
}

/* Search Box */
.search-box {
    margin-bottom: 25px;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 50px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Exercise and Routine Styles */
.exercise-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 2fr auto;
    gap: 10px;
    align-items: start;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.exercise-item, .routine-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
}

.exercise-item:hover, .routine-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.exercise-actions, .routine-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

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

/* Preview Styles */
.preview-exercise {
    background: #f8f9fa;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.exercise-specs {
    display: flex;
    gap: 20px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.exercise-specs span {
    background: var(--secondary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* Image Upload */
.image-upload {
    margin: 15px 0;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 10px 0;
    border-radius: 8px;
    display: none;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.client-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.assigned-routines {
    list-style: none;
    margin: 10px 0;
}

.assigned-routines li {
    padding: 8px 12px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--secondary);
}

/* Exercise Detail */
.exercise-detail {
    background: #f8f9fa;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border: 1px solid #e1e8ed;
}

.routine-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Status Badges */
.status-completed {
    background: var(--success);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.status-pending {
    background: var(--warning);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* Table Styles */
.progress-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.progress-table th,
.progress-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.progress-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.progress-table tr:hover {
    background: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .exercise-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}
/* Progress Circles */
.progress-circles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.circle-bg {
    fill: none;
    stroke: #e1e8ed;
    stroke-width: 8;
}

.circle-progress {
    fill: none;
    stroke: var(--success);
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.5s ease;
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.circle-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.circle-label {
    font-size: 12px;
    color: var(--gray);
}

/* Progress Stats */
.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.progress-stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.progress-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--secondary);
    margin: 10px 0;
}

/* Timeline */
.timeline {
    position: relative;
    margin: 30px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--secondary);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 50px;
}

.timeline-date {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Calendar */
.calendar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    background: var(--primary);
    color: white;
    border-radius: 5px;
}

.calendar-date {
    padding: 15px 10px;
    text-align: center;
    border: 1px solid #e1e8ed;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-date.has-workout {
    background: var(--success);
    color: white;
    font-weight: bold;
}

.calendar-date:hover {
    background: var(--secondary);
    color: white;
}

/* Workout Completion */
.workout-completion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
}

.completion-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--secondary);
    background: white;
    color: var(--secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.filter-btn:hover {
    background: var(--secondary);
    color: white;
}
/* Modal de Completar Rutina */
.completion-modal {
    max-width: 800px;
}

.completion-exercise {
    background: #f8f9fa;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.exercise-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.assigned-values, .actual-values {
    padding: 15px;
    border-radius: 8px;
}

.assigned-values {
    background: #e8f4fd;
    border: 2px solid var(--secondary);
}

.actual-values {
    background: #f0f8f0;
    border: 2px solid var(--success);
}

.value-item {
    margin: 10px 0;
    padding: 8px;
    background: white;
    border-radius: 5px;
}

.value-label {
    font-weight: bold;
    color: var(--dark);
}

/* Video Styles */
.video-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 15px 0;
}

.video-preview {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-upload-btn {
    background: var(--info);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
}

.exercise-video {
    max-width: 300px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Progress Indicators */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

.completion-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-excellent { background: #27ae60; color: white; }
.status-good { background: #3498db; color: white; }
-status-average { background: #f39c12; color: white; }
.status-poor { background: #e74c3c; color: white; }

/* Estilos específicos para view_routine.php */
.routine-header {
    border-bottom: 2px solid #e1e8ed;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.routine-meta {
    display: flex;
    gap: 30px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.routine-image-section {
    text-align: center;
    margin: 25px 0;
}

.routine-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.exercises-section {
    margin-top: 30px;
}

.print-exercise {
    background: #f8f9fa;
    padding: 25px;
    margin: 20px 0;
    border-radius: 12px;
    border-left: 5px solid var(--secondary);
    break-inside: avoid;
}

.exercise-specs {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.exercise-specs span {
    background: var(--secondary);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.exercise-instructions, .extra-instructions {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #e1e8ed;
}

.completion-data {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border: 2px solid var(--success);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.comparison-col {
    padding: 15px;
    border-radius: 8px;
}

.comparison-col:first-child {
    background: #e8f4fd;
    border: 1px solid var(--secondary);
}

.comparison-col:last-child {
    background: #f0f8f0;
    border: 1px solid var(--success);
}

.completion-notes {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--warning);
}

.completion-rate {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.performance-comparison {
    margin-top: 15px;
}

/* Estilos para impresión */
@media print {
    .routine-actions, .sidebar, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: none !important;
    }
    
    .exercise-detail {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        color: black !important;
    }
}

.routine-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e1e8ed;
    flex-wrap: wrap;
}
/* Estilos específicos para la biblioteca de ejercicios */
.instructions-preview {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.instructions-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #f8f9fa);
}

.view-more-btn {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.category-filters {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.category-filter {
    padding: 10px 20px;
    border: 2px solid var(--secondary);
    background: white;
    color: var(--secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-filter.active {
    background: var(--secondary);
    color: white;
}

.category-filter:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

.category-section {
    margin: 40px 0;
    display: none;
}

.category-section.active {
    display: block;
}
/* Modal de Progreso */
.progress-modal {
    max-width: 1000px;
    max-height: 90vh;
}

.progress-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px 12px 0 0;
    margin: -30px -30px 25px -30px;
}

.progress-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.progress-stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 4px solid var(--secondary);
}

.progress-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--secondary);
    margin: 10px 0;
}

.progress-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin: 30px 0;
}

.progress-chart {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.chart-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 2px solid #e1e8ed;
    padding-bottom: 10px;
}

.weekly-chart {
    margin: 20px 0;
}

.week-bar {
    display: flex;
    align-items: center;
    margin: 15px 0;
    gap: 15px;
}

.week-label {
    width: 100px;
    font-weight: 500;
    color: var(--dark);
}

.bar-container {
    flex: 1;
    height: 30px;
    background: #e1e8ed;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--success));
    border-radius: 15px;
    transition: width 0.5s ease;
    position: relative;
}

.bar-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.day-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.day-cell {
    text-align: center;
    padding: 15px 5px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.day-cell.active {
    background: var(--success);
    color: white;
    transform: scale(1.05);
}

.day-name {
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-count {
    font-size: 1.2em;
    font-weight: bold;
}

.routines-stats {
    margin: 25px 0;
}

.routine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.routine-name {
    font-weight: 500;
    color: var(--dark);
}

.routine-stats {
    display: flex;
    gap: 15px;
}

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

.stat-value {
    font-weight: bold;
    color: var(--secondary);
}

.stat-label {
    font-size: 0.8em;
    color: var(--gray);
}

.progress-timeline {
    margin: 30px 0;
}

.timeline-item {
    display: flex;
    margin: 20px 0;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: -20px;
    width: 2px;
    background: var(--secondary);
}

.timeline-date {
    width: 80px;
    text-align: center;
    padding: 10px;
    background: var(--secondary);
    color: white;
    border-radius: 20px;
    font-weight: bold;
    margin-right: 20px;
    position: relative;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.difficulty-stars {
    color: var(--warning);
    margin: 5px 0;
}

.empty-state {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.empty-state i {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.progress-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid #e1e8ed;
}

.progress-tab {
    padding: 12px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.3s ease;
}

.progress-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.progress-tab:hover {
    color: var(--secondary);
}

.tab-content {
    display: none;
}

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

@media (max-width: 768px) {
    .progress-charts {
        grid-template-columns: 1fr;
    }
    
    .progress-stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .routine-stats {
        flex-direction: column;
        gap: 5px;
    }
}
/* Test de Valoración Física */
.assessment-container {
    max-width: 1000px;
    margin: 0 auto;
}

.assessment-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
}

.assessment-steps {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
}

.assessment-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e1e8ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--gray);
    transition: all 0.3s ease;
}

.assessment-step.active {
    background: var(--secondary);
    color: white;
}

.assessment-step.completed {
    background: var(--success);
    color: white;
}

.assessment-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
    display: none;
}

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

.video-demo {
    text-align: center;
    margin: 25px 0;
}

.video-placeholder {
    background: #f8f9fa;
    padding: 60px 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}

.video-placeholder i {
    font-size: 3em;
    color: var(--secondary);
    margin-bottom: 15px;
    display: block;
}

.score-slider {
    margin: 25px 0;
}

.slider-container {
    position: relative;
    margin: 20px 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--gray);
}

.score-display {
    text-align: center;
    margin: 20px 0;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 auto 10px;
}

.score-description {
    text-align: center;
    font-style: italic;
    color: var(--gray);
}

.assessment-results {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.result-card {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.result-score {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.result-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.radar-chart {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
}

.assessment-history {
    margin: 40px 0;
}

.history-chart {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Ficha Técnica */
.technical-sheet {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sheet-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.sheet-content {
    padding: 30px;
}

.sheet-section {
    margin: 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e8ed;
}

.section-title {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.score-bar {
    flex: 1;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    margin: 0 15px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 25px 0;
}

.comparison-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Slider personalizado */
input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e1e8ed;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
/* Estilos para videos de YouTube */
.youtube-thumbnail {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.youtube-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.youtube-modal {
    max-width: 900px;
}

.youtube-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Relación 16:9 */
    margin: 20px 0;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button-overlay:hover {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button-overlay::after {
    content: '▶';
    color: white;
    font-size: 30px;
    margin-left: 5px;
}

.thumbnail-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
}

.video-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--secondary);
}

/* Estilos específicos para el perfil */
.profile-completion {
    margin-bottom: 2rem;
}

.completion-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.completion-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transition: width 0.3s ease;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.achievement {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.achievement i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.achievement.locked {
    opacity: 0.5;
}

.achievement.locked i {
    color: var(--gray);
}

.qr-profile {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    border: 2px dashed var(--primary);
    border-radius: 10px;
}

.qr-profile img {
    max-width: 200px;
    margin-bottom: 1rem;
}