body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 900px; /* Ampliado para acomodar más campos */
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

header {
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 15px;
    position: relative;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 20px;
    margin: -20px -20px 20px -20px;
    border-radius: 8px 8px 0 0;
}

h1 {
    color: white;
    margin-bottom: 10px;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    margin-top: 30px;
}

#status-indicator {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.online {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.offline {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

#sync-status {
    margin-bottom: 15px;
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.navigation {
    margin-top: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Estilos específicos para campos rurales */
#rural_container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin-top: 15px;
}

#rural_container h3 {
    color: #27ae60;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Estilos para grupos de checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.checkbox-group label:hover {
    background-color: #e3f2fd;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.2);
}

/* Estilos para grupos de radio buttons */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.radio-group label:hover {
    background-color: #e3f2fd;
    border-color: #3498db;
}

.radio-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.2);
}

/* Contenedores específicos */
#jornada_container, #centro_container, #medicamento_container, #medicamentos_rural_container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-top: 15px;
}

#medicamentos_rural_container {
    border-left-color: #27ae60;
}

/* Estilos para textarea */
textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Botones de acciones del formulario */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button[type="reset"] {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

button[type="submit"] {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

#sync-button {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* Sección de registros */
.records-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

/* Estilos de tabla */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table, th, td {
    border: 1px solid #e9ecef;
}

th, td {
    padding: 12px;
    text-align: left;
    font-size: 13px;
}

th {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Estados de sincronización */
.pending {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.synced {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
        max-width: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 8px 4px;
    }
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#rural_container, #jornada_container, #centro_container, 
#medicamento_container, #medicamentos_rural_container {
    animation: slideIn 0.3s ease-out;
}

/* Estados de validación */
input:invalid {
    border-color: #e74c3c;
}

input:valid {
    border-color: #27ae60;
}

/* Indicadores de campos obligatorios */
label[for="nombre"]::after,
label[for="apellido_paterno"]::after,
label[for="edad"]::after,
label[for="sexo"]::after,
label[for="telefono"]::after,
label[for="colonia"]::after,
label[for="medico"]::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Tooltip para información adicional */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}