/* =========================================
   BASE Y TIPOGRAFÍA
   ========================================= */
* { box-sizing: border-box; }
html { height: 100%; background-color: #f4f7f6; }
body { 
    min-height: 100%; height: auto; 
    overscroll-behavior-y: none; overflow-x: hidden; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    padding: 20px; 
    margin: 0 auto; 
    max-width: 850px;
}
h2 { color: #2c3e50; text-align: center; }
hr { border: 0; border-top: 1px solid #eee; margin: 20px 0; }

/* =========================================
   PANELES Y FORMULARIOS GLOBALES
   ========================================= */
.panel { 
    background: white; padding: 20px; border-radius: 10px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 20px; 
}
label { font-weight: bold; display: block; margin-bottom: 5px; color: #34495e; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], select { 
    width: 100%; padding: 12px; border: 1px solid #bdc3c7; 
    border-radius: 5px; margin-bottom: 15px; font-size: 16px; transition: border-color 0.3s;
}
input:focus, select:focus { outline: none; border-color: #3498db; }

/* =========================================
   BOTONES Y MENSAJES
   ========================================= */
.btn-guardar { 
    width: 100%; padding: 15px; background-color: #27ae60; color: white; 
    border: none; border-radius: 8px; font-size: 18px; font-weight: bold; 
    cursor: pointer; margin-top: 10px; transition: background-color 0.2s; 
}
.btn-guardar:hover:not(:disabled) { background-color: #2ecc71; }
.btn-guardar:disabled { background-color: #95a5a6; cursor: not-allowed; }

#mensaje-exito { 
    display: none; background-color: #d4edda; color: #155724; 
    padding: 15px; border-radius: 5px; text-align: center; 
    margin-top: 15px; font-weight: bold; 
}

/* =========================================
   MENÚ DE NAVEGACIÓN (Tarjetas Inferiores)
   ========================================= */
.menu-navegacion {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 35px;
}
.nav-card {
    background: white; border-radius: 12px; padding: 20px 10px;
    text-align: center; text-decoration: none; color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid #e2e8f0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.nav-card:hover { 
    transform: translateY(-4px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); border-color: #3498db; 
}
.nav-icon { font-size: 32px; margin-bottom: 12px; display: block; }
.nav-text { font-size: 14px; font-weight: 700; line-height: 1.3; }

/* Tarjeta Logout */
.logout-card { background-color: #fff5f5; border-color: #ffe3e3; }
.logout-card:hover { border-color: #e74c3c; background-color: #feefee; }
.logout-card .nav-text { color: #e74c3c; }

/* Estado Activo */
.nav-card.active {
    border: 2px solid #3498db; background-color: #ebf5fb;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2); pointer-events: none;
}
.nav-card.active .nav-text { color: #2980b9; }

/* =========================================
   AJUSTES PARA MÓVILES (Responsivo)
   ========================================= */
@media (max-width: 600px) { 
    body { padding: 15px; } 
    .panel { padding: 15px; } 
}