:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #222;
  --border: #2a2a2a;
  --accent: #F5C227;
  --accent-dark: #d4a41f;
  --text: #f0f0f0;
  --muted: #888;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --sidebar-w: 230px;
  --accent-soft: rgba(245,194,39,.14);
  --accent-line: rgba(245,194,39,.32);
}

/* Modo claro — unificado con el ecosistema VANISUR (toggle admin-theme.js).
   El acento de marca (--accent) y los colores semánticos no cambian. */
[data-theme="light"] {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface2: #f0f0f2;
  --border: #e2e2e8;
  --text: #1d1d1f;
  --muted: #6b6b70;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Scrollbars finos y oscuros (reemplazan el scrollbar gris feo de Windows) */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s;
}

.sidebar-brand {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 64px;
}

.sidebar-brand img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}

.sidebar-brand .brand-name {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  padding: 12px 10px 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s, color .12s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
}

.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: rgba(245,194,39,.1); color: var(--accent); }

.nav-link svg { flex-shrink: 0; width: 16px; height: 16px; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #111;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 20px;
}

.nav-lock {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.plan-pill {
  margin: 10px 10px 14px;
  background: rgba(245,194,39,.08);
  border: 1px solid rgba(245,194,39,.2);
  border-radius: 10px;
  padding: 10px 12px;
}

.plan-pill .pp-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.plan-pill .pp-name { font-size: 13px; font-weight: 800; color: var(--accent); margin-top: 2px; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

/* ── Main layout ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 12px;
}

.topbar-title { font-size: 16px; font-weight: 800; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.content { padding: 28px 32px; flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; }

/* ── Store status card ── */
.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
  transition: border-color .3s, background .3s;
}

.status-card.open {
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.04);
}

.status-card.closed {
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.03);
}

.status-info .s-title { font-size: 16px; font-weight: 800; }
.status-info .s-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ── Toggle ── */
.toggle { position: relative; width: 52px; height: 28px; cursor: pointer; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 14px;
  transition: background .25s;
}
.toggle-thumb {
  position: absolute;
  width: 20px; height: 20px;
  top: 4px; left: 4px;
  background: #666;
  border-radius: 50%;
  transition: transform .25s, background .25s;
}
.toggle input:checked ~ .toggle-track { background: rgba(34,197,94,.25); }
.toggle input:checked ~ .toggle-thumb { transform: translateX(24px); background: var(--success); }

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 900; line-height: 1; }
.stat-value.accent { color: var(--accent); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title { font-size: 14px; font-weight: 700; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { background: var(--accent-dark); }

/* Botón "Quitar fondo" del editor de producto */
.btn-quitar-fondo {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--accent-line, #d0d0d5);
  border-radius: 8px;
  background: var(--accent-soft, rgba(0,0,0,.05));
  color: var(--text, #1e1e1e);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-quitar-fondo:hover { background: var(--accent); color: #111; border-color: var(--accent); }
.btn-quitar-fondo:disabled { opacity: .7; cursor: default; }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface2); border-color: #444; }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface2); }

.btn-danger { background: rgba(239,68,68,.12); color: var(--danger); border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.22); }

.btn-success { background: rgba(34,197,94,.12); color: var(--success); border: 1px solid rgba(34,197,94,.25); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Product grid ── */
.product-grid-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.pc-admin {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s;
  display: flex;
  flex-direction: column;
}

.pc-admin:hover { border-color: #3a3a3a; }
.pc-admin[draggable="true"] { cursor: grab; }
.pc-admin.dragging { opacity: .4; }
.pc-admin.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }

/* Barra de reordenamiento de productos */
.reorder-bar-admin {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 4px 0 14px;
}
.reorder-bar-admin .rba-hint { font-size: 12.5px; color: var(--muted); }

/* Orden de categorías en la tienda */
.cat-order-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 4px 0 14px; }
.cop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cat-order-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-order-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2, #2d2d2d); border: 1px solid var(--border); color: var(--text);
  border-radius: 20px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: grab; user-select: none;
}
.cat-order-chip .coc-grip { color: var(--muted); font-size: 14px; }
.cat-order-chip.dragging { opacity: .4; }
.cat-order-chip.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }

/* Backups / copias de seguridad */
.backup-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.backup-row:last-child { border-bottom: none; }
.backup-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Alertas operativas del dashboard (stock) */
.ops-alerts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ops-alert {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 700;
  border: 1px solid transparent; transition: filter .15s;
}
.ops-alert:hover { filter: brightness(1.12); }
.ops-alert b { font-size: 15px; font-weight: 900; }
.ops-alert.danger { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.35); color: #f87171; }
.ops-alert.warn   { background: rgba(245,194,39,.14); border-color: rgba(245,194,39,.4); color: var(--accent); }

.pc-admin .pc-img {
  width: 100%; aspect-ratio: 4 / 3;
  object-fit: contain;            /* muestra el producto completo (latas/botellas/hamburguesas altas) sin recortar */
  background: var(--surface2);
  padding: 6px;
  display: block;
}

.pc-admin .pc-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.pc-admin .pc-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.pc-admin .pc-cat { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.pc-admin .pc-price { font-size: 16px; font-weight: 900; color: var(--accent); }
.pc-admin .pc-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform .2s;
}

.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.modal-title { font-size: 17px; font-weight: 800; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 0 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 7px;
}

input[type=text], input[type=number], input[type=email],
input[type=password], input[type=tel], input[type=url],
input[type=color], select, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.input-prefix-group { display: flex; }
.input-prefix {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 9px 0 0 9px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.input-prefix-group input { border-radius: 0 9px 9px 0; }

/* ── Image upload ── */
.img-upload {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s;
  position: relative;
}

.img-upload:hover { border-color: var(--accent); }

.img-upload input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background: none;
}

.img-upload p { font-size: 13px; color: var(--muted); margin-top: 4px; }

#imgPreview, #logoPreview, #bannerPreview {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
}
/* Preview de producto y logo: mostrar la imagen COMPLETA (sin recortar) para que
   coincida con cómo se ve en la grilla (object-fit: contain). El banner sí va cover. */
#imgPreview, #logoPreview { object-fit: contain; background: var(--surface2); }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 9px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  transition: all .15s;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Alerts ── */
.alert {
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 13.5px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.alert-info { background: rgba(245,194,39,.07); border: 1px solid rgba(245,194,39,.2); color: #ccc; }
.alert-success { background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.2); color: #ccc; }
.alert-danger { background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.2); color: #ccc; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success { background: rgba(34,197,94,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,.15);  color: var(--danger); }
.badge-muted   { background: var(--surface2); color: var(--muted); }
.badge-accent  { background: rgba(245,194,39,.15); color: var(--accent); }

/* ── Orders ── */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-card:hover { border-color: #3a3a3a; }

.order-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  font-family: 'Bebas Neue', sans-serif;
  min-width: 52px;
  text-align: center;
}

.order-info { flex: 1; }
.order-client { font-weight: 700; font-size: 14px; }
.order-items { font-size: 12px; color: var(--muted); margin-top: 2px; }
.order-total { font-size: 15px; font-weight: 800; color: var(--accent); }

.order-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  transition: all .15s;
}

.filter-btn.active { background: var(--accent); color: #111; border-color: var(--accent); }

/* ── Instructions list ── */
.steps { counter-reset: step; list-style: none; padding: 0; }

.steps li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 14px;
  color: #ccc;
  line-height: 1.5;
}

.steps li::before {
  content: counter(step);
  background: rgba(245,194,39,.12);
  color: var(--accent);
  font-weight: 800;
  font-size: 11px;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.steps li a { color: var(--accent); }

/* ── Key display ── */
.key-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--success);
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

/* ── Feature locked ── */
.feature-locked-wrap { position: relative; }

.locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,15,.88);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 5;
  backdrop-filter: blur(2px);
}

.locked-overlay .lock-icon { font-size: 28px; color: var(--muted); margin-bottom: 10px; }
.locked-overlay p { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  display: block;
  width: 64px; height: 64px;
  object-fit: contain;
  margin: 0 auto 10px;
  border-radius: 12px;
}

.login-title { text-align: center; font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.login-sub { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.powered-by { text-align: center; font-size: 11px; color: var(--muted); margin-top: 20px; }
.powered-by a { color: var(--accent); text-decoration: none; font-weight: 700; }

/* ── License banner ── */
.license-banner {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #f87171;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Misc utils ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-muted { color: var(--muted); font-size: 13px; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .product-grid-admin { grid-template-columns: 1fr 1fr; }
  .mobile-menu-btn { display: flex !important; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  font-size: 20px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

.sidebar-backdrop.active { display: block; }

/* ── Zonas de entrega (CRUD con costo + delivery avanzado) ── */
.zonas-list { display: flex; flex-direction: column; gap: 10px; }
.zona-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px;
}
.zona-row {
  display: flex; align-items: center; gap: 10px;
}
.zona-row2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.zona-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zona-f span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.zona-f input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit;
}
.zona-f input:focus { outline: none; border-color: var(--accent); }
.zona-retiro-lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.zona-retiro-lbl input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
@media (max-width: 560px) { .zona-row2 { grid-template-columns: 1fr; } }
.zona-row .zona-nombre {
  flex: 1 1 auto; min-width: 0; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit;
}
.zona-row .zona-nombre:focus { outline: none; border-color: var(--accent); }
.zona-costo-wrap { display: flex; align-items: center; gap: 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; flex: 0 0 110px; }
.zona-costo-wrap span { color: var(--muted); font-weight: 700; }
.zona-costo-wrap .zona-costo { width: 100%; background: none; border: none; color: var(--text); padding: 9px 0; font-size: 14px; font-family: inherit; outline: none; }
.zona-act-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; flex: 0 0 auto; }
.zona-act-lbl input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.zona-ord { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.zona-ord button {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font-size: 15px; font-weight: 800; cursor: pointer; line-height: 1;
}
.zona-ord button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.zona-ord button:disabled { opacity: .35; cursor: default; }
.zona-ord .zona-del { color: var(--red, #f87171); }
.zona-ord .zona-del:hover { border-color: var(--red, #f87171); color: var(--red, #f87171); }
@media (max-width: 560px) {
  .zona-row { flex-wrap: wrap; }
  .zona-row .zona-nombre { flex: 1 1 100%; }
}

/* ── Recepción de pedidos (cards por opción, lock + upsell por plan) ── */
.recep-block { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.recep-opt {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1.5px solid var(--border); border-radius: 12px; padding: 14px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.recep-opt:hover { border-color: var(--muted); }
.recep-opt.sel { border-color: var(--accent); background: rgba(245,194,39,.07); }
.recep-opt.locked { cursor: default; opacity: .82; background: var(--surface2); }
.recep-opt input[type=radio] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; cursor: pointer; }
.recep-opt.locked input[type=radio] { cursor: default; }
.recep-main { min-width: 0; }
.recep-title { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recep-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--accent);
  background: rgba(245,194,39,.14); border-radius: 20px; padding: 2px 9px; text-transform: uppercase; letter-spacing: .4px; }
.recep-desc { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.recep-badge { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 800; color: var(--green, #22c55e);
  background: rgba(34,197,94,.14); border-radius: 20px; padding: 3px 10px; }
.recep-upsell { margin-top: 9px; font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.recep-cta { background: var(--accent); color: #111; border: none; border-radius: 8px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 800; cursor: pointer; font-family: inherit; }
.recep-cta:hover { filter: brightness(.94); }
/* Flujo visual + beneficio/limitación de cada modo de recepción */
.recep-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.recep-step { background: var(--surface2, #2f2f2f); border: 1px solid var(--border); color: var(--text);
  font-size: 11.5px; font-weight: 800; border-radius: 8px; padding: 4px 9px; white-space: nowrap; }
.recep-opt.sel .recep-step { border-color: rgba(245,194,39,.5); }
.recep-arrow { color: var(--accent); flex: 0 0 auto; }
.recep-benef { font-size: 12.5px; color: var(--text); line-height: 1.45; margin-top: 2px; }
.recep-benef::before { content: '✓ '; color: var(--green, #22c55e); font-weight: 900; }
.recep-limit { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.recep-opt.locked .recep-step { opacity: .8; }

/* ── Acciones rápidas de pedido (avance de estado sin modal) ── */
.pq-actions { display: flex; gap: 6px; margin-top: 2px; }
.pq-btn { border: none; border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; min-height: 36px; }
.pq-btn.pq-adv { background: var(--accent); color: #111; }
.pq-btn.pq-adv:hover { filter: brightness(.94); }
.pq-btn.pq-cancel { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.pq-btn.pq-cancel:hover { border-color: var(--danger, #ef4444); color: var(--danger, #ef4444); }

/* ═══════ Design system canónico VANISUR (importado de la capa compartida) ═══════ */
/* ── Skeletons (placeholder de carga con shimmer — canónico, reemplaza spinners sueltos) ── */
.skeleton { position: relative; overflow: hidden; background: var(--surface2); border-radius: 8px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.045), transparent);
  animation: sk-shimmer 1.3s infinite;
}
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes sk-shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 12px; border-radius: 6px; }
.sk-line.sk-sm { width: 55%; } .sk-line.sk-lg { width: 90%; }
.sk-title { height: 18px; width: 45%; border-radius: 7px; }
.sk-card { height: 96px; border-radius: 14px; }
.sk-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.sk-stack > * + * { margin-top: 10px; }

/* ── Empty state (vacío canónico — mismo en todo el panel y todas las verticales) ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .es-icon {
  width: 46px; height: 46px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px; background: var(--surface2); color: var(--muted);
}
.empty-state .es-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.empty-state .es-text { font-size: 13px; color: var(--muted); max-width: 320px; margin: 0 auto 16px; line-height: 1.5; }

/* ── Searchbar canónica (input con ícono) — reemplaza buscadores ad-hoc ── */
.searchbar { position: relative; flex: 1; min-width: 160px; }
.searchbar svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbar input { padding-left: 34px; }


/* ════════════════════════════════════════════════════════════════════
   Config Engine — sub-sidebar canónica de Configuración (todas las verticales)
   ════════════════════════════════════════════════════════════════════ */
.cfg-layout { display: flex; gap: 24px; align-items: flex-start; }
.cfg-nav {
  flex: 0 0 208px; position: sticky; top: 84px;
  display: flex; flex-direction: column; gap: 1px;
  max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 4px;
}
.cfg-group { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); padding: 14px 10px 5px; }
.cfg-group:first-child { padding-top: 2px; }
.cfg-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-radius: 9px; border: none; background: none;
  color: var(--muted); font-size: 13.5px; font-weight: 500; font-family: inherit;
  cursor: pointer; text-align: left; width: 100%; transition: background .12s, color .12s;
  border-bottom: none; margin-bottom: 0;   /* anula herencia de .tab-btn */
}
.cfg-item:hover { background: var(--surface2); color: var(--text); }
.cfg-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.cfg-lock { font-size: 11px; opacity: .7; }
.cfg-body { flex: 1; min-width: 0; }
.cfg-panel { display: none; }
.cfg-panel.active { display: block; animation: cfg-fade .18s ease; }
@keyframes cfg-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Toggle del engine (mismo look que .toggle, naming propio para no acoplar) */
.cfg-toggle-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; cursor: pointer; text-transform: none; letter-spacing: normal; }
.cfg-toggle { position: relative; width: 52px; height: 28px; flex-shrink: 0; }
.cfg-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cfg-toggle-track { position: absolute; inset: 0; background: var(--border); border-radius: 14px; transition: background .25s; }
.cfg-toggle-thumb { position: absolute; width: 20px; height: 20px; top: 4px; left: 4px; background: #aaa; border-radius: 50%; transition: transform .25s, background .25s; }
.cfg-toggle input:checked ~ .cfg-toggle-track { background: rgba(34,197,94,.25); }
.cfg-toggle input:checked ~ .cfg-toggle-thumb { transform: translateX(24px); background: var(--success); }
.cfg-toggle-label { font-weight: 700; font-size: 14px; display: block; }
.cfg-toggle-help { font-size: 12.5px; color: var(--muted); display: block; margin-top: 2px; }

/* Filas de info (Dominios / Licencia / Integraciones) */
.cfg-info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.cfg-info-row:last-child { border-bottom: none; }
.cfg-info-k { font-size: 13px; color: var(--muted); }
.cfg-info-v { font-size: 13.5px; font-weight: 700; }

/* Moderación de reseñas (config → Reseñas) */
.cfg-resena { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cfg-resena:last-child { border-bottom: none; }
.cfg-resena-main { min-width: 0; }
.cfg-resena-stars { color: var(--accent); font-size: 14px; letter-spacing: 1px; margin-bottom: 4px; }
.cfg-resena-text { font-size: 13.5px; color: var(--text); line-height: 1.5; margin-bottom: 4px; }
.cfg-resena-author { font-size: 12px; color: var(--muted); font-weight: 700; }

@media (max-width: 860px) {
  .cfg-layout { flex-direction: column; }
  .cfg-nav { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; max-height: none; width: 100%; gap: 4px; padding-bottom: 6px; }
  .cfg-nav .cfg-group { display: none; }
  .cfg-item { width: auto; white-space: nowrap; }
  .cfg-item.active { background: var(--accent); color: #fff; }
}
