/* ============================================================
   globle / 智弘选 — "Clean Green" 设计系统 (V3)
   浅底 #f5f7f3 · 深绿主色 #167a59 / #174c3c · 浅绿强调 #d5ed99
   中文大白话 · 留白 · 清晰层级。仅换配色令牌，类名与组件规则保持不变，
   使 27 个旧页面无侵入统一到新视觉。
   ============================================================ */
/* Fonts are served from /static/fonts, not Google's CDN: the buyer-facing product has
   to render the same way behind the Great Firewall, offline, or on a customer's intranet. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/static/fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/static/fonts/archivo-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --paper: #f5f7f3;      /* 米白背景 */
  --paper-2: #ffffff;    /* 面/输入底 */
  --card: #ffffff;       /* 卡片 */
  --ink: #172c2b;        /* 主文字/深绿墨 */
  --ink-2: #3c5450;      /* 次级文字 */
  --muted: #768782;      /* 弱化 */
  --line: #e5eae5;       /* 边框 */
  --line-2: #cdded4;     /* 强边框 */
  --sienna: #167a59;     /* 主色·深绿 */
  --sienna-2: #1f9d72;   /* 主色亮·交互 */
  --pine: #174c3c;       /* 深绿·成功/强调 */
  --gold: #a16207;       /* 警示/演示（琥珀，保留语义） */
  --accent: #d5ed99;     /* 浅绿强调 */
  --shadow: 0 1px 0 rgba(23,44,43,.04), 0 12px 30px -18px rgba(23,44,43,.30);
  --mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  --sans: "Archivo", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 标题改用干净的无衬线，贴合"清晰层级"的现代绿视觉；Fraunces 保留加载但不再作为标题字体。 */
  --serif: "Archivo", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans); color: var(--ink); font-size: 14px; line-height: 1.55;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(23,44,43,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(22,122,89,.05), transparent 340px);
  background-size: 3px 3px, 100% 100%;
}
a { color: var(--sienna); text-decoration: none; }
h1,h2,h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* buttons */
button, .btn {
  font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--sienna); background: var(--sienna); color: #fff;
  padding: 9px 16px; border-radius: 9px; letter-spacing: .02em; transition: transform .12s, background .15s, box-shadow .15s;
}
button:hover, .btn:hover { background: var(--pine); border-color: var(--pine); }
button:active { transform: translateY(1px); }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
button.ghost:hover { background: var(--sienna); color: #fff; border-color: var(--sienna); }
button.sienna { background: var(--sienna); border-color: var(--sienna); }
button.sienna:hover { background: var(--pine); border-color: var(--pine); }
button.pine { background: var(--pine); border-color: var(--pine); }
button.pine:hover { background: var(--ink); border-color: var(--ink); }
button.sm { padding: 5px 10px; font-size: 12px; }
button.block { width: 100%; }

/* inputs */
input, select, textarea {
  font-family: var(--sans); font-size: 14px; width: 100%; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sienna); box-shadow: 0 0 0 3px rgba(22,122,89,.14); }
label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 0 5px; }
textarea { resize: vertical; }

/* ===== AUTH ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.auth .pitch { padding: 64px; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, #123a2b, #0b2018); color: #e6efe9; position: relative; overflow: hidden; }
.auth .pitch::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 42px); }
.auth .pitch .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; color: var(--accent); text-transform: uppercase; }
/* The lockup is dark-green ink, so the dark pitch panel gets the light-cut PNG instead. */
.auth .pitch .pitchbrand { position: relative; z-index: 1; display: block;
  width: 322px; max-width: 74%; height: auto; margin-bottom: 34px; }
.auth .pitch h1 { font-size: 46px; line-height: 1.05; margin: 18px 0; color: #f2f8f4; }
.auth .pitch h1 em { color: var(--accent); font-style: italic; }
.auth .pitch ul { list-style: none; padding: 0; margin: 22px 0 0; font-size: 14px; color: #b9cdc2; }
.auth .pitch li { padding: 7px 0; border-top: 1px solid rgba(255,255,255,.1); }
.auth .form { display: grid; place-items: center; padding: 40px; }
.auth .form-inner { width: 360px; max-width: 100%; }
/* Mobile hides the pitch panel, so the form carries the brand on its own. */
.auth .formbrand { display: block; width: 150px; height: auto; margin-bottom: 28px; }
.auth .formtitle { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
@media (max-width: 820px){ .auth { grid-template-columns: 1fr; } .auth .pitch { display:none; } }

/* ===== APP SHELL ===== */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.rail { border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--paper-2); }
/* Brand lockup: the globe+wordmark image replaces the old text wordmark. line-height:0 so
   the anchor does not add the inline-image descender gap under it, which is what used to
   push the nameplate up against the logo. */
.rail .brand { display: block; line-height: 0; margin: 0 0 15px; }
.rail .brand img { display: block; width: 100%; max-width: 170px; height: auto; }
/* Nameplate: whose tenant this is and which trade it is running — both changeable in place,
   because a factory that signs out of a demo name should not have to find a settings tab. */
.rail .np { margin: 4px 0 20px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--card); box-shadow: var(--shadow); }
.rail .np-head { display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 9px 10px 8px; cursor: pointer; }
.rail .np-head b { display: block; font-family: var(--serif); font-size: 13.5px; font-weight: 600;
  line-height: 1.28; color: var(--ink); letter-spacing: -.01em; }
.rail .np-head i { display: flex; align-items: center; gap: 5px; font-style: normal; margin-top: 3px;
  font-family: var(--mono); font-size: 10px; color: var(--sienna); letter-spacing: .04em; }
/* A long industry name ("家居与园艺（Home & Garden）") used to run past the nameplate edge.
   Ellipsise the text so the caret stays pinned and nothing spills out of the card. */
.rail .np-head i .npi-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .np-head i .caret { flex: none; width: 0; height: 0; border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent; border-top: 4.5px solid currentColor; transition: transform .2s; }
.rail .np.open .np-head i .caret { transform: rotate(180deg); }
.rail .np-body { border-top: 1px dashed var(--line-2); padding: 11px 10px 12px; }
.rail .np-body > label { display: block; font-size: 9.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.rail .np-body input { width: 100%; font-size: 12.5px; padding: 6px 8px; }
.rail .np-ind { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.rail button.indc { white-space: normal; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 1px solid var(--line); background: none; color: var(--ink-2); border-radius: 9px;
  padding: 6px 8px 5px; font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s; }
.rail button.indc span { font-family: var(--mono); font-size: 9.5px; font-weight: 400;
  color: var(--muted); letter-spacing: .03em; }
.rail button.indc:hover { border-color: var(--sienna); color: var(--ink); }
.rail button.indc.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.rail button.indc.on span { color: rgba(233,243,236,.72); }
.rail .grp { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 18px 8px 6px; }
.rail a { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; }
.rail a:hover { background: rgba(22,122,89,.08); color: var(--ink); }
.rail a.on { background: var(--pine); color: #fff; }
.rail a .n { font-family: var(--mono); font-size: 11px; opacity: .6; }
.main { padding: 0 40px 60px; max-width: 1720px; min-width: 0; }
.masthead { display: flex; align-items: baseline; justify-content: space-between; padding: 30px 0 12px; border-bottom: 3px double var(--line-2); }
.masthead .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--sienna); }
.masthead h1 { font-size: 30px; margin-top: 4px; }
.masthead .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
/* 全局界面模式开关 —— 右上角。必须显式覆盖全局 button 规则
   (background: var(--sienna); color:#fff)，否则会变成深绿底白字的胶囊。 */
.modesw { display: inline-flex; gap: 2px; padding: 3px; margin-left: 6px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); }
button.ms-opt { border: 0; background: transparent; color: var(--ink-2); white-space: nowrap;
  border-radius: 999px; padding: 5px 13px; font-family: inherit; font-size: 12.5px;
  font-weight: 600; line-height: 1.35; cursor: pointer; transition: background .16s, color .16s; }
button.ms-opt:hover { color: var(--pine); }
button.ms-opt.on { background: var(--pine); color: #fff; }
.page { animation: rise .5s ease both; }
/* 首页的贸易链路提示条：产品/同行 → 贸易记录 → 企业档案 → 联系信息 → 客户库 */
.chainbar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--pine);
  background: var(--accent); border: 1px solid rgba(23,76,60,.18);
  border-radius: 9px; padding: 8px 12px; }
.chainbar i { font-style: normal; color: var(--sienna); font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 18px 20px; box-shadow: var(--shadow); overflow-x: auto; }
.card h3 { font-size: 16px; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); }
.g3 { grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); }
.g4 { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
/* 展会页那种「宽表 + 窄表」并排：宽屏才并排，窄屏交给单栏，
   否则操作列不许换行就会把整页顶出横向滚动条。 */
.g2w { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 1180px){ .g2w { grid-template-columns: 1fr; } }
@media (max-width: 1080px){ .shell { grid-template-columns: 188px 1fr; } .main { padding: 0 24px 48px; } .rail { padding: 20px 10px; } }
@media (max-width: 700px){ .shell { grid-template-columns: 1fr; } .rail { position: static; height: auto; } .main { padding: 0 16px 40px; } }
.stat { border-left: 3px solid var(--sienna); padding: 4px 0 4px 14px; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stat .v { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.stat .v small { font-size: 14px; color: var(--muted); font-family: var(--mono); }

/* table */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* 操作列与短值列：PC 上「已在 / 排期」「10 / 04」被劈成两行是排版事故，不是省地方的办法。 */
td:has(button), td:has(.pill), td.mono, td.num { white-space: nowrap; }
tbody tr:hover { background: rgba(22,122,89,.05); }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.row .grow { flex: 3; min-width: 200px; }
.row .fixed { flex: 0; }

/* pills */
.pill { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pill.live { color: var(--pine); border-color: var(--pine); }
.pill.demo { color: var(--gold); border-color: var(--gold); }
.pill.new{color:#6b7280}.pill.contacted{color:#0369a1}.pill.replied{color:var(--pine)}
.pill.quoted{color:var(--gold)}.pill.negotiating{color:var(--sienna-2)}.pill.won{color:var(--pine);border-color:var(--pine)}.pill.lost{color:#991b1b}
.note { font-size: 12.5px; color: var(--muted); }
.banner { border: 1px dashed var(--gold); color: #7a4d05; background: rgba(161,98,7,.07); padding: 10px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; }
.banner.live { border: 1px solid var(--pine); color: var(--pine); background: rgba(22,122,89,.07); }
.nowrap { white-space: nowrap; }
.empty { padding: 40px; text-align: center; color: var(--muted); font-style: italic; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--pine); color: #fff; padding: 12px 18px; border-radius: 9px; z-index: 200; font-size: 13px; box-shadow: var(--shadow); animation: rise .25s ease; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg button { border: none; border-radius: 0; background: transparent; color: var(--ink-2); }
.seg button.on { background: var(--pine); color: #fff; }

/* ---------- channel chips + budget bar ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: 12px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); }
.chip:hover { border-color: var(--sienna); color: var(--sienna); }
.chip.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.chip.ghost { border-radius: 9px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; margin-top: 12px; overflow: hidden; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--sienna), var(--sienna-2)); }
td.why { font-size: 12.5px; color: var(--ink-2); max-width: 320px; }
tbody tr.off { opacity: .42; }
tbody tr.off td.why { text-decoration: none; }
ol.seq { margin: 0; padding-left: 20px; }
ol.seq li { padding: 9px 0; border-bottom: 1px dotted var(--line-2); font-size: 13.5px; }
ol.seq li::marker { font-family: var(--mono); color: var(--sienna); font-size: 12px; }
ul.odd { margin: 0; padding-left: 0; list-style: none; }
ul.odd li { padding: 10px 0 10px 22px; border-bottom: 1px dotted var(--line-2); font-size: 13.5px; position: relative; }
ul.odd li::before { content: "→"; position: absolute; left: 0; color: var(--sienna); font-family: var(--mono); }

/* ---------- acquisition engine: a loom that keeps working after you go ---------- */
.eng-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  border: 1px solid var(--line-2); border-radius: 15px; background: var(--card); overflow: hidden; }
.eng-stage > div { padding: 14px 16px 16px; border-right: 1px dashed var(--line-2); }
.eng-stage > div:last-child { border-right: none; }
.eng-stage .no { font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--sienna); }
.eng-stage h4 { font-family: var(--serif); font-size: 14.5px; font-weight: 600; margin: 5px 0 8px; line-height: 1.3; }
.eng-stage .v { font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums; }
.eng-stage .v small { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; }
/* The shuttle crosses the warp while the worker thread is alive; frozen when it is not.
   A machine you cannot see running is a machine nobody trusts with their mailbox. */
.shuttle { position: relative; height: 3px; margin: 12px 0 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 9px); }
.shuttle i { position: absolute; top: -3px; left: 0; width: 17px; height: 9px; border-radius: 2px;
  background: var(--sienna); animation: throw 4.2s linear infinite; }
.shuttle.off i { animation: none; background: var(--muted); opacity: .45; left: auto; right: 0; }
@keyframes throw { 0%,49% { left: 0 } 50%,99% { left: calc(100% - 17px) } 100% { left: 0 } }
.pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pine);
  margin-right: 6px; vertical-align: 1px; animation: beat 1.8s ease-in-out infinite; }
.pulse.off { background: var(--muted); animation: none; }
@keyframes beat { 0%,100% { box-shadow: 0 0 0 0 rgba(23,76,60,.42) } 55% { box-shadow: 0 0 0 6px rgba(23,76,60,0) } }
.tape { max-height: 380px; overflow: auto; }
.tape > div { display: grid; grid-template-columns: 60px 96px 1fr auto; gap: 12px; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px dotted var(--line-2); font-size: 12.5px; }
.tape > div:last-child { border-bottom: none; }
.tape .t { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tape .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--sienna); }
.tape .m { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape .m.bad { color: #991b1b; }
/* A reply is the only thing a salesperson should have to read. */
.reply { border: 1px solid var(--line); border-left: 3px solid var(--pine); background: var(--card);
  padding: 15px 18px 16px; border-radius: 15px; box-shadow: var(--shadow); }
.reply.opted { border-left-color: #991b1b; }
.reply h4 { font-family: var(--serif); font-size: 17px; margin: 0 0 2px; font-weight: 600; }
.reply .body { font-size: 13.5px; line-height: 1.6; color: var(--ink); margin-top: 8px;
  white-space: pre-wrap; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 12px; max-height: 190px; overflow: auto; }
.reply .wrote { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--line-2);
  padding-left: 10px; margin-top: 9px; }
.handoff { display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; }
details.letter summary { cursor: pointer; font-family: var(--mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- settings tabs ---------- */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line-2); }
.tab { border: none; background: none; padding: 0 0 10px; font-size: 13.5px; color: var(--muted); border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--ink); border-bottom-color: var(--sienna); font-weight: 600; }

/* ---------- dossier ---------- */
.dossier { border: 1px solid var(--line-2); border-top: 3px solid var(--pine); background: var(--card); padding: 24px 26px; box-shadow: var(--shadow); border-radius: 15px; }
.d-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.d-head h2 { font-family: var(--serif); font-size: 27px; margin: 4px 0 0; letter-spacing: -.01em; }
.d-verdict { margin-top: 14px; font-size: 15px; line-height: 1.6; padding-left: 14px; border-left: 3px solid var(--sienna); color: var(--ink); }
.d-ai { margin-top: 14px; background: var(--paper-2); border: 1px dashed var(--line-2); padding: 12px 14px; font-size: 13.5px; line-height: 1.6; border-radius: 9px; }
.d-ai .eyebrow { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--sienna); margin-bottom: 5px; }
.kv { display: flex; gap: 14px; padding: 7px 0; border-bottom: 1px dotted var(--line-2); font-size: 13px; }
.kv span { flex: 0 0 78px; color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.kv b { flex: 1; font-weight: 500; }
ul.d-sig { list-style: none; margin: 0; padding: 0; }
ul.d-sig li { padding: 9px 0; border-top: 1px solid var(--line); }
ul.d-sig li:first-child { border-top: none; }

/* ---------- video script card ---------- */
.vcard { background: var(--pine); color: #e6efe9; padding: 26px 28px; border-radius: 15px; position: relative; overflow: hidden; }
.vcard::after { content: "9:16"; position: absolute; right: 18px; top: 14px; font-family: var(--mono); font-size: 11px; color: rgba(230,239,233,.4); letter-spacing: .1em; }
.vcard .eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.vcard h2 { font-family: var(--serif); font-size: 26px; line-height: 1.25; margin: 8px 0 6px; font-weight: 600; }
.vcard .note { color: rgba(230,239,233,.66); }

/* ---------- extra status pills ---------- */
.pill.pine { color: var(--pine); border-color: var(--pine); }
.pill.gold { color: var(--gold); border-color: var(--gold); }
.pill.sienna { color: var(--sienna); border-color: var(--sienna); }
.pill.high { color: #991b1b; border-color: #991b1b; }
.pill.mid { color: var(--gold); border-color: var(--gold); }
.pill.low, .pill.free { color: var(--pine); border-color: var(--pine); }
.pill.watching { color: var(--muted); }
.pill.planned { color: #0369a1; }
.pill.booked { color: var(--sienna); border-color: var(--sienna); }
.pill.attended, .pill.done, .pill.delivered, .pill.reconciled { color: var(--pine); border-color: var(--pine); }
.pill.running { color: var(--sienna); }
tr.ddrow > td { padding: 0 12px 20px; background: var(--paper-2); }
tr.ddrow:hover { background: var(--paper-2) !important; }
.d-prof { margin-top: 12px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); background: var(--paper-2); border-left: 2px solid var(--line-2); padding: 10px 14px; border-radius: 0 9px 9px 0; }
ul.d-sig .sn { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }

/* ---------- AI layer: a stitched edge, not a chat bubble ---------- */
.rail .railfoot { margin-top: 26px; padding-top: 13px; border-top: 1px dashed var(--line-2); }
.aistat.inline { display: inline-block; vertical-align: 2px; margin-left: 7px; }
.ai-off { border: 1px dashed var(--gold); background: rgba(161,98,7,.06); color: #7a4d05;
  padding: 11px 14px; border-radius: 9px; font-size: 13px; line-height: 1.55; }
.ai-off button { margin: 6px 0 0; }
.ai-act { margin-top: 6px; font-size: 13px; color: var(--sienna); line-height: 1.5;
  border-left: 2px solid var(--sienna-2); padding-left: 10px; }
.pre { font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap;
  color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 13px; margin-top: 8px; }
.hooklist { list-style: none; padding: 0; margin: 0; }
.hooklist li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 10px 0; border-top: 1px solid var(--line); }
.hooklist li:first-child { border-top: 0; }
.hooklist li span { font-family: var(--serif); font-size: 16px; line-height: 1.35; }
details summary { cursor: pointer; }
.d-aip + .d-ai { margin-top: 10px; }

/* ---------- switches, drafts, the material shelf ---------- */
.why { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
/* 情报监控里被你标成「忽略」的行：留在表里但退到背景，避免判断一次就永久消失。 */
tr.dim td { opacity: .42; }
.switchrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px dotted var(--line-2); }
.switchrow:last-of-type { border-bottom: none; }
.switchrow > label { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; margin: 0;
  font-size: 13.5px; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; }
.switchrow input[type=checkbox] { width: auto; height: 15px; accent-color: var(--sienna); transform: translateY(2px); }
.switchrow .note { flex: 1 1 260px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.mthumb { border: 1px solid var(--line-2); border-top: 3px solid var(--pine); background: var(--paper-2);
  border-radius: 9px; padding: 10px 12px 12px; }
.mthumb img { display: block; width: 100%; height: 134px; object-fit: cover; background: #fff; border-radius: 9px; }
.mthumb.off { border-top-color: var(--line-2); opacity: .58; }
.mthumb.off img { filter: grayscale(1); }
.mailframe { display: block; width: 100%; min-height: 430px; margin-top: 10px;
  border: 1px solid var(--line-2); border-radius: 9px; background: #fff; }
.sdraft { font-size: 13px; margin-top: 10px; }
.serr { font-size: 12.5px; color: #991b1b; }
.serr:empty { display: none; }
.dossier .body { font-size: 13.5px; line-height: 1.6; color: var(--ink); margin-top: 8px;
  white-space: pre-wrap; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 12px; max-height: 260px; overflow: auto; }
.body .mine { color: var(--ink-2); border-left: 2px solid var(--sienna-2); padding-left: 9px; margin: 3px 0; }
/* The ring: a call in flight is the only thing on this console that is still happening. */
.ringing { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--gold); animation: ring 1.1s ease-out infinite; vertical-align: 1px; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(161,98,7,.5) } 100% { box-shadow: 0 0 0 9px rgba(161,98,7,0) } }

/* ===== MOBILE (phone) — drawer nav. PC/tablet layout untouched. ===== */
/* hidden by default; only shown inside the phone media query below */
.mtop, .mdrawer, .mbackdrop { display: none; }
@media (max-width: 768px){
  /* collapse the desktop sidebar: phone uses the top-right 更多 drawer instead */
  .shell { grid-template-columns: 1fr !important; }
  .rail { display: none !important; }
  .main { padding: 0 14px 40px !important; max-width: 100% !important; }
  .masthead { padding: 16px 0 10px; }
  .masthead h1 { font-size: 23px; }
  body.nav-open { overflow: hidden; }

  .mtop {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 40;
    background: var(--paper-2); border-bottom: 1px solid var(--line);
    margin: 0 -14px 14px; padding: 11px 14px; }
  .mtop .mbrand { display: block; line-height: 0; }
  .mtop .mbrand img { display: block; height: 26px; width: auto; }
  .mtop .mtools { display: flex; align-items: center; gap: 8px; }
  /* 手机上模式开关放进顶栏（masthead 里的那枚隐藏，避免窄屏挤爆标题行） */
  .masthead .modesw { display: none; }
  .mmode {
    border: 1px solid var(--line-2); background: var(--paper); color: var(--pine);
    border-radius: 9px; padding: 7px 11px; font-size: 12.5px; font-weight: 600;
    cursor: pointer; white-space: nowrap; font-family: inherit; }
  .mmore {
    border: 1px solid var(--pine); background: var(--pine); color: #fff;
    border-radius: 9px; padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer; }

  .mbackdrop {
    display: block; position: fixed; inset: 0; background: rgba(10,30,22,.45);
    opacity: 0; pointer-events: none; transition: opacity .22s ease; z-index: 50; }
  .mbackdrop.open { opacity: 1; pointer-events: auto; }

  .mdrawer {
    display: block; position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh;
    width: 82%; max-width: 330px; z-index: 60;
    background: var(--paper-2); border-left: 1px solid var(--line);
    box-shadow: -10px 0 34px rgba(0,0,0,.20);
    transform: translateX(100%); transition: transform .26s ease;
    overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 30px; }
  .mdrawer.open { transform: translateX(0); }
  .md-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .md-head .brand { line-height: 0; }
  .md-head .brand img { display: block; height: 30px; width: auto; }
  .mclose { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 2px 6px; }
  .md-info { display: block; border: 1px solid var(--line); border-radius: 9px;
    background: var(--card); padding: 10px 11px; margin-bottom: 8px; }
  .md-info b { display: block; font-family: var(--serif); font-size: 14px; color: var(--ink); }
  .md-info i { display: block; font-style: normal; font-family: var(--mono); font-size: 10px;
    color: var(--sienna); margin-top: 3px; letter-spacing: .03em; }
  .mdrawer .grp { font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted); margin: 16px 8px 5px; }
  .md-link { display: flex; align-items: center; color: var(--ink-2);
    padding: 12px 12px; border-bottom: 1px solid var(--line);
    font-size: 15px; font-weight: 500; }
  .md-link:active { background: rgba(22,122,89,.08); }
  .md-link.on { background: var(--pine); color: #fff; border-bottom-color: var(--pine); }
  .md-foot { display: flex; gap: 10px; margin-top: 22px; }
  .md-foot .ghost { flex: 1; }
}

/* ============================================================
   V3 design 稿组件（工作台首页 / 老板简单模式 / modal）
   米白底 + 深绿主色；全部新类名，不与旧页面类冲突。
   ============================================================ */
.sectiongap { margin-top: 26px; }
.mini { font-size: 12px; }
button.primary { background: var(--sienna); border-color: var(--sienna); color: #fff; }
button.primary:hover { background: var(--pine); border-color: var(--pine); }
button.text { border: 0; background: transparent; color: var(--sienna); padding: 5px 6px; font-size: 13px; }
button.text:hover { color: var(--pine); text-decoration: underline; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  background: #e7f2ea; color: var(--pine); border: 1px solid var(--line-2); white-space: nowrap; }
.tag.gray { background: #eef1ee; color: var(--ink-2); border-color: var(--line); }
.tag.orange { background: #fdf3e3; color: var(--gold); border-color: #ecd9b4; }
.notice { background: #eef6f0; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 12px 16px; font-size: 13px; color: var(--ink-2); margin-top: 16px; }
.bubble { background: #f0f7f2; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 14px 16px; font-size: 13px; }
.bubble p { margin: 6px 0; }
.bubble small { color: var(--muted); }

/* ---- 主推广区 hero（深绿） ----
   布局用 flex（文字列 + 装饰图列），不是绝对定位：装饰图再也不会压住标题/按钮。 */
.hero { display: flex; align-items: center; gap: 22px; overflow: hidden; border-radius: 18px;
  padding: 30px 30px 34px 32px;
  background: linear-gradient(135deg, #174c3c 0%, #167a59 62%, #1a8a64 100%); color: #eaf4ee; }
.hero-copy { flex: 1 1 auto; min-width: 0; }
.hero .tag { background: rgba(255,255,255,.14); color: var(--accent); border-color: rgba(255,255,255,.22); }
.hero h2 { font-size: 24px; line-height: 1.34; margin: 0; color: #fff; }
.hero p { margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: rgba(235,246,240,.86); }
.hero b { color: #fff; }
button.ghosthero { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.34); }
button.ghosthero:hover { background: rgba(255,255,255,.20); border-color: #fff; }
.heroart { flex: 0 0 auto; display: flex; gap: 10px; align-items: flex-end;
  pointer-events: none; opacity: .92; }
.heroart .sheet { width: 100px; height: 70px; border-radius: 10px; background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22); padding: 9px 11px; font-size: 11px; color: rgba(255,255,255,.85); }
.heroart .sheet.second { transform: rotate(3deg) translateY(-8px); background: rgba(213,237,153,.16); border-color: rgba(213,237,153,.4); }
.heroart .bars { height: 7px; border-radius: 4px; background: rgba(255,255,255,.26); margin-top: 8px; }
.heroart .sheet.second .bars { background: rgba(213,237,153,.5); }
/* 窄一些时只留一张装饰卡（保证文案列宽度），再窄就整个隐藏 */
@media (max-width: 1500px){ .heroart .sheet.second { display: none; } }
@media (max-width: 1180px){ .heroart { display: none; } }

/* ---- 今日待办 task 行 ---- */
.task { display: flex; align-items: center; gap: 13px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--sienna); box-shadow: 0 0 0 4px #e7f2ea; }
.task .tbody { flex: 1; min-width: 0; }
.task .tbody h3 { margin: 0; font-size: 14.5px; }
.task .tbody p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.task .tag { flex: none; }

/* ---- 四类事项卡 ---- */
button.taskcard { display: block; text-align: left; cursor: pointer; padding: 18px 18px 15px; white-space: normal; }
button.taskcard:hover { border-color: var(--sienna); transform: translateY(-1px); }
button.taskcard small { color: var(--muted); font-size: 12px; }
button.taskcard .tnum { font-size: 34px; font-weight: 700; color: var(--pine); line-height: 1.15; margin: 6px 0 2px; font-family: var(--sans); }
button.taskcard .tlink { font-size: 12px; color: var(--sienna); }

/* ---- 入口磁贴 ---- */
button.tile { display: block; text-align: left; cursor: pointer; padding: 20px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 15px; color: var(--ink);
  box-shadow: var(--shadow); white-space: normal; }
button.tile:hover { background: var(--card); border-color: var(--sienna); transform: translateY(-1px); }
button.tile .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: #e7f2ea; color: var(--pine); font-size: 18px; margin-bottom: 12px; }
button.tile h3 { margin: 0; font-size: 15px; color: var(--ink); }
button.tile p { white-space: normal; }
button.tile p { margin: 5px 0 0; }

/* ---- 素材卡 ---- */
.mcard { padding: 0; overflow: hidden; }
.mcover { height: 108px; background-size: cover; background-position: center; background-color: #e9f1ea;
  display: grid; place-items: center; color: var(--pine); font-size: 26px; font-weight: 700; }
.mcover.doc { background: #eef4ef; }
.mcard h3 { margin: 12px 14px 2px; font-size: 13.5px; }
.mcard p { margin: 0 14px 14px; }

/* ---- 步骤条 / 勾选 / 表格 ---- */
.steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.step { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff;
  color: var(--muted); font-size: 13px; cursor: pointer; }
.step.done { background: var(--pine); border-color: var(--pine); color: #fff; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; }
.checks label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.tablewrap { overflow-x: auto; margin-top: 12px; }
.tablewrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tablewrap th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tablewrap td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* ---- modal ---- */
.overlay { position: fixed; inset: 0; background: rgba(23,44,43,.42); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 22px; z-index: 60; }
.modal { width: min(560px, 100%); max-height: 86vh; overflow: auto; background: var(--card);
  border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); }
.modal.wide { width: min(860px, 100%); }
.modal .mrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 8px; }
.titem { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; margin-top: 9px; background: #fbfdfb; }
.titem b { font-size: 13.5px; }
.titem p { margin: 3px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.titem small { font-size: 11px; }

/* ---- 选择产品类：居中弹窗（替代侧栏里平铺 41 项的长列表） ---- */
.indgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px;
  max-height: 62vh; overflow-y: auto; padding: 2px 4px 4px 2px; margin-top: 12px; }
button.ind-opt { display: block; width: 100%; text-align: left; white-space: normal;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; color: var(--ink); box-shadow: none; }
button.ind-opt:hover { background: #eef6f0; border-color: var(--sienna); }
button.ind-opt.on { background: #e7f2ea; border-color: var(--sienna); }
button.ind-opt:disabled { opacity: .55; cursor: default; }
button.ind-opt b { display: block; font-size: 14px; font-weight: 600; }
button.ind-opt i { display: block; margin-top: 3px; font-style: normal; font-size: 11.5px;
  color: var(--muted); font-family: var(--mono); }
.np-ind-mid { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px; padding: 9px 11px; background: #eef6f0; border: 1px solid var(--line-2); border-radius: 11px; }
.np-ind-mid b { display: block; font-size: 13px; color: var(--ink); }
.np-ind-mid > div { min-width: 0; }
.np-ind-mid span { display: block; font-size: 11px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.np-ind-mid button { flex: 0 0 auto; }
.modal.wide { width: min(920px, 100%); }
