:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #64748b;
  --line: #d9e1ea;
  --primary: #1267b2;
  --primary-dark: #0b4f8b;
  --ok: #047857;
  --bad: #b42318;
  --bad-bg: #fee4e2;
  --ok-bg: #d1fadf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

header {
  min-height: 96px;
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 22px;
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 36px auto;
  display: grid;
  gap: 24px;
}

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

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

.panel {
  padding: 24px;
}

.change-form {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 16px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
  font-weight: 650;
  color: var(--text);
  background: #fbfdff;
}

input:focus {
  outline: 3px solid rgba(18, 103, 178, 0.16);
  border-color: var(--primary);
}

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

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

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

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

.ghost:hover {
  background: #eef3f8;
}

.hidden {
  display: none !important;
}

.status {
  margin-top: 16px;
  font-weight: 700;
}

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

.loading {
  color: var(--primary);
}

.success,
.ok {
  color: var(--ok);
}

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

.result {
  padding: 24px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.badge {
  min-width: 76px;
  text-align: center;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 900;
  color: var(--muted);
  background: #eef3f8;
}

.ok-bg {
  background: var(--ok-bg);
  color: var(--ok);
}

.bad-bg {
  background: var(--bad-bg);
  color: var(--bad);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.summary > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #fbfdff;
  min-width: 0;
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.summary strong {
  display: block;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

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

th {
  background: #eef3f8;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  overflow-wrap: anywhere;
}

details {
  margin-top: 18px;
  border-radius: 6px;
  overflow: hidden;
}

summary {
  cursor: pointer;
  background: #101828;
  color: white;
  padding: 12px 14px;
  font-weight: 850;
}

pre {
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
}

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

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

@media (max-width: 760px) {
  header {
    padding: 22px 20px;
    align-items: flex-start;
  }

  h1 {
    font-size: 24px;
  }

  .change-form,
  .summary {
    grid-template-columns: 1fr;
  }
}
