/* ============================================================
   base.css — 设计令牌 / reset / 全局布局
   学生端平板优先，家长端桌面优先；全局中英双语（文案切换不影响布局）
   ============================================================ */

:root {
  /* 主色 */
  --c-primary: #4f46e5;
  --c-primary-600: #4338ca;
  --c-primary-050: #eef2ff;
  --c-primary-100: #e0e7ff;
  --c-primary-200: #c7d2fe;

  /* 语义色 */
  --c-success: #16a34a;
  --c-success-bg: #ecfdf5;
  --c-warning: #d97706;
  --c-warning-bg: #fffbeb;
  --c-danger: #dc2626;
  --c-danger-bg: #fef2f2;
  --c-info: #0284c7;
  --c-info-bg: #eff6ff;

  /* 中性色 */
  --c-bg: #f4f5f9;
  --c-surface: #ffffff;
  --c-surface-2: #f8f9fc;
  --c-text: #191c27;
  --c-text-2: #5b6270;
  --c-text-3: #98a0b3;
  --c-border: #e6e8ef;
  --c-border-strong: #d4d8e2;

  /* 尺寸 / 圆角 / 阴影 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(23, 26, 40, 0.06);
  --shadow: 0 4px 16px rgba(23, 26, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(23, 26, 40, 0.14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 60px;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--c-primary); text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.25; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; }
/* 图标统一由 .icn 类控制尺寸（图表 SVG 不受影响，保留自身 width/height） */
input, select, textarea { font-family: inherit; font-size: inherit; }

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

/* 通用布局工具 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 骨架加载 */
.skeleton {
  background: linear-gradient(90deg, #eceef3 25%, #f5f6fa 50%, #eceef3 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 淡入动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.28s ease both; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd2dd; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b7bdc9; background-clip: content-box; }

/* 打印（报告导出） */
@media print {
  body { background: #fff; }
  .no-print, .app-header, .app-sidebar, .student-nav, .lang-toggle, .btn-icon { display: none !important; }
  .app-main, .page { padding: 0 !important; margin: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
}
