/* ============================================================
   app.css —— Web 三端公共外壳样式
   纪律：只允许引用 var(--*) 令牌，禁止裸 HEX / 裸尺寸色值
   依赖：shared/tokens-v2.css（唯一色值源）
   ============================================================ */

/* ---------- 公共布局骨架 ---------- */
.ndbi-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

/* ---------- 顶栏 ---------- */
.ndbi-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--header-h);
  padding: 0 var(--space-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}
.ndbi-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
}
.ndbi-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-btn);
  background: var(--primary-500);
  color: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.ndbi-topbar-spacer { flex: 1; }

/* ---------- 内容区 ---------- */
.ndbi-main {
  flex: 1;
  padding: var(--space-6);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- 页面标题 ---------- */
.ndbi-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}
.ndbi-page-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- 卡片网格 ---------- */
.ndbi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.ndbi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}
.ndbi-card--strip { border-top: 4px solid var(--primary-500); }
.ndbi-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}
.ndbi-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- 状态条 ---------- */
.ndbi-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: var(--radius-chip);
  font-size: 12px;
  font-weight: 600;
}
.ndbi-status--ok { background: var(--success-50); color: var(--success-700); }
.ndbi-status--warn { background: var(--warning-red-bg); color: var(--warning-red-text); }
.ndbi-status--info { background: var(--primary-50); color: var(--primary-700); }

/* ---------- 四色任务语义（全端统一色块 + 文字） ---------- */
.ndbi-quad { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.ndbi-quad__dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.ndbi-quad--self .ndbi-quad__dot { background: var(--task-self); }
.ndbi-quad--self { color: var(--task-self-text); }
.ndbi-quad--prompted .ndbi-quad__dot { background: var(--task-prompted); }
.ndbi-quad--prompted { color: var(--task-prompted-text); }
.ndbi-quad--none .ndbi-quad__dot { background: var(--task-none); }
.ndbi-quad--none { color: var(--task-none-text); }
.ndbi-quad--noop .ndbi-quad__dot { background: var(--task-noop); }
.ndbi-quad--noop { color: var(--task-noop-text); }

/* ---------- 数值 ---------- */
.ndbi-metric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
}
.ndbi-metric--risk { color: var(--warning-red-text); }

/* ---------- 空状态（不指责用户，PRD C6） ---------- */
.ndbi-empty {
  padding: var(--space-10) var(--space-4);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.8;
}

/* ---------- 加载态 ---------- */
.ndbi-loading {
  padding: var(--space-8);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* ---------- 小程序引导条（家长端 Web 镜像专用，PRD §2.1 交付说明） ----------
   家长端已升级为原生微信小程序，本Web 镜像仅保留静态示例用于评审与追溯。
   纪律：仅用 var(--*) 令牌，不写裸 HEX。 */
.ndbi-mp-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--primary-50);
  color: var(--primary-700);
  border-bottom: 1px solid var(--primary-100);
  font-size: 12px;
  line-height: 1.6;
}
.ndbi-mp-bar__ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-badge);
  background: var(--primary-500);
  color: var(--bg-surface);
  font-size: 11px;
  font-weight: 700;
}
.ndbi-mp-bar__text { flex: 1; min-width: 0; }
.ndbi-mp-bar__text strong { font-weight: 700; }
