/* ─────────────────────────────────────────────────────────────────
   Shared account/Identity page styling — used by BOTH layouts:
     • AccountLayout       (the login page; configurable two-panel)
     • AccountBasicLayout  (register + all utility Identity pages; plain card)
   The card, the wordmark visuals, and the re-theming of the scaffolded
   Bootstrap-style classes live here (global, so both layouts share one
   copy). Each layout's own scoped .css only positions the card + panel.
   ───────────────────────────────────────────────────────────────── */

.account-card {
    width: min(400px, 100%);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 30px 26px;
    box-shadow: var(--shadow-card);
}

/* Brand lockup inside the card. Visuals here; each layout decides when to
   SHOW it (login hides it on desktop where the side panel carries the brand;
   the basic layout always shows it). */
.card-brand {
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.2px;
    color: var(--fg);
    margin-bottom: 22px;
    width: fit-content;
}

.card-brand .card-logo {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 16px;
}

.account-back {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.account-back:hover { color: var(--fg-dim); }

/* ── Re-theme the Bootstrap-style class hooks the scaffolded Identity
      pages use (Bootstrap isn't loaded). Scoped to .account-body, which
      both layouts wrap the page content in. ─────────────────────────── */

.account-body h1 {
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -0.4px;
    margin: 0 0 6px;
    color: var(--fg);
    text-wrap: balance;
}

.account-body h2 {
    font-size: 14.5px;
    font-weight: 450;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 0 22px;
}

.account-body h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin: 20px 0 10px;
}

.account-body hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 12px 0 16px;
}

.account-body .row {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.account-body .col-lg-6,
.account-body .col-lg-4,
.account-body .col-lg-3,
.account-body .col-lg-9 { min-width: 0; }

.account-body .form-floating {
    display: flex;
    flex-direction: column-reverse;
    margin-bottom: 14px;
}

.account-body .mb-3 { margin-bottom: 12px; }

.account-body .form-label,
.account-body label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin: 0 0 6px;
    display: block;
}

.account-body .form-control {
    display: block;
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--fg);
    font: inherit;
    font-size: 15px;
    padding: 11px 13px;
    outline: 0;
    box-sizing: border-box;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.account-body .form-control::placeholder { color: var(--muted); }

.account-body .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.account-body .checkbox { margin-bottom: 14px; }

.account-body .checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fg-dim);
    font-size: 14px;
    margin: 0;
}

.account-body .form-check-input,
.account-body input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    margin: 0;
}

.account-body .btn,
.account-body button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 11px 16px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
    background: var(--bg-overlay);
    color: var(--fg);
    box-sizing: border-box;
}

.account-body .btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
}

.account-body .btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.account-body .btn-lg { padding: 12px 18px; font-size: 15px; }

.account-body .w-100 { width: 100%; }

.account-body .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Outlined secondary methods (email+password link, passkey) — quieter than
   the filled/white provider buttons. Defined after .btn so they win by
   source order at equal specificity. */
.account-body .btn-method,
.account-body .btn-passkey {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--fg);
    text-decoration: none;
}

.account-body .btn-method { display: block; text-align: center; }

.account-body .btn-method:hover,
.account-body .btn-passkey:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--hover-overlay);
    transform: translateY(-1px);
    text-decoration: none;
}

.account-body a { color: var(--accent); text-decoration: none; }
.account-body a:hover { text-decoration: underline; }

.account-body p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--fg-dim);
}

/* "or" divider between provider buttons and the email/password method. */
.account-body .or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 14px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.account-body .or-divider::before,
.account-body .or-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.account-body .text-danger,
.account-body .validation-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.account-body .alert {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    margin: 0 0 14px;
    border: 1px solid var(--border);
    background: var(--bg-overlay);
    color: var(--fg-dim);
}

.account-body .alert-danger { border-color: var(--danger); color: var(--danger); }
.account-body .alert-success { border-color: var(--success); color: var(--success); }
.account-body .alert-info { border-color: var(--info); color: var(--info); }

.account-body section { display: block; }

.account-body .darker-border-checkbox { border-color: var(--border-strong) !important; }

/* Microsoft's error UI div — light-themed by design; both layouts render it. */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
