/* css/app.css - 广河方言标注 Web 版
   由小程序 app.wxss + 四个页面 wxss 移植（rpx × 0.5 = px，750rpx 设计宽）
   布局：手机宽度优先（max-width 480px 居中），桌面浏览器也能用 */

/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #1F2937;
  background: #F3F4F6;
  line-height: 1.6;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #F3F4F6;
  position: relative;
  box-shadow: 0 0 24px rgba(0,0,0,0.06);
}

/* ===== 视图切换 ===== */
.view { display: none; min-height: 100vh; padding-bottom: 76px; }
.view.active { display: block; }

.container { padding: 12px; }

/* ===== 通用 ===== */
.card {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
}

.flex-row { display: flex; flex-direction: row; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ===== 底部 Tab ===== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 200;
  display: flex;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar.hidden { display: none; }

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0 6px;
  gap: 2px;
  transition: all 0.15s;
}
.tab-item:active { transform: scale(0.94); }
.tab-icon { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: 0.5; transition: all 0.2s; }
.tab-label { font-size: 11px; color: #999999; font-weight: 600; }
.tab-item.active .tab-icon { filter: none; opacity: 1; }
.tab-item.active .tab-label { color: #2B4C7E; }

/* ===== 登录页 ===== */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 30px 40px;
  min-height: 100vh;
  background: linear-gradient(160deg, #0F172A 0%, #1E3A5F 40%, #2B4C7E 100%);
  position: relative;
  overflow: hidden;
}
.deco-circle { position: absolute; border-radius: 50%; pointer-events: none; }
.deco-circle-1 {
  top: -80px; right: -80px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
}
.deco-circle-2 {
  bottom: -60px; left: -60px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
}
.login-header { text-align: center; margin-bottom: 36px; position: relative; z-index: 1; }
.login-logo {
  width: 70px; height: 70px; border-radius: 18px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(255,255,255,0.12);
  animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.login-logo-text { font-size: 30px; }
.login-title {
  display: block; font-size: 24px; font-weight: 800;
  color: #FFFFFF; margin-bottom: 8px; letter-spacing: 3px;
}
.login-subtitle { display: block; font-size: 13px; color: rgba(255,255,255,0.5); letter-spacing: 2px; }

.login-form {
  width: 100%;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 28px 22px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
.form-item { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; color: #6B7280; margin-bottom: 7px; font-weight: 600; letter-spacing: 1px; }
.form-input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid #E5E7EB; border-radius: 8px;
  font-size: 15px; background: #F9FAFB; color: #1F2937;
  transition: all 0.2s; font-weight: 500;
}
.form-input:focus { outline: none; border-color: #2B4C7E; background: #FFFFFF; box-shadow: 0 0 0 3px rgba(43,76,126,0.1); }

.error-msg {
  background: #FEF2F2; border-left: 3px solid #EF4444;
  border-radius: 6px; padding: 9px 12px; margin-bottom: 12px;
}
.error-msg span { font-size: 13px; color: #DC2626; font-weight: 600; }

.login-btn {
  width: 100%; height: 48px;
  background: #2B4C7E; color: #FFFFFF;
  font-size: 17px; font-weight: 700; border-radius: 9px;
  margin-top: 12px;
  box-shadow: 0 4px 14px rgba(43,76,126,0.35);
  letter-spacing: 3px; transition: all 0.2s;
}
.login-btn:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 2px 7px rgba(43,76,126,0.25); }
.login-btn[disabled] { opacity: 0.5; cursor: default; }

/* ===== 任务列表页 ===== */
.page-header { margin-bottom: 12px; padding: 6px 0; }
.page-title { display: block; font-size: 22px; font-weight: 800; color: #1A1A2E; letter-spacing: 1px; }
.page-subtitle { display: block; font-size: 12px; color: #9CA3AF; margin-top: 3px; letter-spacing: 1px; }

.stats-bar { display: flex; gap: 6px; margin-bottom: 12px; }
.stat-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 12px 4px 10px; border-radius: 8px; transition: all 0.2s;
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  cursor: pointer;
}
.stat-item:active { transform: scale(0.96); }
.stat-item.selected { box-shadow: 0 0 0 2px #2B4C7E inset; }
.stat-num {
  font-size: 22px; font-weight: 800; color: #9CA3AF;
  margin-bottom: 3px; letter-spacing: -0.5px;
}
.stat-item.selected .stat-num { color: #2B4C7E; }
.stat-num.pending { color: #EF4444; }
.stat-num.done { color: #10B981; }
.stat-num.flagged { color: #F59E0B; }
.stat-label { font-size: 10px; color: #6B7280; font-weight: 600; letter-spacing: 1px; }
.stat-item.selected .stat-label { color: #2B4C7E; }

/* 任务卡片 */
.task-item {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 14px 12px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
  border-left: 4px solid transparent;
  cursor: pointer;
}
.task-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.task-item:active { transform: scale(0.985); }
.task-item.status-pending { border-left-color: #EF4444; }
.task-item.status-done, .task-item.status-submitted { border-left-color: #10B981; }
.task-item.status-approved { border-left-color: #2B4C7E; }
.task-item.status-flagged { border-left-color: #F59E0B; }
.task-item.status-rejected { border-left-color: #EF4444; }

.task-header { margin-bottom: 7px; }
.task-id {
  font-size: 11px; color: #9CA3AF; margin-right: 7px;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-weight: 600; background: #F3F4F6; padding: 2px 6px; border-radius: 4px;
}
.task-status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 10px; border-radius: 50px;
}
.task-status-text { font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.5px; }
.task-status-pill.pending { background: #FEE2E2; }
.task-status-pill.pending .task-status-text { color: #DC2626; }
.task-status-pill.done, .task-status-pill.submitted { background: #D1FAE5; }
.task-status-pill.done .task-status-text, .task-status-pill.submitted .task-status-text { color: #059669; }
.task-status-pill.approved { background: #DBEAFE; }
.task-status-pill.approved .task-status-text { color: #1E40AF; }
.task-status-pill.flagged { background: #FEF3C7; }
.task-status-pill.flagged .task-status-text { color: #D97706; }
.task-status-pill.rejected { background: #FEE2E2; }
.task-status-pill.rejected .task-status-text { color: #DC2626; }

.task-duration {
  font-size: 11px; color: #6B7280; background: #F3F4F6;
  padding: 3px 8px; border-radius: 50px; font-weight: 600;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
}
.task-body { margin-bottom: 4px; padding-left: 2px; }
.task-text { font-size: 15px; color: #1F2937; line-height: 1.8; font-weight: 500; padding: 4px 0; }
.task-pretext { font-size: 13px; color: #9CA3AF; font-style: italic; }

.flag-info {
  display: flex; align-items: center;
  padding: 6px 10px; border-radius: 7px; gap: 6px;
}
.flag-info .flag-icon { font-size: 14px; flex-shrink: 0; }
.flag-text { font-size: 12px; font-weight: 600; }
.task-item.status-flagged .flag-info { background: #FFFBEB; }
.task-item.status-flagged .flag-text { color: #B45309; }
.task-item.status-rejected .flag-info { background: #FEF2F2; }
.task-item.status-rejected .flag-text { color: #B91C1C; }

.task-footer { margin-top: 6px; }
.task-time { font-size: 11px; color: #D1D5DB; font-weight: 500; }

.empty-state { display: flex; flex-direction: column; align-items: center; padding: 80px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-text { font-size: 15px; color: #9CA3AF; letter-spacing: 2px; font-weight: 600; }

.list-footer { padding: 14px 0 24px; text-align: center; }
.list-footer-text { font-size: 12px; color: #9CA3AF; }

/* ===== 标注页 ===== */
.top-bar { margin-bottom: 10px; }
.task-tag {
  font-size: 11px; color: #9CA3AF;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-weight: 700; background: #F3F4F6; padding: 3px 7px;
  border-radius: 4px; margin-right: 7px;
}
.status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 10px; border-radius: 50px;
}
.status-pill-text { font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.5px; }
.status-pill.pending { background: #FEE2E2; }
.status-pill.pending .status-pill-text { color: #DC2626; }
.status-pill.done, .status-pill.submitted { background: #D1FAE5; }
.status-pill.done .status-pill-text, .status-pill.submitted .status-pill-text { color: #059669; }
.status-pill.approved { background: #DBEAFE; }
.status-pill.approved .status-pill-text { color: #1E40AF; }
.status-pill.flagged { background: #FEF3C7; }
.status-pill.flagged .status-pill-text { color: #D97706; }
.status-pill.rejected { background: #FEE2E2; }
.status-pill.rejected .status-pill-text { color: #DC2626; }

.duration-chip {
  display: flex; align-items: center; gap: 3px;
  background: #F3F4F6; padding: 4px 9px; border-radius: 50px;
}
.duration-icon { font-size: 11px; }
.duration-text {
  font-size: 11px; color: #6B7280; font-weight: 700;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
}

.player-section { padding: 10px 12px; margin-bottom: 8px; }

.waveform-canvas {
  width: 100%; height: 80px; margin-bottom: 8px;
  border-radius: 8px; background: #F8FAFC;
  display: block; cursor: pointer; touch-action: none;
}

.progress-bar { margin-bottom: 8px; }
.progress-track {
  position: relative; height: 4px; background: #E5E7EB;
  border-radius: 2px; margin-bottom: 8px; cursor: pointer;
  touch-action: none;
}
.progress-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: #2B4C7E; border-radius: 2px; pointer-events: none;
}
.progress-thumb {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; background: #FFFFFF;
  border: 2px solid #2B4C7E; border-radius: 50%;
  box-shadow: 0 1px 5px rgba(43,76,126,0.25); pointer-events: none;
}
.time-labels { font-size: 11px; font-weight: 600; font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; }
.time-current { color: #2B4C7E; }
.time-total { color: #9CA3AF; }

.controls-bar {
  display: flex; justify-content: space-around; align-items: center; padding: 2px;
}
.ctrl-btn {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 0; padding: 5px 3px; border-radius: 8px;
  transition: all 0.15s;
}
.ctrl-btn:active { transform: scale(0.9); }
.ctrl-secondary { background: #F3F4F6; }
.ctrl-secondary:active { background: #E5E7EB; }
.ctrl-active, .ctrl-active:active { background: #EEF2FF; }

.ctrl-main {
  width: 46px; height: 46px; background: #2B4C7E;
  border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 9px rgba(43,76,126,0.3);
  transition: all 0.2s;
}
.ctrl-main:active { transform: scale(0.94); box-shadow: 0 1px 5px rgba(43,76,126,0.25); }
.ctrl-icon-big { font-size: 20px; line-height: 1; }
.ctrl-icon-wrap { font-size: 16px; margin-bottom: 1px; display: block; line-height: 1; }
.ctrl-label { font-size: 10px; color: #6B7280; font-weight: 600; }
.ctrl-active .ctrl-label { color: #2B4C7E; }

.annotation-section { margin-bottom: 10px; }
.section-title-row { display: flex; align-items: center; margin-bottom: 10px; }
.section-title-bar {
  width: 3px; height: 14px; background: #2B4C7E;
  border-radius: 2px; margin-right: 7px; flex-shrink: 0;
}
.bar-warning { background: linear-gradient(180deg, #F59E0B, #FCD34D); }
.section-title-text { font-size: 14px; font-weight: 700; color: #1F2937; letter-spacing: 0.5px; }

.text-input {
  width: 100%; min-height: 60px; padding: 8px 10px;
  font-size: 14px; line-height: 1.6;
  background: #FAFBFC; border-radius: 7px;
  color: #1F2937; border: 1px solid #E5E7EB;
  transition: all 0.2s; resize: vertical;
}
.text-input:focus { outline: none; background: #FFFFFF; border-color: #2B4C7E; box-shadow: 0 0 0 3px rgba(43,76,126,0.1); }

.problem-section { margin-bottom: 15px; }
.problem-options { display: flex; flex-wrap: wrap; gap: 8px; }
.problem-chip {
  padding: 8px 14px; background: #FAFBFC;
  border: 1px solid #E5E7EB; border-radius: 50px;
  transition: all 0.2s; font-size: 13px; color: #374151; font-weight: 600;
}
.problem-chip:active { transform: scale(0.96); }
.problem-chip-active, .problem-chip-active:active { background: #FEF3C7; border-color: #F59E0B; color: #B45309; }

.submit-section { padding: 10px 0; margin-bottom: 70px; }
.btn-submit {
  width: 100%; height: 50px;
  background: #2B4C7E; color: #fff;
  font-size: 17px; font-weight: 700; border-radius: 10px;
  letter-spacing: 2px;
  box-shadow: 0 4px 14px rgba(43,76,126,0.3);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-submit:active { transform: translateY(1px); box-shadow: 0 2px 7px rgba(43,76,126,0.25); }
.btn-submit-danger, .btn-submit-danger:active { background: #EF4444; box-shadow: 0 4px 14px rgba(239,68,68,0.3); }
.btn-submit[disabled] { opacity: 0.5; cursor: default; }

/* 底部上一条/下一条 */
.bottom-nav {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 150;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 10px 15px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  border-top: 1px solid rgba(0,0,0,0.05);
}
.nav-btn {
  display: flex; align-items: center; gap: 3px;
  font-size: 14px; color: #2B4C7E;
  padding: 8px 12px; border-radius: 7px;
  font-weight: 700; transition: all 0.15s;
}
.nav-btn:active:not(:disabled) { background: #EEF2FF; transform: scale(0.96); }
.nav-btn:disabled { color: #D1D5DB; cursor: default; }
.nav-arrow { font-size: 18px; line-height: 1; }

.nav-counter { display: flex; align-items: center; gap: 2px; font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; }
.counter-current { font-size: 16px; font-weight: 800; color: #2B4C7E; }
.counter-sep { font-size: 13px; color: #D1D5DB; margin: 0 1px; }
.counter-total { font-size: 13px; color: #9CA3AF; font-weight: 600; }

.loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 0; color: #9CA3AF; font-size: 14px;
}
.empty-big { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 15px; color: #6B7280; font-weight: 600; margin-bottom: 6px; }
.empty-hint { font-size: 12px; color: #9CA3AF; }

/* ===== 个人页 ===== */
.user-card { position: relative; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.user-card-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #2B4C7E; z-index: 0; }
.user-card-content { position: relative; z-index: 1; display: flex; align-items: center; padding: 20px 16px; }
.avatar-ring {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  margin-right: 14px; border: 1px solid rgba(255,255,255,0.25);
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
}
.avatar-text { font-size: 21px; }
.user-info { display: flex; flex-direction: column; flex: 1; }
.nickname { font-size: 18px; font-weight: 800; color: #FFFFFF; margin-bottom: 4px; letter-spacing: 1px; }
.role-tag { font-size: 12px; color: rgba(255,255,255,0.65); }
.user-badge {
  background: rgba(255,255,255,0.18); padding: 4px 10px;
  border-radius: 50px; border: 1px solid rgba(255,255,255,0.2);
}
.badge-text { font-size: 11px; color: rgba(255,255,255,0.9); font-weight: 700; letter-spacing: 0.5px; }

.stats-card { margin-bottom: 10px; }
.card-title { display: flex; align-items: center; margin-bottom: 14px; }
.title-bar { width: 3px; height: 14px; background: #2B4C7E; border-radius: 2px; margin-right: 7px; flex-shrink: 0; }
.title-text { font-size: 15px; font-weight: 700; color: #1F2937; letter-spacing: 0.5px; }

.stats-row { display: flex; align-items: center; justify-content: space-around; padding: 6px 0; }
.stat-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.stat-divider { width: 1px; height: 30px; background: #F3F4F6; flex-shrink: 0; }
.stat-value { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px; }
.stat-value.done { color: #10B981; }
.stat-value.pending { color: #EF4444; }
.stat-value.flagged { color: #F59E0B; }
.stat-value.rate { color: #2B4C7E; }
.stat-desc { font-size: 11px; color: #9CA3AF; font-weight: 600; letter-spacing: 0.5px; }

.progress-card { margin-bottom: 15px; }
.progress-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.progress-wrap .progress-track { flex: 1; height: 7px; background: #F3F4F6; border-radius: 4px; overflow: hidden; cursor: default; }
.progress-wrap .progress-fill { height: 100%; background: #2B4C7E; border-radius: 4px; transition: width 0.5s ease; min-width: 4px; }
.progress-label {
  font-size: 14px; font-weight: 800; color: #2B4C7E;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  min-width: 40px; text-align: right;
}
.progress-detail { font-size: 12px; color: #9CA3AF; font-weight: 500; }

.actions { margin-bottom: 20px; }
.action-btn {
  width: 100%; margin-bottom: 8px; padding: 15px;
  font-size: 15px; font-weight: 700; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px; transition: all 0.15s;
}
.action-btn:active:not([disabled]) { transform: scale(0.98); }
.btn-icon { margin-right: 7px; font-size: 16px; }
.btn-text { font-size: 15px; font-weight: 700; }

.btn-primary-action { background: #2B4C7E; color: #FFFFFF; box-shadow: 0 4px 12px rgba(43,76,126,0.3); }
.btn-primary-action:active:not([disabled]) { box-shadow: 0 2px 6px rgba(43,76,126,0.2); }
.btn-outline-action { color: #2B4C7E; background: #FFFFFF; border: 2px solid #2B4C7E; }
.btn-outline-action:active:not([disabled]) { background: #EEF2FF; }
.btn-danger-action { color: #EF4444; background: #FEF2F2; border: 2px solid #FECACA; }
.btn-danger-action:active:not([disabled]) { background: #FEE2E2; }
.action-btn[disabled] { color: #9CA3AF; border-color: #E5E7EB; background: #F3F4F6; box-shadow: none; cursor: default; }

.danger-hint { padding: 2px 4px; font-size: 11px; color: #D1D5DB; line-height: 1.6; }

.btn-logout {
  margin-bottom: 12px; background: transparent;
  border: 1px solid #D1D5DB; color: #9CA3AF;
  padding: 12px; font-size: 13px; border-radius: 9px;
}
.btn-logout:active { background: #F9FAFB; border-color: #9CA3AF; color: #6B7280; }

.version { text-align: center; padding: 24px 0; }
.version span { font-size: 11px; color: #D1D5DB; letter-spacing: 0.5px; }

/* ===== toast ===== */
.toast-root {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 9px 18px; border-radius: 50px;
  background: rgba(17,24,39,0.88); color: #FFFFFF;
  font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(-8px);
  transition: all 0.25s; max-width: 80vw; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-success { background: rgba(16,185,129,0.92); }
.toast-error { background: rgba(239,68,68,0.92); }

/* ===== modal ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45); z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; transition: opacity 0.2s;
}
.modal-show { opacity: 1; }
.modal-box {
  width: 100%; max-width: 340px;
  background: #FFFFFF; border-radius: 14px;
  padding: 22px 20px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  transform: scale(0.92); transition: transform 0.2s;
}
.modal-show .modal-box { transform: scale(1); }
.modal-title { font-size: 16px; font-weight: 800; color: #1F2937; margin-bottom: 10px; text-align: center; }
.modal-danger .modal-title { color: #DC2626; }
.modal-content { font-size: 13px; color: #6B7280; line-height: 1.7; margin-bottom: 14px; white-space: pre-wrap; }
.modal-input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid #E5E7EB; border-radius: 8px;
  font-size: 15px; background: #F9FAFB; color: #1F2937;
  margin-bottom: 14px;
}
.modal-input:focus { outline: none; border-color: #2B4C7E; background: #FFFFFF; box-shadow: 0 0 0 3px rgba(43,76,126,0.1); }
.modal-btns { display: flex; gap: 10px; }
.modal-btn {
  flex: 1; height: 42px; border-radius: 9px;
  font-size: 15px; font-weight: 700; transition: all 0.15s;
}
.modal-btn:active { transform: scale(0.97); }
.modal-btn-cancel { background: #F3F4F6; color: #6B7280; }
.modal-btn-ok { background: #2B4C7E; color: #FFFFFF; }
.modal-btn-danger { background: #EF4444; color: #FFFFFF; }

/* ===== 桌面端微调 ===== */
@media (min-width: 481px) {
  body { padding: 0; }
  .app { min-height: 100vh; }
}
