
/* =========================================================
   HeirsNexus Login UI - Final Fix
   UI-only replacement. No authentication, model, controller,
   route, SSO, or database behaviour is changed.
   ========================================================= */

* { box-sizing: border-box; }

html, body { min-height: 100%; }

.hn-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 85% 7%, rgba(214, 0, 0, 0.13), transparent 30%),
        radial-gradient(circle at 12% 80%, rgba(15, 23, 42, 0.07), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 48%, #fff5f5 100%);
    color: #101828;
}

.hn-auth-stage {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
}

.hn-auth-shell {
    width: min(1260px, 94vw);
    height: min(760px, calc(100vh - 72px));
    min-height: 650px;
    display: grid;
    grid-template-columns: 46% 54%;
    background: #ffffff;
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(16, 24, 40, 0.15), 0 10px 25px rgba(16, 24, 40, 0.08);
    overflow: hidden;
}

.hn-auth-form-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 54px;
    background:
        radial-gradient(circle at 50% 8%, rgba(208, 0, 0, 0.055), transparent 30%),
        #ffffff;
}

.hn-auth-card {
    width: min(450px, 100%);
    margin: 0 auto;
}

.hn-auth-logo {
    width: min(295px, 100%);
    max-height: 190px;
    object-fit: contain;
    display: block;
    margin: 0 auto 18px;
}

.hn-auth-heading {
    text-align: center;
    margin-bottom: 24px;
}

.hn-auth-heading h1 {
    margin: 0;
    font-size: clamp(28px, 2.2vw, 36px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
    color: #111827;
}

.hn-auth-heading p {
    margin: 9px 0 0;
    color: #667085;
    font-size: 15px;
    font-weight: 600;
}

.hn-auth-form { margin: 0; }

.hn-auth-field { margin-bottom: 12px; }

.hn-auth-field label {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    color: #111827;
}

.hn-input-wrap {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 13px;
    background: #ffffff;
    border: 1px solid #d8e0eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.hn-input-wrap:focus-within {
    border-color: #d30000;
    background: #fffafa;
    box-shadow: 0 0 0 4px rgba(211, 0, 0, 0.10);
}

.hn-input-icon {
    width: 20px;
    min-width: 20px;
    display: inline-flex;
    justify-content: center;
    color: #667085;
    font-size: 14px;
    line-height: 1;
}

.hn-input-wrap input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-size: 15px;
    font-weight: 600;
    min-width: 0;
}

.hn-input-wrap input::placeholder {
    color: #98a2b3;
    font-weight: 600;
}

.hn-password-wrap { padding-right: 8px; }

.hn-password-toggle {
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    padding: 6px 7px;
    border-radius: 8px;
}

.hn-password-toggle:hover { background: #f2f4f7; color: #111827; }

.hn-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 8px 0 16px;
    font-size: 13px;
}

.hn-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #344054;
    font-weight: 800;
    margin: 0;
    cursor: pointer;
}

.hn-auth-remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d00000;
}

.hn-auth-row a,
.hn-auth-request a {
    color: #d00000;
    font-weight: 900;
    text-decoration: none;
}

.hn-auth-row a:hover,
.hn-auth-request a:hover { text-decoration: underline; }

.hn-auth-signin {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #e00000 0%, #b90000 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(208, 0, 0, 0.26);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.hn-auth-signin:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 19px 34px rgba(208, 0, 0, 0.32);
}

.hn-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 14px;
    color: #667085;
    font-size: 13px;
    font-weight: 900;
}

.hn-auth-divider::before,
.hn-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4e7ec;
}

.hn-auth-sso {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #d8e0eb;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
}

.hn-auth-sso:hover {
    background: #f9fafb;
    border-color: #c6d0df;
    text-decoration: none;
}

.hn-auth-sso-mark {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #d00000;
    font-weight: 900;
    font-size: 18px;
}

.hn-auth-request {
    margin: 18px 0 0;
    text-align: center;
    color: #667085;
    font-size: 14px;
    font-weight: 600;
}

.hn-auth-info,
.hn-auth-validation {
    margin-bottom: 14px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
}

.hn-auth-validation.validation-summary-valid,
.hn-auth-validation .validation-summary-valid { display: none; }

.hn-auth-validation ul {
    margin: 0;
    padding-left: 18px;
}

.text-danger {
    display: block;
    margin-top: 5px;
    color: #b42318;
    font-size: 12px;
    font-weight: 800;
}

.field-validation-valid { display: none; }

.hn-auth-hero-panel {
    min-width: 0;
    position: relative;
    background: #05070b;
    overflow: hidden;
}

.hn-auth-hero-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    object-position: center;
}

@media (max-width: 1100px) {
    .hn-auth-shell {
        width: min(640px, 94vw);
        height: auto;
        min-height: auto;
        grid-template-columns: 1fr;
    }
    .hn-auth-hero-panel { display: none; }
    .hn-auth-form-panel { padding: 38px 38px; }
}

@media (max-width: 640px) {
    .hn-auth-stage { padding: 0; }
    .hn-auth-shell {
        width: 100vw;
        min-height: 100vh;
        border-radius: 0;
        border: 0;
    }
    .hn-auth-form-panel { padding: 28px 20px; }
    .hn-auth-logo { width: min(260px, 100%); }
    .hn-auth-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}
