:root {
  color-scheme: light;
  --bg: #edf1f5;
  --ink: #19212a;
  --muted: #617083;
  --line: #d4dbe4;
  --surface: #ffffff;
  --field: #f7f9fb;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --danger: #b42318;
  --ok: #176b3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #b7ccc8;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent-strong);
  background: #eef8f5;
  font-size: 13px;
  font-weight: 650;
}

.workspace {
  width: min(1080px, calc(100vw - 32px));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.tool,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.tool {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
}

input[type="file"] {
  background: #fff;
}

button {
  align-self: end;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.panel {
  display: grid;
  gap: 16px;
}

h2 {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}

.status {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: var(--field);
  font-size: 14px;
  line-height: 1.45;
}

.status.ok {
  color: var(--ok);
  border-color: #b9d9c5;
  background: #f0faf4;
}

.status.error {
  color: var(--danger);
  border-color: #f0b8b2;
  background: #fff5f5;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.metrics div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fbfcfe;
}

dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 0;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
}

.business-info {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.business-info p,
.rules span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.rules {
  display: grid;
  gap: 7px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.rules strong {
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    padding: 20px 18px 16px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .tool {
    grid-template-columns: 1fr;
  }

  .badge {
    display: none;
  }
}
