:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #18202a;
  --muted: #667085;
  --line: #d9e0e8;
  --accent: #1677ff;
  --accent-dark: #0f5ec8;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 12px 28px rgba(24, 32, 42, 0.06);
}

.auth-panel {
  width: min(420px, 100%);
  margin: 10vh auto 0;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 28px;
}

h2 {
  margin: 24px 0 14px;
  font-size: 18px;
}

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

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

.form label {
  display: grid;
  gap: 7px;
}

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

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  font: inherit;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(22, 119, 255, 0.18);
  border-color: var(--accent);
}

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

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

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

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

.ghost:hover {
  background: #eef3f8;
}

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

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2 {
  margin-top: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.status {
  margin: 0;
}

.error {
  margin: 12px 0 0;
  color: var(--danger);
}

@media (max-width: 840px) {
  .selectors,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-title,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }
}
