/* =========================================================
   NEXORA 独立站 · 基础设计系统（前台与后台共用）
   ========================================================= */
:root {
  --navy-950: #061423;
  --navy-900: #08192b;
  --navy-800: #0b2340;
  --navy-700: #14365c;
  --navy-600: #1d4b7a;
  --ink: #0e1a26;
  --ink-2: #24384c;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e3e8ef;
  --line-2: #eef2f6;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-soft-2: #eef3f8;
  --accent: #f26a21;
  --accent-600: #d9560f;
  --accent-soft: #fff2ea;
  --teal: #0d7c85;
  --teal-soft: #e8f5f6;
  --green: #15803d;
  --green-soft: #e9f7ef;
  --amber: #b45309;
  --amber-soft: #fdf3e3;
  --red: #b91c1c;
  --red-soft: #fdeaea;
  --blue-soft: #e9f1fb;
  --blue: #1d4b7a;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(8, 25, 43, .06);
  --shadow-sm: 0 2px 8px rgba(8, 25, 43, .07);
  --shadow-md: 0 10px 28px -12px rgba(8, 25, 43, .22);
  --shadow-lg: 0 24px 60px -24px rgba(8, 25, 43, .35);

  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
  --font-head: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --container: 1280px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--navy-900);
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--accent); color: #fff; }

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: 84px; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: 56px; }
.section--dark { background: var(--navy-900); color: #c9d6e4; }
.section--dark h2, .section--dark h3 { color: #fff; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.02em; }

/* ---------- 标题区 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
  display: inline-block;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 40px;
}
.section-head h2 { font-size: clamp(26px, 3.1vw, 38px); margin-top: 10px; }
.section-head p { color: var(--muted); max-width: 560px; margin-top: 10px; }
.link-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--navy-800);
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
  transition: color .2s var(--ease), border-color .2s;
  white-space: nowrap;
}
.link-more:hover { color: var(--accent); border-color: var(--accent); }
.link-more svg { width: 16px; height: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  --btn-bg: var(--navy-900);
  --btn-fg: #fff;
  --btn-bd: var(--navy-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding-inline: 22px;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .01em;
  transition: transform .18s var(--ease), background .18s, box-shadow .18s, color .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; }
.btn--accent { --btn-bg: var(--accent); --btn-bd: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-600); --btn-bd: var(--accent-600); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy-900); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bd: var(--navy-700); }
.btn--light { --btn-bg: rgba(255,255,255,.08); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.3); }
.btn--light:hover { --btn-bg: rgba(255,255,255,.16); }
.btn--sm { height: 36px; padding-inline: 14px; font-size: 13px; }
.btn--lg { height: 54px; padding-inline: 30px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all .18s var(--ease);
}
.btn-icon:hover { border-color: var(--navy-800); color: var(--navy-900); }
.btn-icon svg { width: 18px; height: 18px; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding-inline: 8px;
  border-radius: var(--radius-xs);
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .03em;
  background: var(--bg-soft-2); color: var(--ink-2);
  white-space: nowrap;
}
.badge--accent { background: var(--accent-soft); color: var(--accent-600); }
.badge--teal { background: var(--teal-soft); color: var(--teal); }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--dark { background: var(--navy-900); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding-inline: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-size: 13px; color: var(--ink-2); background: #fff;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--navy-700); }
.chip.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  letter-spacing: .01em;
}
.field .req { color: var(--accent); margin-inline-start: 2px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .16s, box-shadow .16s;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(29, 75, 122, .12);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}
.textarea { min-height: 118px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-inline-end: 34px;
}
html[dir="rtl"] .select { background-position: left 12px center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: span 2; }
.err {
  color: var(--red); font-size: 12px; min-height: 15px;
}
.checkline { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); }
.checkline input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--navy-800); }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}
.card--pad-lg { padding: 32px; }
.card--flat { box-shadow: none; }
.card--soft { background: var(--bg-soft); border-color: transparent; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
table.data th {
  text-align: start;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700;
  background: var(--bg-soft);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
  color: var(--ink-2);
}
table.data tbody tr:hover { background: #fbfcfe; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td .strong { color: var(--ink); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-inline-start: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  inset-block: 8px 8px;
  inset-inline-start: 5px;
  width: 2px;
  background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -22px; top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--muted-2);
}
.timeline-item.is-done::before { border-color: var(--accent); background: var(--accent); }
.timeline-item.is-current::before {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-time { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.timeline-title { font-weight: 600; font-size: 14px; margin-top: 2px; }
.timeline-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- 空状态 ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 56px 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius-md);
  background: var(--bg-soft);
}
.empty svg { width: 34px; height: 34px; color: var(--muted-2); }

/* ---------- 消息提示 ---------- */
.toast-wrap {
  position: fixed; inset-block-start: 20px; inset-inline-end: 20px;
  z-index: 1200; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  min-width: 260px; max-width: 400px;
  background: var(--navy-900); color: #fff;
  padding: 14px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  display: flex; align-items: flex-start; gap: 10px;
  animation: toastIn .3s var(--ease);
}
.toast--ok { border-inline-start: 3px solid #34d399; }
.toast--err { border-inline-start: 3px solid #f87171; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(6, 20, 35, .55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s var(--ease);
}
.modal {
  background: #fff; border-radius: var(--radius-md);
  width: min(560px, 100%);
  max-height: 86vh; overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .26s var(--ease);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 24px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- 滚动动画 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- RTL 细节 ---------- */
html[dir="rtl"] body { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, var(--font-body); }
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
html[dir="rtl"] .mono { direction: ltr; unicode-bidi: embed; }

@media (max-width: 1024px) {
  .section { padding-block: 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}
@media (max-width: 720px) {
  .container { padding-inline: 18px; }
  .section { padding-block: 52px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .btn { height: 44px; }
}
