/* ============================================================
   ENCUESTAS IPS — Estilos principales
   Paleta: azul salud #0d6efd + blanco + grises
   ============================================================ */

:root {
  --color-primary:   #0d6efd;
  --color-success:   #198754;
  --color-danger:    #dc3545;
  --color-warning:   #ffc107;
  --color-light-bg:  #f8f9fa;
  --font-main:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background-color: #f0f4f8;
  color: #212529;
  min-height: 100vh;
}

/* ---- LOGIN -------------------------------------------------- */
.login-page {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 60%, #084298 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

/* ---- APP PAGES ---------------------------------------------- */
.app-page {
  background: #f0f4f8;
}

/* ---- NAVBAR ------------------------------------------------- */
.navbar-brand {
  font-size: 1rem;
  letter-spacing: -.2px;
}

/* ---- KPI CARDS ---------------------------------------------- */
.kpi-card {
  border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.12) !important;
}
.kpi-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.kpi-value {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.kpi-sub {
  font-size: 1rem;
  font-weight: 400;
  opacity: .6;
}
.kpi-label {
  font-size: .82rem;
  color: #6c757d;
  margin-top: .25rem;
}

/* ---- FORMULARIO DE ENCUESTA --------------------------------- */
.sat-btn {
  min-height: 80px;
  border-radius: 10px;
  transition: all .15s ease;
  cursor: pointer;
  width: 100%;
}
.sat-btn:hover,
.btn-check:checked + .sat-btn {
  transform: scale(1.05);
}
.btn-check:checked + .sat-btn.btn-outline-danger   { background: #dc3545; color: #fff; }
.btn-check:checked + .sat-btn.btn-outline-warning  { background: #ffc107; color: #212529; }
.btn-check:checked + .sat-btn.btn-outline-secondary{ background: #6c757d; color: #fff; }
.btn-check:checked + .sat-btn.btn-outline-info     { background: #0dcaf0; color: #212529; }
.btn-check:checked + .sat-btn.btn-outline-success  { background: #198754; color: #fff; }

.sat-num { font-size: 1.6rem; }

/* Botones de recomendación */
.recommendation-btn label.btn {
  min-height: 80px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.btn-check:checked + .btn-outline-success {
  background: #198754;
  color: #fff;
  transform: scale(1.04);
}
.btn-check:checked + .btn-outline-danger {
  background: #dc3545;
  color: #fff;
  transform: scale(1.04);
}

/* ---- CARDS -------------------------------------------------- */
.card {
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.07);
}
.card-header {
  border-radius: 12px 12px 0 0 !important;
  padding: .85rem 1.25rem;
  font-size: .92rem;
}

/* ---- TABLA -------------------------------------------------- */
.table th {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6c757d;
  font-weight: 600;
}
.table td { font-size: .88rem; }

/* ---- AVATAR EMPLEADO --------------------------------------- */
.emp-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.emp-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.4rem;
}

/* ---- CARD DEL EMPLEADO (formulario interno) ---------------- */
.employee-rating-card {
  background: #f8f9fa;
  border: 2px solid #e9ecef !important;
}

/* ---- BOTONES CALIFICACIÓN EMPLEADO (Bueno/Regular/Malo) ---- */
.emp-rating-btn {
  border-radius: 12px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
  cursor: pointer;
}
.emp-rating-btn:hover { transform: scale(1.04); }
.btn-check:checked + .emp-rating-btn.btn-outline-success {
  background: #198754; color: #fff; transform: scale(1.04);
}
.btn-check:checked + .emp-rating-btn.btn-outline-warning {
  background: #ffc107; color: #212529; transform: scale(1.04);
}
.btn-check:checked + .emp-rating-btn.btn-outline-danger {
  background: #dc3545; color: #fff; transform: scale(1.04);
}

/* ---- GRILLA DE EMPLEADOS (formulario público) -------------- */
.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
}
.emp-card-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem .5rem;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s ease;
  background: #fff;
  width: 100%;
  text-align: center;
}
.emp-card-label:hover {
  border-color: var(--color-primary);
  background: #f0f4ff;
  transform: translateY(-2px);
}
.btn-check:checked + .emp-card-label {
  border-color: var(--color-primary);
  background: #e8f0fe;
  box-shadow: 0 0 0 3px rgba(13,110,253,.2);
}
.emp-name {
  font-size: .8rem;
  font-weight: 600;
  margin-top: .5rem;
  line-height: 1.2;
  color: #212529;
}
.emp-org {
  font-size: .7rem;
  color: #6c757d;
  margin-top: .15rem;
}

/* ---- PÁGINA PÚBLICA ---------------------------------------- */
.public-survey-page {
  background: #f0f4f8;
  min-height: 100vh;
}
.public-header {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}
.public-logo-circle {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ---- SUCCESS PAGE ------------------------------------------ */
.success-icon { animation: popIn .4s ease; }
@keyframes popIn {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- UTILITY ----------------------------------------------- */
.btn-xs {
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: 4px;
}

/* Paginación */
.pagination .page-link {
  font-size: .82rem;
  border-radius: 6px !important;
  margin: 0 2px;
}

/* Alert mejorado */
.alert {
  border-radius: 10px;
  font-size: .9rem;
}

/* Form control focus */
.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.18);
}

/* ---- RESPONSIVE -------------------------------------------- */
@media (max-width: 576px) {
  .login-card {
    padding: 2rem 1.25rem;
  }
  .kpi-value {
    font-size: 1.7rem;
  }
  .sat-num {
    font-size: 1.3rem;
  }
  .sat-btn {
    min-height: 65px;
  }
}
