﻿html, body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh !important;
    height: auto !important;
    background: #f4f8fb;
}

.login-page {
    min-height: 100vh;
    width: 100%;
    font-family: 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}

    .login-page .login-wrapper {
        display: flex;
        min-height: 100vh;
        position: relative;
    }

    .login-page .brand-section {
        flex: 0 0 60%;
        width: 60%;
        background: linear-gradient(135deg, rgba(10, 122, 169, 0.90) 0%, rgba(0, 82, 116, 0.85) 100%), url('/img/LoginPageBg.jpg') center/cover no-repeat;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: clamp(24px, 5vh, 60px);
    }

    .login-page .login-section {
        flex: 0 0 40%;
        width: 40%;
        background: #0f1720;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: clamp(24px, 5vh, 60px) 50px;
        position: relative;
    }

    .login-page .particles-bg {
        position: absolute;
        inset: 0;
        z-index: 1;
        overflow: hidden;
    }

    .login-page .particle {
        position: absolute;
        width: 3px;
        height: 3px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 50%;
        animation: floatParticle 15s infinite;
    }

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.login-page .grid-bg {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image: linear-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    animation: gridMoveScale 40s ease-in-out infinite, gridFade 12s ease-in-out infinite;
}

@keyframes gridMoveScale {
    0% {
        transform: translate(0, 0) scale(1);
        background-size: 50px 50px;
    }

    25% {
        transform: translate(12.5px, 12.5px) scale(1.15);
        background-size: 57.5px 57.5px;
    }

    50% {
        transform: translate(25px, 25px) scale(1.3);
        background-size: 65px 65px;
    }

    75% {
        transform: translate(37.5px, 37.5px) scale(1.15);
        background-size: 57.5px 57.5px;
    }

    100% {
        transform: translate(50px, 50px) scale(1);
        background-size: 50px 50px;
    }
}

@keyframes gridFade {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

.login-page .fintech-pattern {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.8;
    pointer-events: none;
}

.login-page .fintech-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.3);
    animation: iconFloat 20s infinite ease-in-out;
}

    .login-page .fintech-icon:nth-child(1) {
        top: 10%;
        left: 10%;
        font-size: 60px;
        animation-delay: 0s;
    }

    .login-page .fintech-icon:nth-child(2) {
        top: 20%;
        right: 15%;
        font-size: 50px;
        animation-delay: -3s;
    }

    .login-page .fintech-icon:nth-child(3) {
        bottom: 15%;
        left: 15%;
        font-size: 55px;
        animation-delay: -6s;
    }

    .login-page .fintech-icon:nth-child(4) {
        bottom: 25%;
        right: 10%;
        font-size: 65px;
        animation-delay: -9s;
    }

    .login-page .fintech-icon:nth-child(5) {
        top: 50%;
        left: 5%;
        font-size: 45px;
        animation-delay: -12s;
    }

    .login-page .fintech-icon:nth-child(6) {
        top: 60%;
        right: 8%;
        font-size: 50px;
        animation-delay: -15s;
    }

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.2;
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-10px) rotate(-5deg);
        opacity: 0.25;
    }

    75% {
        transform: translateY(-30px) rotate(3deg);
        opacity: 0.35;
    }
}

.login-page .brand-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    max-width: 600px;
}

.login-page .brand-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.login-page .brand-logo i {
    font-size: 60px;
    color: #fff;
}

.login-page .brand-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.login-page .brand-subtitle {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
}

.login-page .brand-quote {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    padding: 24px 30px;
    border-radius: 12px;
    margin-top: 40px;
    text-align: left;
}

.login-page .brand-quote-text {
    font-size: 16px;
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.6;
}

.login-page .brand-quote-author {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

.login-page .login-form-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
}

.login-page .login-header {
    margin-bottom: 36px;
    text-align: left;
    width: 100%;
}

.login-page .login-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-page .login-subtitle {
    font-size: 15px;
    color: #7f8a98;
    font-weight: 400;
    margin-bottom: 0;
}

.login-page .form-section {
    position: relative;
    width: 100%;
}

.login-page .form-group {
    margin-bottom: 20px;
    position: relative;
}

.login-page .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #dbe4ee;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.login-page .input-wrapper {
    position: relative;
}

.login-page .login-input {
    width: 100%;
    padding: 13px 44px 13px 16px;
    font-size: 14px;
    border: 1.5px solid #223041;
    border-radius: 10px !important;
    background: #17212c;
    color: #dce6f2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none !important;
}

    .login-page .login-input:focus {
        outline: none;
        border-color: var(--main, #0A7AA9);
        box-shadow: 0 0 0 3px rgba(10, 122, 169, 0.18) !important;
        background: #17212c;
        color: #ffffff;
    }

    .login-page .login-input::placeholder {
        color: #6f7c8d;
        font-size: 14px;
    }

.login-page .input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #647486;
    font-size: 16px;
    transition: color 0.3s;
    z-index: 3;
}

.login-page .login-input:focus ~ .input-icon {
    color: var(--main, #0A7AA9);
}

.login-page .toggle-password {
    cursor: pointer;
}

.login-page .captcha-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-page .captcha-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 驗證碼圖片 */
.login-page .captcha-image {
    width: 150px;
    height: 50px;
    border: 1.5px solid #223041;
    border-radius: 10px;
    background: #ffffff; /* 圖片本身維持白底 */
    cursor: pointer;
    transition: all 0.3s ease;
}

    .login-page .captcha-image:hover {
        border-color: var(--main);
        transform: scale(1.03);
    }

/* 重新整理按鈕 */
.login-page .captcha-refresh {
    width: 50px;
    height: 50px;
    border: 1.5px solid #223041;
    border-radius: 10px;
    background: #17212c;
    color: #9db0c5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

    .login-page .captcha-refresh:hover {
        border-color: var(--main);
        background: #1b2a37;
        color: var(--main);
        transform: rotate(180deg);
    }

    .login-page .captcha-refresh:active {
        transform: rotate(180deg) scale(0.95);
    }

.login-page .btn-login {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--main, #0A7AA9) 0%, var(--main2, #005274) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(10, 122, 169, 0.35);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    text-decoration: none;
}

    .login-page .btn-login::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
        transition: left 0.5s;
    }

    .login-page .btn-login:hover::before {
        left: 100%;
    }

    .login-page .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(10, 122, 169, 0.45);
    }

    .login-page .btn-login:active {
        transform: translateY(0);
    }

.login-page .auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-bottom: 18px;
    padding: 0 2px;
    gap: 12px;
}

.login-page .auth-link-left,
.login-page .auth-link-right {
    display: flex;
    align-items: center;
    line-height: 1;
    font-size: 13px;
}

.login-page .auth-link-right {
    color: #7f8a98;
    gap: 4px;
}

/* 左右連結樣式統一 */
.login-page .forgot-link-btn,
.login-page .signup-link-btn {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-size: 13px;
    font-weight: 600;
    color: #43a5d7;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
    vertical-align: middle;
    font-family: inherit;
}

    .login-page .forgot-link-btn:hover,
    .login-page .signup-link-btn:hover {
        color: #75c5ee;
        text-decoration: none;
    }

    .login-page .forgot-link-btn:focus,
    .login-page .signup-link-btn:focus {
        outline: none;
        box-shadow: none;
    }

.login-page .support-info {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #2b3745;
    text-align: center;
}

.login-page .support-title {
    font-size: 11px;
    font-weight: 600;
    color: #b4c0cd;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .login-page .support-title i {
        color: var(--main, #0A7AA9);
    }

.login-page .support-details {
    font-size: 11px;
    color: #7f8a98;
    line-height: 1.8;
}

    .login-page .support-details strong {
        color: #dbe4ee;
    }

    .login-page .support-details a {
        color: #4bb1e3;
        text-decoration: none;
    }

        .login-page .support-details a:hover {
            color: #79ccf3;
        }

.login-page .login-alert {
    border: 1px solid rgba(220, 53, 69, 0.35);
    background: rgba(220, 53, 69, 0.12);
    color: #ffb8c2;
    border-radius: 10px;
    font-size: 13px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.login-page .validation-summary:empty {
    display: none;
}

.login-page .text-danger {
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

@media (max-width: 992px) {
    body {
        overflow: auto;
        height: auto !important;
    }

    .login-page .login-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .login-page .brand-section,
    .login-page .login-section {
        width: 100%;
        flex: none;
    }

    .login-page .brand-section {
        min-height: 38vh;
        padding: 40px 30px;
    }

    .login-page .login-section {
        min-height: 62vh;
        padding: 40px 30px;
    }

    .login-page .brand-title {
        font-size: 32px;
    }

    .login-page .brand-quote {
        display: none;
    }
}

@media (max-width: 576px) {
    .login-page .brand-section {
        padding: 30px 20px;
    }

    .login-page .login-section {
        padding: 30px 20px;
    }

    .login-page .brand-logo {
        width: 80px;
        height: 80px;
    }

        .login-page .brand-logo i {
            font-size: 40px;
        }

    .login-page .brand-title {
        font-size: 28px;
    }

    .login-page .brand-subtitle {
        font-size: 16px;
    }

    .login-page .login-title {
        font-size: 26px;
    }

    .login-page .login-form-container {
        max-width: 100%;
    }

    .login-page .auth-links {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ===== MsgPage 專用 ===== */

.login-page .msg-form-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
}

.login-page .msg-card {
    background: rgba(23, 33, 44, 0.6);
    border: 1px solid #223041;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    backdrop-filter: blur(10px);
}

/* icon */
.login-page .msg-icon {
    font-size: 42px;
    color: var(--main, #0A7AA9);
    margin-bottom: 16px;
}

/* 訊息文字 */
.login-page .msg-content {
    font-size: 15px;
    color: #dce6f2;
    line-height: 1.8;
    margin-bottom: 28px;
    word-break: break-word;
}

/* 按鈕區 */
.login-page .msg-actions {
    display: flex;
    justify-content: center;
}

/* 覆蓋 btn-login 讓這頁看起來更適合 */
.login-page.msg-page .btn-login {
    width: auto;
    min-width: 160px;
    padding: 12px 24px;
    margin-bottom: 0;
}

/* ===== Register 專用 ===== */

.login-page .readonly-input {
    background-color: #101a24 !important;
    color: #9fb1c5 !important;
    cursor: not-allowed;
    border-color: #223041 !important;
}

    .login-page .readonly-input:focus {
        box-shadow: none !important;
        border-color: #223041 !important;
        background-color: #101a24 !important;
        color: #9fb1c5 !important;
    }

.login-page .auth-links-center {
    justify-content: center;
}

/* ===== RegisterRequest 專用 ===== */

.login-page .login-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px;
}

    .login-page .login-select option {
        color: #111827;
        background: #ffffff;
    }

    .login-page .login-select:disabled {
        background: #101a24;
        color: #7f8a98;
        cursor: not-allowed;
        opacity: 1;
    }

.login-page .auth-links-center {
    justify-content: center;
}

/* ===== 成功訊息頁專用 ===== */

.login-page .msg-card.msg-success .msg-icon {
    color: #22c55e;
}

/* ===== ResetMimaSuccess 專用 ===== */

.login-page .msg-redirect {
    margin-top: 16px;
    font-size: 13px;
    color: #7f8a98;
}

@media (max-height: 760px) {
    .login-page .login-section {
        justify-content: flex-start;
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .login-page .login-header {
        margin-bottom: 24px;
    }

    .login-page .support-info {
        margin-top: 24px;
        padding-top: 20px;
    }

    .login-page .brand-logo {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }

        .login-page .brand-logo i {
            font-size: 46px;
        }

    .login-page .brand-title {
        font-size: 34px;
        margin-bottom: 12px;
    }

    .login-page .brand-subtitle {
        margin-bottom: 24px;
    }

    .login-page .brand-quote {
        margin-top: 24px;
        padding: 18px 24px;
    }
}

/* 教學影片下載 */
.login-page .training-link {
    margin-top: 24px;
    text-align: center;
}

    .login-page .training-link a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 12px 24px;
        color: #ffffff;
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 10px;
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
    }

        .login-page .training-link a i {
            font-size: 16px;
            transition: transform 0.3s ease;
        }

        .login-page .training-link a:hover {
            color: #ffffff;
            text-decoration: none;
            background: rgba(255, 255, 255, 0.22);
            border-color: rgba(255, 255, 255, 0.6);
            transform: translateY(-2px);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
        }

            .login-page .training-link a:hover i {
                transform: translateY(2px);
            }

        .login-page .training-link a:active {
            transform: translateY(0);
        }