/* Registro de Préstamos - Estilos específicos */

/* Page Header */
.page-header {
    margin-top: 70px;
    padding: 60px 20px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-header h1 i {
    margin-right: 15px;
    color: #f39c12;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Section */
.form-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: calc(100vh - 200px);
}

.form-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Form Section Headers */
.form-section-header {
    margin: 2rem 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.form-section-header:first-child {
    margin-top: 0;
}

.form-section-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-header h2 i {
    color: #3498db;
    font-size: 1.3rem;
}

/* Form Styles */
.registro-form {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: #3498db;
    width: 16px;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input[type="text"]:invalid,
input[type="email"]:invalid,
input[type="number"]:invalid,
input[type="date"]:invalid,
select:invalid {
    border-color: #e74c3c;
}

/* Radio Button Styles */
.radio-group {
    margin-bottom: 2rem;
}

.radio-options {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.radio-option:hover {
    color: #3498db;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #3498db;
    background-color: #3498db;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* Select Styles */
select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.65rem;
    padding-right: 2.5rem;
}

/* Button Styles */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .radio-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem 1rem;
    }
    
    .page-header {
        padding: 40px 15px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .form-section-header h2 {
        font-size: 1.25rem;
    }
}

/* Animation for form validation */
.form-group.error input,
.form-group.error select {
    border-color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success state */
.form-group.success input,
.form-group.success select {
    border-color: #27ae60;
}

/* Loading state for submit button */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cabecera */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800)) !important;
  color: #fff !important;
}
.page-header h1, .page-header p { color: #fff !important; }
.page-header h1 i { color: var(--color-accent-yellow) !important; }

/* Contenedor de formulario */
.form-section .form-container {
  background: var(--color-bg) !important;
  border: 1px solid var(--color-border) !important;
}

/* Botones */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700)) !important;
  border-color: var(--color-primary-700) !important;
  color: #fff !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800)) !important;
  border-color: var(--color-primary-800) !important;
}

/* Inputs focus */
.form-group input:focus, .form-group select:focus {
  border-color: var(--color-primary-600) !important;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.2) !important;
}
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}