/* ===== RCEP 对日出口公共服务平台 · 全站样式 ===== */
:root {
  --navy: #0a1f3c;
  --navy-2: #12305c;
  --blue: #1e5eff;
  --blue-soft: #e8f0ff;
  --cyan: #14b8d4;
  --cyan-soft: #e2f7fb;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1c2b3a;
  --muted: #5c6b7c;
  --line: #dfe7f0;
  --gold: #d9a441;
  --red: #d64541;
  --green: #1e9e6a;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(10, 31, 60, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1160px, 92%); margin: 0 auto; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); }
.brand .logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-2), var(--blue));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 8px; font-size: 15px; color: var(--text);
  transition: all .2s;
}
.nav a:hover { background: var(--blue-soft); color: var(--blue); }
.nav a.active { background: var(--navy); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 18px; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(20,184,212,.25), transparent 60%),
    radial-gradient(800px 400px at 10% 110%, rgba(30,94,255,.35), transparent 60%),
    linear-gradient(135deg, #0a1f3c 0%, #12305c 55%, #16407c 100%);
  color: #fff; padding: 84px 0 96px;
}
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.3; font-weight: 700; }
.hero h1 .accent { color: #67e8f9; }
.hero p.lead { margin-top: 18px; max-width: 760px; color: rgba(255,255,255,.82); font-size: 17px; }
.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 10px; font-size: 15px; font-weight: 600;
  transition: all .2s; cursor: pointer; border: none;
}
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30,94,255,.35); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }
.btn-light { background: var(--blue-soft); color: var(--blue); }
.btn-light:hover { background: #dbe7ff; }
.hero-stats { margin-top: 52px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.stat b { display: block; font-size: 30px; color: #67e8f9; }
.stat span { font-size: 13px; color: rgba(255,255,255,.75); }

/* ===== 区块 ===== */
.section { padding: 72px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .tag {
  display: inline-block; background: var(--blue-soft); color: var(--blue);
  font-size: 13px; padding: 4px 14px; border-radius: 999px; margin-bottom: 12px; font-weight: 600;
}
.section-head h2 { font-size: 30px; color: var(--navy); }
.section-head p { color: var(--muted); margin-top: 10px; max-width: 720px; margin-left: auto; margin-right: auto; }

/* ===== 卡片 ===== */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: all .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(10,31,60,.12); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px; background: var(--blue-soft);
}
.card h3 { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--muted); }
.card .link { display: inline-block; margin-top: 14px; color: var(--blue); font-size: 14px; font-weight: 600; }
.card.cyan .icon { background: var(--cyan-soft); }

/* ===== 页面内页头 ===== */
.page-hero {
  background: linear-gradient(135deg, #0a1f3c, #16407c);
  color: #fff; padding: 56px 0;
}
.page-hero h1 { font-size: 32px; }
.page-hero p { color: rgba(255,255,255,.8); margin-top: 10px; max-width: 820px; }

/* ===== 搜索与表格 ===== */
.search-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px;
}
.search-bar input, .search-bar select {
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
  outline: none; flex: 1; min-width: 160px;
}
.search-bar input:focus, .search-bar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,94,255,.12); }
.search-bar .btn { padding: 11px 22px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  background: var(--navy); color: #fff; text-align: left;
  padding: 13px 16px; font-weight: 600; white-space: nowrap;
}
tbody td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: #f6f9ff; }
.badge {
  display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600;
  background: var(--blue-soft); color: var(--blue); white-space: nowrap;
}
.badge.green { background: #e3f6ee; color: var(--green); }
.badge.gold { background: #faf1dc; color: #a67c1f; }
.badge.red { background: #fdeaea; color: var(--red); }
.empty-tip { text-align: center; color: var(--muted); padding: 36px 0; }

/* ===== 结果卡片 ===== */
.result-card {
  background: linear-gradient(135deg, #f0f6ff, #e8faff);
  border: 1px solid #cfe3ff; border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
}
.result-card h4 { color: var(--navy); margin-bottom: 8px; font-size: 17px; }
.result-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; font-size: 14px; }
.result-card dt { color: var(--muted); }
.result-card dd { font-weight: 600; color: var(--text); }

/* ===== 架构图（CSS 金字塔） ===== */
.pyramid { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 30px auto; max-width: 860px; }
.pyramid .layer { border-radius: 12px; padding: 16px 22px; color: #fff; width: 100%; }
.pyramid .layer h4 { text-align: center; margin-bottom: 10px; letter-spacing: 2px; }
.pyramid .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pyramid .chip {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  padding: 6px 14px; border-radius: 8px; font-size: 13px; text-align: center;
}
.pyramid .l1 { background: linear-gradient(135deg, #16407c, #1e5eff); width: 92%; }
.pyramid .l2 { background: linear-gradient(135deg, #12305c, #1a5ab0); width: 96%; }
.pyramid .l3 { background: linear-gradient(135deg, #0e2749, #16407c); width: 100%; }

/* ===== 时间线 / 列表 ===== */
.timeline { border-left: 3px solid var(--blue-soft); padding-left: 24px; margin-left: 8px; }
.timeline .item { position: relative; padding-bottom: 26px; }
.timeline .item::before {
  content: ""; position: absolute; left: -33px; top: 6px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue);
}
.timeline .date { font-size: 13px; color: var(--blue); font-weight: 600; }
.timeline h4 { font-size: 16px; color: var(--navy); margin: 4px 0; }
.timeline p { font-size: 14px; color: var(--muted); }

/* ===== 流程步骤 ===== */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.step { text-align: center; padding: 20px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; font-weight: 700; margin-bottom: 10px;
}
.step h4 { font-size: 15px; color: var(--navy); }
.step p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ===== 页脚 ===== */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 48px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-footer a { display: block; font-size: 13.5px; padding: 3px 0; color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #67e8f9; }
.copyright { border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.5); }

/* ===== 演示提示条 ===== */
.demo-note {
  background: #fff8e8; border: 1px solid #f0dfb2; color: #8a6d1f;
  font-size: 13px; padding: 10px 16px; border-radius: 10px; margin-bottom: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 12px 4%; border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .result-card dl { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 64px; }
}

/* ================= 登录 / 工作台扩展样式 ================= */
.nav .nav-cta {
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff !important;
  font-weight: 600; margin-left: 6px;
}
.nav .nav-cta:hover { opacity: .9; }

/* 表单 */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); max-width: 460px; margin: 0 auto;
}
.form-card.wide { max-width: 760px; }
.form-card h2 { color: var(--navy); font-size: 22px; margin-bottom: 6px; }
.form-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--text); background: #fff; outline: none;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,94,255,.12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.role-opt {
  border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer;
  text-align: center; transition: all .2s; background: #fff;
}
.role-opt.active { border-color: var(--blue); background: var(--blue-soft); }
.role-opt b { display: block; color: var(--navy); font-size: 15px; }
.role-opt span { font-size: 12px; color: var(--muted); }
.form-tip { font-size: 13px; margin-top: 12px; display: none; }
.form-tip.err { color: var(--red); display: block; }
.form-tip.suc { color: var(--green); display: block; }
.switch-line { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }
.switch-line a { color: var(--blue); font-weight: 600; }

/* 工作台 */
.console-head {
  background: linear-gradient(135deg, #0a1f3c, #16407c); color: #fff; padding: 30px 0;
}
.console-head .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.console-head h1 { font-size: 24px; }
.console-head .who { font-size: 13.5px; color: rgba(255,255,255,.78); margin-top: 6px; }
.console-head .who b { color: #67e8f9; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs button {
  background: none; border: none; padding: 12px 18px; font-size: 14.5px; font-family: inherit;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; font-weight: 600;
}
.tabs button:hover { color: var(--blue); }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.panel { display: none; }
.panel.active { display: block; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h3 { color: var(--navy); font-size: 18px; }
.panel-head p { color: var(--muted); font-size: 13.5px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.mini-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center;
}
.mini-stat b { display: block; font-size: 26px; color: var(--blue); }
.mini-stat span { font-size: 12.5px; color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm {
  padding: 6px 12px; font-size: 12.5px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-family: inherit; color: var(--text);
}
.btn-sm:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm.danger:hover { border-color: var(--red); color: var(--red); }
.btn-sm.ok { background: var(--green); color: #fff; border-color: var(--green); }
.btn-sm.gray { background: #eef2f7; }

/* 提示条 */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 999;
  background: var(--navy); color: #fff; padding: 13px 22px; border-radius: 10px;
  font-size: 14px; box-shadow: 0 8px 26px rgba(0,0,0,.25); opacity: 0;
  transform: translateY(12px); transition: all .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--red); }
.toast.suc { background: var(--green); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10,31,60,.5); z-index: 500;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); padding: 28px; width: min(620px, 100%);
  max-height: 86vh; overflow-y: auto;
}
.modal h3 { color: var(--navy); margin-bottom: 18px; font-size: 19px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.loading { text-align: center; color: var(--muted); padding: 30px 0; font-size: 14px; }

@media (max-width: 900px) {
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .field-row, .role-picker { grid-template-columns: 1fr; }
}
