:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --panel-2: #f1f3ef;
  --text: #1b1f1a;
  --muted: #5c6756;
  --accent: #4aa23a;
  --accent-soft: #e7f3e4;
  --border: #d7ded2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.announcement {
  background: var(--accent);
  color: #ffffff;
  text-align: center;
  font-size: 12px;
  padding: 6px 10px;
}

.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  display: grid; place-items: center; font-weight: 800; color: var(--accent);
}
.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  object-fit: cover;
  background: #ffffff;
}
.brand-title { font-size: 18px; font-weight: 800; letter-spacing: 0.2px; }
.brand-sub { font-size: 12px; color: var(--muted); }

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
}
.nav-spacer { flex: 1; }
.top-actions::-webkit-scrollbar { display: none; }
.top-actions { scrollbar-width: none; }
.top-actions a,
.top-actions button {
  font-size: 12px;
}
.user-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.user-btn .user-logout {
  display: none;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e0b4ad;
  color: #a83f2f;
  font-size: 11px;
  font-weight: 700;
  background: #fff6f4;
}
.user-btn.logged-in .user-logout { display: inline-flex; }
.hidden { display: none !important; }
.auth-only,
.admin-only {
  display: none;
}
.auth-card { position: relative; }
.auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 8px;
  line-height: 1;
}
.image-preview {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
}
.p-image-preview {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  max-width: calc(100% - 32px);
}
.toast {
  min-width: 240px;
  max-width: 360px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(27, 31, 26, 0.15);
  animation: toast-in 0.2s ease;
}
.toast--success { border-left-color: #3aa45a; }
.toast--error { border-left-color: #c84a3a; background: #fff6f4; }
.toast--info { border-left-color: var(--accent); }
.toast--hide { opacity: 0; transform: translateY(-6px); transition: all 0.18s ease; }
.toast-body { font-size: 13px; font-weight: 600; }
.toast-bar {
  margin-top: 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(74, 162, 58, 0.25);
  overflow: hidden;
  position: relative;
}
.toast--error .toast-bar { background: rgba(200, 74, 58, 0.25); }
.toast--success .toast-bar { background: rgba(58, 164, 90, 0.25); }
.toast-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(74, 162, 58, 0.9);
  transform: scaleX(0);
  transform-origin: center;
  animation: toast-bar var(--toast-duration, 3000ms) linear forwards;
}
.toast--error .toast-bar::after { background: rgba(200, 74, 58, 0.9); }
.toast--success .toast-bar::after { background: rgba(58, 164, 90, 0.9); }
@keyframes toast-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page { padding: 24px; max-width: 1200px; margin: 0 auto; }

.hero {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px;
  margin-bottom: 28px;
}

.landing {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
}
.landing-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
}
.landing-actions {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.landing-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.landing-extras {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.landing-products {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}
.landing-products h3 {
  margin: 0;
}
.landing-article {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 8px;
}
.landing-article h3 {
  margin: 0;
  font-size: 16px;
}
.landing-article p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.landing-article a {
  font-weight: 700;
  font-size: 13px;
}
.landing-article ul,
.landing-article ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}
.hero h1 { margin: 0 0 8px 0; }
.hero h1 { margin: 0 0 8px 0; }
.hero-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.hero-title { font-weight: 600; margin-bottom: 8px; }
.notice {
  margin-top: 12px; padding: 8px 10px;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: 8px; font-size: 12px;
}

.stepper { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.step {
  padding: 6px 10px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted); font-size: 12px;
}
.step.active { background: var(--accent); color: #ffffff; }

.section { margin-bottom: 32px; }
.section-head { margin-bottom: 12px; }
.section-head h2 { margin: 0 0 6px 0; }
.muted { color: var(--muted); font-size: 13px; }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
.product {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid; gap: 10px;
}
.product-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
}
.product .price { color: var(--text); font-weight: 600; }
.product .meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.product .meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.product .add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.card-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-qty input {
  width: 56px;
  text-align: center;
}
/* Hide number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.grid.three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
label > input,
label > select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
label > textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 90px;
  resize: vertical;
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
}
label > .field-hint {
  margin-top: 4px;
}
input, select {
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.size-options.empty {
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
}
.size-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
.size-option input {
  width: auto;
  margin: 0;
}
.field-error input,
.field-error select,
input.field-error-input,
select.field-error-input {
  border-color: #d6604d;
  box-shadow: 0 0 0 2px rgba(214, 96, 77, 0.18);
}
.label-text { display: inline; }
.required-star {
  color: #b04132;
  font-weight: 700;
  margin-left: 2px;
}
.field-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #b04132;
}

.table { display: grid; gap: 8px; margin-top: 12px; overflow-x: visible; }
.table::-webkit-scrollbar { height: 8px; }
.table::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.row {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.8fr 1fr 0.5fr 0.6fr 0.7fr 0.3fr;
  gap: 8px;
  align-items: center;
}
.row.header { font-size: 12px; color: var(--muted); }

#productEditor .row {
  grid-template-columns: 90px 2fr 120px 110px 100px 0.6fr 90px 110px;
  min-width: 0;
  gap: 10px;
}
#productEditor {
  overflow-x: auto;
}
#productEditor .row {
  min-width: 860px;
}
@media (max-width: 900px) {
  #productEditor .row {
    min-width: 760px;
  }
}
#productEditor .row.item {
  align-items: center;
  text-align: center;
}
#productEditor .row.header { text-align: center; }
#productEditor .row.item > div {
  text-align: center;
}
#productEditor .row.item .actions-inline {
  justify-content: center;
}
#productEditor .row.item input { width: 100%; }
#productEditor .row.item .ghost { padding: 8px 10px; white-space: nowrap; }
.p-landing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.p-landing input { width: auto; }
@media (max-width: 1100px) {
  #productEditor .row { grid-template-columns: 1fr 1fr; }
  #productEditor .row.header { display: none; }
  #productEditor .row.item .ghost { justify-self: start; }
}
.p-image-wrap {
  display: grid;
  gap: 6px;
}
.p-image-preview {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
}
.admin-users .row {
  grid-template-columns: 1.2fr 1.4fr 0.8fr 0.6fr 0.7fr 1.1fr;
}
.admin-users .row.header { font-size: 12px; color: var(--muted); }
.admin-users .row .cell {
  padding: 8px 0;
}
.admin-invites .row {
  grid-template-columns: 1.2fr 1.4fr 0.8fr 1fr 0.6fr 0.9fr 1.1fr;
}
.admin-invites .row.header { font-size: 12px; color: var(--muted); }
.admin-invites .row .cell {
  padding: 8px 0;
}
.actions-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.action-menu {
  position: relative;
  display: inline-flex;
}
.action-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 24px rgba(27, 31, 26, 0.15);
  z-index: 10;
}
.action-menu-list.open {
  display: flex;
}
.action-menu-list .ghost {
  justify-content: flex-start;
  width: 100%;
}
.admin-users .details {
  display: none;
  grid-template-columns: 1fr;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.admin-users .details.open { display: block; }
.admin-users .details .actions {
  margin-top: 10px;
}
.admin-orders .row {
  grid-template-columns: 0.5fr 1.3fr 1.4fr 0.9fr 0.9fr 0.6fr;
}
.admin-orders .row.header { font-size: 12px; color: var(--muted); }
.admin-orders .row .cell {
  padding: 8px 0;
}
.admin-orders .details {
  display: none;
  grid-template-columns: 1fr;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.admin-orders .details.open { display: block; }
.order-details {
  display: grid;
  gap: 12px;
}
.order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.order-items {
  display: grid;
  gap: 6px;
  background: #ffffff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
}
.order-item-row {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 0.8fr 0.8fr 0.6fr 0.8fr;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}
.order-item-head {
  color: var(--muted);
  font-weight: 600;
}
.order-custom {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
}
.order-custom-row strong {
  color: var(--text);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}
.status-badge.pending { background: #fff4d1; border-color: #f0d48a; color: #7a5a12; }
.status-badge.approved { background: #e6f6ea; border-color: #a9ddbb; color: #2f7a2a; }
.status-badge.expired { background: #f8ece9; border-color: #e4b6ae; color: #8c3a2f; }
.status-badge.error { background: #ffe9e6; border-color: #e4b6ae; color: #b04132; }
.status-badge.neutral { background: #eef2f5; border-color: #d5dde3; color: #4b5563; }

.order-list {
  display: grid;
  gap: 12px;
}
.order-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-card-title {
  font-weight: 700;
}
.clubs-table .row {
  grid-template-columns: 1.2fr 1.4fr 1.6fr 0.7fr 0.8fr 1fr;
}
.clubs-table .row.header { font-size: 12px; color: var(--muted); }
.clubs-table .row .cell { padding: 8px 0; }
.clubs-table .actions-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.clubs-table .invite-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.clubs-table .invite-text {
  font-size: 11px;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-items-head {
  display: flex; justify-content: space-between; align-items: center;
}

.totals { display: flex; justify-content: space-between; margin-top: 12px; font-weight: 600; }

.actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}
.cart-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
  height: fit-content;
  position: sticky;
  top: 18px;
}
.cart-panel--mini .cart-summary {
  padding-top: 8px;
}
.cart-panel--mini .actions {
  margin-top: 6px;
}
.cart-panel--mini #cartMsg {
  min-height: 18px;
}
.cart-mini-list {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.cart-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px dashed var(--border);
  background: var(--panel-2);
  border-radius: 10px;
  padding: 8px 10px;
}
.cart-mini-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-mini-row strong {
  color: var(--text);
  white-space: nowrap;
}
.cart-modal-card .cart-items {
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}
.cart-modal-card .cart-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
}
.cart-modal-card .cart-item.cart-item--noimg {
  grid-template-columns: 1fr;
}
.cart-modal-card .cart-item .cart-item-head {
  grid-column: 1 / -1;
}
.cart-modal-card .cart-item .cart-item-meta {
  grid-column: 1 / -1;
}
.cart-modal-card .cart-item .cart-custom {
  grid-column: 1 / -1;
}
.cart-modal-card .cart-item .cart-qty {
  grid-column: 1 / -1;
}
.cart-modal-card .cart-thumb {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
}
.cart-size-group {
  display: grid;
  gap: 6px;
}
.cart-size-label {
  font-size: 12px;
  color: var(--muted);
}
.cart-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.size-chip,
.color-chip {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.chip-disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}
.size-chip:hover,
.color-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(27, 31, 26, 0.12);
}
.size-chip.active,
.color-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.cart-modal-card {
  width: min(980px, 92vw);
}
.cart-modal-card .cart-items {
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cart-items {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}
.cart-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel-2);
  display: grid;
  gap: 8px;
}
.cart-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.cart-item-name {
  font-weight: 700;
  font-size: 13px;
}
.cart-checkout-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.cart-checkout-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.cart-item-remove {
  font-size: 12px;
}
.cart-item-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cart-item-meta select {
  width: 100%;
}
.cart-custom {
  display: grid;
  gap: 8px;
}
.cart-custom-block {
  display: grid;
  gap: 6px;
}
.cart-custom-label {
  font-size: 12px;
  font-weight: 700;
}
.cart-custom-list {
  display: grid;
  gap: 6px;
}
.cart-custom-list input {
  width: 100%;
}
.cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-qty button {
  padding: 6px 8px;
}
.cart-qty input {
  width: 52px;
  text-align: center;
}
.cart-summary {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

button, .ghost, .primary {
  padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.ghost { background: transparent; }
.ghost.danger { color: #a83f2f; border-color: #e0b4ad; }
.ghost.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
button:hover,
.ghost:hover,
.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(27, 31, 26, 0.12);
}
button:active,
.ghost:active,
.primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 4px rgba(27, 31, 26, 0.16);
}
/* Slight text outline for colored backgrounds */
.primary,
.step.active,
.announcement {
  text-shadow: 0 0 0.8px rgba(0, 0, 0, 0.4);
}
button:focus-visible,
.ghost:focus-visible,
.primary:focus-visible {
  outline: 2px solid rgba(74, 162, 58, 0.35);
  outline-offset: 2px;
}
.ghost.auth-close:hover {
  background: var(--accent-soft);
}
.ghost.auth-close:active {
  background: #d9ead6;
}

.file-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.file-btn input[type="file"] {
  position: absolute;
  left: -9999px;
}

.email-preview {
  margin-top: 14px; padding: 12px; border-radius: 10px;
  background: #f0f3ee; border: 1px dashed var(--border);
  font-family: Consolas, "Courier New", monospace; font-size: 12px; white-space: pre-wrap;
}

.footer {
  padding: 18px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between;
}

.auth-gate {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 10, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  width: 320px;
  display: grid;
  gap: 10px;
}
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 998;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 12, 0.6);
}
.modal-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  width: min(860px, 92vw);
  max-height: 86vh;
  overflow: auto;
  z-index: 1;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.landing-editor-list {
  display: grid;
  gap: 10px;
}
.landing-block {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.landing-block .block-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.editor-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.editor-toolbar button {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-weight: 600;
  cursor: pointer;
}
.editor-area {
  min-height: 90px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
.landing-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel-2);
}
.twofa-info {
  margin-top: 8px;
  font-size: 12px;
  white-space: pre-wrap;
}
.toggle {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.toggle .toggle-inline {
  grid-column: 1 / -1;
  grid-row: 2;
}
.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.toggle-inline input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--border);
  border: 1px solid var(--border);
  position: relative;
  display: inline-block;
}
.toggle-ui::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.toggle-inline input:checked + .toggle-ui {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-inline input:checked + .toggle-ui::after {
  transform: translateX(18px);
  border-color: var(--accent);
}
.toggle-inline input:disabled + .toggle-ui {
  opacity: 0.6;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr 1fr; }
  .row.header { display: none; }
  .shop-layout { grid-template-columns: 1fr; }
  .cart-panel { position: static; }
}







.admin-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
}
.admin-group .ghost {
  border: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
}
.admin-group .ghost + .ghost {
  position: relative;
}
.admin-group .ghost + .ghost::before {
  content: '|';
  color: var(--border);
  margin-right: 8px;
}

/* Modernized look for all pages */
body {
  background: radial-gradient(circle at top left, #f8fafc 0%, #f3f5f7 40%, #eef2f3 100%);
  color: #121715;
}
.announcement {
  background: linear-gradient(90deg, #3a8f2f 0%, #4aa23a 60%, #5bb54a 100%);
  letter-spacing: 0.2px;
}
.topbar {
  border-bottom: 1px solid #e4e9e3;
  box-shadow: 0 6px 18px rgba(20, 30, 20, 0.06);
}
.page {
  max-width: 1280px;
}
.card,
.modal-card,
.auth-card {
  background: #ffffff;
  border: 1px solid #e3e8e2;
  box-shadow: 0 18px 40px rgba(15, 22, 15, 0.08);
}
.section-head h2 {
  font-size: 22px;
  letter-spacing: 0.2px;
}
.line-items-head h3 {
  font-size: 18px;
}
.muted {
  color: #5b645c;
}
.table {
  background: #f7f9f7;
  border: 1px solid #e3e8e2;
  border-radius: 12px;
  padding: 8px 12px;
}
#productEditor .row.header {
  font-weight: 600;
  color: #49534b;
}
#productEditor .row:not(.header) {
  padding: 8px 0;
  border-top: 1px solid #e4e9e3;
}
#productEditor .row:first-of-type {
  border-top: 0;
}
input,
select {
  background: #f7f9f7;
  border-color: #e1e7df;
}
button,
.ghost,
.primary {
  border-radius: 10px;
  font-weight: 700;
}
.ghost {
  background: #f4f7f4;
  border-color: #e1e7df;
}
.primary {
  background: linear-gradient(180deg, #52b644 0%, #3f9b33 100%);
  border-color: #3f9b33;
  box-shadow: 0 6px 16px rgba(63, 155, 51, 0.28);
}
.primary:hover {
  box-shadow: 0 10px 20px rgba(63, 155, 51, 0.32);
}
.admin-group {
  background: #f4f7f4;
  border-color: #e1e7df;
}





