:root {
  --ink: #10241a;
  --muted: #5a7266;
  --line: #d7e4db;
  --paper: #f3f7f4;
  --card: #ffffff;
  --forest: #0b4d28;
  --forest-2: #146c38;
  --deep: #07150e;
  --mint: #def6e7;
  --lime: #9be36d;
  --gold: #c9a227;
  --danger: #b42318;
  --info: #175cd3;
  --shadow: 0 1px 2px rgba(7, 21, 14, 0.04), 0 18px 40px rgba(7, 21, 14, 0.07);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -8%, rgba(155, 227, 109, 0.16), transparent 52%),
    linear-gradient(180deg, #f7fbf8 0%, var(--paper) 28%);
}

a { color: var(--forest); }
button, input, select, textarea { font: inherit; }

.shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(155, 227, 109, 0.12), transparent 60%),
    linear-gradient(180deg, #0b2a1b 0%, var(--deep) 100%);
  color: #edf7f0;
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  padding: 12px 14px 14px;
  border-radius: 16px;
  background: #fff;
  border: 0;
}
.rail-brand img {
  width: auto;
  max-width: 100%;
  height: 44px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  object-position: left center;
}
.rail-brand small {
  color: #0b4d28;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rail nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  margin: 14px 10px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7fa392;
}
.nav-label:first-child { margin-top: 2px; }
.rail nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c9ddd2;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 12px;
  position: relative;
}
.rail nav a svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.rail nav a.is-on {
  background: linear-gradient(90deg, rgba(155, 227, 109, 0.18), rgba(255,255,255,0.04));
  color: #fff;
}
.rail nav a.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 99px;
  background: var(--lime);
}
.rail nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-branch { margin: 0; }
.nav-branch-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,0.78);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  position: relative;
}
.nav-branch-toggle svg:first-child {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.nav-branch-caret { margin-left: auto; opacity: 0.7; transition: transform .18s ease; }
.nav-branch.is-open .nav-branch-caret { transform: rotate(180deg); }
.nav-branch-toggle.is-on,
.nav-branch-toggle:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.nav-branch.is-on > .nav-branch-toggle {
  background: linear-gradient(90deg, rgba(155, 227, 109, 0.18), rgba(255,255,255,0.04));
  color: #fff;
}
.nav-branch.is-on > .nav-branch-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 99px;
  background: var(--lime);
}
.nav-branch-menu {
  display: none;
  padding: 2px 0 6px 22px;
}
.nav-branch.is-open .nav-branch-menu { display: grid; gap: 2px; }
.nav-branch-menu a {
  padding: 8px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.nav-branch-menu a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-branch-menu a.is-on {
  background: rgba(155, 227, 109, 0.14);
  color: #fff;
}
.inline-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-edit-row input[type="text"] {
  flex: 1;
  min-width: 120px;
}
.nav-dot {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--lime);
  color: #123016;
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.rail-site {
  margin-top: auto;
  color: #c9ef8a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(155, 227, 109, 0.08);
  border: 1px solid rgba(155, 227, 109, 0.12);
}

.stage { padding: 0 0 48px; min-width: 0; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 22px;
  padding: 22px 28px 18px;
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 8;
}
.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: #8a6d14;
  font-weight: 700;
}
.top h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.top-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.top-title { min-width: 0; }
.bell svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bell {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-decoration: none;
  position: relative;
  color: var(--ink);
}
.bell[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: -4px;
  right: -4px;
  background: #b42318;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

/* ----- Shared dropdowns ----- */
.dash-dropdown { position: relative; }
.dash-dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dash-tool-btn {
  appearance: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}
.dash-tool-btn:hover,
.dash-dropdown.is-open .dash-tool-btn {
  border-color: #bdd2c4;
  background: #f7fbf8;
}
.dash-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(7, 21, 14, 0.12);
  z-index: 40;
}
.dash-dropdown.is-open .dash-dropdown-menu { display: grid; gap: 2px; }
.dash-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.dash-dropdown-menu a:hover { background: #f3faf5; color: var(--forest); }
.dash-dropdown-menu a.is-danger { color: #b42318; }
.dash-dropdown-menu a.is-danger:hover { background: #fef3f2; }

.hero-actions .dash-dropdown-toggle.btn {
  gap: 8px;
}
.hero-actions .dash-dropdown-menu {
  right: 0;
  left: auto;
}

.userchip {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
}
.userchip-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 12px 6px 6px;
  color: inherit;
  min-height: 48px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.userchip-toggle:hover,
.userchip.is-open .userchip-toggle {
  border-color: #bdd2c4;
  box-shadow: 0 8px 20px rgba(7, 21, 14, 0.06);
}
.userchip i {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #0b4d28, #146c38);
  color: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.userchip-meta {
  display: grid;
  gap: 1px;
  text-align: left;
  min-width: 0;
}
.userchip-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.userchip-meta em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.userchip-caret {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.15s;
}
.userchip.is-open .userchip-caret { transform: rotate(180deg); }
.userchip-menu { min-width: 210px; }
.userchip-links { display: none; }

.rail-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 14px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  place-items: center;
  gap: 5px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}
.rail-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.rail-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 21, 14, 0.45);
  z-index: 45;
}
.dash-filter-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.field input[readonly] {
  background: #f3f6f4;
  color: var(--muted);
  cursor: default;
}

.profile-panel {
  max-width: 720px;
}

.canvas { display: grid; gap: 18px; padding: 0 28px; }
.stage > .flash { margin: 0 28px 4px; }

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
}
.flash-success { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.flash-error { background: #fef3f2; color: #b42318; border-color: #fecdca; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -28px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(11, 77, 40, 0.06);
}
.stat::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--forest);
}
.stat:nth-child(2)::after { background: var(--gold); }
.stat:nth-child(3)::after { background: var(--info); }
.stat:nth-child(4)::after { background: #12b76a; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 560; }
.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-list .panel-head {
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.panel h2, .panel h3, .panel-head h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.panel-head h2 { margin: 0; }

.article-view-setting {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 4px;
}
.article-view-setting label {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.article-view-setting select,
.article-view-setting input {
  min-width: 120px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
.article-view-setting select { min-width: 200px; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.table-wrap table { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid #eef3ef; vertical-align: middle; }
th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.table-wrap th {
  background: #f4f8f5;
  position: sticky;
  top: 0;
  z-index: 2;
}
.table-wrap tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f6faf7; }
td a { font-weight: 650; text-decoration: none; }
td small { color: var(--muted); display: inline-block; margin-top: 2px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--mint);
  color: var(--forest);
}
.badge.booked, .badge.confirmed, .badge.pending { background: #fef4d4; color: #854f0b; }
.badge.picked_up, .badge.in_transit { background: #dbeafe; color: #1d4ed8; }
.badge.delivered, .badge.active, .badge.approved { background: #dcfce7; color: #166534; }
.badge.cancelled, .badge.suspended, .badge.rejected { background: #fee4e2; color: #b42318; }
.badge.returned { background: #f3e8ff; color: #6b21a8; }
.badge.voided { background: #f2f4f7; color: #475467; }

th.dash-sn, td.dash-sn {
  width: 56px;
  white-space: nowrap;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.dash-sort {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-sort::after {
  content: "↕";
  opacity: 0.35;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
}
.dash-sort.is-on::after { content: "↓"; opacity: 1; color: var(--forest); }
.dash-sort.is-on.is-asc::after { content: "↑"; }
.dash-grid-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.dash-grid-tools input[type="search"],
.dash-grid-tools select {
  width: auto;
  min-width: 180px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
}
.dash-grid-meta {
  margin: 0 0 0 auto;
  font-size: 13px;
  color: var(--muted);
}
.dash-grid-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.dash-grid-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.dash-grid-pager button {
  min-width: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.dash-grid-pager button:hover:not(:disabled) { background: var(--mint); }
.dash-grid-pager button:disabled { opacity: 0.4; cursor: default; }
.dash-grid-pager button[aria-current="page"] {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.dash-grid-dots { color: var(--muted); padding: 0 4px; }
.dash-grid-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.filters .tabs { margin-bottom: 0; }
.filters input, .filters select,
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
}
.filters input, .filters select { width: auto; min-width: 180px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(11, 77, 40, 0.12);
  border-color: var(--forest);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--forest);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn.secondary { background: #fff; color: var(--forest); border: 1px solid #c5d6cb; }
.btn.ghost { background: var(--mint); color: var(--forest); }
.btn.danger { background: var(--danger); }
.btn:hover { filter: brightness(1.06); }

.grid-2 { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 18px; }
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.check-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 14px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.check-card:hover { border-color: #9cc3aa; }
.check-card.is-on {
  border-color: var(--forest);
  background: #f3faf5;
  box-shadow: inset 0 0 0 1px rgba(11, 77, 40, 0.18);
}
.check-card strong { display: block; font-size: 14px; }
.check-card small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.check-card input { margin-top: 3px; }
.setup-banner {
  background: #f6fbf7;
  border: 1px solid #d5e6db;
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}
.setup-banner .eyebrow { color: var(--forest); }
.setup-banner strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.setup-banner span {
  color: var(--muted);
  font-weight: 600;
}
.setup-banner p { margin: 0; color: var(--muted); }
.settings-card {
  display: grid;
  gap: 8px;
}
.settings-card strong { font-size: 16px; }
@media (max-width: 800px) {
  .check-grid { grid-template-columns: 1fr; }
}

.stack-form { display: grid; gap: 14px; }
.stack-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack-form input, .stack-form select, .stack-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  color: inherit;
  background: #fff;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(11, 77, 40, 0.12);
}
.stack-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack-form .btn { justify-self: start; }
.fields { display: grid; gap: 12px; }
.fields.two { grid-template-columns: 1fr 1fr; }
.fields.three { grid-template-columns: 1.2fr 0.9fr 0.9fr; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 650; color: var(--muted); }
.help { color: var(--muted); font-size: 13px; margin: 0; }

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tabs a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 650;
  font-size: 13px;
}
.tabs a.is-on { background: var(--forest); color: #fff; border-color: var(--forest); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 16px 18px;
  border-left: 2px solid #d7eadc;
}
.timeline li:last-child { border-left-color: transparent; }
.timeline b { display: block; }
.timeline small { color: var(--muted); }

.code {
  background: #0c1c14;
  color: #d7f0df;
  border-radius: 14px;
  padding: 14px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
}
.keybox {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: #f7fbf8;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.keybox code { flex: 1; word-break: break-all; font-size: 13px; color: var(--forest); }

.note-item {
  padding: 12px 0;
  border-bottom: 1px solid #eef3ef;
}
.note-item:last-child { border-bottom: 0; }
.note-item.unread { background: linear-gradient(90deg, #f4fff6, transparent); margin: 0 -8px; padding: 12px 8px; border-radius: 10px; }
.note-item strong { display: block; }
.note-item small { color: var(--muted); }

.login-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--deep);
}
.login-visual {
  background:
    linear-gradient(180deg, rgba(6,21,14,0.15), rgba(6,21,14,0.78)),
    url("../../assets/img/opt/international-shipping.jpg") center/cover;
  color: #fff;
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.login-visual h1 {
  font-weight: 620;
  font-size: 46px;
  letter-spacing: -0.04em;
  max-width: 14ch;
  line-height: 1.05;
  margin: 8px 0 0;
}
.login-visual .eyebrow { color: var(--lime); }
.login-panel {
  background: var(--paper);
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-panel h2 {
  font-size: 36px;
  letter-spacing: -0.04em;
  margin: 6px 0 14px;
}
.role-tabs { display: flex; gap: 8px; margin: 0 0 22px; }
.role-tabs a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  font-weight: 650;
}
.role-tabs a.is-on { background: var(--forest); color: #fff; border-color: var(--forest); }
.sandbox {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
}

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 10%, rgba(182,242,92,0.16), transparent 28%),
    var(--deep);
  color: #fff;
  padding: 24px;
}
.gate-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.gate a, .gate .gate-link {
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  border-radius: 22px;
  padding: 26px;
  min-height: 210px;
  display: block;
  box-shadow: var(--shadow);
}
.gate a strong, .gate .gate-link strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.gate h1 {
  grid-column: 1 / -1;
  font-size: 40px;
  letter-spacing: -0.04em;
  font-weight: 620;
  margin: 0 0 4px;
}

.fee-list { display: grid; gap: 8px; }
.fee-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.hero-banner {
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(155, 227, 109, 0.22), transparent 60%),
    linear-gradient(135deg, #0b2a1b 0%, #0b4d28 55%, #146c38 100%);
  color: #edf7f0;
  border-radius: 22px;
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  box-shadow: var(--shadow);
}
.hero-banner h2 { margin: 0 0 8px; color: #fff; font-size: 24px; letter-spacing: -0.03em; }
.hero-banner p { margin: 0; color: rgba(237, 247, 240, 0.82); max-width: 46ch; line-height: 1.5; }
.hero-banner .btn { background: var(--lime); color: #07150e; border: 0; font-weight: 700; }
.hero-banner .btn.secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  color: #c9ef8a;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.btn-plus {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: var(--forest);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.btn-plus:hover { filter: brightness(1.08); }
.tag-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f4faf6;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.tag-chip:has(input:checked) {
  background: var(--mint);
  border-color: #b7e0c5;
  color: var(--forest);
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 18px;
}
.editor-side { display: grid; gap: 14px; align-content: start; }
.side-card {
  background: #f7fbf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 14px;
}
.cover-preview {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 8px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gallery-item {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.gallery-item img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}
.seo-card h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.tox-tinymce {
  border-radius: 12px !important;
  border: 1px solid var(--line) !important;
}
.panel-head .help { margin: 4px 0 0; }

.dash-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 420px;
  width: calc(100% - 32px);
}
.dash-modal::backdrop {
  background: rgba(7, 21, 14, 0.48);
}
.dash-modal-card {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.dash-modal-card h3 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.dash-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tax-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 650; }

.inline-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.inline-status select {
  min-width: 132px;
  padding: 7px 10px;
  border-radius: 10px;
}
.inline-status .btn {
  padding: 7px 12px;
  font-size: 12px;
}

.service-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.service-switch a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.service-switch a strong { font-size: 13px; }
.service-switch a small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.service-switch a.is-on {
  border-color: var(--forest);
  background: linear-gradient(180deg, #f3fbf5, #fff);
  box-shadow: 0 0 0 3px rgba(11, 77, 40, 0.08);
}
.choice-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.choice-card input { margin-top: 4px; }
.choice-card strong { display: block; }
.choice-card small { color: var(--muted); }

.pw-field {
  position: relative;
  display: block;
}
.pw-field input {
  padding-right: 44px;
  width: 100%;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pw-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.staff-login {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(720px 280px at 50% -8%, rgba(155, 227, 109, 0.22), transparent 58%),
    linear-gradient(180deg, #f4faf6 0%, #eef4f0 100%);
}

.staff-login-wrap {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  justify-items: center;
}

.staff-login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(10, 58, 28, 0.06);
}

.staff-login-mark img {
  height: 42px;
  width: auto;
  display: block;
}

.staff-login-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 26px 24px;
  box-shadow: 0 18px 40px rgba(7, 21, 14, 0.07);
}

.staff-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}

.staff-login-card h1 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.staff-lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.staff-login-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

.staff-alt,
.staff-back {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.staff-back {
  margin: 0;
}

.staff-alt a,
.staff-back a {
  color: var(--forest);
  font-weight: 650;
  text-decoration: none;
}

.staff-alt a:hover,
.staff-back a:hover {
  text-decoration: underline;
}

.staff-login .flash {
  margin-bottom: 14px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.score-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: end;
}
.score-inline .field {
  min-width: 110px;
}
.score-inline input {
  width: 110px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
.content-table td { vertical-align: middle; }
.content-table tbody tr.is-editing { background: #f3f8f4; }
.inline-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.inline-price input[type="number"] {
  width: 110px;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.excerpt-cell {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.45;
}
.who-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
}
.who-cell i {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f3ec;
  color: var(--forest);
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
}
.who-cell a { display: block; }
.who-cell small { display: block; margin-top: 2px; }
.star-meter {
  color: #c88912;
  letter-spacing: 0.12em;
  font-size: 14px;
  white-space: nowrap;
}
.star-meter span { color: #d4ddd6; }
.muted-date {
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
}
.actions-cell { text-align: right; width: 72px; }
.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
.row-actions.is-single a,
.row-actions.is-single button,
.action-menu-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.row-actions.is-single a:hover,
.row-actions.is-single button:hover,
.action-menu-btn:hover,
.action-menu.is-open .action-menu-btn {
  background: #f3faf5;
  border-color: #9cc3aa;
}
.row-actions.is-single .danger,
.row-actions.is-single button.danger {
  color: #b42318;
}
.row-actions.is-single .action-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action-menu-btn svg circle { fill: currentColor; stroke: none; }
.action-menu-list {
  display: none;
  position: fixed;
  min-width: 208px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(7, 21, 14, 0.12);
  z-index: 80;
}
.action-menu.is-open .action-menu-list { display: grid; gap: 2px; }
.action-menu-list form { margin: 0; }
.action-menu-list a,
.action-menu-list button {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.action-menu-list a:hover,
.action-menu-list button:hover { background: #f3faf5; }
.action-menu-list .danger,
.action-menu-list button.danger { color: #b42318; }
.action-menu-list .danger:hover,
.action-menu-list button.danger:hover { background: #fef3f2; }

/* ----- Marketplace desk polish ----- */
.panel-head .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge.pending { background: #fff7e8; color: #b54708; }
.badge.approved,
.badge.active,
.badge.delivered,
.badge.paid { background: #ecfdf3; color: #067647; }
.badge.suspended,
.badge.rejected,
.badge.cancelled { background: #fef3f2; color: #b42318; }
.badge.draft,
.badge.archived,
.badge.booked { background: #f2f4f7; color: #475467; }
.badge.processing,
.badge.confirmed,
.badge.shipped,
.badge.awaiting_transfer,
.badge.awaiting_payment { background: #eff8ff; color: #175cd3; }

.table-wrap table th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  background: #f7fbf8;
}

.mkt-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  background: #f7fbf8;
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.mkt-empty strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }

/* ---- Shop settings ---- */
.ss-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}
.ss-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(15, 40, 28, 0.04);
}
.ss-pill span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.ss-pill strong {
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ss-pill.is-live {
  border-color: rgba(11, 77, 40, 0.28);
  background: linear-gradient(180deg, #f5fbf7, #fff);
}
.ss-pill.is-live strong { color: var(--forest); }

.ss-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding-bottom: 88px;
}
.ss-panel { margin: 0; }
.ss-panel-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.ss-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a6d14;
}
.ss-panel-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.ss-panel-head .help { margin: 0; max-width: 62ch; }

.ss-fields {
  display: grid;
  gap: 14px;
}
.ss-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ss-fields input[type="text"],
.ss-fields input[type="number"],
.ss-fields input[type="password"],
.ss-fields select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fff;
}
.ss-fields input:focus,
.ss-fields select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(11, 77, 40, 0.12);
}
.ss-fields .help {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.ss-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ss-toggle {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafcfb;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-transform: none;
  letter-spacing: 0;
}
.ss-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.ss-toggle-ui {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #d7e3db;
  position: relative;
  transition: background 0.18s ease;
  flex: 0 0 auto;
}
.ss-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 40, 28, 0.18);
  transition: transform 0.18s ease;
}
.ss-toggle.is-on,
.ss-toggle:has(input:checked) {
  border-color: rgba(11, 77, 40, 0.28);
  background: #f3faf5;
  box-shadow: inset 0 0 0 1px rgba(11, 77, 40, 0.08);
}
.ss-toggle.is-on .ss-toggle-ui,
.ss-toggle:has(input:checked) .ss-toggle-ui { background: var(--forest); }
.ss-toggle.is-on .ss-toggle-ui::after,
.ss-toggle:has(input:checked) .ss-toggle-ui::after { transform: translateX(18px); }
.ss-toggle-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-transform: none;
}
.ss-toggle-copy small {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

.ss-gateway-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ss-gateway {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ss-gateway.is-on {
  border-color: rgba(11, 77, 40, 0.3);
  box-shadow: 0 10px 28px rgba(11, 77, 40, 0.06);
}
.ss-gateway .ss-toggle {
  background: transparent;
  border: 0;
  padding: 4px 2px;
  box-shadow: none;
}
.ss-gateway-fields {
  display: grid;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.ss-savebar {
  position: sticky;
  bottom: 14px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(11, 77, 40, 0.16);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(15, 40, 28, 0.12);
}
.ss-savebar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ss-process {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbf8;
}
.ss-process ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.ss-process strong { color: var(--ink); }
.ss-wa-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.ss-wa-box.is-disabled { opacity: 0.72; }
.ss-wa-box .ss-toggle { margin: 0; }
.ss-pill.is-warn {
  border-color: #f0d3a0;
  background: #fffaf0;
}
.ss-pill.is-warn strong { color: #9a6700; }

@media (max-width: 900px) {
  .ss-summary,
  .ss-gateway-grid,
  .ss-grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ss-summary,
  .ss-gateway-grid,
  .ss-grid-2 { grid-template-columns: 1fr; }
  .ss-savebar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .ss-savebar .btn { width: 100%; }
}

.db-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.db-backup-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7fbf8;
  display: grid;
  gap: 10px;
  align-content: start;
}
.db-backup-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.db-backup-card.is-warn {
  background: #fffaf0;
  border-color: #f0d3a0;
}
.db-backup-card .help { margin: 0; }
@media (max-width: 800px) {
  .db-backup-grid { grid-template-columns: 1fr; }
}

.thumb-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.thumb-cell img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  background: #eef5f0;
  border: 1px solid var(--line);
}
.thumb-cell .thumb-fallback {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8f5ec, #d7eadc);
  display: grid;
  place-items: center;
  color: var(--forest);
  font-weight: 700;
  font-size: 12px;
}

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

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .login-body, .grid-2, .stat-row, .fields.two, .fields.three, .gate-card, .hero-banner, .editor-grid, .stack-form .grid-2 { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(288px, 86vw);
    height: 100vh;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  body.rail-open .rail { transform: translateX(0); }
  body.rail-open .rail-backdrop { display: block; }
  .rail-toggle { display: inline-flex; }
  .top {
    padding: 16px 16px 14px 68px;
    align-items: center;
    gap: 12px;
  }
  .top h1 { font-size: 24px; }
  .top-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .login-visual { min-height: 260px; }
  .panel-head { flex-wrap: wrap; align-items: flex-start; }
  .hero-banner { flex-direction: column; align-items: flex-start; }
  .hero-actions { width: 100%; justify-content: flex-start; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .canvas { padding: 18px 16px 40px; }
}

@media (max-width: 640px) {
  .top {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 60px;
  }
  .top-title {
    flex: 1 1 auto;
    min-width: 0;
  }
  .top h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .eyebrow {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .top-tools {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .bell,
  .dash-tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .dash-dropdown-create .dash-tool-btn span { display: none; }
  .userchip-meta,
  .userchip-caret { display: none; }
  .userchip-toggle {
    padding: 4px;
    gap: 0;
    min-width: 40px;
    justify-content: center;
  }
  .userchip i {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .userchip-menu {
    right: 0;
    left: auto;
  }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .panel { padding: 16px; }
}

/* ----- Product admin desk ----- */
.prod-admin {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.prod-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}
.prod-admin .panel-head h2,
.prod-admin .panel-head h3 { margin: 0; }
.prod-admin .panel-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.prod-flags {
  display: grid;
  gap: 10px;
}
.prod-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}
.prod-gallery-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
.prod-gallery-item img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: #f3f7f4;
}
.prod-gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.prod-gallery-actions form { margin: 0; }
.prod-soft {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f7fbf8;
}
.prod-soft h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.prod-variant-row,
.prod-bulk-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.prod-variant-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.prod-variant-form.is-editing {
  border-color: rgba(11, 77, 40, 0.35);
  box-shadow: 0 0 0 3px rgba(11, 77, 40, 0.08);
}
.prod-table-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 96px;
}
.prod-table-actions .btn,
.prod-table-actions button {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}
.prod-table-actions form { margin: 0; }
.btn.danger-outline {
  background: #fff;
  color: #b42318;
  border: 1px solid #f0b4ae;
}
.btn.danger-outline:hover {
  background: #fff5f4;
  border-color: #e59a93;
}
.prod-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding-top: 4px;
}
.prod-form-actions .btn {
  min-width: 132px;
}
.prod-upload-block {
  display: grid;
  gap: 10px;
}
.prod-upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}
.prod-upload-preview-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.prod-upload-preview-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #eef4f0;
}
.prod-upload-preview-item span {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prod-wa-number {
  display: block;
  max-width: 420px;
}
button.linkish {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--forest);
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  cursor: pointer;
}
button.linkish:hover { color: #08361d; }
.prod-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.prod-search-field {
  position: relative;
  display: block;
  margin: 0;
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 320px;
}
.prod-search-field input[type="search"] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  box-shadow: 0 1px 0 rgba(15, 40, 28, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.prod-search-field input[type="search"]::placeholder {
  color: #8a9a90;
}
.prod-search-field input[type="search"]:focus {
  outline: none;
  border-color: #9cc3aa;
  box-shadow: 0 0 0 3px rgba(11, 77, 40, 0.1);
}
.prod-search-field input[type="search"]::-webkit-search-decoration,
.prod-search-field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.prod-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #7a8f82;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.prod-search .btn {
  min-height: 44px;
  padding-inline: 16px;
}
.prod-search-clear {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 4px;
}
.prod-search-clear:hover { color: var(--forest); }

.panel-list .panel-head > div .help {
  margin: 4px 0 0;
}

/* ---- Variations page ---- */
.var-summary {
  margin-top: 18px;
  margin-bottom: 0;
}
.var-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.var-create {
  position: sticky;
  top: 88px;
}
.var-create .panel-head { margin-bottom: 4px; }
.var-list {
  display: grid;
  gap: 16px;
}
.var-card {
  display: grid;
  gap: 16px;
  overflow: hidden;
}
.var-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.var-card-title {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.var-card-title h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.var-card-title .help {
  margin: 2px 0 0;
}
.var-card-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #e8f5ec, #d4eadb);
  color: var(--forest);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.var-rename {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f7fbf8;
}
.var-rename .btn { margin-top: 4px; }
.var-options {
  display: grid;
  gap: 12px;
}
.var-options-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}
.var-options-head h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.var-options-empty {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
  background: #fafcfb;
}
.var-option-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.var-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.var-option-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin: 0;
  min-width: 0;
}
.var-option-edit input[type="text"] {
  min-width: 0;
  margin: 0;
  border-radius: 10px;
}
.var-option-slug {
  font-size: 11px;
  color: var(--muted);
  background: #f3f7f4;
  border-radius: 8px;
  padding: 6px 8px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.var-option-remove { margin: 0; }
.var-add-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed #9cc3aa;
  background: linear-gradient(180deg, #f3faf5, #fff);
  margin: 0;
}
.var-add-option label {
  margin: 0;
  display: grid;
  gap: 6px;
}
.var-add-option label span {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.var-add-option input {
  margin: 0;
  min-height: 42px;
}
.var-add-option .btn {
  min-height: 42px;
  align-self: end;
}
.var-empty { margin: 0; }

.prod-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fafcfb;
}
.prod-empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
  font-size: 15px;
}
.prod-cat-card,
.prod-attr-card {
  display: grid;
  gap: 14px;
}
.prod-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef4f0;
  vertical-align: middle;
  margin-right: 10px;
  display: inline-block;
}
.prod-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.prod-title-cell > div { min-width: 0; }
.prod-title-cell a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.prod-title-cell a:hover { color: var(--forest); }
.prod-title-cell small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 980px) {
  .prod-admin-grid { grid-template-columns: 1fr; }
  .prod-search { width: 100%; }
  .prod-search-field { max-width: none; flex: 1 1 100%; }
  .var-layout { grid-template-columns: 1fr; }
  .var-create { position: static; }
  .var-option-edit {
    grid-template-columns: 1fr;
  }
  .var-option-slug { max-width: none; }
  .var-add-option {
    grid-template-columns: 1fr;
  }
}

