:root {
  --navy: #0b1f3a;
  --teal: #1b6b6b;
  --amber: #c46b1a;
  --red: #a32d2d;
  --green: #2e6b3f;
  --ink: #1a1a1a;
  --muted: #5a6470;
  --line: #d5dbe0;
  --pale: #f4f6f8;
  --white: #fff;
  --font: "PingFang TC", "Noto Sans TC", "Hiragino Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: var(--font); color: var(--ink); background: var(--pale); }
body { display: flex; flex-direction: column; }
a { color: var(--teal); }
.banner {
  background: var(--amber);
  color: var(--white);
  font-size: 13px;
  padding: 8px 20px;
  font-weight: 600;
}
header.app {
  background: var(--navy);
  color: var(--white);
  padding: 16px 20px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
header.app h1 { margin: 0; font-size: 22px; }
header.app .sub { color: #a8d0d0; font-size: 13px; margin-top: 4px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
select, button, input[type="text"] {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid #3a536e;
}
select, input[type="text"] { background: #16304f; color: var(--white); min-width: 220px; }
button { background: var(--teal); color: var(--white); border: 0; cursor: pointer; font-weight: 600; }
button.ghost { background: transparent; border: 1px solid #6a849c; }
button.danger { background: var(--red); }
nav.stages {
  display: flex;
  background: #132a48;
  padding: 0 12px;
  overflow-x: auto;
}
nav.stages button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #c5d3df;
  padding: 12px 14px;
}
nav.stages button.active { color: var(--white); border-bottom-color: var(--teal); }
main { padding: 18px 20px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 960px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  select { min-width: 0; width: 100%; }
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}
.card h2 { margin: 0 0 10px; font-size: 16px; }
.card h3 { margin: 12px 0 8px; font-size: 14px; color: var(--navy); }
.watch {
  border-left: 5px solid var(--red);
  background: #fff6f4;
}
.watch h2 { color: var(--red); }
ul.tight { margin: 0; padding-left: 18px; }
ul.tight li { margin: 4px 0; font-size: 14px; line-height: 1.45; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td { border: 1px solid var(--line); padding: 7px 8px; vertical-align: top; text-align: left; }
th { background: var(--navy); color: var(--white); font-weight: 600; }
tr:nth-child(even) td { background: var(--pale); }
.tag { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 99px; background: var(--pale); color: var(--muted); }
.tag.draft { background: #f3e6d4; color: var(--amber); }
.muted { color: var(--muted); font-size: 13px; }
.joint { margin-bottom: 16px; }
.kpis { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.kpi { background: var(--pale); border: 1px solid var(--line); padding: 8px 10px; border-radius: 4px; min-width: 120px; }
.kpi b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
dialog { border: 1px solid var(--line); border-radius: 8px; padding: 0; max-width: 560px; width: calc(100% - 24px); }
dialog form { padding: 16px; display: grid; gap: 8px; }
dialog label { font-size: 13px; font-weight: 600; }
dialog menu { display: flex; gap: 8px; justify-content: flex-end; margin: 8px 0 0; }
dialog button { color: var(--white); }
dialog input, dialog textarea {
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
}
footer.site { padding: 12px 20px 24px; color: var(--muted); font-size: 12px; }
code { font-size: 12px; background: var(--pale); padding: 1px 4px; }
.hidden { display: none !important; }
