:root {
  --bg: #f7f7f4;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #637083;
  --line: #d9dee7;
  --accent: #0f766e;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #17202a;
  color: #fff;
  padding: 24px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 28px;
}

.nav a {
  display: block;
  color: #dbe4ef;
  padding: 10px 0;
}

.main {
  padding: 28px;
}

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

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

.dashboard-panel {
  overflow-x: auto;
}

.panel-section-title {
  border-top: 1px solid var(--line);
  font-size: 18px;
  font-weight: 700;
  margin-top: 20px;
  padding: 18px 8px 6px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

table {
  border-collapse: collapse;
  width: 100%;
}

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

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

label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 10px;
  width: 100%;
}

input[type="checkbox"] {
  width: auto;
}

.field {
  margin-bottom: 14px;
}

.button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  padding: 10px 14px;
}

.button.secondary {
  background: #334155;
}

.button.danger {
  background: var(--danger);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qr-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  height: 96px;
  place-items: center;
  width: 96px;
}

.qr-preview img {
  display: block;
  height: 88px;
  object-fit: contain;
  width: 88px;
}

.recent-scans-table {
  min-width: 720px;
}

.current-logo {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 10px;
}

.current-logo img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 44px;
  object-fit: contain;
  width: 44px;
}

.current-logo span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

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

.type-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.type-option input {
  width: auto;
}

.type-option span {
  color: var(--muted);
  line-height: 1.35;
}

.style-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.style-option input {
  width: auto;
}

.style-sample {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(5, 8px);
}

.style-sample span {
  background: var(--text);
  display: block;
  height: 8px;
  width: 8px;
}

.style-option.rounded .style-sample span {
  border-radius: 3px;
}

.style-option.dots .style-sample span {
  border-radius: 999px;
}

.badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
}

.badge.active {
  background: #dcfce7;
  color: #166534;
}

.badge.paused {
  background: #fee2e2;
  color: #991b1b;
}

.badge.neutral {
  background: #e0f2fe;
  color: #075985;
}

.notice {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 12px;
}

.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login .panel {
  width: min(420px, calc(100vw - 32px));
}

@media (max-width: 800px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .style-options {
    grid-template-columns: 1fr;
  }

  .type-options {
    grid-template-columns: 1fr;
  }
}
