/* ── 登入頁面（依設計圖色碼） ── */
.login-page {
    background-image: url('../img/bg1920.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    height: 100vh;
    overflow: hidden;
}

/* RWD 背景圖 */
@media (max-width: 1440px) {
    .login-page { background-image: url('../img/bg1440.jpg'); }
}
@media (max-width: 1280px) {
    .login-page { background-image: url('../img/bg1280.jpg'); }
}
@media (max-width: 1024px) {
    .login-page { background-image: url('../img/bg1024.jpg'); }
}
@media (max-width: 624px) {
    .login-page { background-image: url('../img/bg624.jpg'); }
}

/* 整體佈局：卡片垂直置中 + logo 置底 */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.login-page .login-box {
    width: 400px;
    max-width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* 卡片：底色漸層 #F5F6FD → #C9CFE5 + 陰影 #C2C8F3 50% */
.login-card {
    background: linear-gradient(180deg, #F5F6FD 0%, #C9CFE5 100%) !important;
    border-radius: 18px !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(194, 200, 243, 0.5) !important;
    overflow: hidden;
}

.login-card .login-card-body {
    padding: 36px 34px 30px !important;
    background: transparent !important;
}

/* USER LOGIN 漸層文字 #947DE8 → #A1B0F1 */
.login-subtitle {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #947DE8, #A1B0F1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 漸層分隔線 #947DE8 → #A1B0F1 */
.login-divider {
    height: 2px;
    background: linear-gradient(90deg, #947DE8, #A1B0F1);
    margin: 0 auto 16px;
    width: 60%;
    border-radius: 1px;
}

/* 標題 #534A88 */
.login-title {
    text-align: center;
    color: #534A88;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 26px;
}

/* 輸入框群組 */
.login-input-group {
    position: relative;
    margin-bottom: 16px;
}

/* 輸入框：底色 #FFFFFF、外框 #AAA4E7 */
.login-input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 8px 46px 8px 14px;
    font-size: 0.9rem;
    color: #333;
    background-color: #FFFFFF;
    border: 1.5px solid #AAA4E7;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-input::placeholder {
    color: #b0aac8;
}
.login-input:focus {
    border-color: #947DE8;
    box-shadow: 0 0 0 3px rgba(148, 125, 232, 0.15);
}
.login-input.is-invalid {
    border-color: #dc3545;
}

/* 欄位右側圖示 */
.login-input-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.login-input-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 記住帳密 #5F51B0 */
.login-remember {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
}
.login-remember label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 0.85rem;
    color: #5F51B0;
    font-weight: 500;
    cursor: pointer;
}
.login-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #947DE8;
    cursor: pointer;
}

/* 登入按鈕：漸層 #947DE8 → #A1B0F1 */
.login-btn {
    display: block;
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #947DE8, #A1B0F1);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
}
.login-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 14px rgba(148, 125, 232, 0.35);
}

/* 驗證錯誤 */
.login-input-group .invalid-feedback {
    display: block;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* 底部 Logo — 置底 */
.login-footer {
    margin-top: auto;
    padding-bottom: 28px;
    text-align: center;
}
.login-footer img {
    height: 36px;
    opacity: 0.85;
}

/* RWD 手機 */
@media (max-width: 480px) {
    .login-page .login-box {
        width: 100%;
    }
    .login-card .login-card-body {
        padding: 28px 22px 24px !important;
    }
    .login-title {
        font-size: 1rem;
    }
}

.select2-selection__rendered {
    line-height: 28px !important;
    /* line-height: calc(2.25rem) !important; */
}

.select2-container .select2-selection--single {
    /* height: 35px !important; */
    height: calc(2.25rem + 2px) !important;
}

.select2-selection__arrow {
    /* height: 34px !important; */
    height: calc(2.25rem + 2px) !important;
}

/* ── 大安印刷主題色彩 ── */
:root {
    --daan-primary: #2D5F8A;
    --daan-sidebar: #1A2332;
    --daan-sidebar-hover: #253448;
}

/* 中文字體 */
body {
    font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 高解析度螢幕整體字級放大 */
@media (min-width: 1920px) {
    html { font-size: 17px; }
}
@media (min-width: 2560px) {
    html { font-size: 18px; }
}

/* 主色按鈕 */
.btn-primary {
    color: #fff;
    background-color: var(--daan-primary) !important;
    border-color: var(--daan-primary) !important;
    box-shadow: none;
    border-radius: 6px;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #245078 !important;
    border-color: #245078 !important;
}

/* 所有按鈕圓角 */
.btn {
    border-radius: 6px;
}

/* 側邊欄 */
.main-sidebar {
    background-color: var(--daan-sidebar) !important;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

.main-sidebar .sidebar {
    background-color: var(--daan-sidebar);
}

.main-sidebar .nav-link:hover {
    background-color: var(--daan-sidebar-hover) !important;
}

.main-sidebar .nav-link.active {
    background-color: var(--daan-primary) !important;
}

.main-sidebar .brand-link {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-sidebar .nav-header {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 1rem 0.4rem;
}

/* 卡片樣式 */
.card {
    border-radius: 8px;
    border: none;
    box-shadow: 0 0 8px rgba(0,0,0,0.06);
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(to bottom, #fff, #fafafa);
    border-radius: 8px 8px 0 0 !important;
}

/* 表格 */
.table th {
    white-space: nowrap;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    border-left: 3px solid var(--daan-primary);
}

/* Small box 統計卡片 */
.small-box {
    border-radius: 8px;
}

.small-box .inner h3 {
    font-weight: 700;
}

/* 內容標題 */
.content-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Badge 無障礙 - 確保對比度 >= 4.5:1 */
.badge-warning {
    color: #1a1a1a !important;
}

/* 表單輸入框 */
.form-control:focus {
    border-color: var(--daan-primary);
    box-shadow: 0 0 0 0.2rem rgba(45, 95, 138, 0.15);
}

/* 頂部導覽列 */
.main-header.navbar {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* 頁面連結 */
a {
    color: var(--daan-primary);
}

a:hover {
    color: #1d4060;
}

/* RWD 斷點優化 */
@media (max-width: 768px) {
    .content-header h1 {
        font-size: 1.1rem;
    }

    .small-box .inner h3 {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .col-6 .small-box {
        margin-bottom: 0.5rem;
    }
}

/* ── 批次刪除操作列 ── */
.bulk-action-bar {
    display: none;
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: var(--daan-sidebar);
    color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}
.bulk-action-bar.show {
    display: flex;
}
.bulk-check-col {
    width: 44px;
    text-align: center;
}
.bulk-check-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--daan-primary);
}
tr.bulk-checked {
    background-color: rgba(45,95,138,0.06) !important;
}
