:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --text: #17212b;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --accent: #0f8b8d;
  --accent-strong: #0b6b6d;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

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

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 32px auto;
}

.topbar,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

h1,
h2,
p {
  margin: 0;
}

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

h2 {
  font-size: 18px;
}

p {
  margin-top: 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.actions,
.panelHead,
.inlineControls {
  display: flex;
  align-items: center;
  gap: 10px;
}

input {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
}

input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(15, 139, 141, 0.16);
}

button {
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

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

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

button.secondary {
  background: #ffffff;
  color: var(--accent);
}

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

.panelHead {
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.formRow,
.pointsForm {
  padding: 16px 18px;
}

.formRow label,
.pointsForm label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inlineControls input {
  flex: 1;
  min-width: 0;
}

.resultWrap {
  border-top: 1px solid var(--line);
}

.notice {
  margin: 0 18px 16px;
  border: 1px solid #b7dfd3;
  border-radius: 6px;
  background: #effaf6;
  color: #155e4b;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
}

.notice.errorNotice {
  border-color: #f4b8b2;
  background: #fff1f0;
  color: var(--danger);
}

.userCard {
  padding: 18px;
}

.detailGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px;
  overflow: hidden;
}

.detailRow {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.detailRow span,
.detailRow strong {
  padding: 10px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detailRow span {
  background: #eef3f8;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detailRow strong {
  font-size: 13px;
  font-weight: 600;
}

.pointsForm {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.empty,
.error {
  padding: 18px;
}

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    width: 100%;
  }

  .inlineControls,
  .detailGrid {
    grid-template-columns: 1fr;
  }

  .inlineControls {
    align-items: stretch;
    flex-direction: column;
  }

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

  button {
    width: 100%;
  }
}
