/* ============================================
   首頁專用樣式 - home.css
   配色與整體風格保持一致，不改動 base.css
   ============================================ */

/* 任務首頁：教師統計卡 */
.home-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.home-stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border-radius: var(--ui-radius, 10px);
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-stat-card:hover {
    border-color: #1e355b;
    box-shadow: 0 4px 14px rgba(30, 53, 91, 0.1);
}

.home-stat-card--alert {
    border-color: #f0b4b4;
    background: #fff8f8;
}

.home-stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e355b;
    line-height: 1.1;
}

.home-stat-card--alert .home-stat-num {
    color: #b42318;
}

.home-stat-label {
    font-size: var(--fs-small, 0.85rem);
    color: #5b6570;
}

.home-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.home-recent-item:last-child {
    border-bottom: none;
}

.home-recent-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-recent-main strong {
    font-size: 0.95rem;
    color: #0f1419;
}

.home-recent-score {
    font-weight: 700;
    color: #1e355b;
    flex-shrink: 0;
}

.home-muted {
    color: #5b6570;
    font-size: 0.85rem;
}

.home-section-title--spaced {
    margin-top: 22px;
}

.home-task-foot {
    margin-top: 18px;
    text-align: center;
}

.home-task-foot a {
    color: #1e355b;
}

.ui-btn.is-disabled,
a.ui-btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

body.dark-mode .home-stat-card {
    background: #1f1f1f;
    border-color: #3a3a3a;
    color: #e8ecf1;
}

body.dark-mode .home-stat-card--alert {
    background: #2a1a1a;
    border-color: #5a3030;
}

body.dark-mode .home-stat-num {
    color: #cde0ff;
}

body.dark-mode .home-stat-card--alert .home-stat-num {
    color: #fca5a5;
}

body.dark-mode .home-stat-label,
body.dark-mode .home-muted {
    color: #a0aab4;
}

body.dark-mode .home-recent-item {
    border-bottom-color: #333;
}

body.dark-mode .home-recent-main strong {
    color: #e8ecf1;
}

body.dark-mode .home-recent-score {
    color: #9ec5ff;
}

/* 兩欄式佈局（個人資訊 / 開放考試對齊） */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.home-grid--equal {
    grid-template-columns: 1fr 1fr;
}

.home-grid-col {
    display: flex;
    min-width: 0;
}

.home-grid-col .home-panel,
.home-grid-col .post.home-panel {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-sizing: border-box;
}

.home-grid-col .home-view-all,
.home-grid-col .logout-form {
    margin-top: auto;
}

@media (max-width: 920px) {
    .home-grid,
    .home-grid--equal {
        grid-template-columns: 1fr;
    }
}

.home-section-title {
    font-size: 18px;
    color: #1e355b;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 個人資訊區 */
.home-info-list p {
    margin: 6px 0;
    font-size: 15px;
    color: #333;
}

.home-info-list .label {
    color: #555;
    font-weight: 500;
}

.home-logout-btn {
    margin-top: 14px;
    padding: 8px 16px;
    background: #1e355b;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.home-logout-btn:hover {
    background: #2e4d7a;
    color: #ffffff;
}

.home-login-btn {
    margin-top: 8px;
}

.home-view-all {
    margin-top: 12px;
    text-align: right;
}

.home-view-all a {
    font-size: 13px;
    color: #1e355b;
    text-decoration: none;
}

.home-view-all a:hover {
    text-decoration: underline;
}

/* 考試列表 */
.home-exam-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-exam-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.home-exam-item:hover {
    border-color: #1e355b;
    box-shadow: 0 2px 8px rgba(30, 53, 91, 0.08);
    transform: translateY(-1px);
}

.home-exam-info {
    flex: 1;
    min-width: 0;
}

.home-exam-title {
    font-weight: 600;
    color: #1e355b;
    font-size: 15px;
    margin-bottom: 3px;
    line-height: 1.3;
}

.home-exam-meta {
    font-size: 12.5px;
    color: #666;
}

.home-exam-action {
    margin-left: 12px;
    flex-shrink: 0;
}

.home-exam-action .btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
}

.home-no-exam {
    color: #666;
    font-size: 14px;
    padding: 10px 0;
}

/* 底部公告區 */
.announcement-bottom {
    margin-top: 24px;
}

.announcement-bottom h3 {
    color: #1e355b;
    margin-bottom: 10px;
    font-size: 17px;
}

.announcement-bottom .announcement-body {
    background: #f8f9fa;
    border-left: 4px solid #1e355b;
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.6;
    color: #222;
}

/* 夜間模式適配（個人資訊／考試列表／公告） */
body.dark-mode .home-section-title {
    color: #cde0ff;
}

body.dark-mode .home-personal .post,
body.dark-mode .home-section .post {
    background: #1f1f1f;
    border-color: #3a3a3a;
    color: #e8ecf1;
}

/* 個人資訊：姓名／學號／班級（原本 #333 在夜間會看不見） */
body.dark-mode .home-info-list p {
    color: #e8ecf1;
}
body.dark-mode .home-info-list .label {
    color: #a8b8c8;
}

body.dark-mode .home-exam-item {
    background: #2a2a2a;
    border-color: #444;
}
body.dark-mode .home-exam-title {
    color: #cde0ff;
}
body.dark-mode .home-exam-meta {
    color: #a0aab4;
}
body.dark-mode .home-no-exam,
body.dark-mode .home-empty-state,
body.dark-mode .home-empty-state p {
    color: #a0aab4;
}
body.dark-mode .home-view-all a {
    color: #7eb6ff;
}
body.dark-mode .count-badge {
    background: #2a3f5c;
    color: #cde0ff;
}
body.dark-mode .announcement-bottom h3,
body.dark-mode .announcement-title {
    color: #cde0ff;
}
body.dark-mode .announcement-bottom .announcement-body {
    background: #2a2a2a;
    color: #e0e0e0;
    border-left-color: #4a8cff;
}

/* ===================== 新增：讓頁面更有內容感 ===================== */

/* 頂部統計概況區 */
.home-header {
    margin-bottom: 16px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.home-header .home-section-title {
    margin-bottom: 10px;
    font-size: 16px;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .home-stats {
        grid-template-columns: 1fr;
    }
    .stat-login {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

.stat-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 14px 18px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 53, 91, 0.08);
}

.stat-number {
    font-size: 26px;
    font-weight: 700;
    color: #1e355b;
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

/* 未登入時的統計區 */
.stat-login {
    grid-column: 1 / -1; /* 讓它跨三欄 */
    padding: 18px 20px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stat-login p {
    margin: 0;
    color: #555;
    font-size: 14px;
}

/* 快速操作區 */
.quick-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.quick-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.quick-title {
    font-size: 13px;
    color: #555;
    margin: 0;
    font-weight: 600;
}

.quick-edit-btn {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #c5d0e0;
    background: #fff;
    color: #1e355b;
    cursor: pointer;
    font-weight: 600;
}

.quick-edit-btn:hover {
    background: #e8eef7;
    border-color: #1e355b;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f1f4f8;
    color: #1e355b;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.quick-btn:hover {
    background: #e0e7f0;
    border-color: #1e355b;
}

.quick-btn.small {
    font-size: 12px;
    padding: 4px 10px;
}

.quick-empty {
    font-size: 13px;
    color: #888;
}

.quick-edit-panel {
    margin-top: 10px;
    padding: 12px;
    background: #f7f9fc;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
}

.quick-edit-hint {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #666;
    line-height: 1.45;
}

/* 超過 8 個：就地紅字（不用 alert） */
.quick-limit-msg {
    margin: 8px 0 0;
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 8px;
}
.quick-limit-msg[hidden] {
    display: none !important;
}

.quick-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.quick-edit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.quick-edit-item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.quick-edit-item.is-disabled input {
    cursor: not-allowed;
}
body.dark-mode .quick-limit-msg {
    color: #fca5a5;
    background: #3a1f1f;
    border-color: #7f1d1d;
}
body.dark-mode .quick-edit-hint {
    color: #a0aab4;
}
    color: #333;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e1e8ed;
}

.quick-edit-item:hover {
    border-color: #1e355b;
}

.quick-edit-item input {
    accent-color: #1e355b;
}

.quick-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.quick-save-btn {
    margin-top: 0;
}

.quick-cancel-btn {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
    cursor: pointer;
    font-size: 13px;
}

.quick-cancel-btn:hover {
    background: #f0f0f0;
}

body.dark-mode .quick-edit-btn {
    background: #2a2a2a;
    border-color: #555;
    color: #cde0ff;
}

body.dark-mode .quick-edit-panel {
    background: #252525;
    border-color: #3a3a3a;
}

body.dark-mode .quick-edit-hint {
    color: #a0aab4;
}

body.dark-mode .quick-edit-item {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .quick-cancel-btn {
    background: #2a2a2a;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .quick-empty {
    color: #888;
}

/* 考試區標題 + 數量徽章 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-header .home-section-title {
    margin-bottom: 0;
}

.home-panel > .home-section-title {
    margin-bottom: 14px;
}

.count-badge {
    background: #e8eef7;
    color: #1e355b;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* 沒有內容時的空狀態 */
.home-empty-state {
    padding: 20px 10px;
    text-align: center;
    color: #777;
}

.home-empty-state p {
    margin-bottom: 10px;
    font-size: 14px;
}

.home-login-hint {
    color: #666;
    margin: 8px 0 12px;
}

/* 公告標題 */
.announcement-title {
    color: #1e355b;
    display: block;
    margin-bottom: 6px;
}

/* 讓整體感覺更飽滿一點的小調整 */
.home-grid {
    margin-bottom: 8px;
}

.post {
    padding: 18px 20px;  /* 原本可能太鬆，稍微增加內距 */
}

/* 夜間模式：統計卡 + 快速操作 */
body.dark-mode .stat-card {
    background: #2a2a2a;
    border-color: #444;
}
body.dark-mode .home-header {
    background: #2a2a2a;
    border-color: #444;
}
body.dark-mode .stat-number {
    color: #cde0ff;
}
body.dark-mode .stat-label {
    color: #a0aab4;
}
body.dark-mode .stat-login {
    background: #2a2a2a;
    border-color: #444;
}
body.dark-mode .stat-login p {
    color: #ccc;
}

/* 快速操作四格：容器與按鈕完整暗色 */
body.dark-mode .quick-actions {
    border-top-color: #3a3a3a;
}
body.dark-mode .quick-title {
    color: #c5d0dc;
}
body.dark-mode .quick-links {
    /* 確保區塊本身在暗底上可辨識 */
}
body.dark-mode .quick-btn,
body.dark-mode a.quick-btn {
    background: #2f3b4d;
    color: #e8f0ff;
    border: 1px solid #4a5d75;
}
body.dark-mode .quick-btn:hover,
body.dark-mode a.quick-btn:hover {
    background: #3d4f68;
    border-color: #7eb6ff;
    color: #ffffff;
}
body.dark-mode .home-logout-btn {
    background: #3a5f8a;
    color: #fff;
}
body.dark-mode .home-logout-btn:hover {
    background: #4a6f9a;
}
body.dark-mode .home-personal .btn-primary,
body.dark-mode .home-exam-action .btn-primary,
body.dark-mode .home-exam-action a.btn {
    background: #3a5f8a;
    color: #fff;
    border-color: #3a5f8a;
}

/* ===================== 新版首頁版面（Hero + 專區卡片 + 特色 + 流程） ===================== */

/* Hero 主視覺區 */
.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: linear-gradient(135deg, #1e355b 0%, #2e4d7a 100%);
    border-radius: 12px;
    padding: 36px 40px;
    margin-bottom: 24px;
    color: white;
}

/* 無右側 AI 模擬圖 */
.home-hero--plain {
    justify-content: flex-start;
}

.home-hero--plain .hero-content {
    flex: 1 1 auto;
    max-width: 720px;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-content h1 {
    font-size: 30px;
    margin: 0 0 12px;
    color: white;
}

.hero-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #d6e0ee;
    margin: 0 0 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Hero 內的按鈕（深色底專用） */
.btn-light {
    background: white;
    color: #1e355b;
    font-weight: 600;
}

.btn-light:hover {
    background: #e8eef7;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
}

/* 主頁登入：清楚但不搶主視覺 */
.home-hero .btn-login-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    background: #ffffff;
    color: #1e355b;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.home-hero .btn-login-primary:hover {
    background: #eef2f8;
    transform: translateY(-1px);
    color: #1e355b;
}

.home-hero .btn-register-secondary {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 8px;
    text-decoration: none;
}

.home-hero .btn-register-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.hero-logout-form {
    margin: 0;
    display: inline;
}

.home-hero .btn-logout-outline {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.home-hero .btn-logout-outline:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #ffffff;
    border-color: #ffffff;
}

/* Hero 右側模擬畫面 */
.hero-visual {
    flex-shrink: 0;
}

.visual-mock {
    width: 260px;
}

.mock-screen {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.mock-header {
    height: 22px;
    background: #e8eef7;
    border-bottom: 1px solid #d5dfec;
}

.mock-content {
    padding: 14px;
}

.mock-question {
    height: 12px;
    background: #e1e8ed;
    border-radius: 4px;
    margin-bottom: 12px;
}

.mock-question::after {
    content: "";
    display: block;
    height: 12px;
    background: #edf1f5;
    border-radius: 4px;
    margin-top: 8px;
    width: 70%;
}

.mock-ai {
    background: #e8eef7;
    color: #1e355b;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 10px 10px 10px 2px;
    display: inline-block;
}

@media (max-width: 820px) {
    .home-hero {
        flex-direction: column;
        padding: 28px 22px;
        text-align: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-visual {
        display: none; /* 手機版隱藏裝飾用模擬畫面 */
    }
}

/* 個人化區塊外框與通用區塊間距 */
.home-personal {
    margin-bottom: 24px;
}

.home-section {
    margin-bottom: 24px;
}

.logout-form {
    margin-top: 14px;
}

/* 角色導引卡片（教師/學生專區、未登入開始使用） */
.home-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.role-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-card:hover {
    transform: translateY(-2px);
    border-color: #1e355b;
    box-shadow: 0 4px 10px rgba(30, 53, 91, 0.1);
}

.role-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.role-card strong {
    display: block;
    color: #1e355b;
    margin-bottom: 4px;
}

.role-card p {
    margin: 0 0 6px;
    font-size: 13.5px;
    color: #666;
    line-height: 1.5;
}

/* 平台特色 */
.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.home-feature-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 53, 91, 0.08);
}

.home-feature-card .icon {
    font-size: 26px;
    margin-bottom: 8px;
    color: #1e355b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-feature-card .icon .icon,
.home-feature-card .icon--feature {
    width: 1.75rem;
    height: 1.75rem;
}
.quick-edit-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.home-feature-card h4 {
    color: #1e355b;
    font-size: 15px;
    margin: 0 0 6px;
}

.home-feature-card p {
    margin: 0;
    font-size: 13.5px;
    color: #666;
    line-height: 1.6;
}

/* 使用流程 */
.home-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 14px 16px;
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1e355b;
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    color: #1e355b;
    font-size: 14px;
    margin-bottom: 3px;
}

.step-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 新版版面的夜間模式 — Hero 必須獨立於全站 a/h1 規則 */
body.dark-mode .home-hero {
    background: linear-gradient(135deg, #1a2740 0%, #243a5c 55%, #2e4d7a 100%);
    color: #ffffff;
    border: 1px solid #3a4f6b;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
body.dark-mode .home-hero .hero-content h1 {
    color: #ffffff;
}
body.dark-mode .home-hero .hero-content p {
    color: #c5d4e8;
}
/* 避免 night_mode 的 a { color: #7eb6ff } 把 Hero 按鈕字色弄壞 */
body.dark-mode .home-hero .btn-light,
body.dark-mode .home-hero a.btn-light {
    background: #ffffff;
    color: #1e355b;
    border: none;
}
body.dark-mode .home-hero .btn-light:hover,
body.dark-mode .home-hero a.btn-light:hover {
    background: #e8eef7;
    color: #1e355b;
}
body.dark-mode .home-hero .btn-outline,
body.dark-mode .home-hero a.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.75);
}
body.dark-mode .home-hero .btn-outline:hover,
body.dark-mode .home-hero a.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* 右側 mock 視覺：夜間改成深色面板，避免「白塊破圖」 */
body.dark-mode .visual-mock .mock-screen {
    background: #1e2430;
    border: 1px solid #3a4558;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
body.dark-mode .mock-header {
    background: #2a3344;
    border-bottom-color: #3a4558;
}
body.dark-mode .mock-content {
    background: #1e2430;
}
body.dark-mode .mock-question,
body.dark-mode .mock-question::after {
    background: #3a4558;
}
body.dark-mode .mock-ai {
    background: #2a3a52;
    color: #cde0ff;
}

body.dark-mode .role-card,
body.dark-mode .home-feature-card {
    background: #2a2a2a;
    border-color: #444;
    color: #ddd;
}
body.dark-mode .role-card:hover {
    border-color: #7eb6ff;
}
body.dark-mode .role-card strong,
body.dark-mode .home-feature-card h4 {
    color: #cde0ff;
}
body.dark-mode .role-card p,
body.dark-mode .home-feature-card p {
    color: #a0aab4;
}
body.dark-mode a.role-card {
    color: #ddd;
}
body.dark-mode .role-card .btn-primary,
body.dark-mode .role-card a.btn {
    background: #3a5f8a;
    color: #fff;
    border-color: #3a5f8a;
}

body.dark-mode .flow-step {
    background: #2a2a2a;
    border-color: #444;
}
body.dark-mode .step-number {
    background: #3a5f8a;
    color: #fff;
}
body.dark-mode .step-content strong {
    color: #cde0ff;
}
body.dark-mode .step-content p {
    color: #a0aab4;
}

/* 全站 night_mode 的 a 規則不應蓋過首頁卡片連結 */
body.dark-mode .home-personal a.quick-btn,
body.dark-mode .home-section a.role-card {
    text-decoration: none;
}

/* DARK-PASS-2026-HOME */
body.dark-mode .stat-card:hover,
body.dark-mode .home-feature-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
body.dark-mode .quick-edit-btn:hover {
    background: #2a3548;
    border-color: #7eb6ff;
    color: #cde0ff;
}
body.dark-mode .quick-cancel-btn:hover {
    background: #333;
    color: #e0e0e0;
}
body.dark-mode .home-hero .btn-login-primary:hover {
    background: #e8eef7;
    color: #1e355b;
}

/* 英雄區登出：夜間同樣清楚 */
body.dark-mode .home-hero .btn-logout-outline {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
}
body.dark-mode .home-hero .btn-logout-outline:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}
body.dark-mode .home-logout-btn {
    background: #3a5f8a;
    color: #ffffff;
}

/* 首頁分級公告列表 */
.home-ann-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.home-ann-item {
    padding: 12px 14px;
    background: rgba(30, 53, 91, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(30, 53, 91, 0.08);
}
.home-ann-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: #6b7c93;
}
.home-ann-scope { font-weight: 700; color: #1e355b; }
.announcement-title { display: block; margin-bottom: 4px; color: #1e355b; }
body.dark-mode .home-ann-item {
    background: #252525;
    border-color: #3a3a3a;
}
body.dark-mode .home-ann-scope,
body.dark-mode .announcement-title { color: #cde0ff; }
body.dark-mode .home-ann-meta { color: #a0aab4; }

