@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap');

:root {
    --purple: #59359c;
    --purple-dark: #45277e;
    --purple-light: #f2edfb;
    --orange: #f28c28;
    --orange-dark: #df7412;
    --white: #ffffff;
    --page: #f3f4f7;
    --text: #263544;
    --text-dark: #293544;
    --muted: #6f7d89;
    --border: #d7dee5;
    --success: #055928;
    --success-bg: #ecfdf3;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background: var(--page);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

button,
input {
    font-family: inherit;
}

.portal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-header {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #dce2e7;
}

.header-inner {
    width: 1040px;
    max-width: calc(100% - 40px);
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--purple);
    color: #ffffff;
    border-radius: 5px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
}

.brand-mark i {
    font-size: 18px;
}

.brand-info h1 {
    font-family: "Manrope", "Inter", sans-serif;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    color: var(--purple);
    letter-spacing: -.4px;
}

.brand-info h1 span {
    color: #333f4b;
}

.brand-info p {
    margin-top: 6px;
    font-size: 9px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 1.4px;
    color: #8996a1;
}

.help-info {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #74818d;
    font-size: 11px;
    font-weight: 500;
}

.help-info i {
    color: var(--purple);
    font-size: 12px;
}

.portal-strip {
    height: 36px;
    background: var(--purple);
    color: #ffffff;
}

.strip-inner {
    width: 1040px;
    max-width: calc(100% - 40px);
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 500;
}

.strip-inner i {
    margin-right: 4px;
    font-size: 10px;
}

.strip-arrow {
    opacity: .55;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px 20px;
}

.login-box {
    width: 780px;
    max-width: 100%;
    min-height: 430px;
    display: grid;
    grid-template-columns: 43% 57%;
    background: #ffffff;
    border: 1px solid #d9e0e6;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(40, 30, 65, .10);
    overflow: hidden;
}

.login-info {
    padding: 35px 32px;
    background: linear-gradient(145deg, #59359c, #45277e);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.login-info::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 25px solid rgba(255, 255, 255, .045);
    right: -100px;
    bottom: -95px;
}

.info-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    position: relative;
    z-index: 2;
}

.info-icon {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 5px;
}

.info-icon i {
    font-size: 17px;
}

.info-heading span {
    display: block;
    color: #ddd0f5;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
}

.info-heading h2 {
    margin-top: 4px;
    font-family: "Manrope", sans-serif;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 800;
}

.info-line {
    width: 38px;
    height: 3px;
    margin-top: 20px;
    background: var(--orange);
    border-radius: 2px;
}

.info-description {
    margin-top: 16px;
    color: #e4dcf2;
    font-size: 12px;
    line-height: 1.7;
}

.service-list {
    margin-top: 23px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
}

.service-item i {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #bce5c9;
    font-size: 8px;
}

.info-notice {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 28px;
    display: flex;
    gap: 9px;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.info-notice > i {
    color: #ffbd72;
    font-size: 12px;
    margin-top: 2px;
}

.info-notice strong {
    display: block;
    font-size: 10px;
    font-weight: 600;
}

.info-notice p {
    margin-top: 4px;
    color: #d0c4e4;
    font-size: 9px;
    line-height: 1.5;
}

.login-form-area {
    padding: 38px 42px 32px;
    background: #ffffff;
}

.form-title {
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid #edf0f2;
}

.form-title h2 {
    font-family: "Manrope", sans-serif;
    color: var(--text-dark);
    font-size: 25px;
    line-height: 1;
    font-weight: 800;
}

.form-title p {
    margin-top: 8px;
    color: #7b8792;
    font-size: 11px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #384754;
    font-size: 11px;
    font-weight: 600;
}

.input-group {
    height: 43px;
    position: relative;
}

.input-group > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #87939e;
    font-size: 12px;
    z-index: 2;
}

.input-group input {
    width: 100%;
    height: 100%;
    padding: 0 40px;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    background: #fafbfc;
    color: #273642;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-group input::placeholder {
    color: #a0aab3;
    font-size: 11px;
}

.input-group input:hover {
    border-color: #c6d0d9;
}

.input-group input:focus {
    background: #ffffff;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(89, 53, 156, .10);
}

.password-button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 33px;
    height: 33px;
    border: none;
    background: transparent;
    color: #8996a1;
    cursor: pointer;
    border-radius: 4px;
}

.password-button:hover {
    background: var(--purple-light);
    color: var(--purple);
}

.password-button i {
    font-size: 12px;
}

.captcha-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.captcha-display {
    flex: 1;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3eff9;
    border: 1px solid #d9cceb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.captcha-display::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
            -25deg,
            transparent 0,
            transparent 8px,
            rgba(89, 53, 156, .06) 9px,
            transparent 10px
    );
}

.captcha-display span {
    position: relative;
    z-index: 2;
    color: var(--purple-dark);
    font-family: "Manrope", sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 5px;
}

.captcha-refresh {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: #ffffff;
    color: #647482;
    border-radius: 4px;
    cursor: pointer;
    transition: .2s ease;
}

.captcha-refresh:hover {
    background: var(--purple-light);
    border-color: #cbbbe0;
    color: var(--purple);
}

.captcha-refresh i {
    font-size: 12px;
}

.captcha-info {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7c8994;
    font-size: 9px;
}

.captcha-info i {
    color: var(--purple);
    font-size: 9px;
}

.login-button {
    width: 100%;
    height: 44px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border: none;
    border-radius: 4px;
    background: var(--purple);
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.login-button:hover {
    background: var(--purple-dark);
    box-shadow: 0 7px 18px rgba(89, 53, 156, .20);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: .75;
    transform: none;
}

.login-button.loading i {
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.server-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 10px;
    margin-bottom: 14px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.4;
}

.server-message.error {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid #fecaca;
}

.server-message.success {
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid #bbf7d0;
}

.otp-section {
    display: block;
}

.otp-success-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px;
    margin-bottom: 17px;
    border-radius: 6px;
    background: var(--success-bg);
    border: 1px solid #bbf7d0;
}

.otp-success-box > i {
    color: var(--success);
    font-size: 14px;
    margin-top: 2px;
}

.otp-success-box strong {
    display: block;
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
}

.otp-success-box span {
    display: block;
    margin-top: 3px;
    color: #4b705b;
    font-size: 9px;
    line-height: 1.45;
}

.otp-success-box span strong {
    display: inline;
    color: var(--success);
    font-size: 9px;
}

.otp-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    margin-top: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.back-login-button {
    width: 100%;
    height: 37px;
    margin-top: 9px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #ffffff;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.back-login-button:hover {
    background: var(--purple-light);
    border-color: #cbbbe0;
    color: var(--purple);
}

.back-login-button i {
    margin-right: 5px;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 17px;
    color: #7c8994;
    font-size: 9px;
    font-weight: 500;
}

.secure-note i {
    color: var(--success);
    font-size: 10px;
}

.forgot-password-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.forgot-password-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--purple);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s ease;
}

.forgot-password-link:hover {
    color: var(--orange-dark);
}

.forgot-password-link i {
    font-size: 10px;
}

.forgot-password-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.forgot-password-modal.show {
    display: flex;
}

.forgot-password-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 29, 51, .62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.forgot-password-dialog {
    position: relative;
    z-index: 2;
    width: 430px;
    max-width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 25px 27px 22px;
    background: #ffffff;
    border: 1px solid #d9e0e6;
    border-radius: 7px;
    box-shadow: 0 18px 50px rgba(40, 30, 65, .24);
    animation: forgotModalIn .22s ease;
}

@keyframes forgotModalIn {

    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.forgot-password-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.forgot-password-title {
    display: flex;
    align-items: center;
    gap: 11px;
}

.forgot-password-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--purple-light);
    color: var(--purple);
    border: 1px solid #ddd1ee;
}

.forgot-password-icon i {
    font-size: 16px;
}

.forgot-password-title span {
    display: block;
    color: #8996a1;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.forgot-password-title h2 {
    margin-top: 3px;
    color: var(--text-dark);
    font-family: "Manrope", sans-serif;
    font-size: 21px;
    line-height: 1.1;
    font-weight: 800;
}

.forgot-password-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #8996a1;
    cursor: pointer;
    transition: .2s ease;
}

.forgot-password-close:hover {
    background: var(--purple-light);
    color: var(--purple);
}

.forgot-password-line {
    width: 38px;
    height: 3px;
    margin-top: 16px;
    border-radius: 2px;
    background: var(--orange);
}

.forgot-password-description {
    margin-top: 13px;
    color: #7b8792;
    font-size: 10px;
    line-height: 1.6;
}

.forgot-password-message {
    display: none;
    align-items: flex-start;
    gap: 7px;
    margin-top: 13px;
    padding: 9px 10px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.4;
}

.forgot-password-message.show {
    display: flex;
}

.error-message {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid #fecaca;
}

.success-message {
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid #bbf7d0;
}

.modal-input-group {
    margin-top: 15px;
}

.modal-input-group label {
    display: block;
    margin-bottom: 6px;
    color: #384754;
    font-size: 10px;
    font-weight: 600;
}

.modal-password-input,
.modal-text-input {
    height: 42px;
    position: relative;
}

.modal-password-input > i,
.modal-text-input > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #87939e;
    font-size: 11px;
    z-index: 2;
}

.modal-password-input input,
.modal-text-input input {
    width: 100%;
    height: 100%;
    padding: 0 42px 0 38px;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    background: #fafbfc;
    color: #273642;
    font-size: 11px;
    font-weight: 500;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.modal-text-input input {
    padding-right: 14px;
}

.modal-password-input input::placeholder,
.modal-text-input input::placeholder {
    color: #a0aab3;
    font-size: 10px;
}

.modal-password-input input:hover,
.modal-text-input input:hover {
    border-color: #c6d0d9;
}

.modal-password-input input:focus,
.modal-text-input input:focus {
    background: #ffffff;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(89, 53, 156, .10);
}

.modal-password-input button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #8996a1;
    cursor: pointer;
}

.modal-password-input button:hover {
    background: var(--purple-light);
    color: var(--purple);
}

.modal-password-input button i {
    font-size: 11px;
}

.forgot-password-actions {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
    gap: 9px;
    margin-top: 20px;
}

.forgot-cancel-button,
.forgot-change-button {
    height: 41px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.forgot-cancel-button {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--muted);
}

.forgot-cancel-button:hover {
    background: var(--purple-light);
    border-color: #cbbbe0;
    color: var(--purple);
}

.forgot-change-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 13px;
    border: none;
    background: var(--purple);
    color: #ffffff;
    letter-spacing: .5px;
}

.forgot-change-button:hover {
    background: var(--purple-dark);
    box-shadow: 0 6px 15px rgba(89, 53, 156, .18);
    transform: translateY(-1px);
}

.forgot-change-button:disabled {
    cursor: not-allowed;
    opacity: .75;
    transform: none;
}

.forgot-change-button.loading i {
    animation: spin .8s linear infinite;
}

.forgot-password-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    color: #7c8994;
    font-size: 8px;
}

.forgot-password-security i {
    color: var(--success);
    font-size: 9px;
}

.portal-footer {
    min-height: 45px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-top: 1px solid #dce2e7;
    color: #7f8b96;
    font-size: 9px;
    font-weight: 500;
}

.portal-footer div:last-child {
    display: flex;
    gap: 9px;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}

@media (max-width: 760px) {

    .login-box {
        width: 450px;
        grid-template-columns: 1fr;
    }

    .login-info {
        min-height: 285px;
    }

    .info-notice {
        position: static;
        margin-top: 22px;
    }

    .login-form-area {
        padding: 32px 35px 28px;
    }

    .forgot-password-dialog {
        width: 430px;
    }

}

@media (max-width: 480px) {

    .portal-header {
        height: 64px;
    }

    .header-inner {
        max-width: calc(100% - 25px);
    }

    .brand-mark {
        width: 39px;
        height: 39px;
    }

    .brand-info h1 {
        font-size: 16px;
    }

    .brand-info p {
        font-size: 7px;
        letter-spacing: 1px;
    }

    .help-info {
        display: none;
    }

    .strip-inner {
        max-width: calc(100% - 25px);
        font-size: 10px;
    }

    .main-content {
        padding: 18px 10px;
    }

    .login-box {
        width: 100%;
    }

    .login-info {
        padding: 28px 23px;
    }

    .info-heading h2 {
        font-size: 22px;
    }

    .info-description {
        font-size: 11px;
    }

    .service-item {
        font-size: 10px;
    }

    .info-notice {
        left: 23px;
        right: 23px;
    }

    .login-form-area {
        padding: 28px 22px 25px;
    }

    .form-title h2 {
        font-size: 23px;
    }

    .form-title p {
        font-size: 10px;
    }

    .form-group label {
        font-size: 10px;
    }

    .input-group input {
        font-size: 11px;
    }

    .input-group input::placeholder {
        font-size: 10px;
    }

    .otp-success-box {
        padding: 10px;
    }

    .otp-success-box span {
        font-size: 8px;
    }

    .otp-actions {
        font-size: 8px;
    }

    .back-login-button {
        height: 36px;
        font-size: 9px;
    }

    .forgot-password-container {
        margin-top: 9px;
    }

    .forgot-password-link {
        font-size: 9px;
    }

    .forgot-password-dialog {
        width: 100%;
        padding: 22px 19px 19px;
        max-height: calc(100vh - 24px);
    }

    .forgot-password-title h2 {
        font-size: 19px;
    }

    .forgot-password-description {
        font-size: 9px;
    }

    .modal-input-group {
        margin-top: 13px;
    }

    .modal-password-input,
    .modal-text-input {
        height: 41px;
    }

    .forgot-password-actions {
        margin-top: 17px;
    }

    .portal-footer {
        min-height: 48px;
        padding: 9px 12px;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        font-size: 8px;
    }

}