:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #64748b;
  --line: #d9e1ea;
  --primary: #1267b2;
  --primary-dark: #0b4f8b;
  --ok: #157347;
  --warn: #9a5b00;
  --bad: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
}

.tool-panel,
.result,
.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.tool-panel {
  padding: 22px;
}

.update-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 103, 178, 0.14);
}

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

button:hover {
  background: var(--primary-dark);
}

button:disabled {
  background: #94a3b8;
  cursor: wait;
}

button.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

button.ghost:hover {
  background: #f8fafc;
}

.status {
  margin-top: 14px;
  min-height: 22px;
  font-size: 14px;
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--bad);
}

.result {
  margin-top: 18px;
  overflow: hidden;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.result-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.pill.ok {
  background: #dcfce7;
  color: var(--ok);
}

.pill.warn {
  background: #fef3c7;
  color: var(--warn);
}

.pill.bad {
  background: #fee4e2;
  color: var(--bad);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

td code {
  white-space: nowrap;
}

.login-view {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(244, 246, 248, 0.96);
}

.login-panel {
  width: min(380px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
}

.hidden {
  display: none !important;
}

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

  h1 {
    font-size: 20px;
  }

  main {
    width: min(100% - 20px, 1180px);
    margin-top: 16px;
  }

  .update-form {
    grid-template-columns: 1fr;
  }

  .result-head {
    display: grid;
  }

  .summary {
    justify-content: flex-start;
  }
}
