/* 宏泰國際 BLUE OAK · AI 培训平台 —— 基础样式
   取值来自 ui.hongtai.site 的品牌规范（1920 画布实测值），
   界面按 0.625 折算到 1200 画布，比例关系保持不变。 */
:root {
  --navy: #003464;      /* 主色：导航、页脚、深块、浅底上的标题 */
  --blue: #0074BC;      /* 辅色：小节标题、强调词、链接 */
  --teal: #37D7C1;      /* 强调色：只给最终 CTA 和状态点，用量刻意极少 */
  --surface: #EBEFF3;   /* 唯一灰底 */
  --g100: #F2F2F2; --g200: #D9D9D9; --g300: #CBCBCB; --g500: #A4A4A4; --g700: #606366;
  --ink: #003464;       /* ⚠ 正文默认色是深蓝，不是黑 */
  --ink-soft: #40678B;
  --ok: #0E8C6A; --bad: #C0392B; --warn: #B26B00;
  --cjk: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1180px;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--cjk); color: var(--ink); background: var(--surface);
  line-height: 1.65; font-size: 15px; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .9em; }
h1, h2, h3, h4 { color: var(--navy); font-weight: 700; line-height: 1.3; margin: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--navy); color: #fff; display: flex; align-items: center;
  gap: 18px; padding: 0 clamp(14px, 3vw, 34px); height: 64px; position: sticky; top: 0; z-index: 60;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; flex: none; }
.topbar .brand img { height: 32px; width: auto; }
.topbar .brand span {
  font-size: 13px; letter-spacing: .06em; font-weight: 700; white-space: nowrap;
  padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .28);
}
.topnav { display: flex; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
.topnav a {
  color: rgba(255, 255, 255, .82); font-size: 13.5px; padding: 7px 13px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
}
.topnav a:hover { background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.topnav a.on { background: rgba(255, 255, 255, .16); color: #fff; }
.topuser { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, .88); }
.topuser b { font-weight: 600; }
.topuser .lo {
  background: transparent; border: 1px solid rgba(255, 255, 255, .38); color: #fff;
  border-radius: 999px; padding: 5px 15px; font: inherit; font-size: 12.5px; cursor: pointer; min-height: 32px;
}
.topuser .lo:hover { background: rgba(255, 255, 255, .14); }

/* ---------- 首屏与斜切 ---------- */
.hero { background: var(--navy); color: #fff; padding: 34px clamp(14px, 3vw, 34px) 0; position: relative; }
.hero-in { max-width: var(--maxw); margin: 0 auto; padding-bottom: 30px; }
.hero .kick { color: var(--teal); font-size: 12px; letter-spacing: .2em; font-weight: 700; margin-bottom: 10px; }
.hero h1 { font-size: clamp(21px, 3vw, 30px); color: #fff; margin-bottom: 8px; }
.hero p { color: rgba(255, 255, 255, .84); font-size: 14.5px; margin: 0; max-width: 760px; }
/* 招牌 9.7° 斜切：深色底 + 白色 clip 形状盖上去（直接给白 div 加 clip 是白压白，看不见） */
.wedge { height: 42px; background: var(--navy); position: relative; margin-bottom: -1px; }
.wedge::after {
  content: ""; position: absolute; inset: 0; background: var(--surface);
  clip-path: polygon(0 40%, 35.4% 6%, 100% 66%, 100% 100%, 0 100%);
}

main { max-width: var(--maxw); margin: 0 auto; padding: 18px clamp(14px, 3vw, 34px) 60px; }

/* ---------- 小节标题 ---------- */
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.eyebrow i { width: 4px; height: 19px; background: var(--teal); border-radius: 2px; flex: none; }
.eyebrow span { color: var(--blue); font-weight: 700; font-size: 14.5px; }
.eyebrow .r { margin-left: auto; font-size: 12.5px; color: var(--g700); font-weight: 400; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--g200); padding: 18px 20px; }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }

/* ---------- 按钮（全圆角胶囊，全站无直角按钮） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .02em;
  background: var(--navy); color: #fff; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #002a52; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn.ghost:hover { background: var(--surface); }
.btn.cta { background: var(--teal); color: var(--navy); }   /* 薄荷绿必须配深蓝字 */
.btn.cta:hover { filter: brightness(1.06); background: var(--teal); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.btn.danger:hover { background: #FCEFEE; }
.btn:disabled { background: var(--g200); color: #8b9096; cursor: not-allowed; box-shadow: none; }
.btn.link { background: transparent; color: var(--blue); height: auto; padding: 2px 4px; font-weight: 600; }
.btn.link:hover { background: transparent; text-decoration: underline; }

/* ---------- 表单 ---------- */
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12.5px; color: var(--g700); margin-bottom: 4px; font-weight: 600; }
/* 一律 16px：iOS Safari 只要输入框字号 <16px，聚焦时就会放大整页且退不回去。
   这条跟屏幕宽度无关（平板 820px 一样中招），所以不放在媒体查询里。 */
input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--g300); border-radius: 9px; padding: 9px 12px; min-height: 42px;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 116, 188, .13); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; min-height: 36px; }
.chk input { width: 17px; height: 17px; min-height: 0; flex: none; accent-color: var(--blue); }

/* ---------- 标签与状态 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--navy);
}
.tag.ok { background: #E7F7F3; color: #0B5B47; }
.tag.bad { background: #FCEFEE; color: #8E2A1F; }
.tag.warn { background: #FFF6E5; color: #6B4E00; }
.tag.blue { background: #EAF4FB; color: #00518A; }
.tag.grey { background: var(--g100); color: var(--g700); }
.dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }

/* ---------- 进度条 ---------- */
.pbar { height: 6px; background: var(--g200); border-radius: 999px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s; }
.pbar.done i { background: var(--teal); }

/* ---------- 表格 ---------- */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--g200); background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th {
  background: var(--navy); color: #fff; text-align: left; padding: 10px 13px; font-weight: 600;
  white-space: nowrap; font-size: 12.5px; position: sticky; top: 0;
}
table.t td { padding: 9px 13px; border-bottom: 1px solid var(--g100); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: #FAFCFE; }
table.t td.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- 提示块 ---------- */
.note { background: var(--surface); border-left: 4px solid var(--blue); padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.65; }
.note.warn { background: #FFF6E5; border-left-color: #E0A008; }
.note.ok { background: #E7F7F3; border-left-color: var(--teal); }
.note.bad { background: #FCEFEE; border-left-color: var(--bad); }
.note b { color: var(--navy); }
.muted { color: var(--g700); font-size: 12.5px; }

/* ---------- 统计块 ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--g200); border: 1px solid var(--g200); border-radius: var(--radius); overflow: hidden; }
.kpi { background: #fff; padding: 13px 14px; }
.kpi b { display: block; font-size: 23px; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi b em { font-style: normal; font-size: 13px; font-weight: 600; margin-left: 2px; }
.kpi span { display: block; font-size: 12px; color: var(--g700); margin-top: 2px; }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 20, 38, .58); display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal.on { display: flex; }
.modal-b { background: #fff; border-radius: 14px; width: min(680px, 100%); max-height: 92vh; overflow-y: auto; padding: 22px 24px; }
.modal-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-h h3 { font-size: 17px; }
.modal-h .x { margin-left: auto; background: transparent; border: 0; font-size: 22px; color: var(--g700); cursor: pointer; line-height: 1; padding: 4px 8px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 浮动提示 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px);
  background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: .2s; z-index: 500; max-width: 90vw; text-align: center;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: #7E241A; }
#toast.ok { background: #0B5B47; }

.empty { text-align: center; padding: 44px 20px; color: var(--g700); }
.empty b { display: block; font-size: 15.5px; color: var(--navy); margin-bottom: 6px; }

/* 触控目标按「有没有触屏」判，不按屏宽判 —— 平板 820px 同样是手指点。
   40px 是能稳定点中的下限，小于它在真机上很容易点空。 */
@media (pointer: coarse) {
  .topuser .lo { min-height: 40px; padding: 0 15px; }
  .btn.sm { height: 40px; }
  .btn.link { min-height: 40px; display: inline-flex; align-items: center; }
  .chk { min-height: 44px; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { height: 56px; gap: 10px; }
  .topbar .brand img { height: 26px; }
  .topbar .brand span { display: none; }
  .topnav { margin-left: 0; }
  .topnav a { padding: 6px 10px; font-size: 13px; }
  .topuser .name { display: none; }
  /* iOS 上输入框字号 <16px 会在聚焦时把整页放大且退不回去 */
  input[type=text], input[type=password], input[type=number], input[type=email], select, textarea { font-size: 16px; }
  .modal-b { padding: 18px 16px; border-radius: 12px; }
  .modal-f .btn { flex: 1 1 140px; }
}
