/* AI for Accounting — 轻奢·专业财务工作台
   方向：Soft Structuralism（干净底、柔和弥散阴影、精致排版、克制微交互）
   国内可用：不引外部字体，用系统高级字体（SF Pro / 苹方 / 微软雅黑）。 */
:root {
  --bg: #f3f4f2;
  --surface: #ffffff;
  --surface-2: #fbfbfa;
  --ink: #12161b;
  --text: #242b32;
  --muted: #69727c;
  --faint: #98a0a8;
  --line: #e7e9e6;
  --line-strong: #d7dbd6;
  --accent: #0f6e56;
  --accent-dark: #0a533f;
  --accent-soft: #e7f1ec;
  --accent-ink: #0a3d2e;
  --danger: #b42318; --danger-bg: #fdecea;
  --ok: #167044; --ok-bg: #e7f5ec;
  --warn: #8a5a00; --warn-bg: #faf0d8;
  --radius: 16px;
  --radius-sm: 10px;
  --pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 30px -16px rgba(16,24,40,.16);
  --shadow-lift: 0 3px 6px rgba(16,24,40,.06), 0 22px 46px -18px rgba(16,24,40,.26);
  --ease: cubic-bezier(0.32,0.72,0,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-dark); }
.muted { color: var(--muted); }

/* ── 顶栏（浮起玻璃感，不用硬边线） ────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(16,24,40,.05), 0 6px 20px -18px rgba(16,24,40,.35);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 640; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: none; }
.brand-symbol {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(160deg, #1a8d70, var(--accent));
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 8px -2px rgba(15,110,86,.5), inset 0 1px 1px rgba(255,255,255,.25);
}
.topbar nav { display: flex; align-items: center; gap: 6px; }
.topbar nav a, .link-btn { color: var(--muted); font-size: 14px; padding: 7px 11px; border-radius: 8px; transition: all .2s var(--ease); }
.topbar nav a:hover { color: var(--accent-dark); background: var(--accent-soft); }
.topbar .who { margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.inline { display: inline; margin: 0; }
.link-btn { border: 0; background: none; cursor: pointer; }
.link-btn:hover { color: var(--accent-dark); background: var(--accent-soft); }

/* ── 版心 ─────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 44px 28px 72px; animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.15; font-weight: 680; letter-spacing: -.02em; color: var(--ink); }
h2 { margin: 40px 0 16px; font-size: 21px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
h3 { margin: 0 0 8px; font-size: 16px; font-weight: 640; color: var(--ink); }

/* ── 首页头部 ─────────────────────────────────────────── */
.workspace-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 12px; padding: 4px 12px;
  background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; border-radius: var(--pill); }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.intro-copy { margin: 0; color: var(--muted); font-size: 17px; }

/* ── 按钮 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border: 1px solid var(--line-strong); border-radius: var(--pill);
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 560;
  text-align: center; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); color: var(--text); }
.btn:active { transform: scale(.985); }
.btn.primary { border-color: transparent; background: linear-gradient(180deg, #148468, var(--accent)); color: #fff;
  box-shadow: 0 2px 6px -1px rgba(15,110,86,.4), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { background: linear-gradient(180deg, #12795f, var(--accent-dark)); color: #fff; box-shadow: 0 8px 22px -8px rgba(15,110,86,.6); }
.btn.quiet { background: var(--surface); color: var(--accent-dark); }
.btn-glyph { display: none; }

/* ── 卡片网格（首页工具卡） ──────────────────────────────── */
.command-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.command-card {
  position: relative; display: flex; flex-direction: column; min-height: 188px;
  padding: 26px 26px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease);
  overflow: hidden;
}
.command-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 70%); opacity: 0; transition: opacity .3s var(--ease); }
.command-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); color: var(--text); }
.command-card:hover::before { opacity: 1; }
.command-card:active { transform: translateY(-1px) scale(.995); }
.command-card-main p, .command-card p { color: #4a545e; }
.command-icon { display: none; }
.command-index { display: inline-flex; align-self: flex-start; margin-bottom: 16px; padding: 3px 11px;
  background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; border-radius: var(--pill); }
.command-card h2 { margin: auto 0 8px; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.command-card p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; }
.command-link, .command-card-main .command-link { display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-dark); font-weight: 620; font-size: 15px; }
.arrow { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; margin-left: 2px;
  transition: transform .35s var(--ease), background .2s var(--ease); }
.command-card:hover .arrow { transform: translate(3px,-1px); background: var(--accent); color: #fff; }
.command-card.is-disabled { opacity: .6; cursor: default; box-shadow: var(--shadow-sm); }
.command-card.is-disabled:hover { transform: none; box-shadow: var(--shadow-sm); }
.command-card.is-disabled:hover::before { opacity: 0; }
.command-card.is-disabled .command-link.muted { color: var(--muted); }

/* ── 最近任务 ─────────────────────────────────────────── */
.recent-section { margin-top: 44px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; }
.section-heading h2 { margin: 0 0 14px; }
.section-kicker { display: none; }

/* ── 表格 ─────────────────────────────────────────────── */
table.data { width: 100%; margin-top: 12px; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; font-size: 14.5px; box-shadow: var(--shadow-sm); }
table.data th, table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.data td { font-variant-numeric: tabular-nums; }
table.data th { color: var(--muted); background: var(--surface-2); font-weight: 600; font-size: 13px;
  letter-spacing: .02em; text-transform: none; }
table.data tbody tr { transition: background .15s var(--ease); }
table.data tbody tr:hover { background: #f7faf8; }
table.data tr:last-child td { border-bottom: 0; }
table.data.kv th { width: 42%; color: var(--muted); background: var(--surface-2); font-weight: 560; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); }

/* ── 表单卡 ───────────────────────────────────────────── */
.card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.form { display: flex; flex-direction: column; gap: 24px; max-width: 660px; }
.form label { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 17px; font-weight: 620; }
.form input, .form select {
  padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 16px; font-weight: 400;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.form input:focus, .form select:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,110,86,.12); }
.form input[type="file"] { padding: 11px 14px; font-size: 15px; cursor: pointer; }
.form select { cursor: pointer; }
.hint { color: #5c6670; font-size: 15px; font-weight: 400; line-height: 1.55; }

/* ── 使用说明框 ───────────────────────────────────────── */
.guide { border: 1px solid var(--line); border-radius: var(--radius); background:
  linear-gradient(180deg, #f2f8f5, var(--surface)); padding: 20px 22px; margin: 0 0 26px; max-width: 760px;
  box-shadow: var(--shadow-sm); position: relative; }
.guide::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
  border-radius: var(--pill); background: var(--accent); }
.guide h3 { margin: 0 0 12px; font-size: 17px; color: var(--accent-ink); }
.guide ol, .guide ul { margin: 0; padding-left: 24px; }
.guide li { font-size: 16px; line-height: 1.75; margin: 6px 0; color: var(--text); }
.guide li::marker { color: var(--accent); font-weight: 700; }
.guide .g-out { color: var(--accent-dark); font-weight: 640; }

/* ── 醒目提示 ─────────────────────────────────────────── */
.notice { border: 1px solid #ecdcae; border-radius: var(--radius); background: linear-gradient(180deg,#fbf3df,#fdfaf1);
  padding: 16px 20px; margin: 0 0 24px; max-width: 760px; font-size: 16px; line-height: 1.65;
  box-shadow: var(--shadow-sm); position: relative; }
.notice::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: var(--pill); background: #d99a20; }
.notice strong { color: var(--warn); }
.notice a { font-weight: 640; }

/* ── 工具页 ───────────────────────────────────────────── */
.tool-desc { font-size: 17px; line-height: 1.7; color: #47515b; margin: 0 0 22px; max-width: 760px; }
.field-required { color: var(--accent-dark); font-weight: 640; font-size: 14px; }
.field-optional { color: var(--faint); font-weight: 400; font-size: 15px; }
.alert { margin: 14px 0; padding: 13px 16px; border-radius: var(--radius-sm); background: var(--danger-bg);
  color: var(--danger); border: 1px solid #f4ccc6; font-size: 15px; }
.result { margin-top: 30px; }
.reconcile-form { max-width: 760px; }

/* ── 登录页 ───────────────────────────────────────────── */
.login-wrap { max-width: 400px; margin: 96px auto; text-align: center; }
.login-wrap .card { padding: 32px 30px; border-radius: 20px; box-shadow: var(--shadow-lift); }
.login-wrap .form { margin-top: 22px; text-align: left; }
.login-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 24px; font-weight: 660; color: var(--ink); }
.login-brand .brand-symbol { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }

/* ── 状态徽标 ─────────────────────────────────────────── */
.status { display: inline-block; padding: 3px 10px; border-radius: var(--pill); font-size: 12.5px; font-weight: 560; }
.status.done { background: var(--ok-bg); color: var(--ok); }
.status.error { background: var(--danger-bg); color: var(--danger); }
.status.pending { background: var(--warn-bg); color: var(--warn); }

/* ── 杂项 ─────────────────────────────────────────────── */
.search-form { max-width: 760px; display: flex; align-items: end; gap: 14px; }
.search-form label { flex: 1; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; }
.tool-card p { flex: 1; margin: 4px 0 12px; }
.tool-head { display: flex; align-items: center; justify-content: space-between; }
.badge { padding: 2px 9px; border: 1px solid var(--line); border-radius: var(--pill); color: var(--muted); font-size: 12.5px; }
td.summary { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

@media (max-width: 760px) {
  .topbar { position: static; height: auto; min-height: 56px; padding: 12px 16px; flex-wrap: wrap; gap: 10px; backdrop-filter: none; background: var(--surface); }
  .topbar nav { flex-wrap: wrap; justify-content: flex-end; gap: 4px 6px; }
  .topbar .who { display: none; }
  .container { padding: 30px 16px 56px; }
  h1 { font-size: 27px; }
  .workspace-intro { align-items: flex-start; flex-direction: column; }
  .command-grid { grid-template-columns: 1fr; gap: 16px; }
  .search-form { align-items: stretch; flex-direction: column; }
}
