﻿/* ============================================================
   Login / Register — ik- design system extension
   Shared by Areas/Identity/Pages/Account/Login.cshtml and Register.cshtml
   Prefix: ik-auth-
   Reuses ik-* tokens/vars and the shared .ik-field / .ik-form-error /
   .ik-req / .ik-btn-cta components from public.css; only the pieces that
   differ from the boxed Contact-style form (split card, single-column
   fields, non-pill submit button) live here.
   ============================================================ */

/* ---------- outer section ----------
   Was a forest strip hard-stopped at 84px, meant to sit behind the fixed header.
   It never could: 84px is the height of the header in its TRANSPARENT state
   (padding 13px), while login and register ship .is-solid from the server, where
   the padding drops to 9px and the header is 68px. So the band overshot by exactly
   16px and painted a dark green line under the nav on both pages.
   Removed rather than corrected to 68px: .is-solid is an opaque white bar, so a
   strip tucked behind it is invisible by construction — the only thing it could
   ever render was the bug. Flat cream also drops a hardcoded copy of the header's
   height, which is what let the two drift apart in the first place. */
.ik-auth-section {
    background: var(--ik-cream);
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(104px, 13vh, 150px) clamp(16px, 4vw, 40px) clamp(44px, 6vw, 76px);
}

/* ---------- split card ---------- */
.ik-auth-card {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--ik-border-soft);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 34px 80px -44px rgba(80, 55, 20, .65);
}

/* ---------- left panel (brand / benefits) ---------- */
.ik-auth-side {
    position: relative;
    flex: 1 1 340px;
    min-width: 290px;
    background: radial-gradient(130% 130% at 25% 0%, var(--ik-forest-2), var(--ik-forest));
    padding: clamp(30px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}
.ik-auth-side-copy h2 {
    font-family: var(--ik-display);
    font-weight: 600;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.12;
    color: var(--ik-cream-text);
    margin: 0 0 10px;
}
.ik-auth-side-copy p {
    font-family: var(--ik-body);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.55;
    color: #bfd6cb;
    margin: 0;
}
.ik-auth-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.ik-auth-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ik-body);
    font-weight: 600;
    font-size: 14.5px;
    color: #DCE9F5;
}
.ik-auth-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(9, 127, 171, .35);
    display: grid;
    place-items: center;
    flex: none;
}
.ik-auth-side-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 10px;
    background: linear-gradient(180deg, #e6b97f 0%, #c98a4b 45%, #a86a30 100%);
}

/* ---------- right panel (form) ---------- */
.ik-auth-main {
    flex: 1 1 380px;
    min-width: 300px;
    padding: clamp(28px, 4vw, 46px);
}
.ik-auth-h1 {
    font-family: var(--ik-display);
    font-weight: 600;
    font-size: clamp(24px, 3.2vw, 30px);
    color: var(--ik-ink);
    margin: 0 0 6px;
}
.ik-auth-lead {
    font-family: var(--ik-body);
    font-weight: 500;
    font-size: 14.5px;
    color: var(--ik-gray);
    margin: 0 0 24px;
}

/* ---------- form fields (reuses .ik-field / .ik-req / .ik-form-error) ---------- */
.ik-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ik-auth-form label {
    font-family: var(--ik-display);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--ik-ink);
}
.ik-auth-form input {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid var(--ik-border);
    border-radius: 12px;
    font-family: var(--ik-body);
    font-size: 15px;
    color: var(--ik-ink);
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ik-auth-form input:focus {
    border-color: var(--ik-green);
    box-shadow: 0 0 0 4px var(--ik-mint-bg);
}
.ik-auth-form input[aria-invalid="true"] { border-color: var(--ik-coral); }
.ik-auth-form input[aria-invalid="true"]:focus {
    border-color: var(--ik-coral);
    box-shadow: 0 0 0 4px rgba(216, 58, 63, .12);
}
.ik-auth-form .ik-form-error { font-size: 12.5px; }
/* Requirement hint under the password box; hidden once an error takes over
   so the two never stack. */
.ik-auth-hint {
    font-size: 12px;
    color: var(--ik-gray);
    font-weight: 500;
}
.ik-auth-hint:has(+ .field-validation-error) { display: none; }

.ik-auth-pwwrap { position: relative; }
.ik-auth-pwwrap input { padding-right: 46px; }
.ik-auth-pwtoggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--ik-gray);
    display: grid;
    place-items: center;
    transition: color .15s ease;
}
.ik-auth-pwtoggle:hover { color: var(--ik-green); }

/* ---------- remember me / forgot password row ---------- */
.ik-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.ik-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--ik-body);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--ik-muted);
}
.ik-auth-remember input { width: 16px; height: 16px; accent-color: var(--ik-green); }
.ik-auth-link {
    font-family: var(--ik-display);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--ik-green-deep);
    text-decoration: none;
}
.ik-auth-link:hover { text-decoration: underline; }

/* ---------- submit (reuses .ik-btn-cta base + geometry override) ---------- */
.ik-auth-submit.ik-btn-cta {
    margin-top: 4px;
    width: 100%;
    font-size: 17px;
    padding: 15px;
    border-radius: 13px;
    box-shadow: 0 14px 30px -12px rgba(34, 187, 244, .8);
}
.ik-auth-submit.ik-btn-cta:hover { box-shadow: 0 16px 34px -12px rgba(10, 110, 147, .55); }

/* ---------- divider ---------- */
.ik-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
}
.ik-auth-divider span:first-child,
.ik-auth-divider span:last-child {
    flex: 1;
    height: 1px;
    background: #ece2d0;
}
.ik-auth-divider span:not(:first-child):not(:last-child) {
    font-family: var(--ik-body);
    font-weight: 700;
    font-size: 12px;
    color: var(--ik-gray);
    white-space: nowrap;
}

/* ---------- secondary (outline) button / external-login buttons ---------- */
.ik-auth-external { display: flex; flex-direction: column; gap: 12px; }
.ik-auth-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    font-family: var(--ik-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--ik-ink);
    background: #fff;
    border: 1.5px solid var(--ik-border);
    border-radius: 13px;
    padding: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease;
}
.ik-auth-btn-secondary:hover { border-color: var(--ik-green); transform: translateY(-1px); color: var(--ik-ink); }

/* ---------- terms / SMS consent checkboxes (Register only) ---------- */
.ik-auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}
.ik-auth-consent input {
    width: 17px;
    height: 17px;
    accent-color: var(--ik-green);
    margin-top: 2px;
    flex: none;
}
.ik-auth-consent span {
    font-family: var(--ik-body);
    font-weight: 600;
    font-size: 13px;
    color: var(--ik-muted);
    line-height: 1.4;
}
.ik-auth-consent--sms span { font-weight: 500; font-size: 12px; }
.ik-auth-consent a { color: var(--ik-green-deep); font-weight: 700; text-decoration: none; }
.ik-auth-consent a:hover { text-decoration: underline; }
.ik-auth-form .ik-form-error--consent { margin-top: -8px; }

/* ---------- single-column variant (utility auth pages) ----------
   ForgotPassword / RegisterConfirmation have no benefits to sell, so they drop the
   dark side panel and centre a narrower card. */
.ik-auth-card--solo { max-width: 480px; }
.ik-auth-card--solo .ik-auth-main { flex: 1 1 100%; text-align: center; }
.ik-auth-card--solo .ik-auth-form { text-align: left; }
.ik-auth-card--solo .ik-auth-lead { margin-bottom: 22px; }
.ik-auth-card--solo .ik-auth-btn-secondary { margin-top: 0; }

.ik-auth-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    background: var(--ik-mint-bg);
    color: var(--ik-green-deep);
}
.ik-auth-icon--ok { background: var(--ik-mint-bg); color: var(--ik-green-deep); }
/* Dead-end states: an expired reset link, a confirmation that didn't take. */
.ik-auth-icon--bad { background: rgba(255, 105, 105, .14); color: var(--ik-red); }

.ik-auth-strong { color: var(--ik-ink); font-weight: 700; overflow-wrap: anywhere; }

.ik-auth-note {
    background: var(--ik-cream);
    border: 1px solid var(--ik-border);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 0 0 18px;
}
.ik-auth-note p {
    margin: 0;
    font-family: var(--ik-body);
    font-weight: 500;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ik-muted);
}

.ik-auth-fineprint {
    margin: 10px 0 0;
    min-height: 18px;
    font-family: var(--ik-body);
    font-weight: 600;
    font-size: 12.5px;
    color: var(--ik-green-deep);
}
.ik-auth-card--solo #resend-btn { min-height: 46px; }
