/* Cuenta · ventanas flotantes (login / registro) */
/* ===== Ventanas flotantes (iniciar sesión / registrarse) ===== */
.btn.ghost-bar { background: transparent; color: #E9E7FF; border-color: rgba(233,231,255,.5); }
.btn.ghost-bar:hover { border-color: #fff; color: #fff; }
.overlay[hidden], .modal[hidden] { display: none; }
.overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) 1rem max(1rem, env(safe-area-inset-bottom, 0px));
  background: rgba(18,20,46,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadeIn .25s ease;
}
.modal {
  position: relative; width: min(430px, 100%); max-height: 100%; overflow-y: auto;
  padding: 2.2rem 1.9rem 1.8rem; border-radius: 26px; color: var(--text);
  background: rgba(255,252,247,.82); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.65); box-shadow: 0 30px 80px -20px rgba(18,20,46,.6);
  animation: rise .3s cubic-bezier(.2,.8,.2,1);
}
:root[data-theme="dark"] .modal { background: rgba(29,32,66,.82); border-color: rgba(119,117,214,.4); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal .close {
  position: absolute; top: .9rem; right: .9rem; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(119,117,214,.15); color: var(--title); font: 400 1.5rem/1 var(--sans); cursor: pointer;
}
.modal .close:hover { background: rgba(119,117,214,.3); }
.m-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1.1rem; }
.m-brand svg { width: 48px; height: 36px; }
.m-brand .dk { display: none; }
:root[data-theme="dark"] .m-brand .lt { display: none; }
:root[data-theme="dark"] .m-brand .dk { display: block; }
.m-brand span { font: 500 1.3rem/1 var(--sans); letter-spacing: .28em; color: var(--title); }
.modal h2 { font-size: 1.9rem; max-width: none; text-align: center; }
.m-sub { text-align: center; color: var(--muted); margin-top: .4rem; font-size: .98rem; }
.modal form { margin-top: 1.2rem; }
.modal label { display: block; margin: 1rem 0 .35rem; font-size: .92rem; font-weight: 500; color: var(--title); }
.modal input {
  width: 100%; font: inherit; font-size: 1rem; padding: .85rem 1rem; border-radius: 12px;
  border: 1.5px solid var(--line); background: rgba(255,255,255,.75); color: var(--text);
}
:root[data-theme="dark"] .modal input { background: rgba(18,20,46,.6); }
.modal input::placeholder { color: #8b8ba3; }
.modal input:focus { outline: none; border-color: var(--lav); box-shadow: 0 0 0 3px rgba(119,117,214,.28); }
.pw { position: relative; }
.pw input { padding-right: 5.2rem; }
.pw-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--link); font: 500 .88rem var(--sans); cursor: pointer; padding: .4rem .6rem; border-radius: 8px; }
.form-msg { min-height: 1.4em; margin-top: .8rem; font-size: .92rem; color: var(--muted); }
.form-msg.err { color: #B3261E; }
:root[data-theme="dark"] .form-msg.err { color: #FF9C94; }
.form-msg.ok { color: var(--title); font-weight: 500; }
.m-submit { width: 100%; margin-top: .6rem; padding: 1rem; }
.m-switch { margin-top: 1.3rem; text-align: center; font-size: .95rem; color: var(--muted); }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.s-btn {
  display: flex; align-items: center; gap: .85rem; width: 100%; margin-top: .75rem; padding: .85rem 1.2rem;
  border-radius: 999px; border: 1.5px solid var(--outline); background: rgba(255,255,255,.55); color: var(--title);
  font: 500 1rem var(--sans); cursor: pointer; text-align: left; transition: transform .15s, background .2s;
}
:root[data-theme="dark"] .s-btn { background: rgba(18,20,46,.45); }
.s-btn:hover { transform: translateY(-1px); background: rgba(233,231,255,.8); }
:root[data-theme="dark"] .s-btn:hover { background: rgba(119,117,214,.25); }
.s-btn.primary { background: var(--btn); color: var(--btn-text); border-color: transparent; }
.s-btn.primary:hover { background: var(--btn); }
.s-btn svg { width: 22px; height: 22px; flex: none; }
.m-or { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0 .1rem; color: var(--muted); font-size: .88rem; }
.m-or::before, .m-or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.m-legal { margin-top: 1rem; font-size: .82rem; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: reduce) { .overlay, .modal { animation: none; } }

.user-chip { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }