:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --bg-body: #F1F5F9;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  line-height: 1.4;
}
#app {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 24px rgba(0,0,0,0.06);
}

/* 移动端顶栏 Header */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}
.brand-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* 角色与状态条 */
.user-statusbar {
  background: #EFF6FF;
  border-bottom: 1px solid #DBEAFE;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.status-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #16A34A;
  font-weight: 600;
}
.dot-green {
  width: 6px;
  height: 6px;
  background: #16A34A;
  border-radius: 50%;
}

/* 移动端主内容区域 */
.mobile-content {
  flex: 1;
  padding: 16px 16px calc(80px + var(--safe-bottom));
  overflow-y: auto;
}

/* 极速快捷卡片 */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.action-btn {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.action-btn:active {
  transform: scale(0.96);
  background: #EFF6FF;
  border-color: #93C5FD;
}
.action-btn .icon { font-size: 22px; }
.action-btn .label { font-size: 11px; font-weight: 600; color: #334155; }

/* 任务卡片流 */
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: all 0.2s;
}
.task-card.danger-border {
  border-left: 4px solid var(--danger);
}
.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.task-id {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}
.task-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin-top: 2px;
}
.task-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.task-tag.pending { background: #FEF3C7; color: #B45309; }
.task-tag.doing { background: #EFF6FF; color: #1D4ED8; }
.task-tag.accepting { background: #FAF5FF; color: #7E22CE; }
.task-tag.closed { background: #DCFCE7; color: #15803D; }

.task-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.task-meta-item { display: flex; align-items: center; gap: 4px; }

.task-actions {
  display: flex;
  gap: 8px;
}
.btn-mobile {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.btn-mobile:active { transform: scale(0.98); }
.btn-mobile-primary { background: var(--primary); color: #fff; }
.btn-mobile-outline { background: #fff; border-color: var(--border-color); color: #334155; }
.btn-mobile-success { background: #16A34A; color: #fff; }

/* 底部工效学语音麦克风与导航栏 */
.mobile-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  height: calc(60px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 900;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
}
.tab-item.active {
  color: var(--primary);
  font-weight: 700;
}
.tab-item .tab-icon { font-size: 20px; }

/* 底部中央 64dp 悬浮语音大麦克风 (工效学盲操) */
.mic-floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  margin-top: -30px;
  cursor: pointer;
  transition: all 0.2s;
  border: 3px solid #FFFFFF;
}
.mic-floating-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.6);
}

/* 模态框遮罩与抽屉 */
.modal-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  z-index: 1000;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}
.sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  z-index: 999;
}
