/* ==========================================================================
   114 學年度家庭教育成果網頁 - 主樣式表 (style.css)
   ========================================================================== */

/* --- 全域變數與設計系統 --- */
:root {
    --primary: #1e3a8a;       /* 經典深藍 */
    --primary-light: #3b82f6; /* 明亮藍 */
    --primary-dark: #172554;  /* 深黑藍 */
    --accent: #d97706;        /* 琥珀金/黃 */
    --accent-light: #f59e0b;  /* 亮金黃 */
    --success: #10b981;       /* 綠色 */
    --success-light: #d1fae5; /* 淺綠 */
    
    /* 中性色 */
    --bg-dark: #0f172a;       /* 暗底 */
    --bg-light: #f8fafc;      /* 灰白底 */
    --card-bg: #ffffff;       /* 卡片白 */
    --text-main: #1e293b;     /* 主文字 */
    --text-muted: #64748b;    /* 輔助文字 */
    --border-color: #e2e8f0;  /* 框線 */
    
    /* 其他變數 */
    --sidebar-width: 280px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* --- 基礎重設與文字設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', 'Noto Sans TC', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* --- 版面主架構 --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 側邊導覽列 */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-dark);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.school-logo {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.sidebar-title-wrapper {
    flex: 1;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 16px 20px 8px;
    letter-spacing: 1px;
}

.nav-item {
    margin: 4px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.indicator-badge {
    font-size: 10px;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
}

.indicator-badge.bonus {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* 懸停與啟用樣式 */
.nav-item:hover a {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background-color: var(--primary);
}

.nav-item.active a {
    color: white;
    font-weight: 600;
}

.nav-item.active .indicator-badge {
    background-color: var(--accent);
    color: white;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-footer p {
    margin-bottom: 4px;
}

/* 主內容展示區 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0; /* 防止子項溢出 */
}

/* 手機版頂欄 */
.topbar {
    height: 60px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow);
}

.menu-toggle-btn, .sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.menu-toggle-btn:hover, .sidebar-toggle-btn:hover {
    background-color: #f1f5f9;
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.topbar-school {
    font-size: 12px;
    font-weight: 600;
    background-color: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
}

.content-window {
    padding: 30px;
    flex: 1;
}

/* --- 頁面 Section 切換與隱藏 --- */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 首頁元件樣式 --- */

/* 大橫幅 Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.45) 0%, rgba(15, 23, 42, 0.6) 100%), url('assets/小五小華PPT模板.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    padding: 48px 40px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.15) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background-color: rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 16px;
    color: #f1f5f9;
    font-weight: 400;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* 儀表板看板 Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.dashboard-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* 左側主評分圓環 */
.score-main-card {
    display: flex;
    align-items: center;
    gap: 30px;
}

.score-circle-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-fill {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s ease-out;
}

.score-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.score-total {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.score-summary-info {
    flex: 1;
}

.score-summary-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.score-badge {
    background-color: #fef3c7;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.score-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 右側進度條清單 */
.stats-overview-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-light);
    padding-left: 10px;
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}

.metric-label {
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.metric-value {
    color: var(--text-muted);
}

.metric-bar-container {
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 4px;
}

.metric-bar-fill.fill-1 { background-color: #3b82f6; }
.metric-bar-fill.fill-2 { background-color: #10b981; }
.metric-bar-fill.fill-3 { background-color: #8b5cf6; }
.metric-bar-fill.fill-4 { background-color: #f59e0b; }

/* 搜尋與活動篩選區域 */
.search-section {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.search-header {
    margin-bottom: 24px;
}

.search-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.filter-controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

#universal-search-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    transition: var(--transition);
    background-color: #f8fafc;
}

#universal-search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.select-wrapper select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #f8fafc;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: white;
}

/* --- 活動卡片網格與樣式 --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
}

.activity-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card-banner {
    height: 150px;
    margin: -20px -20px 14px -20px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background-color: #f1f5f9;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.activity-card:hover .card-img {
    transform: scale(1.06);
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-top {
    margin-bottom: 14px;
}

.card-indicator-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-light);
    background-color: rgba(59, 130, 246, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.card-indicator-tag.bonus-tag {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.08);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.4;
    margin-bottom: 10px;
    /* 兩行溢出截斷 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.card-meta-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-meta-item i {
    color: var(--primary-light);
    width: 14px;
    text-align: center;
}

.card-desc {
    font-size: 13px;
    color: var(--text-main);
    margin: 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 60px;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 6px;
}

.card-photo-count {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-card-view {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.activity-card:hover .btn-card-view {
    color: var(--primary-light);
    transform: translateX(3px);
}

/* --- 指標專用頁面樣式 --- */
.indicator-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
}

.header-main-info {
    flex: 1;
}

.indicator-tag {
    font-size: 12px;
    font-weight: 700;
    color: white;
    background-color: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.indicator-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.indicator-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: #f1f5f9;
    border-color: var(--text-muted);
}

/* 得分說明方塊 */
.score-rule-box {
    background-color: #eff6ff;
    border-left: 4px solid var(--primary-light);
    border-radius: 4px;
    padding: 14px 18px;
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.rule-icon {
    font-size: 16px;
    color: var(--primary-light);
    margin-top: 2px;
}

.rule-text {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}

/* 指標活動統計數據橫列 */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.stat-badge {
    font-size: 14px;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

.stat-count {
    font-weight: 700;
    color: var(--text-main);
}

.stat-count.highlight {
    color: var(--accent);
    background-color: #fffbeb;
    padding: 2px 8px;
    border-radius: 4px;
}

.search-mini {
    margin-left: auto;
    width: 240px;
}

.search-mini input {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.search-mini input:focus {
    border-color: var(--primary-light);
}

/* --- 下載專區樣式 --- */
.downloads-container {
    max-width: 800px;
    margin: 0 auto;
}

.downloads-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-large-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.downloads-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.downloads-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.download-item:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-md);
}

.dl-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-icon i.pdf { color: #ef4444; }
.dl-icon i.xlsx { color: #10b981; }

.dl-info {
    flex: 1;
}

.dl-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.dl-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- 彈出成果報告書視窗 (Activity Modal) --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
}

.modal-container {
    background-color: white;
    width: 100%;
    max-width: 900px;
    height: 90%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header-actions {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-modal-action {
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    color: var(--text-main);
}

.btn-modal-action:hover {
    background-color: #e2e8f0;
}

#btn-close-modal:hover {
    background-color: #fecaca;
    color: #ef4444;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background-color: #f1f5f9;
}

/* 學校成果成果報告書樣式 (Word Table Replication) */
.word-report {
    background-color: white;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-radius: 2px;
}

.report-top-header {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    color: black;
    font-family: "Noto Sans TC", sans-serif;
    border-bottom: 2px solid black;
    padding-bottom: 12px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Noto Sans TC", sans-serif;
    margin-bottom: 30px;
}

.report-table td {
    border: 1px solid black;
    padding: 10px 12px;
    font-size: 14px;
    color: black;
    vertical-align: middle;
}

.report-table td.tbl-label {
    background-color: #f2f2f2;
    font-weight: 700;
    text-align: center;
}

.report-table td.tbl-value {
    text-align: left;
}

.desc-content-box {
    white-space: pre-wrap;
    min-height: 180px;
    font-size: 14px;
    line-height: 1.8;
}

.report-photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 10px 0;
}

.photo-placeholder-card {
    border: 1px dashed #cbd5e1;
    background-color: #f8fafc;
    border-radius: 4px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
}

.placeholder-icon {
    font-size: 36px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.placeholder-caption {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.placeholder-tag {
    font-size: 10px;
    color: var(--text-muted);
}

/* 自評表勾選與排版 */
.tbl-eval-header {
    background-color: #e5e5e5;
    font-weight: 700;
    text-align: center;
    border: 1px solid black;
    padding: 8px;
    font-size: 13px;
}

.cell-check {
    font-size: 18px;
}

.report-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    font-family: "Noto Sans TC", sans-serif;
    font-size: 14px;
}

.sig-item {
    font-weight: 700;
}

.sig-line {
    display: inline-block;
    width: 120px;
    border-bottom: 1px solid black;
    margin-left: 6px;
    vertical-align: bottom;
    height: 20px;
}

/* 全域實用樣式 */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.font-bold { font-weight: 700 !important; }
.font-green { color: #059669 !important; }
.align-top { vertical-align: top !important; }

/* --- 響應式切換與排版調整 (Responsive Design) --- */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        display: flex;
    }
    
    .content-window {
        padding: 20px;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .indicator-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .header-action-button {
        width: 100%;
    }
    
    .header-action-button a {
        width: 100%;
        justify-content: center;
    }
    
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dl-actions {
        width: 100%;
    }
    
    .dl-actions a {
        width: 100%;
        justify-content: center;
    }
    
    .modal-container {
        height: 100%;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .word-report {
        padding: 20px;
    }
    
    .report-photos-grid {
        grid-template-columns: 1fr;
    }
    
    .report-signatures {
        flex-direction: column;
        gap: 16px;
    }
}

/* --- 列印專用樣式表 (Print Media Query) --- */
@media print {
    /* 隱藏網頁上無關的元素 */
    body {
        background-color: white;
        color: black;
    }
    
    .app-container,
    .sidebar,
    .main-content,
    .topbar,
    .content-window,
    .modal-header-actions,
    .modal-backdrop:not(.active),
    .no-print {
        display: none !important;
    }
    
    /* 讓 modal 本體佔滿列印版面 */
    .modal-backdrop.active {
        position: static;
        background: none;
        backdrop-filter: none;
        padding: 0;
        display: block !important;
    }
    
    .modal-container {
        box-shadow: none;
        height: auto;
        max-width: 100%;
        display: block;
        position: static;
    }
    
    .modal-body {
        padding: 0;
        background-color: white;
        overflow: visible;
    }
    
    .word-report {
        box-shadow: none;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .report-table td {
        border-color: black !important;
    }
    
    .report-top-header {
        border-bottom-color: black !important;
    }
    
    /* 調整列印字體 */
    .report-table {
        font-size: 12pt;
    }
}
