/* /ui/ui.css - Versión Header Fijo (Sticky Bar) */

/* ===== Header "HUD" namespaced (a100) ===== */
.a100-hud {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  
  /* ESTILO DE BARRA FIJA */
  background: rgba(255, 255, 255, 0.95); /* Fondo blanco casi sólido */
  backdrop-filter: blur(12px);           /* Efecto vidrio sutil */
  border-bottom: 1px solid #e2e8f0;      /* Línea divisoria abajo */
  padding: 0;                            /* Sin padding externo */

  /* CLAVE: que no dependa del body */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.a100-hud, .a100-hud * {
  box-sizing: border-box;
}

.a100-hud__inner {
  /* Contenedor del contenido (para que no se estire al infinito en monitores 4k) */
  max-width: 1280px; 
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  /* Limpieza de estilos antiguos (ya no es flotante) */
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;

  /* Altura de la barra */
  padding: 12px 24px;
}

.a100-hud__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.a100-hud__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.a100-hud__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.a100-hud__user { min-width: 0; }

.a100-hud__title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a100-hud__sub {
  margin-top: 1px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Dropdown ===== */
.a100-hud__right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.a100-hud__btn {
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;

  font-size: 13px;
  font-weight: 600;

  padding: 8px 16px;
  border-radius: 8px; /* Botón un poco más cuadrado para encajar con la barra */

  transition: .2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.a100-hud__btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.a100-hud__caret { font-size: 10px; opacity: .6; }

.a100-hud__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);

  min-width: 220px;
  padding: 6px;

  background: #fff;
  
  border: 1px solid #e2e8f0;
  border-radius: 12px;

  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  display: none;
}

.a100-hud__menu--open { display: block; }

.a100-hud__menu a {
  display: flex;
  gap: 10px;
  align-items: center;

  padding: 10px 12px;
  border-radius: 8px;

  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: #475569;

  transition: .15s;
}

.a100-hud__menu a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.a100-hud__sep {
  height: 1px;
  background: #f1f5f9;
  margin: 6px 0;
}

.a100-hud__danger {
  color: #dc2626 !important;
}
.a100-hud__danger:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

/* Mobile */
@media (max-width: 640px) {
  .a100-hud__inner {
    padding: 12px 16px;
  }
  .a100-hud__title { font-size: 14px; }
  .a100-hud__menu { 
    right: -10px; /* Ajuste leve para móviles */
    width: 260px;
  }
}