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

.login-page {
    --amber: #e0b462;
    --amber-deep: #c8923a;
    --amber-soft: #f3e2c0;
    --ink: #3a4a63;
    --ink-soft: #6b7a92;
    --muted: #9aa3b2;
    --line: #e7e3dc;
    --field-bg: #f5f3f0;

    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 64px;
    font-family: 'Noto Sans TC', '微軟正黑體', 'Microsoft JhengHei', sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fbf9f5 0%, #f6f1e8 55%, #f0e6d2 100%);
    position: relative;
    overflow-x: hidden;
}

/* 底部暖色弧形裝飾 */
.login-page::after {
    content: "";
    position: fixed;
    left: -10%;
    right: -10%;
    bottom: -55vw;
    height: 80vw;
    border-radius: 50% 50% 0 0;
    background: radial-gradient(ellipse at center top, #ecd9ab 0%, #e6cd96 45%, transparent 70%);
    opacity: .55;
    z-index: 0;
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* ===== 校徽 / 標題 ===== */
.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 5 / 1;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
}

.login-brand-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--amber);
    border-radius: 8px;
    background: #fff;
    color: var(--amber-deep);
    font-size: 24px;
    font-weight: 800;
}

.login-portal {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--amber-deep);
    letter-spacing: 1px;
}

/* ===== 登入卡片 ===== */
.login-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 30px 28px 26px;
    box-shadow: 0 18px 48px rgba(120, 95, 40, .12);
}

.login-field {
    margin-bottom: 14px;
}

.login-field-label {
    display: block;
    font-size: 12px;
    color: var(--ink-soft);
    margin-bottom: 6px;
    letter-spacing: .5px;
}

/* 身份別提示 */
.identity-hint {
    background: #f7ece9;
    border: 1px solid #f0dcd6;
    border-radius: 9px;
    padding: 13px 14px;
    font-size: 13px;
    color: #b08a82;
}

/* 一般輸入框 */
.login-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: var(--field-bg);
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 14px;
    color: var(--ink);
    font-family: inherit;
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.login-input::placeholder {
    color: #a7adb8;
}

.login-input:focus {
    background: #fff;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(224, 180, 98, .18);
}

/* 密碼欄（含顯示切換） */
.input-group {
    position: relative;
}

.input-group .login-input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 46px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-pw:hover {
    color: var(--ink-soft);
}

/* 驗證碼欄（輸入框 + 圖片並排） */
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.captcha-group .login-input {
    flex: 1;
}

.captcha-img {
    height: 46px;
    width: 110px;
    border-radius: 9px;
    border: 1px solid var(--line);
    object-fit: cover;
    cursor: pointer;
    background: var(--amber-soft);
    flex-shrink: 0;
}

/* 欄位驗證錯誤訊息 */
.login-field .field-validation-error {
    display: block;
    color: #d6604a;
    font-size: 12px;
    margin-top: 5px;
}

/* ===== 按鈕 ===== */
.btn-login {
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(135deg, #e6bc6e 0%, #d9a94a 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: filter .15s, box-shadow .15s;
    box-shadow: 0 6px 16px rgba(217, 169, 74, .35);
    font-family: inherit;
}

.btn-login:hover {
    filter: brightness(1.04);
}

.btn-forgot {
    width: 100%;
    height: 46px;
    margin-top: 12px;
    border: 1px solid var(--amber);
    border-radius: 9px;
    background: #fff;
    color: var(--amber-deep);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background .15s;
    font-family: inherit;
}

.btn-forgot:hover {
    background: #fdf8ee;
}

/* ===== 注意事項卡片 ===== */
.notice-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 20px;
    box-shadow: 0 8px 24px rgba(120, 95, 40, .08);
}

.notice-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notice-list {
    list-style: none;
}

.notice-list li {
    position: relative;
    padding-left: 16px;
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 6px;
}

.notice-list li:last-child {
    margin-bottom: 0;
}

.notice-list li::before {
    content: "•";
    position: absolute;
    left: 2px;
    color: var(--amber-deep);
}

.notice-list .em {
    color: var(--amber-deep);
    font-weight: 700;
}

.notice-list a {
    color: var(--amber-deep);
    font-weight: 700;
}

@media (max-width: 480px) {
    .login-page {
        padding: 28px 12px 48px;
    }

    .login-card {
        padding: 24px 20px 22px;
    }
}
