:root {
  --ink: #141414;
  --muted: #69645d;
  --line: #e7e1d6;
  --paper: #fffdf8;
  --soft: #f7f2e8;
  --gold: #c99b35;
  --gold-dark: #8a671c;
  --white: #ffffff;
  --danger: #b42318;
  --success: #257a3e;
  --shadow: 0 18px 50px rgba(20, 20, 20, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(245px, 45vw);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  font-weight: 700;
}

.top-nav a {
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr);
  gap: clamp(22px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 6vw, 76px) 0 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 800;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(21px, 3vw, 28px);
}

.hero-copy p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}

.hero-actions,
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
button {
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
button.primary {
  background: var(--ink);
  color: var(--white);
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.button.full,
button.full {
  width: 100%;
  text-align: center;
}

button:disabled,
.segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hero-preview {
  align-self: end;
}

.hero-preview img {
  display: block;
  width: min(100%, 620px);
  margin-left: auto;
  filter: drop-shadow(0 26px 36px rgba(20, 20, 20, 0.16));
}

.flash {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 700;
}

.flash.success {
  border-color: rgba(37, 122, 62, 0.3);
  color: var(--success);
}

.flash.error {
  border-color: rgba(180, 35, 24, 0.3);
  color: var(--danger);
}

.customizer {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 430px);
  gap: 28px;
  align-items: start;
  padding: 28px 0 72px;
}

.customizer.first-screen {
  min-height: calc(100vh - 82px);
  align-items: center;
  padding-top: clamp(18px, 4vw, 44px);
}

.product-stage,
.order-panel,
.auth-card,
.orders-list,
.admin-section,
.payment-band {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-stage {
  padding: clamp(18px, 4vw, 44px);
}

.shirt-frame {
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.shirt-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.design-preview,
.print-zone {
  position: absolute;
  left: 50%;
  top: 34.5%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
}

.design-preview.print-15x20,
.print-zone.print-15x20 {
  width: 20%;
  height: 26%;
}

.design-preview.print-20x30,
.print-zone.print-20x30 {
  width: 24%;
  height: 34%;
  top: 36%;
}

.design-preview.print-20x20,
.print-zone.print-20x20 {
  width: 25%;
  height: 25%;
}

.print-zone {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(138, 103, 28, 0.55);
  color: var(--gold-dark);
  background: rgba(255, 253, 248, 0.72);
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.order-panel,
.auth-card,
.orders-list,
.admin-section {
  padding: clamp(18px, 3vw, 28px);
}

.compact-card {
  align-self: start;
}

label {
  display: block;
  margin: 16px 0 7px;
  font-size: 14px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.segmented,
.radio-row,
.color-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.segmented button {
  flex: 1;
  background: var(--soft);
}

.segmented .active {
  background: var(--ink);
  color: var(--white);
}

.radio-row label {
  flex: 1;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
}

.hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.upload-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.summary-box {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin: 20px 0;
  padding: 14px;
  border-radius: 6px;
  background: var(--soft);
}

.summary-box span {
  color: var(--muted);
}

.payment-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
  margin: 0 0 72px;
  padding: clamp(20px, 4vw, 36px);
}

.payment-band p {
  color: var(--muted);
  line-height: 1.6;
}

dl {
  margin: 0;
}

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

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

dd {
  margin: 5px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.auth-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 0 0 72px;
}

.auth-section.single-auth {
  grid-template-columns: minmax(280px, 460px);
  justify-content: center;
  padding-top: clamp(28px, 8vw, 84px);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.panel-page {
  padding-bottom: 72px;
}

.page-title,
.admin-head {
  padding: 42px 0 24px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 24px;
}

.profile-stack {
  display: grid;
  gap: 18px;
}

.verify-line {
  margin: 14px 0;
  padding: 12px;
  border-radius: 6px;
  font-weight: 800;
}

.verify-line.ok {
  color: var(--success);
  background: rgba(37, 122, 62, 0.08);
}

.verify-line.warn {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
}

.order-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.order-item img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.order-item h3 {
  margin: 0 0 6px;
}

.order-item p {
  margin: 0 0 4px;
}

.payment-note {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 13px;
}

.payment-note strong {
  font-size: 14px;
}

.payment-note em {
  color: var(--gold-dark);
  font-style: normal;
  font-weight: 800;
}

.empty {
  color: var(--muted);
}

.admin-section {
  margin-bottom: 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  color: var(--gold-dark);
  font-size: 13px;
}

small {
  color: var(--muted);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  gap: 8px;
}

.inline-form button {
  min-height: 42px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--white);
}

.danger-button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--danger);
  background: var(--danger);
  color: var(--white);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero,
  .customizer,
  .payment-band,
  .auth-section,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-preview img {
    margin: 0 auto;
  }

  .customizer {
    padding-top: 8px;
  }

  .customizer.first-screen {
    min-height: 0;
    align-items: start;
  }

  .admin-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    width: min(230px, 70vw);
  }

  .button,
  button {
    width: 100%;
  }

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

  .summary-box {
    grid-template-columns: 1fr;
  }

  .product-stage,
  .order-panel,
  .auth-card,
  .orders-list,
  .admin-section {
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(20, 20, 20, 0.08);
  }

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

  .print-zone {
    font-size: 10px;
  }

  .design-preview.print-15x20,
  .print-zone.print-15x20 {
    width: 22%;
    height: 28%;
  }

  .design-preview.print-20x30,
  .print-zone.print-20x30 {
    width: 26%;
    height: 35%;
    top: 36%;
  }

  .design-preview.print-20x20,
  .print-zone.print-20x20 {
    width: 27%;
    height: 27%;
  }
}
