/* ============ 专利查稿平台 · 设计系统 ============ */
:root {
  --brand: #2563eb;
  --brand-2: #0f9d76;
  --brand-soft: #eef4ff;
  --ink: #161b26;
  --ink-2: #3d4759;
  --muted: #6b7688;
  --line: #e6ebf4;
  --line-2: #eff3f9;
  --bg: #f6f8fc;
  --card: #ffffff;
  --ok: #0f9d58;
  --ok-soft: #e8f8ef;
  --warn: #c77700;
  --warn-soft: #fff5e5;
  --info: #1f66d8;
  --info-soft: #eaf2ff;
  --err: #d13b3b;
  --err-soft: #fdecec;
  --shadow-s: 0 1px 2px rgba(22, 34, 61, .05);
  --shadow-m: 0 8px 24px -12px rgba(22, 34, 61, .16);
  --shadow-l: 0 24px 60px -28px rgba(22, 34, 61, .28);
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; font-size: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 14px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .5);
}
.logo-img { height: 26px; width: auto; display: block; }
.nav-links { display: flex; gap: 4px; margin-left: 18px; }
.nav-links a {
  padding: 7px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2);
  transition: background .16s, color .16s;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand); }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 999px;
  background: #f3f6fc; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.chip b { color: var(--brand); font-variant-numeric: tabular-nums; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #cfe0ff, #b8f0dc);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #234;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .12s, box-shadow .16s, background .16s, border-color .16s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  color: #fff; box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .8);
}
.btn-primary:hover { box-shadow: 0 12px 22px -10px rgba(37, 99, 235, .9); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #c9d6ee; background: #fbfdff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow-s);
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 0 56px;
  background:
    radial-gradient(760px 340px at 12% -10%, #e5efff 0%, transparent 62%),
    radial-gradient(620px 320px at 92% 8%, #e4f8f0 0%, transparent 58%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px; background: #fff;
  border: 1px solid #d9e6ff; color: var(--brand); font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow-s);
}
.hero h1 {
  margin: 20px 0 14px; font-size: 42px; line-height: 1.22;
  letter-spacing: -.025em; font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(96deg, var(--brand) 10%, var(--brand-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  margin: 0; max-width: 620px; font-size: 16px; color: var(--muted); line-height: 1.75;
}
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { margin-top: 34px; display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats .n { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.hero-stats .l { font-size: 12.5px; color: var(--muted); }

/* ---------- 模块网格 ---------- */
.section { padding: 56px 0 72px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.015em; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.module {
  position: relative; display: flex; flex-direction: column;
  padding: 26px; border-radius: var(--r-l);
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .18s;
  overflow: hidden;
}
.module::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(37,99,235,.05), transparent 42%);
  opacity: 0; transition: opacity .2s;
}
.module.on:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); border-color: #c9dcff; }
.module.on:hover::after { opacity: 1; }
.module.off { background: #fbfcfe; }
.module-top { display: flex; align-items: center; gap: 12px; }
.m-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: var(--brand-soft); color: var(--brand);
}
.module.off .m-icon { background: #f0f3f8; color: #9aa5b8; }
.module h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.module .tag {
  margin-left: auto; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}
.tag-on { background: var(--ok-soft); color: var(--ok); }
.tag-off { background: #f1f4f9; color: #8b96a8; }
.module p { margin: 14px 0 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.module-foot { margin-top: 20px; display: flex; align-items: center; gap: 10px; }
.module-feats { margin: 15px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.module-feats li {
  font-size: 12px; color: var(--ink-2); background: #f6f8fc;
  border: 1px solid var(--line-2); padding: 3px 9px; border-radius: 7px;
}

/* ---------- 认证页 ---------- */
.auth-wrap {
  min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 24px;
  background:
    radial-gradient(600px 300px at 20% 0%, #e7f0ff 0%, transparent 60%),
    radial-gradient(500px 280px at 85% 100%, #e6f8f1 0%, transparent 58%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 34px 32px 28px; box-shadow: var(--shadow-l);
}
.auth-card h1 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.015em; }
.auth-card .sub { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 10px;
  border: 1px solid #dde5f1; background: #fcfdff; color: var(--ink);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input:focus {
  outline: none; border-color: #93b8ff; background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--brand); font-weight: 600; }
.alert {
  display: none; margin-bottom: 14px; padding: 10px 13px; border-radius: 10px;
  font-size: 13px; line-height: 1.55;
}
.alert.show { display: block; }
.alert-err { background: var(--err-soft); color: var(--err); border: 1px solid #f6d4d4; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #cdeedd; }

/* ---------- 工作台 ---------- */
.page { padding: 30px 0 70px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; border-radius: var(--r-m); background: #fff; border: 1px solid var(--line); }
.kpi .k { font-size: 12.5px; color: var(--muted); }
.kpi .v { margin-top: 6px; font-size: 25px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 5px; }
.kpi.accent { background: linear-gradient(135deg, #fff, #f4f9ff); border-color: #dbe8ff; }

.grid-2 { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; align-items: start; }

.panel { padding: 22px; border-radius: var(--r-l); background: #fff; border: 1px solid var(--line); }
.panel h2 { margin: 0 0 4px; font-size: 16px; }
.panel .hint { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }

.drop {
  border: 1.5px dashed #cdd9ec; border-radius: var(--r-m); background: #fbfdff;
  padding: 30px 20px; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.drop:hover, .drop.over { border-color: #8fb4ff; background: #f5f9ff; }
.drop.over { transform: scale(.995); }
.drop .ico { font-size: 30px; }
.drop .t { margin-top: 10px; font-weight: 600; font-size: 14px; }
.drop .d { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.file-line {
  display: none; margin-top: 14px; padding: 10px 13px; border-radius: 10px;
  background: var(--brand-soft); font-size: 13px; align-items: center; gap: 8px;
}
.file-line.show { display: flex; }
.file-line .nm { font-weight: 600; word-break: break-all; }
.file-line .sz { color: var(--muted); font-size: 12px; margin-left: auto; }

.upload-bar { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.upload-bar .cost { font-size: 12.5px; color: var(--muted); }
.upload-bar .cost b { color: var(--warn); }
.progress { height: 4px; border-radius: 999px; background: #eef2f9; overflow: hidden; margin-top: 12px; display: none; }
.progress.show { display: block; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }

/* ---------- 任务表 ---------- */
.table-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.table-head h2 { margin: 0; font-size: 16px; }
.table-head .meta { font-size: 12.5px; color: var(--muted); }
.list { border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.lr {
  display: grid; grid-template-columns: 1fr 108px 150px 96px;
  gap: 12px; align-items: center; padding: 13px 16px;
  border-bottom: 1px solid var(--line-2); font-size: 13.5px;
  transition: background .14s;
}
.lr:last-child { border-bottom: 0; }
.lr:hover { background: #fbfdff; }
.lr.head { background: #f8fafd; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 16px; }
.lr .nm { min-width: 0; }
.lr .nm b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr .nm span { font-size: 11.5px; color: #93a0b4; }
.lr .act { text-align: right; }

.pill {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.queued { background: var(--warn-soft); color: var(--warn); }
.pill.processing { background: var(--info-soft); color: var(--info); }
.pill.processing i { animation: blink 1.2s ease-in-out infinite; }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.expired { background: #f2f4f8; color: #8792a6; }
.pill.failed { background: var(--err-soft); color: var(--err); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.lr.processing-row { background: linear-gradient(90deg, #f7fbff, #fff 60%); }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty .ico { font-size: 28px; margin-bottom: 8px; opacity: .5; }

/* ---------- 占位页 ---------- */
.placeholder { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 24px; }
.ph-card { text-align: center; max-width: 520px; padding: 46px 36px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-m); }
.ph-ico { width: 66px; height: 66px; margin: 0 auto 20px; border-radius: 20px; background: #f2f6fc; display: grid; place-items: center; font-size: 28px; }
.ph-card h1 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.02em; }
.ph-card p { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.75; }

.footer { border-top: 1px solid var(--line); padding: 26px 0; background: #fff; }
.footer .in { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: #1b2432; color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .24s; z-index: 90;
  box-shadow: var(--shadow-l); max-width: 82vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #b02a2a; }

@media (max-width: 900px) {
  .modules { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 32px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 44px 0 40px; }
  .lr { grid-template-columns: 1fr 92px; row-gap: 6px; }
  .lr .act { grid-column: 1 / -1; text-align: left; }
  .lr.head { display: none; }
}

/* 查稿类型选择 */
.kind-pick { display: flex; gap: 10px; margin: 4px 0 14px; }
.kind {
  flex: 1; height: 46px; border: 1.5px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color .16s, background .16s, color .16s;
}
.kind span { font-weight: 400; font-size: 12px; color: var(--muted); }
.kind:hover { border-color: #c9dcff; background: #fbfdff; }
.kind.on { border-color: var(--brand); background: #f5f9ff; color: var(--brand); }
.kind.on span { color: var(--brand); }

/* 查稿方式：单选框 */
.mode-pick { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px; }
.mode-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; line-height: 1.4;
  transition: background .14s;
}
.mode-opt:hover { background: #f7faff; }
.mode-opt.on { background: #f3f8ff; }
.mode-opt input {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; margin: 0; flex: 0 0 auto;
  border: 1.5px solid #c8d2e2; border-radius: 50%;
  background: #fff; position: relative; cursor: pointer;
  transition: border-color .14s;
}
.mode-opt input:checked { border-color: var(--brand); }
.mode-opt input:checked::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--brand);
}
.mo-name { flex: 1 1 auto; color: var(--ink); font-weight: 600; }
.mo-name em {
  margin-left: 6px; padding: 1px 5px; border-radius: 4px;
  background: #e8f2ff; color: var(--brand);
  font-size: 10px; font-style: normal; font-weight: 600;
}
.mo-price { flex: 0 0 auto; color: var(--brand); font-weight: 600; font-size: 12.5px; }
.mode-hint {
  margin: 0 0 14px 37px; font-size: 11.5px; color: var(--muted); line-height: 1.6;
}

/* 传统档结果 */
.chk-stat { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chk-stat span {
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: #f4f7fc; color: #5b6b82;
}
.chk-stat b { color: var(--ink); }
.chk-item {
  padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13px; line-height: 1.65;
}
.chk-item:first-child { border-top: 0; }
.chk-lv {
  display: inline-block; min-width: 56px; margin-right: 8px; padding: 1px 7px;
  border-radius: 5px; font-size: 11px; font-weight: 600; text-align: center;
}
.chk-lv.err { background: #fdeaea; color: #c01b1b; }
.chk-lv.wrn { background: #fdf3e3; color: #b46a00; }
.chk-lv.inf { background: #eef2f8; color: #5b6b82; }
.chk-cat { font-weight: 600; color: var(--ink); }
.chk-where { color: #8b96a8; }
.chk-snip { margin: 4px 0 0 64px; font-size: 12px; color: #93a0b4; }

/* 窄屏导航：只留头像入口（头像同样指向账户设置），避免按钮挤出屏幕 */
@media (max-width: 620px) {
  .nav-right .chip { display: none; }
  .nav-right a[href="/account.html"].btn { display: none; }
}

/* 首页联系条 */
.contact-strip {
  display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center;
  padding: 18px 22px; border-radius: var(--r-l); background: #fff;
  border: 1px solid var(--line); font-size: 14px; color: var(--ink-2);
}
.contact-strip a, .contact-strip span { display: inline-flex; align-items: center; gap: 6px; }
.contact-strip a:hover { color: var(--brand); }
@media (max-width: 640px) { .contact-strip { gap: 8px 16px; font-size: 13px; } }

/* 列表：带「耗时」列的 5/6 列布局（查询页 / 转 XML / 答复 / 撰写共用） */
.lr.c5 { grid-template-columns: 1fr 118px 84px 132px 92px; }
.lr.c6 { grid-template-columns: 1fr 74px 118px 84px 132px 92px; }
@media (max-width: 900px) {
  .lr.c5 { grid-template-columns: 1fr 104px 78px 88px; }
  .lr.c6 { grid-template-columns: 1fr 104px 78px 88px; }
  .lr.c5 .hide-sm, .lr.c6 .hide-sm { display: none; }
  .lr.c5 .pill, .lr.c6 .pill { white-space: normal; }
}
@media (max-width: 640px) {
  .lr.c5 { grid-template-columns: 1fr 84px 72px; }
  .lr.c6 { grid-template-columns: 1fr 84px 72px; }
  .lr.c6 .type-col { display: none; }
}

/* 后台表格里的状态徽标不折行 */
.ar .pill { white-space: nowrap; }
