:root {
  --bg: #e8eaee;
  --paper: #f4f5f7;
  --ink: #17191d;
  --muted: #5f6670;
  --line: #cfd3da;
  --accent: #b42318;
  --accent-soft: #f3e0dd;
  --ok: #1f6b4a;
  --ok-soft: #dff0e7;
  --warn: #8a5a00;
  --warn-soft: #f6ebcf;
  --shadow: 0 1px 0 rgba(23, 25, 29, 0.04);
  --radius: 10px;
  --font: "Segoe UI", "PT Root UI", "Manrope", "Arial", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 420px at 8% -8%, #f0f3f8 0%, transparent 55%),
    linear-gradient(180deg, #eef0f4 0%, var(--bg) 45%, #e3e6eb 100%);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.top__brand a {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.top__domain {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
}
.top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: flex-end;
}
.top__nav a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.top__nav a:hover,
.top__nav a.is-active {
  color: var(--ink);
  text-decoration: none;
}
.top__user {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.92rem;
}
.top__user strong { color: var(--ink); font-weight: 600; }

.main { min-height: 50vh; }

.foot {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero {
  padding: 8px 0 8px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36ch;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-top: 22px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
}

.hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.hint a { font-weight: 600; }

.form {
  display: grid;
  gap: 14px;
}
.form--inline {
  grid-template-columns: 1fr auto;
  align-items: end;
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #b8bec8;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  font-size: 1rem;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(180, 35, 24, 0.25);
  border-color: #a79f90;
}
.field textarea { min-height: 110px; resize: vertical; }
.field .mono { font-family: var(--mono); font-size: 0.95rem; }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
}
.btn:hover { filter: brightness(1.08); }
.btn--accent { background: var(--accent); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--danger { background: var(--accent); }
.btn--sm { padding: 7px 11px; font-size: 0.88rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.flash {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 500;
}
.flash--ok { background: var(--ok-soft); color: var(--ok); }
.flash--err { background: var(--accent-soft); color: var(--accent); }
.flash--warn { background: var(--warn-soft); color: var(--warn); }

.result {
  margin-top: 22px;
}
.result__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.result__ids {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.92rem;
}
.chip code {
  font-family: var(--mono);
  font-size: 0.88rem;
}
.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.report {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.report__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.report__meta strong { color: var(--ink); font-weight: 600; }
.report__comment {
  white-space: pre-wrap;
  line-height: 1.45;
}
.report__actions {
  margin-top: 12px;
}

.empty {
  padding: 28px 8px;
  color: var(--muted);
  text-align: center;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
td code { font-family: var(--mono); font-size: 0.86rem; }

.tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 18px;
}
.tabs a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}
.tabs a.is-active {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}

.login-wrap {
  max-width: 420px;
  margin: 24px auto 0;
}

@media (max-width: 720px) {
  .page { width: min(100% - 24px, 920px); padding-top: 18px; }
  .top { grid-template-columns: 1fr; }
  .top__nav { justify-content: flex-start; }
  .form--inline { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
}
