/* ===================================
   Gestion de Clasificaciones - Estilos
   =================================== */

.gestion-clasificaciones-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding-bottom: 100px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.header-content {
    flex: 1;
    text-align: center;
}

.header-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 4px 0 0;
}

.header-spacer {
    width: 44px;
}

.btn-crear {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4a7ba7 0%, #6b9dc4 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-crear:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 123, 167, 0.4);
}

.btn-crear svg {
    width: 18px;
    height: 18px;
}

/* Content */
.content {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    margin: 20px 20px 0;
    font-size: 0.9rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.alert svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-btn.active {
    background: linear-gradient(135deg, #4a7ba7 0%, #6b9dc4 100%);
    border-color: transparent;
    color: white;
}

/* Filtros */
.filtros-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0 16px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    padding: 12px 0;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-buscar {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4a7ba7 0%, #6b9dc4 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buscar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 123, 167, 0.4);
}

/* Stats Bar */
.stats-bar {
    margin-bottom: 16px;
}

.total-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-bottom: 20px;
}

.empty-icon svg {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4a7ba7 0%, #6b9dc4 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 123, 167, 0.4);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

/* Table */
.clasificaciones-table-container {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clasificaciones-table {
    width: 100%;
    border-collapse: collapse;
}

.clasificaciones-table th,
.clasificaciones-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clasificaciones-table th {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clasificaciones-table tbody tr {
    transition: background 0.2s ease;
}

.clasificaciones-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.clasificaciones-table tbody tr:last-child td {
    border-bottom: none;
}

.col-nombre {
    width: 60%;
}

.col-ejercicios {
    width: 20%;
}

.col-acciones {
    width: 20%;
}

/* Nombre */
.nombre-clasificacion {
    color: white;
    font-weight: 500;
    font-size: 1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-count {
    background: rgba(74, 123, 167, 0.2);
    color: #6b9dc4;
}

/* Actions */
.acciones-btns {
    display: flex;
    gap: 8px;
}

.btn-accion {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-accion svg {
    width: 18px;
    height: 18px;
}

.btn-editar {
    background: rgba(74, 123, 167, 0.2);
    color: #6b9dc4;
}

.btn-editar:hover {
    background: rgba(74, 123, 167, 0.4);
}

.btn-eliminar {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-eliminar:hover {
    background: rgba(239, 68, 68, 0.4);
}

.btn-eliminar.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-eliminar.disabled:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.modal-confirm .modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.modal-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.modal-icon.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.modal-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-message {
    color: white;
    font-size: 1rem;
    margin: 0 0 10px;
}

.modal-warning {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
}

.modal-footer {
    padding: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
}

.btn-danger {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ===================================
   Formulario de Clasificacion
   =================================== */

.clasificacion-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title svg {
    width: 22px;
    height: 22px;
    color: #6b9dc4;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #4a7ba7;
    background: rgba(255, 255, 255, 0.12);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.field-error {
    display: block;
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 6px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .btn-crear {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .tabs-container {
        justify-content: stretch;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .tab-btn svg {
        display: none;
    }

    .filtros-form {
        flex-direction: column;
    }

    .clasificaciones-table th,
    .clasificaciones-table td {
        padding: 12px 10px;
    }

    .col-ejercicios {
        display: none;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn-secondary,
    .form-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 12px;
    }

    .header {
        padding: 16px 12px;
    }

    .header-title {
        font-size: 1.25rem;
    }

    .tab-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .clasificaciones-table-container {
        background: transparent;
        border: none;
    }

    .clasificaciones-table {
        display: block;
    }

    .clasificaciones-table thead {
        display: none;
    }

    .clasificaciones-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .clasificaciones-table tbody tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .clasificaciones-table td {
        border: none;
        padding: 0;
    }

    .nombre-clasificacion {
        font-size: 1rem;
        font-weight: 600;
    }
}
