:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5f6975;
  --line: #d9e0e7;
  --panel: #ffffff;
  --page: #f4f7f8;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --amber: #d97706;
  --rose: #be123c;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(22, 32, 42, 0.09);
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #101820;
  color: #f7fafc;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #ffffff;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #2dd4bf;
  color: #10201f;
  font-weight: 900;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #adbdca;
}

.nav-links {
  display: grid;
  gap: 6px;
}

.nav-links a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #dce7ee;
}

.nav-links a.active,
.nav-links a:hover {
  background: #24313d;
  color: #ffffff;
}

.content {
  min-width: 0;
  padding: 28px;
}

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

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

.topbar h1 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-pill {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  white-space: nowrap;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.auth-layout,
.drop-layout,
.cart-layout,
.signals-grid {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.auth-panel,
.narrow-form,
.compact-panel,
#cart-items,
.comment-stream,
.signals-grid .panel {
  padding: 22px;
}

.narrow-form {
  max-width: 620px;
}

.helper {
  color: var(--muted);
  line-height: 1.55;
}

.code-note {
  padding: 12px;
  margin: 16px 0;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-family: "Cascadia Mono", Consolas, monospace;
  line-height: 1.6;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.check-row,
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.form-row {
  justify-content: space-between;
  flex-wrap: wrap;
}

.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

button,
.button-link {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 850;
  text-align: center;
}

.button-link {
  display: grid;
  place-items: center;
}

.primary {
  background: var(--accent);
  color: #ffffff;
}

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

.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.result {
  min-height: 24px;
  color: var(--accent-dark);
  font-weight: 750;
}

.result.error {
  color: var(--rose);
}

.image-panel {
  min-height: 430px;
  overflow: hidden;
}

.hero-photo {
  position: relative;
  background:
    linear-gradient(135deg, rgba(16, 24, 32, 0.2), rgba(16, 24, 32, 0.75)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 700'%3E%3Crect width='900' height='700' fill='%23e5edf0'/%3E%3Cg transform='translate(70 140)'%3E%3Crect x='0' y='120' width='210' height='270' rx='22' fill='%230f766e'/%3E%3Cpath d='M35 120q70 55 140 0v270H35z' fill='%232dd4bf' opacity='.55'/%3E%3Crect x='255' y='65' width='210' height='325' rx='24' fill='%23f8fafc'/%3E%3Cpath d='M298 85h124l23 80h-170z' fill='%23d97706'/%3E%3Crect x='510' y='150' width='230' height='130' rx='34' fill='%2317202a'/%3E%3Cpath d='M535 245q110 55 205-5l20 58q-122 52-260 8z' fill='%23ffffff'/%3E%3Ccircle cx='590' cy='213' r='10' fill='%23f8fafc'/%3E%3Ccircle cx='635' cy='213' r='10' fill='%23f8fafc'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='.62'%3E%3Ccircle cx='735' cy='95' r='34'/%3E%3Ccircle cx='805' cy='165' r='18'/%3E%3Ccircle cx='108' cy='92' r='20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #ffffff;
}

.hero-overlay p {
  margin-bottom: 8px;
  color: #d8f4ef;
  font-weight: 750;
}

.hero-overlay strong {
  display: block;
  max-width: 520px;
  font-size: clamp(1.3rem, 2.8vw, 2.1rem);
  line-height: 1.12;
}

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

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
  min-width: 210px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  overflow: hidden;
}

.product-art {
  position: relative;
  height: 160px;
  display: grid;
  place-items: center;
  background: var(--art-bg);
}

.product-art::before {
  content: "";
  display: block;
  width: var(--art-width, 108px);
  height: var(--art-height, 104px);
  border-radius: var(--art-radius, 18px 18px 10px 10px);
  background: var(--art-main);
  box-shadow: inset 0 -18px 0 rgba(255, 255, 255, 0.18);
}

.product-art::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 12px;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.14);
  bottom: 34px;
}

.product-card-body {
  padding: 14px;
}

.product-card h3 {
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.price {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
}

.drop-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  padding: 22px;
}

.shoe-art {
  position: relative;
  min-height: 260px;
  border-radius: 8px;
  background: #dff3ef;
  overflow: hidden;
}

.shoe-sole,
.shoe-upper,
.shoe-lace {
  position: absolute;
  display: block;
}

.shoe-sole {
  left: 34px;
  right: 24px;
  bottom: 64px;
  height: 42px;
  border-radius: 24px 18px 12px 20px;
  background: #ffffff;
  box-shadow: 0 14px 0 rgba(23, 32, 42, 0.12);
}

.shoe-upper {
  left: 42px;
  right: 44px;
  bottom: 100px;
  height: 86px;
  border-radius: 74px 30px 20px 18px;
  background: #17202a;
}

.shoe-lace {
  width: 70px;
  height: 8px;
  border-radius: 999px;
  background: #2dd4bf;
  transform: rotate(-18deg);
}

.lace-one {
  left: 104px;
  bottom: 148px;
}

.lace-two {
  left: 125px;
  bottom: 130px;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.size-button {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink);
}

.size-button.selected {
  border-color: var(--accent);
  background: #e6f7f3;
}

.size-button[disabled] {
  cursor: not-allowed;
  color: #94a3b8;
  text-decoration: line-through;
}

.metric,
.summary-row,
.cart-item,
.counter-line,
.event-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.metric,
.summary-row,
.counter-line {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.total {
  font-size: 1.1rem;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item strong,
.cart-item span {
  display: block;
}

.cart-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.comment-stream {
  max-width: 620px;
  margin-top: 18px;
}

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

.comment:last-child {
  border-bottom: 0;
}

.comment strong {
  display: block;
  margin-bottom: 4px;
}

.event-log {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.event-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  font-size: 0.92rem;
}

.event-row code {
  color: var(--blue);
  font-weight: 850;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .auth-layout,
  .drop-layout,
  .cart-layout,
  .signals-grid,
  .drop-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .content {
    padding: 18px;
  }

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

  .nav-links {
    grid-template-columns: 1fr;
  }

  .split-row,
  .size-grid {
    grid-template-columns: 1fr 1fr;
  }
}
