/* =========================================================
   CareComply360 - Sign-in pages (Login, Forgot, Reset, Lockout, Access denied)
   Light and professional. Left: brand story (_AuthBrand.cshtml). Right: form panel.
   ========================================================= */

:root {
    --cc-primary: #534AB7;
    --cc-primary-2: #6A61D6;
    --cc-primary-dark: #3C3489;
    --cc-primary-deep: #26215C;
    --cc-primary-soft: #EEEDFE;
    --cc-teal: #1D8C76;
    --cc-teal-soft: #E1F2EC;
    --cc-ink: #252638;
    --cc-ink-2: #6B6A7B;
    --cc-muted: #8A8797;
    --cc-line: #DEDDE5;
    --cc-field: #FFFFFF;
    --cc-danger: #C0392B;
    --cc-radius: 10px;
}

html, body { height: 100%; }

.auth-body {
    margin: 0;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--cc-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Page grid ---------- */
.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* ---------- Brand panel (left) ---------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    background: #F4F3FB;
    border-right: 1px solid #ECEAF5;
}

/* quiet ring in the corner */
.auth-brand::after {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    right: -340px;
    bottom: -220px;
    border-radius: 50%;
    border: 1px solid #DCD6EE;
    box-shadow: 0 0 0 48px rgba(232, 228, 244, .45), 0 0 0 96px rgba(232, 228, 244, .3);
    pointer-events: none;
}

.auth-orb { display: none; }

.auth-brand-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 44px 8%;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    align-self: flex-start;
}

.auth-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--cc-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
}

.auth-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--cc-ink);
    letter-spacing: -.01em;
}

.auth-logo-text span { color: var(--cc-teal); }

.auth-brand-copy {
    width: 100%;
    max-width: 520px;
    margin: auto;
    padding: 56px 0 32px;
}

.auth-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #6E62A8;
}

.auth-eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: #8C7AC1;
}

.auth-brand-copy h1 {
    font-size: clamp(32px, 3.2vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.025em;
    color: var(--cc-ink);
    margin: 20px 0 18px;
}

.auth-brand-copy h1 span { color: var(--cc-primary); }

.auth-intro {
    font-size: 16px;
    line-height: 1.7;
    color: var(--cc-ink-2);
    margin: 0 0 28px;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #4D4B65;
}

.auth-features i {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 15px;
    color: var(--cc-teal);
    background: var(--cc-teal-soft);
}

/* example card (fixed figures, not real data) */
.auth-glance {
    margin-top: 36px;
    max-width: 420px;
    padding: 20px;
    background: #fff;
    border: 1px solid #E4E1F2;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(60, 52, 137, .06);
}

.auth-glance-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--cc-ink);
}

.auth-glance-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    color: #17705E;
    background: var(--cc-teal-soft);
}

.auth-glance-main {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
}

.auth-ring {
    width: 70px;
    height: 70px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--cc-primary) 0 94%, #ECE9F6 94%);
}

.auth-ring span {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding-top: 15px;
    background: #fff;
    font-size: 18px;
    font-weight: 700;
    color: var(--cc-ink);
}

.auth-ring small { font-size: 11px; }

.auth-glance-main strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--cc-ink);
}

.auth-glance-main p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--cc-muted);
}

.auth-brand-foot {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 12px;
    color: #8C849F;
    margin: 0;
}

/* ---------- Form panel (right) ---------- */
.auth-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 40px;
    background: #fff;
}

.auth-help {
    position: absolute;
    top: 44px;
    right: 44px;
    margin: 0;
    font-size: 13px;
    color: var(--cc-muted);
}

.auth-help a { margin-left: 6px; }

.auth-card {
    width: 100%;
    max-width: 390px;
    animation: auth-in .4s ease-out both;
}

@keyframes auth-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.auth-welcome-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
    display: grid;
    place-items: center;
    font-size: 24px;
    color: var(--cc-primary);
    background: #F1EEF9;
    border: 1px solid #E6E1F5;
    border-radius: 14px;
}

.auth-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 8px;
    color: var(--cc-ink);
}

.auth-subtitle {
    color: var(--cc-muted);
    font-size: 15px;
    margin: 0 0 30px;
}

/* ---------- Fields ---------- */
.auth-field { margin-bottom: 20px; }

.auth-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--cc-ink);
    margin-bottom: 8px;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input > i {
    position: absolute;
    left: 14px;
    font-size: 17px;
    color: #A5A0B1;
    pointer-events: none;
    transition: color .2s;
    z-index: 1;
}

.auth-input .form-control {
    height: 50px;
    padding-left: 42px;
    padding-right: 44px;
    font-size: 16px; /* 16px stops iOS zooming in on focus */
    color: var(--cc-ink);
    background: var(--cc-field);
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-radius);
    transition: border-color .2s, box-shadow .2s;
}

.auth-input .form-control::placeholder { color: #AAA5B3; }

.auth-input .form-control:focus {
    border-color: #8A74C7;
    box-shadow: 0 0 0 3px rgba(83, 74, 183, .12);
}

/* stop Chrome painting saved logins light blue */
.auth-input .form-control:-webkit-autofill,
.auth-input .form-control:-webkit-autofill:hover,
.auth-input .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--cc-ink);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 9999s ease-out 0s;
}

.auth-input:focus-within > i { color: var(--cc-primary); }

.auth-input .form-control.input-validation-error {
    border-color: var(--cc-danger);
    background: #FFF8F7;
}

.auth-toggle {
    position: absolute;
    right: 6px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9A94A8;
    transition: color .2s, background-color .2s;
}

.auth-toggle:hover {
    color: var(--cc-primary);
    background: var(--cc-primary-soft);
}

.auth-toggle:focus-visible {
    outline: 2px solid var(--cc-primary);
    outline-offset: 1px;
}

.auth-error {
    display: block;
    font-size: 13px;
    color: var(--cc-danger);
    margin-top: 6px;
}

.auth-error:empty { display: none; }

.auth-caps {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: #854F0B;
}

.auth-caps[hidden] { display: none; }

/* validation summary */
.auth-alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #8E2B20;
    background: #FDF1F0;
    border: 1px solid #F5C6C1;
    border-radius: var(--cc-radius);
}

.auth-alert.validation-summary-valid { display: none; }
.auth-alert ul { margin: 0; padding-left: 18px; }

/* ---------- Remember me / forgot ---------- */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 26px;
    font-size: 14px;
}

.auth-row .form-check-label { color: var(--cc-ink-2); }

.auth-row .form-check-input:checked {
    background-color: var(--cc-primary);
    border-color: var(--cc-primary);
}

.auth-row .form-check-input:focus {
    border-color: var(--cc-primary);
    box-shadow: 0 0 0 3px rgba(83, 74, 183, .15);
}

.auth-link {
    color: var(--cc-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

/* ---------- Button ---------- */
.auth-btn {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    border: 0;
    border-radius: var(--cc-radius);
    background: var(--cc-primary);
    box-shadow: 0 4px 10px rgba(83, 74, 183, .15);
    transition: background-color .2s, transform .15s;
}

.auth-btn:hover {
    color: #fff;
    background: var(--cc-primary-dark);
    transform: translateY(-1px);
}

.auth-btn:active { transform: none; }

.auth-btn:focus-visible {
    outline: 3px solid rgba(83, 74, 183, .35);
    outline-offset: 2px;
}

.auth-btn i { transition: transform .2s; }
.auth-btn:hover i { transform: translateX(3px); }

/* loading state */
.auth-btn.is-loading {
    pointer-events: none;
    opacity: .85;
}

.auth-btn.is-loading i { display: none; }

.auth-btn.is-loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ---------- Notes under the form ---------- */
.auth-note {
    display: flex;
    gap: 11px;
    margin: 26px 0 0;
    padding: 15px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #96909F;
    background: #FAF9FC;
    border: 1px solid #EFEDF3;
    border-radius: var(--cc-radius);
}

.auth-note i {
    color: #9A8CBA;
    font-size: 16px;
    margin-top: 1px;
}

.auth-note strong {
    color: #736B81;
    font-weight: 600;
}

.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 0;
    font-size: 12px;
    color: #AAA4B3;
}

/* ---------- Large screens ---------- */
@media (min-width: 1600px) {
    .auth-brand-inner { padding: 48px 10%; }
    .auth-brand-copy { max-width: 560px; }
}

/* ---------- Tablet & mobile ---------- */
@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-brand { border-right: 0; border-bottom: 1px solid #ECEAF5; }
    .auth-brand::after { display: none; }

    .auth-brand-inner { padding: 22px 24px; }

    .auth-brand-copy,
    .auth-brand-foot { display: none; }

    .auth-logo-mark {
        width: 34px;
        height: 34px;
        font-size: 17px;
        border-radius: 10px;
    }

    .auth-logo-text { font-size: 18px; }

    .auth-panel {
        align-items: flex-start;
        padding: 36px 24px 90px;
    }

    .auth-help {
        top: auto;
        bottom: 32px;
        left: 0;
        right: 0;
        text-align: center;
    }

    .auth-welcome-icon { margin-bottom: 18px; }
    .auth-title { font-size: 26px; }
    .auth-subtitle { margin-bottom: 24px; }
}

@media (max-width: 360px) {
    .auth-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    .auth-card { animation: none; }
    .auth-btn, .auth-btn i { transition: none; }
}
