/* Styles for the NEW screens only (login, account/MFA, toasts, banned IPs, load-more).
   Your existing app.css keeps styling the catalog, tables and modals. Uses CSS variables with fallbacks. */

#boot-splash { padding: 3rem 1rem; text-align: center; color: #6b7280; font-family: system-ui, sans-serif; }
#app:not(:empty) + #boot-splash { display: none; }

/* ---------- auth screens ---------- */
.login-container {
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}
.auth-card, .ban-card {
    width: 100%; max-width: 420px; background: #fff; color: #111827;
    border-radius: 14px; padding: 1.75rem; box-shadow: 0 20px 40px rgba(0,0,0,.25);
}
.auth-card h2, .ban-card h2 { font-size: 1.35rem; margin-bottom: .25rem; }
.auth-card .subtitle { color: #6b7280; font-size: .9rem; margin-bottom: 1.25rem; }
.ban-card { border-top: 6px solid #b91c1c; text-align: center; }
.ban-card .ban-icon { font-size: 2.5rem; line-height: 1; margin-bottom: .5rem; }
/* 16px inputs stop iOS Safari from zooming the page on focus */
.auth-card input.form-control, .account-container input.form-control, .account-container textarea.form-control { font-size: 16px; }
.otp-input { letter-spacing: .5em; text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 1.5rem !important; }

/* ---------- account / MFA ---------- */
.account-container { max-width: 1000px; margin: 0 auto; }
.qr-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: .75rem; display: inline-block; line-height: 0; }
.qr-box img { width: 220px; height: 220px; max-width: 100%; image-rendering: pixelated; }
.secret-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; word-break: break-all; user-select: all; }
.temp-password { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; letter-spacing: .06em; user-select: all; }

/* ---------- shared bits ---------- */
.status-banner { position: relative; padding: .75rem 2.5rem .75rem 1rem; border-radius: 8px; margin: .75rem 0; font-size: .9rem; }
.status-banner.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-banner.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.status-banner.warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.status-banner .dismiss { position: absolute; right: .5rem; top: .35rem; background: none; border: 0; font-size: 1.25rem; line-height: 1; cursor: pointer; color: inherit; }
.load-more-wrap { text-align: center; padding: 1rem 0; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.field-error { color: #b91c1c; font-size: .8rem; margin-top: .2rem; }
.modal-dialog.scrollable .modal-body { max-height: 70vh; max-height: 70dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nav-user { font-size: .8rem; color: #c7d2fe; padding: .5rem 1rem; }
.logout-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: .25rem .5rem; }
.validation-message { color: #b91c1c; font-size: .8rem; }
.invalid { outline: 1px solid #b91c1c; }

/* ---- Navigation menu collapse (works with or without the template's NavMenu.razor.css) ---- */
.navbar-toggler { cursor: pointer; border-color: rgba(255,255,255,.4); }
@media (max-width: 640.98px) {
    .nav-scrollable.collapse:not(.show) { display: none; }
    .nav-scrollable.collapse.show { display: block; }
}
@media (min-width: 641px) {
    .navbar-toggler { display: none; }
    .nav-scrollable.collapse { display: block; }
}

/* ---- Modal dialogs: make every field and button clickable ----
   Bootstrap 5 sets pointer-events:none on .modal-dialog and gives .modal-backdrop opacity .5 / a fixed z-index.
   These modals use .modal-backdrop as the overlay and .modal-dialog as the panel, so restore interaction here. */
.modal-backdrop {
    position: fixed; inset: 0;
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    width: 100vw; height: 100vh; height: 100dvh;
    padding: 1rem;
    background: rgba(0, 0, 0, .5);
    opacity: 1;                       /* Bootstrap's .5 would also fade the dialog */
    overflow-y: auto;
    pointer-events: auto;
}
.modal-backdrop .modal-dialog {
    position: relative; z-index: 1;
    pointer-events: auto;             /* the actual fix: Bootstrap sets none */
    width: 100%; max-width: 560px;
    margin: auto;
    max-height: calc(100dvh - 2rem);
    display: flex; flex-direction: column;
    background: #fff; color: #212529;
    border-radius: .75rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .35);
    overflow: hidden;
}
.modal-backdrop .modal-header,
.modal-backdrop .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .9rem 1.1rem; flex: 0 0 auto; }
.modal-backdrop .modal-header { border-bottom: 1px solid rgba(0, 0, 0, .1); }
.modal-backdrop .modal-footer { border-top: 1px solid rgba(0, 0, 0, .1); justify-content: flex-end; }
.modal-backdrop .modal-body { padding: 1.1rem; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; }
.modal-backdrop .close-btn { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .25rem .5rem; color: inherit; }
.modal-backdrop .close-btn:disabled { opacity: .4; cursor: default; }
.modal-backdrop button, .modal-backdrop input, .modal-backdrop select, .modal-backdrop textarea, .modal-backdrop a { pointer-events: auto; }
