:root {
  color-scheme: light;
  --ink: #1d2b24;
  --muted: #6d7b73;
  --line: #dfe8e2;
  --paper: #f8fbf8;
  --white: #ffffff;
  --leaf: #256c4c;
  --leaf-dark: #174b36;
  --rose: #c94f62;
  --mint: #e5f4eb;
  --gold: #b98224;
  --warning: #fff1d8;
  --shadow: 0 14px 34px rgba(29, 43, 36, 0.12);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(229, 244, 235, 0.96), rgba(248, 251, 248, 0.7) 34%),
    var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.mobile-shell {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 18px 16px 116px;
}

.topbar,
.admin-header,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.08;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.16;
}

.admin-link,
.ghost-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--leaf-dark);
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
  text-decoration: none;
}

.product-hero {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ddebe3;
}

.image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.product-copy {
  padding: 16px;
}

.product-subtitle,
.product-description {
  color: var(--muted);
}

.product-subtitle {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.product-description {
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.62;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.currency {
  color: var(--rose);
  font-size: 20px;
  font-weight: 900;
}

.price {
  color: var(--rose);
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
}

del {
  color: #9aa69f;
  font-size: 14px;
}

.detail-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.detail-item {
  min-width: 0;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px 10px;
}

.detail-item span,
.checkout-label,
.order-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.status-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 13px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.status-panel p {
  margin: 0;
}

.status-panel[data-tone="ok"],
.admin-status[data-tone="ok"] {
  border-color: #b7ddc6;
  background: #edf9f1;
  color: var(--leaf-dark);
}

.status-panel[data-tone="warn"],
.admin-status[data-tone="warn"] {
  border-color: #edcf92;
  background: var(--warning);
  color: #7c5514;
}

.checkout-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.checkout-bar strong {
  color: var(--rose);
  font-size: 24px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--leaf);
  color: #fff;
  font-weight: 900;
  padding: 0 20px;
  box-shadow: 0 10px 22px rgba(37, 108, 76, 0.24);
}

.button-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
}

.wide {
  width: 100%;
}

.admin-shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.admin-header {
  margin-bottom: 20px;
}

.auth-panel,
.config-panel,
.orders-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
  box-shadow: var(--shadow);
}

.config-panel,
.orders-panel {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

.form-grid,
.config-form {
  display: grid;
  gap: 14px;
}

.config-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.profile-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 8px;
  align-items: center;
}

.danger-button {
  color: #9c2f3e;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

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

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #75b58e;
  box-shadow: 0 0 0 3px rgba(117, 181, 142, 0.18);
}

.full {
  grid-column: 1 / -1;
}

.form-note,
.empty-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-status {
  min-height: 50px;
}

.orders-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.order-row div {
  min-width: 0;
}

.order-row strong,
.order-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-shell {
  display: grid;
  gap: 14px;
  min-height: 100vh;
  align-content: center;
}

@media (max-width: 640px) {
  .admin-shell {
    padding-top: 18px;
  }

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

  .profile-switcher {
    grid-template-columns: 1fr;
  }

  .auth-panel,
  .config-panel,
  .orders-panel {
    padding: 16px;
  }
}
