/* ============================================================
   Modular brand auth styles
   Shared by the standalone auth Razor Pages: Login, Recover, Reset.
   Brand tokens live here so they do not affect the main app theme.
   ============================================================ */

:root {
    --bl-primary: #2563EB;
    --bl-primary-dark: #1D4ED8;
    --bl-ink: #0F172A;
    --bl-muted: #64748B;
    --bl-border: #E2E8F0;
    --bl-canvas: #F8FAFC;
    --bl-success: #16A34A;
    --bl-danger: #DC2626;
    --bl-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--bl-font);
    color: var(--bl-ink);
    background: var(--bl-canvas);
}

.bl-root {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
    width: 100%;
}

/* ---------- Brand panel ---------- */
.bl-brand {
    position: relative;
    display: flex;
    align-items: center;
    padding: 3rem;
    overflow: hidden;
    background: linear-gradient(150deg, #2563EB 0%, #1D4ED8 55%, #1E40AF 100%);
    color: #fff;
}

.bl-brand::after {
    content: "";
    position: absolute;
    right: -160px;
    top: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(147, 197, 253, 0.25);
    filter: blur(8px);
}

.bl-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin: 0 auto;
}

.bl-brand-mark {
    width: 72px;
    height: 72px;
    padding: 11px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
    margin-bottom: 2rem;
}

.bl-brand-title {
    font-size: 2.6rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.bl-brand-sub {
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 2rem;
    max-width: 380px;
}

.bl-brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bl-brand-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
}

.bl-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ---------- Form panel / card ---------- */
.bl-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.bl-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--bl-border);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    padding: 2.4rem 2.2rem;
    animation: bl-fade-up 0.4s ease-out;
}

@keyframes bl-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.bl-lockup {
    height: 30px;
    margin-bottom: 1.6rem;
}

.bl-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 0.25rem;
    color: var(--bl-ink);
}

.bl-subtitle {
    font-size: 0.95rem;
    color: var(--bl-muted);
    margin: 0 0 1.6rem;
    line-height: 1.45;
}

/* ---------- Fields ---------- */
.bl-field {
    margin-bottom: 1.1rem;
}

.bl-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bl-ink);
    margin-bottom: 0.4rem;
}

.bl-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.bl-input-icon {
    position: absolute;
    left: 11px;
    color: var(--bl-muted);
    font-size: 19px;
    pointer-events: none;
}

.bl-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 40px;
    font-size: 0.95rem;
    color: var(--bl-ink);
    background: #fff;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bl-input::placeholder {
    color: #9aa7b8;
}

.bl-input:focus {
    border-color: var(--bl-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.bl-input-pw {
    padding-right: 44px;
}

.bl-input.input-validation-error {
    border-color: var(--bl-danger);
}

.bl-toggle {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--bl-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bl-toggle:hover {
    background: #f1f5f9;
    color: var(--bl-ink);
}

.bl-toggle .material-icons {
    font-size: 19px;
}

.validation-message,
.field-validation-error {
    display: block;
    font-size: 0.8rem;
    color: var(--bl-danger);
    margin-top: 0.35rem;
}

/* live hint (e.g. passwords match) */
.bl-hint {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    color: var(--bl-muted);
}

.bl-hint.show {
    display: flex;
}

.bl-hint.ok {
    color: var(--bl-success);
}

.bl-hint.bad {
    color: var(--bl-danger);
}

.bl-hint .material-icons {
    font-size: 16px;
}

/* ---------- Buttons ---------- */
.bl-submit {
    position: relative;
    width: 100%;
    height: 48px;
    margin-top: 0.6rem;
    border: none;
    border-radius: 12px;
    background: var(--bl-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, transform 0.05s ease;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.bl-submit:hover {
    background: var(--bl-primary-dark);
}

.bl-submit:active {
    transform: translateY(1px);
}

.bl-submit.btn-loading {
    color: transparent;
    pointer-events: none;
}

.bl-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--bl-border);
    background: #fff;
    color: var(--bl-ink);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bl-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bl-spin 0.8s linear infinite;
}

.bl-submit.btn-loading .spinner {
    display: block;
}

@keyframes bl-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------- Links / misc ---------- */
.bl-forgot {
    text-align: center;
    margin-top: 1.1rem;
}

.bl-forgot a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bl-primary);
    text-decoration: none;
}

.bl-forgot a:hover {
    text-decoration: underline;
}

.bl-backlink {
    text-align: center;
    margin-top: 1.1rem;
}

.bl-backlink a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bl-primary);
    text-decoration: none;
}

.bl-backlink a:hover {
    text-decoration: underline;
}

.bl-backlink .material-icons {
    font-size: 17px;
}

/* ---------- Alerts ---------- */
.bl-alert {
    margin-top: 1.2rem;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bl-alert .material-icons {
    font-size: 18px;
}

.bl-alert.is-danger {
    color: #991B1B;
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

/* ---------- Result states (email sent / done / invalid) ---------- */
.bl-result {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.bl-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 1.25rem;
}

.bl-result-icon .material-icons {
    font-size: 34px;
}

.bl-result-icon.ok {
    background: #DCFCE7;
    color: var(--bl-success);
}

.bl-result-icon.info {
    background: #DBEAFE;
    color: var(--bl-primary);
}

.bl-result-icon.warn {
    background: #FEF3C7;
    color: #B45309;
}

.bl-result-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: var(--bl-ink);
}

.bl-result-text {
    font-size: 0.95rem;
    color: var(--bl-muted);
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

.bl-result-text strong {
    color: var(--bl-ink);
}

/* ---------- Footer ---------- */
.bl-footer {
    margin: 1.6rem 0 0;
    font-size: 0.8rem;
    color: var(--bl-muted);
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .bl-root {
        grid-template-columns: 1fr;
    }

    .bl-brand {
        display: none;
    }
}
