/* ==== 🏛 Cabecera común de Atlas (atlas-shared/cabecera, 27/10/2026) — editar aquí y copiar con sync-cabecera.sh ==== */
.acab { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.4rem 1rem; background: rgba(255,255,255,0.92); backdrop-filter: blur(6px); border-bottom: 1px solid #e3e6ea;
  font: 500 0.92rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1f2933; width: 100%; box-sizing: border-box; }
.acab-izq, .acab-der { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.acab-atlas { border: none; background: none; font-weight: 700; font-size: 1rem; cursor: pointer; padding: 0.2rem 0.3rem; border-radius: 6px; color: #1f2933; }
.acab-atlas:hover { background: #eef2f6; }
.acab-sep { color: #9aa5b1; }
.acab-app { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acab-entorno { font-size: 0.78rem; color: #52606d; background: #f0f3f6; border-radius: 999px; padding: 0.1rem 0.5rem; white-space: nowrap; }
.acab-estado:empty { display: none; }
.acab-hueco { display: flex; align-items: center; gap: 0.5rem; }
.acab-caja { position: relative; }
.acab-btn { border: 1px solid #d9dee4; background: #fff; border-radius: 999px; padding: 0.25rem 0.65rem; cursor: pointer; font: inherit; color: inherit; white-space: nowrap; }
.acab-btn:hover { background: #f4f6f8; }
.acab-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 190px; max-height: 70vh; overflow: auto; background: #fff;
  border: 1px solid #d9dee4; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 0.35rem; z-index: 950; }
.acab[dir="rtl"] .acab-menu { right: auto; left: 0; }
.acab-op { display: block; width: 100%; text-align: start; border: none; background: none; padding: 0.35rem 0.55rem; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.acab-op:hover { background: #eef2f6; }
.acab-actual { font-weight: 700; background: #eef6ff; }
.acab-reset { font-weight: 700; color: #1f5fb4; }
.acab-raya { height: 1px; background: #e3e6ea; margin: 0.3rem 0; }
.acab-quien { padding: 0.35rem 0.55rem; font-size: 0.85rem; color: #52606d; line-height: 1.45; }
@media (max-width: 720px) { .acab-entorno, .acab-sep { display: none; } .acab { padding: 0.35rem 0.6rem; } .acab-app { max-width: 38vw; } }
@media (prefers-color-scheme: dark) { .acab { background: rgba(28,32,38,0.92); color: #e6e9ed; border-color: #333a42; }
  .acab-atlas { color: #e6e9ed; } .acab-btn, .acab-menu { background: #232830; border-color: #3a414a; } .acab-entorno { background: #2b3139; color: #b8c2cc; } }
/* 27/10/2026 (Javi: «alinea en altura todo»): las apps traen estilos propios para button (márgenes, alturas) → se anulan aquí. */
.acab button { margin: 0; line-height: 1.2; vertical-align: middle; }
.acab-izq > *, .acab-der > *, .acab-hueco > * { margin-top: 0 !important; margin-bottom: 0 !important; align-self: center; }
.acab-btn, .acab-hueco > button { height: 30px; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0 0.7rem; box-sizing: border-box; }
.acab-atlas { height: 30px; display: inline-flex; align-items: center; }
.acab-entorno, .acab-estado > * { height: 22px; display: inline-flex; align-items: center; box-sizing: border-box; }
/* (y que el desplegable del usuario no monte el texto): cada dato en su línea, sin cortar */
.acab-menu { width: max-content; max-width: min(360px, 92vw); }
.acab-quien div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.acab-op { height: auto; line-height: 1.3; }
/* 28/10/2026 🎨 Fondo de «Tu menú» (Atlas Núcleo) en todas las páginas de todas las apps — pedido de Javi 25/10. */
body.acab-fondo { background:
    radial-gradient(60rem 30rem at 15% -10%, rgba(47,143,92,0.10), transparent),
    radial-gradient(50rem 30rem at 110% 10%, rgba(47,143,92,0.08), transparent),
    #eef3ee !important; background-attachment: fixed !important; }
.acab-agua { position: fixed; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: center; overflow: hidden; pointer-events: none; }
.acab-agua svg { width: min(70vw, 56rem); height: auto; }
.acab-agua path, .acab-agua ellipse { stroke: #1c2b22; opacity: 0.05; }
@media (prefers-color-scheme: dark) {
  body.acab-fondo { background:
    radial-gradient(60rem 30rem at 15% -10%, rgba(111,227,160,0.10), transparent),
    radial-gradient(50rem 30rem at 110% 10%, rgba(111,227,160,0.08), transparent),
    #0c1712 !important; }
  .acab-agua path, .acab-agua ellipse { stroke: #eaf3ec; opacity: 0.09; } }
/* la barra vieja que hace de soporte no añade su propio relleno */
.topbar.topbar-acab { padding: 0 !important; display: block !important; }

/* 29/10/2026: 🔮 acceso al palacio de cristal (la cúpula), junto a «🏛 Atlas» */
.acab-palacio { display: inline-flex; align-items: center; height: 30px; padding: 0 0.3rem; border-radius: 6px; color: #3f8f5a; cursor: pointer; }
.acab-palacio svg { width: 1.5em; height: 1.05em; }
.acab-palacio:hover { background: #eef2f6; color: #1f6b3a; }
