/* ==================== HATZALAH LOGIN — DESIGN TOKENS ==================== */

:root {
    --hl-red: #c62828;
    --hl-red-bright: #e04040;
    --hl-red-dark: #8e1414;
    --hl-red-deep: #5d0b0b;
    --hl-red-soft: #fdeaea;
    --hl-navy: #1e3a8a;
    --hl-gold: #d9a441;
    --hl-ink: #1c2130;
    --hl-ink-2: #5b6270;
    --hl-ink-3: #949bab;
    --hl-border: #e6e8f0;
    --hl-surface: #ffffff;
    --hl-surface-2: #f4f5f9;
    --hl-page: #f6f7fb;
    --hl-radius: 18px;
    --hl-radius-sm: 12px;
}

html, body {
    height: 100%;
}

/* Own the box model for every element this page renders, independent of
   theme-bundle load order */
.hl-page,
.hl-page *,
.hl-page *::before,
.hl-page *::after {
    box-sizing: border-box;
}

body.hl-body {
    margin: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--hl-page);
    -webkit-tap-highlight-color: transparent;
}

/* ==================== FORM STATE SWITCHING (used by login-general.js) ==================== */

.login .login-signin,
.login .login-signup,
.login .login-forgot,
.login .login-otp,
.login .login-password {
    display: none;
}

.login.login-signin-on .login-signin,
.login.login-signup-on .login-signup,
.login.login-forgot-on .login-forgot,
.login.login-otp-on .login-otp,
.login.login-password-on .login-password {
    display: block;
}

.show {
    display: block !important;
}

.hide {
    display: none !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* ==================== PAGE LAYOUT ==================== */

.hl-page {
    display: flex;
    min-height: 100vh;
}

/* ==================== BRAND ASIDE ==================== */

.hl-aside {
    position: relative;
    width: 44%;
    min-width: 420px;
    max-width: 620px;
    background: linear-gradient(160deg, #a41c1c 0%, #7c1010 55%, var(--hl-red-deep) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px 40px;
    overflow: hidden;
}

/* soft glows */
.hl-aside::before,
.hl-aside::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hl-aside::before {
    width: 480px;
    height: 480px;
    top: -160px;
    right: -160px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 65%);
}

.hl-aside::after {
    width: 420px;
    height: 420px;
    bottom: -140px;
    left: -140px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 65%);
}

.hl-star-watermark {
    position: absolute;
    right: -90px;
    bottom: -70px;
    width: 380px;
    height: 380px;
    opacity: 0.06;
    pointer-events: none;
}

.hl-aside-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hl-badge {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
    flex-shrink: 0;
}

.hl-badge img {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
}

.hl-org {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hl-org-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
    color: #fff;
}

.hl-org-sub {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hl-aside-main {
    position: relative;
    z-index: 1;
}

.hl-headline {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 14px;
    color: #fff;
}

.hl-headline .hl-accent {
    color: #ffd9a0;
}

.hl-tagline {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    max-width: 380px;
    margin: 0;
}

/* EKG heartbeat line */
.hl-ekg {
    margin-top: 38px;
    width: 100%;
    max-width: 420px;
    height: 70px;
    overflow: visible;
}

.hl-ekg path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 640;
    stroke-dashoffset: 640;
    animation: hl-ekg-draw 3.4s linear infinite;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

@keyframes hl-ekg-draw {
    0% { stroke-dashoffset: 640; }
    62% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -640; }
}

.hl-aside-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}

.hl-aside-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.15s;
}

.hl-aside-footer a:hover {
    color: #fff;
}

.hl-aside-footer img {
    height: 16px;
    opacity: 0.8;
}

/* ==================== CONTENT SIDE ==================== */

.hl-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    background:
        radial-gradient(700px 420px at 85% -10%, rgba(198, 40, 40, 0.06) 0%, rgba(198, 40, 40, 0) 60%),
        var(--hl-page);
}

/* Mobile brand header (aside replacement) */
.hl-mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(150deg, #a41c1c 0%, var(--hl-red-dark) 100%);
    color: #fff;
}

.hl-mobile-brand .hl-badge {
    width: 66px;
    height: 66px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.hl-mobile-brand .hl-badge img {
    width: 58px;
    height: 58px;
}

.hl-mobile-brand .hl-org-name {
    font-size: 15px;
}

.hl-mobile-brand .hl-org-sub {
    font-size: 10px;
    letter-spacing: 1px;
}

/* ==================== FORM CARD ==================== */

.hl-card {
    width: 100%;
    max-width: 440px;
    background: var(--hl-surface);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius);
    box-shadow: 0 2px 6px rgba(28, 33, 48, 0.04), 0 18px 48px rgba(28, 33, 48, 0.09);
    padding: 38px 38px 32px;
}

.login-form {
    width: 100%;
}

.hl-form-head {
    margin-bottom: 26px;
}

.hl-form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--hl-ink);
    margin: 0 0 6px;
}

.hl-form-sub {
    font-size: 13px;
    color: var(--hl-ink-2);
    margin: 0;
    line-height: 1.6;
}

/* ==================== FIELDS ==================== */

.hl-field {
    position: relative;
    margin-bottom: 16px;
}

.hl-field-icon {
    position: absolute;
    left: 15px;
    top: 24px;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--hl-ink-3);
    pointer-events: none;
    transition: color 0.15s;
    z-index: 2;
}

.hl-field:focus-within .hl-field-icon {
    color: var(--hl-red);
}

.hl-input {
    width: 100%;
    height: 48px;
    border: 1.5px solid transparent;
    border-radius: var(--hl-radius-sm);
    background: var(--hl-surface-2);
    padding: 0 44px;
    font-size: 14px;
    font-family: inherit;
    color: var(--hl-ink);
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.hl-input::placeholder {
    color: var(--hl-ink-3);
}

.hl-input:focus {
    background: #fff;
    border-color: var(--hl-red);
    box-shadow: 0 0 0 4px var(--hl-red-soft);
}

.hl-eye {
    position: absolute;
    right: 8px;
    top: 24px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--hl-ink-3);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    z-index: 2;
}

.hl-eye svg {
    width: 18px;
    height: 18px;
}

.hl-eye:hover {
    color: var(--hl-ink);
}

/* FormValidation messages */
.hl-field .fv-help-block,
.fv-plugins-message-container {
    font-size: 11.5px;
    color: var(--hl-red);
    margin-top: 5px;
    padding-left: 4px;
}

.hl-error {
    min-height: 18px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--hl-red);
    margin: 2px 0 6px;
}

/* ==================== BUTTONS ==================== */

.hl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--hl-radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    touch-action: manipulation;
}

.hl-btn-primary {
    background: var(--hl-red);
    color: #fff;
}

.hl-btn-primary:hover {
    background: var(--hl-red-dark);
    color: #fff;
}

.hl-btn-primary:active {
    background: var(--hl-red-deep);
}

.hl-btn-light {
    background: var(--hl-surface-2);
    color: var(--hl-ink-2);
    border: 1px solid var(--hl-border);
}

.hl-btn-light:hover {
    background: #ecedf3;
    color: var(--hl-ink);
}

.hl-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.hl-btn-row .hl-btn {
    flex: 1;
}

/* spinner injected by login-general.js ("Please wait <span class=spinner>") */
.hl-btn .spinner {
    position: relative;
    width: 18px;
    height: 18px;
}

/* ==================== LINKS / MISC ==================== */

.hl-links {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.hl-links a,
.link-primary {
    font-size: 13px;
    font-weight: 500;
    color: var(--hl-red);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.hl-links a:hover,
.link-primary:hover {
    color: var(--hl-red-dark);
    text-decoration: underline;
}

.hl-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 4px;
}

.hl-divider::before,
.hl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hl-border);
}

.hl-divider span {
    font-size: 11px;
    color: var(--hl-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ==================== OTP ==================== */

.inputfield {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 4px;
}

.input {
    height: 52px;
    width: 44px;
    border: 1.5px solid var(--hl-border);
    outline: none;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    font-family: inherit;
    color: var(--hl-ink);
    border-radius: 10px;
    background-color: var(--hl-surface-2);
    -moz-appearance: textfield;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.input:nth-child(4) {
    margin-left: 14px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input:disabled {
    color: var(--hl-ink-3);
    background-color: #eef0f5;
}

.input:focus {
    border-color: var(--hl-red);
    background: #fff;
    box-shadow: 0 0 0 4px var(--hl-red-soft);
}

.hl-otp-timer {
    text-align: center;
    font-size: 12.5px;
    color: var(--hl-ink-2);
    margin: 12px 0 2px;
}

#otpTimer {
    font-weight: 700;
    color: var(--hl-red);
    font-variant-numeric: tabular-nums;
}

/* ==================== FOOTER ==================== */

.hl-content-footer {
    margin-top: 26px;
    font-size: 12px;
    color: var(--hl-ink-3);
    text-align: center;
}

.hl-content-footer a {
    color: var(--hl-ink-2);
    text-decoration: none;
}

.hl-content-footer a:hover {
    color: var(--hl-red);
}

/* ==================== ENTRANCE ANIMATION ==================== */

.hl-card {
    animation: hl-card-in 0.45s cubic-bezier(0.22, 0.8, 0.36, 1) both;
}

.hl-aside-header,
.hl-aside-main,
.hl-aside-footer {
    animation: hl-fade-up 0.55s ease both;
}

.hl-aside-main { animation-delay: 0.08s; }
.hl-aside-footer { animation-delay: 0.16s; }

@keyframes hl-card-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes hl-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 991.98px) {
    .hl-page {
        flex-direction: column;
    }

    .hl-aside {
        display: none;
    }

    .hl-mobile-brand {
        display: flex;
    }

    .hl-content {
        justify-content: flex-start;
        padding: 26px 16px 32px;
    }

    .hl-card {
        max-width: 480px;
        padding: 28px 22px 24px;
    }

    .hl-form-title {
        font-size: 21px;
    }
}

@media (max-width: 400px) {
    .input {
        width: 40px;
        height: 48px;
    }
}

/* ==================== REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {
    .hl-ekg path,
    .hl-card,
    .hl-aside-header,
    .hl-aside-main,
    .hl-aside-footer {
        animation: none;
    }

    .hl-ekg path {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
    }
}
