/* Standalone layout for sign-in / account pages (Areas/Identity/Pages/_AuthLayout.cshtml) */
:root {
    --navy: #10233f;
    --navy-dark: #0b1b31;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --teal: #0f8a7a;
    --page-bg: #f5f7fb;
    --card: #ffffff;
    --text: #101827;
    --muted: #718096;
    --line: #e1e7ef;
    --red: #ef4444;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

.auth-body {
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background-color: var(--navy-dark);
    background-image:
        radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, .45), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(15, 138, 122, .40), transparent 40%),
        linear-gradient(160deg, var(--navy), var(--navy-dark));
    background-size: 22px 22px, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
}

/* ---------- Centered column ---------- */
.auth-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px 16px;
}

.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: #fff; font-size: 18px;
    box-shadow: 0 6px 20px rgba(37, 99, 235, .35);
}
.auth-brand .brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.auth-brand strong { font-size: 20px; color: #fff; }
.auth-brand small { color: rgba(233, 238, 246, .7); font-size: 12px; }

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    padding: 32px 30px;
}

.auth-copyright { font-size: 12px; color: rgba(233, 238, 246, .5); }

/* ---------- Card content ---------- */
.auth-card-header { margin-bottom: 22px; text-align: center; }
.auth-card-header h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.auth-card-header p { color: var(--muted); margin: 0; }

.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-card a { color: var(--primary); font-weight: 500; text-decoration: none; }
.auth-card a:hover { color: var(--primary-hover); text-decoration: underline; }
.auth-label-row a { font-size: 13px; }

.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > i { position: absolute; left: 14px; color: var(--muted); font-size: 14px; pointer-events: none; }
.auth-input input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-input input::placeholder { color: #a0aec0; }
.auth-input input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.auth-input input.input-validation-error { border-color: var(--red); }

.auth-toggle-password {
    position: absolute; right: 6px;
    width: 34px; height: 34px;
    border: 0; border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.auth-toggle-password:hover { background: var(--page-bg); color: var(--text); }

.auth-field-error { display: block; color: var(--red); font-size: 12px; margin-top: 5px; }
.auth-field-error:empty { display: none; }

.auth-alert {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 13px;
}
.auth-alert.validation-summary-valid { display: none; }
.auth-alert ul { margin: 0; padding-left: 0; list-style: none; }

.auth-success {
    display: flex; gap: 12px; align-items: flex-start;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
}
.auth-success i { margin-top: 2px; }

.auth-remember { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.auth-remember .form-check-input { margin: 0; cursor: pointer; }
.auth-remember label { color: #4a5568; cursor: pointer; }

.auth-submit {
    width: 100%;
    height: 46px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: 0; border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 600; font-size: 15px;
    cursor: pointer;
    transition: background .15s ease;
}
.auth-submit:hover { background: var(--primary-hover); }
.auth-submit:disabled { opacity: .75; cursor: wait; }
.auth-submit:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-external { display: grid; gap: 10px; }
.auth-external-btn {
    height: 42px;
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; font-weight: 600; cursor: pointer;
}
.auth-external-btn:hover { background: var(--page-bg); }

.auth-card-footer {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
}
.auth-back { display: inline-flex; align-items: center; gap: 8px; }

/* Other scaffolded Identity pages rendered inside the card */
.auth-card h1 { font-size: 20px; font-weight: 700; }
.auth-card .col-md-4, .auth-card .col-md-6 { width: 100%; max-width: 100%; flex: 0 0 100%; margin-left: 0; }

@media (max-width: 480px) {
    .auth-main { justify-content: flex-start; padding-top: 40px; }
    .auth-card { padding: 26px 20px; }
}
