:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --bg-deep: #edf4ff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #eff6ff;
  --line: #dde5f2;
  --line-strong: #bfcee4;
  --text: #121826;
  --muted: #6b7280;
  --muted-strong: #334155;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --blue: #2563eb;
  --blue-soft: #eaf2ff;
  --red: #b9472d;
  --red-soft: #fff0ea;
  --green: #0369a1;
  --green-soft: #e0f2fe;
  --success: #15803d;
  --success-soft: #dcfce7;
  --amber: #bd720b;
  --amber-soft: #fff5dc;
  --ink: #111827;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 40px rgba(30, 64, 175, 0.12);
  --shadow-lg: 0 26px 70px rgba(30, 64, 175, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 10%, rgba(96, 165, 250, 0.23), transparent 28rem),
    radial-gradient(circle at 92% 4%, rgba(79, 70, 229, 0.18), transparent 24rem),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 48%, #eef4ff 100%);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 78%);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.46);
  background-clip: content-box;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.brand h1 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-panel .brand {
  margin-bottom: 24px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-right: 1px solid rgba(203, 213, 225, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.78)),
    rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
}

.sidebar .brand {
  min-height: 74px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.sidebar .brand h1 {
  font-size: 17px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  font-weight: 750;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav button:hover {
  background: rgba(37, 99, 235, 0.07);
  color: var(--primary-strong);
}

.nav button.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(255, 213, 122, 0.2));
  color: var(--primary-strong);
  box-shadow: inset 3px 0 0 var(--primary), var(--shadow-sm);
}

.nav button#logoutBtn {
  margin-top: 10px;
  color: #8d4432;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(109, 120, 109, 0.34);
}

.nav button.active .nav-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.main {
  min-width: 0;
  padding: 22px 26px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.topbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.topbar-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.user-pill,
.list-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.view-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.view-switch button {
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.view-switch button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}

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

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

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card,
.admin-item-card,
.store-card,
.admin-note {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 16px;
}

.panel + .panel,
.admin-note + .panel,
.grid + .panel {
  margin-top: 16px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.stat {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.stat::after {
  content: "";
  position: absolute;
  inset: auto -24px -36px auto;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat-value {
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.stat-line {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #e0a236);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 12px;
  align-items: end;
}

.field,
.qty-field {
  display: grid;
  gap: 7px;
}

.field > span,
.qty-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%,
    right center;
  background-size:
    5px 5px,
    5px 5px,
    34px 100%;
  background-repeat: no-repeat;
}

.select:focus {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04));
}

.native-select-hidden {
  display: none;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 38px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02)) right center / 34px 100% no-repeat,
    rgba(255, 255, 255, 0.92);
  color: var(--text);
  text-align: left;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.custom-select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.custom-select-trigger:hover,
.custom-select-trigger.open {
  border-color: rgba(37, 99, 235, 0.58);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04)) right center / 34px 100% no-repeat,
    #fff;
}

.custom-select-trigger.open {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.custom-select-trigger.open::after {
  border-color: var(--primary);
  transform: translateY(-25%) rotate(225deg);
}

.custom-select-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 4px;
  max-height: min(320px, calc(100vh - 24px));
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

.custom-select-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.custom-select-option:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-strong);
}

.custom-select-option.active {
  background: var(--primary);
  color: #fff;
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(37, 99, 235, 0.72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
  box-shadow: 0 15px 26px rgba(37, 99, 235, 0.22);
}

.btn.secondary {
  background: #f1f5ff;
  color: var(--muted-strong);
  box-shadow: none;
}

.btn.secondary:hover {
  background: #e0e7ff;
  box-shadow: none;
}

.btn.danger {
  background: var(--red);
}

.btn.small {
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 12px;
}

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

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

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

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e8eef7;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8fbff;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ea;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.badge.green {
  background: var(--success-soft);
  color: var(--success);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(23, 34, 29, 0.94);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.toast.error {
  background: rgba(129, 51, 31, 0.96);
}

.toast.success {
  background: rgba(20, 99, 58, 0.96);
}

.empty {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(248, 250, 244, 0.72);
  color: var(--muted);
  text-align: center;
  font-weight: 750;
}

.mono {
  font-family: var(--mono);
}

.admin-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 214, 128, 0.18)),
    rgba(255, 255, 255, 0.86);
}

.admin-note h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.admin-note p {
  max-width: 820px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-form-grid {
  grid-template-columns: repeat(6, minmax(116px, 1fr));
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 13px;
}

.product-admin-grid {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}

.admin-item-card {
  min-width: 0;
  padding: 14px;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.admin-item-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(30, 64, 175, 0.08);
}

.item-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.item-card-head h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.item-card-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.item-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.item-card-meta span,
.product-meta span {
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.item-card-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 12px;
}

.product-card-fields {
  grid-template-columns: minmax(130px, 1.5fr) 88px 74px 92px 72px;
  align-items: end;
}

.item-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.item-card-error,
.item-card-note {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  line-height: 1.55;
}

.item-card-note {
  background: var(--surface-soft);
  color: var(--muted-strong);
}

.amount-plus {
  color: var(--success);
}

.amount-minus {
  color: var(--red);
}

.product-admin-card {
  padding: 0;
  overflow: hidden;
}

.product-admin-card .item-card-head,
.product-admin-card .item-card-meta,
.product-admin-card .item-card-fields,
.product-admin-card .item-card-actions {
  margin-left: 14px;
  margin-right: 14px;
}

.product-admin-card .item-card-head {
  margin-top: 14px;
}

.product-admin-card .item-card-actions {
  margin-bottom: 14px;
}

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 19px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(255, 215, 128, 0.22)),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.store-hero-kicker {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-hero h3 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.store-hero p {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.wallet-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 124px;
  padding: 18px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 210, 97, 0.42), transparent 5.8rem),
    linear-gradient(135deg, #111827, #1e3a8a);
  color: #f8fbff;
  box-shadow: var(--shadow-md);
}

.wallet-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.wallet-card span {
  color: rgba(248, 251, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.wallet-card strong {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.wallet-card small {
  color: #ffd778;
  font-weight: 850;
}

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

.store-card {
  min-height: 362px;
  display: grid;
  grid-template-rows: 132px 1fr;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.store-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(30, 64, 175, 0.1);
}

.product-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 36px 16px 16px;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.16), transparent 56%),
    linear-gradient(135deg, #f8fbff, #eff6ff);
  border-bottom: 1px solid #e8eef7;
}

.product-quota .product-visual {
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.14), transparent 56%),
    linear-gradient(135deg, #f8fbff, #eaf2ff);
}

.product-id,
.product-value {
  position: absolute;
  top: 0;
  min-height: 24px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
}

.product-id {
  left: 0;
  border-bottom-right-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
}

.product-value {
  right: 0;
  border-bottom-left-radius: 13px;
  background: var(--green-soft);
  color: var(--green);
}

.product-quota .product-value {
  background: var(--blue-soft);
  color: var(--blue);
}

.product-card-face {
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.78)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(30, 64, 175, 0.1);
}

.product-quota .product-card-face {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(224, 242, 254, 0.8)),
    #fff;
}

.product-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  color: var(--primary);
  font-size: 20px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.95);
}

.product-quota .product-icon {
  color: var(--blue);
}

.product-face-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.product-face-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-face-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-visual {
  min-height: 78px;
  padding: 0;
}

.admin-product-visual .product-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 18px;
}

.product-body {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  padding: 15px;
}

.product-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.product-title-row h3,
.store-card h3 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.product-tag {
  flex: 0 0 auto;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.product-quota .product-tag {
  background: var(--blue-soft);
  color: var(--blue);
}

.product-desc {
  min-height: 18px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.purchase-panel {
  display: grid;
  grid-template-columns: minmax(92px, 0.72fr) minmax(128px, 1fr);
  gap: 11px;
  align-items: end;
  margin-top: auto;
  padding: 11px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(239, 246, 255, 0.72)),
    #fff;
}

.pay-summary {
  display: grid;
  align-content: center;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 13px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.96);
}

.pay-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.pay-summary strong {
  color: var(--amber);
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.store-card .btn {
  width: 100%;
  margin-top: 11px;
}

/* Agent storefront: pass-style cards */
.store-products {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.store-card {
  min-height: 386px;
  grid-template-rows: 164px 1fr;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.08);
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(30, 64, 175, 0.15);
}

.store-card .product-visual {
  position: relative;
  min-height: 164px;
  display: grid;
  align-content: end;
  justify-items: stretch;
  padding: 18px;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(147, 197, 253, 0.42), transparent 8rem),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.72), transparent 7rem),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 45%, #dbeafe 100%);
  border-bottom: 0;
}

.store-card.product-quota .product-visual {
  background:
    radial-gradient(circle at 88% 8%, rgba(103, 232, 249, 0.38), transparent 8rem),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.74), transparent 7rem),
    linear-gradient(135deg, #ffffff 0%, #ecfeff 44%, #cffafe 100%);
}

.store-card .product-visual::before {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -58px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.store-card .product-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.42), transparent 72%);
}

.store-card .product-id,
.product-kind {
  position: absolute;
  z-index: 1;
  top: 14px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.store-card .product-id {
  left: 14px;
}

.product-kind {
  right: 14px;
}

.pass-copy {
  position: relative;
  z-index: 1;
  max-width: 72%;
}

.pass-kicker {
  margin-bottom: 7px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.pass-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.pass-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.pass-value {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 18px;
  color: #1d4ed8;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -0.08em;
  text-shadow: none;
}

.store-card .product-body {
  min-height: 222px;
  padding: 16px;
}

.product-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: rgba(226, 232, 240, 0.92);
}

.product-facts div {
  min-width: 0;
  padding: 12px;
  background: rgba(248, 250, 252, 0.96);
}

.product-facts span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.product-facts strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-card .product-meta {
  margin-top: 10px;
}

.store-card .product-meta span {
  background: #eef4ff;
  color: #334155;
}

.store-card .purchase-panel {
  margin-top: auto;
  padding: 12px;
  border-color: rgba(191, 219, 254, 0.82);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.98)),
    #fff;
}

.store-card .pay-summary {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.92);
}

.store-card .pay-summary span {
  color: var(--muted);
}

.store-card .pay-summary strong {
  color: #2563eb;
}

/* Agent storefront: ticket-style redesign */
.store-products {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.store-card {
  position: relative;
  min-height: 386px;
  grid-template-rows: 178px 1fr;
  border: 0;
  border-radius: 30px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, rgba(37, 99, 235, 0.38), rgba(14, 165, 233, 0.14), rgba(255, 255, 255, 0)) border-box;
  box-shadow:
    0 24px 70px rgba(30, 64, 175, 0.12),
    inset 0 0 0 1px rgba(226, 232, 240, 0.92);
}

.store-card::before,
.store-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 166px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.store-card::before {
  left: -11px;
}

.store-card::after {
  right: -11px;
}

.store-card:hover {
  transform: translateY(-5px) rotate(-0.35deg);
  box-shadow:
    0 32px 80px rgba(30, 64, 175, 0.18),
    inset 0 0 0 1px rgba(191, 219, 254, 0.96);
}

.store-card .product-visual {
  min-height: 178px;
  align-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 165, 250, 0.42), transparent 9rem),
    linear-gradient(135deg, #f8fbff 0%, #eaf2ff 52%, #dbeafe 100%);
}

.store-card.product-quota .product-visual {
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.42), transparent 9rem),
    linear-gradient(135deg, #f8feff 0%, #ecfeff 52%, #cffafe 100%);
}

.store-card .product-visual::before {
  right: -46px;
  bottom: -78px;
  width: 210px;
  height: 210px;
  border: 0;
  background:
    radial-gradient(circle, rgba(37, 99, 235, 0.96) 0 38%, rgba(37, 99, 235, 0.18) 39% 58%, transparent 59%);
}

.store-card.product-quota .product-visual::before {
  background:
    radial-gradient(circle, rgba(8, 145, 178, 0.96) 0 38%, rgba(8, 145, 178, 0.18) 39% 58%, transparent 59%);
}

.store-card .product-visual::after {
  opacity: 0.55;
  background-size: 28px 28px;
}

.store-card .product-id {
  top: 18px;
  left: 18px;
  background: #fff;
  color: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.product-kind {
  top: auto;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  min-height: 28px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.pass-copy {
  max-width: 62%;
}

.pass-kicker {
  color: #1d4ed8;
}

.pass-copy h3 {
  font-size: 24px;
  line-height: 1.08;
}

.pass-copy p {
  max-width: 180px;
}

.pass-value {
  right: 22px;
  bottom: 54px;
  z-index: 2;
  max-width: 116px;
  color: #fff;
  font-size: 38px;
  line-height: 0.92;
  text-align: right;
  text-shadow: 0 16px 28px rgba(15, 23, 42, 0.28);
}

.store-card .product-body {
  min-height: 208px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.66), rgba(255, 255, 255, 0.98));
}

.product-spec-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: #fff;
}

.product-spec-list div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 39px;
  padding: 8px 12px;
}

.product-spec-list div + div {
  border-top: 1px solid rgba(226, 232, 240, 0.78);
}

.product-spec-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.product-spec-list strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-dock {
  display: grid;
  grid-template-columns: minmax(90px, 0.72fr) minmax(142px, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: auto;
  padding-top: 13px;
}

.checkout-dock .qty-field {
  min-width: 0;
}

.checkout-dock .buy-btn {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 8px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.checkout-dock .buy-btn span {
  overflow: hidden;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-dock .buy-btn em {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  opacity: 0.86;
}

/* Fresh organic variant: less rigid, more airy */
.store-card {
  min-height: 374px;
  grid-template-rows: 170px 1fr;
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  background:
    radial-gradient(circle at 16% 0%, rgba(219, 234, 254, 0.55), transparent 8rem),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.09);
}

.store-card::before,
.store-card::after {
  display: none;
}

.store-card:nth-child(3n + 2) {
  transform: translateY(10px);
}

.store-card:nth-child(3n + 3) {
  transform: translateY(3px);
}

.store-card:hover,
.store-card:nth-child(3n + 2):hover,
.store-card:nth-child(3n + 3):hover {
  transform: translateY(-5px);
}

.store-card .product-visual {
  min-height: 170px;
  padding: 20px;
  border-radius: 26px 26px 22px 22px;
  background:
    radial-gradient(circle at 82% 16%, rgba(147, 197, 253, 0.55), transparent 7rem),
    radial-gradient(circle at 10% 90%, rgba(191, 219, 254, 0.5), transparent 8rem),
    linear-gradient(135deg, #ffffff 0%, #f0f7ff 58%, #dbeafe 100%);
}

.store-card.product-quota .product-visual {
  background:
    radial-gradient(circle at 82% 16%, rgba(103, 232, 249, 0.5), transparent 7rem),
    radial-gradient(circle at 10% 90%, rgba(207, 250, 254, 0.6), transparent 8rem),
    linear-gradient(135deg, #ffffff 0%, #f0fdff 58%, #cffafe 100%);
}

.store-card .product-visual::before {
  right: -30px;
  bottom: -50px;
  width: 180px;
  height: 130px;
  border-radius: 44% 56% 50% 50%;
  background: rgba(37, 99, 235, 0.16);
  filter: blur(2px);
}

.store-card.product-quota .product-visual::before {
  background: rgba(8, 145, 178, 0.16);
}

.product-kind {
  right: 18px;
  bottom: 18px;
  background: rgba(255, 255, 255, 0.76);
  color: #2563eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.11);
}

.pass-copy {
  max-width: 68%;
}

.pass-value {
  right: 20px;
  bottom: 56px;
  display: inline-flex;
  min-width: 86px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  color: #1d4ed8;
  font-size: 31px;
  text-shadow: none;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
  backdrop-filter: blur(12px);
}

.store-card .product-body {
  padding: 16px 17px 17px;
  background: transparent;
}

.product-spec-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.product-spec-list div {
  display: block;
  min-height: 0;
  padding: 9px 11px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
  text-align: center;
}

.product-spec-list div:nth-child(3) {
  border-color: rgba(147, 197, 253, 0.72);
  background: #eff6ff;
}

.product-spec-list div + div {
  border-top-color: rgba(226, 232, 240, 0.86);
}

.product-spec-list strong {
  margin-top: 3px;
  text-align: center;
}

.product-spec-list div:nth-child(3) strong {
  color: #2563eb;
}

.checkout-dock {
  display: block;
  margin-top: 14px;
  padding: 0;
  border: 1px solid rgba(219, 234, 254, 0.9);
  border-radius: 22px;
  background: transparent;
  border: 0;
}

.checkout-dock .buy-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.code-list {
  display: grid;
  gap: 8px;
}

.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.admin-main .grid.cols-4 {
  gap: 13px;
}

.admin-main table {
  min-width: 900px;
}

.admin-main td .input,
.admin-main td .select {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.admin-main td .custom-select {
  min-width: 86px;
}

.admin-main td .custom-select-trigger {
  min-height: 34px;
  padding: 6px 34px 6px 9px;
  border-radius: 10px;
  font-size: 12px;
}

.admin-main td .custom-select-trigger::after {
  right: 13px;
  width: 7px;
  height: 7px;
}

@media (max-width: 1180px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .product-admin-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(203, 213, 225, 0.86);
  }

  .sidebar .brand {
    min-height: 64px;
  }

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

  .main {
    padding: 16px;
  }

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

  .store-hero {
    grid-template-columns: 1fr;
  }

  .user-pill {
    display: none;
  }
}

@media (max-width: 720px) {
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .admin-card-grid,
  .store-products {
    grid-template-columns: 1fr;
  }

  .product-card-fields {
    grid-template-columns: 1fr 1fr;
  }

  .product-card-fields .field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 16px;
  }

  .login-panel,
  .panel,
  .admin-note,
  .store-hero {
    border-radius: 18px;
  }

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

  .main {
    padding: 12px;
  }

  .topbar {
    padding: 14px;
    border-radius: 18px;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .product-card-fields,
  .purchase-panel,
  .checkout-dock {
    grid-template-columns: 1fr;
  }
}

/* Price stage refinement: designed price hierarchy + quantity */
.price-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.78);
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 8%, rgba(96, 165, 250, 0.2), transparent 6rem),
    linear-gradient(135deg, #ffffff, #eff6ff);
}

.price-stage::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.current-price {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.current-price span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.current-price strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 31px;
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-chips {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  align-content: center;
}

.price-chips span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8);
}

.price-chips s {
  color: #94a3b8;
  text-decoration-thickness: 1.5px;
}

.price-chips b {
  color: #2563eb;
}

.checkout-dock {
  display: grid;
  grid-template-columns: minmax(92px, 0.72fr) minmax(138px, 1fr);
  gap: 10px;
  align-items: end;
}

.checkout-dock .buy-btn {
  min-height: 48px;
  display: inline-flex;
  justify-content: center;
}

@media (max-width: 520px) {
  .price-stage,
  .checkout-dock {
    grid-template-columns: 1fr;
  }
}

/* Reduce repeated card-face copy and keep checkout in one row */
.pass-copy p,
.product-kind {
  display: none;
}

@media (max-width: 520px) {
  .checkout-dock {
    grid-template-columns: minmax(82px, 0.7fr) minmax(124px, 1fr);
  }
}

/* Price tag on card face: current/original/discount */
.store-card {
  min-height: 292px;
  grid-template-rows: 170px auto;
}

.pass-copy {
  max-width: 48%;
}

.pass-value {
  display: none;
}

.pass-price-card {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  width: 128px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.16);
  backdrop-filter: blur(14px);
}

.pass-price-card > span {
  display: block;
  color: #2563eb;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.pass-price-card > strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 1;
}

.pass-price-card div {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.pass-price-card small {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.pass-price-card s {
  color: #94a3b8;
  text-decoration-thickness: 1.4px;
}

.pass-price-card b {
  color: #2563eb;
}

.store-card .product-body {
  min-height: auto;
  padding: 14px 17px 17px;
}

.checkout-dock {
  margin-top: 0;
}

@media (max-width: 520px) {
  .pass-copy {
    max-width: 46%;
  }

  .pass-price-card {
    width: 118px;
    right: 14px;
  }

  .pass-price-card > strong {
    font-size: 23px;
  }
}

/* Unified confirmation dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(10px);
}

.confirm-dialog {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(219, 234, 254, 0.8), transparent 9rem),
    #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.confirm-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 24px;
  font-weight: 950;
}

.confirm-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.confirm-copy p {
  margin: 7px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.user-status-summary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 13px;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* Merged agent order/card table */
.code-stack {
  display: grid;
  gap: 7px;
  min-width: 260px;
}

.code-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 12px;
  background: #f8fafc;
}

.code-chip .mono {
  flex: 1 1 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 640px) {
  .confirm-dialog {
    grid-template-columns: 1fr;
  }

  .code-chip .btn { flex: 1 1 auto; }
}

/* Admin order/card filters */
.filter-panel {
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.92)),
    #fff;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto auto;
  gap: 10px;
  align-items: end;
}

.filter-search .input {
  min-width: 0;
}

@media (max-width: 980px) {
  .filter-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .filter-form {
    grid-template-columns: 1fr;
  }
}

/* Agent level management */
.compact-form-grid {
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(100px, 0.5fr) auto;
}

@media (max-width: 760px) {
  .compact-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Account security */
.account-panel {
  max-width: 620px;
}

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

.security-form .btn {
  justify-self: start;
}

.confirm-input {
  margin-top: 12px;
}

/* Farm card sync status */
.sync-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(191, 219, 254, 0.78);
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
}

.sync-status.error {
  border-color: rgba(254, 202, 202, 0.9);
  background: #fff1f2;
  color: #9f1239;
}

.sync-status div {
  display: grid;
  gap: 3px;
}

.sync-status strong {
  font-size: 13px;
  font-weight: 900;
}

.sync-status span,
.sync-status small {
  font-size: 12px;
  font-weight: 750;
  opacity: 0.82;
}
