﻿:root {
    --brand: #1a56db;
    --brand-d: #1241a8;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI','PingFang TC','Microsoft JhengHei',sans-serif;
    background: #f0f4ff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wrap {
    display: flex;
    width: 100%;
    max-width: 860px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(26,86,219,.1);
    overflow: hidden;
    min-height: 520px;
}

/* 左側 */
.brand {
    flex: 0 0 340px;
    background: linear-gradient(145deg, #d31b21 0%, #263c6b 60%, #5e87cb 100%);
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    .brand::before {
        content: '';
        position: absolute;
        width: 260px;
        height: 260px;
        border-radius: 50%;
        background: rgba(255,255,255,.06);
        top: -80px;
        right: -70px;
    }

    .brand::after {
        content: '';
        position: absolute;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: rgba(255,255,255,.05);
        bottom: -50px;
        left: -50px;
    }

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

    .brand-logo .ic {
        /* width: 38px; */
        height: 50px;
        /*background: rgba(255,255,255,.2); */
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 19px;
    }

.brand-tag {
    position: relative;
    z-index: 1;
}

    .brand-tag h2 {
        color: #fff;
        font-size: 21px;
        font-weight: 700;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .brand-tag p {
        color: rgba(255,255,255,.75);
        font-size: 13px;
        line-height: 1.7;
    }

.brand-feats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feat {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255,255,255,.85);
    font-size: 13px;
}

    .feat i {
        font-size: 15px;
        color: #93c5fd;
    }

/* 右側 */
.form-panel {
    flex: 1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fh {
    margin-bottom: 28px;
}

    .fh h1 {
        font-size: 22px;
        font-weight: 700;
        color: #111827;
        margin-bottom: 5px;
    }

    .fh p {
        color: #6b7280;
        font-size: 13px;
    }

.fg {
    margin-bottom: 18px;
}

.flabel {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.iw {
    position: relative;
}

    .iw i.ico {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
        color: #9ca3af;
        pointer-events: none;
    }

.fc {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 38px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color .15s,box-shadow .15s;
}

    .fc:focus {
        border-color: var(--brand);
        box-shadow: 0 0 0 3px rgba(26,86,219,.11);
    }

    .fc.input-validation-error {
        border-color: #ef4444;
    }

.field-validation-error {
    display: block;
    font-size: 11px;
    color: #ef4444;
    margin-top: 3px;
}

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

.toggle-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
}

    .toggle-eye:hover {
        color: var(--brand);
    }

.chk-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
}

    .chk-row input {
        width: 15px;
        height: 15px;
        accent-color: var(--brand);
        cursor: pointer;
    }

    .chk-row label {
        font-size: 13px;
        color: #6b7280;
        cursor: pointer;
    }

.btn-login {
    width: 100%;
    height: 46px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background .15s,transform .1s;
    letter-spacing: .2px;
}

    .btn-login:hover {
        background: var(--brand-d);
    }

    .btn-login:active {
        transform: scale(.98);
    }

    .btn-login:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

.err-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 9px;
    padding: 11px 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #b91c1c;
}

.divider {
    height: 1px;
    background: #e5e7eb;
    margin: 24px 0 18px;
}

.footer-note {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 600px) {
    .brand {
        display: none;
    }

    .form-panel {
        padding: 36px 24px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}


.login-wrapper {
    min-height: 100vh;
    padding: 16px;
    background: #eef0ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 1180px;
    min-height: 680px;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
}

.login-left {
    background: linear-gradient(135deg, #3f2ee8, #536dff);
    color: #fff;
    padding: 48px 56px;
}

.login-right {
    padding: 72px 66px;
    display: flex;
    align-items: center;
}

.login-form {
    width: 100%;
    max-width: 572px;
    margin: 0 auto;
}

@media (max-width: 991.98px) {
    .login-card {
        max-width: 560px;
        min-height: auto;
    }

    .login-right {
        padding: 48px 32px;
    }
}

@media (max-width: 575.98px) {
    .login-wrapper {
        padding: 0;
        align-items: stretch;
    }

    .login-card {
        border-radius: 0;
        min-height: 100vh;
    }

    .login-right {
        padding: 40px 22px;
    }

    .login-form {
        max-width: 100%;
    }

    .btn-login {
        width: 100%;
    }
}
.icon-img {
/*    width: 38px;*/
    height: 50px;
    object-fit: contain;
}

/* ── 頁面 Loading Overlay ── */
#pg-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(145deg, #d31b21 0%, #263c6b 60%, #5e87cb 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    transition: opacity .45s ease;
}
#pg-loading.ld-hide {
    opacity: 0;
    pointer-events: none;
}
#pg-loading .ld-logo {
    height: 68px;
    object-fit: contain;
}
#pg-loading .ld-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .4px;
    text-align: center;
}
#pg-loading .ld-ring {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255,255,255,.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}
#pg-loading .ld-text {
    font-size: 13px;
    color: rgba(255,255,255,.75);
    letter-spacing: .3px;
}
.footer-logo {
    /*display: flex;*/
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}
    .footer-logo .ic {
        /* width: 38px; */
        height: 50px;
        /*background: rgba(255,255,255,.2); */
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 19px;
    }
