/* The pre-login surfaces (login, register, invitation): the legacy OnixBI
   login layout — frosted card with the wordmark, EU funding banner — in the
   colours and glass of the Figma "OnixBI — Home v0.1" (the design has no login
   frame of its own; this is the Home's page, card and primary button applied
   to it). Scoped under .onix-auth so nothing here leaks into app.css's own
   .login-* classes (the old gateway login is gone; the classes stay for the
   native shell's contract ids). Literals, not tokens: these pages also render
   before any theme choice exists and must not follow the dark theme. */

.onix-auth {
    --auth-bg: radial-gradient(1100px 520px at 50% -200px, rgba(0, 113, 227, 0.06), transparent 70%), #F5F5F7;
    --auth-card: rgba(255, 255, 255, 0.88);
    --auth-ink: #1D1D1F;
    --auth-ink-2: #6E6E73;
    --auth-input-border: #D2D2D7;
    --auth-focus: #0071E3;
    --auth-btn: #0071E3;
    --auth-btn-hover: #0077ED;
    --auth-footer: rgba(66, 66, 69, 0.85);
    --auth-divider: rgba(0, 0, 0, 0.08);

    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-bg);
    padding: 16px;
    font-family: var(--font-text);
    color: var(--auth-ink);
}

.onix-auth * { box-sizing: border-box; }

.onix-auth-container { width: 100%; max-width: 440px; }

.onix-auth-card {
    background: var(--auth-card);
    border-radius: 24px;
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    padding: 40px 32px;
    box-shadow: 0 18px 48px rgba(10, 31, 60, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.onix-auth-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.onix-auth-logo-icon { width: 40px; height: 40px; display: block; border-radius: 12px; }

/* The brand's wordmark (Components/Shared/BrandWordmark.razor): a wide, light-stroked line of capitals — it keeps its
   own air above and below, and shrinks with a narrow card. */
.onix-auth-logo-wordmark { display: block; width: 290px; max-width: 100%; height: auto; margin: 10px 0 12px; }

.onix-auth-logo-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--auth-ink);
}

.onix-auth-subtitle {
    text-align: center;
    color: var(--auth-ink-2);
    font-size: 15px;
    margin: 0 0 16px;
}

.onix-auth-divider { border: none; border-top: 1px solid var(--auth-divider); margin: 12px 0 20px; }

.onix-auth-error {
    background: #FDE7E8;
    border: 1px solid #F9ACB0;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    color: #A9393F;
    font-size: 14px;
}

.onix-auth-ok {
    background: #E4F4EE;
    border: 1px solid rgba(14, 129, 88, 0.30);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    color: #0E8158;
    font-size: 14px;
}

/* "Needs a look" — why the change-password page is holding the person (the
   design's amber: --dnt-amber-tint / --dnt-amber-ink, as literals like the rest). */
.onix-auth-note {
    background: #FBF0DC;
    border: 1px solid rgba(156, 104, 17, 0.30);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    color: #9C6811;
    font-size: 14px;
    line-height: 1.45;
}

.onix-auth-group { margin-bottom: 18px; position: relative; }

/* A line of help under a field (ACC-107: what the person's name is used for). */
.onix-auth-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--auth-ink-3, var(--auth-ink-2));
}

.onix-auth-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-ink-2);
    margin-bottom: 6px;
}

.onix-auth-input-wrap { position: relative; display: flex; align-items: center; }

.onix-auth-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--auth-input-border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: rgba(255, 255, 255, 0.55);
    color: var(--auth-ink);
}

.onix-auth-input:focus { border-color: var(--auth-focus); box-shadow: 0 0 0 3px rgba(0, 87, 210, 0.20); }
.onix-auth-input-wrap .onix-auth-input { padding-right: 44px; }

.onix-auth .toggle-pw {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--auth-ink-2);
    display: flex;
    align-items: center;
}

.onix-auth .toggle-pw:hover { color: var(--auth-ink); }
.onix-auth .toggle-pw .eye-off { display: none; }
.onix-auth .toggle-pw.is-visible .eye { display: none; }
.onix-auth .toggle-pw.is-visible .eye-off { display: block; }

.onix-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 18px;
    font-size: 14px;
    color: var(--auth-ink-2);
    cursor: pointer;
}

/* "Remember me" with "Forgot your password?" beside it (Login.razor); the link wraps under the box on a narrow phone. */
.onix-auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: -4px 0 18px;
}
.onix-auth-options .onix-auth-check { margin: 0; }

.onix-auth-forgot {
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-btn);
    text-decoration: none;
}
.onix-auth-forgot:hover { color: var(--auth-btn-hover); text-decoration: underline; }

.onix-auth-submit {
    width: 100%;
    height: 48px;
    background: var(--auth-btn);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.onix-auth-submit:hover { background: var(--auth-btn-hover); }
.onix-auth-submit:active { transform: scale(0.99); }
/* The same button as a link ("Continue" after a password change). */
a.onix-auth-submit, a.onix-auth-submit:hover { color: #fff; text-decoration: none; }

/* "Continue with Google / Apple" (Components/Shared/ExternalLoginButtons.razor): one white
   button per provider, the brand mark before the text, under an "or" line. */
.onix-auth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--auth-ink-2);
    font-size: 13px;
}
.onix-auth-or::before, .onix-auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--auth-divider); }

.onix-auth-sso-list { display: flex; flex-direction: column; gap: 10px; }
.onix-auth-sso-form { margin: 0; }

.onix-auth-sso {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: var(--auth-ink);
    border: 1px solid var(--auth-input-border);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.onix-auth-sso:hover { background: #F5F5F7; border-color: var(--auth-ink-2); }
.onix-auth-sso:active { transform: scale(0.99); }
.onix-auth-sso svg { flex: none; }

.onix-auth-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-btn);
    text-decoration: none;
}

.onix-auth-link:hover { color: var(--auth-btn-hover); text-decoration: underline; }

.onix-auth-lang {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    margin-top: 18px;
}

.onix-auth-lang-option {
    font-size: 12px;
    line-height: 1.4;
    color: var(--auth-footer);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.onix-auth-lang-option:hover,
.onix-auth-lang-option:focus-visible { color: #0066CC; border-bottom-color: rgba(0, 102, 204, 0.6); }

.onix-auth-lang-option.is-active { color: #0066CC; font-weight: 600; border-bottom-color: #0066CC; }

.onix-auth-footer { text-align: center; margin: 20px 0 0; font-size: 12px; color: var(--auth-footer); }

.onix-auth-eu {
    background: rgba(255, 255, 255, 0.66);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 14px 18px;
    margin-top: 16px;
    box-shadow: 0 8px 24px rgba(10, 31, 60, 0.06);
}

.onix-auth-eu-row { display: flex; align-items: center; justify-content: center; gap: 16px; }

.onix-auth-eu-block { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.onix-auth-eu-block img { width: 40px; height: 40px; flex-shrink: 0; }

.onix-auth-eu-block .onix-auth-eu-label {
    font-size: 9.5px;
    font-weight: 700;
    color: #2C3E50;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.onix-auth-eu-divider { width: 1px; height: 36px; background: #ccc; flex-shrink: 0; }

.onix-auth-eu-text {
    text-align: center;
    font-size: 10.5px;
    line-height: 1.5;
    color: #555;
    margin: 10px 0 0;
}

/* Secondary action inside the card (resend link, decline invitation). */
.onix-auth-alt {
    width: 100%;
    height: 44px;
    margin-top: 10px;
    background: transparent;
    color: var(--auth-btn);
    border: 1.5px solid var(--auth-input-border);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.onix-auth-alt:hover { border-color: var(--auth-btn); }

/* The verified identity, shown on the set-password / invitation card. */
.onix-auth-who {
    text-align: center;
    font-size: 14px;
    color: var(--auth-ink-2);
    margin: 0 0 16px;
}

.onix-auth-who strong { color: var(--auth-ink); }

/* A request for access: the requester's note to the owner, quoted as typed (line breaks kept). */
.onix-auth-note {
    margin: -8px 0 16px;
    padding: 8px 12px;
    border-left: 3px solid var(--auth-btn);
    background: var(--auth-divider);
    border-radius: 6px;
    font-size: 14px;
    color: var(--auth-ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-align: left;
}
.onix-auth-handover strong { color: var(--auth-ink); }
