/* 強制防堵水平溢出與滾動，防止 Focus 時瀏覽器發生水平放大偏移 */
html,
body,
.wrapper {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* 強制解除 Swift 樣板對登入頁面寬度的限制，實現真正的全螢幕滿版 */
.page-body.auth {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-body.auth .container-fluid {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-body.auth .row.g-0 {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 全域（手機版）：保持 Swift 原生裝飾線，白色卡片蓋在上方 */
.wrapper .page-body.auth::before,
.wrapper .page-body.auth::after {
    z-index: 10 !important;
}

.page-body.auth .card {
    position: relative !important;
    z-index: 12 !important;
}

/* ============================================================
       桌機版（≥992px）：
       兩條裝飾線都改用 position: fixed + vw，統一視窗座標系。
       
       Swift 原生：兩線都是 right:18%，橘色寬 460px，粉色寬 40px。
       它們共用同一個右邊界，橘色是從 right:18% 往左延伸 460px，
       粉色是從 right:18% 往左延伸 40px（壓在橘色右側之上）。
       
       本方案目標（圖二效果）：
         - 粉色線：position:fixed; right:18%; width:40px — 維持原位
         - 橘色填滿：position:fixed; left:50vw; right:calc(18% + 40px) — 從大圖接到粉色線左緣
         兩者 right 端對齊 → 緊密相連，無縫隙！
    ============================================================ */
@media (min-width: 992px) {

    /* 左側大圖 col 佔 50% */
    .page-body.auth .col-lg-6.d-none.d-lg-block {
        max-width: 50% !important;
        width: 50% !important;
        position: relative !important;
        overflow: hidden !important;
        background-color: transparent !important;
    }

    /* 右側登入 col 佔 50% */
    .page-body.auth .col-lg-6.d-flex {
        max-width: 50% !important;
        width: 50% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 大圖容器精確填滿左側 50% */
    .login-left-wrapper {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        min-height: 100vh !important;
        overflow: hidden !important;
        z-index: 1 !important;
        background: var(--secondary-color);
    }

    /*
         * 橘色填滿區（::before）：
         * left: 50vw（大圖右緣）→ right: calc(18% + 40px)（粉色線左緣）
         * 兩線緊密相連，橘色右緣 = 粉色線左緣 → 零縫隙！
         */
    .wrapper .page-body.auth::before {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        left: 50vw !important;
        right: calc(18% + 40px) !important;
        width: auto !important;
        background: var(--secondary-color) !important;
        z-index: 10 !important;
    }

    /*
         * 粉色線（::after）：
         * 同樣改為 position:fixed，維持 Swift 原生的 right:18%; width:40px。
         * 統一座標系後，兩線完美對齊相連！
         */
    .wrapper .page-body.auth::after {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        right: 18% !important;
        width: 40px !important;
        background: var(--primary-color) !important;
        z-index: 11 !important;
    }
}

/* 確保左側輪播大圖高度拉滿，不強設寬度以免破壞 Bootstrap slide 動畫 */
#loginCarousel,
#loginCarousel .carousel-inner,
#loginCarousel .carousel-item {
    height: 100% !important;
    min-height: 100vh !important;
}