/**
 * Estilos para el sistema de autenticación - Academia LAP
 */

/* ===== CONTENEDORES ===== */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
}

.registro-container {
    max-width: 700px;
}

.perfil-container {
    max-width: 800px;
}

/* ===== FORMULARIOS ===== */
.auth-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2b2b2b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-group input:disabled {
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

/* ===== CAMPOS CON ERROR ===== */
.form-group.has-error label {
    color: #dc3545;
}

.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select,
.input-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-group.has-error input:focus,
.form-group.has-error textarea:focus,
.form-group.has-error select:focus,
.input-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.form-group.has-error input::placeholder {
    color: #dc3545;
    opacity: 0.7;
}

/* Animación de shake para campos con error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.input-error {
    animation: shake 0.5s ease-in-out;
}

/* Teléfono con prefijo */
.telefono-wrapper {
    display: flex;
    gap: 6px;
}

.telefono-prefijo {
    width: 75px;
    min-width: 75px;
    max-width: 75px;
    padding: 12px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff;
    cursor: pointer;
}

.telefono-prefijo:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.telefono-numero {
    flex: 1;
    min-width: 0;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

/* Password strength */
.password-strength {
    margin-top: 6px;
    font-size: 12px;
}

.strength-weak { color: #dc3545; }
.strength-medium { color: #ffc107; }
.strength-strong { color: #28a745; }

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    background: #2b2b2b;
    color: #fff;
    border-color: #2b2b2b;
}

.btn-primary:hover {
    background: #444;
    border-color: #444;
}

.btn-secondary {
    background: #f5f5f5;
    color: #2b2b2b;
    border-color: #d0d0d0;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-warning {
    background: #ffc107;
    color: #2b2b2b;
    border-color: #ffc107;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.alert p {
    margin: 0 0 10px 0;
}

.alert p:last-child {
    margin-bottom: 0;
}

/* ===== PASOS INDICADOR ===== */
.pasos-indicador {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.paso {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.paso .numero {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e5e5;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.paso.activo .numero {
    background: #2b2b2b;
    color: #fff;
}

.paso.completado .numero {
    background: #28a745;
    color: #fff;
}

.paso .texto {
    font-size: 12px;
    color: #888;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.paso.activo .texto {
    color: #2b2b2b;
    font-weight: 500;
}

.linea {
    width: 80px;
    height: 2px;
    background: #e5e5e5;
    margin: 0 15px;
    margin-bottom: 20px;
}

.linea.completado {
    background: #28a745;
}

/* ===== AUTH FOOTER ===== */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    margin-top: 20px;
}

.auth-footer p {
    margin: 8px 0;
    font-size: 14px;
}

.auth-footer a {
    color: #2b2b2b;
    font-weight: 500;
}

/* ===== SÍMBOLOS ===== */
.simbolos-form h3,
.simbolos-form h4 {
    margin: 25px 0 15px 0;
    font-size: 16px;
    color: #2b2b2b;
}

.simbolos-form h3:first-child,
.simbolos-form h4:first-child {
    margin-top: 0;
}

.simbolos-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #e8e8e8;
}

.tab-btn.active {
    background: #2b2b2b;
    color: #fff;
    border-color: #2b2b2b;
}

.tab-content {
    display: none;
}

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

.simbolo-grupo {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.simbolo-label {
    display: block;
    margin-bottom: 10px;
}

.simbolo-label strong {
    display: block;
    font-size: 14px;
    color: #2b2b2b;
}

.simbolo-label small {
    font-size: 12px;
    color: #888;
}

.simbolo-opciones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.simbolo-opcion {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.simbolo-opcion:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.simbolo-opcion input {
    margin: 0;
}

.simbolo-opcion input:checked + .simbolo-preview {
    color: #2b2b2b;
    font-weight: 600;
}

.simbolo-opcion:has(input:checked) {
    background: #e8f4fc;
    border-color: #4a9fd4;
}

.simbolo-preview {
    font-size: 18px;
    font-family: 'Times New Roman', serif;
    min-width: 24px;
    text-align: center;
}

.simbolo-ejemplo {
    font-size: 11px;
    color: #888;
    font-family: monospace;
}

/* ===== ARCHIVOS ===== */
.archivos-seccion {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.archivos-seccion h4 {
    margin-bottom: 10px;
}

.archivos-seccion > p {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.archivos-nota {
    background: #e8f4fc;
    border-left: 3px solid #4a9fd4;
    padding: 12px 15px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #2b5a7a;
}

.archivos-nota strong {
    color: #1a4a6a;
}

.archivos-opcional {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin-top: 8px;
}

.archivos-seccion input[type="file"] {
    padding: 10px;
    background: #f8f8f8;
    border: 1px dashed #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
}

/* ===== PERFIL ===== */
.perfil-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.perfil-header h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
}

.perfil-header .email {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.perfil-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 0;
}

.tab-link {
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-link:hover {
    color: #2b2b2b;
}

.tab-link.active {
    color: #2b2b2b;
    border-bottom-color: #2b2b2b;
    font-weight: 500;
}

.perfil-seccion h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #2b2b2b;
}

/* ===== SESIONES ===== */
.sesiones-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sesion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.sesion-item.sesion-actual {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

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

.sesion-info strong {
    font-size: 14px;
    color: #2b2b2b;
}

.sesion-detalles,
.sesion-ip,
.sesion-fecha {
    font-size: 12px;
    color: #888;
}

.sesion-acciones {
    flex-shrink: 0;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 3px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

/* ===== SESIONES ACTIVAS EN LOGIN ===== */
.sesiones-activas {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
}

.sesiones-activas h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.sesiones-activas ul {
    margin: 0;
    padding-left: 20px;
}

.sesiones-activas li {
    margin-bottom: 10px;
    font-size: 13px;
}

/* ===== PASO 2 INTRO ===== */
.paso2-intro {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.paso2-intro h3 {
    margin: 0 0 10px 0;
}

.paso2-intro p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.paso2-intro .nota {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ===== UTILITIES ===== */
.mb-20 {
    margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-container,
    .registro-container,
    .perfil-container {
        padding: 15px;
    }

    .auth-form {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .pasos-indicador {
        flex-wrap: wrap;
    }

    .linea {
        width: 40px;
    }

    .simbolos-tabs {
        justify-content: center;
    }

    .simbolo-opciones {
        flex-direction: column;
    }

    .simbolo-opcion {
        width: 100%;
    }

    .perfil-tabs {
        justify-content: center;
    }

    .tab-link {
        padding: 10px 15px;
        font-size: 13px;
    }

    .sesion-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons .btn {
        width: 100%;
    }
}

/* Language selector styles */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.lang-selector {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.lang-selector:hover {
    border-color: #666;
}

.lang-list {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lang-list li a {
    text-decoration: none;
    color: #666;
    padding: 2px 6px;
    border-radius: 3px;
}

.lang-list li.active a,
.lang-list li a:hover {
    background: #007bff;
    color: white;
}

/* ===== OPCIÓN "OTRO" PARA SÍMBOLOS ===== */
.simbolo-otro .simbolo-preview {
    background: #f5f5f5;
    color: #666;
}

.otro-input-wrapper {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

.otro-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.otro-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

/* ===== SOLICITAR NOTACIÓN ===== */
.notacion-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.notacion-info ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.notacion-info li {
    margin-bottom: 5px;
}

.notacion-ayuda {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffc107;
}

.notacion-ayuda h4 {
    margin-top: 0;
    color: #856404;
}

.notacion-ayuda ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.notacion-ayuda li {
    margin-bottom: 8px;
    color: #856404;
}

.notacion-ayuda a {
    color: #007bff;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}
