/* ==========================================================================
   Lync authentication pages (Login, Register, Forgot password)
   Everything is scoped under body.auth-page, so no other page is affected.
   Palette is built around the logo blue (#2A9BDB) and the site navy.
   ========================================================================== */

body.auth-page {
    --auth-navy: #0b1f3a;
    --auth-navy-2: #12305a;
    --auth-ink: #1d2939;
    --auth-text: #475467;
    --auth-muted: #667085;
    --auth-line: #d9e0ea;
    --auth-bg: #f5f8fc;
    --auth-blue: #2a9bdb;
    --auth-blue-600: #1d84c4;
    --auth-blue-700: #176aa0;
    --auth-indigo: #4361ee;
    --auth-cyan: #2fd2e0;
    --auth-amber: #ffb547;
    --auth-danger: #d92d20;
    --auth-danger-bg: #fef3f2;
    --auth-success: #079455;
    --auth-radius: 12px;
    --auth-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px -12px rgba(16, 24, 40, .18);
    margin: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

    body.auth-page *, body.auth-page *::before, body.auth-page *::after {
        box-sizing: border-box;
    }

    body.auth-page a {
        color: var(--auth-blue-600);
        text-decoration: none;
        font-weight: 600;
    }

        body.auth-page a:hover {
            color: var(--auth-blue-700);
            text-decoration: underline;
        }

    body.auth-page :focus-visible {
        outline: 3px solid rgba(42, 155, 219, .45);
        outline-offset: 2px;
    }

/* ---------- Shell: form panel + brand showcase ---------- */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: minmax(480px, 46%) 1fr;
    }
}

.auth-main {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 32px;
    background: #fff;
}

/* Mobile / tablet: soft brand gradient behind a floating card */
@media (max-width: 991.98px) {
    .auth-main {
        background:
            radial-gradient(1200px 380px at 50% -120px, rgba(42, 155, 219, .28), transparent 70%),
            radial-gradient(600px 300px at 100% 0, rgba(67, 97, 238, .14), transparent 70%),
            var(--auth-bg);
    }
}

@media (min-width: 576px) {
    .auth-main {
        padding: 32px 32px 40px;
    }
}

@media (min-width: 992px) {
    .auth-main {
        padding: 40px clamp(40px, 6vw, 96px);
    }
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-logo img {
    display: block;
    height: 36px;
    width: auto;
}

.auth-topbar-link {
    font-size: 14px;
    color: var(--auth-muted);
}

.auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 0;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    animation: auth-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}

@media (max-width: 991.98px) {
    .auth-card {
        background: #fff;
        border: 1px solid rgba(217, 224, 234, .8);
        border-radius: 18px;
        box-shadow: var(--auth-shadow);
        padding: 28px 20px;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .auth-card {
        padding: 36px 36px;
    }
}

.auth-footer {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    font-size: 12.5px;
    color: var(--auth-muted);
    text-align: center;
}

    .auth-footer a {
        color: var(--auth-text);
        font-weight: 500;
        text-decoration: underline;
    }

/* ---------- Headings ---------- */
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(42, 155, 219, .1);
    color: var(--auth-blue-700);
    font-size: 12.5px;
    font-weight: 600;
}

.auth-title {
    margin: 0 0 6px;
    color: var(--auth-ink);
    font-size: clamp(26px, 3.2vw, 32px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 0 0 24px;
    color: var(--auth-muted);
}

/* ---------- Log in / Sign up switch ---------- */
.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 28px;
    border-radius: 12px;
    background: #eef2f7;
}

    .auth-switch a {
        padding: 9px 12px;
        border-radius: 9px;
        color: var(--auth-muted);
        font-size: 14px;
        text-align: center;
        transition: background .2s, color .2s, box-shadow .2s;
    }

        .auth-switch a:hover {
            color: var(--auth-ink);
            text-decoration: none;
        }

        .auth-switch a[aria-current="page"] {
            background: #fff;
            color: var(--auth-ink);
            box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
        }

/* ---------- Social buttons ---------- */
.auth-social {
    display: grid;
    gap: 10px;
}

.auth-btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background: #fff;
    color: var(--auth-ink) !important;
    font-weight: 600;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

    .auth-btn-social:hover {
        border-color: #b9c6d8;
        box-shadow: 0 4px 14px -6px rgba(16, 24, 40, .2);
        transform: translateY(-1px);
        text-decoration: none !important;
    }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--auth-muted);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

    .auth-divider::before, .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--auth-line);
    }

/* ---------- Fields ---------- */
.auth-field {
    margin-bottom: 18px;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.auth-label {
    display: block;
    margin-bottom: 6px;
    color: var(--auth-ink);
    font-size: 14px;
    font-weight: 600;
}

.auth-label-row a {
    font-size: 13px;
}

.auth-input-wrap {
    position: relative;
}

    .auth-input-wrap > .auth-input-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #98a2b3;
        font-size: 18px;
        pointer-events: none;
        transition: color .2s;
    }

.auth-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 10px 14px 10px 44px;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background: #fff;
    color: var(--auth-ink);
    font: inherit;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}

    .auth-input::placeholder {
        color: #98a2b3;
    }

    .auth-input:hover {
        border-color: #b9c6d8;
    }

    .auth-input:focus,
    body.auth-page .auth-input:focus-visible {
        outline: none;
        border-color: var(--auth-blue);
        box-shadow: 0 0 0 4px rgba(42, 155, 219, .16);
    }

.auth-input-wrap:focus-within > .auth-input-icon {
    color: var(--auth-blue);
}

.auth-input.has-toggle {
    padding-right: 48px;
}

/* Error state (classes added by ASP.NET Core / jQuery unobtrusive validation) */
.auth-input.input-validation-error {
    border-color: var(--auth-danger);
    background: #fffbfa;
}

    .auth-input.input-validation-error:focus {
        box-shadow: 0 0 0 4px rgba(217, 45, 32, .14);
    }

.auth-input-wrap:has(.input-validation-error) > .auth-input-icon {
    color: var(--auth-danger);
}

.auth-error {
    display: block;
    margin-top: 6px;
    color: var(--auth-danger);
    font-size: 13px;
    font-weight: 500;
}

    .auth-error:empty {
        display: none;
    }

    .auth-error.field-validation-error::before {
        content: "\eca0"; /* remixicon error-warning-fill */
        font-family: remixicon;
        margin-right: 4px;
        vertical-align: -1px;
    }

.auth-hint {
    margin-top: 6px;
    color: var(--auth-muted);
    font-size: 12.5px;
}

.auth-caps {
    display: none;
    margin-top: 6px;
    color: #b54708;
    font-size: 12.5px;
    font-weight: 500;
}

    .auth-caps.show {
        display: block;
    }

/* Show / hide password */
.auth-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #98a2b3;
    font-size: 18px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

    .auth-toggle:hover {
        background: #f2f4f7;
        color: var(--auth-ink);
    }

/* Password strength */
.auth-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 8px;
}

    .auth-strength span {
        height: 4px;
        border-radius: 4px;
        background: #e4e7ec;
        transition: background .3s;
    }

.auth-strength-text {
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 12.5px;
}

.auth-strength[data-level="1"] span:nth-child(-n+1) { background: var(--auth-danger); }
.auth-strength[data-level="2"] span:nth-child(-n+2) { background: var(--auth-amber); }
.auth-strength[data-level="3"] span:nth-child(-n+3) { background: var(--auth-blue); }
.auth-strength[data-level="4"] span:nth-child(-n+4) { background: var(--auth-success); }

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

    .auth-check input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--auth-blue);
        cursor: pointer;
    }

/* ---------- Alerts (validation summary, server messages) ---------- */
.auth-alert {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid #fecdca;
    border-radius: var(--auth-radius);
    background: var(--auth-danger-bg);
    color: #b42318;
    font-size: 14px;
    animation: auth-shake .4s ease;
}

    .auth-alert i {
        font-size: 18px;
        line-height: 1.2;
    }

    .auth-alert ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    /* Empty validation summary renders nothing */
    .auth-alert.validation-summary-valid {
        display: none;
    }

.auth-alert-info {
    border-color: #b2ddff;
    background: #eff8ff;
    color: #175cd3;
    animation: none;
}

.auth-promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px dashed rgba(7, 148, 85, .5);
    border-radius: var(--auth-radius);
    background: #ecfdf3;
    color: #05603a;
    font-size: 14px;
}

    .auth-promo a {
        display: inline-grid;
        place-items: center;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        color: #05603a;
    }

        .auth-promo a:hover {
            background: rgba(7, 148, 85, .12);
            text-decoration: none;
        }

/* ---------- Primary button with loading state ---------- */
.auth-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--auth-radius);
    background: linear-gradient(135deg, var(--auth-blue) 0%, var(--auth-indigo) 100%);
    background-size: 160% 160%;
    background-position: 0 0;
    color: #fff;
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(42, 155, 219, .7);
    transition: background-position .4s, transform .2s, box-shadow .2s, opacity .2s;
}

    .auth-btn:hover {
        background-position: 100% 100%;
        transform: translateY(-1px);
        box-shadow: 0 12px 24px -10px rgba(67, 97, 238, .75);
    }

    .auth-btn:active {
        transform: translateY(0);
    }

/* Buttons rendered as links keep button colours (beat the generic link rules) */
body.auth-page a.auth-btn,
body.auth-page a.auth-btn:hover {
    color: #fff;
    text-decoration: none;
}

    .auth-btn[disabled] {
        cursor: progress;
        opacity: .85;
        transform: none;
    }

    .auth-btn .auth-spinner {
        display: none;
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, .45);
        border-top-color: #fff;
        border-radius: 50%;
        animation: auth-spin .7s linear infinite;
    }

    .auth-btn.is-loading .auth-spinner {
        display: inline-block;
    }

    .auth-btn.is-loading .auth-btn-icon {
        display: none;
    }

.auth-btn-secondary {
    background: #fff;
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
    box-shadow: none;
}

    .auth-btn-secondary:hover {
        background: #f9fafb;
        box-shadow: none;
    }

.auth-alt {
    margin-top: 22px;
    color: var(--auth-muted);
    font-size: 14px;
    text-align: center;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Success / info illustration on the confirmation screen */
.auth-badge-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(42, 155, 219, .15), rgba(67, 97, 238, .15));
    color: var(--auth-blue-600);
    font-size: 30px;
}

/* ---------- Brand showcase (desktop) ---------- */
.auth-showcase {
    position: relative;
    display: none;
    overflow: hidden;
    padding: clamp(40px, 5vw, 72px);
    background: linear-gradient(150deg, var(--auth-navy) 0%, var(--auth-navy-2) 42%, #1a5f9e 78%, var(--auth-blue) 100%);
    color: #fff;
}

@media (min-width: 992px) {
    .auth-showcase {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    animation: auth-float 14s ease-in-out infinite alternate;
    pointer-events: none;
}

.auth-blob-1 {
    width: 380px;
    height: 380px;
    top: -120px;
    right: -80px;
    background: var(--auth-cyan);
}

.auth-blob-2 {
    width: 420px;
    height: 420px;
    bottom: -160px;
    left: -120px;
    background: var(--auth-indigo);
    animation-delay: -6s;
}

.auth-grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.auth-showcase-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-showcase h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
}

    .auth-showcase h2 span {
        background: linear-gradient(90deg, #8fe3ff, var(--auth-cyan));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.auth-showcase p.lead {
    margin: 0 0 32px;
    color: rgba(255, 255, 255, .78);
    font-size: 16.5px;
}

/* Illustrated product cards (decorative) */
.auth-mock {
    position: relative;
    height: 300px;
    margin-bottom: 32px;
}

.auth-mock-card {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5);
    animation: auth-bob 6s ease-in-out infinite;
}

.auth-mock-link {
    top: 0;
    left: 0;
    right: 70px;
    padding: 18px 20px;
}

.auth-mock-long {
    overflow: hidden;
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-mock-short {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    color: var(--auth-ink);
    font-weight: 700;
}

    .auth-mock-short b {
        color: var(--auth-blue-600);
    }

    .auth-mock-short em {
        padding: 3px 10px;
        border-radius: 999px;
        background: linear-gradient(135deg, var(--auth-blue), var(--auth-indigo));
        color: #fff;
        font-size: 12px;
        font-style: normal;
        font-weight: 600;
    }

.auth-mock-stats {
    left: 24px;
    bottom: 0;
    width: 250px;
    padding: 16px 18px;
    animation-delay: -2s;
}

    .auth-mock-stats small {
        color: rgba(255, 255, 255, .7);
        font-size: 12px;
    }

    .auth-mock-stats strong {
        display: block;
        margin-bottom: 10px;
        font-size: 24px;
        letter-spacing: -.02em;
    }

        .auth-mock-stats strong span {
            margin-left: 6px;
            color: #6ee7b7;
            font-size: 13px;
            font-weight: 600;
        }

.auth-bars {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 56px;
}

    .auth-bars i {
        flex: 1;
        border-radius: 4px 4px 2px 2px;
        background: linear-gradient(180deg, var(--auth-cyan), rgba(47, 210, 224, .25));
        transform-origin: bottom;
        animation: auth-grow 1.2s cubic-bezier(.2, .8, .2, 1) both;
    }

.auth-mock-qr {
    right: 0;
    bottom: 34px;
    width: 132px;
    padding: 14px;
    animation-delay: -4s;
    text-align: center;
}

    .auth-mock-qr svg {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 8px;
        background: #fff;
        padding: 8px;
    }

    .auth-mock-qr small {
        display: block;
        margin-top: 8px;
        color: rgba(255, 255, 255, .8);
        font-size: 11.5px;
        font-weight: 600;
    }

.auth-features {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .auth-features li {
        display: flex;
        align-items: center;
        gap: 12px;
        color: rgba(255, 255, 255, .9);
    }

    .auth-features i {
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        border-radius: 9px;
        background: rgba(255, 255, 255, .14);
        color: #8fe3ff;
        font-size: 16px;
    }

/* ---------- Motion ---------- */
@keyframes auth-rise {
    from { transform: translateY(12px); }
    to { transform: none; }
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

@keyframes auth-shake {
    0%, 100% { transform: none; }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@keyframes auth-float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-40px, 30px) scale(1.12); }
}

@keyframes auth-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes auth-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-page *, body.auth-page *::before, body.auth-page *::after {
        animation: none !important;
        transition: none !important;
    }
}

.auth-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
