:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #52606d;
  --line: #e4e7eb;
  --blue: #1565c0;
  --green: #2e7d32;
  --red: #c62828;
  --bg: #eef2f5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.5 "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  background: #0f3d75;
  color: white;
}

.top h1 { margin: 0; font-size: 22px; }
.top p { margin: 4px 0 0; color: #d6e4f5; }

.pill {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,.14);
  white-space: nowrap;
}

.pill.ok { background: #2e7d32; }
.pill.bad { background: #b45309; }

.banner {
  margin: 16px auto 0;
  max-width: 1080px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
}

h2 { margin: 0 0 12px; font-size: 16px; }

.field, .grid label, .check {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.field input, select, .grid input {
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: white;
}

.phone-field { max-width: 240px; margin-top: 10px; }

.check { flex-direction: row; align-items: center; margin: 8px 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.date-line { display: flex; gap: 6px; align-items: center; }
.date-line select { flex: 1; }
.date-line em { font-style: normal; color: var(--blue); white-space: nowrap; }

.release { min-height: 1.4em; color: #e65100; font-weight: 700; }
.release button {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.priority { margin: 8px 0 12px; }
.priority-title strong { color: var(--red); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.checks label { display: flex; gap: 4px; align-items: center; color: var(--ink); }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.row.spread { justify-content: space-between; margin-top: 0; }

button {
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
  background: #455a64;
  color: white;
}

button.primary { background: var(--blue); }
button.danger { background: var(--red); }
button.ghost { background: #eceff1; color: #37474f; }
button:disabled { opacity: .45; cursor: default; }
button.linkish {
  display: block;
  margin-top: 6px;
  padding: 0;
  background: transparent;
  color: var(--red);
  font-weight: 700;
}

.tag {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eceff1;
  color: #546e7a;
}
.tag.on { background: #e8f5e9; color: var(--green); }
.tag.off { background: #ffebee; color: var(--red); }

.status { margin: 10px 0 0; color: var(--muted); }

.log {
  height: 320px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1b2430;
  color: #d7e3f4;
  font: 12px/1.55 Consolas, "Courier New", monospace;
}

.log div.success { color: #9ccc9c; }
.log div.warning { color: #ffd54f; }
.log div.error { color: #ef9a9a; }
.log div.running { color: #ffcc80; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 8px 0; border-top: 1px solid var(--line); }
.history .empty { color: var(--muted); border: 0; }

.dialog {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 32, .45);
}
.dialog-card {
  width: min(420px, calc(100% - 32px));
  background: white;
  border-radius: 10px;
  padding: 18px;
}
.dialog-card h3 { margin: 0 0 8px; }
.dialog-card pre { white-space: pre-wrap; font: inherit; margin: 0 0 14px; }
.hidden { display: none; }

@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
}
