/* 火车头 · 销售情报 V2：深灰侧栏 + 森林绿主色 + 暖浅灰内容底 */
:root {
  --side: #1e2329;
  --side-2: #2b323a;
  --side-text: #c9cfd6;
  --green: #2f5e5a;
  --green-2: #3d7a74;
  --green-soft: #e4efec;
  --bg: #f4f2ee;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7178;
  --line: #e3dfd8;
  --amber: #a86a12;
  --amber-soft: #fbf1df;
  --red: #a33a32;
  --red-soft: #f8e5e2;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
a { color: var(--green); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #8fc1b9; outline-offset: 2px;
}
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }
.skip:focus { left: 8px; }
.shell { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: 0 0 232px; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}
body:not(.signed-in) .side, body:not(.signed-in) .mobile-top { display: none; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; margin: 0 6px 22px; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--side-text); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--green); display: grid; place-items: center; }
.app-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.app-nav .group { font-size: 12px; color: #8a929b; margin: 14px 10px 4px; letter-spacing: .08em; }
.app-nav a { color: var(--side-text); text-decoration: none; padding: 9px 12px; border-radius: 10px; display: flex; justify-content: space-between; }
.app-nav a:hover { background: var(--side-2); color: #fff; }
.app-nav a[aria-current="page"] { background: #39424c; color: #fff; }
.app-nav .count { background: var(--green); color: #fff; border-radius: 999px; font-size: 12px; padding: 0 7px; }
.side-foot { border-top: 1px solid #343c45; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.side-foot .ghost { color: var(--side-text); border-color: #4a535d; }
.main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.mobile-top { display: none; }
#view { max-width: 1180px; outline: none; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 18px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 28px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo .what b { display: block; font-weight: 600; }
.todo .what span { color: var(--muted); font-size: 13px; }
.go { white-space: nowrap; font-weight: 600; text-decoration: none; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #eceae5; color: #4b5057; font-size: 12px; white-space: nowrap; }
.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); }
.grade { font-size: 40px; font-weight: 800; color: var(--green); line-height: 1; }
.grade.wait { color: var(--amber); font-size: 26px; }
.circle { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 13px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tabs a { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--text); background: #e9e6e0; }
.tabs a[aria-current="page"] { background: var(--green); color: #fff; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; border-top: 0; }
table.eq th:first-child, table.eq td:first-child { width: 150px; min-width: 130px; }
table.eq th:nth-child(2), table.eq td:nth-child(2) { width: 110px; min-width: 96px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
label.check { flex-direction: row; align-items: center; gap: 6px; }
input, select, textarea { font: inherit; color: var(--text); padding: 8px 10px; border: 1px solid #cfcac2; border-radius: 9px; background: #fff; min-width: 0; }
textarea { min-height: 70px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
button { font: inherit; border-radius: 9px; padding: 8px 16px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; }
button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover { background: var(--green-2); }
button.danger { background: #fff; color: var(--red); border-color: #e0b9b4; }
button.ghost { background: transparent; }
button[disabled] { opacity: .55; cursor: not-allowed; }
form.inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
form.inline label { margin: 0; }
.banner { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--green-soft); color: var(--green); max-width: 1180px; }
.banner.error { background: var(--red-soft); color: var(--red); }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.item .meta { color: var(--muted); font-size: 13px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
details summary { cursor: pointer; color: var(--green); }
.levels { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); padding: 10px 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.login { max-width: 380px; margin: 12vh auto 0; }
@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: fixed; z-index: 5; left: 0; top: 0; transform: translateX(-100%); transition: transform .15s; }
  body.menu-open .side { transform: none; }
  .mobile-top { display: flex; gap: 12px; align-items: center; margin: -12px 0 14px; font-weight: 600; }
  .main { padding: 18px 16px 40px; }
  .grid.two, .split { grid-template-columns: 1fr; }
  .todo li { flex-direction: column; align-items: flex-start; }
}

/* T59: compact human confirmation forms; checkbox width must not inherit text inputs. */
#tender-editor fieldset { min-width: 0; }
#tender-editor legend { padding: 0 .45rem; font-weight: 650; }
#tender-editor label:has(input[type="checkbox"]),
form[data-action="competitor-profile"] label:has(input[type="checkbox"]) {
  display: flex; align-items: center; gap: .55rem;
}
#tender-editor input[type="checkbox"],
form[data-action="competitor-profile"] input[type="checkbox"] {
  width: 1rem; min-height: 1rem; margin: 0; flex: 0 0 auto;
}
