﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700&display=swap');

body {
    margin: 0;
    background: white;
    font-family: Arial, "Microsoft JhengHei", sans-serif;
    /* 使用 100dvh 能精確適應手機瀏覽器扣除網址列後的真實高度 */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* 主容器：讓內容在上下高度充裕時均勻伸展 */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* 電腦版適當邊距 */
}

/* 1. 中央主要包裹容器 */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

/* 2. LOGO 區域獨立控制大小 */
.logo-area {
    margin-bottom: 20px;
    text-align: center;
}

.logo-svg {
    width: 300px;
    max-width: 100%;
    height: auto;
}

/* 歡迎文字 */
.welcome-title {
    color: #212529;
    margin-bottom: 30px;
    letter-spacing: 1px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 40px;
    text-align: center;
}

/* 3. 卡片區域獨立固定寬度 */
.login-card {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: 16px;
    padding: 35px 30px;
    text-align: center;
    margin-bottom: 25px;
    box-sizing: border-box;
}

/* 帳密輸入區容器 */
.input-group-custom {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap; /* 允許長度不夠時自動換行（讓 Label 換到下一行） */
    align-items: center;
    width: 100%; /* 確保容器為 100% */
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 25px;
    color: #6c757d;
    z-index: 5;
    display: flex;
    align-items: center;
}

/* 強制輸入框填滿容器寬度 */
.form-control-custom {
    width: 100% !important;
    flex: 1 1 100%; /* 讓 flex 項目佔滿一整行 */
    height: 50px;
    padding-left: 48px !important;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 18px;
}

    .form-control-custom:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    }

/* 登入按鈕 */
.btn-login {
    width: 50%;
    height: 48px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    margin-top: 10px;
    background: #0070C9;
    color: white;
}

/* 4. 注意事項區塊 */
.notice-board {
    width: 100%;
    max-width: 380px;
    background-color: white;
    padding: 10px 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

    .notice-board ul {
        margin: 0;
        padding-left: 18px;
        color: #495057;
        line-height: 1.6;
        font-family: 'Noto Sans TC', sans-serif;
        font-weight: 700;
        font-size: 15px;
    }

/* 超連結區域 */
.extra-link-area {
    margin-top: 5px;
    text-align: center;
}

.link-btn-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    padding: 6px 12px;
    transition: color 0.2s;
}

    .link-btn-svg:hover {
        color: #0a58ca;
        text-decoration: none;
    }

    .link-btn-svg span {
        color: black;
        font-family: 'Noto Sans TC', sans-serif;
        font-weight: 500;
        font-size: 18px;
    }

.iconify-link {
    color: #0070C9;
    font-size: 32px;
}

/* 底層 Footbar */
.footer-bar {
    background: linear-gradient(to top, #002A58 0%, #0177D2 100%);
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    color: #ffffff;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 14px;
    font-weight: 300;
}

/* ==========================================
   行動裝置 (手機版) 專屬微調 - 自動收縮高度
   ========================================== */
@media screen and (max-width: 768px), screen and (max-height: 800px) {
    .login-container {
        padding: 15px 15px; /* 縮小容器上下邊界 */
    }

    .logo-area {
        margin-bottom: 10px;
    }

    .logo-svg {
        width: 220px; /* 手機版自動縮小 LOGO */
    }

    .welcome-title {
        font-size: 26px; /* 手機版縮小歡迎字體，避免過大 */
        margin-bottom: 15px;
    }

    .login-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .input-group-custom {
        margin-bottom: 16px; /* 縮小帳密輸入框的垂直間距 */
    }

    .form-control-custom {
        height: 44px;
        font-size: 16px;
    }

    .btn-login {
        height: 44px;
    }

    .notice-board {
        padding: 5px 15px;
        margin-bottom: 10px;
    }

        .notice-board ul {
            font-size: 13px;
            line-height: 1.5;
        }

    .link-btn-svg span {
        font-size: 15px;
    }

    .iconify-link {
        font-size: 26px;
    }

    .footer-bar {
        padding: 18px 0; /* 手機版縮小 Footbar padding */
        font-size: 12px;
    }
}
