@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg-cream: #fbfaf8;
  --bg-paper: rgba(255, 255, 255, 0.74);
  --bg-ink: #151515;
  --line-soft: rgba(26, 26, 26, 0.1);
  --line-strong: rgba(255, 255, 255, 0.1);
  --text-main: #171717;
  --text-soft: rgba(23, 23, 23, 0.62);
  --text-light: rgba(255, 255, 255, 0.72);
  --success: #196c3c;
  --error: #8c2a21;
  --shadow-large: 0 30px 90px rgba(15, 22, 36, 0.12);
  --shadow-card: 0 18px 50px rgba(15, 22, 36, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text-main);
  background: var(--bg-cream);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 36%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.66), transparent 34%);
  pointer-events: none;
}

.aurora {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.68;
  pointer-events: none;
}

.aurora-a {
  top: 12%;
  left: 16%;
  width: 360px;
  height: 360px;
  background: rgba(180, 204, 255, 0.82);
}

.aurora-b {
  right: 10%;
  bottom: 10%;
  width: 420px;
  height: 420px;
  background: rgba(255, 185, 164, 0.58);
}

.aurora-c {
  top: 45%;
  left: 45%;
  width: 300px;
  height: 300px;
  background: rgba(244, 202, 137, 0.3);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: rgba(23, 23, 23, 0.54);
}

.eyebrow.inverse {
  color: rgba(255, 255, 255, 0.62);
}

.muted {
  color: var(--text-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.center-stage,
.admin-login-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.glass-card,
.admin-login-card {
  width: min(100%, 480px);
  padding: 38px;
  border-radius: var(--radius-xl);
  background: var(--bg-paper);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-large);
  backdrop-filter: blur(18px);
}

.glass-card h1,
.admin-login-card h1,
.delivery-header h1,
.dashboard-header h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
}

.glass-card p,
.admin-login-card p {
  margin: 0 0 24px;
}

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

.stack-form.compact {
  gap: 12px;
}

.stack-form input,
.stack-form textarea,
.stack-form select,
.token-input {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font: inherit;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.stack-form select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23171717' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  background-color: #ffffff !important;
  color: #171717 !important;
  border-radius: var(--radius-sm) !important;
}

.stack-form select:focus {
  border-color: rgba(23, 23, 23, 0.3) !important;
  box-shadow: 0 0 0 5px rgba(23, 23, 23, 0.05) !important;
  outline: none !important;
}

.stack-form select option {
  background: #ffffff !important;
  color: #171717 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
}

.stack-form select option:checked {
  background: #171717 !important;
  color: #ffffff !important;
}

.stack-form select option:hover {
  background: rgba(23, 23, 23, 0.08) !important;
}

.filter-form select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23171717' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.filter-form select option {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  padding: 8px;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus,
.token-input:focus {
  border-color: rgba(23, 23, 23, 0.3);
  box-shadow: 0 0 0 5px rgba(23, 23, 23, 0.05);
  transform: translateY(-1px);
}

.token-input {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 18px 20px;
}

.primary-button,
.ghost-button,
.outline-button,
.copy-button,
.secondary-link {
  border: none;
  border-radius: 16px;
  padding: 16px 18px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover,
.copy-button:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled,
.outline-button:disabled,
.copy-button:disabled,
.secondary-link:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

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

.ghost-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-main);
  border: 1px solid var(--line-soft);
}

.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-main);
  border: 1px solid var(--line-soft);
}

.ghost-button.active {
  background: var(--bg-ink);
  color: white;
  border-color: var(--bg-ink);
}

.secondary-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: rgba(23, 23, 23, 0.06);
  color: var(--text-main);
}

.micro-copy {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.micro-copy span,
.note-badges span,
.stat-chips span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.06);
  color: rgba(23, 23, 23, 0.72);
  font-size: 13px;
}

.alert {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.alert.success {
  background: rgba(25, 108, 60, 0.12);
  color: var(--success);
}

.alert.error {
  background: rgba(140, 42, 33, 0.1);
  color: var(--error);
}

.delivery-stage {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 18px 80px;
}

.delivery-card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.dark-panel {
  padding: 26px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(27, 27, 27, 0.95));
  color: white;
}

.notes-panel {
  padding: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
}

.delivery-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.delivery-header p {
  margin: 0;
  max-width: 560px;
  color: var(--text-light);
}

.pill-meta {
  min-width: 180px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
}

.pill-meta span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.pill-meta strong {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

.result-grid {
  display: grid;
  gap: 16px;
}

.result-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.result-row:first-child {
  border-top: none;
}

.result-row .label {
  color: rgba(255, 255, 255, 0.66);
  font-weight: 600;
}

.result-content strong {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.74);
}

.result-content code {
  display: inline-block;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: white;
  word-break: break-all;
  font-size: 20px;
  font-family: "Space Grotesk", "Noto Sans SC", monospace;
}

.copy-button {
  background: rgba(255, 255, 255, 0.11);
  color: white;
}

.notes-panel h2,
.dashboard-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.note-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.admin-shell {
  background:
    radial-gradient(circle at top left, rgba(184, 217, 255, 0.46), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 159, 126, 0.36), transparent 34%),
    #f7f5f1;
}

.dashboard-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(184, 217, 255, 0.42), transparent 20%),
    radial-gradient(circle at bottom left, rgba(255, 159, 126, 0.3), transparent 26%),
    linear-gradient(180deg, #f8f6f2 0%, #f5f1ea 100%);
  padding: 28px 18px 48px;
}

.dashboard-header {
  max-width: 1200px;
  margin: 0 auto 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.inline-form {
  display: inline;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(248, 246, 242, 0.92);
  border: 1px solid rgba(23, 23, 23, 0.06);
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-main);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-soft);
}

.category-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.category-item {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(248, 246, 242, 0.92);
  border: 1px solid rgba(23, 23, 23, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.category-item p {
  margin: 6px 0 8px;
  color: var(--text-soft);
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.06);
  color: var(--text-soft);
  font-size: 12px;
}

.badge-success {
  background: rgba(25, 108, 60, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(244, 202, 137, 0.3);
  color: #8b6914;
}

.countdown-timer {
  font-family: "Space Grotesk", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(180, 204, 255, 0.3);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  margin-right: 8px;
}

.category-tag-small {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(180, 204, 255, 0.25);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 500;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.chip-available {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(25, 108, 60, 0.1);
  color: var(--success);
  font-size: 13px;
}

.chip-sold {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(140, 42, 33, 0.08);
  color: var(--error);
  font-size: 13px;
}

.import-notice {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(244, 202, 137, 0.15);
  border: 1px solid rgba(244, 202, 137, 0.3);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.import-notice code {
  font-family: "Space Grotesk", monospace;
  background: rgba(23, 23, 23, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}

.filter-bar {
  position: relative;
  z-index: 100;
  margin-bottom: 16px;
}

.filter-form select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.redemption-code {
  font-family: "Space Grotesk", monospace;
  font-size: 14px;
  letter-spacing: 0.05em;
  background: rgba(180, 204, 255, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
}

.small-danger-button {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: rgba(140, 42, 33, 0.12);
  color: var(--error);
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.small-danger-button:hover {
  transform: translateY(-1px);
  background: rgba(140, 42, 33, 0.18);
}

.dashboard-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-panel {
  position: relative;
  z-index: 1;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.dashboard-panel.full-width {
  grid-column: 1 / -1;
}

.generated-box {
  margin-top: 14px;
}

.generated-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-soft);
}

.generated-box textarea {
  width: 100%;
  min-height: 220px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(248, 246, 242, 0.92);
  padding: 14px 16px;
  font: 500 14px/1.5 "Space Grotesk", monospace;
}

.inventory-list {
  display: grid;
  gap: 14px;
}

.inventory-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(248, 246, 242, 0.92);
  border: 1px solid rgba(23, 23, 23, 0.06);
}

.inventory-item p {
  margin: 8px 0 14px;
  color: var(--text-soft);
}

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

.stat-chips b {
  margin-left: 4px;
}

.records-table {
  overflow-x: auto;
  overflow-y: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
}

th {
  font-size: 13px;
  color: rgba(23, 23, 23, 0.52);
  font-weight: 700;
}

td code {
  font-family: "Space Grotesk", monospace;
  background: rgba(23, 23, 23, 0.05);
  padding: 6px 10px;
  border-radius: 10px;
}

.center {
  text-align: center;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .delivery-header,
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 640px) {
  .glass-card,
  .admin-login-card,
  .dashboard-panel,
  .dark-panel,
  .notes-panel {
    padding: 22px;
  }

  .glass-card h1,
  .admin-login-card h1,
  .delivery-header h1,
  .dashboard-header h1 {
    font-size: 28px;
  }

  .result-content code {
    font-size: 16px;
  }
}

.shop-stage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 18px 80px;
}

.shop-hero {
  text-align: center;
  margin-bottom: 48px;
  padding: 48px 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(180, 204, 255, 0.3), rgba(255, 185, 164, 0.25));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.shop-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 48px);
}

.shop-hero p {
  margin: 0;
  font-size: 18px;
  color: var(--text-soft);
}

.shop-nav {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) 160px;
  align-items: stretch;
  gap: 18px;
  margin-bottom: 32px;
}

.shop-nav-alert {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.shop-nav-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
}

.shop-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
}

.category-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.category-filter-all {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
}

.shop-nav-link {
  min-height: 68px;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}

.shop-announcement {
  padding: 18px 24px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shop-announcement-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.shop-announcement-title {
  font-size: 16px;
  font-weight: 800;
  color: #8ab300;
  letter-spacing: 0.18em;
}

.shop-announcement-body {
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-soft);
  white-space: pre-line;
}

.shop-announcement-body p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.shop-announcement-body a {
  color: var(--text-main);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(23, 23, 23, 0.22);
}

.shop-announcement-body strong {
  color: var(--text-main);
}

.announcement-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(180, 204, 255, 0.32);
  color: var(--text-main);
  font-size: 14px;
  flex-shrink: 0;
}

.announcement-divider {
  opacity: 0.38;
}

.admin-announcement-preview {
  margin-top: 18px;
  background: linear-gradient(135deg, rgba(180, 204, 255, 0.24), rgba(255, 185, 164, 0.2));
}

.category-filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-soft);
  color: var(--text-main);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms ease;
}

.category-filter-btn:hover,
.category-filter-btn.active {
  background: var(--bg-ink);
  color: white;
  border-color: var(--bg-ink);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.product-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  aspect-ratio: 2/3;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 22, 36, 0.12);
}

.product-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(180, 204, 255, 0.4), rgba(255, 185, 164, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
}

.product-info {
  padding: 8px 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.product-info .category-tag {
  font-size: 10px;
  padding: 3px 6px;
  flex-shrink: 0;
}

.product-info h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  min-height: 32px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
}

.product-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.product-price {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--bg-ink);
  flex-shrink: 0;
}

.product-stock {
  font-size: 10px;
  color: var(--text-soft);
  flex-shrink: 0;
}

.product-stock.in-stock {
  color: var(--success);
}

.product-stock.out-of-stock {
  color: var(--error);
}

.product-sold-info {
  display: block !important;
  font-size: 10px;
  color: rgba(140, 42, 33, 0.8);
  flex-shrink: 0;
  font-weight: 500;
  line-height: 1.2;
  visibility: visible !important;
  opacity: 1 !important;
}

.buy-now-btn {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-ink);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
  flex-shrink: 0;
  margin-top: auto;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quantity-selector label {
  font-size: 13px;
  color: var(--text-soft);
}

.quantity-input {
  width: 80px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font: inherit;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.checkout-shell {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 18px 80px;
}

.checkout-card {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.checkout-summary {
  margin: 24px 0;
  padding: 24px;
  background: rgba(248, 246, 242, 0.92);
  border-radius: var(--radius-md);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--bg-ink);
  font-size: 20px;
  font-weight: 700;
}

.payment-methods {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.payment-method-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 2px solid var(--line-soft);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 180ms ease;
}

.payment-method-option:hover,
.payment-method-option.selected {
  border-color: var(--bg-ink);
  background: rgba(23, 23, 23, 0.04);
}

.payment-method-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.payment-method-info h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.payment-method-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.order-stage {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 18px 80px;
}

.order-card {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  margin-bottom: 24px;
}

.order-status {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.order-status.pending {
  background: rgba(244, 202, 137, 0.3);
  color: #8b6914;
}

.order-status.paid {
  background: rgba(25, 108, 60, 0.15);
  color: var(--success);
}

.order-status.cancelled {
  background: rgba(140, 42, 33, 0.1);
  color: var(--error);
}

.order-voucher {
  padding: 20px;
  background: linear-gradient(135deg, rgba(18, 18, 18, 0.98), rgba(27, 27, 27, 0.95));
  border-radius: var(--radius-lg);
  color: white;
  margin-bottom: 16px;
}

.order-voucher h4 {
  margin: 0 0 12px;
  color: #fff;
}

.order-voucher-item {
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin-bottom: 8px;
}

.order-voucher-item:last-child {
  margin-bottom: 0;
}

.order-voucher-item code {
  display: block;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-top: 8px;
  word-break: break-all;
  font-family: "Space Grotesk", monospace;
}

.search-form {
  display: flex;
  gap: 12px;
  margin: 32px 0;
}

.search-form input {
  flex: 1;
}

.buy-now-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.buy-now-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(20px);
  transition: transform 200ms ease;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.modal-header {
  padding: 24px 24px 0;
  border-bottom: 1px solid var(--line-soft);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.modal-product-info {
  margin-bottom: 24px;
}

.modal-product-info h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.modal-product-description {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.modal-delivery-info {
  padding: 12px 16px;
  background: rgba(180, 204, 255, 0.15);
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(180, 204, 255, 0.3);
}

.modal-instructions details {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
}

.modal-instructions summary {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.instructions-content {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
}

.instruction-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.instruction-editor.dragging {
  border-color: rgba(23, 23, 23, 0.34);
  background: rgba(180, 204, 255, 0.16);
}

.instruction-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.instruction-editor-label {
  display: block;
  font-weight: 800;
  color: var(--text-main);
}

.instruction-editor-help {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

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

.instruction-toolbar .ghost-button {
  padding: 9px 12px;
  font-size: 13px;
}

.instruction-rich-input {
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text-main);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  outline: none;
}

.instruction-rich-input:focus {
  border-color: rgba(23, 23, 23, 0.38);
  box-shadow: 0 0 0 5px rgba(23, 23, 23, 0.05);
}

.instruction-rich-input:empty::before {
  content: attr(data-placeholder);
  color: rgba(23, 23, 23, 0.36);
}

.instruction-rich-input p {
  margin: 0 0 10px;
}

.instruction-rich-input img,
.instruction-rich-content img {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  margin: 10px 0;
}

.instruction-rich-input ul,
.instruction-rich-input ol,
.instruction-rich-content ul,
.instruction-rich-content ol {
  padding-left: 22px;
}

.instruction-editor-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.instruction-editor-foot code {
  color: var(--text-main);
  font-family: "Space Grotesk", monospace;
}

.instruction-live-preview {
  border-top: 1px solid rgba(23, 23, 23, 0.08);
  padding-top: 10px;
}

.instruction-live-preview summary {
  cursor: pointer;
  color: var(--text-main);
  font-weight: 800;
  font-size: 13px;
}

.instruction-preview-list {
  margin-top: 12px;
}

.instruction-empty {
  padding: 18px;
  border: 1px dashed rgba(23, 23, 23, 0.16);
  border-radius: 12px;
  color: var(--text-soft);
  text-align: center;
  background: rgba(248, 246, 242, 0.78);
  font-size: 13px;
}

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

.instruction-block-card {
  padding: 14px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 12px;
  background: #ffffff;
}

.instruction-block-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.instruction-block-type {
  display: block;
  margin-bottom: 3px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.instruction-block-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.instruction-block-actions .ghost-button,
.instruction-block-actions .small-danger-button {
  padding: 7px 10px;
  font-size: 12px;
}

.instruction-block-fields {
  display: grid;
  gap: 10px;
}

.instruction-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}

.instruction-field input,
.instruction-field textarea {
  width: 100%;
  color: var(--text-main);
  font-size: 14px;
}

.instruction-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.instruction-upload-row input[type="file"] {
  padding: 10px;
  background: rgba(248, 246, 242, 0.9);
}

.instruction-upload-status {
  color: var(--text-soft);
  font-size: 12px;
}

.instruction-preview-block {
  padding: 14px;
  border-radius: 12px;
  background: rgba(248, 246, 242, 0.78);
  border: 1px solid rgba(23, 23, 23, 0.06);
  margin-bottom: 12px;
}

.instruction-preview-block h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text-main);
}

.instruction-preview-text,
.instruction-preview-note,
.instruction-preview-caption,
.instruction-preview-empty {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.instruction-preview-block ol {
  margin: 0;
  padding-left: 22px;
}

.instruction-preview-block li + li {
  margin-top: 6px;
}

.instruction-preview-block img {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(23, 23, 23, 0.08);
}

.instruction-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.instruction-file-link,
.instruction-plugin-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-ink);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

.instruction-plugin-link {
  cursor: grab;
}

.instruction-copy-button {
  padding: 10px 14px;
}

.form-section {
  margin-bottom: 20px;
}

.form-section label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.required {
  color: #d32f2f;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}

.qty-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
}

.quantity-selector input {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.02);
}

.form-section input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 150ms ease;
}

.form-section input[type="email"]:focus {
  outline: none;
  border-color: rgba(23, 23, 23, 0.4);
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.payment-method-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--line-soft);
  border-radius: 12px;
  cursor: pointer;
  transition: all 150ms ease;
  background: #ffffff;
  min-height: 64px;
}

.payment-method-option:hover {
  border-color: rgba(23, 23, 23, 0.3);
  background: rgba(0, 0, 0, 0.02);
}

.payment-method-option.selected {
  border-color: var(--bg-ink);
  background: rgba(23, 23, 23, 0.03);
}

.payment-method-option input[type="radio"] {
  display: none;
}

.payment-method-info h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.payment-method-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

.modal-price-summary {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 14px;
  padding: 16px;
  margin: 24px 0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-soft);
}

.price-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-notice {
  background: rgba(244, 202, 137, 0.15);
  border: 1px solid rgba(244, 202, 137, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.modal-notice strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 6px;
}

.modal-notice p {
  margin: 0;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-cancel-btn {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
}

.modal-cancel-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.modal-submit-btn {
  flex: 2;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: var(--bg-ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 150ms ease;
}

.modal-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.product-tier-hint {
  flex-basis: 100%;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.price-tier-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
}

.price-tier-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price-tier-header strong,
.price-tier-editor label span {
  display: block;
  color: var(--text-main);
  font-weight: 800;
}

.price-tier-header p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.price-tier-editor textarea {
  margin-top: 8px;
  min-height: 96px;
  resize: vertical;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

.agent-price-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .agent-price-tier-grid {
    grid-template-columns: 1fr;
  }

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

  .category-filters {
    order: 2;
  }

  .category-filter-all {
    min-height: 48px;
  }

  .shop-nav-actions {
    flex-direction: row;
    justify-content: flex-start;
  }

  .shop-nav-link {
    min-height: 54px;
    flex: 1;
  }

  .shop-announcement-body p {
    align-items: flex-start;
  }

  .search-form {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }
}
