
body.login,
body.login-portal {
    background: #f7f3ea;
    color: #17345f;
    margin: 0;
}
.login-page-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 20px 56px;
}
.login-hero {
    background: linear-gradient(135deg, #0b3d6d 0%, #1f5b90 100%);
    color: #fff;
    border-radius: 28px;
    padding: 34px 36px;
    margin-bottom: 28px;
    box-shadow: 0 18px 36px rgba(10, 48, 88, .14);
}
.login-hero .eyebrow {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #ffd39a;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.login-hero h1 {
    font-size: 48px;
    line-height: 1.15;
    margin: 0 0 14px;
    color: #fff;
}
.login-hero p {
    font-size: 20px;
    line-height: 1.8;
    margin: 0;
    color: rgba(255,255,255,.92);
}
.login-grid {
    display: grid;
    grid-template-columns: minmax(340px, 460px) minmax(420px, 1fr);
    gap: 24px;
    align-items: start;
}
.login-panel,
.portal-panel,
.sso-panel {
    background: #fff;
    border: 1px solid #dbe5ee;
    border-radius: 28px;
    box-shadow: 0 16px 32px rgba(26, 44, 72, .08);
}
.login-panel {
    padding: 28px;
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.login-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 4px;
}
.login-brand-text h2 {
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 4px;
    color: #17345f;
}
.login-brand-text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #60738f;
}
.login-note {
    background: #f6f9fc;
    border: 1px solid #dbe5ee;
    border-radius: 16px;
    padding: 14px 16px;
    margin: 0 0 18px;
    color: #435b71;
    line-height: 1.8;
    font-size: 15px;
}
.login-field {
    margin-bottom: 16px;
}
.login-field label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #17345f;
    margin-bottom: 8px;
}
.login-field input.text,
.captcha-input,
.login-input input.text {
    width: 100% !important;
    min-height: 52px !important;
    height: 52px !important;
    box-sizing: border-box !important;
    padding: 0 16px !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 14px !important;
    background: #fff !important;
    font-size: 17px !important;
    color: #17345f !important;
    box-shadow: none !important;
}
.login-field input.text:focus,
.captcha-input:focus,
.login-input input.text:focus {
    outline: none;
    border-color: #7fa6c8 !important;
    box-shadow: 0 0 0 4px rgba(24, 86, 142, .12) !important;
}
.login-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}
.captcha-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.captcha-image {
    width: 96px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #d8dee8;
    background: #fff;
}
.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #d8dee8;
    color: #17345f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    text-decoration: none;
    cursor: pointer;
}
.icon-btn:hover {
    border-color: #b9cfe5;
    color: #18568e;
}
.login-error {
    min-height: 22px;
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #c62828;
}
.login-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 6px;
}
.primary-btn,
.secondary-btn,
.quick-link,
.login-panel .btn-block,
.sso-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 17px;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.primary-btn,
.login-panel .btn-block {
    width: 100%;
    border: 0 !important;
    background: #ff9200 !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(255, 146, 0, .24);
    cursor: pointer;
}
.primary-btn:hover,
.login-panel .btn-block:hover {
    transform: translateY(-1px);
}
.secondary-btn,
.quick-link {
    border: 1px solid #dbe5ee;
    background: #fff;
    color: #b96a00;
}
.portal-panel {
    padding: 26px;
}
.portal-panel h3,
.sso-panel h3 {
    font-size: 28px;
    margin: 0 0 10px;
    color: #17345f;
}
.portal-panel p.lead,
.sso-panel p.lead {
    margin: 0 0 18px;
    color: #60738f;
    line-height: 1.9;
    font-size: 16px;
}
.portal-group {
    margin-top: 20px;
}
.portal-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 800;
    color: #17345f;
}
.portal-card-grid,
.sso-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.portal-card,
.sso-card {
    display: block;
    background: #f8fbfe;
    border: 1px solid #dbe5ee;
    border-radius: 20px;
    padding: 18px 18px 16px;
    text-decoration: none;
    color: #17345f;
}
.portal-card:hover,
.sso-card:hover {
    border-color: #b9cfe5;
    box-shadow: 0 14px 24px rgba(23, 52, 95, .08);
}
.portal-card strong,
.sso-card strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}
.portal-card span,
.sso-card span {
    display: block;
    font-size: 14px;
    line-height: 1.8;
    color: #60738f;
}
.sso-card .tag {
    display: inline-flex;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef5fb;
    color: #18568e;
    font-size: 12px;
    font-weight: 800;
}
.portal-tips {
    margin-top: 18px;
    background: #f6f9fc;
    border: 1px dashed #cfd8e5;
    border-radius: 16px;
    padding: 16px 18px;
    color: #52647e;
    line-height: 1.9;
    font-size: 14px;
}
.portal-tips ul {
    margin: 8px 0 0 18px;
    padding: 0;
}
.portal-tips li { margin-bottom: 6px; }
.sso-page-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 20px 56px;
}
.sso-grid {
    display: grid;
    grid-template-columns: minmax(340px, 460px) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
}
.sso-brand-panel {
    padding: 28px;
}
.sso-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.sso-brand img {
    width: 82px;
    max-width: 82px;
    height: auto;
    object-fit: contain;
}
.sso-brand .name {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    color: #17345f;
    margin-bottom: 6px;
}
.sso-brand .sub {
    color: #60738f;
    line-height: 1.8;
    font-size: 15px;
}
.sso-help-list {
    margin: 0;
    padding-left: 20px;
    color: #52647e;
    line-height: 1.9;
}
.sso-help-list li { margin-bottom: 6px; }
.sso-links {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
.sso-links a {
    border: 1px solid #dbe5ee;
    background: #fff;
    color: #17345f;
}
.sso-links a.primary-alt {
    background: #0d4c86;
    color: #fff;
    border-color: #0d4c86;
}
.login-inline-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0 2px;
    font-size: 14px;
}
.login-inline-links a {
    color: #0d4c86;
    text-decoration: none;
    font-weight: 700;
}
.login-inline-links a:hover {
    text-decoration: underline;
}
@media (max-width: 1024px) {
    .login-grid,
    .sso-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 680px) {
    .login-page-wrap,
    .sso-page-wrap { padding: 24px 14px 40px; }
    .login-hero { padding: 24px 20px; border-radius: 22px; }
    .login-hero h1 { font-size: 34px; }
    .login-hero p { font-size: 17px; }
    .login-panel,
    .portal-panel,
    .sso-panel,
    .sso-brand-panel { padding: 20px; border-radius: 22px; }
    .portal-card-grid,
    .sso-card-grid { grid-template-columns: 1fr; }
    .login-captcha { grid-template-columns: 1fr; }
}


/* =========================================================
   Login V2：主登入頁改為單一登入卡
   右側「其他登入方式」已自 login.aspx 移除；SSO 獨立頁不受影響。
   ========================================================= */
.login-grid.login-grid-single{
    display:block !important;
    max-width:560px;
    margin:0 auto;
}

.login-grid.login-grid-single .login-panel{
    width:100%;
}

.login-grid.login-grid-single .login-brand{
    justify-content:flex-start;
}

@media (max-width:680px){
    .login-grid.login-grid-single{
        max-width:100%;
    }
}


/* =========================================================
   Login V3：全部入口取消橘色外框，統一藍灰線條
   主按鈕仍保留橘色實心，維持 CTA 明確性
   ========================================================= */
.login-panel,
.portal-panel,
.sso-panel{
    border-color:#dbe5ee !important;
}

.login-note{
    border-color:#dbe5ee !important;
    background:#f6f9fc !important;
    color:#435b71 !important;
}

.secondary-btn,
.quick-link,
.sso-links a{
    border:1px solid #dbe5ee !important;
    background:#fff !important;
    color:#18568e !important;
}

.secondary-btn:hover,
.quick-link:hover,
.sso-links a:hover{
    border-color:#b9cfe5 !important;
    background:#f7fbff !important;
    color:#17345f !important;
}

.portal-card,
.sso-card{
    border:1px solid #dbe5ee !important;
    background:#f8fbfe !important;
}

.portal-card:hover,
.sso-card:hover{
    border-color:#b9cfe5 !important;
    box-shadow:0 14px 24px rgba(23,52,95,.08) !important;
}

.sso-card .tag{
    background:#eef5fb !important;
    color:#18568e !important;
}

.icon-btn{
    border:1px solid #dbe5ee !important;
    color:#17345f !important;
}

.icon-btn:hover{
    border-color:#7fa6c8 !important;
    color:#18568e !important;
}

.login-field input.text:focus,
.captcha-input:focus,
.login-input input.text:focus{
    border-color:#7fa6c8 !important;
    box-shadow:0 0 0 4px rgba(24,86,142,.12) !important;
}

/* 主登入頁目前為單欄，不再顯示右側其他入口 */
.login-grid.login-grid-single{
    display:block !important;
    max-width:560px;
    margin:0 auto;
}
