:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #66736d;
  --line: #dce3df;
  --surface: #ffffff;
  --canvas: #f4f7f5;
  --green: #087a57;
  --green-dark: #065d43;
  --red: #b33b32;
  --amber: #a56613;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.topbar { height: 62px; display: flex; align-items: center; gap: 30px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; background: var(--green); color: white; font-weight: 800; }
.brand-mark.small { width: 32px; height: 32px; border-radius: 6px; font-size: 12px; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { color: #3f4c46; text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--green); }
.quiet-button, .text-link, .danger-link { border: 0; background: transparent; padding: 6px 8px; }
.quiet-button, .text-link { color: var(--green); }
.danger-link { color: var(--red); }
.page-shell { max-width: 1440px; margin: 0 auto; padding: 24px 28px 60px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.metrics div { min-height: 96px; padding: 20px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.metrics div:last-child { border-right: 0; }
.metrics span, .eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.metrics strong { font-size: 30px; line-height: 1; }
.metrics .good, .good { color: var(--green); }
.new-code { margin-top: 18px; padding: 18px 20px; background: #eaf7f1; border: 1px solid #9bcfba; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.new-code div { display: flex; align-items: center; gap: 18px; }
.new-code span { color: var(--green-dark); font-weight: 700; }
.new-code code { font-size: 19px; font-weight: 800; }
.copy-button { border: 1px solid var(--green); color: var(--green); background: white; padding: 9px 14px; border-radius: 5px; }
.workspace { margin-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 12px; }
.section-heading h2 { margin: 3px 0 0; font-size: 21px; }
.section-note { color: var(--muted); font-size: 12px; }
.inline-form { display: flex; align-items: end; gap: 10px; }
.inline-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.inline-form label.wide { width: 230px; }
.inline-form small { font-size: 10px; }
input, textarea { width: 100%; border: 1px solid #cbd5d0; border-radius: 5px; background: white; color: var(--ink); padding: 9px 10px; outline: none; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(8, 122, 87, .12); }
input[type="number"] { width: 94px; }
.primary-button { border: 0; border-radius: 5px; color: white; background: var(--green); padding: 11px 18px; font-weight: 700; }
.primary-button:hover { background: var(--green-dark); }
.primary-button.compact { padding: 9px 14px; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th { color: var(--muted); background: #f8faf9; font-size: 12px; text-align: left; font-weight: 700; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e7ece9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfb; }
td small { display: block; margin-top: 3px; color: var(--muted); }
code, .mono { font-family: Consolas, "SFMono-Regular", monospace; letter-spacing: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.bad { color: var(--red); }
.status.warn { color: var(--amber); }
.status.muted { color: #7b8781; }
.empty { padding: 32px !important; color: var(--muted); text-align: center; }
.announcement-heading { align-items: start; }
.announcement-form { width: min(680px, 68%); display: grid; grid-template-columns: 220px 1fr auto; gap: 10px; align-items: start; }
.announcement-form textarea { resize: vertical; min-height: 72px; }
.announcement-list { border: 1px solid var(--line); background: var(--surface); }
.announcement-list article { display: grid; grid-template-columns: 220px 1fr auto; gap: 24px; padding: 18px; border-bottom: 1px solid var(--line); }
.announcement-list article:last-child { border-bottom: 0; }
.announcement-list h3 { margin: 0 0 6px; font-size: 15px; }
.announcement-list time { color: var(--muted); font-size: 12px; }
.announcement-list p { margin: 0; white-space: pre-wrap; line-height: 1.65; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: #eef3f0; }
.login-shell { width: min(780px, calc(100vw - 32px)); display: grid; grid-template-columns: 1fr 1fr; background: white; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(22, 45, 35, .12); }
.login-brand { padding: 52px 44px; background: #17251f; color: white; display: flex; flex-direction: column; justify-content: center; }
.login-brand h1 { margin: 24px 0 8px; font-size: 25px; }
.login-brand p { margin: 0; color: #aebdb6; }
.login-form { padding: 52px 44px; display: grid; gap: 10px; align-content: center; }
.login-form label { color: var(--muted); font-weight: 600; }
.login-form input { margin-bottom: 8px; }
.form-error { color: var(--red); padding: 8px 0; }
@media (max-width: 900px) {
  .topbar nav { display: none; }
  .page-shell { padding: 16px 12px 40px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div:nth-child(2) { border-right: 0; }
  .metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-heading, .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form label.wide, .announcement-form { width: 100%; }
  .announcement-form { grid-template-columns: 1fr; }
  .announcement-list article { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 620px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { padding: 28px; }
  .login-form { padding: 30px 28px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics div { border-right: 0; border-bottom: 1px solid var(--line); }
  .new-code, .new-code div { align-items: stretch; flex-direction: column; }
}
