/* Sign in with Minnal: sign-in screen and user chip (public/js/auth.js). */
html.auth-locked, html.auth-locked body { overflow: hidden; }
.auth-gate {
  position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center; padding: 16px;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(37, 99, 235, .25), transparent 60%),
    radial-gradient(700px 420px at 100% 100%, rgba(124, 58, 237, .22), transparent 60%),
    rgba(15, 23, 42, .72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.auth-card {
  width: min(420px, 100%); background: #fff; color: #0f172a; border-radius: 22px; padding: 30px 28px 22px;
  box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .6); text-align: center;
}
.auth-logo {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed); box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .8);
}
.auth-logo svg, .auth-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-btn svg { width: 18px; height: 18px; }
.auth-kicker { margin: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.auth-title { margin: 6px 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.auth-text { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: #475569; overflow-wrap: anywhere; }
.auth-actions { display: flex; flex-direction: column; gap: 10px; }
.auth-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; border-radius: 12px;
  border: 1px solid #e2e8f0; background: #f8fafc; color: #0f172a; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.auth-btn-primary { border: 0; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .9); }
.auth-btn-primary:hover { filter: brightness(1.07); }
.auth-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.auth-foot { margin: 18px 0 0; font-size: 11.5px; color: #94a3b8; }
.auth-gate.auth-error .auth-logo { background: linear-gradient(135deg, #be123c, #ea580c); }

.auth-chip { position: relative; }
.auth-chip-btn {
  display: flex; align-items: center; gap: 9px; max-width: 240px; padding: 4px 10px 4px 4px; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #fff; cursor: pointer; font: inherit; color: #0f172a;
}
.auth-chip-btn:hover { background: #f8fafc; }
.auth-chip-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .4); outline-offset: 2px; }
.auth-avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-size: 12px; font-weight: 800;
}
.auth-chip-text { display: flex; flex-direction: column; min-width: 0; text-align: left; line-height: 1.2; }
.auth-chip-name { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-chip-role { font-size: 11px; color: #64748b; font-weight: 600; }
.auth-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 260px; padding: 14px; border-radius: 14px;
  background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 20px 40px -18px rgba(15, 23, 42, .45); color: #0f172a; text-align: left;
}
.auth-chip.auth-up .auth-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
.auth-menu-name { font-weight: 800; font-size: 14px; }
.auth-menu-email { font-size: 12.5px; color: #64748b; overflow-wrap: anywhere; margin-top: 2px; }
.auth-menu-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.auth-role { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef2ff; color: #4338ca; }
.auth-menu-perm { font-size: 12px; color: #475569; margin-bottom: 10px; }
.auth-menu-item { width: 100%; height: 36px; border-radius: 10px; border: 1px solid #fecdd3; background: #fff1f2; color: #be123c; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.auth-menu-item:hover { background: #ffe4e6; }
@media (max-width: 760px) { .auth-chip-text { display: none; } .auth-chip-btn { padding: 3px; } }
