/* 登入 / 忘記密碼 / 重設密碼 對話框（index.html、admin/index.html、en/index.html 共用） */
.lht-auth {
    --lht-primary: #008DDA;
    --lht-primary-dark: #0072B1;
    --lht-primary-light: #E6F4FC;
    padding: 0 16px;
}

#loginFormModal.lht-auth {
    margin-top: 0;
}

/* 需蓋過 index.min.css 的 #loginFormModal .modal-dialog（max-width:360px） */
.lht-auth .modal-dialog,
#loginFormModal.lht-auth .modal-dialog {
    max-width: 380px;
    margin: 1.75rem auto;
}

/* 需蓋過 index.min.css 的 #loginFormModal .modal-content（透明背景） */
.lht-auth .modal-content,
#loginFormModal.lht-auth .modal-content {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0, 60, 100, .28), 0 4px 12px rgba(0, 0, 0, .12);
}

.lht-auth .mdl-card {
    width: auto;
    min-height: 0;
    border-radius: 0;
    background: #fff;
}

/* 標題列 */
.lht-auth__header {
    display: flex;
    align-items: center;
    padding: 22px 56px 22px 24px;
    background: linear-gradient(135deg, var(--lht-primary) 0%, var(--lht-primary-dark) 100%);
    color: #fff;
}

/* DOMII 吉祥物 */
.lht-auth__icon {
    flex: none;
    width: 44px;
    height: 44px;
    margin-right: 14px;
    border-radius: 50%;
    background: #fff url(../img/domii-r-192.webp) center / cover no-repeat;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 6px rgba(0, 0, 0, .18);
}

.lht-auth__title {
    margin: 0;
    font-family: 'Microsoft JhengHei', 'Microsoft YaHei', sans-serif;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
}

/* 關閉按鈕：隱藏 &times; 字元，改以兩條細線繪製 */
.lht-auth button.close {
    top: 26px;
    right: 18px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 0;
    text-shadow: none;
    opacity: .55;
    cursor: pointer;
    transition: background-color .2s, opacity .2s;
}

.lht-auth button.close::before,
.lht-auth button.close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 1.5px;
    border-radius: 1px;
    background: #fff;
}

.lht-auth button.close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lht-auth button.close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.lht-auth button.close:hover,
.lht-auth button.close:focus {
    background: rgba(255, 255, 255, .12);
    opacity: 1;
    outline: 0;
}

/* 內容 */
.lht-auth .mdl-card__supporting-text {
    width: 100%;
    padding: 20px 24px 24px;
    color: #333;
    box-sizing: border-box;
}

.lht-auth__hint {
    display: block;
    margin: 0 0 4px;
    padding: 10px 12px;
    border-left: 3px solid var(--lht-primary);
    border-radius: 6px;
    background: var(--lht-primary-light);
    color: #1F5F85;
    font-size: 13px;
    line-height: 1.5;
}

.lht-auth .mdl-textfield {
    width: 100%;
}

.lht-auth .mdl-textfield__input {
    padding: 8px 0;
    border-bottom: 1px solid #C9D3DA;
    color: #222;
    outline: 0;
}

/* 需蓋過 index.min.css 的 #loginForm label */
.lht-auth .mdl-textfield__label,
.lht-auth #loginForm .mdl-textfield__label {
    color: #8A969E;
    font-weight: normal;
}

.lht-auth .mdl-textfield__label:after {
    background-color: var(--lht-primary);
}

.lht-auth .mdl-textfield--floating-label.is-focused .mdl-textfield__label,
.lht-auth .mdl-textfield--floating-label.is-dirty .mdl-textfield__label,
.lht-auth #loginForm .mdl-textfield--floating-label.is-focused .mdl-textfield__label,
.lht-auth #loginForm .mdl-textfield--floating-label.is-dirty .mdl-textfield__label {
    color: var(--lht-primary);
}

/* 瀏覽器自動填入時 MDL 不會加 is-dirty，標籤改為浮起避免與文字重疊 */
.lht-auth .mdl-textfield__input:-webkit-autofill ~ .mdl-textfield__label {
    top: 4px;
    font-size: 12px;
    visibility: visible;
}

.lht-auth .mdl-textfield__input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px #fff inset;
}

.lht-auth .mdl-textfield.is-invalid .mdl-textfield__label,
.lht-auth #loginForm .mdl-textfield.is-invalid .mdl-textfield__label {
    color: #D50000;
}

.lht-auth .mdl-textfield.is-invalid .mdl-textfield__label:after {
    background-color: #D50000;
}

/* 錯誤訊息 */
#resultDiv,
#resetResultDiv {
    margin: 4px 0 12px !important;
    min-height: 18px;
    color: #D50000;
    font-size: 13px;
    text-align: center;
}

/* 送出按鈕 */
.lht-auth .mdl-button--accent.mdl-button--accent.mdl-button--raised {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 8px;
    border-radius: 8px;
    background-color: var(--lht-primary);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    box-shadow: 0 1px 3px rgba(0, 114, 177, .25);
    transition: background-color .2s, box-shadow .2s;
}

.lht-auth .mdl-button--accent.mdl-button--accent.mdl-button--raised:hover,
.lht-auth .mdl-button--accent.mdl-button--accent.mdl-button--raised:focus {
    background-color: var(--lht-primary-dark);
    box-shadow: 0 2px 6px rgba(0, 114, 177, .3);
}

.lht-auth .mdl-button--accent.mdl-button--accent.mdl-button--raised:active {
    box-shadow: 0 1px 2px rgba(0, 114, 177, .25);
}
