.auth-dialog { border: none; padding: 0; background: transparent; max-width: calc(100vw - 24px); color: inherit; }
.auth-dialog::backdrop { background: rgba(15, 18, 30, 0.55); backdrop-filter: blur(3px); }
.auth-card { position: relative; width: 380px; max-width: 100%; box-sizing: border-box; padding: 26px 24px 22px; border-radius: 18px; background: var(--panel, #fff); color: var(--text, #1f2430); border: 1px solid var(--border, #e3e6ee); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5); font-family: inherit; }
.auth-card h2 { margin: 0 0 6px; font-size: 21px; }
.auth-sub { margin: 0 0 16px; font-size: 14px; line-height: 1.45; color: var(--muted, #667085); }
.auth-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: none; background: none; color: var(--muted, #667085); font-size: 24px; line-height: 1; cursor: pointer; border-radius: 8px; }
.auth-x:hover { background: rgba(127, 127, 127, 0.15); }
.auth-list { display: flex; flex-direction: column; gap: 10px; }
.auth-provider { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border, #d8dce6); background: var(--panel, #fff); color: inherit; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.auth-provider:hover { border-color: var(--accent, #4f6bed); transform: translateY(-1px); }
.auth-step label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.auth-step input { width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border, #d8dce6); background: var(--bg, transparent); color: inherit; font: inherit; font-size: 16px; }
.auth-step input:focus { outline: none; border-color: var(--accent, #4f6bed); }
.auth-step input[name="code"] { font-size: 24px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.auth-err { min-height: 18px; margin: 8px 0 6px; font-size: 13px; color: #d92d20; }
.auth-submit { width: 100%; height: 46px; border: none; border-radius: 12px; background: linear-gradient(135deg, var(--accent, #4f6bed), var(--accent2, #8b5cf6)); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.auth-submit:disabled { opacity: 0.6; cursor: progress; }
.auth-back { display: block; width: 100%; margin-top: 8px; padding: 8px; border: none; background: none; color: var(--muted, #667085); font: inherit; font-size: 13.5px; cursor: pointer; }
.auth-back:hover { color: var(--text, #1f2430); }
.auth-back:disabled { opacity: 0.5; cursor: default; }

/* Las páginas de la app definen estilos genéricos para <dialog>, <form> y <label>: aquí se recuperan los del popup */
dialog.auth-dialog { border: none; padding: 0; margin: auto; background: transparent; box-shadow: none; width: fit-content; max-height: none; overflow: visible; }
.auth-dialog .auth-step { display: block; padding: 0; gap: 0; }
.auth-dialog .auth-step[hidden] { display: none; }
.auth-dialog label { display: block; gap: 0; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: inherit; }
.auth-dialog .auth-step input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border, #d8dce6); background: var(--bg, transparent); color: inherit; font-size: 16px; }
.auth-dialog .auth-step input[name="code"] { font-size: 24px; }
.auth-dialog .auth-step input:focus { outline: none; border-color: var(--accent, #4f6bed); }

.auth-guest { margin: 0; padding: 0; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted, #667085); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border, #d8dce6); }
.auth-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted, #667085); text-align: center; }
.auth-dialog .auth-guest { display: block; gap: 0; padding: 0; }
.auth-guest .auth-provider { width: 100%; box-sizing: border-box; }
