:root { --zs-primary: #49bfab; /* Reverted to Original Teal */ --zs-dark: #2d3748; --zs-bg: #f8fafc; }
/* 🚨 統一網頁本體字型組合 */
body { font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; background-color: var(--zs-bg); color: var(--zs-dark); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5; overflow-x: hidden; }
.font-display { font-family: 'Space Grotesk', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; }
.app-container { width: 100%; max-width: 100vw; min-height: 100vh; background: white; padding-bottom: 100px; overflow-x: hidden; }
@media (min-width: 1024px) { .app-container { max-width: 1440px; margin: 1.5rem auto; border-radius: 2rem; border: 1px solid #f1f5f9; min-height: calc(100vh - 3rem); box-shadow: 0 4px 15px rgba(0,0,0,0.02); overflow: hidden; padding-bottom: 0; } }

/* 選單按鈕基礎樣式 */
.nav-pill { padding: 0.75rem 1.4rem; border-radius: 99px; color: #64748b; font-weight: 700; cursor: pointer; transition: 0.2s; background: #f8fafc; font-size: 0.95rem; border: 1px solid #f1f5f9; white-space: nowrap; }
.nav-pill:hover { background-color: #f1f5f9; color: var(--zs-primary); }
.nav-pill.active { background: var(--zs-primary); color: white; border-color: var(--zs-primary); }

/* 🚨 新增：作業專屬高亮按鈕 (Action Tab) - 呈現淺綠色底 */
.nav-pill.action-tab { background-color: #ccfbf1 !important; color: #0f766e !important; border-color: #99f6e4 !important; }
.nav-pill.action-tab:hover { background-color: #99f6e4 !important; color: #0f766e !important; }
.nav-pill.action-tab.active { background-color: var(--zs-primary) !important; color: white !important; border-color: var(--zs-primary) !important; box-shadow: 0 4px 10px rgba(73, 191, 171, 0.3) !important; }

.card { background: #ffffff; border-radius: 1.5rem; padding: 1.5rem; border: 1px solid #f1f5f9; transition: 0.3s; }
.card:hover { border-color: var(--zs-primary); }
th { text-align: left; padding: 0.75rem 0.75rem; background: #f8fafc; font-size: 0.9rem; color: #64748b; font-weight: 900; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid #f1f5f9; cursor: pointer; user-select: none; }
th:hover { color: var(--zs-primary); }
td { padding: 0.75rem 0.75rem; border-bottom: 1px solid #f8fafc; font-size: 0.95rem; }
.badge { padding: 4px 8px; border-radius: 6px; font-weight: 900; font-size: 0.75rem; border: 1px solid transparent; }
.badge-paid { color: #10b981; background: #ecfdf5; border: 1px solid #d1fae5; }
.badge-unpaid { color: #ef4444; background: #fef2f2; border: 1px solid #fee2e2; }
.badge-sample { color: #6366f1; background: #eef2ff; border: 1px solid #e0e7ff; }
input, select, textarea { width: 100%; background-color: #f8fafc; border: 1px solid #f1f5f9; border-radius: 0.75rem; padding: 0.6rem 1rem; outline: none; font-size: 0.95rem; transition: 0.2s; }
input:focus { border-color: var(--zs-primary); background: white; }
.btn-primary { background: var(--zs-primary); color: white; border: none; border-radius: 0.75rem; padding: 0.8rem 1.5rem; font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 0.95rem; }
.upload-zone { border: 1px dashed #cbd5e1; border-radius: 1.5rem; padding: 3rem 1.5rem; text-align: center; transition: 0.3s; background: #fafafa; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.upload-zone.dragover { border-color: var(--zs-primary); background: #f0faf9; }
.upload-zone * { pointer-events: none; }

/* 🚨 修復：加上 pointer-events: none，避免提示框在隱形時擋住底下的按鈕點擊 */
#message-toast { position: fixed; top: 20px; right: 20px; z-index: 10001; padding: 1rem 2rem; border-radius: 1rem; background: var(--zs-dark); color: white; font-weight: bold; transform: translateY(-150px); transition: 0.4s; box-shadow: 0 10px 25px rgba(0,0,0,0.1); pointer-events: none; opacity: 0; }
#message-toast.show { transform: translateY(0); pointer-events: auto; opacity: 1; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }
.tag-input-container { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 0.75rem; padding: 6px 10px; min-height: 48px; transition: 0.2s; }
.tag-input-container:focus-within { border-color: var(--zs-primary); background: white; }
.tag { background: #e0f2fe; color: #0284c7; padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; gap: 4px; animation: fadeIn 0.2s; }
.tag-remove { cursor: pointer; opacity: 0.6; padding: 0 2px; }
.tag-remove:hover { opacity: 1; color: #ef4444; }
.tag-input { border: none; outline: none; background: transparent; flex: 1; min-width: 60px; font-size: 0.95rem; padding: 4px; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.hint { border-bottom: 1px dashed #94a3b8; cursor: help; position: relative; display: inline-block; }
.hint:hover::after { content: attr(title); position: absolute; left: 0; bottom: 100%; background: #1e293b; color: white; padding: 8px 12px; border-radius: 8px; font-size: 13px; white-space: pre-wrap; width: max-content; max-width: 250px; z-index: 50; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); margin-bottom: 6px; line-height: 1.4; font-weight: 500; }
.modal { opacity: 0; visibility: hidden; transition: 0.3s; }
.modal.open { opacity: 1; visibility: visible; }
@media print {
    .no-print { display: none !important; }
    .app-container { max-width: 100%; border: none; margin: 0; box-shadow: none; }
    body { background: white; }
    .card { border: 1px solid #ddd; break-inside: avoid; }
}