:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #14233b;
  --muted: #64748b;
  --line: #d8e1ee;
  --primary: #1d4f93;
  --primary-dark: #153d73;
  --primary-soft: #eaf2ff;
  --accent: #df2430;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(20, 35, 59, 0.04);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
}
.brand span { overflow-wrap: anywhere; }
.brand-logo {
  display: block;
  width: 76px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}
.topbar nav { display: flex; gap: 14px; }
.page { max-width: 1120px; margin: 0 auto; padding: 20px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(20, 35, 59, 0.04);
}
h1, h2, h3 {
  line-height: 1.25;
  color: var(--text);
  overflow-wrap: anywhere;
}
h1 { font-size: 28px; margin: 0 0 10px; }
h2 { font-size: 20px; margin: 18px 0 10px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: block; font-weight: 600; margin: 10px 0 6px; }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--primary-soft);
  border-color: var(--primary);
}
textarea { min-height: 110px; resize: vertical; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--primary-dark); color: #fff; }
.button.secondary { background: #344054; }
.button.danger { background: var(--danger); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.help-text { color: var(--muted); font-size: 13px; margin-top: 6px; }
.attachment-list { display: grid; gap: 12px; margin-top: 10px; }
.attachment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.attachment-preview {
  width: 132px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--primary-soft);
}
.task-list { display: grid; gap: 14px; margin-top: 16px; }
.task-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}
.task-item h3 { margin-top: 0; font-size: 17px; color: var(--primary-dark); }
.compact-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
}
.compact-form input,
.compact-form select {
  min-height: 34px;
}
@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand { width: 100%; font-size: 16px; }
  .brand-logo { width: 64px; height: 36px; }
  h1 { font-size: 24px; }
  h2 { font-size: 18px; }
  .page { padding: 12px; }
  .grid.two { grid-template-columns: 1fr; }
  .attachment-item { align-items: flex-start; flex-direction: column; }
  .attachment-preview { width: 100%; max-width: 280px; height: auto; aspect-ratio: 3 / 2; }
  .compact-form { min-width: 0; }
  table { display: block; overflow-x: auto; }
}
