/* 縮小失敗。正在傳回未縮小的內容。
(4,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(6,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(8,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(10,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(12,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(14,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(44,46): run-time error CSS1039: Token not allowed after unary operator: '-dark-blue'
(44,67): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(44,92): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
(59,22): run-time error CSS1039: Token not allowed after unary operator: '-glass-bg'
(170,17): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
(172,22): run-time error CSS1039: Token not allowed after unary operator: '-soft-blue'
(189,17): run-time error CSS1039: Token not allowed after unary operator: '-dark-blue'
(208,17): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(225,25): run-time error CSS1030: Expected identifier, found '.'
(225,47): run-time error CSS1031: Expected selector, found ')'
(225,47): run-time error CSS1025: Expected comma or open brace, found ')'
(281,24): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
(288,28): run-time error CSS1039: Token not allowed after unary operator: '-readonly-bg'
(335,17): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
(345,17): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(398,17): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
(424,46): run-time error CSS1039: Token not allowed after unary operator: '-dark-blue'
(424,67): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(424,92): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
(471,32): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(499,35): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(571,17): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(576,17): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(613,21): run-time error CSS1030: Expected identifier, found '.'
(613,43): run-time error CSS1031: Expected selector, found ')'
(613,43): run-time error CSS1025: Expected comma or open brace, found ')'
(716,22): run-time error CSS1039: Token not allowed after unary operator: '-glass-bg'
(1095,36): run-time error CSS1039: Token not allowed after unary operator: '-primary-blue'
(1834,17): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
(1846,17): run-time error CSS1039: Token not allowed after unary operator: '-accent-blue'
 */
/* #region 全域與變數設定 (Global & Roots) */

:root {
    --primary-blue: #1e3a8a;
    /* 深藍色 */
    --accent-blue: #3b82f6;
    /* 亮藍色 */
    --soft-blue: #eff6ff;
    /* 淺藍色 */
    --glass-bg: rgba(255, 255, 255, 0.95);
    /* 半透明玻璃質感背景 */
    --dark-blue: #111827;
    /* 極深藍色 */
    --readonly-bg: #f1f5f9;
    /* 唯讀欄位背景色 */
}

/* 基礎頁面樣式：設定上下預留空間 */
body {
    padding-top: 50px;
    padding-bottom: 20px;
}

/* 內容主要容器：左右內邊距設定 */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* 基礎控制項寬度：防止寬度撐滿 (部分舊頁面使用) */
input,
select,
textarea {
    max-width: 280px;
}

/* #endregion */

/* #region 現代化介面框架 (Modern UI Framework - 多數帳號頁面共用) */

/* 現代化背景：使用漸層色並讓內容垂直置中 */
.modern-ui-body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 50%, var(--accent-blue) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
}

/* 玻璃質感卡片：圓角、陰影、邊框 */
.login-card,
.setup-card,
.forgot-card,
.reactivate-card {
    background: var(--glass-bg);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

/* 登入與忘記密碼頁卡片寬度 */
.login-card,
.forgot-card {
    max-width: 420px;
}

/* 帳戶設定頁卡片寬度 */
.setup-card {
    max-width: 650px;
}

/* 重設密碼專用卡片寬度 */
.reset-pw-card {
    max-width: 550px;
}

/* 帳戶修復卡片寬度 */
.reactivate-card {
    max-width: 500px;
}

/* 卡片進場動畫 */
.forgot-card,
.reactivate-card {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片漸層標題列 */
.card-header-visual {
    background: linear-gradient(to right, #1e40af, #2563eb);
    padding: 55px 30px 30px;
    text-align: center;
    color: white;
    position: relative;
}

.card-header-visual h4 {
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

.login-card .card-header-visual h4,
.forgot-card .card-header-visual h4 {
    font-size: 1.5rem;
}

/* 標註學校名稱 (登入頁專用) */
.header-univ {
    position: absolute;
    top: 22px;
    left: 0;
    right: 0;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    opacity: 0.9;
}

/* 卡片內容區域間距 */
.card-body {
    padding: 40px;
}

.login-card .card-body,
.forgot-card .card-body {
    padding: 40px 35px;
}

/* 核對資訊的分隔線 (ReActivate/FirstLogin 使用) */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 無背景漸層的簡易版標題區 */
.card-header-visual-simple {
    padding: 45px 20px 15px;
    text-align: center;
}

/* 預設樣式：藍色主題 (例如：ResetPw 重設密碼頁面) */
.card-header-visual-simple .header-icon-wrap {
    color: var(--accent-blue);
    margin-bottom: 15px;
    background: var(--soft-blue);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

/* 紅色主題 (例如：AcctUnlock 帳號解鎖頁面) */
.card-header-visual-simple .header-icon-wrap.danger {
    color: #dc3545;
    background: #fef2f2;
    border-radius: 50%;
}

.card-header-visual-simple h4 {
    color: var(--dark-blue);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.card-header-visual-simple .subtitle {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 400;
}

/* #endregion */

/* #region 表單與控制項樣式 (Form Controls - 通用) */

/* 現代化標籤風格 */
.modern-ui-body .form-label {
    font-size: 0.875rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 必填標記樣式 */
.required-mark {
    color: #dc3545;
    font-size: 0.8rem;
    margin-left: 4px;
    font-weight: 600;
}

/* 當輸入框為停用 (disabled) 或唯讀 (readonly) 時，隱藏該欄位的必填標記 */
.input-group-custom:has(.form-control:disabled) .required-mark,
.input-group-custom:has(.form-control[readonly]) .required-mark,
.col-md-6:has(.form-control:disabled) .required-mark,
.col-md-6:has(.form-control[readonly]) .required-mark {
    display: none;
}

/* 輸入框群組容器 */
.input-group-custom {
    position: relative;
    margin-bottom: 25px;
}

/* 輸入框下方輔助說明文字 */
.modern-ui-body .input-group-custom .input-helper-text {
    font-size: 0.825rem !important;
    color: #64748b !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
    display: block !important;
    line-height: 1.4 !important;
}

/* 手機模式縮小輔助文字並盡量保持單行 */
@media (max-width: 576px) {
    .modern-ui-body .input-group-custom .input-helper-text {
        font-size: 0.74rem !important;
        letter-spacing: -0.4px;
        white-space: nowrap !important;
    }

    /* 在最窄的手機螢幕下，縮減卡片內距以換取更多文字寬度 */
    .card-body {
        padding: 40px 20px !important;
    }
}




/* 現代化輸入框設計 */
.modern-ui-body .form-control {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    max-width: none;
}

/* 輸入框選取狀態 */
.modern-ui-body .form-control:focus {
    background-color: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* 唯讀輸入框狀態 */
.modern-ui-body .form-control[readonly] {
    background-color: var(--readonly-bg);
    border-color: #e2e8f0;
    color: #475569;
    font-weight: 500;
    cursor: not-allowed;
}

/* 現代化按鈕 (提交/儲存/重設) */
.btn-submit,
.btn-save,
.btn-reset {
    background: linear-gradient(to right, #1e40af, #2563eb);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.btn-save {
    width: auto;
    padding: 12px 30px;
    margin-top: 0;
}

.btn-submit:hover,
.btn-save:hover,
.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
    filter: brightness(1.1);
    color: white;
}

/* 返回連結區域 */
.back-to-login {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
}

.back-to-login a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.back-to-login a:hover {
    color: var(--primary-blue);
}

/* 密碼欄位眼睛切換組件 */
.pwd-field-wrap {
    position: relative;
    width: 100%;
}

.pwd-field-wrap .form-control {
    padding-right: 40px !important;
}

.pwd-toggle-inner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 5;
}



/* 隱藏 Microsoft Edge/IE 內建的密碼眼睛揭示與清除圖示 */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

/* #endregion */

/* #region 特殊頁面元件 (Specific Components) */

/* 登入頁下方的首次登入資訊 */
.card-footer-info {
    background-color: #f8fafc;
    padding: 20px 35px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-icon {
    color: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

/* 帳號啟用提示訊息 */
.alert-warning-custom {
    background-color: #fff4ea;
    border: 1px solid #f7dcb9;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* #endregion */

/* #region 當月薪資查詢 (CurSalary Specific) */

.salary-query-body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 50%, var(--accent-blue) 100%);
    min-height: 100vh;
}

.navbar-custom {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    text-decoration: none;
}

.main-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
}

.login-footer {
    width: 100%;
    text-align: center;
    padding: 10px 0 6px;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* 固定導覽列時，主要內容往下推以避免被遮住 */
body.salary-query-body .main-container {
    padding-top: 56px;
}

.salary-cert {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    border-top: 4px solid var(--primary-blue);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.salary-cert-header {
    background: #f8fafc;
    border-bottom: 2px solid var(--primary-blue);
    padding: 30px;
    text-align: center;
    position: relative;
}

.salary-cert-body {
    padding: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 35px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 25px;
}

.info-label {
    display: block !important;
    font-size: 14px !important;
    color: #64748b !important;
    margin-bottom: 2px !important;
}

.info-value {
    display: block !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.salary-table th {
    background: #f1f5f9;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.9rem;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.salary-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.text-amount {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-align: right;
}

.total-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 40px;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.btn-print {
    background: #f8fafc;
    color: var(--primary-blue);
    border: 1.5px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-print:hover {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}



/* #endregion */

/* #region 歷史薪資明細報表 (HistSalary Specific) */

.report-wide-container {
    max-width: 1200px !important;
    width: 100% !important;
}

/* 修正外部容器寬度限制並與導覽列對齊 (僅限報表頁面) */
.main-container:has(.report-wide-container) {
    max-width: 1200px !important;
    margin-top: 20px !important;
}

.hist-report-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    padding: 25px;
    position: relative;
}

.hist-cert-header {
    padding: 40px 30px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #cbd5e1;
    margin-bottom: 5px;
}


.report-info-bar {
    display: flex;
    justify-content: space-between;
    padding: 15px 5px;
    font-weight: 500;
    margin-top: 10px;
}

.table-responsive-custom {
    max-height: 500px;
    /* 大約5筆歷史薪資加上表頭及底部合計的高度 */
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    background: #fff;
}

.hist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.hist-table th {
    background: #f8fafc;
    padding: 12px 8px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    /* 使用 box-shadow 替代 border 避免滾動漏框 */
    box-shadow: inset 0 -2px 0 #e2e8f0;
    white-space: nowrap !important;
}

.hist-table td {
    padding: 15px 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
}

.hist-table .total-row {
    background-color: #cbd5e1;
    color: #111827;
    font-weight: 700;
}

.hist-table .total-row td {
    border: none;
    padding: 15px 8px;
    position: sticky;
    bottom: -1px;
    z-index: 10;
    background-color: #cbd5e1;
    /* 加一條上方陰影區隔內容 */
    box-shadow: inset 0 2px 0 #94a3b8;
}

.notes-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    color: #64748b;
    font-size: 0.825rem;
}

.notes-section h6 {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.notes-list {
    padding-left: 20px;
    margin-bottom: 0;
}


/* 起訖年/月查詢樣式 */
.filter-section {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 12px 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative !important;
    padding-right: 170px !important; /* 為右側絕對定位的列印按鈕保留空間 */
}

/* 工作期間主標籤樣式 */
.filter-main-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #334155;
    font-size: 1rem;
    margin-top: 24px;
    /* 這裡增加上邊距，用來抵消旁邊元件上方標籤的高度，使其對齊輸入框 */
}

/* 歷史報表列印按鈕樣式 */
.filter-section .btn-print {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-section .btn-print:hover {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

/* 返回選單按鈕樣式 */
.btn-back {
    color: white !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.btn-back:hover {
    opacity: 0.8;
    color: white !important;
    text-decoration: none !important;
}

/* 列印模式下的介面隱藏與調整 */
@media print {

    .btn-back,
    .navbar-custom,
    .btn-print,
    .salary-cert-header .btn-print,
    .nav-btn-floating {
        display: none !important;
    }

    .salary-query-body {
        background: white !important;
        padding-top: 0 !important;
        /* 移除頂部預留空間以極大化內容 */
    }

    .hist-report-card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 260mm !important;
        /* 使其接近 A4 高度 */
    }

    .table-responsive-custom {
        max-height: none !important;
        overflow: visible !important;
        border: none !important;
    }

    .hist-table th,
    .hist-table .total-row td {
        position: static !important;
        box-shadow: none !important;
    }

    .hist-table th {
        border-bottom: 2px solid #e2e8f0 !important;
    }

    .notes-section {
        margin-top: 40px !important;
        page-break-inside: avoid !important;
        border-top: 1px solid #cbd5e1 !important;
        padding-top: 15px !important;
    }
}

/* 響應式列印按鈕顯示設定 (RWD Print Buttons) */
/* 手機版：將列印按鈕轉為懸浮模式 */
@media screen and (max-width: 768px) {
    /* 手機版：搜尋卡片內容置中 */
    .filter-section {
        padding-right: 24px !important; /* 手機版按鈕懸浮，不需右側空間 */
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 20px !important;
    }

    .filter-main-label {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 0 !important;
        margin-bottom: 5px !important;
    }

    .custom-datepicker-group {
        width: 100% !important;
        align-items: center !important;
        gap: 5px !important;
    }

    .datepicker-label {
        width: 100% !important;
        text-align: center !important;
    }

    .btn-query-custom {
        width: 100% !important;
        margin-top: 10px !important;
        justify-content: center !important;
    }

    .btn-print {
        position: fixed !important;
        top: auto !important;
        bottom: 30px !important;
        right: 30px !important;
        transform: none !important;
        width: 55px !important;
        height: 55px !important;
        border-radius: 50% !important;
        background: #3b82f6 !important;
        color: white !important;
        box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4) !important;
        z-index: 1000 !important;
        border: none !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
        display: flex !important;
    }

    .btn-print span {
        display: none !important;
        /* 手機版隱藏文字 */
    }

    .btn-print svg {
        width: 24px !important;
        height: 24px !important;
        margin: auto !important;
    }
}

/* =========================================
   導覽按鈕與響應式設計 (Navigation & Responsive)
   ========================================= */

/* 導覽按鈕區域 */
.nav-btn-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0 8px 0;
}

/* 圓形導覽按鈕外觀 */
.nav-btn {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: background 0.2s, transform 0.1s;
}

/* 導覽按鈕懸停效果 */
.nav-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    transform: scale(1.08);
}

/* 導覽按鈕停用狀態 */
.nav-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: default;
    box-shadow: none;
    transform: none;
}

/* 導覽按鈕區域 - 置於卡片下方 */
.nav-bottom-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin: 30px 0 10px 0;
    animation: slideUp 0.5s ease-out;
}

/* 導覽頁數指示器 */
.nav-indicator {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 85px;
    text-align: center;
}

/* 薪資證明容器 */
.salary-cert-container {
    position: relative;
    margin: 0 auto;
}

/* 漂浮在兩側的導覽按鈕 */
.nav-btn-floating {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    transition: opacity 0.3s, visibility 0.3s;
}

/* 左側漂浮按鈕靠左外側 */
.nav-btn-floating.left {
    left: -20px;
}

/* 右側漂浮按鈕靠右外側 */
.nav-btn-floating.right {
    right: -20px;
}

/* 漂浮按鈕加深陰影 */
.nav-btn.btn-shadow {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* 平板與桌面中等解析度：微調按鈕間距或改為半透明 (避免遮蔽內容) */
@media (max-width: 1024px) {
    .nav-btn-floating.left {
        left: 0;
    }

    .nav-btn-floating.right {
        right: 0;
    }

    .nav-btn {
        opacity: 0.6;
    }

    .nav-btn:hover {
        opacity: 1;
    }
}

/* 手機版解析度：實作響應式佈局轉換 */
@media (max-width: 768px) {

    /* 修正 body 的預設 padding，確保能撐滿 */
    body.salary-query-body {
        padding-top: 0 !important;
    }

    /* 頂部導覽列：強制不換行，並微調元素位置使其平行 */
    .navbar-custom .container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .navbar-brand {
        font-size: 0.9rem !important;
        gap: 5px !important;
        white-space: nowrap;
        flex-shrink: 0;
        margin-right: 5px !important;
    }

    /* 導覽列右側容器 (姓名+登出) */
    .navbar-custom .ms-auto {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 1;
        overflow: hidden;
    }

    /* 用戶名與 ID：縮小字體並防止推擠登出按鈕 */
    .text-white.small.opacity-75 {
        font-size: 11px !important;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: normal !important;
    }

    /* 登出按鈕：縮小外框與字體 */
    .navbar-logout-outline {
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
        gap: 4px !important;
        white-space: nowrap;
        border-radius: 8px !important;
        flex-shrink: 0;
    }

    /* 主要內容容器：恢復側邊藍色背景間距，避免內容太過貼邊 */
    .main-container {
        margin: 10px auto !important;
        padding: 56px 15px 0 15px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* 返回連結：稍微調整位置 */
    .btn-back {
        margin-left: 10px !important;
        margin-top: 15px !important;
        margin-bottom: 12px !important;
    }

    /* 薪資證明卡片：恢復圓角與陰影，並確保懸浮按鈕不被裁切 */
    .salary-cert {
        position: relative !important;
        /* 作為懸浮按鈕的定位基準 */
        border-radius: 12px !important;
        border-top: 4px solid var(--primary-blue) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
        width: 100% !important;
        margin: 0 !important;
        overflow: visible !important;
        /* 確保懸浮按鈕不被切掉 */

        /* 修正：在手機版移除位移動畫 (translateY)，改用純透明度漸變，避免 fixed/absolute 子元素跳動 */
        animation: fadeIn 0.4s ease-out !important;
    }

    /* 修正列印按鈕：在手機版改為懸浮圓形按鈕，並往上移動避開文字 */
    .btn-print {
        position: absolute !important;
        right: -10px !important;
        /* 向右移動，避開標題 */
        top: -15px !important;
        /* 往上移動至邊界，避開內文 */
        bottom: auto !important;
        width: 45px !important;
        height: 45px !important;
        border-radius: 50% !important;
        background: #3b82f6 !important;
        /* 藍色背景 */
        color: white !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
        z-index: 105 !important;
        transform: translateY(0) !important;
    }

    /* 隱藏手機版列印按鈕內的文字，僅保留圖示 */
    .btn-print span {
        display: none !important;
    }

    .btn-print i {
        margin: 0 !important;
    }

    /* 內容內邊距微調 */
    .salary-cert-header {
        padding: 18px 8px !important;
    }

    .salary-cert-body {
        padding: 15px 8px !important;
    }

    /* 資訊網格：維持雙欄，縮小比例以防裁切 */
    .info-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding-bottom: 12px !important;
        margin-bottom: 15px !important;
    }

    .info-label {
        font-size: 10px !important;
    }

    .info-value {
        font-size: 12px !important;
    }

    /* 表格字體極小化 */
    .salary-table th {
        padding: 8px 4px !important;
        font-size: 11px !important;
    }

    .salary-table td {
        padding: 8px 4px !important;
        font-size: 12px !important;
    }

    /* 底部金額區塊：水平排列配置 */
    .total-section {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 12px 6px !important;
    }

    .total-item {
        text-align: center !important;
        flex: 1 !important;
    }

    .total-label {
        font-size: 10px !important;
    }

    .total-value {
        font-size: 0.95rem !important;
        white-space: nowrap;
    }

    /* 修正漂浮導覽按鈕位置：利用側邊留白空間，避免遮擋文字 */
    .nav-btn-floating.left {
        left: -5px !important;
    }

    .nav-btn-floating.right {
        right: -5px !important;
    }

    /* 手機版導覽按鈕稍微縮小，減少視覺壓迫 */
    .nav-btn,
    button.nav-btn {
        width: 36px !important;
        height: 36px !important;
    }

    /* === 帳號相關頁面基礎響應式 (Account Pages Base) === */
    .modern-ui-body {
        padding: 10px !important;
    }

    .login-card,
    .setup-card,
    .forgot-card,
    .reactivate-card,
    .reset-pw-card {
        width: 92% !important;
        max-width: 340px !important;
        /* 強制縮小寬度，避免看起來被橫向拉長 */
        margin: 15px auto !important;
        border-radius: 16px !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    }

    .card-header-visual {
        padding: 30px 20px 15px !important;
    }

    .card-header-visual h4 {
        font-size: 1.1rem !important;
        /* 比照報表頁面 */
        letter-spacing: 0.5px !important;
    }

    .header-univ {
        top: 12px !important;
        font-size: 11px !important;
        letter-spacing: 1px !important;
    }

    .card-header-visual-simple {
        padding: 25px 15px 10px !important;
    }

    .card-header-visual-simple .header-icon-wrap {
        width: 50px !important;
        height: 50px !important;
        border-radius: 12px !important;
        margin-bottom: 8px !important;
    }

    .card-header-visual-simple h4 {
        font-size: 1.1rem !important;
    }

    .card-header-visual-simple .subtitle {
        font-size: 11px !important;
    }

    .card-body {
        padding: 20px 18px !important;
    }

    .modern-ui-body .form-label {
        font-size: 12px !important;
        margin-bottom: 5px !important;
    }

    .modern-ui-body .form-control {
        padding: 8px 12px !important;
        font-size: 13px !important;
        /* 縮小至與報表欄位接近 */
        border-radius: 8px !important;
    }

    .input-group-custom {
        margin-bottom: 15px !important;
    }

    .btn-submit,
    .btn-reset {
        padding: 9px !important;
        font-size: 13px !important;
        /* 再次縮小 */
        border-radius: 8px !important;
    }

    /* 強制縮小所有類型的手機版警示框 (Overriding standard Bootstrap & custom alerts) */
    .alert,
    .alert-warning-custom,
    .alert-danger,
    .alert-info,
    .alert-success {
        display: flex;
        align-items: center !important;
        gap: 8px !important;
        padding: 8px 12px !important;
        border-radius: 10px !important;
        font-size: 11px !important;
        /* 強制設定為極精細字體 */
        margin-bottom: 12px !important;
        line-height: 1.4 !important;
    }

    /* 修改：對於原本較大的圖示（例如 45px），在手機版等比例縮小至 14px */
    .alert svg[style*="width"],
    .alert i[style*="width"],
    .alert-warning-custom svg[style*="width"],
    .alert-warning-custom i[style*="width"] {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0 !important;
    }

    /* 對於原本即為小的圖示（或是沒有寫死樣式的），維持極精細尺寸 (14px) */
    .alert svg:not([style*="width"]),
    .alert i:not([style*="width"]),
    .alert-warning-custom svg:not([style*="width"]),
    .alert-warning-custom i:not([style*="width"]) {
        width: 14px !important;
        height: 14px !important;
    }

    .alert p {
        font-size: 11px !important;
        margin-bottom: 0 !important;
    }

    /* === 彈跳視窗 (Modals) 響應式優化 === */
    .modal-dialog {
        margin: 1rem auto !important;
        max-width: 88% !important;
        /* 縮小寬度比例 */
    }

    .modal-title {
        font-size: 1.1rem !important;
        /* 同步標題大小 */
    }

    .modal-body {
        font-size: 13px !important;
        /* 強制覆蓋 fs-5 */
        padding: 20px 15px !important;
    }

    .modal-footer {
        padding-bottom: 20px !important;
    }

    .modal-footer .btn {
        padding: 8px 30px !important;
        /* 縮小按鈕尺寸 */
        font-size: 13px !important;
    }

    .card-footer-info {
        padding: 12px 18px !important;
        font-size: 11px !important;
    }

    .section-title {
        font-size: 13px !important;
        margin-bottom: 12px !important;
        padding-bottom: 6px !important;
        letter-spacing: 0.5px !important;
    }

    .btn-save {
        padding: 9px 25px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    /* 針對首次登入頁面的副標題 */
    .card-header-visual p {
        font-size: 11px !important;
        margin-top: 5px !important;
    }

    /* 針對輸入框下方的說明文字與驗證提示 */
    .modern-ui-body .text-muted,
    .modern-ui-body small {
        font-size: 0.74rem !important;
        line-height: 1.4 !important;
    }

    .back-to-login {
        margin-top: 12px !important;
        font-size: 11px !important;
    }

    .back-to-login a i {
        width: 14px !important;
        height: 14px !important;
    }

    /* 啟用狀態彈窗 (Activation Modal) 縮小 */
    .activation-modal {
        padding: 30px 25px !important;
        border-radius: 20px !important;
        max-width: 320px !important;
    }

    .activation-ring-wrap {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 20px !important;
    }

    .activation-title {
        font-size: 1.05rem !important;
        margin-bottom: 8px !important;
    }

    .activation-desc {
        font-size: 12px !important;
        line-height: 1.5 !important;
    }

    .activation-btn {
        margin-top: 18px !important;
        padding: 10px 30px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    /* 密碼規則清單再次縮小 */
    .pwd-rules {
        margin: 5px 0 15px 0 !important;
    }

    .pwd-rules li {
        font-size: 11px !important;
        margin-bottom: 2px !important;
        gap: 4px !important;
    }

    .pwd-rules li .rule-icon {
        width: 12px !important;
        height: 12px !important;
        font-size: 8px !important;
    }

    /* === 主選單響應式 (MainMenu) === */
    .menu-page-wrapper {
        padding: 60px 15px 30px !important;
    }

    .menu-cards-row {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
        margin-bottom: 30px !important;
    }

    .menu-entry-card {
        width: 90% !important;
        /* 增加螢幕佔比 */
        max-width: 320px !important;
        padding: 25px 15px !important;
        /* 減少內邊距 */
        gap: 12px !important;
        border-radius: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .menu-card-icon-wrap {
        width: 60px !important;
        height: 60px !important;
        border-radius: 16px !important;
    }

    .menu-card-icon-wrap i {
        scale: 0.8;
    }

    .menu-welcome-title {
        font-size: 1.25rem !important;
    }

    .menu-welcome-subtitle {
        font-size: 0.75rem !important;
        margin-bottom: 20px !important;
        white-space: nowrap !important;
        letter-spacing: 0 !important;
    }

    .menu-card-entry-title {
        font-size: 0.95rem !important;
        text-align: center !important;
        white-space: nowrap !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .menu-footer-security {
        justify-content: center !important;
        font-size: 0.7rem !important;
        text-align: center !important;
        opacity: 0.5 !important;
        gap: 8px !important;
    }

    .menu-footer-security i {
        scale: 0.8;
    }

    /* === 歷史薪資報表響應式 (HistSalary) === */
    .report-wide-container {
        padding: 0 8px !important;
        margin: 5px auto !important;
    }

    .filter-section {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px !important;
        gap: 10px !important;
        border-radius: 12px !important;
    }

    .filter-main-label {
        margin-top: 0 !important;
        font-size: 0.9rem !important;
        justify-content: flex-start !important;
    }

    .custom-datepicker-group {
        width: 100% !important;
        gap: 5px !important;
    }

    .datepicker-label {
        font-size: 12px !important;
    }

    .custom-datepicker {
        width: 100% !important;
    }

    .datepicker-input {
        padding: 5px 10px !important;
        font-size: 13px !important;
    }

    .btn-query-custom {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 5px !important;
        padding: 5px !important;
        font-size: 13px !important;
    }

    /* 確保手機版列印按鈕位置統一為右下角浮動 (HistSalary & CurSalary) */
    .filter-section .btn-print,
    .salary-cert-header .btn-print {
        position: fixed !important;
        top: auto !important;
        bottom: 25px !important;
        right: 20px !important;
        transform: none !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 50% !important;
        background: #3b82f6 !important;
        color: white !important;
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4) !important;
        z-index: 1000 !important;
        border: none !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
        display: flex !important;
    }

    .filter-section .btn-print span,
    .salary-cert-header .btn-print span {
        display: none !important;
    }

    .filter-section .btn-print i,
    .filter-section .btn-print svg,
    .salary-cert-header .btn-print i,
    .salary-cert-header .btn-print svg {
        width: 20px !important;
        height: 20px !important;
        margin: auto !important;
    }

    /* 縮小手機版年月選擇視窗 (針對畫面上過大的問題) */
    .datepicker-dropdown {
        width: 230px !important;
        padding: 10px !important;
    }

    .datepicker-months-grid,
    .datepicker-years-grid {
        gap: 4px !important;
    }

    .month-btn,
    .year-btn {
        padding: 5px 0 !important;
        font-size: 12px !important;
    }

    .year-display {
        font-size: 0.95rem !important;
        padding: 3px 15px !important;
    }

    .year-nav {
        width: 26px !important;
        height: 26px !important;
    }

    .today-btn {
        font-size: 11px !important;
        padding: 2px 8px !important;
        min-height: 24px !important;
    }

    .hist-cert-header {
        padding: 15px 10px 10px !important;
    }

    .hist-cert-header h4 {
        font-size: 1.1rem !important;
        margin-bottom: 2px !important;
    }

    .hist-cert-header .text-muted {
        font-size: 10px !important;
    }

    .report-info-bar {
        flex-direction: column !important;
        gap: 4px !important;
        font-size: 12px !important;
        align-items: flex-start !important;
        padding: 10px !important;
        background: #f8fafc !important;
        border-radius: 8px !important;
        margin: 8px 0 !important;
    }

    .table-responsive-custom {
        max-height: 400px !important;
        margin-bottom: 15px !important;
    }

    .hist-table th {
        font-size: 11px !important;
        padding: 8px 4px !important;
        white-space: nowrap !important;
    }

    .hist-table td {
        font-size: 12px !important;
        padding: 8px 4px !important;
    }

    /* 加寬項目欄位 (針對手機版名稱較長) */
    .hist-table th:nth-child(2),
    .hist-table td.project {
        min-width: 250px !important;
    }

    .notes-section {
        padding-top: 15px !important;
    }

    .notes-section h6 {
        font-size: 12px !important;
        /* 再次縮小 (注意事項標題) */
        margin-bottom: 8px !important;
    }

    .notes-list li {
        font-size: 11px !important;
        /* 再次縮小 (注意事項內容) */
        line-height: 1.4 !important;
    }

    .login-footer {
        font-size: 0.7rem !important;
        padding: 8px 0 !important;
    }
}

/* 強力鎖定導覽按鈕外觀 (紫色圓形) */
.nav-btn,
button.nav-btn,
[id^="btnPrev"],
[id^="btnNext"] {
    background: linear-gradient(135deg, #6366f1, #818cf8) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
}

/* #endregion */

/* #region 背景裝飾元件 (Decorative Elements) */

.bg-circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.c1 {
    width: 500px;
    height: 500px;
    top: -150px;
    right: -150px;
}

.c2 {
    width: 350px;
    height: 350px;
    bottom: -80px;
    left: -80px;
}

/* #endregion */

/* #region 主選單頁面樣式 (Main Menu Page Styles) */

/* 主選單：頁面垂直置中容器 */
.menu-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 100px 20px 40px;
    position: relative;
    z-index: 1;
}

/* 主選單背景輔助裝飾：圓圈與漸層光暈 */
.circle.c-glow {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 70%);
    top: 10%;
    right: -200px;
    z-index: -1;
}

/* 主選單：歡迎標題 (你好，XXX) */
.menu-welcome-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 主選單：今日日期與歡迎子標題 */
.menu-welcome-subtitle {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    margin-bottom: 60px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 主選單：功能按鈕卡片列 */
.menu-cards-row {
    display: flex;
    gap: 40px;
    width: 100%;
    max-width: 850px;
    justify-content: center;
    margin-bottom: 80px;
}

/* 主選單：功能卡片本體 */
.menu-entry-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 65px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

/* 主選單：功能卡片懸停動作 (向上浮動並增加光暈) */
.menu-entry-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 35px 75px rgba(0, 0, 0, 0.3);
    color: var(--accent-blue);
}

/* 主選單：功能卡片內的圖示背景盒 */
.menu-card-icon-wrap {
    background: #f0f7ff;
    width: 80px;
    height: 80px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
}

/* 主選單：功能卡片文字標題 */
.menu-card-entry-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* 主選單：頁面底部安全提示 */
.menu-footer-security {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.95rem;
    margin-top: 10px;
}

/* 頂部導覽列：登出按鈕通用外框樣式 */
.navbar-logout-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: white;
    background: transparent;
    padding: 8px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    text-decoration: none;
}

.navbar-logout-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
}

/* #endregion */

/* #region 啟用等待視窗樣式 (Activation Modal - FirstLoginConfig) */

/* 全螢幕遮罩 */
.activation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 50, 0.78);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.activation-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* 視窗主體 */
.activation-modal {
    background: #fff;
    border-radius: 24px;
    padding: 50px 45px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.4s ease-out;
}

/* 圓圈容器 */
.activation-ring-wrap {
    width: 110px;
    height: 110px;
    margin: 0 auto 28px;
    position: relative;
}

/* SVG 元素佔滿容器 */
.activation-ring-wrap svg {
    width: 100%;
    height: 100%;
}

/* 旋轉進度圓圈 */
.ring-spinner {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 60;
    transform-origin: 50px 50px;
    /* 明確指定 SVG 內的中心點 */
    animation: ringRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    /* 使用更滑順的緩動函數 */
}

.ring-track {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 7;
}

@keyframes ringRotate {
    0% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(270deg);
    }
}

/* 成功圓圈（靜止，填充綠色） */
.ring-success {
    fill: none;
    stroke: #10b981;
    stroke-width: 7;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
}

/* 失敗圓圈（靜止，填充紅色） */
.ring-fail {
    fill: none;
    stroke: #ef4444;
    stroke-width: 7;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
}

/* 打勾符號 */
.icon-check {
    fill: none;
    stroke: #10b981;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawCheck 0.5s ease-out 0.1s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* 打叉符號 */
.icon-cross-1,
.icon-cross-2 {
    fill: none;
    stroke: #ef4444;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

.icon-cross-1 {
    animation: drawCross 0.3s ease-out 0.05s forwards;
}

.icon-cross-2 {
    animation: drawCross 0.3s ease-out 0.2s forwards;
}

@keyframes drawCross {
    to {
        stroke-dashoffset: 0;
    }
}

/* 視窗標題 */
.activation-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

/* 視窗說明文字 */
.activation-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.7;
}

.activation-desc strong {
    color: #1e40af;
}

/* 小圓點等待動畫（附加在說明文字後） */
.activation-dots::after {
    content: '';
    animation: dotsAnim 1.4s steps(4, end) infinite;
}

@keyframes dotsAnim {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }

    100% {
        content: '';
    }
}

/* 成功/失敗後的按鈕 */
.activation-btn {
    margin-top: 28px;
    background: linear-gradient(to right, #1e40af, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.activation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35);
}

/* #endregion */

/* #region 自訂年月選擇器 (Custom Year/Month Picker) */

.custom-datepicker-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.datepicker-label {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
}

.custom-datepicker {
    position: relative;
    width: 180px;
}

.datepicker-input {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1.5px solid #8cb6e6;
    border-radius: 6px;
    font-size: 1.1rem;
    color: #1e293b;
    background-color: #fff;
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: all 0.2s;
}

.datepicker-input:focus,
.custom-datepicker.active .datepicker-input {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.datepicker-icon-wrap {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    color: #475569;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 0.2s;
}

.custom-datepicker:hover .datepicker-icon-wrap {
    background: #cbd5e1;
}

/* 下拉選單主體 */
.datepicker-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 260px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 1000;
    padding: 15px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
}

.custom-datepicker.active .datepicker-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 頭部年份選擇器 */
.datepicker-year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.year-nav {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.year-nav:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.year-display {
    background: #fff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #3b82f6;
    padding: 4px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 年份網格樣式 */
.datepicker-years-grid-wrapper {
    margin-bottom: 12px;
    border: none;
    padding: 0;
    background-color: transparent;
}

.datepicker-years-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 直向 5 個 */
    grid-template-rows: repeat(3, 1fr);
    /* 橫向 3 個 */
    gap: 12px 8px;
    padding: 10px 0;
}

.year-btn {
    background: transparent !important;
    border: none !important;
    padding: 6px 0;
    font-size: 1rem;
    color: #94a3b8;
    /* 預設灰色小字 */
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: none !important;
}

.year-btn:hover {
    color: #3b82f6;
    background: transparent !important;
}

.year-btn.selected {
    color: #1e40af;
    /* 選中狀態顏色加深 */
    font-weight: 700;
    background: transparent !important;
}

/* 12月份網格 - 五欄設計 */
.datepicker-months-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.month-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.month-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.month-btn.selected {
    background: #60a5fa;
    border-color: #60a5fa;
    color: #fff;
    font-weight: 600;
}

/* 底部功能區 */
.datepicker-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.today-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    width: auto;
    height: auto;
    min-height: 28px;
    padding: 2px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.today-btn:hover {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

/* 按鈕樣式 (配合圖片中的距離感) */
.btn-query-custom {
    background: linear-gradient(to right, #1e40af, #2563eb);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.btn-query-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* #endregion */
