/* ... existing code ... */

.FormSection {
    display: grid;
    grid-template-columns: 100px 1fr; /* 修改第一列为 100px */
    gap: 8px 14px;
    padding: 0 10px;
    align-items: center;
    max-width: 560px;
    margin: 0 auto;

}

/* 每組欄位使用兩格：左為標籤，右為控制項 */
.FormDiv {
    display: contents; /* 讓內部子元素直接參與 grid 佈局 */
}

/* 標籤欄 */
.FormDiv .FormDivTitle {
    grid-column: 1 / 2;
    line-height: 32px; /* 原為 36px，縮短讓上下更貼近 */
    width: 100px;
    font-weight: 600 !important;
    color: #fff;
    display: inline-block;
    margin-bottom: 0; /* 確保無額外間距 */
}

/* 控制項欄 */
.FormDiv .FormControl {
    grid-column: 2 / 3;
}

.Input {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    line-height: 22px;
    height: 38px; /* 原為 40px，微縮提高貼近感 */
    padding: 0 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    background:#fff;
    width: 100%;
    max-width: 420px;
}
.Input:focus {
    border-color: #335dff;
    box-shadow: 0 0 0 3px rgba(51,93,255,0.15);
}
.Input::placeholder {
    color:#9ca3af;
}

/* 密碼輸入容器（含顯示切換按鈕） */
.PasswordWrap {
    position: relative;
    width: 100%;
    max-width: 420px;
}
.PasswordToggleBtn {
    position:absolute;
    right:8px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:transparent;
    cursor:pointer;
    color:#6b7280;
    line-height: 1;
    padding: 6px; /* 提升可點擊區域 */
}

/* 記住我：跨兩欄，並垂直置中 */
.FormDiv--inline {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.FormDiv--inline input[type="checkbox"]{
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 提交區：跨兩欄，按鈕自適應換行 */
.FormActions {
    grid-column: 1 / -1;
    margin-top: 4px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
}
.FormActions .UIButton {
    min-width: 160px;
}

/* 寬度工具維持，但在小螢幕調整為滿版 */
.W-100 { min-width: 220px; }
.W-70 { min-width: 160px; }

/* LoginBlock 內距統一 */
.LoginBlock {
    padding: 16px;
}

/* 原有輸入統一樣式（保留相容性） */
.LoginBlock input{
    border-radius: 8px;
    line-height: 22px;
    border: 1px solid #e5e7eb;
    padding-left: 12px;
    margin-bottom: 2px;
    height: 40px;
}

/* Buttons */
.UIButton {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: transform .05s ease, box-shadow .15s ease, background-color .15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    user-select: none;
}
.UIButton:active {
    transform: translateY(1px);
}
.UIButton.Primary {
    background: #335dff;
    color: #fff;
}
.UIButton.Primary:hover { background:#224cff; }
.UIButton.Success {
    background: #06c755;
    color: #fff;
}
.UIButton.Success:hover { background:#05a646; }
.UIButton.Ghost {
    background: #f3f4f6;
    color: #111827;
}
.UIButton.Ghost:hover { background:#e5e7eb; }

/* Alerts */
.SFAlert {
    border-radius: 8px;
    background: #f1f8ff;
    color: #0b69ff;
    padding: 10px 12px;
    margin: 8px 10px;
    border: 1px solid #d6e8ff;
}

/* News interaction */
.NewsList li:hover { background:#f9fafb; }

/* 桌機：LoginNewsLayout 雙欄（公告 + 登入） */
@media screen and (min-width: 992px) {
    .LoginNewsLayout {
        display:grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
        align-items:start !important;
    }
}

/* 平板與手機：FormSection 單欄、按鈕滿版 */
@media screen and (max-width: 768px) {
    .FormSection {
        grid-template-columns: 1fr;
        gap: 8px; /* 原為 10px，縮小行距 */
        padding: 0 8px;
    }
    .FormDiv .FormDivTitle {
        grid-column: 1 / -1;
        line-height: 26px; /* 原為 28px，縮短 */
        margin-bottom: 2px; /* 標籤與輸入更靠近 */
    }
    .FormDiv .FormControl,
    .PasswordWrap,
    .Input {
        grid-column: 1 / -1;
        max-width: 100%;
        width: 100%;
    }
    .FormActions .UIButton,
    .W-100, .W-70 {
        width: 100%;
        min-width: 0;
    }
}

/* 小手機微調 */
@media screen and (max-width: 475px) {
    .LoginBlock {
        width: 100%;
        height: auto;
        top: 0;
        left: 0;
        padding: 14px;
    }
}

.ServiceBody {
    flex: 1;
    padding: 4px;
    transition: all 0.3s ease;
}

.ServiceTitle {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 8px;
    position: relative;
    padding-bottom: 8px;
}

.ServiceTitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #335dff;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s ease;
}

.ServiceDesc {
    color: #4a5568;
    line-height: 1.7;
    font-size: 14px;
    margin-top: 4px;
    transition: color 0.3s ease;
}

/* 互動效果 */
.ServiceCard:hover .ServiceTitle::after {
    opacity: 1;
    transform: scaleX(1);
}

.ServiceCard:hover .ServiceBody {
    transform: translateX(6px);
}

.ServiceCard:hover .ServiceDesc {
    color: #335dff;
}
