/* ============================================================
   广东省 AI 数字人才就业实训基地 · 视觉系统
   ============================================================
   品牌色取自 logo:#103590 深蓝
   设计语言:深蓝品牌 + 白卡 + 微光 + 鲸鱼弧线
   ============================================================ */

:root {
  /* ---- 品牌色阶(从 logo 提取) ---- */
  --brand-900: #081D4F;
  --brand-800: #0A2463;
  --brand-700: #0C2970;
  --brand-600: #0E2F80;
  --brand-500: #103590;
  --brand-400: #2A4DA8;
  --brand-300: #637BB6;
  --brand-200: #A8B6D6;
  --brand-100: #E2E6F1;
  --brand-50:  #F3F4F9;

  /* ---- 中性色 ---- */
  --ink:   #0E1526;
  --ink-2: #4A5468;
  --ink-3: #8791A6;
  --ink-4: #B4BCCC;
  --line:  #E4E8F0;
  --line-2: #EFF2F7;
  --bg:    #F6F8FC;
  --white: #FFFFFF;

  /* ---- 语义色 ---- */
  --ok:     #0FA968;
  --ok-bg:  #E8F8F1;
  --warn:   #D98B00;
  --warn-bg:#FFF7E6;
  --danger: #D93B24;
  --danger-bg:#FDECE9;

  /* ---- 圆角 / 阴影 ---- */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(14,21,38,.05), 0 4px 14px rgba(14,21,38,.05);
  --shadow-2: 0 4px 10px rgba(14,21,38,.07), 0 14px 40px rgba(14,21,38,.08);
  --shadow-brand: 0 6px 18px rgba(16,53,144,.22);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   品牌头部
   ============================================================ */
.brandbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--brand-500);
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* 鲸鱼弧线装饰 */
.brandbar::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.brandbar::before {
  content: "";
  position: absolute;
  right: 40px;
  top: -110px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.brandbar .logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  background: #fff3;
  position: relative;
  z-index: 1;
}
.brandbar .bt {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}
.brandbar .bs {
  font-size: 10px;
  opacity: .62;
  letter-spacing: 1.2px;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}
.brandbar .bact {
  margin-left: auto;
  position: relative;
  z-index: 1;
}

/* ============================================================
   页面容器
   ============================================================ */
.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 18px 120px;
}
.wrap.wide { max-width: 980px; }
.wrap.full { max-width: 1280px; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}
.card.flat { box-shadow: none; }
.card.tight { padding: 14px 16px; }

/* ============================================================
   标题
   ============================================================ */
.h1 { font-size: 26px; font-weight: 700; letter-spacing: -.4px; margin: 0; }
.h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.h2::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--brand-500); }
.sub { font-size: 13px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.eyebrow { font-size: 11px; letter-spacing: 2px; color: var(--brand-300); font-weight: 700; text-transform: uppercase; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  border: none;
  border-radius: var(--r);
  background: var(--brand-500);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s, box-shadow .2s, background .2s;
  box-shadow: var(--shadow-brand);
  letter-spacing: .3px;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: scale(.985); }
.btn:disabled { background: var(--ink-4); box-shadow: none; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--brand-600);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--brand-50); border-color: var(--brand-200); }
.btn.sm { height: 44px; font-size: 14px; border-radius: var(--r-sm); }
.btn.grand {
  height: 60px;
  font-size: 17px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
}

/* ============================================================
   表单
   ============================================================ */
.field { margin-bottom: 18px; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.label .req { color: var(--danger); margin-left: 3px; }

.input, .select, .textarea {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(16,53,144,.09);
}
.input.err { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(217,59,36,.08); }
.textarea { height: auto; min-height: 90px; padding: 14px 16px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5l5-5' stroke='%238791A6' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* 大号输入(极简表单用) */
.input.big {
  height: 64px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .5px;
  border-radius: var(--r-lg);
}
.input.big::placeholder { font-weight: 400; letter-spacing: 0; }

/* 标签选择 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.chip:hover { border-color: var(--brand-200); }
.chip.sel {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16,53,144,.25);
}

.err-text { color: var(--danger); font-size: 12.5px; margin-top: 6px; min-height: 16px; }

/* ============================================================
   徽章 / 状态
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge.A { background: var(--danger-bg); color: var(--danger); }
.badge.B { background: var(--warn-bg); color: var(--warn); }
.badge.C { background: var(--line-2); color: var(--ink-3); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.brand { background: var(--brand-100); color: var(--brand-700); }

.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  display: inline-block;
}
.dot.live { animation: pulseDot 1.8s ease-in-out infinite; }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15,169,104,.5); }
  70% { box-shadow: 0 0 0 7px rgba(15,169,104,0); }
}

/* ============================================================
   环形进度
   ============================================================ */
.ring {
  --p: 0;
  --size: 64px;
  --stroke: 7px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
  background: conic-gradient(
    var(--ring-color, var(--brand-500)) calc(var(--p) * 1%),
    var(--line-2) 0
  );
  display: grid;
  place-items: center;
  transition: background .5s;
}
.ring::after {
  content: "";
  position: absolute;
  inset: var(--stroke);
  border-radius: 50%;
  background: var(--white);
}
.ring .rv {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   按键值表
   ============================================================ */
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); font-weight: 550; word-break: break-word; }

/* ============================================================
   空态 / 加载
   ============================================================ */
.empty { text-align: center; color: var(--ink-3); font-size: 13.5px; padding: 40px 0; line-height: 1.8; }
.loading { text-align: center; color: var(--ink-3); font-size: 13px; padding: 30px 0; }

/* ============================================================
   动画
   ============================================================ */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: riseIn .38s cubic-bezier(.22,.9,.3,1) both; }

@keyframes popIn {
  0% { opacity: 0; transform: scale(.9); }
  60% { transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}
.pop { animation: popIn .42s cubic-bezier(.22,.9,.3,1) both; }

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

/* 数字跳动高亮 */
@keyframes flashUp {
  0% { color: var(--ok); transform: scale(1.18); }
  100% { color: inherit; transform: scale(1); }
}
.flash { animation: flashUp .7s ease-out; }

/* ============================================================
   工具类
   ============================================================ */
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 移动端优化 */
@media (max-width: 480px) {
  .wrap { padding: 16px 14px 110px; }
  .h1 { font-size: 23px; }
  .card { padding: 16px; border-radius: var(--r); }
  .input.big { height: 58px; font-size: 18px; }
  .btn { height: 52px; }
}
