:root {
  color-scheme: light;
  --navy: #1e3a52;
  --navy-2: #274864;
  --ink: #243040;
  --muted: #6b7785;
  --line: #e3e8ee;
  --paper: #f4f6f8;
  --panel: #ffffff;
  --blue: #2b7de9;
  --blue-ink: #ffffff;
  --green: #7cb342;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.topbar {
  height: 56px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: stretch;
  padding: 0 20px 0 16px;
  gap: 28px;
}

.topbar__logout {
  margin-left: auto;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  padding: 6px 14px;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--navy), inset 0 0 0 6px #fff;
}

.logo-word {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.topbar__sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.35);
}

.topbar__dealer {
  font-size: 14px;
  font-weight: 500;
}

.topbar__nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.nav__item {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 14px;
  padding: 0 14px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.nav__item.is-active,
.nav__item:hover {
  color: #fff;
  background: transparent;
  border-bottom-color: #fff;
}

.main {
  min-height: calc(100vh - 56px);
  padding: 22px 28px 32px;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.view--fill.is-visible {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px - 44px);
}

.page-head h1,
.webseller__bar h1,
h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

h2 {
  margin: 28px 0 8px;
  font-size: 16px;
  font-weight: 650;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.page-head {
  margin-bottom: 16px;
}

.page-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  box-shadow: 0 16px 48px rgba(30, 58, 82, 0.25);
}

dialog::backdrop {
  background: rgba(20, 32, 44, 0.45);
}

dialog .form {
  margin: 0;
  max-width: none;
  border: 0;
}

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.toolbar__count {
  font-size: 18px;
  font-weight: 650;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.tabs__item {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
}

.tabs__item.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.tabs__item b {
  margin-left: 8px;
  font-weight: 650;
}

.grid {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}

.grid th {
  text-align: left;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  padding: 10px 12px;
}

.grid td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.grid tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-block;
  background: #e8f5d6;
  color: #4d7c0f;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 650;
}

.form {
  display: grid;
  gap: 12px;
  max-width: 560px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}

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

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.form__check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

button,
.button--pill {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--blue);
  color: var(--blue-ink);
  cursor: pointer;
  font-size: 14px;
}

.button--pill:disabled {
  opacity: 0.7;
  cursor: default;
}

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

.result {
  margin-top: 16px;
  max-width: 560px;
  padding: 12px;
  background: #172433;
  color: #e8eef5;
  border-radius: 10px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.list li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.webseller__bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.webseller__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

#webseller-frame {
  flex: 1;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

#webseller-frame[hidden] {
  display: none;
}

.auth {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth__card {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}

.auth__card--page {
  margin: 48px auto 28px;
}

.auth__actions {
  display: grid;
  gap: 8px;
}

.auth__choice {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.auth__alt {
  color: var(--blue);
  font-size: 13px;
}

.form-error {
  margin: 0;
  color: #b42318;
  font-size: 13px;
}

.form h2,
#users-panel h2 {
  margin: 0;
}

#users-panel {
  margin-top: 28px;
}

#users-panel .grid,
#admin-app > .grid {
  margin-top: 12px;
}
