:root {
  color-scheme: light;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d9dee7;
  --text: #1f2937;
  --muted: #667085;
  --brand: #116466;
  --brand-dark: #0b4f51;
  --danger: #b42318;
  --warning: #b54708;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { background: #102a2b; color: #fff; padding: 20px 16px; }
.brand { font-weight: 700; font-size: 20px; margin-bottom: 20px; }
.nav { display: grid; gap: 8px; }
.nav button { width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 10px 12px; color: #d6eeee; background: transparent; }
.nav button.active, .nav button:hover { background: #174345; color: #fff; }
.main { min-width: 0; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.content { padding: 24px; max-width: 1180px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 13px; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: #fff; }
.textarea { min-height: 120px; resize: vertical; }
.btn { border: 0; border-radius: 6px; padding: 10px 14px; background: var(--brand); color: #fff; }
.btn.secondary { background: #e7eef0; color: #163536; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.status { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: #e7eef0; color: #163536; font-size: 12px; }
.status.warning { background: #fff4e5; color: var(--warning); }
.status.danger { background: #fee4e2; color: var(--danger); }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.success { color: var(--brand-dark); }
.list { display: grid; gap: 10px; }
.list.compact { gap: 8px; }
.item { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.attachment-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-title { font-weight: 700; margin-bottom: 6px; }
.file-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.file-label { display: inline-flex; align-items: center; justify-content: center; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: 100%; max-width: 380px; }

@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 3; padding: 12px; }
  .brand { margin-bottom: 10px; font-size: 18px; }
  .nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav button { text-align: center; padding: 9px 6px; }
  .topbar { height: auto; min-height: 56px; padding: 12px 14px; gap: 10px; }
  .content { padding: 14px; }
  .grid.two { grid-template-columns: 1fr; }
}
