* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo {

    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    font-size: 2rem;
    color: #4CAF50;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.form-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    border-top: 5px solid #4CAF50;
}

.form-container h2 {
    color: #2E7D32;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.subtitle {
    color: #66BB6A;
    margin-bottom: 30px;
    font-size: 1rem;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 2px solid #C8E6C9;
    border-radius: 10px;
    background: #F1F8E9;
}

.form-section h3 {
    color: #2E7D32;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2E7D32;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #C8E6C9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 0.9rem;
}

.referral-info {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
}

.referral-info.valid {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.referral-info.invalid {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 200px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.btn-primary:disabled .btn-text {
    display: none;
}

.btn-primary:disabled .btn-loading {
    display: inline;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px; /* Aumentar el ancho máximo */
    max-height: 85vh; /* Limitar la altura */
    overflow-y: auto; /* Agregar scroll vertical */
    text-align: left; /* Cambiar a alineación izquierda para mejor lectura */
    animation: slideIn 0.3s ease;
    position: relative;
}

/* Estilos para el contenido del modal de solicitudes */
#requestDetails {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 20px;
}

#requestDetails h3 {
    color: #2d3748;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
}

#requestDetails p {
    margin-bottom: 8px;
    line-height: 1.5;
}

#requestDetails a {
    color: #667eea;
    text-decoration: none;
}

#requestDetails a:hover {
    text-decoration: underline;
}

.modal-content h2 {
    color: #22543d;
    margin-bottom: 20px;
}

.modal-content p {
    margin-bottom: 15px;
    color: #4a5568;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.nav-btn {
    padding: 10px 20px;
    background: #3A7658;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: #5e883a;
}

.nav-btn.active {
    background: #81BE4D;
}

.admin-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #2d3748;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #4a5568;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fef5e7;
    color: #744210;
}

.status-approved {
    background: #c6f6d5;
    color: #22543d;
}

.status-rejected {
    background: #fed7d7;
    color: #742a2a;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 0 2px;
}

.btn-approve {
    background: #48bb78;
    color: white;
}

.btn-reject {
    background: #f56565;
    color: white;
}

.btn-view {
    background: #4299e1;
    color: white;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    border-top: 5px solid #4CAF50;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2E7D32;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-form .form-group label {
    color: #2E7D32;
    font-weight: 600;
}

.login-form .form-group input {
    border: 2px solid #C8E6C9;
    transition: border-color 0.3s ease;
}

.login-form .form-group input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Estilos para el toggle de contraseña */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    cursor: pointer;
    user-select: none;
    color: #666;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.password-toggle:hover {
    color: #4CAF50;
}

.password-toggle svg {
    transition: all 0.3s ease;
}

.password-toggle.hidden svg {
    opacity: 0.6;
}

.password-toggle.hidden svg path:first-child {
    stroke-dasharray: 4 4;
    stroke-dashoffset: 8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.nav-btn {
    padding: 10px 20px;
    background: #3A7658;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: #5e883a;
}

.nav-btn.active {
    background: #81BE4D;
}

.admin-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #2d3748;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #4a5568;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fef5e7;
    color: #744210;
}

.status-approved {
    background: #c6f6d5;
    color: #22543d;
}

.status-rejected {
    background: #fed7d7;
    color: #742a2a;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 0 2px;
}

.btn-approve {
    background: #48bb78;
    color: white;
}

.btn-reject {
    background: #f56565;
    color: white;
}

.btn-view {
    background: #4299e1;
    color: white;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    border-top: 5px solid #4CAF50;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2E7D32;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-form .form-group label {
    color: #2E7D32;
    font-weight: 600;
}

.login-form .form-group input {
    border: 2px solid #C8E6C9;
    transition: border-color 0.3s ease;
}

.login-form .form-group input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}