:root {
    --nfa-blue: #2027A1;
    --nfa-blue-dark: #12176f;
    --nfa-text: #111111;
    --nfa-muted: #303442;
    --nfa-label: #252b3a;
    --nfa-input: #edf2fb;
    --nfa-white: #ffffff;
    --nfa-shadow: 0 24px 52px rgba(22, 32, 80, 0.10);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-family: "Manrope", sans-serif;
    background: #ffffff;
    color: var(--nfa-text);
}

body.modal-open {
    overflow: hidden !important;
}

.navbar,
.web-footer,
footer,
.page-breadcrumbs,
.page-header,
.breadcrumbs,
.page-title,
.page-card-head {
    display: none !important;
}

main,
#page-login,
.page_content,
.page-content,
.page-container,
.web-page,
.page-wrapper,
.main-section,
.layout-main-section,
.container,
.container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* PAGE */
.hris-login-page {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #ffffff;
}

.hris-bg-gradient {
    position: absolute;
    pointer-events: none;
    filter: blur(88px);
    opacity: 0.95;
}

.bg-left {
    width: 520px;
    height: 520px;
    left: -150px;
    top: 70px;
    background: rgba(96, 117, 255, 0.15);
}

.bg-center {
    width: 360px;
    height: 560px;
    left: 42%;
    top: 100px;
    transform: translateX(-50%);
    background: rgba(106, 122, 255, 0.10);
}

.bg-right {
    width: 560px;
    height: 560px;
    right: -160px;
    top: 70px;
    background: rgba(255, 171, 186, 0.22);
}

.hris-login-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100dvh;
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 76px 34px;
    display: grid;
    grid-template-columns: minmax(560px, 1fr) minmax(420px, 450px);
    gap: 86px;
    align-items: center;
}

/* LEFT SIDE */
.hris-login-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.brand-block {
    width: 100%;
    max-width: 650px;
}

.brand-logo {
    width: 68px;
    height: auto;
    display: block;
    margin-bottom: 22px;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 19px;
    border-radius: 999px;
    background: rgba(32, 39, 161, 0.10);
    color: var(--nfa-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 22px;
}

.hero-title {
    margin: 0;
    line-height: 0.94;
    letter-spacing: -0.045em;
}

.hero-line {
    display: block;
    font-weight: 800;
}

.hero-line-blue {
    color: var(--nfa-blue);
}

.hero-line-black {
    color: #000000;
}

.hero-line-nowrap {
    white-space: nowrap;
}

.hero-title .hero-line:nth-child(1) {
    font-size: 58px;
}

.hero-title .hero-line:nth-child(2),
.hero-title .hero-line:nth-child(3) {
    font-size: 62px;
}

.hero-description {
    margin: 28px 0 34px;
    max-width: 520px;
    color: var(--nfa-muted);
    font-size: 17px;
    line-height: 1.48;
    font-weight: 500;
}

.hero-stats {
    display: flex;
    gap: 68px;
    align-items: flex-start;
    margin-bottom: 42px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-value {
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
    color: #000000;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    color: #202020;
    text-transform: uppercase;
}

.hero-version {
    font-size: 13px;
    font-weight: 500;
    color: #3f4656;
}

/* RIGHT SIDE */
.hris-login-right {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 34px 34px 30px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.70);
    box-shadow: var(--nfa-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.login-title {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
    color: #000000;
    letter-spacing: -0.03em;
}

.login-subtitle {
    margin: 0 0 26px;
    color: var(--nfa-muted);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.field-label {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--nfa-label);
}

.forgot-link {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--nfa-blue);
    cursor: pointer;
    font-family: inherit;
}

.forgot-link:hover {
    color: var(--nfa-blue-dark);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    border-radius: 11px;
    background: var(--nfa-input);
    overflow: hidden;
}

.input-icon {
    width: 54px;
    min-width: 54px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #252525;
}

.input-wrap input {
    flex: 1;
    height: 56px;
    border: 0;
    outline: none;
    background: transparent;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    padding: 0 14px 0 0;
}

.input-wrap input::placeholder {
    color: #8b93a4;
    font-weight: 500;
}

.toggle-password {
    width: 54px;
    min-width: 54px;
    height: 56px;
    border: 0;
    background: transparent;
    color: #707686;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #303746;
}

/* LOGIN BUTTON */
.login-button {
    width: 100%;
    margin-top: 8px;
    height: 56px;
    border: 0;
    border-radius: 11px;
    background: #bdbdbd;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: not-allowed;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.login-button.is-active {
    background: var(--nfa-blue);
    cursor: pointer;
}

.login-button.is-active:hover {
    background: var(--nfa-blue-dark);
    transform: translateY(-1px);
}

.login-button:disabled {
    background: #bdbdbd !important;
    cursor: not-allowed !important;
    opacity: 1;
}

.login-button.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-arrow {
    font-size: 21px;
    line-height: 1;
    margin-top: -1px;
}

/* MODALS */
.hris-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Manrope", sans-serif;
}

.hris-modal.hidden {
    display: none !important;
}

.hris-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 27, 36, 0.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.hris-modal-dialog {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    text-align: center;
    color: #222222;
}

.forgot-dialog,
.error-dialog {
    width: min(430px, calc(100vw - 32px));
    padding: 38px 36px 30px;
}

.modal-icon-circle {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #f1f1fb;
    color: var(--nfa-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.modal-icon-circle.danger {
    background: #eef1ff;
    color: var(--nfa-blue);
}

.danger-mark {
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
}

.modal-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #2527a1;
    text-align: center;
}

.modal-title-danger {
    color: var(--nfa-blue);
}

.modal-text {
    max-width: 330px;
    margin: 20px auto 0;
    color: #4f5667;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 500;
    text-align: center;
}

.attempt-text {
    display: inline-block;
    margin-top: 4px;
    color: #555c6d;
    font-weight: 600;
}

.modal-button {
    margin-top: 28px;
    width: 100%;
    height: 54px;
    border: 1px solid #2929b5;
    border-radius: 5px;
    background: #2929b5;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.modal-button:hover {
    background: var(--nfa-blue-dark);
}

.modal-button:active {
    transform: scale(0.99);
}

.modal-button-small {
    width: auto;
    min-width: 112px;
    height: 46px;
    padding: 0 28px;
    border-radius: 4px;
    font-size: 15px;
}

/* OTP MODAL */
.otp-dialog {
    width: min(530px, calc(100vw - 32px));
    padding: 42px 42px 32px;
}

.otp-icon-circle {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #f1f1fb;
    color: #2929a8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.otp-title {
    color: #2527a1;
}

.otp-main-text {
    margin: 26px auto 0;
    max-width: 440px;
    font-size: 18px;
    line-height: 1.55;
    font-weight: 500;
    color: #464646;
}

.otp-entry-area {
    margin-top: 20px;
}

.otp-entry-area.hidden {
    display: none !important;
}

.otp-timer-text {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
    color: #4a4a4a;
}

.otp-input {
    width: 100%;
    height: 64px;
    border: 1px solid #dfdfdf;
    border-radius: 5px;
    padding: 0 14px;
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #222222;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.otp-input::placeholder {
    color: #a6a6a6;
}

.otp-input:focus {
    border-color: #2929a8;
    box-shadow: 0 0 0 3px rgba(41, 41, 168, 0.10);
}

.otp-input.has-error {
    border-color: #ff2d2d;
    color: #ff2d2d;
    box-shadow: none;
}

.otp-input:disabled {
    background: #ffffff;
    color: #a6a6a6;
    cursor: not-allowed;
}

.otp-message {
    margin: 10px 0 0;
    min-height: 20px;
    text-align: left;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
}

.otp-message.hidden {
    display: none !important;
}

.otp-message.is-error {
    color: #ff1f1f;
}

.otp-message.is-error::before {
    content: "ⓘ";
    margin-right: 6px;
    font-weight: 700;
}

.otp-message.is-muted {
    text-align: center;
    color: #8b8b8b;
}

.otp-sent-text {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: #8a8a8a;
}

.otp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 36px;
}

.otp-button {
    height: 62px;
    border-radius: 5px;
    font-family: "Manrope", sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.otp-button:active {
    transform: scale(0.99);
}

.otp-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.otp-button-outline {
    background: #ffffff;
    border: 1px solid #2929a8;
    color: #2027a1;
}

.otp-button-primary {
    background: #2929b5;
    border: 1px solid #2929b5;
    color: #ffffff;
}

.otp-button-primary:hover:not(:disabled) {
    background: #2027a1;
}

/* SMALLER LAPTOP HEIGHT FIX */
@media (max-height: 760px) {
    .hris-login-shell {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .brand-logo {
        width: 58px;
        margin-bottom: 16px;
    }

    .brand-pill {
        min-height: 30px;
        margin-bottom: 16px;
        font-size: 12px;
    }

    .hero-title .hero-line:nth-child(1) {
        font-size: 50px;
    }

    .hero-title .hero-line:nth-child(2),
    .hero-title .hero-line:nth-child(3) {
        font-size: 54px;
    }

    .hero-description {
        margin: 22px 0 28px;
        font-size: 15px;
    }

    .hero-stats {
        margin-bottom: 30px;
    }

    .stat-value {
        font-size: 34px;
    }

    .stat-label {
        font-size: 13px;
    }

    .login-card {
        padding: 28px 30px 26px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-subtitle {
        margin-bottom: 20px;
    }

    .login-form {
        gap: 15px;
    }

    .input-wrap,
    .input-icon,
    .input-wrap input,
    .toggle-password {
        height: 52px;
        min-height: 52px;
    }

    .login-button {
        height: 52px;
    }
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .hris-login-shell {
        grid-template-columns: minmax(500px, 1fr) minmax(400px, 430px);
        gap: 56px;
        padding-left: 48px;
        padding-right: 48px;
    }

    .hero-title .hero-line:nth-child(1) {
        font-size: 52px;
    }

    .hero-title .hero-line:nth-child(2),
    .hero-title .hero-line:nth-child(3) {
        font-size: 56px;
    }
}

@media (max-width: 980px) {
    html,
    body {
        overflow: auto !important;
    }

    main,
    #page-login,
    .page_content,
    .page-content,
    .page-container,
    .web-page,
    .page-wrapper,
    .main-section,
    .layout-main-section,
    .container,
    .container-fluid {
        height: auto !important;
        overflow: visible !important;
    }

    .hris-login-page {
        position: relative;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .hris-login-shell {
        height: auto;
        min-height: 100dvh;
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 34px 24px 44px;
    }

    .hris-login-left,
    .hris-login-right {
        justify-content: center;
    }

    .brand-block {
        max-width: 100%;
        text-align: center;
    }

    .brand-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-version {
        text-align: center;
    }

    .hero-line-nowrap {
        white-space: normal;
    }

    .hero-title .hero-line:nth-child(1),
    .hero-title .hero-line:nth-child(2),
    .hero-title .hero-line:nth-child(3) {
        font-size: 48px;
    }
}

@media (max-width: 640px) {
    .login-card {
        padding: 26px 20px 24px;
        border-radius: 18px;
    }

    .brand-pill {
        font-size: 12px;
        padding: 0 14px;
    }

    .hero-title .hero-line:nth-child(1),
    .hero-title .hero-line:nth-child(2),
    .hero-title .hero-line:nth-child(3) {
        font-size: 40px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-stats {
        gap: 36px;
    }

    .stat-value {
        font-size: 32px;
    }

    .login-title {
        font-size: 27px;
    }

    .login-subtitle,
    .field-label,
    .modal-text {
        font-size: 15px;
    }

    .forgot-dialog,
    .error-dialog {
        width: min(92vw, 380px);
        border-radius: 12px;
        padding: 28px 24px 24px;
    }

    .otp-dialog {
        width: min(92vw, 430px);
        padding: 36px 24px 28px;
    }

    .otp-actions {
        grid-template-columns: 1fr;
        margin-top: 28px;
    }

    .otp-button {
        height: 56px;
    }

    .modal-title,
    .otp-title {
        font-size: 22px;
    }

    .otp-main-text {
        font-size: 16px;
    }
}

.otp-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 38px 42px 34px;
    border-radius: 8px;
}

.otp-device-title {
    margin: 0 0 12px;
    text-align: center;
    color: #222222;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 500;
}

.otp-title {
    margin: 0 0 22px;
    color: #2027A1;
    font-size: 24px;
    font-weight: 800;
}

.otp-main-text {
    margin: 0 auto 16px;
    max-width: 390px;
    font-size: 15px;
    line-height: 1.55;
    color: #4f4f4f;
}

.otp-entry-area {
    margin-top: 14px;
}

.otp-timer-text {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: #4a4a4a;
}

.otp-input {
    height: 52px;
    border-radius: 4px;
    font-size: 14px;
}

.otp-message {
    margin: 10px 0 0;
    font-size: 13px;
}

.otp-sent-text {
    text-align: center;
    font-size: 13px;
    color: #9a9a9a;
}

.otp-actions {
    margin-top: 24px;
    gap: 12px;
}

.otp-button {
    height: 50px;
    border-radius: 4px;
    font-size: 15px;
}

.otp-button-outline {
    border: 1px solid #2027A1;
    color: #2027A1;
    background: #ffffff;
}

.otp-button-outline:hover:not(:disabled) {
    background: #f4f5ff;
}

.otp-button-primary {
    border: 1px solid #2027A1;
    background: #2027A1;
    color: #ffffff;
}

.otp-button-primary:hover:not(:disabled) {
    background: #12176f;
    border-color: #12176f;
}

@media (max-width: 640px) {
    .otp-dialog {
        width: min(92vw, 430px);
        padding: 32px 24px 28px;
    }

    .otp-device-title {
        font-size: 16px;
    }

    .otp-title {
        font-size: 22px;
    }

    .otp-main-text {
        font-size: 14px;
    }

    .otp-actions {
        grid-template-columns: 1fr;
    }
}