/* Northstar page CSS. Design values use tokens from design-tokens.css. */

/* Visual rules moved from the page template. Values use design tokens. */
        /* Self-contained auth shell — do not rely on Aethera Tailwind utilities.
           Docker Aethera builds only copy marketing/aethera/, so Jinja auth
           templates are not scanned and classes like max-w-lg are missing on staging. */
        body.auth-page {
            min-height: 100vh;
            min-height: 100dvh;
            display: flex;
            flex-direction: column;
            background-color: var(--color-paper);
            color: var(--color-ink);
        }
        .auth-main {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            padding-top: var(--marketing-navbar-height, 5.0625rem);
        }
        .auth-main-inner {
            box-sizing: border-box;
            width: 100%;
            max-width: 32rem;
            margin-left: auto;
            margin-right: auto;
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            /* Top-aligned, not centred: React swaps in a taller footer after
               first paint, and a centred card jumps when that happens. */
            justify-content: flex-start;
            padding: clamp(2rem, 8vh, 4.5rem) 1rem 2rem;
        }
        @media (min-width: 640px) {
            .auth-main-inner {
                max-width: 36rem;
            }
        }
        .auth-card {
            text-align: center;
            box-shadow:var(--shadow-xl);
            border-radius: var(--radius-lg);
            background: var(--color-bg-surface);
            border: 1px solid var(--color-border);
            padding: 1.5rem;
        }
        @media (min-width: 640px) {
            .auth-card {
                padding: 2rem;
            }
        }
        .auth-title { font-size: clamp(1.75rem, 4vw, 2.2rem); margin-bottom: var(--space-xs); color: var(--color-text-primary); font-family: Figtree, system-ui, sans-serif; font-weight: 400; }
        .auth-subtitle { color: var(--color-text-secondary); margin-bottom: var(--space-md); line-height: var(--leading-relaxed); font-size: 1.05rem; }
        .form-group { margin-bottom: var(--space-sm); text-align: left; }
        .form-label { display: block; font-weight: var(--weight-semibold); margin-bottom: var(--space-xs); color: var(--color-text-primary); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.05em; }
        .form-input { width: 100%; min-height: var(--input-height); padding: var(--space-sm) var(--input-padding-x); border: 1px solid var(--color-gray-300); border-radius: var(--radius-sm); font-size: var(--text-body); font-family: Figtree, system-ui, sans-serif; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
        .form-input:focus { outline: none; border-color: var(--input-border-focus); box-shadow: var(--shadow-focus); }
        .btn-submit { width: 100%; min-height: max(var(--button-height-md), var(--button-height-lg)); height: var(--button-height-lg); padding: 0 var(--space-lg); background-color: var(--color-primary); color: var(--color-text-on-primary); border: 1px solid transparent; border-radius: var(--button-radius); font-size: var(--text-body-lg); font-weight: var(--weight-medium); cursor: pointer; transition: background var(--transition-fast), transform var(--transition-fast); display: flex; align-items: center; justify-content: center; gap: var(--space-xs); margin-top: var(--space-xs); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
        @media (hover: hover) and (pointer: fine) {
            .btn-submit:hover {
                background-color: var(--color-primary-dark);
                transform: translateY(-1px);
                text-decoration: underline;
                text-decoration-color: var(--color-secondary);
                text-decoration-thickness: 2px;
                text-underline-offset: 2px;
            }
        }
        .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
        .error-message { background-color: var(--color-error-bg); color: var(--color-error-fg); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-xs); margin-bottom: var(--space-sm); font-size: var(--text-sm); display: none; text-align: left; }
        .success-message { background-color: var(--color-success-bg); color: var(--color-success-fg); padding: var(--space-sm); border-radius: var(--radius-xs); margin: var(--space-xs) 0 var(--space-sm); font-size: var(--text-sm); text-align: left; line-height: var(--leading-relaxed); display: none; }
        .hint { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2xs); }
        .links-section { margin-top: var(--space-md); padding-top: var(--space-sm); border-top: 1px solid var(--color-border); font-size: var(--text-sm); color: var(--color-text-secondary); }
        .links-section a { color: var(--color-primary); font-weight: var(--weight-semibold); text-decoration: none; }
        .links-section a:hover { text-decoration: underline; }
        .password-match-msg { font-size: var(--text-sm); margin-top: var(--space-2xs); display: none; }
        .password-match-msg.error { color: var(--color-error-fg); display: block; }
        .password-match-msg.success { color: var(--color-success-fg); display: block; }
        .form-input.input-error { border-color: var(--color-error); }
        .form-input.input-success { border-color: var(--color-success); }
        .spinner { width: var(--text-h4); height: var(--text-h4); border: 2px solid color-mix(in srgb, var(--color-paper) 30%, transparent); border-top: 2px solid var(--color-paper); border-radius: 50%; animation: auth-spin 1s linear infinite; display: inline-block; }
        @keyframes auth-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        .status-icon { font-size: var(--avatar-size-lg); line-height: 1; margin-bottom: var(--text-xs); }
        .status-icon.success { color: var(--color-success); }
        .status-icon.error { color: var(--color-error); }
        .status-icon.pending { color: var(--color-primary); }
        /* Hide orphan patient-portal chrome that can bleed in via bfcache
           when navigating from /patient/* or /enhanced-diagnostic to auth. */
        body.auth-page .patient-portal-shell,
        body.auth-page .sidebar,
        body.auth-page #consultDrawer,
        body.auth-page #consultDrawerBackdrop,
        body.auth-page .consult-drawer,
        body.auth-page .consult-drawer__backdrop,
        body.auth-page #parkedPhoneModal,
        body.auth-page #parkedPhoneBanner {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

.auth-register-link { margin-top: var(--radius-sm); }
.auth-mfa-input,
#mfa_code {
    text-align: center;
    letter-spacing: 0.3em;
    font-size: var(--text-body-lg);
}
.auth-page .hidden { display: none; }

.consent-panel--analytics label {
    flex: 1;
    font-size: 11px;
    color: var(--color-ink);
    line-height: var(--leading-snug);
    cursor: pointer;
}
