/* ======================================================================
   推薪客 H5 移动端 v3.0 — 设计系统
   ====================================================================== */
:root {
  --primary: #F97316; --primary-dark: #EA580C; --primary-light: #FB923C; --primary-bg: #FFF7ED;
  --primary-gradient: linear-gradient(135deg, #FB923C 0%, #F97316 55%, #EA580C 100%);
  --bg: #F3F4F6; --bg-card: #FFFFFF; --text: #111827; --text-secondary: #6B7280; --text-light: #9CA3AF;
  --border: #E5E7EB; --border-light: #F3F4F6;
  --success: #10B981; --success-bg: #D1FAE5; --success-text: #059669;
  --warning: #F59E0B; --warning-bg: #FEF3C7; --warning-text: #B45309;
  --danger: #EF4444; --danger-bg: #FEE2E2; --danger-text: #B91C1C;
  --info: #3B82F6; --info-bg: #DBEAFE; --info-text: #1D4ED8;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08),0 1px 2px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06),0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07),0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08),0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-ring: 0 0 0 3px rgba(249,115,22,0.12);
  --shadow-nav: 0 2px 12px rgba(249,115,22,0.2);
  --shadow-tabbar: 0 -4px 16px rgba(0,0,0,0.05);
  --shadow-btn: 0 2px 8px rgba(249,115,22,0.25);
  --ease-fast: 0.15s ease; --ease: 0.2s ease; --ease-slow: 0.3s cubic-bezier(0.4,0,0.2,1);
  --tab-height: 56px; --header-height: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-top: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #FB923C; --primary-dark: #F97316; --primary-light: #FDBA74; --primary-bg: #2D1F1A;
    --bg: #0F172A; --bg-card: #1E293B; --text: #F1F5F9; --text-secondary: #94A3B8; --text-light: #64748B;
    --border: #334155; --border-light: #1E293B;
    --shadow: 0 1px 3px rgba(0,0,0,0.4); --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5); --shadow-tabbar: 0 -4px 16px rgba(0,0,0,0.3);
  }
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',Helvetica,Arial,sans-serif;
  font-size: 14px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; -webkit-font-smoothing: antialiased;
}
body { min-height: 100dvh; overflow-x: hidden; }
#app { min-height: 100dvh; padding-top: calc(48px + env(safe-area-inset-top,0px)); padding-bottom: calc(56px + env(safe-area-inset-bottom,0px)); background: var(--bg); }
.page-container { position: relative; min-height: calc(100dvh - 48px - env(safe-area-inset-top,0px) - 56px - env(safe-area-inset-bottom,0px)); padding: 16px; padding-bottom: 20px; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.page-enter { animation: pageIn 0.25s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 300px; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
#navbar { position: fixed; top: 0; left: 0; right: 0; height: calc(48px + env(safe-area-inset-top,0px)); padding-top: env(safe-area-inset-top,0px); background: linear-gradient(135deg,#FB923C 0%,#F97316 55%,#EA580C 100%); color: #fff; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: env(safe-area-inset-top,0px) 16px 0; box-shadow: var(--shadow-nav); transition: transform 0.3s ease; }
#navbar.hidden { transform: translateY(-100%); }
.navbar-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; letter-spacing: 0.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar-left,.navbar-right { display: flex; align-items: center; gap: 6px; min-width: 60px; }
.navbar-left { justify-content: flex-start; }
.navbar-right { justify-content: flex-end; }
.navbar-btn { background: none; border: none; color: rgba(255,255,255,0.9); font-size: 14px; padding: 6px 10px; cursor: pointer; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 4px; min-height: 40px; transition: background var(--ease-fast); }
.navbar-btn:active { background: rgba(255,255,255,0.15); }
.navbar-back { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; padding: 6px 4px; min-height: 40px; }
.navbar-back::before { content: ""; display: inline-block; width: 10px; height: 10px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); margin-right: 2px; }
.tab-bar,#tabbar,.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: calc(56px + env(safe-area-inset-bottom,0px)); padding-bottom: env(safe-area-inset-bottom,0px); background: var(--bg-card); border-top: 1px solid var(--border-light); z-index: 100; display: flex; align-items: flex-start; justify-content: space-around; box-shadow: var(--shadow-tabbar); }
.tab-bar-item,.tabbar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; cursor: pointer; color: var(--text-light); transition: color var(--ease-fast),transform var(--ease-fast); position: relative; min-height: 44px; user-select: none; }
.tab-bar-item.active,.tabbar-item.active { color: var(--primary); }
.tab-bar-item:active,.tabbar-item:active { transform: scale(0.92); }
.tab-bar-icon,.tabbar-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; }
.tab-bar-label,.tabbar-label { font-size: 10px; line-height: 1.2; font-weight: 500; }
.tab-bar-badge,.tabbar-badge { position: absolute; top: 2px; right: 50%; margin-right: -18px; min-width: 16px; height: 16px; padding: 0 5px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; border-radius: var(--radius-full); font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; font-size: 14px; font-weight: 500; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--ease-fast); user-select: none; white-space: nowrap; line-height: 1.4; min-height: 40px; }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary-gradient); color: #fff; border-color: var(--primary); box-shadow: var(--shadow-btn); }
.btn-outline { background: var(--bg-card); color: var(--primary); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-sm { padding: 4px 10px; font-size: 12px; min-height: 32px; }
.btn-lg { padding: 12px 20px; font-size: 16px; min-height: 48px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
.form-input { width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text); transition: border-color var(--ease-fast),box-shadow var(--ease-fast); outline: none; -webkit-appearance: none; }
.form-input:focus { border-color: var(--primary); box-shadow: var(--shadow-ring); }
.form-input::placeholder { color: var(--text-light); }
.card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); border: 1px solid var(--border-light); transition: box-shadow var(--ease-fast),transform var(--ease-fast); }
.card:active { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.card-title { font-size: 16px; font-weight: 600; }
.card-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.card-body { font-size: 14px; }
.card-list .card-item { display: flex; align-items: center; padding: 14px 16px; background: var(--bg-card); border-bottom: 1px solid var(--border); gap: 12px; transition: background var(--ease-fast),padding-left var(--ease-fast); cursor: pointer; }
.card-list .card-item:last-child { border-bottom: none; }
.card-list .card-item:active { background: var(--primary-bg); padding-left: 20px; }
.card-list .card-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.list-item { display: flex; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border-light); cursor: pointer; min-height: 44px; transition: background var(--ease-fast),padding-left var(--ease-fast); }
.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--primary-bg); padding-left: 12px; }
.list-item-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--primary-bg); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 12px; flex-shrink: 0; }
.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-arrow { color: var(--text-light); margin-left: 12px; font-size: 14px; flex-shrink: 0; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; font-size: 10px; font-weight: 500; border-radius: 4px; line-height: 1.4; }
.tag-primary { background: var(--primary-bg); color: var(--primary); }
.tag-success { background: var(--success-bg); color: var(--success-text); }
.tag-warning { background: var(--warning-bg); color: var(--warning-text); }
.tag-danger { background: var(--danger-bg); color: var(--danger-text); }
.tag-info { background: var(--info-bg); color: var(--info-text); }
.stats-grid { display: grid; gap: 10px; margin-bottom: 16px; }
.stats-grid-2 { grid-template-columns: repeat(2,1fr); }
.stats-grid-3 { grid-template-columns: repeat(3,1fr); }
.stats-grid-4 { grid-template-columns: repeat(4,1fr); }
.stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 14px 12px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border-light); transition: transform var(--ease-fast),box-shadow var(--ease-fast); }
.stat-card:active { transform: scale(0.96); box-shadow: var(--shadow-md); }
.stat-value,.stat-card-value { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.3px; }
.stat-value.primary,.stat-card-value.primary { color: var(--primary); }
.stat-value.success,.stat-card-value.success { color: var(--success); }
.stat-value.warning,.stat-card-value.warning { color: var(--warning); }
.stat-value.danger,.stat-card-value.danger { color: var(--danger); }
.stat-label,.stat-card-label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.stat-card-icon { font-size: 20px; margin-bottom: 4px; }
.loading-indicator { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); z-index: 400; }
.spinner,.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
.empty-state,.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 16px; color: var(--text-light); text-align: center; }
.empty-state-icon,.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state-text,.empty-text { font-size: 14px; margin-bottom: 8px; }
.empty-state-hint,.empty-hint { font-size: 13px; color: var(--text-light); }
.skeleton { background: linear-gradient(90deg,var(--border) 25%,var(--border-light) 50%,var(--border) 75%); background-size: 200% 100%; animation: pulse 1.5s ease-in-out infinite; border-radius: 4px; }
.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-text { height: 12px; margin-bottom: 8px; width: 100%; }
.skeleton-text-sm { width: 60%; }
.skeleton-text-lg { height: 16px; }
.search-bar { display: flex; align-items: center; background: var(--bg-card); border-radius: var(--radius-sm); padding: 0 12px; border: 1px solid var(--border); margin-bottom: 12px; transition: border-color var(--ease-fast); }
.search-bar:focus-within { border-color: var(--primary); box-shadow: var(--shadow-ring); }
.search-bar input { flex: 1; border: none; outline: none; background: transparent; padding: 10px 0; font-size: 14px; color: var(--text); }
.search-bar input::placeholder { color: var(--text-light); }
.search-icon { font-size: 16px; margin-right: 8px; color: var(--text-light); flex-shrink: 0; }
.search-clear { font-size: 14px; color: var(--text-light); cursor: pointer; padding: 4px; flex-shrink: 0; }
.cat-tabs,.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 4px 8px; margin-bottom: 12px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab,.filter-chip { flex-shrink: 0; padding: 6px 14px; font-size: 12px; border-radius: var(--radius-full); background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all var(--ease-fast); white-space: nowrap; min-height: 36px; display: flex; align-items: center; }
.cat-tab.active,.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.segment { display: flex; background: var(--bg); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 16px; border: 1px solid var(--border-light); }
.segment-item { flex: 1; text-align: center; padding: 8px; font-size: 13px; border-radius: 6px; cursor: pointer; transition: all var(--ease); color: var(--text-secondary); min-height: 36px; display: flex; align-items: center; justify-content: center; }
.segment-item.active { background: var(--bg-card); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
#toast-container,.toast-container { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 300; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast { padding: 12px 24px; background: var(--text); color: #fff; border-radius: var(--radius); font-size: 14px; max-width: 300px; text-align: center; animation: toastIn 0.25s ease,toastOut 0.3s ease 2.5s; pointer-events: auto; box-shadow: var(--shadow-lg); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.tkx-progress-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2001; background: transparent; pointer-events: none; }
.tkx-progress-bar .bar { height: 100%; width: 0; background: linear-gradient(90deg,var(--primary-light),var(--primary),var(--primary-dark)); border-radius: 0 2px 2px 0; transition: width 0.3s ease; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: var(--bg-card); border-radius: var(--radius-lg); max-width: 400px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow-xl); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-light); cursor: pointer; padding: 4px; min-height: 40px; min-width: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); transition: background var(--ease-fast); }
.modal-close:active { background: var(--bg); }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 8px; }
.login-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.login-tab { flex: 1; text-align: center; padding: 12px; font-size: 14px; font-weight: 500; color: var(--text-secondary); border-bottom: 2px solid transparent; cursor: pointer; transition: color var(--ease-fast),border-color var(--ease-fast); min-height: 44px; }
.login-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.role-selector { position: fixed; bottom: calc(56px + env(safe-area-inset-bottom,0px) + 8px); left: 50%; transform: translateX(-50%); background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); padding: 16px; z-index: 150; min-width: 280px; }
.role-selector-item { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--ease-fast); min-height: 44px; }
.role-selector-item:active { background: var(--primary-bg); }
.role-selector-item.active { background: var(--primary-bg); color: var(--primary); }
.role-selector-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.role-selector-name { font-size: 14px; font-weight: 500; }
.role-selector-desc { font-size: 10px; color: var(--text-light); }
.msg-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--ease-fast); }
.msg-item:active { background: var(--primary-bg); }
.msg-item.unread { background: var(--primary-bg); }
.msg-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-summary { font-size: 12px; color: var(--text-secondary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { font-size: 10px; color: var(--text-light); flex-shrink: 0; }
.msg-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.chat-msg { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-end; }
.chat-msg.self { flex-direction: row-reverse; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: var(--radius); font-size: 14px; line-height: 1.5; word-break: break-word; }
.chat-msg:not(.self) .chat-bubble { background: var(--bg); border-bottom-left-radius: 4px; }
.chat-msg.self .chat-bubble { background: var(--primary-gradient); color: #fff; border-bottom-right-radius: 4px; }
.chat-time { font-size: 10px; color: var(--text-light); margin-top: 4px; }
.chat-input-area { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-card); border-top: 1px solid var(--border-light); }
.chat-input { flex: 1; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 8px 16px; font-size: 14px; outline: none; background: var(--bg); transition: border-color var(--ease-fast); }
.chat-input:focus { border-color: var(--primary); }
.job-card { background: var(--bg-card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); border: 1px solid var(--border-light); cursor: pointer; transition: transform var(--ease-fast),box-shadow var(--ease-fast); }
.job-card:active { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.job-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.job-card-title { font-size: 15px; font-weight: 600; flex: 1; line-height: 1.3; }
.job-card-salary { font-size: 15px; font-weight: 700; color: var(--primary); white-space: nowrap; margin-left: 8px; }
.job-card-company { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.job-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.job-card-footer { display: flex; justify-content: space-between; align-items: center; }
.job-card-location { font-size: 12px; color: var(--text-light); }
.job-card-time { font-size: 11px; color: var(--text-light); }
.entry-card { flex-shrink: 0; width: 140px; background: var(--bg-card); border-radius: var(--radius); padding: 16px 12px; box-shadow: var(--shadow); border: 1px solid var(--border-light); cursor: pointer; transition: transform var(--ease-fast),box-shadow var(--ease-fast); text-align: center; }
.entry-card:active { transform: scale(0.96); }
.entry-card-icon { font-size: 28px; margin-bottom: 8px; }
.entry-card-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.entry-card-desc { font-size: 11px; color: var(--text-light); line-height: 1.3; }
.h-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.h-scroll::-webkit-scrollbar { display: none; }
.amt { font-variant-numeric: tabular-nums; }
.amt-positive { color: var(--success); }
.amt-negative { color: var(--danger); }
.detail-actions { position: sticky; bottom: calc(56px + env(safe-area-inset-bottom,0px)); padding: 12px 16px; background: var(--bg-card); border-top: 1px solid var(--border-light); display: flex; gap: 10px; }
#offlineBar { position: fixed; top: calc(48px + env(safe-area-inset-top,0px)); left: 0; right: 0; background: var(--warning); color: #fff; text-align: center; padding: 6px 16px; font-size: 12px; font-weight: 500; z-index: 99; transform: translateY(-100%); transition: transform 0.3s ease; }
#offlineBar[style*="display: block"],#offlineBar:not([style*="display: none"]) { transform: translateY(0); }
@media (prefers-color-scheme: dark) {
  .stat-card { background: var(--bg-card); }
  .btn-outline { border-color: var(--primary-light); }
  input,textarea { background: #1e293b !important; border-color: #475569 !important; color: #e2e8f0 !important; }
  .form-input { background: #1e293b; border-color: #475569; color: #e2e8f0; }
}
@media (display-mode: standalone) {
  .header { padding-top: env(safe-area-inset-top); }
  .tab-bar { padding-bottom: max(env(safe-area-inset-bottom), 4px); }
}

/* ========== 全局动态组件 (tuixinke-m.js) ========== */
/* Toast */
.g-toast{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;padding:12px 24px;z-index:9999;box-shadow:0 4px 12px rgba(0,0,0,.2);max-width:80vw;text-align:center;border-radius:var(--radius);font-size:14px;animation:toastIn .25s ease}.g-toast.info{background:#3B82F6}.g-toast.success{background:#10B981}.g-toast.error{background:#EF4444}.g-toast.warning{background:#F59E0B}
/* Loading遮罩 */
.g-loading{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.3);display:flex;align-items:center;justify-content:center;z-index:9998}.g-loading-box{background:var(--bg-card);padding:24px 32px;border-radius:var(--radius);text-align:center}.g-loading-box .spinner{margin:0 auto 8px}.g-loading-box .g-loading-text{font-size:14px;color:var(--text-secondary)}
/* Confirm覆盖层 */
.g-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.4);display:flex;align-items:center;justify-content:center;z-index:9997}.g-overlay-box{background:var(--bg-card);border-radius:var(--radius);padding:24px;width:280px}.g-overlay-title{font-size:16px;font-weight:600;margin-bottom:8px}.g-overlay-text{font-size:14px;color:var(--text-secondary);margin-bottom:20px}.g-overlay-actions{display:flex;gap:12px;justify-content:center}
/* PWA安装条 */
.g-install-bar{position:fixed;bottom:0;left:0;right:0;background:var(--bg-card);border-top:1px solid var(--border);padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));display:flex;align-items:center;gap:10px;z-index:50;animation:slideUp .3s ease}.g-install-icon{width:40px;height:40px;border-radius:10px;background:var(--primary-gradient);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}.g-install-text{flex:1;min-width:0}.g-install-title{font-size:14px;font-weight:600;color:var(--text)}.g-install-desc{font-size:11px;color:var(--text-secondary)}.g-install-btn{background:var(--primary-gradient);color:#fff;border:none;border-radius:20px;padding:8px 18px;font-size:13px;font-weight:600;cursor:pointer;flex-shrink:0}.g-install-close{background:none;border:none;color:var(--text-light);font-size:18px;cursor:pointer;padding:4px;flex-shrink:0}
/* 离线条 */
#offlineBar{display:none;position:sticky;top:48px;z-index:40;background:#FEF3C7;color:#92400E;font-size:13px;text-align:center;padding:6px 12px;border-bottom:1px solid rgba(251,191,36,.3)}
/* 骨架屏精炼 */
.skeleton{background:var(--skeleton);border-radius:var(--radius-sm);animation:pulse 1.5s ease-in-out infinite}.skeleton-circle{width:36px;height:36px;border-radius:50%}.skeleton-text{height:16px;width:80px}.skeleton-text-sm{height:12px;width:50px}
