/* MosqCore Connector 1.14.0 · Seguridad de la cuenta del cliente. Hoja independiente (se carga también sin sesión):
   usa las variables del portal (--msq-*) cuando existen y trae sus propios valores de respaldo. */
.mcs { --c-surface: var(--msq-surface, #fff); --c-muted-bg: var(--msq-surface-muted, #eef0f3); --c-border: var(--msq-border, #e2e3e6); --c-text: var(--msq-text, #19191b); --c-muted: var(--msq-muted, #6b6d73);
  --c-black: var(--msq-black, #010101); --c-red: var(--msq-red, #d80e0e); --c-red-hover: var(--msq-red-hover, #b90b0b); --c-red-text: var(--msq-red-text, #b30d0d); --c-ok: var(--msq-success, #16803c); --c-ok-bg: var(--msq-success-bg, #f2fbf5);
  color: var(--c-text); font-size: 15px; line-height: 1.55; box-sizing: border-box; }
.mcs *, .mcs *::before, .mcs *::after { box-sizing: border-box; }
.mcs [hidden] { display: none !important; }
.mcs svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* Botones y enlaces */
.mcs .mcs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 14px; font: inherit; font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none; text-transform: none; letter-spacing: 0; cursor: pointer; transition: background-color .15s, border-color .15s, transform .1s; width: auto; margin: 0; box-shadow: none; }
.mcs .mcs-btn:active { transform: translateY(1px); }
.mcs .mcs-btn--red { background: var(--c-red); border-color: var(--c-red); color: #fff; }
.mcs .mcs-btn--red:hover { background: var(--c-red-hover); border-color: var(--c-red-hover); color: #fff; }
.mcs .mcs-btn--dark { background: var(--c-black); border-color: var(--c-black); color: #fff; }
.mcs .mcs-btn--dark:hover { background: #26262a; border-color: #26262a; color: #fff; }
.mcs .mcs-btn--wide { width: 100%; }
.mcs .mcs-btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.mcs .mcs-btn:disabled, .mcs .mcs-btn.is-busy { opacity: .6; cursor: default; }
.mcs .mcs-btn:focus-visible, .mcs .mcs-link:focus-visible, .mcs input:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-red) 35%, transparent); outline-offset: 2px; }
.mcs .mcs-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; background: none; border: 0; color: var(--c-text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; box-shadow: none; width: auto; margin: 0; text-transform: none; letter-spacing: 0; }
.mcs .mcs-link:hover { color: var(--c-red-text); background: none; }
.mcs .mcs-link--danger { color: var(--c-red-text); }
.mcs .mcs-feedback { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--c-ok-bg); border: 1px solid color-mix(in srgb, var(--c-ok) 25%, transparent); color: var(--c-text); font-size: 14px; }
.mcs .mcs-feedback.is-error { background: var(--msq-error-bg, #fff7f7); border-color: var(--msq-error-border, #f2caca); color: var(--msq-error-text, #4c3434); }
.mcs .mcs-loading { color: var(--c-muted); margin: 12px 0; }
.mcs .mcs-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--c-muted); font-size: 13px; }
.mcs .mcs-or::before, .mcs .mcs-or::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }

/* Botón de passkey en el formulario de acceso */
.mcs-pk-login { margin: 0 0 6px; }

/* Pantallas del segundo paso y de recuperación */
.mcs-screen { display: flex; justify-content: center; padding: 8px 0 32px; }
.mcs-card { width: min(100%, 460px); padding: 30px 26px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .08); text-align: center; }
.mcs-badge { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--c-black); color: #fff; margin-bottom: 14px; }
.mcs-badge svg { width: 28px; height: 28px; }
.mcs .mcs-title { margin: 0 0 6px; font-size: 22px; line-height: 1.25; font-weight: 800; color: var(--c-text); }
.mcs .mcs-text { margin: 0 0 18px; color: var(--c-muted); }
.mcs .mcs-form { display: grid; gap: 14px; text-align: left; }
.mcs .mcs-hint { margin: 0; color: var(--c-muted); font-size: 14px; text-align: center; }
.mcs .mcs-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--c-text); margin: 0; }
.mcs .mcs-field input { width: 100%; min-height: 54px; padding: 0 14px; border: 1px solid var(--msq-field-border, #cfd1d5); border-radius: 14px; background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 22px; font-weight: 700; letter-spacing: 6px; text-align: center; margin: 0; box-shadow: none; }
.mcs .mcs-field input::placeholder { color: #c2c4c9; }
.mcs .mcs-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--c-text); cursor: pointer; margin: 0; }
.mcs .mcs-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--c-red); flex: 0 0 auto; }
.mcs .mcs-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 16px 0 0; }
.mcs .mcs-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 14px; background: var(--c-muted-bg); border-radius: 14px; }
.mcs .mcs-seg button { min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--c-muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0; }
.mcs .mcs-seg button[aria-pressed="true"] { background: var(--c-surface); color: var(--c-text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* Pestaña «Seguridad» */
.mcs-account [data-body] { display: grid; gap: 16px; margin-top: 18px; }
.mcs .mcs-section { padding: 22px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 20px; display: grid; gap: 14px; }
.mcs .mcs-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.mcs .mcs-section-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--c-text); }
.mcs .mcs-section-head p { margin: 0; color: var(--c-muted); font-size: 14px; }
.mcs .mcs-pill { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--c-muted-bg); color: var(--c-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.mcs .mcs-pill.is-on { background: var(--c-ok-bg); color: var(--c-ok); }
.mcs .mcs-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--msq-border-soft, #ececef); border-radius: 16px; }
.mcs .mcs-row-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--c-muted-bg); color: var(--c-text); }
.mcs .mcs-row-copy { display: grid; gap: 2px; min-width: 0; }
.mcs .mcs-row-copy strong { font-size: 15px; overflow-wrap: anywhere; }
.mcs .mcs-row-copy span { font-size: 13px; color: var(--c-muted); overflow-wrap: anywhere; }
.mcs .mcs-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mcs .mcs-note { margin: 0; font-size: 13px; color: var(--c-muted); }
.mcs .mcs-section > .mcs-btn { justify-self: start; }
.mcs .mcs-panel { padding: 22px; background: var(--c-surface); border: 2px solid var(--c-black); border-radius: 20px; display: grid; gap: 12px; }
.mcs .mcs-panel h3 { margin: 0; font-size: 18px; font-weight: 800; }
.mcs .mcs-panel p { margin: 0; color: var(--c-muted); font-size: 14px; }
.mcs .mcs-panel .mcs-field { max-width: 260px; }
.mcs .mcs-panel-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mcs .mcs-qr { display: grid; place-items: center; width: 216px; padding: 8px; background: #fff; border: 1px solid var(--c-border); border-radius: 16px; }
.mcs .mcs-qr svg { width: 200px; height: 200px; }
.mcs .mcs-secret code, .mcs .mcs-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; background: var(--c-muted-bg); padding: 4px 8px; border-radius: 8px; color: var(--c-text); overflow-wrap: anywhere; }
.mcs .mcs-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.mcs .mcs-codes li { margin: 0; }

/* Invitación */
.mcs-invite { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 0 0 20px; padding: 18px 20px; background: var(--c-black); color: #fff; border-radius: 20px; }
.mcs-invite-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .12); }
.mcs-invite-icon svg { width: 28px; height: 28px; }
.mcs-invite-copy { display: grid; gap: 2px; min-width: 0; }
.mcs-invite-copy strong { font-size: 16px; color: #fff; }
.mcs-invite-copy span { font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.mcs-invite-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mcs.mcs-invite .mcs-link { color: #fff; }
.mcs.mcs-invite .mcs-link:hover { color: #fff; opacity: .8; }
.mcs-invite .mcs-feedback { grid-column: 1 / -1; margin: 0; }
.mcs-invite.is-done { background: var(--c-ok); }

@media (max-width: 640px) {
  .mcs-card { padding: 24px 18px; border-radius: 18px; }
  .mcs .mcs-section { padding: 16px; border-radius: 16px; }
  .mcs .mcs-section-head { flex-direction: column; gap: 8px; }
  .mcs .mcs-row { grid-template-columns: 44px minmax(0, 1fr); }
  .mcs .mcs-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .mcs .mcs-section > .mcs-btn { justify-self: stretch; width: 100%; }
  .mcs-invite { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; }
  .mcs-invite-icon { width: 44px; height: 44px; }
  .mcs-invite-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .mcs-invite-actions .mcs-btn { flex: 1 1 auto; }
  .mcs .mcs-panel .mcs-field { max-width: none; }
  .mcs .mcs-qr { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .mcs .mcs-btn { transition: none; } }
/* 1.14.1 · Blindaje frente al CSS del tema o de personalizaciones del formulario de acceso (iconos gigantes, texto en columna). */
.mcs svg.mcs-icon { flex-shrink: 0 !important; vertical-align: middle; }
.mcs .mcs-btn { display: inline-flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: center !important; height: auto !important; max-height: none !important; white-space: normal; }
.mcs .mcs-btn > span { flex: 0 1 auto !important; width: auto !important; min-width: 0; text-align: center; }
.mcs .mcs-btn--wide { display: flex !important; width: 100% !important; }
.mcs-pk-login { display: block; width: 100%; clear: both; }
.mcs-badge svg.mcs-icon, .mcs-invite-icon svg.mcs-icon { flex-shrink: 0 !important; }
/* 1.15.0 · Entrar con un código por correo (debajo del botón de passkey). */
.mcs .mcs-btn--ghost { background: var(--c-surface); border-color: var(--msq-field-border, #cfd1d5); color: var(--c-text); }
.mcs .mcs-btn--ghost:hover { border-color: var(--c-black); background: var(--c-surface); color: var(--c-text); }
.mcs-pk-login .mcs-btn + .mcs-el, .mcs-pk-login [data-pk-go]:not([hidden]) + .mcs-el { margin-top: 10px; }
.mcs .mcs-el-panel { display: grid; gap: 12px; margin-top: 12px; padding: 16px; border: 1px solid var(--c-border); border-radius: 16px; background: var(--c-muted-bg); text-align: left; }
.mcs .mcs-el-panel [data-el-step] { display: grid; gap: 12px; }
.mcs .mcs-field--text input { font-size: 16px !important; font-weight: 500 !important; letter-spacing: 0 !important; text-align: left !important; }
.mcs .mcs-el-panel .mcs-link { justify-self: center; }
/* Un elemento oculto se queda oculto aunque sea un botón con display forzado. */
.mcs [hidden], .mcs .mcs-btn[hidden], .mcs .mcs-btn--wide[hidden] { display: none !important; }
