/* Sign-in pages (templates/base_auth.html): login, password reset, sign-out, error pages.
   Uses the console tokens and components from console.css (--c-*, .c-btn, .c-alert, .c-field-label);
   on the investor domain investor.css adds the investor brand mark and wash. */

.a-body {
    margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    background: var(--c-bg); color: var(--c-ink-2);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.a-body a { color: var(--c-brand-ink); font-weight: 600; text-decoration: none; }
.a-body a:hover { text-decoration: underline; text-underline-offset: 2px; }
.a-body a:focus-visible, .a-icon-btn:focus-visible { outline: none; border-radius: 0.375rem; box-shadow: 0 0 0 3px var(--c-ring); }

/* Header: brand mark on the left, theme toggle on the right. */
.a-top {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: 100%; max-width: 72rem; margin: 0 auto; padding: 1rem; box-sizing: border-box;
}
@media (min-width: 768px) { .a-top { padding: 1.5rem 2rem; } }
.a-brand { display: inline-flex; align-items: center; gap: 0.625rem; min-width: 0; color: var(--c-ink) !important; text-decoration: none !important; }
.a-brand img { width: 2.125rem; height: 2.125rem; flex: none; border-radius: 0.75rem; object-fit: contain; }
.a-brand-name { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em; }
.a-brand-tag {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11rem;
    padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--c-brand-ink); background: var(--c-brand-soft);
}
.a-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.25rem; height: 2.25rem;
    border-radius: 0.75rem; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-3); cursor: pointer;
}
.a-icon-btn:hover { color: var(--c-ink); background: var(--c-surface-3); }
.a-icon-btn svg { width: 1.125rem; height: 1.125rem; }
.a-icon-btn .hidden { display: none; }

/* Card */
.a-main {
    position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 0.5rem 1rem 2.5rem; box-sizing: border-box;
}
.a-card {
    width: 100%; max-width: 26rem; box-sizing: border-box; padding: 1.5rem 1.25rem;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--c-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 40px -24px rgba(15, 23, 42, 0.28);
}
.dark .a-card { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 18px 40px -24px rgba(0, 0, 0, 0.8); }
@media (min-width: 480px) { .a-card { padding: 2rem; } }
.a-card-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1rem;
    border-radius: 0.875rem; color: var(--c-brand-ink); background: var(--c-brand-soft);
}
.a-card-icon svg { width: 1.375rem; height: 1.375rem; }
.a-card-icon.is-bad { color: var(--c-bad); background: var(--c-bad-soft); }
.a-card-icon.is-good { color: var(--c-good); background: var(--c-good-soft); }
.a-head { margin-bottom: 1.5rem; }
.a-title { margin: 0; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; color: var(--c-ink); line-height: 1.25; }
.a-sub, .a-text { margin: 0.375rem 0 0; font-size: 0.875rem; line-height: 1.55; color: var(--c-ink-3); }
.a-text { margin: 0 0 1rem; }
.a-text strong { color: var(--c-ink-2); }
.a-h2 { margin: 1.25rem 0 0.5rem; font-size: 0.875rem; font-weight: 700; color: var(--c-ink); }
.a-hr { margin: 1.5rem 0; border: 0; border-top: 1px solid var(--c-line); }

/* Alerts: .c-alert from console.css, stacked and wrapping. */
.a-alerts { margin: 0 0 1.25rem; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.a-alerts .c-alert, .a-card .c-alert { margin: 0; align-items: flex-start; line-height: 1.45; overflow-wrap: anywhere; }
.c-alert-info { color: var(--c-brand-ink); background: var(--c-brand-soft); border-color: color-mix(in srgb, var(--c-brand) 22%, transparent); }
.a-card .c-alert ul { margin: 0; padding: 0; list-style: none; }

/* Form */
.a-form { display: grid; gap: 1.125rem; margin: 0; }
.a-field { display: grid; gap: 0.375rem; min-width: 0; }
.a-field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.a-field-row a { font-size: 0.75rem; }
.a-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.a-field select, .a-field textarea {
    width: 100%; box-sizing: border-box; height: 2.75rem; padding: 0 0.875rem; margin: 0;
    border-radius: var(--c-radius-sm); border: 1px solid var(--c-line-strong); background: var(--c-surface-2);
    font: inherit; font-size: 16px; color: var(--c-ink); outline: none; color-scheme: light;
    transition: border-color 0.12s, box-shadow 0.12s, background-color 0.12s;
}
.a-field textarea { height: auto; min-height: 6rem; padding: 0.625rem 0.875rem; }
.dark .a-field input, .dark .a-field select, .dark .a-field textarea { color-scheme: dark; }
@media (min-width: 640px) { .a-field input:not([type="checkbox"]):not([type="radio"]), .a-field select, .a-field textarea { font-size: 0.875rem; } }
.a-field input::placeholder { color: var(--c-ink-3); opacity: 0.6; }
.a-field input:focus, .a-field select:focus, .a-field textarea:focus {
    border-color: var(--c-brand); background: var(--c-surface); box-shadow: 0 0 0 3px var(--c-ring);
}
.a-field.has-error input:not([type="checkbox"]) { border-color: var(--c-bad); }
.a-error { margin: 0; font-size: 0.75rem; font-weight: 600; color: var(--c-bad); }
.a-help { margin: 0; font-size: 0.75rem; line-height: 1.5; color: var(--c-ink-3); }
.a-help ul { margin: 0; padding-left: 1.1rem; }
.a-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--c-ink-2); cursor: pointer; }
.a-check input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--c-brand); }
.a-actions { display: grid; gap: 0.625rem; margin-top: 0.25rem; }
.a-actions .c-btn { width: 100%; height: 2.75rem; font-size: 0.875rem; box-sizing: border-box; }
.a-actions .c-btn svg { width: 1rem; height: 1rem; }
.a-body a.c-btn-primary { color: var(--c-on-brand); }
.a-body a.c-btn { text-decoration: none; }

.a-links { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--c-line); font-size: 0.8125rem; color: var(--c-ink-3); text-align: center; }
.a-foot { position: relative; z-index: 1; padding: 0 1rem 1.5rem; text-align: center; font-size: 0.75rem; color: var(--c-ink-3); }

/* Investor domain: investor.css's wash sits behind the header. */
.a-body .inv-wash { position: fixed; }
