/* ============================================================
   登出按鈕（Header 用）
   ============================================================ */
.logout-form-header {
    display: inline;
    margin: 0;
    padding: 0;
}

.logout-form-header button {
    background: none !important;
    border: none !important;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    padding: 6px 12px;
    transition: color 0.2s;
    font-family: inherit;
}

.logout-form-header button:hover {
    color: #d32f2f;
    background: none !important;
}

.loginBG{position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;}
/* capchk 我是人類按鍵 */
#capchk{border:2px solid #5599ff;color:#5599ff;}
#capchk{width:calc(100% - 20px);text-align:center;font-size:20px!important;line-height:40px!important;display:inline-block;padding:0 8px;border-radius:5px;font-weight:bold;}
#capchk i{margin-right:10px;}

.w100 {
    width: 100%;
}
.none400{display:none;}
.show400{display:none!important;}
.hide400{display:block;}
.pager-btn {
display: inline-flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
text-decoration: none;
}

@media (max-width: 720px) {
	.show400{display:block!important;}
	.hide400{display:none!important;}
}

/* ============================================================
   login.css - 登入頁 + 簡訊驗證頁
   包含 RWD 手機版
   ============================================================ */

/* ============================================================
   1. 登入容器
   ============================================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 20px;
    background: #f5f7fa;
}

/* ============================================================
   2. 登入框
   ============================================================ */
.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px 35px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8ecf1;
}

.login-box h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 25px;
}

/* ============================================================
   3. 表單群組
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.form-group .redtext {
    color: #d32f2f;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fafbfc;
}

.form-control:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
    background: #fff;
}

.form-control.error {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* ============================================================
   4. 登入按鈕
   ============================================================ */
.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #2e7d32;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 5px;
}

.login-btn:hover {
    background: #1b5e20;
}

/* ============================================================
   5. 簡訊驗證提示
   ============================================================ */
.sms-tip {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: #f0f7ff;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
    line-height: 1.6;
}

/* ============================================================
   6. 錯誤 / 成功訊息
   ============================================================ */
.error-msg {
    padding: 12px 15px;
    background: #fde8e8;
    color: #c62828;
    border-radius: 8px;
    border-left: 4px solid #c62828;
    font-size: 14px;
    margin-bottom: 18px;
}

.success-msg {
    padding: 12px 15px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
    font-size: 14px;
    margin-bottom: 18px;
}

/* ============================================================
   7. 連結區
   ============================================================ */
.login-links {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #666;
}

.login-links a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-links .divider {
    color: #ccc;
    margin: 0 8px;
}

/* ============================================================
   8. RWD - 手機版 (768px 以下)
   ============================================================ */
@media screen and (max-width: 768px) {
    .login-container {
        min-height: calc(100vh - 100px);
        padding: 15px;
    }

    .login-box {
        padding: 28px 20px;
        border-radius: 10px;
    }

    .login-box h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-control {
        padding: 11px 14px;
        font-size: 16px;
        /* 防止 iOS 自動放大 */
    }

    .login-btn {
        padding: 13px;
        font-size: 15px;
    }

    .sms-tip {
        font-size: 13px;
        padding: 10px 12px;
    }

    .error-msg,
    .success-msg {
        font-size: 13px;
        padding: 10px 12px;
    }

    .login-links {
        font-size: 13px;
    }
}

/* ============================================================
   9. RWD - 超小手機 (480px 以下)
   ============================================================ */
@media screen and (max-width: 480px) {
    .login-box {
        padding: 22px 16px;
        border-radius: 8px;
    }

    .login-box h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 15px;
    }

    .login-btn {
        padding: 12px;
        font-size: 14px;
    }

    .sms-tip {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* ============================================================
   10. 額外：註冊頁也可共用（選用）
   ============================================================ */
.register-box {
    max-width: 460px;
}

.register-box .form-group .hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

/* ============================================================
   11. Header / Footer 樣式（給 header.php 和 footer.php 用）
   ============================================================ */
/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    padding: 0 30px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header .logo img {
    height: 40px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-nav .nav-link {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background 0.2s;
}

.header-nav .nav-link:hover {
    background: #f0f0f0;
}

.header-nav .register-btn {
    background: #2e7d32;
    color: #fff;
}

.header-nav .register-btn:hover {
    background: #1b5e20;
}

.header-nav .logout-btn {
    color: #d32f2f;
}

.header-nav .logout-btn:hover {
    background: #fde8e8;
}

.header-nav .user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a2332;
}

/* Footer */
.footer {
    background: #f5f7fa;
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: #999;
    border-top: 1px solid #e8ecf1;
}

/* ============================================================
   12. Header RWD
   ============================================================ */
@media screen and (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: 58px;
    }

    .header .logo img {
        height: 32px;
    }

    .header-nav {
        gap: 10px;
    }

    .header-nav .nav-link {
        font-size: 13px;
        padding: 5px 10px;
    }

    .header-nav .user-name {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .header {
        padding: 0 12px;
        height: 52px;
    }

    .header .logo img {
        height: 28px;
    }

    .header-nav {
        gap: 6px;
    }

    .header-nav .nav-link {
        font-size: 12px;
        padding: 4px 8px;
    }

    .header-nav .user-name {
        font-size: 12px;
    }
}