:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #64748b;
  --text: #e5e7eb;
  --white: #ffffff;
  --line: #1f2937;
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --soft: #f8fafc;
  --soft-text: #0f172a;
  --success: #166534;
  --error: #991b1b;
  --warning: #92400e;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #f8fafc; color: #0f172a; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: linear-gradient(135deg, #111827 0%, #7f1d1d 100%); color: var(--white); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: #dc2626; color: #fff; }
.nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.nav a { color: #fff; opacity: .95; }
.page-shell { padding: 28px 0 48px; }
.hero { background: linear-gradient(135deg, #111827 0%, #7f1d1d 100%); color: #fff; border-radius: 24px; padding: 48px; box-shadow: 0 20px 45px rgba(15,23,42,.15); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.04; margin: 0 0 14px; }
.hero p { font-size: 1.08rem; max-width: 700px; color: #e5e7eb; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.section { padding: 26px 0; }
.section h2 { font-size: 2rem; margin: 0 0 10px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 20px; box-shadow: 0 10px 28px rgba(15,23,42,.06); }
.card h3 { margin-top: 0; }
.kpi { font-size: 2rem; font-weight: 800; margin: 4px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 16px; font-weight: 700; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.2); }
.btn-light { background: #fff; color: #111827; }
.btn-outline { background: #fff; border-color: #d1d5db; }
.form-card { max-width: 740px; margin: 0 auto; }
label { display: block; font-size: .92rem; font-weight: 700; margin-bottom: 6px; }
input, select, textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 12px; padding: 12px 14px; font-size: 1rem; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-row { margin-bottom: 16px; }
.help { color: #64748b; font-size: .92rem; margin-top: 6px; }
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 700; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #fee2e2; color: #991b1b; font-size: .82rem; font-weight: 700; }
.muted { color: #64748b; }
.footer { background: #111827; color: #cbd5e1; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.slug-box, .copy-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 14px; word-break: break-all; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.checkbox-list { display: grid; gap: 10px; }
.checkbox-item { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-item input { width: auto; margin-top: 3px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) {
  .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 28px; }
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-muted { background: #e5e7eb; color: #334155; }
.btn-sm { padding: 8px 12px; font-size: .92rem; }
.btn-danger { border-color: #fecaca; color: #991b1b; }
.compact-actions form { margin: 0; }
.header-split { justify-content: space-between; align-items: center; }
@media (max-width: 860px) {
  .compact-actions { flex-direction: column; align-items: stretch; }
  .compact-actions .btn, .compact-actions form, .compact-actions form .btn { width: 100%; }
  .header-split { align-items: stretch; }
}


.products-layout { align-items: start; }
.product-list { display: grid; gap: 14px; }
.product-row-card { display: grid; grid-template-columns: 92px 1fr; gap: 14px; border: 1px solid #e5e7eb; border-radius: 18px; padding: 14px; background: #fff; }
.product-row-media img, .product-check-card img { width: 100%; height: 84px; object-fit: cover; border-radius: 14px; border: 1px solid #e5e7eb; background: #f8fafc; }
.product-thumb-placeholder { width: 100%; min-height: 84px; display: flex; align-items: center; justify-content: center; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; color: #64748b; font-size: .9rem; text-align: center; padding: 12px; }
.product-row-copy { min-width: 0; }
.product-edit-box { margin-top: 10px; }
.product-edit-box summary { cursor: pointer; font-weight: 700; color: #0f172a; }
.product-inline-form { margin-top: 12px; }
.product-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.product-check-card { display: grid; grid-template-columns: 22px 88px 1fr; gap: 12px; align-items: center; border: 1px solid #e5e7eb; border-radius: 18px; padding: 12px; background: #fff; cursor: pointer; }
.product-check-card input { width: 18px; height: 18px; }
.product-check-copy { display: grid; gap: 5px; }
.product-check-copy small { color: #64748b; }
@media (max-width: 860px) {
  .product-row-card, .product-check-card { grid-template-columns: 1fr; }
  .product-check-card input { width: 20px; height: 20px; }
  .product-check-grid { grid-template-columns: 1fr; }
}


.account-subnav { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 18px; }
.account-subnav-link { display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; border-radius:999px; border:1px solid #d1d5db; background:#fff; color:#0f172a; font-weight:700; }
.account-subnav-link.is-active { background:#111827; border-color:#111827; color:#fff; }
.users-layout { align-items:start; }
.user-list { display:grid; gap:14px; }
.user-row-card { border:1px solid #e5e7eb; border-radius:18px; padding:14px; background:#fff; }
.stats-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:14px; margin: 0 0 16px; }
.stat-card .kpi { margin-top: 6px; }
.filter-bar { display:grid; grid-template-columns: minmax(220px,2fr) repeat(2,minmax(150px,1fr)) auto auto; gap:12px; margin: 0 0 16px; align-items:end; }
.filter-bar input { width:100%; }
.email-copy-box { width:100%; min-height:120px; resize:vertical; }
@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stats-grid, .filter-bar { grid-template-columns: 1fr; }
  .email-copy-box { min-height: 140px; }
}
