/* 移动端样式（深色·舞台） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans); font-size: var(--text-md); color: var(--text);
  background: var(--bg); line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }

/* 顶部 */
.m-header { padding: calc(env(safe-area-inset-top) + 16px) 16px 16px; background: var(--color-stage); border-bottom: 1px solid var(--line); }
.m-header h1 { margin: 0; font-size: var(--text-xl); color: var(--color-gold); }
.m-header .sub { color: var(--text-muted); font-size: var(--text-sm); }

/* 内容区，给底部 Tab 留白 */
.m-body { padding: 16px; padding-bottom: 88px; min-height: 100vh; }

/* 卡片 */
.m-card { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; }
.m-card h3 { margin: 0 0 10px; font-size: var(--text-lg); color: var(--text); }

/* 按钮（触摸目标 ≥ 44px） */
.m-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-elevated); color: var(--text); cursor: pointer; font-size: var(--text-md); font-family: inherit; }
.m-btn.primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.m-btn.block { display: flex; width: 100%; }
.m-btn[disabled] { opacity: .55; }

/* 输入框 */
.m-input, .m-select, .m-textarea { width: 100%; min-height: 44px; font-family: inherit; font-size: var(--text-md); color: var(--text); background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.m-field { margin-bottom: 12px; }
.m-field label { display: block; font-size: var(--text-sm); color: var(--text-soft); margin-bottom: 6px; }

/* 数字高亮 */
.hero-num { font-size: 34px; font-weight: 800; color: var(--color-gold); }
.hero-num small { font-size: 14px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

/* 标签页 */
.m-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.m-tabs .tab { flex: 1; text-align: center; padding: 10px; border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text-soft); font-size: var(--text-sm); border: 1px solid var(--line); }
.m-tabs .tab.active { background: var(--brand-weak); color: var(--brand); border-color: var(--brand); font-weight: 600; }

/* 列表项 */
.m-item { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; }
.m-item .t { font-weight: 600; }
.m-item .meta { color: var(--text-muted); font-size: var(--text-sm); margin-top: 4px; }

/* 徽标 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.s-success { background: var(--badge-success-bg); color: var(--success-soft); }
.badge.s-warning { background: var(--badge-warning-bg); color: var(--warning-soft); }
.badge.s-danger  { background: var(--badge-danger-bg); color: var(--danger-soft); }
.badge.s-info    { background: var(--badge-info-bg); color: var(--info-soft); }
.badge.s-muted   { background: var(--badge-muted-bg); color: var(--text-muted); }

/* 底部 Tab */
.m-tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; padding-bottom: env(safe-area-inset-bottom); background: var(--color-stage); border-top: 1px solid var(--line); display: flex; z-index: 30; }
.m-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); font-size: 12px; gap: 4px; }
.m-tabbar a.active { color: var(--color-gold); }
.m-tabbar a .ic { font-size: 22px; line-height: 1; }

/* 状态块 */
.state { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.state .em { font-size: 34px; }

/* 登录 */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px; background: var(--color-stage); }
.login .logo { color: var(--color-gold); font-size: 30px; font-weight: 800; text-align: center; }
.login .tag { text-align: center; color: var(--text-muted); margin: 6px 0 28px; }
.login .m-field { background: var(--bg-elevated); border-radius: var(--radius-md); padding: 4px 12px; border: 1px solid var(--line); }
.login .m-input { background: transparent; border: none; }
.login .hint { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 18px; }

/* Toast */
#toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast-item { background: var(--veil-toast); color: var(--on-action); padding: 10px 18px; border-radius: var(--radius-sm); font-size: var(--text-sm); }
.toast-item.err { background: var(--color-accent); }

/* 列表项内部结构（填报/工时/首页共用） */
.m-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-item-actions { margin-top: 10px; display: flex; justify-content: flex-end; }
.m-kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: var(--text-sm); }
.m-kv:last-child { border-bottom: none; }
.m-sub { color: var(--text-soft); font-size: var(--text-sm); margin-top: 6px; }
.m-desc { margin-top: 8px; color: var(--text-soft); }

/* 确认弹窗（替代原生 confirm） */
.m-mask { position: fixed; inset: 0; background: var(--veil-dark); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.m-dialog { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; width: min(320px, 86vw); box-shadow: var(--shadow-pop); }
.m-dialog-body { color: var(--text); line-height: 1.7; }
.m-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
