/* ============================================================
  /* 舟家康册 · 家庭健康档案 v2 — 设计系统（Design Contract 唯一实现）
   所有页面共用；页面只允许使用本文件已有类与 CSS 变量。
   ============================================================ */

:root {
  --c-primary: #0E5E56;
  --c-primary-deep: #0A4A43;
  --c-primary-soft: #E3EFEC;
  --c-accent: #C97B2D;
  --c-accent-soft: #F6ECDD;
  --c-bg: #F6F4EE;
  --c-surface: #FFFFFF;
  --c-surface-2: #FBFAF6;
  --c-border: #E6E2D6;
  --c-border-strong: #D6D1C2;
  --c-text: #26221C;
  --c-text-sub: #8A8578;
  --c-text-faint: #B0AA9A;
  --c-success: #2E7D5B;
  --c-success-soft: #E4F0EA;
  --c-warning: #B7791F;
  --c-warning-soft: #F7EDD8;
  --c-danger: #C0453E;
  --c-danger-soft: #F8E7E5;
  --c-chart-1: #0E5E56;
  --c-chart-2: #C97B2D;
  --c-chart-3: #7FA6A0;
  --c-chart-4: #A08CA0;
  --c-chart-5: #3A362E;

  --font-display: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, sans-serif;
  --font-mono: Consolas, "SF Mono", "Courier New", monospace;

  --sidebar-w: 232px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(38, 35, 28, .05);
  --shadow-md: 0 2px 10px rgba(38, 35, 28, .07);
  --shadow-lg: 0 14px 36px rgba(38, 35, 28, .12);
  --ease: cubic-bezier(.2, .7, .3, .1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);
  background-image:
    radial-gradient(1200px 480px at 85% -10%, rgba(201, 123, 45, .05), transparent 60%),
    radial-gradient(900px 420px at -10% 30%, rgba(14, 94, 86, .04), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-deep); }

::selection { background: var(--c-primary-soft); }

/* ---------- App Shell（每页逐字节一致，禁止页面改写） ---------- */

.app { min-height: 100vh; }

.app-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFAF6 100%);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 14px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex: none;
}

.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark svg { width: 20px; height: 20px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 2px;
  color: var(--c-text);
}
.brand-text i {
  font-style: normal;
  font-size: 11px;
  color: var(--c-text-sub);
  letter-spacing: 1px;
}

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--c-text-sub);
  font-size: 14px;
  transition: all .16s ease;
  border: 1px solid transparent;
}

.nav a svg { width: 18px; height: 18px; flex: none; }

.nav a:hover { background: #EFEDE4; color: var(--c-text); }

.nav a.active {
  background: var(--c-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.nav a.active svg { color: #fff; }

.nav-foot { border-top: 1px solid var(--c-border); padding-top: 14px; }

.nav-foot-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
}

.nav-foot-chip b { display: block; font-size: 12.5px; font-weight: 600; }
.nav-foot-chip i { display: block; font-style: normal; font-size: 11px; color: var(--c-text-sub); }

.nav-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--c-text-sub);
  font-size: 12.5px;
  transition: all .16s ease;
}

.nav-doc svg { width: 15px; height: 15px; flex: none; }

.nav-doc:hover { background: #EFEDE4; color: var(--c-text); }

.nav-doc.is-on { color: var(--c-primary); font-weight: 600; }

.app-content {
  margin-left: var(--sidebar-w);
  padding: 28px 32px 48px;
  max-width: 1160px;
}

/* ---------- 页头 ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.3;
}

.page-head .sub { color: var(--c-text-sub); font-size: 13px; margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-h h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-h h2 svg { width: 17px; height: 17px; color: var(--c-primary); }
.card-h .h-extra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card-h .link { font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.card-h .link svg { width: 13px; height: 13px; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
  background: none;
  color: var(--c-text);
}

.btn svg { width: 15px; height: 15px; }

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.btn:disabled,
.btn.disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-deep); }

.btn-ghost { border-color: var(--c-border-strong); background: var(--c-surface); color: var(--c-text); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn-danger { background: var(--c-danger); color: #fff; }

.btn-danger-soft { background: var(--c-danger-soft); color: var(--c-danger); }
.btn-danger-soft:hover { background: var(--c-danger); color: #fff; }

.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-sm svg { width: 13px; height: 13px; }

.icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: none;
  color: var(--c-text-sub);
  cursor: pointer;
  transition: all .16s ease;
}

.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.icon-btn.danger:hover { background: var(--c-danger-soft); color: var(--c-danger); }

/* ---------- 表单 ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--c-text-sub); letter-spacing: .3px; }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color .16s ease, box-shadow .16s ease;
  width: 100%;
}

.field textarea { resize: vertical; min-height: 96px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
}

.field input:disabled, .field select:disabled { background: var(--c-surface-2); color: var(--c-text-faint); cursor: not-allowed; }

.field .hint { font-size: 12px; color: var(--c-text-faint); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.seg {
  display: inline-flex;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--c-surface);
}

.seg button {
  padding: 7px 14px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--c-text-sub);
  cursor: pointer;
  transition: all .16s ease;
  border-right: 1px solid var(--c-border);
}

.seg button:last-child { border-right: none; }
.seg button:hover { background: var(--c-surface-2); color: var(--c-text); }
.seg button.on { background: var(--c-primary); color: #fff; }

/* ---------- 标签 / 徽章 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 11.5px;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.7;
  white-space: nowrap;
}

.tag svg { width: 11px; height: 11px; }

.tag-teal  { background: var(--c-primary-soft); color: var(--c-primary); }
.tag-amber { background: var(--c-accent-soft); color: var(--c-accent); }
.tag-green { background: var(--c-success-soft); color: var(--c-success); }
.tag-warn  { background: var(--c-warning-soft); color: var(--c-warning); }
.tag-red   { background: var(--c-danger-soft); color: var(--c-danger); }
.tag-gray  { background: #EFEBE0; color: var(--c-text-sub); }

/* ---------- 头像 ---------- */

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--av, var(--c-primary));
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  display: grid;
  place-items: center;
  flex: none;
  letter-spacing: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 13px; border-radius: 9px; }
.avatar-lg { width: 56px; height: 56px; font-size: 24px; border-radius: 15px; }

/* ---------- 表格 ---------- */

.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--c-text-sub);
  text-transform: uppercase;
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-border-strong);
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}

.table tbody tr { transition: background .16s ease; }
.table tbody tr:hover { background: var(--c-surface-2); }
.table tbody tr:last-child td { border-bottom: none; }

.table .num { font-family: var(--font-mono); font-size: 12.5px; }
.table .muted { color: var(--c-text-sub); font-size: 12.5px; }
.table .row-actions { display: flex; gap: 2px; justify-content: flex-end; }

.table tfoot td { padding: 10px 12px; color: var(--c-text-sub); font-size: 12.5px; }

/* ---------- KPI ---------- */

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
}

.kpi .k-label { font-size: 12px; color: var(--c-text-sub); display: flex; align-items: center; gap: 6px; }
.kpi .k-label svg { width: 13px; height: 13px; }

.kpi .k-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.2;
  margin-top: 6px;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

.kpi .k-value small { font-size: 14px; color: var(--c-text-sub); font-family: var(--font-body); margin-left: 3px; }

.kpi .k-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--c-text-sub); }

.kpi .k-accent {
  position: absolute;
  right: -18px;
  top: -18px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  opacity: .35;
  pointer-events: none;
}

/* ---------- 模态框 ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(38, 35, 28, .45);
  backdrop-filter: blur(2px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 20px 20px;
  z-index: 100;
  overflow-y: auto;
}

.modal-backdrop.open { display: flex; animation: fadeIn .18s ease; }

.modal {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  animation: popIn .22s var(--ease);
  border: 1px solid var(--c-border);
}

.modal.modal-lg { max-width: 760px; }

.modal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
}

.modal-h h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: .5px; }

.modal-b { padding: 18px 20px; max-height: 62vh; overflow-y: auto; }

.modal-f {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ---------- Toast ---------- */

.toast-zone { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 11px 16px;
  font-size: 13.5px;
  max-width: 340px;
  animation: toastIn .25s var(--ease);
}

.toast svg { width: 16px; height: 16px; flex: none; }
.toast.success { border-left-color: var(--c-success); } .toast.success svg { color: var(--c-success); }
.toast.warning { border-left-color: var(--c-warning); } .toast.warning svg { color: var(--c-warning); }
.toast.danger  { border-left-color: var(--c-danger); }  .toast.danger svg { color: var(--c-danger); }
.toast.info    { border-left-color: var(--c-primary); } .toast.info svg { color: var(--c-primary); }

.toast.hide { animation: toastOut .25s ease forwards; }

/* ---------- 空状态 / 骨架 ---------- */

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--c-text-sub);
}

.empty svg { width: 34px; height: 34px; color: var(--c-text-faint); margin-bottom: 10px; }
.empty b { display: block; font-size: 14.5px; color: var(--c-text); margin-bottom: 4px; font-weight: 600; }
.empty p { font-size: 12.5px; margin-bottom: 14px; }

.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #EFEBE0 25%, #F6F3EA 50%, #EFEBE0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

.skeleton.chart { height: 340px; border-radius: var(--radius-lg); }
.skeleton.line { height: 14px; margin: 10px 0; }

/* ---------- 分页 ---------- */

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12.5px; color: var(--c-text-sub); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 6px; }

.page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--c-text-sub);
  cursor: pointer;
  transition: all .16s ease;
  font-family: var(--font-mono);
}

.page-btn:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
.page-btn.on { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 杂项 ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.stack { display: flex; flex-direction: column; gap: 16px; }

.muted { color: var(--c-text-sub); }
.faint { color: var(--c-text-faint); }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.serif-num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

.divider { height: 1px; background: var(--c-border); border: none; margin: 16px 0; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.link-more { font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; color: var(--c-primary); }
.link-more svg { width: 13px; height: 13px; }

.footnote { font-size: 11.5px; color: var(--c-text-faint); display: flex; align-items: center; gap: 5px; margin-top: 10px; }
.footnote svg { width: 12px; height: 12px; }

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: 12.5px;
  border: 1px solid rgba(201, 123, 45, .25);
}

.banner svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.banner.teal { background: var(--c-primary-soft); color: var(--c-primary); border-color: rgba(14, 94, 86, .2); }

/* ---------- 时间线 ---------- */

.timeline { display: flex; flex-direction: column; }

.tl-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--c-border); }
.tl-item:last-child { border-bottom: none; }
.tl-dot {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: grid;
  place-items: center;
  flex: none;
}
.tl-dot svg { width: 14px; height: 14px; }
.tl-body { flex: 1; min-width: 0; }
.tl-body b { font-size: 13.5px; font-weight: 600; display: block; }
.tl-body p { font-size: 12.5px; color: var(--c-text-sub); }
.tl-time { font-size: 11.5px; color: var(--c-text-faint); font-family: var(--font-mono); white-space: nowrap; }

/* ---------- 图表容器 ---------- */

.chart-box { position: relative; width: 100%; }

.chart-box svg { display: block; width: 100%; height: auto; }

.chart-tip {
  position: absolute;
  pointer-events: none;
  background: #fff;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 9px 12px;
  font-size: 12px;
  min-width: 150px;
  z-index: 30;
  display: none;
}

.chart-tip b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.chart-tip .row { display: flex; justify-content: space-between; gap: 14px; color: var(--c-text-sub); }
.chart-tip .row span:last-child { color: var(--c-text); font-family: var(--font-mono); }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--c-text-sub); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 16px; height: 0; border-top: 2px solid; }
.chart-legend .sw.dash { border-top-style: dashed; }
.chart-legend .sw.band { height: 10px; border: none; border-radius: 3px; background: rgba(14, 94, 86, .07); }

/* ---------- 入场动效 ---------- */

.reveal { animation: revealUp .5s var(--ease) both; }
.reveal:nth-child(1) { animation-delay: .02s; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .14s; }
.reveal:nth-child(4) { animation-delay: .2s; }
.reveal:nth-child(5) { animation-delay: .26s; }
.reveal:nth-child(6) { animation-delay: .32s; }

/* ---------- 动画 ---------- */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes popIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(24px); }
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .kpi-row, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-nav {
    position: sticky;
    inset: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }

  .brand { border: none; margin: 0; padding: 0 8px 0 0; }
  .brand-text i { display: none; }

  .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
  .nav a span { display: none; }
  .nav a.active span { display: inline; }

  .nav-foot { display: none; }

  .app-content { margin-left: 0; padding: 20px 16px 40px; }

  .kpi-row, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-3 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
}
