* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h2 {
    font-size: 28px;
    font-weight: 300;
    margin: 0;
}

.form-content {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-container {
    text-align: center;
    margin-top: 30px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    width: 100%;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 117, 125, 0.3);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Estilos para validación y mensajes */
.form-group.error input,
.form-group.error textarea {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-group.focused label {
    color: #667eea;
}

/* Indicador de fuerza de contraseña */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.strength-weak {
    background-color: #e74c3c;
    width: 25%;
}

.strength-fair {
    background-color: #f39c12;
    width: 50%;
}

.strength-good {
    background-color: #3498db;
    width: 75%;
}

.strength-strong {
    background-color: #27ae60;
    width: 100%;
}

.strength-text {
    font-size: 12px;
    font-weight: 500;
}

.strength-text.weak {
    color: #e74c3c;
}

.strength-text.fair {
    color: #f39c12;
}

.strength-text.good {
    color: #3498db;
}

.strength-text.strong {
    color: #27ae60;
}

/* Mensajes globales */
.success-message,
.error-message-global {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.success-message {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.error-message-global {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.success-content h3,
.error-content h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.success-content p,
.error-content p {
    margin: 0;
    font-size: 14px;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilos para formularios con tabla */
.form-table-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 30px;
}

.form-table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    margin: -30px -30px 30px -30px;
    border-radius: 15px 15px 0 0;
}

.form-table-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 300;
}

.form-table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-table td {
    padding: 15px;
    border: 1px solid #e1e5e9;
}

.form-table td:first-child {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #333;
    width: 30%;
}

.form-table input,
.form-table select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-table input:focus,
.form-table select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Botones específicos para formularios con tabla */
.btn-table {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-table:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-table-secondary {
    background: #6c757d;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-table-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 117, 125, 0.3);
}

/* Colores específicos para cada formulario */
.btn-empleados {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.btn-empleados:hover {
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
}

.btn-eps {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.btn-eps:hover {
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

.btn-instructores {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.btn-instructores:hover {
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.3);
}

.btn-usuarios {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-usuarios:hover {
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
}

/* Estilos para la página principal (index.php) */
.index-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 40px;
}

.index-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
    margin: -40px -40px 40px -40px;
    border-radius: 15px 15px 0 0;
}

.index-header h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 2px;
}

.setup-info {
    background: linear-gradient(135deg, #e8f4fd 0%, #d1ecf1 100%);
    border: 2px solid #bee5eb;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.setup-info h3 {
    margin: 0 0 15px 0;
    color: #0c5460;
    font-size: 20px;
}

.setup-info ol {
    margin: 0;
    padding-left: 20px;
    color: #0c5460;
}

.setup-info li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.form-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.form-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.form-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

.form-card p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 14px;
}

.btn-index {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-index::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-index:hover::before {
    left: 100%;
}

.btn-index:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Colores específicos para botones del index */
.btn-index.btn-empleados {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-index.btn-empleados:hover {
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-index.btn-eps {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-index.btn-eps:hover {
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-index.btn-instructores {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-index.btn-instructores:hover {
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-index.btn-usuarios {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-index.btn-usuarios:hover {
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .form-content {
        padding: 20px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h2 {
        font-size: 24px;
    }
    
    .form-table-container {
        margin: 10px;
        padding: 20px;
    }
    
    .form-table-header {
        margin: -20px -20px 20px -20px;
        padding: 15px;
    }
    
    .form-table-header h2 {
        font-size: 20px;
    }
    
    .form-table td {
        padding: 10px;
        display: block;
        width: 100%;
        border: none;
        border-bottom: 1px solid #e1e5e9;
    }
    
    .form-table td:first-child {
        background-color: #f8f9fa;
        font-weight: bold;
        margin-bottom: 5px;
    }
    
    .success-message,
    .error-message-global {
        right: 10px;
        left: 10px;
        top: 10px;
    }
    
    .index-container {
        margin: 10px;
        padding: 20px;
    }
    
    .index-header {
        margin: -20px -20px 20px -20px;
        padding: 25px;
    }
    
    .index-header h1 {
        font-size: 28px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .form-card h3 {
        font-size: 18px;
    }
    
    .btn-index {
        padding: 12px 24px;
        font-size: 14px;
    }
}
