/**
 * 登入頁面樣式
 * Login Page Styles
 */

/* ========================================
   登入頁面 - 現代化設計
   ======================================== */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    padding: 2rem 0;
}

/* 登入卡片 */
.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

/* 頂部圖片區 */
.login-banner {
    position: relative;
    overflow: hidden;
}

.login-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* 內容區 */
.login-content {
    padding: 2rem 2.5rem 2.5rem;
}

/* 歡迎標題 */
.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.6rem;
}

.login-header .subtitle {
    font-size: 1.85rem;
    color: #718096;
    font-weight: 400;
}

/* 輸入框組 */
.input-group-modern {
    margin-bottom: 1.25rem;
}

.input-group-modern label {
    display: block;
    font-size: 1.6rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem;
}

.input-group-modern .input-wrapper {
    position: relative;
}

.input-group-modern input {
    width: 100%;
    padding: 1.35rem 1.75rem;
    font-size: 1.7rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.input-group-modern input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group-modern input::placeholder {
    color: #a0aec0;
}

.input-group-modern .toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s;
}

.input-group-modern .toggle-password:hover {
    color: #667eea;
}

/* 連結區 */
.login-options a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.login-options a:hover {
    text-decoration: underline;
}

/* 登入按鈕 */
.btn-login {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* 底部連結區 */
.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.login-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem 3rem;
    font-size: 1.55rem;
}

.login-footer-links a {
    color: #718096;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer-links a:hover {
    color: #667eea;
}

.login-footer .register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #718096;
    font-size: 1.6rem;
}

.login-footer .register-link a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.login-footer .register-link a:hover {
    text-decoration: underline;
}

/* 帳號提示區 - 小巧版 */
.hint-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: #667eea;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1rem;
}

.hint-toggle-btn:hover {
    text-decoration: underline;
}

.hint-panel {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 1.5rem;
    color: #4a5568;
}

.hint-panel ul {
    margin: 0;
    padding-left: 1.25rem;
}

.hint-panel li {
    margin-bottom: 0.4rem;
}

.hint-panel li:last-child {
    margin-bottom: 0;
}

.hint-panel code {
    background: #edf2f7;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 1.4rem;
    color: #e53e3e;
}

.hint-panel a {
    color: #667eea;
    font-weight: 500;
}

/* 訊息提示 */
.login-alert {
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* ========================================
   Standard Modal 樣式（登入頁面專用）
   ======================================== */
.standard-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.standard-modal .modal-header .modal-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    color: white !important;
}

.standard-modal .modal-header .modal-title i {
    font-size: 18px;
    color: white;
}

.standard-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.standard-modal .modal-header .btn-close:hover {
    opacity: 1;
}

.standard-modal .modal-body {
    padding: 1.5rem;
}

.standard-modal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.standard-modal .modal-footer .btn-modal-cancel {
    background: white;
    border: 2px solid #6c757d;
    color: #333;
    min-width: 100px;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.standard-modal .modal-footer .btn-modal-cancel:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.35);
}

.standard-modal .modal-footer .btn-modal-confirm {
    background: white;
    border: 2px solid #667eea;
    color: #333;
    min-width: 100px;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.standard-modal .modal-footer .btn-modal-confirm:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ========================================
   鄉鎮代碼查詢 Modal
   ======================================== */
#townCodeModal .town-table-header {
    background: linear-gradient(135deg, #f0f3ff 0%, #f5f0ff 100%);
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

#townCodeModal .town-table-header th {
    padding: 0.85rem 1rem;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    border: none;
}

/* 鄉鎮代碼查詢表格 - 滾動區域 */
#townCodeModal .town-table-body {
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

#townCodeModal .town-table-body::-webkit-scrollbar {
    width: 6px;
}

#townCodeModal .town-table-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#townCodeModal .town-table-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#townCodeModal .table tbody td {
    padding: 0.65rem 1rem;
    font-size: 14px;
    border-color: #f0f0f0;
}

#townCodeModal .table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.08);
}

#townCodeModal .table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

/* 搜尋框美化 */
#townCodeModal .input-group {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

#townCodeModal .input-group:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#townCodeModal .input-group-text {
    border: none;
    padding-left: 1rem;
}

#townCodeModal .input-group .form-control {
    border: none;
    box-shadow: none;
    font-size: 14px;
}

#townCodeModal .input-group .form-control:focus {
    box-shadow: none;
}