/* Lingo Bear 管理后台 — 样式 */
:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --ink: #2b2620;
  --muted: #8a8073;
  --line: #e5dccb;
  --accent: #e8823a;
  --accent-soft: #fdeede;
  --green: #2e7d4f;
  --green-soft: #e2f2e7;
  --red: #b3372e;
  --red-soft: #fbe7e4;
  --amber: #9a6b12;
  --amber-soft: #fdf3d7;
  --blue: #2b5f8a;
  --blue-soft: #e3eef7;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px; line-height: 1.55;
}
header {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 14px 20px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
header .logo { font-size: 22px; }
header h1 { font-size: 19px; margin: 0; }
header .sub { color: var(--muted); font-size: 12.5px; }
header .spacer { flex: 1; }
#api-status { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); }
#api-status.ok { background: var(--green-soft); color: var(--green); }
#api-status.bad { background: var(--red-soft); color: var(--red); }
nav {
  display: flex; gap: 6px; padding: 12px 20px 0; flex-wrap: wrap;
}
nav button {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
nav button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
nav button .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-left: 4px; vertical-align: middle;
}
main { padding: 16px 20px 60px; max-width: 1180px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; }
h2 { font-size: 18px; margin: 4px 0 4px; }
.page .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.card .num { font-size: 30px; font-weight: 700; line-height: 1.1; }
.card .label { color: var(--muted); font-size: 13px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.panel h3 { margin: 0 0 10px; font-size: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; background: var(--blue-soft); color: var(--blue); white-space: nowrap;
}
.badge.open { background: var(--blue-soft); color: var(--blue); }
.badge.claimed, .badge.in_progress { background: var(--amber-soft); color: var(--amber); }
.badge.in_review { background: #efe6f7; color: #6b3fa0; }
.badge.passed { background: var(--green-soft); color: var(--green); }
.badge.blocked { background: var(--red-soft); color: var(--red); }
.badge.enabled { background: var(--green-soft); color: var(--green); }
.badge.paused { background: var(--red-soft); color: var(--red); }
.badge.locked { background: var(--ink); color: #fff; }
button.btn, input[type=submit] {
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
button.btn.ghost { background: transparent; color: var(--ink); }
button.btn.danger { background: var(--red); border-color: var(--red); }
button.btn.warn { background: var(--amber); border-color: var(--amber); }
button.btn:disabled { opacity: .45; cursor: not-allowed; }
button.btn.small { padding: 4px 10px; font-size: 13px; }
input[type=text], input[type=date], input[type=number], select, textarea {
  font: inherit; font-size: 14px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
form.inline > div { flex: 1; min-width: 160px; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; }
.kanban .col { background: #efe9dc; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.kanban .col h4 { margin: 0 0 8px; font-size: 13.5px; }
.task {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px; margin-bottom: 8px; cursor: pointer; font-size: 13.5px;
}
.task:hover { border-color: var(--accent); }
.task .t { font-weight: 600; }
.task .m { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; display: inline-block; width: 52px; height: 28px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0; background: #c9c0ae;
  border-radius: 999px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(24px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.worker-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.worker-row .who { flex: 1; min-width: 220px; }
.worker-row .who .name { font-weight: 700; font-size: 16px; }
.worker-row .who .email { color: var(--muted); font-size: 13px; }
.notice {
  background: var(--amber-soft); border: 1px solid #ecd9a8; color: #6d4c05;
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 14px;
}
.notice.green { background: var(--green-soft); border-color: #bcdcc4; color: var(--green); }
.error { color: var(--red); font-size: 13.5px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius); padding: 20px;
  max-width: 560px; width: 100%; max-height: 85vh; overflow: auto;
}
.modal h3 { margin-top: 0; }
footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 20px; }
@media (max-width: 700px) {
  .kanban { grid-template-columns: repeat(6, 220px); }
}
