

:root {
  color-scheme: dark;
  --base: #0b1018;
  --rail: #101620;
  --surface: #141c28;
  --raised: #1a2433;
  --border: #2a394c;
  --ink: #f0f4fb;
  --muted: #a0aec1;
  --accent: #7af0bf;
  --accent-ink: #0e2b24;
  --danger: #ff9c9e;
  font: 14px/1.58 "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--base);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, p { margin: 0 0 12px; }
h1 { font-size: clamp(28px, 4vw, 43px); line-height: 1.17; letter-spacing: -.05em; }
h2 { font-size: 17px; line-height: 1.4; }
h3 { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 13px; min-height: 37px;
  border: 1px solid transparent; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-align: center; text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.13); }
button:disabled { opacity: .55; cursor: wait; }
button.soft, .button.soft { border-color: var(--border); background: var(--raised); color: var(--ink); }
button.danger { border-color: #663b48; color: var(--danger); background: #321f2c; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
small, .muted { color: var(--muted); }

.layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; overflow: auto; overscroll-behavior: contain;
  padding: 21px 13px; border-right: 1px solid var(--border);
  background: var(--rail);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 7px 21px; font: 800 17px/1.05 system-ui, sans-serif; letter-spacing: .12em; }
.brand small { font-size: 10px; letter-spacing: .12em; line-height: 1.6; }
.mark {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: 9px; color: #102620; background: var(--accent);
  font: 850 22px/1 system-ui, sans-serif; letter-spacing: -.09em;
}
.rail nav p { color: #a3b2c5; font-size: 11px; letter-spacing: .11em; margin: 16px 8px 5px; }
.rail nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: 1px solid transparent; border-radius: 7px;
  color: #d7e0ee; text-decoration: none; font-size: 13px;
}
.rail nav a:hover { background: #1c2735; }
.rail nav a[aria-current="page"] { border-color: #38644f; background: #1d342e; color: var(--accent); font-weight: 750; }
.navicon { display: inline-flex; justify-content: center; width: 20px; color: #aab9cc; }
.outbound { margin-left: auto; color: #aab9cc; }
#nav-toggle { display: none; }
.main { width: 100%; min-width: 0; max-width: 1536px; margin: 0 auto; padding: 0 clamp(16px, 3.3vw, 53px) 40px; }
.top {
  min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 24px; padding: 10px 0;
}
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb span { margin: 0 5px; }
.breadcrumb b { color: var(--ink); }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 15px;
  padding: clamp(23px, 3.8vw, 44px); margin-bottom: 17px;
  border: 1px solid #395067; border-radius: 15px;
  background: radial-gradient(ellipse at 92% 0%, #1a4940 0%, transparent 56%), #182436;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 35px, #43576b45 35px 36px),
    repeating-linear-gradient(0deg, transparent 0 35px, #43576b45 35px 36px);
  mask-image: linear-gradient(90deg, transparent 16%, black 95%);
}
.hero p { color: #c5d3e2; margin-bottom: 0; }
.hero button { flex: none; }
.intro { margin-bottom: 19px; }
.intro p { color: var(--muted); max-width: 68ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 17px; min-width: 0; }
.panel { margin-bottom: 16px; }
.tile strong { display: block; margin: 7px 0 3px; font: 700 clamp(25px, 3vw, 36px)/1.12 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.kpi { display: flex; justify-content: space-between; gap: 5px; align-items: flex-start; }
.kpi > span { color: var(--accent); }
.metric-label { color: #d3dfef; text-decoration: none; font-weight: 650; }
.metric-label:hover { color: var(--accent); text-decoration: underline; }
.metric-foot { margin: 9px 0 0; color: var(--accent); }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr); gap: 15px; }
.bar, .actions, .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bar { justify-content: space-between; margin-bottom: 13px; }
.bar h2, .bar h3 { margin: 0; }
.filters { margin: 10px 0 14px; }
.filters input, .filters select { max-width: 100%; width: auto; }
.tablebox { overflow: auto; }
table { width: 100%; font-size: 13px; border-collapse: collapse; text-align: left; }
th { color: #b0bdd0; white-space: nowrap; background: #1a2534; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--border); vertical-align: top; }
td { min-width: 68px; max-width: 290px; overflow-wrap: anywhere; }
td:last-child { white-space: nowrap; }
td button { padding: 3px 8px; min-height: 30px; margin-right: 4px; }
td span, .notes { white-space: pre-wrap; }
.empty { padding: 18px 3px; color: var(--muted); margin: 0; }
.tag {
  display: inline-flex; align-items: center;
  background: #1e3736; color: #a5f3d1; border: 1px solid #355b53;
  border-radius: 20px; padding: 2px 9px; font-size: 12px; font-weight: 650;
}
.demo-tag { color: #f9d792; background: #362b1c; border-color: #755f33; }
.focus-list { margin: 0; padding: 0; list-style: none; }
.focus-list li { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; padding: 11px 0; border-top: 1px solid var(--border); }
.focus-list small { display: block; }
.focus-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.work-title { text-decoration: none; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.work-title:hover { color: var(--accent); text-decoration: underline; }
.deadline { font-size: 12px; color: var(--accent); }
.deadline.late { color: #ffc089; }
.workstreams > div { padding: 11px 0; border-top: 1px solid var(--border); }
.workstreams small { display: block; }
.progress-caption { margin-top: 3px; }
progress { width: 100%; height: 8px; accent-color: var(--accent); }
.work-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.work-tab { border: 1px solid var(--border); color: var(--ink); border-radius: 7px; padding: 6px 12px; text-decoration: none; }
.work-tab.active { color: var(--accent); background: #1d342e; border-color: #38644f; font-weight: 750; }
.site-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); margin-bottom: 0; }
.site-card { background: #111925; }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 16px; }
.site-url, .notes { display: block; overflow-wrap: anywhere; }
.notes { margin-top: 10px; color: #d7dfe9; }
.week { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); gap: 6px; overflow: auto; }
.day { display: block; min-height: 90px; text-align: left; background: var(--raised); color: var(--ink); white-space: normal; border-color: var(--border); }
.day[aria-pressed="true"] { border-color: var(--accent); background: #1d342e; }
.day strong, .day small { display: block; }
.day strong { font-size: 16px; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 4px; color: #dce6f5; font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea, .filters input, .filters select {
  background: #101824; color: var(--ink); border: 1px solid #405169; border-radius: 8px; padding: 8px 10px; min-width: 0;
}
.field textarea { resize: vertical; min-height: 94px; }
.formerror { color: var(--danger); min-height: 1.3em; margin: 8px 0; }
.access { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 60% 5%, #214238, transparent 54%), var(--base); }
.access article { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 30px; }
.access .brand { padding: 0 0 18px; }
.access .field { margin-top: 10px; }
.access button { width: 100%; }
.access h1 { font-size: 29px; }
.access p:not(.formerror) { color: var(--muted); }
dialog { background: var(--surface); border: 1px solid #405169; border-radius: 14px; width: min(650px, 94vw); max-height: 88dvh; padding: 22px; color: inherit; }
dialog::backdrop { background: #020712c4; }
#toast { position: fixed; bottom: 20px; right: 20px; max-width: 85vw; background: #244136; border: 1px solid #467563; color: #ecfff6; border-radius: 9px; padding: 11px 16px; z-index: 5; }
#toast:empty { display: none; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 16px; }

@media (max-width: 1060px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .layout, .dashboard-columns { grid-template-columns: 1fr; }
  .rail { height: auto; position: static; padding: 12px 16px; border-bottom: 1px solid var(--border); border-right: 0; }
  .rail .brand { display: inline-flex; padding: 0; }
  #nav-toggle { display: inline-flex; float: right; }
  .rail nav { display: none; padding-top: 7px; }
  #nav-toggle[aria-expanded="true"] + nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .rail nav p, .navicon { display: none; }
  .rail nav a { padding: 6px 8px; }
  .top { margin-bottom: 16px; min-height: 52px; }
  .breadcrumb { display: none; }
  .top > .actions { justify-content: space-between; width: 100%; }
}
@media (max-width: 510px) {
  .hero { display: block; }
  .hero button { margin-top: 12px; }
  .formgrid { grid-template-columns: 1fr; }
  .tile, .panel { padding: 13px; }
  .grid { gap: 7px; }
}
