/* ===== BASE ===== */
html, body {
  height: 100%;
  margin: 0;
  background-color: #f8f9fa;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* ===== TIPOGRAFÍA Y TARJETAS ===== */
h1, .card-header {
  color: #0d6efd;
}
.card {
  border-radius: 10px;
}
.table th, .table td {
  vertical-align: middle;
}

/* ===== LOGIN LAYOUT ===== */
#loginSection {
  min-height: 100vh;
}
#loginSection img {
  max-height: 80vh;
  object-fit: contain;
}

/* RESPONSIVE: ocultar imagen en móvil */
@media (max-width: 768px) {
  #loginSection .col-md-6:first-child {
    display: none;
  }
  #loginSection {
    background-color: #fff;
    padding: 2rem 1rem;
  }
  #loginSection img {
    max-width: 60%;
    margin-bottom: 1rem;
  }
}

/* Línea azul institucional */
.vertical-line {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #0d6efd;
}
@media (max-width: 767px) {
  .vertical-line { display: none !important; }
}

/* ===== ANIMACIONES INICIALES LOGIN ===== */
#loginSection img {
  animation: slideInLeft 0.6s ease both;
}
#loginSection form {
  animation: slideInRight 0.6s ease both;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== SECCIONES PRINCIPALES ===== */
#loginSection,
#appSection {
  min-height: 100vh;
  overflow: hidden;
}

/* ======== TRANSICIONES SUAVES ENTRE LOGIN Y APP ======== */
.fade-out-up {
  animation: fadeOutUp 0.2s forwards ease-in-out;
}
.fade-in-up {
  animation: fadeInUp 0.2s forwards ease-out;
}
.fade-in-down {
  animation: fadeInDown 0.2s forwards ease-out;
}
.fade-out-down {
  animation: fadeOutDown 0.2s forwards ease-in-out;
}

/* ======== KEYFRAMES ======== */
@keyframes fadeOutUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-60px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-60px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutDown {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(60px); }
}

/* ===== HEADER APP ===== */
.app-header-left { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
}
.app-header-title { 
  text-align: center; 
  width: 100%; 
}
.user-box {
  display:flex;
  align-items:center;
  gap:0.75rem;
  justify-content:flex-end;
}

/* ===== AVATAR DEL USUARIO ===== */
.user-avatar {
  width:48px;
  height:48px;
  border-radius:8px;
  background:#f0f0f0;
  display:inline-block;
  overflow:hidden;
  border:1px solid #e0e0e0;
}
.user-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ===== AJUSTES ADICIONALES ===== */
.fade-in {
  animation: fadeIn 0.3s ease forwards;
}
.fade-out {
  animation: fadeOut 0.3s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

.table-success {
  background-color: #d1e7dd !important;
}
.table-danger {
  background-color: #f8d7da !important;
}

/* Botones pequeños y discretos */
.btn-xs {
  padding: 2px 6px;
  font-size: 0.8rem;
}

/* Colores suaves para feedback visual */
.badge.bg-success.bg-opacity-75 {
  background-color: rgba(40, 167, 69, 0.2) !important;
  color: #155724;
}

.badge.bg-danger.bg-opacity-75 {
  background-color: rgba(220, 53, 69, 0.2) !important;
  color: #721c24;
}

/* Centrar contenido en celdas */
#tablaCoincidencias td {
  vertical-align: middle;
  text-align: center;
}

#tablaCoincidencias small {
  color: #555;
  font-size: 0.85em;
  line-height: 1.3;
}