:root {
  color-scheme: dark;
  --bg: #090909;
  --ink: #f4f4f4;
  --muted: #aaa;
  --line: #ffffff22;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 Arial, Helvetica, sans-serif;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 15% 5%, #62626244, transparent 45%),
    radial-gradient(ellipse at 90% 80%, #4a4a4a33, transparent 50%);
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  padding: 11px 17px;
  border: 1px solid #ffffff35;
  border-radius: 12px;
  background: #ffffff09;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
}

button:hover {
  background: #ffffff17;
  border-color: #ffffff80;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.primary {
  background: #f4f4f4;
  color: #111;
  border-color: #f4f4f4;
  font-weight: 700;
}

.primary:hover {
  background: #ddd;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #ddd;
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 4vw;
  background: #101010d9;
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--line);
}

.brand {
  letter-spacing: .14em;
  white-space: nowrap;
  font-size: 19px;
}

.topbar small {
  display: block;
  font-size: 9px;
  letter-spacing: .3em;
  color: #999;
  margin-top: 4px;
}

#identity {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.glass {
  background: linear-gradient(135deg, #ffffff10, #ffffff04);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 16px 50px #0003;
  backdrop-filter: blur(20px);
  margin-bottom: 20px;
}

.login {
  max-width: 440px;
  margin: 8vh auto;
}

.login .primary {
  width: 100%;
  margin-top: 8px;
}

.workspace {
  max-width: 1520px;
  margin: auto;
  padding: 20px 4vw 60px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
}

.sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
  padding: 20px 14px;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.sidebar button {
  text-align: left;
  border-color: transparent;
}

.sidebar button.active {
  background: #eee;
  color: #111;
}

.sidebar .muted {
  padding: 20px 8px 0;
  font-size: 11px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
}

h1 {
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: -.04em;
  margin: 0 0 16px;
}

h2 {
  font-size: 21px;
  font-weight: 500;
  margin: 0 0 14px;
}

h3 {
  font-size: 16px;
  margin-top: 24px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.message {
  position: sticky;
  top: 93px;
  z-index: 20;
  background: #171717;
  border: 1px solid #ffffff22;
  max-width: 1000px;
  margin: 10px auto;
  padding: 10px 18px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message:empty {
  display: none;
}

.message.error {
  border-color: #db8c8c;
  color: #ffdada;
}

.heading,
.actions,
.checks {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.heading {
  justify-content: space-between;
  margin: 12px 0 18px;
}

.heading h1 {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stats strong {
  display: block;
  font-size: 32px;
  margin-top: 12px;
}

.stats span {
  color: var(--muted);
  font-size: 12px;
}

label {
  display: block;
  font-size: 12px;
  color: #ccc;
  margin-bottom: 16px;
}

input:not([type=checkbox]),
textarea,
select,
output {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 7px;
  background: #0b0b0b99;
  border: 1px solid #ffffff30;
  color: #fff;
  border-radius: 10px;
  min-height: 44px;
}

input[type=color] {
  padding: 5px;
  min-height: 48px;
}

input[type=checkbox] {
  accent-color: #ddd;
  width: 17px;
  height: 17px;
  vertical-align: middle;
}

textarea {
  resize: vertical;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.checks label,
.check {
  display: flex;
  gap: 8px;
  align-items: center;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.size-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.size-box label {
  margin-bottom: 8px;
}

.size-box small {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
}

th,
td {
  text-align: left;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
}

td img {
  width: 44px;
  height: 52px;
  object-fit: cover;
  border-radius: 7px;
  vertical-align: middle;
  margin-right: 10px;
}

.badge {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 11px;
}

.order-details {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.order .actions select {
  width: auto;
  margin: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.media-card {
  min-width: 0;
  padding: 12px;
  background: #ffffff08;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.media-card img,
.media-card video {
  width: 100%;
  height: 155px;
  object-fit: contain;
  background: #111;
  border-radius: 9px;
}

.media-card input {
  font-size: 10px;
}

.media-card button {
  width: 100%;
  margin-top: 8px;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #ffffff66;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
}

.collection-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .sidebar {
    position: static;
  }

  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
  }

  .sidebar .eyebrow,
  .sidebar .muted {
    display: none;
  }

  .topbar {
    padding: 15px;
  }

  .brand {
    font-size: 16px;
  }

  .message {
    top: 80px;
    margin: 8px 12px;
  }

  .stats {
    gap: 8px;
  }

  .stats .glass {
    padding: 15px;
  }

  .stats strong {
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .glass {
    padding: 18px;
    border-radius: 18px;
  }

  .login {
    margin: 35px 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  #identity {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }

  .stats .glass {
    margin-bottom: 0;
  }

  .stats strong {
    display: inline;
    margin-left: 15px;
  }

  .heading {
    align-items: flex-start;
  }

  .sidebar button {
    padding: 9px 11px;
    font-size: 12px;
  }
}
