:root {
  --red: #DA291C;
  --red-dim: #a81f15;
  --red-ghost: rgba(218, 41, 28, .10);
  --red-glow: rgba(218, 41, 28, .20);
  --bg: #0f0f0f;
  --surface: #161616;
  --surface2: #1e1e1e;
  --border: #2a2a2a;
  --border2: #333333;
  --text: #f0f0f0;
  --text2: #a0a0a0;
  --text3: #606060;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, .12);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, .12);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, .10);
  --purple: #c084fc;
  --purple-dim: rgba(192, 132, 252, .10);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
  --radius: 4px;
  --radius-lg: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  font-size: 14px
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font-family: var(--sans);
  cursor: pointer
}

input,
select,
textarea {
  font-family: var(--sans)
}

.screen {
  display: none
}

.screen.active {
  display: block
}

/* ── Login ── */
#screen-login {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 600px 400px at 50% -80px, rgba(218, 41, 28, .15) 0%, transparent 70%), var(--bg)
}

#screen-login.active {
  display: flex
}

.login-wrap {
  width: 100%;
  max-width: 400px;
  padding: 0 24px
}

.login-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px
}

.login-mark-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.login-mark-icon svg {
  width: 18px;
  height: 18px;
  fill: white
}

.login-mark-text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text2)
}

.login-heading {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 6px
}

.login-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 40px
}

.field {
  margin-bottom: 16px
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px
}

.field-label .required {
  color: var(--red)
}

.field-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s
}

.field-input::placeholder {
  color: var(--text3)
}

.field-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-ghost)
}

.field-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 6px;
  line-height: 1.5
}

.login-error {
  font-size: 12px;
  color: var(--red);
  background: var(--red-ghost);
  border: 1px solid var(--red-glow);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 12px;
  display: none
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed
}

.btn-primary {
  background: var(--red);
  color: #fff
}

.btn-primary:not(:disabled):hover {
  background: var(--red-dim)
}

.btn-block {
  width: 100%;
  justify-content: center
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2)
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text3)
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(218, 41, 28, .3)
}

.btn-danger:hover {
  background: var(--red-ghost)
}

.btn-danger-solid {
  background: var(--red);
  color: #fff;
  border: none
}

.btn-danger-solid:hover {
  background: var(--red-dim)
}

.btn-warning {
  background: transparent;
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, .3)
}

.btn-warning:hover {
  background: var(--amber-dim)
}

.btn-success {
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, .3)
}

.btn-success:hover {
  background: var(--green-dim)
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px
}

/* ── App shell ── */
#screen-app {
  min-height: 100vh
}

.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 40px
}

.topbar-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--red);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.topbar-logo-icon svg {
  width: 14px;
  height: 14px;
  fill: white
}

.topbar-logo-text {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text2)
}

.topbar-nav {
  display: flex;
  gap: 2px;
  flex: 1
}

.nav-item {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  background: none;
  border: none;
  transition: all .15s
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface2)
}

.nav-item.active {
  color: var(--text);
  background: var(--surface2)
}

.nav-item.active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: var(--red);
  border-radius: 50%;
  margin: 4px auto -2px
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto
}

.topbar-user {
  font-size: 12px;
  color: var(--text2);
  font-family: var(--mono)
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  vertical-align: middle
}

/* ── Pages ── */
.page {
  display: none
}

.page.active {
  display: block
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 32px
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em
}

.page-meta {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--mono);
  margin-top: 3px
}

.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
  line-height: 1
}

.stat-value.red {
  color: var(--red)
}

.stat-value.green {
  color: var(--green)
}

.stat-value.amber {
  color: var(--amber)
}

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap
}

.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px
}

.toolbar-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 12px 8px 36px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s
}

.toolbar-search input:focus {
  border-color: var(--red)
}

.toolbar-search input::placeholder {
  color: var(--text3)
}

.toolbar-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none
}

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text2);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s
}

.filter-select:focus {
  border-color: var(--red)
}

/* ── View toggle ── */
.view-toggle {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden
}

.view-toggle-btn {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--text3);
  border: none;
  cursor: pointer;
  transition: all .15s
}

.view-toggle-btn.active {
  background: var(--surface2);
  color: var(--text)
}

/* ── Table ── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden
}

.tbl {
  width: 100%;
  border-collapse: collapse
}

.tbl thead {
  background: var(--surface2);
  border-bottom: 1px solid var(--border)
}

.tbl th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap
}

.tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle
}

.tbl tbody tr:last-child td {
  border-bottom: none
}

.tbl tbody tr {
  transition: background .1s
}

.tbl tbody tr:hover td {
  background: rgba(255, 255, 255, .02)
}

.tbl tbody tr.clickable {
  cursor: pointer
}

.cell-mono {
  font-family: var(--mono);
  font-size: 12px
}

.cell-muted {
  color: var(--text2)
}

.cell-dim {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3)
}

.cell-truncate {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.tbl-empty {
  padding: 64px 20px;
  text-align: center;
  color: var(--text3);
  font-size: 13px
}

.tbl-empty p {
  margin-top: 8px;
  font-size: 12px
}

/* ── Customer groups ── */
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden
}

.group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background .1s;
  user-select: none
}

.group-header:hover {
  background: rgba(255, 255, 255, .02)
}

.group-email {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1
}

.group-chips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap
}

.group-chevron {
  color: var(--text3);
  transition: transform .2s;
  flex-shrink: 0
}

.group-chevron.open {
  transform: rotate(90deg)
}

.group-body {
  display: none;
  border-top: 1px solid var(--border)
}

.group-body.open {
  display: block
}

.group-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s
}

.group-row:last-child {
  border-bottom: none
}

.group-row:hover {
  background: rgba(255, 255, 255, .02)
}

.group-row-product {
  font-family: var(--mono);
  font-size: 11px;
  min-width: 70px
}

.group-row-status {
  min-width: 120px
}

.group-row-device {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  flex: 1
}

.group-row-actions {
  display: flex;
  gap: 4px;
  margin-left: auto
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0
}

.badge-available {
  background: var(--green-dim);
  color: var(--green)
}

.badge-checked-out {
  background: var(--amber-dim);
  color: var(--amber)
}

.badge-revoked {
  background: var(--red-ghost);
  color: var(--red)
}

.badge-inactive {
  background: rgba(96, 96, 96, .15);
  color: var(--text3)
}

.badge-tdp {
  background: var(--blue-dim);
  color: var(--blue)
}

.badge-krayos {
  background: var(--purple-dim);
  color: var(--purple)
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  vertical-align: middle;
  margin-right: 6px
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.actions {
  display: flex;
  gap: 4px;
  align-items: center
}

/* ── Modal ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(2px)
}

.modal-bg.open {
  display: flex
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 480px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -.02em
}

.modal-body {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 8px
}

.modal-field {
  margin: 16px 0 0
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px
}

.modal-warning {
  background: var(--red-ghost);
  border: 1px solid var(--red-glow);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--red);
  margin-top: 14px;
  line-height: 1.6
}

.modal-info {
  background: var(--blue-dim);
  border: 1px solid rgba(96, 165, 250, .25);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--blue);
  margin-top: 14px;
  line-height: 1.6
}

.form-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.form-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 4px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── License key display ── */
.key-display {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  text-align: center;
  padding: 24px 20px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-top: 20px;
  border: 1px solid var(--border2);
  word-break: break-all;
  line-height: 1.5
}

.key-warning {
  background: var(--red-ghost);
  border: 1px solid var(--red-glow);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--red);
  margin-top: 12px;
  line-height: 1.6;
  text-align: center
}

.key-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px
}

.key-actions .btn {
  flex: 1;
  justify-content: center
}

/* ── Delete confirm ── */
.delete-confirm-wrap {
  margin-top: 16px
}

.delete-confirm-wrap .field-label {
  color: var(--red)
}

.delete-confirm-wrap .field-input {
  border-color: rgba(218, 41, 28, .4)
}

.delete-confirm-wrap .field-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-ghost)
}

/* ── Code display ── */
.code-display {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 16px;
  color: var(--red);
  text-align: center;
  padding: 28px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-top: 20px;
  border: 1px solid var(--border2)
}

.code-expiry {
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  margin-top: 10px;
  font-family: var(--mono)
}

.code-history {
  margin-top: 12px
}

.code-history-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px
}

.code-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 12px
}

.code-item-code {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text);
  flex: 1
}

.code-item-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px
}

.code-status-active {
  background: var(--green-dim);
  color: var(--green)
}

.code-status-consumed {
  background: var(--amber-dim);
  color: var(--amber)
}

.code-status-expired {
  background: rgba(96, 96, 96, .15);
  color: var(--text3)
}

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 99;
  max-width: 360px
}

#toast.show {
  opacity: 1;
  transform: translateY(0)
}

#toast.ok {
  background: rgba(34, 197, 94, .15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, .25)
}

#toast.err {
  background: var(--red-ghost);
  color: var(--red);
  border: 1px solid var(--red-glow)
}

/* ── Detail ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  transition: color .15s
}

.back-btn:hover {
  color: var(--text)
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden
}

.detail-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.detail-card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em
}

.detail-card-body {
  padding: 0
}

.kv-row {
  display: flex;
  align-items: baseline;
  padding: 13px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px
}

.kv-row:last-child {
  border-bottom: none
}

.kv-row.kv-section-start {
  border-top: 1px solid var(--border2);
}

.kv-key {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  min-width: 140px;
  flex-shrink: 0
}

.kv-val {
  font-size: 13px;
  color: var(--text);
  font-family: var(--mono);
  word-break: break-all
}

.kv-val.empty {
  color: var(--text3);
  font-style: italic;
}

.detail-actions-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.detail-actions-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px
}

.detail-action-btn {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 10px 14px;
  font-size: 13px
}

.audit-timeline {
  padding: 8px 0
}

.audit-item {
  display: flex;
  gap: 14px;
  padding: 12px 24px;
  position: relative
}

.audit-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 35px;
  top: 36px;
  bottom: 0;
  width: 1px;
  background: var(--border)
}

.audit-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: var(--surface2);
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  z-index: 1
}

.audit-dot.red {
  border-color: var(--red);
  background: var(--red-ghost)
}

.audit-dot.green {
  border-color: var(--green);
  background: var(--green-dim)
}

.audit-dot.amber {
  border-color: var(--amber);
  background: var(--amber-dim)
}

.audit-dot.blue {
  border-color: var(--blue);
  background: var(--blue-dim)
}

.audit-content {
  flex: 1;
  min-width: 0
}

.audit-event {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono)
}

.audit-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px
}

.audit-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center
}

.role-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px
}

.role-superadmin {
  background: var(--red-ghost);
  color: var(--red)
}

.role-support {
  background: rgba(96, 96, 96, .15);
  color: var(--text2)
}

.delete-zone {
  border: 1px solid rgba(218, 41, 28, .25);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 4px;
  background: rgba(218, 41, 28, .04)
}

.delete-zone-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px
}

.delete-zone-desc {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 10px;
  line-height: 1.5
}

@media(max-width:900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr)
  }

  .detail-grid {
    grid-template-columns: 1fr
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

@media(max-width:600px) {
  .container {
    padding: 24px 16px
  }

  .topbar {
    padding: 0 16px
  }

  .stats-row {
    grid-template-columns: 1fr 1fr
  }
}
