:root {
  --bg: #F7F5F1; --surface: #FFFFFF; --surface-2: #F1EDE5; --border: #E5DFD3;
  --ink: #1A1305; --ink-secondary: #5C5442; --ink-muted: #96896E;
  --accent: #1A1305; --accent-soft: #F1EDE5; --accent-ink: #FFFFFF;
  --gold: #E8A916; --gold-soft: #FDF1D6; --gold-strong: #FFC72C; --gold-ink: #1A1305;
  --good: #2F9E58; --good-soft: #E3F5E9;
  --warn: #C98A12; --warn-soft: #FBF0DA;
  --critical: #C7383B; --critical-soft: #FBE7E7;
  --nodata: #9C927B; --nodata-soft: #ECE7DC;
  --shadow: 0 1px 2px rgba(26,19,5,0.05), 0 10px 28px rgba(26,19,5,0.09);
  color-scheme: light;
}
/* Paleta fija clara, calida, derivada de la marca (dorado #FFC72C / carbon #1A1305): se ignora el modo oscuro del sistema a proposito. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #F7F5F1; --surface: #FFFFFF; --surface-2: #F1EDE5; --border: #E5DFD3;
    --ink: #1A1305; --ink-secondary: #5C5442; --ink-muted: #96896E;
    --accent: #1A1305; --accent-soft: #F1EDE5; --accent-ink: #FFFFFF;
    --gold: #E8A916; --gold-soft: #FDF1D6; --gold-strong: #FFC72C; --gold-ink: #1A1305;
    --good: #2F9E58; --good-soft: #E3F5E9;
    --warn: #C98A12; --warn-soft: #FBF0DA;
    --critical: #C7383B; --critical-soft: #FBE7E7;
    --nodata: #9C927B; --nodata-soft: #ECE7DC;
    --shadow: 0 1px 2px rgba(26,19,5,0.05), 0 10px 28px rgba(26,19,5,0.09);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  padding: 0; margin: 0; max-width: none;
  display: flex; align-items: flex-start; min-height: 100vh;
}

.app-shell { display: flex; align-items: flex-start; width: 100%; min-height: 100vh; }

.sidebar {
  width: 226px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: #0a0a0a; color: #ffffff;
  padding: 22px 14px; display: flex; flex-direction: column; gap: 26px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.sidebar-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.sidebar-brand span { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 13.5px; line-height: 1.2; color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
  background: none; border: none; color: #ffffff; font-size: 14px; font-weight: 600;
  font-family: inherit; text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.nav-ico { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--gold-strong); color: var(--gold-ink); }

.main-col { flex: 1; min-width: 0; padding: 20px 20px 40px; max-width: 1320px; margin: 0 auto; }

@media (max-width: 900px) {
  body { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; overflow-x: auto; align-items: center; padding: 12px 14px; }
  .sidebar-brand { display: none; }
  .sidebar-nav { flex-direction: row; }
  .nav-item span:last-child { display: none; }
  .nav-ico { font-size: 18px; }
  .main-col { padding: 14px 14px 30px; }
}
h1, h2, h3 { font-family: "Manrope", "Segoe UI", Arial, sans-serif; }
.tabular { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: #FFFFFF; border-radius: 14px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.brand-eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 6px; font-weight: 600; }
h1.title { font-size: 40px; font-weight: 800; margin: 0; letter-spacing: -.02em; line-height: 1; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--good-soft); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.status-badge svg { width: 13px; height: 13px; }

.live-badge { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; color: var(--ink-secondary); letter-spacing: .02em; }
.live-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); animation: liveBlink 1.6s ease-in-out infinite; }
@keyframes liveBlink {
  0% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); }
  70% { opacity: .55; box-shadow: 0 0 0 9px color-mix(in srgb, var(--good) 0%, transparent); }
  100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 0%, transparent); }
}
.live-dot.flash { animation: liveFlash .9s ease-out; }
@keyframes liveFlash {
  0% { background: var(--accent); transform: scale(1.6); }
  100% { background: var(--good); transform: scale(1); }
}

.operator-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.operator-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.filters-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.filters-bar label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
.filters-bar select { min-width: 200px; font-weight: 600; }

.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 17px 18px 18px; box-shadow: var(--shadow); overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold-strong), var(--gold)); opacity: .55; }
.kpi:hover { box-shadow: 0 2px 4px rgba(26,19,5,0.06), 0 14px 34px rgba(26,19,5,0.12); transform: translateY(-1px); }
.kpi-label { font-size: 12px; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.kpi-value { font-size: 27px; font-weight: 800; line-height: 1; }
.kpi-sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-secondary); }
.kpi-value.good { color: var(--good); }
.kpi-value.critical { color: var(--critical); }
.kpi-value.warn { color: var(--warn); }
.producto-card-stock.agotado { color: var(--critical); }
.kpi-costos { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.kpi-costos label { font-size: 10.5px; color: var(--ink-muted); font-weight: 600; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.kpi-costos input { width: 100%; padding: 5px 7px; font-size: 12px; font-family: "IBM Plex Mono", monospace; }

.layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,1fr); gap: 16px; align-items: start; }
@media (max-width: 880px) { .layout { grid-template-columns: 1fr; } .kpi-row { grid-template-columns: repeat(2,1fr); } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.panel-title { font-size: 15.5px; font-weight: 700; position: relative; padding-left: 12px; }
.panel-title::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-strong), var(--gold)); }
.panel-desc { font-size: 12.5px; color: var(--ink-muted); margin: 2px 0 12px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-secondary); margin-bottom: 10px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.map-wrap { position: relative; width: 100%; aspect-ratio: 1/1; max-height: 620px; margin: 0 auto; }
svg.map { width: 100%; height: 100%; display: block; }
path.district { stroke: var(--surface); stroke-width: 1.4; cursor: pointer; transition: filter .12s, stroke-width .12s, fill .25s; }
path.district:hover { filter: brightness(1.08); stroke: var(--ink); stroke-width: 1.6; }
circle.district-marker { stroke: var(--surface); stroke-width: 1.4; cursor: pointer; transition: fill .25s; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow); transform: translate(-50%,-115%); white-space: nowrap; opacity: 0; transition: opacity .1s; z-index: 5; }
.tooltip.show { opacity: 1; }
.tooltip b { font-weight: 700; }

.rank-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.rank-row { display: grid; grid-template-columns: 20px 1fr auto auto; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.rank-row:last-child { border-bottom: none; }

.side-col { display: flex; flex-direction: column; gap: 16px; }
.top-products { display: flex; flex-direction: column; margin-top: 4px; }
.top-product-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.top-product-row:last-child { border-bottom: none; }
.top-product-thumb { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.top-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.top-product-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.top-product-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-product-metric { font-size: 12px; color: var(--ink-muted); }
.top-product-rank { width: 18px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-muted); flex-shrink: 0; }
.top-product-qty { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 700; font-size: 13px; color: var(--accent); flex-shrink: 0; }
.top-product-metric-block { display: flex; align-items: center; gap: 8px; flex-shrink: 0; width: 100px; }
.top-product-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 1px 2px rgba(26,19,5,0.08); }
.top-product-bar-fill { height: 100%; border-radius: 999px; transition: width .3s ease; background-image: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,0)); }
.top-product-pct { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 700; font-size: 12px; flex-shrink: 0; min-width: 34px; text-align: right; }
.top-product-utility { display: block; font-size: 11px; margin-top: 2px; font-weight: 600; }
.top-product-utility.pos { color: var(--good); }
.top-product-utility.neg { color: var(--critical); }

.district-label { font-family: "IBM Plex Sans", sans-serif; font-weight: 700; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.6); stroke-width: 2.2px; stroke-linejoin: round; }
.district-label tspan:first-child { font-size: 5.6px; letter-spacing: .01em; }
.district-label tspan.district-label-pct { font-size: 6.4px; font-family: "IBM Plex Mono", monospace; }
.labels-layer { pointer-events: none; }
.rank-idx { color: var(--ink-muted); font-size: 11.5px; }
.rank-name { font-weight: 600; }
.rank-orders { color: var(--ink-muted); font-size: 12px; }
.rank-pct { font-family: "IBM Plex Mono", monospace; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 12.5px; }
.pct-good { color: var(--good); background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 28%, transparent); }
.pct-warn { color: var(--warn); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); }
.pct-critical { color: var(--critical); background: var(--critical-soft); border: 1px solid color-mix(in srgb, var(--critical) 28%, transparent); }
.pct-nodata { color: var(--ink-muted); background: var(--nodata-soft); border: 1px solid color-mix(in srgb, var(--ink-muted) 22%, transparent); }

.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab-btn { border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-secondary); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tab-btn.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.pedidos-panel { margin-top: 16px; }
.pedidos-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.pedidos-toolbar input[type=text] { flex: 1; min-width: 180px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=file], select, input[type=number], textarea { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font-size: 13px; color: var(--ink); font-family: "IBM Plex Sans", sans-serif; }
textarea { width: 100%; resize: vertical; }
input.tabular { font-family: "IBM Plex Mono", monospace; }
select { cursor: pointer; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button.btn { background: var(--accent); color: var(--accent-ink); border: none; border-radius: 11px; padding: 9px 16px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(26,19,5,0.12); transition: filter .15s ease, transform .1s ease, box-shadow .15s ease; }
button.btn:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(26,19,5,0.16); }
button.btn:active { transform: translateY(0); filter: brightness(1.02); }
button.btn.secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); box-shadow: none; }
button.btn.danger { background: var(--critical-soft); color: var(--critical); border: 1px solid color-mix(in srgb, var(--critical) 35%, transparent); box-shadow: none; }

.table-scroll { max-height: 480px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
table.pedidos-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 820px; }
table.pedidos-table thead th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 10px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-secondary); font-weight: 700; border-bottom: 2px solid var(--border); z-index: 2; }
table.pedidos-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.pedidos-table tbody tr:hover { background: var(--surface-2); }
.prod-thumb { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cell-cliente { display: flex; flex-direction: column; }
.cell-cliente .nom { font-weight: 600; }
.cell-cliente .tel { font-family: "IBM Plex Mono", monospace; color: var(--ink-muted); font-size: 11.5px; }
.cell-producto .pname { font-weight: 500; }
.cell-producto .pqty { color: var(--ink-muted); font-size: 11.5px; }
.badge-recurrente { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.status-select { font-size: 12px; font-weight: 700; padding: 6px 9px; border-radius: 999px; border: 1px solid transparent; }
.status-Entregado { background: var(--good-soft); color: var(--good); }
.status-Rechazado { background: var(--critical-soft); color: var(--critical); }
.status-Devuelto { background: var(--warn-soft); color: var(--warn); }
.status-Pendiente { background: var(--nodata-soft); color: var(--ink-secondary); }
.price-cell { font-family: "IBM Plex Mono", monospace; }
.row-actions button { background: none; border: none; color: var(--ink-muted); cursor: pointer; font-size: 15px; padding: 2px 4px; }
.row-actions button:hover { color: var(--critical); }
.row-count { font-size: 12px; color: var(--ink-muted); margin-top: 8px; }

.add-form { display: none; grid-template-columns: repeat(6,1fr); gap: 8px; margin-bottom: 12px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.add-form.show { display: grid; }
.add-form label { font-size: 11px; color: var(--ink-muted); font-weight: 600; display: block; margin-bottom: 4px; }
.add-form .field { display: flex; flex-direction: column; }
.add-form input, .add-form select { width: 100%; }
.add-form .field.span2 { grid-column: span 2; }
.add-form .actions { grid-column: 1/-1; display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 880px) { .add-form { grid-template-columns: repeat(2,1fr); } .add-form .field.span2 { grid-column: span 2; } }

.empty-state { text-align: center; padding: 30px 12px; color: var(--ink-muted); font-size: 13px; }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.chart-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 10px; }
.chart-box-title { font-size: 13px; font-weight: 700; margin: 0 0 10px; color: var(--ink-secondary); }
.chart-box-wide { margin-top: 16px; }
@media (max-width: 880px) { .charts-grid { grid-template-columns: 1fr; } }

.cell-distrito { max-width: 260px; cursor: help; }
.dist-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: 13px; }
.operator-chip { display: inline-flex; align-items: center; gap: 6px; }

.row-actions-inner { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.row-actions .verBtn { background: var(--ink); color: #fff; border: none; border-radius: 999px; padding: 6px 12px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.row-actions .verBtn:hover { color: #fff; background: var(--ink); }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(19,19,21,.5); z-index: 60; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); max-width: 460px; width: 100%; max-height: 85vh; overflow: auto; padding: 26px 24px 20px; position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--surface-2); border: none; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; line-height: 1; cursor: pointer; color: var(--ink-secondary); }
.modal-title { font-size: 19px; font-weight: 800; margin: 0 0 2px; font-family: "Manrope", sans-serif; padding-right: 30px; }
.modal-sub { font-size: 12.5px; color: var(--ink-muted); margin: 0 0 16px; }
.modal-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.modal-row:last-child { border-bottom: none; }
.modal-row .label { color: var(--ink-muted); font-weight: 600; flex-shrink: 0; }
.modal-row .value { text-align: right; }

.brand-block { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 92px; height: 92px; border-radius: 12px; object-fit: contain; background: #fff; }
.app-footer { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; padding: 20px 0 4px; border-top: 1px solid var(--border); }
.footer-logo { width: 60px; height: 60px; border-radius: 10px; object-fit: contain; }
.footer-text { text-align: left; }
.footer-brand { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; }
.footer-sub { margin: 2px 0 0; font-size: 11px; color: var(--ink-muted); }

/* --- Cuenta / roles / wallet / shopify modal --- */
.account-box { display: flex; align-items: center; gap: 8px; padding-left: 8px; margin-left: 4px; border-left: 1px solid var(--border); }
.account-info { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.25; margin-right: 2px; }
.account-name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.account-rol { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-muted); }
body.is-dropshipper .admin-only { display: none !important; }
.status-En-proceso { background: var(--nodata-soft); color: var(--ink-secondary); }
.status-badge-plain { font-size: 12px; font-weight: 700; padding: 6px 9px; border-radius: 999px; display: inline-block; }
.msg-box { font-size: 13px; padding: 10px 13px; border-radius: 10px; margin-bottom: 14px; }
.msg-box.error { background: var(--critical-soft); color: var(--critical); }
.msg-box.ok { background: var(--good-soft); color: var(--good); }
.wallet-saldo-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 48px 24px; margin-bottom: 20px; text-align: center; }
.wallet-saldo-card .valor { font-size: 58px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; line-height: 1.1; }
.wallet-saldo-card .valor.neg { color: var(--critical); }
.wallet-saldo-card .valor.pos { color: var(--good); }
.wallet-saldo-card .kpi-sub { text-align: center; }
.wallet-saldo-card #btnSubirWallet { margin-left: auto; margin-right: auto; display: block; }

/* ============================================================
   Wallet: contenedor centrado + panel de branding lateral para
   llenar el espacio en blanco de pantallas anchas.
   ============================================================ */
.wallet-shell {
  max-width: 1360px;
  margin: 24px auto 48px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
  box-sizing: border-box;
}
.wallet-main { min-width: 0; }
.wallet-tabs { justify-content: center; }
.proyeccion-transito-head { justify-content: center; }
.proyeccion-riesgo-head { justify-content: center; position: relative; }
.proyeccion-riesgo-badge { position: absolute; right: 0; }
.wallet-branding {
  position: sticky;
  top: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 20px 26px;
  box-shadow: var(--shadow);
}
.wallet-branding-img { width: 148px; height: 148px; object-fit: cover; border-radius: 50%; border: 3px solid var(--accent-soft); margin-bottom: 4px; }
.wallet-branding-logo { width: 120px; opacity: .92; margin-top: 4px; }
.wallet-branding-title { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 16px; margin: 6px 0 0; }
.wallet-branding-sub { font-size: 12.5px; color: var(--ink-muted); line-height: 1.55; margin: 0; }
.wallet-branding-divider { width: 40px; height: 2px; background: var(--border); border-radius: 999px; margin: 8px 0; }
.wallet-branding-quote { font-size: 12px; font-style: italic; color: var(--ink-secondary); margin: 0; line-height: 1.5; }
@media (max-width: 1180px) {
  .wallet-shell { grid-template-columns: 1fr; margin-top: 20px; padding: 0 18px; }
  .wallet-branding { order: -1; position: static; flex-direction: row; text-align: left; padding: 16px 18px; }
  .wallet-branding-img { width: 72px; height: 72px; margin-bottom: 0; }
  .wallet-branding-logo { display: none; }
  .wallet-branding-divider { display: none; }
  .wallet-branding-quote { display: none; }
}

/* ============================================================
   Wallet: header apilado (sin logo del toro arriba), boton
   "volver al dashboard" debajo del titulo.
   ============================================================ */
.wallet-top {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 28px 22px;
  box-sizing: border-box;
}
.wallet-top-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.wallet-back-btn { cursor: pointer; }
.title-3d {
  color: #17130a;
  text-shadow:
    1px 1px 0 #e4b73f,
    2px 2px 0 #d6a935,
    3px 3px 0 #c89b2b,
    4px 4px 0 #ba8d21,
    5px 5px 10px rgba(0,0,0,.28);
}

/* ============================================================
   Wallet: franja motivacional de color entre el balance y las
   pestañas, para llenar el espacio en blanco con branding.
   ============================================================ */
.wallet-motivation-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, var(--warn-soft) 0%, var(--accent-soft) 100%);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.wms-ico { font-size: 22px; flex-shrink: 0; }
.wms-text { font-size: 13px; font-weight: 600; font-style: italic; color: var(--ink-secondary); line-height: 1.4; }

.wallet-saldo-card-gold {
  background: linear-gradient(160deg, var(--surface) 0%, var(--warn-soft) 140%);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
}

/* ============================================================
   Wallet: panel de branding lateral, mas color y mas contenido
   motivacional para llenar el espacio vacio de pantallas anchas.
   ============================================================ */
.wallet-branding {
  background: linear-gradient(180deg, var(--warn-soft) 0%, var(--surface) 55%, var(--surface-2) 100%);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--border));
}
.wb-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--warn); color: #fff; font-size: 10.5px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  margin-bottom: 4px;
}
.wb-quote-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; width: 100%; box-sizing: border-box;
}
.wallet-branding-quote { font-size: 12px; font-style: italic; color: var(--ink-secondary); margin: 0; line-height: 1.5; }
.wb-mindset-list { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; }
.wb-mindset-item {
  display: flex; align-items: center; gap: 9px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px; font-size: 11.5px; font-weight: 600; color: var(--ink-secondary);
}
.wb-mindset-ico { font-size: 15px; flex-shrink: 0; }

.panel-alerta-retiro { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 12%, transparent); }
.wb-badge-alerta { background: var(--warn); color: #fff; }

/* ============================================================
   Cuentas de pago: tarjeta con todos los datos visibles y
   copiables (exchange, correo, red, direccion completa).
   ============================================================ */
.cuentas-detalle-list { display: flex; flex-direction: column; gap: 12px; }
.cuenta-detalle-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.cuenta-detalle-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cuenta-detalle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.cuenta-detalle-full { grid-column: 1 / -1; }
.cuenta-detalle-label { display: block; font-size: 10.5px; color: var(--ink-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.cuenta-detalle-valor { display: block; font-size: 13px; color: var(--ink); word-break: break-all; user-select: all; }
.cuenta-detalle-mono { font-family: "IBM Plex Mono", monospace; background: var(--surface-2); border-radius: 6px; padding: 6px 8px; }
@media (max-width: 640px) {
  .cuenta-detalle-grid { grid-template-columns: 1fr 1fr; }
}



.wallet-branding-left {
  background: linear-gradient(180deg, #efeaff 0%, var(--surface) 55%, var(--surface-2) 100%);
  border-color: color-mix(in srgb, #7b5cff 30%, var(--border));
}
.wb-badge-purple { background: #7b5cff; }
.wallet-branding-img-purple { border-color: #d8cdff; }
@media (max-width: 1180px) {
  .wallet-branding-left { order: -2; }
}

.wallet-movs { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.wallet-mov-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.wallet-mov-row:last-child { border-bottom: none; }
.wallet-mov-row .monto { font-family: 'IBM Plex Mono', monospace; font-weight: 700; }
.wallet-mov-row .monto.pos { color: var(--good); }
.wallet-mov-row .monto.neg { color: var(--critical); }
.wallet-admin-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.wallet-admin-row:last-child { border-bottom: none; }
body.auth-pending { visibility: hidden; }


.steps-list { margin: 0 0 20px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.steps-list li { font-size: 14px; line-height: 1.5; color: var(--ink-secondary); }


.btn-wallet {
  display: inline-flex; align-items: center; gap: 7px; background: var(--gold-strong); color: var(--gold-ink);
  font-weight: 800; font-size: 13px; padding: 9px 14px; border-radius: 10px; text-decoration: none;
  font-family: "IBM Plex Mono", monospace; transition: filter .15s;
}
.btn-wallet:hover { filter: brightness(1.06); }


.integracion-flow {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  background: var(--surface-2); border-radius: 16px; padding: 28px 20px; margin: 18px 0 26px;
}
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flow-node span { font-size: 12.5px; font-weight: 700; color: var(--ink-secondary); text-align: center; max-width: 120px; }
.flow-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.flow-icon-shopify { background: #95BF47; }
.flow-icon-bulls { background: var(--surface); padding: 4px; }
.flow-icon-bulls img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.flow-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.flow-arrow span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.step-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 16px 16px; }
.step-num {
  position: absolute; top: -10px; left: 14px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold-strong); color: var(--gold-ink); font-weight: 800; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.step-ico { font-size: 22px; margin-bottom: 8px; }
.step-title { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.step-text { font-size: 12.5px; color: var(--ink-secondary); line-height: 1.45; margin: 0; }

@media (max-width: 700px) {
  .integracion-flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}


/* --- Catalogo de productos --- */
#productoForm .field { display: flex; flex-direction: column; margin-bottom: 12px; }
#productoForm .field label { font-size: 11px; color: var(--ink-muted); font-weight: 600; display: block; margin-bottom: 4px; }
#productoForm .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#productoForm .checkbox-field label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); font-weight: 600; }
#productoForm .checkbox-field input { width: auto; }
.asignados-list { display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.asignados-list label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.asignados-list input { width: auto; }

.cat-tabs { display: flex; gap: 6px; margin: 14px 0 12px; }
.cat-tab {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px;
  font-size: 13px; font-weight: 700; color: var(--ink-secondary); cursor: pointer; transition: background .15s, color .15s;
}
.cat-tab:hover { background: var(--accent-soft); }
.cat-tab.active { background: var(--gold-ink); color: var(--gold-strong); border-color: var(--gold-ink); }

.productos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.producto-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; position: relative;
}
.producto-card-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--ink-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.producto-card-stock { color: var(--good); }
.producto-card-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.producto-card-nombre { font-weight: 800; font-size: 14px; line-height: 1.3; min-height: 36px; }
.producto-card-proveedor { font-size: 11px; font-weight: 700; color: var(--ink-muted); margin-bottom: 2px; }
.producto-card-precios { display: flex; justify-content: space-between; font-size: 12px; }
.producto-card-precios b { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; color: var(--ink); }
.producto-card-actions { display: flex; gap: 6px; align-items: center; }
.producto-fav-btn {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; flex-shrink: 0;
}
.producto-fav-btn.active { background: #FBE7E7; border-color: var(--critical); }
.producto-card-verbtn { flex: 1; }
.producto-badge-privado {
  position: absolute; top: 10px; right: 10px; background: var(--gold-ink); color: var(--gold-strong); font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.producto-detalle-stats { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.producto-detalle-stats .kpi { flex: 1; min-width: 110px; padding: 12px 14px; }
.producto-detalle-full { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13.5px; line-height: 1.6; color: var(--ink-secondary); }
.producto-detalle-full.show { display: block; }


.nav-section-label {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: #6b7280; padding: 14px 12px 4px; margin-top: 4px;
}
.nav-section-label:first-child { margin-top: 0; }

/* ===== Flujo de Caja / Bienvenida / Filtro de rango de fechas (Dashboard) ===== */
.dashboard-welcome-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.dashboard-welcome { font-size: 20px; font-weight: 800; margin: 0; color: var(--ink); }
.date-range-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.date-range-btn {
  border: 1px solid var(--border); background: #fff; color: var(--ink-secondary);
  font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 8px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.date-range-btn:hover { border-color: var(--ink-muted); }
.date-range-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.date-range-custom {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  width: 100%; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; margin-top: 8px;
}
.date-range-custom label { font-size: 12px; font-weight: 700; color: #56617a; display: flex; flex-direction: column; gap: 4px; }
.date-range-custom input[type=date] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }

.flujo-caja-panel { margin-bottom: 18px; }
.tiempo-real-badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: var(--gold-ink);
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); padding: 4px 9px; border-radius: 999px;
}
.flujo-caja-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px;
}
.flujo-col { padding: 0 18px; border-left: 3px solid var(--accent); }
.flujo-col:nth-child(2) { border-left-color: var(--warn); }
.flujo-col:nth-child(3) { border-left-color: var(--good); }
.flujo-col:first-child { padding-left: 4px; }
.flujo-label { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--ink-muted); margin: 0 0 6px; }
.flujo-monto { font-size: 26px; font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.flujo-monto.good { color: var(--good); }
.flujo-sub { font-size: 12.5px; color: var(--ink-muted); margin: 0; }
.flujo-sub.critico { color: var(--critical); }
.backlog-pills { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.backlog-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-secondary); }
.backlog-pill .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.backlog-pill.ok .dot { background: var(--good); }
.backlog-pill.warn .dot { background: var(--warn); }
.backlog-pill.critico .dot { background: var(--critical); }
.backlog-pill.incidencia .dot { background: var(--warn); }

@media (max-width: 720px) {
  .flujo-caja-grid { grid-template-columns: 1fr; gap: 16px; }
  .flujo-col { border-left: none; border-top: 3px solid var(--accent); padding: 10px 0 0; }
  .flujo-col:nth-child(2) { border-top-color: var(--warn); }
  .flujo-col:nth-child(3) { border-top-color: var(--good); }
}

/* ===== Buscador de producto del catalogo + vista previa de ganancia (form de pedido) ===== */
.field-hint { font-size: 12px; margin: 4px 0 0; color: var(--ink-muted, var(--ink-muted)); min-height: 14px; }
.field-hint.ok { color: var(--good); font-weight: 700; }
.field-hint.warn { color: var(--warn); font-weight: 700; }
.ganancia-preview {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 4px;
}
.ganancia-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.ganancia-preview-grid div { display: flex; flex-direction: column; gap: 2px; }
.ganancia-preview-grid span { font-size: 11px; color: var(--ink-muted); font-weight: 700; }
.ganancia-preview-grid b { font-size: 14px; color: var(--ink); }
.ganancia-preview-grid b.neg { color: var(--critical); }
.ganancia-preview-total {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.ganancia-preview-total .gana, .ganancia-preview-total .pierde { display: flex; align-items: center; gap: 8px; }
.ganancia-preview-total span { font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.ganancia-preview-total .gana span { color: var(--good); }
.ganancia-preview-total .gana b { color: var(--good); font-size: 18px; }
.ganancia-preview-total .pierde span { color: var(--critical); }
.ganancia-preview-total .pierde b { color: var(--critical); font-size: 16px; }
@media (max-width: 720px) {
  .ganancia-preview-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Campanita de notificaciones ===== */
.notif-bell-wrap { position: relative; }
.notif-bell-btn {
  position: relative; border: 1px solid var(--border); background: #fff; border-radius: 8px;
  width: 36px; height: 36px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.notif-bell-btn:hover { border-color: var(--ink-muted); }
.notif-badge {
  position: absolute; top: -5px; right: -5px; background: var(--critical); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid #fff;
}
.notif-dropdown {
  position: absolute; right: 0; top: 44px; width: 320px; max-height: 420px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(26,19,5,.15);
  z-index: 40; padding: 12px;
}
.notif-dropdown-head { font-weight: 800; font-size: 13px; margin-bottom: 8px; color: var(--ink); }
.notif-admin-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.notif-admin-form textarea { width: 100%; resize: vertical; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.notif-item { padding: 8px 0; border-bottom: 1px solid #f1f4f9; font-size: 12.5px; }
.notif-item:last-child { border-bottom: none; }
.notif-item-msg { color: var(--ink); margin: 0 0 3px; white-space: pre-wrap; }
.notif-item-meta { color: var(--ink-muted); font-size: 11px; display: flex; justify-content: space-between; gap: 8px; }
.notif-item-del { color: var(--critical); cursor: pointer; font-weight: 700; }
.notif-item-clickable { cursor: pointer; border-radius: 8px; margin: 0 -8px; padding: 8px; transition: background .15s; }
.notif-item-clickable:hover { background: var(--surface-2); }

/* Gestion de Diseño: candado en el sidebar, tarjeta de precio y grilla de herramientas */
.nav-lock-badge { margin-left: auto; font-size: 12px; }
.diseno-precio-card { max-width: 380px; margin: 20px auto 0; background: #fafbff; border: 1px solid var(--border, #e5e9f2); border-radius: 16px; padding: 26px; text-align: center; }
.diseno-precio-monto { font-family: 'Manrope', sans-serif; font-size: 34px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.diseno-precio-monto span { font-size: 14px; font-weight: 600; color: var(--ink-muted, #7b8394); }
.diseno-precio-lista { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: #333; }
.diseno-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 18px; }
.diseno-tool-card { background: #fafbff; border: 1px solid var(--border, #e5e9f2); border-radius: 14px; padding: 20px; text-align: center; }
.diseno-tool-ico { font-size: 28px; margin-bottom: 8px; }
.diseno-tool-title { font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.diseno-tool-desc { font-size: 12px; color: var(--ink-muted, #7b8394); }
.soporte-reply-attach-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.soporte-attach-label { font-size: 12.5px; color: var(--accent, #2f6fed); cursor: pointer; font-weight: 600; }
.soporte-attach-nombre { font-size: 12px; color: var(--ink-muted, #7b8394); }
.soporte-msg-imagen { max-width: 220px; border-radius: 10px; margin-top: 8px; display: block; cursor: pointer; }
.wb-badge-diseno { background: #fff3d6; color: #8a6100; }

/* Generador de landing page (Gestion de Diseño) */
.diseno-landing-progreso { font-weight: 700; font-size: 13px; color: var(--accent, #2f6fed); margin: 16px 0 6px; }
.diseno-landing-analisis { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--ink-secondary); margin-bottom: 14px; }
.diseno-landing-copy-box { background: #fafbff; border: 1px solid var(--border, #e5e9f2); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.diseno-landing-copy-titulo { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.diseno-landing-copy-texto { white-space: pre-wrap; font-family: inherit; font-size: 13.5px; color: #222; margin: 0; }
.diseno-landing-ajuste-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.diseno-landing-ajuste-row input { flex: 1; min-width: 200px; }
.diseno-landing-visual-box { text-align: center; margin-bottom: 14px; }
.diseno-landing-visual-box img { max-width: 260px; width: 100%; border-radius: 12px; border: 1px solid var(--border, #e5e9f2); }
.diseno-landing-acciones { display: flex; gap: 10px; flex-wrap: wrap; }

/* Generador de miniaturas (Gestion de Diseño) */
#disenoMiniUpload .field { display: flex; flex-direction: column; margin: 10px 0; }
#disenoMiniUpload .field label { font-size: 12.5px; font-weight: 700; color: var(--ink-muted, #7b8394); margin-bottom: 6px; }
.diseno-mini-precios-row { display: flex; gap: 14px; flex-wrap: wrap; }
.diseno-mini-precios-row .field { flex: 1; min-width: 160px; }
.notif-empty { color: var(--ink-muted); font-size: 12.5px; text-align: center; padding: 14px 0; }

/* ===== Tarjetas "Pedidos registrados" / "Efectividad global" agrandadas + banner ===== */
.kpi-tall { min-height: 132px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.kpi-tall .kpi-value { font-size: 30px; }
.kpi-banner {
  grid-column: span 2;
  min-height: 132px;
  padding: 0;
  overflow: hidden;
  display: flex;
}
.kpi-banner img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 14px; }
@media (max-width: 880px) {
  .kpi-banner { grid-column: 1 / -1; min-height: 110px; }
}

/* ===== Tarjeta "Como se calcula el pago" (horizontal, a todo el ancho) ===== */
.kpi-formula-wide { grid-column: 1 / -1; display: flex; flex-direction: column; }
.formula-strip {
  display: flex; align-items: stretch; gap: 10px; margin-top: 10px; flex-wrap: wrap;
}
.formula-step {
  flex: 1 1 160px; min-width: 150px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.formula-step-icon { font-size: 26px; line-height: 1; }
.formula-step-label { font-weight: 700; font-size: 13px; color: var(--ink-secondary); }
.formula-step input {
  margin-top: 4px; width: 80px; padding: 5px 6px; font-size: 13px; font-family: "IBM Plex Mono", monospace;
  border: 1px solid var(--border); border-radius: 6px; text-align: center;
}
.formula-muted { font-size: 11px; color: var(--ink-muted); font-weight: 500; }
.formula-op { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: var(--ink-muted); padding: 0 2px; }
.formula-op-total { color: var(--good); }
.formula-step-total { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.formula-step-total .formula-step-label { color: var(--good); }
@media (max-width: 720px) {
  .formula-strip { flex-direction: column; }
  .formula-op { transform: rotate(90deg); padding: 2px 0; }
}

/* ===== Widget de Nivel / Avatar (desplegable del header) ===== */
.nivel-wrap { position: relative; }
.nivel-avatar-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none; overflow: hidden;
  background: transparent; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; box-shadow: 0 0 0 3px rgba(123,92,255,0.18);
}
.nivel-avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nivel-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; width: 260px; background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e9f2); border-radius: 14px; box-shadow: 0 12px 32px rgba(26,19,5,0.16);
  padding: 18px; z-index: 60; text-align: center;
}
.nivel-dropdown-avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 10px; overflow: hidden;
  background: transparent; display: flex; align-items: center; justify-content: center;
}
.nivel-dropdown-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nivel-dropdown-name { font-weight: 800; font-size: 15px; color: var(--ink); }
.nivel-dropdown-rol { font-size: 12.5px; color: #7b5cff; font-weight: 700; margin-top: 1px; }
.nivel-dropdown-id { font-size: 11.5px; color: #8993a8; font-weight: 600; margin-top: 4px; }
.nivel-dropdown-level { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.nivel-dropdown-level-label { font-size: 10.5px; color: #8993a8; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.nivel-dropdown-level-name { font-size: 15px; font-weight: 800; color: #7b5cff; }
.nivel-progress-bar { margin-top: 8px; height: 8px; border-radius: 6px; background: #7b5cff; overflow: hidden; }
.nivel-progress-fill { height: 100%; background: #ffffff; border-radius: 6px; transition: width .3s ease; box-shadow: 0 0 6px rgba(255,255,255,0.6); }
.nivel-progress-sub { font-size: 11.5px; color: #8993a8; font-weight: 600; margin: 6px 0 0; }
#verNivelesBtn { margin-top: 12px; width: 100%; }

.nivel-lista {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px;
  max-height: 70vh; overflow-y: auto; padding-right: 2px;
}
.nivel-row {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 18px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border);
}
.nivel-row.actual { background: #f0edff; border-color: #7b5cff; box-shadow: 0 0 0 3px rgba(123,92,255,0.15); }
.nivel-row-avatar {
  width: 110px; height: 110px; border-radius: 50%; flex: none; overflow: hidden;
  background: #fff; border: 3px solid var(--border); box-shadow: 0 4px 14px rgba(26,19,5,0.12);
}
.nivel-row-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nivel-row.actual .nivel-row-avatar { border-color: #7b5cff; }
.nivel-row-info { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.nivel-row-name { font-weight: 800; font-size: 15px; color: var(--ink); }
.nivel-row-req { font-size: 12px; color: #8993a8; }
.nivel-row-tag { font-size: 11px; font-weight: 800; color: #7b5cff; background: #e2dbff; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
#nivelesModalOverlay .modal-card { max-width: 620px; width: 92vw; }
@media (max-width: 560px) {
  .nivel-lista { grid-template-columns: 1fr 1fr; }
  .nivel-row-avatar { width: 84px; height: 84px; }
}

/* ===== Perfil + Nivel dentro del sidebar (desplegable del lado izquierdo) ===== */
.sidebar-profile { padding: 14px 16px 16px; border-bottom: 1px solid var(--border, #e5e9f2); margin-bottom: 8px; }
.sidebar-profile-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sidebar-profile-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none; overflow: hidden;
  border: 2px solid #7b5cff; box-shadow: 0 0 0 3px rgba(123,92,255,0.15);
}
.sidebar-profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar-profile-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sidebar-profile-name { font-weight: 800; font-size: 14px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-rol { font-size: 11.5px; color: #7b5cff; font-weight: 700; }
.sidebar-profile-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.sidebar-profile-id { font-size: 11px; color: #8993a8; font-weight: 600; margin-bottom: 8px; }
.sidebar-profile-level { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }
.sidebar-profile-level-label { font-size: 10px; color: #8993a8; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sidebar-profile-level-name { font-size: 13.5px; font-weight: 800; color: #7b5cff; }
#sidebarVerNivelesBtn { margin-top: 10px; width: 100%; font-size: 12.5px; padding: 8px 10px; }


/* ============================================================
   Wallet: tabs Balance / Retiro / Historial / Cuentas
   ============================================================ */
.wallet-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 16px; }
.wallet-tabs .tab-btn { padding: 8px 16px; font-size: 13px; }
.wallet-tab-panel { animation: fadeInTab .15s ease; }
@keyframes fadeInTab { from { opacity: 0; } to { opacity: 1; } }

.retiro-form, .cuenta-form { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 420px; margin: 0 auto; }

.modal-card-wide { max-width: 680px; }
.kyc-form { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
.kyc-form label { grid-column: span 1; }
.kyc-form input[type=file] { padding: 7px; }
.kyc-preview { grid-column: span 1; margin-top: -6px; }
.kyc-preview img { max-width: 100%; max-height: 120px; border-radius: 8px; border: 1px solid var(--border); display: block; }
#btnEnviarKyc { grid-column: 1 / -1; }
.kyc-estado-banner { grid-column: 1 / -1; border-radius: 12px; padding: 12px 14px; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.kyc-estado-banner.pendiente { background: var(--warn-soft); color: var(--warn); }
.kyc-estado-banner.aprobado { background: var(--good-soft); color: var(--good); }
.kyc-estado-banner.rechazado { background: var(--critical-soft); color: var(--critical); }
@media (max-width: 640px) {
  .kyc-form { grid-template-columns: 1fr; }
}

.kyc-docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kyc-doc-thumb { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); cursor: zoom-in; margin-top: 4px; }
@media (max-width: 640px) {
  .kyc-docs-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Alerta de retiros pendientes para el admin, arriba del dashboard.
   ============================================================ */
.retiros-pendientes-alert {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, var(--warn-soft) 0%, var(--critical-soft) 100%);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: 14px; padding: 14px 18px; margin-bottom: 16px;
}
.retiros-alert-ico { font-size: 24px; flex-shrink: 0; }
.retiros-alert-text { flex: 1; font-size: 13.5px; color: var(--ink-secondary); line-height: 1.4; }
.retiros-alert-actions { display: flex; gap: 8px; flex-shrink: 0; }
.retiros-alert-actions button.secondary { padding: 6px 12px; }



.retiro-form label, .cuenta-form label { font-size: 12px; color: var(--ink-muted); font-weight: 600; display: flex; flex-direction: column; gap: 5px; }

.tipo-cuenta-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.tipo-cuenta-toggle .tab-btn { flex: 1; text-align: center; padding: 10px 12px; }

/* ============================================================
   Proyeccion de pedidos en transito (70% exito / 30% fallo) +
   reserva por riesgo (15%) dentro del balance de la wallet.
   ============================================================ */
.proyeccion-panel { display: flex; flex-direction: column; gap: 14px; }
.proyeccion-transito-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 10px 14px; }
.proyeccion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.proyeccion-cell { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.proyeccion-cell-label { font-size: 11.5px; color: var(--ink-muted); font-weight: 600; margin-bottom: 4px; }
.proyeccion-cell-valor { font-family: 'IBM Plex Mono', monospace; font-weight: 800; font-size: 18px; }
.proyeccion-cell-valor.pos { color: var(--good); }
.proyeccion-cell-valor.neg { color: var(--critical); }
.proyeccion-riesgo { background: var(--critical-soft); border: 1px solid color-mix(in srgb, var(--critical) 30%, transparent); border-radius: 12px; padding: 12px 14px; }
.proyeccion-riesgo-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13px; color: var(--critical); margin-bottom: 8px; }
.proyeccion-riesgo-badge { background: var(--critical); color: #fff; font-size: 11.5px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.proyeccion-riesgo-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.proyeccion-nota { font-size: 12px; color: var(--ink-secondary); background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; margin: 0; line-height: 1.5; }

/* Modal del tarifario courier: imagen grande centrada en pantalla */
.modal-card-tarifario { max-width: 920px; width: 94vw; }
.tarifario-img { width: 100%; height: auto; border-radius: 12px; margin-top: 10px; display: block; }

/* Banner grande de "Mi Wallet" (reemplaza el titulo de texto en la wallet propia) */
.wallet-top-banner { width: 100%; max-width: 900px; height: auto; border-radius: 14px; display: block; margin-bottom: 4px; }

/* Header de la wallet propia (logo/banner + Volver al dashboard + Mi Perfil), ahora dentro
   de la columna izquierda, encima de la tarjeta de branding "Disciplina", en vez de una
   barra que cruzaba todo el ancho arriba. */
.wallet-left-header { width: 100%; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); text-align: center; }
.wallet-left-title { font-size: 22px; margin: 4px 0 0; }
.wallet-top-actions-stacked { flex-direction: column; align-items: stretch; margin-top: 10px; }
.wallet-top-actions-stacked .btn { width: 100%; text-align: center; }

/* Banner de imagen por seccion del dashboard (Dashboard, Catalogo, Clientes, etc.), en el
   mismo lugar donde antes iba el logo + titulo de texto. Mismo patron que el banner de
   "Mi Wallet": si la imagen de esa seccion no existe todavia, se cae al texto normal. */
.page-header-banner { flex: 1 1 auto; min-width: 0; max-width: 1300px; width: auto; height: auto; max-height: 190px; object-fit: contain; object-position: left center; border-radius: 10px; align-self: center; margin-right: 14px; }
@media (max-width: 900px) { .page-header-banner { max-height: 140px; } }
@media (max-width: 720px) { .page-header-banner { max-height: 100px; } }

/* Selector de pais: boton "Pais" con bandera activa debajo del boton amarillo de la
   wallet, con un menu desplegable de banderas. Solo Peru esta habilitado por ahora;
   elegir otra bandera solo muestra un aviso ("Proximamente") sin cambiar nada mas. */
.account-box-col { display: flex; flex-direction: column; align-items: stretch; gap: 6px; position: relative; }
.country-selector { position: relative; }
.btn-country {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--border);
  font-weight: 700; font-size: 12px; padding: 6px 10px; border-radius: 9px; cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
}
.btn-country:hover { filter: brightness(.97); }
.btn-country span { font-size: 14px; }
.country-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; min-width: 168px; flex-direction: column; gap: 2px;
}
.country-menu.show { display: flex; }
.country-opt {
  display: flex; align-items: center; gap: 8px; background: none; border: none; text-align: left;
  padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; width: 100%;
}
.country-opt:hover { background: var(--surface-2); }
.country-opt.active { background: color-mix(in srgb, var(--gold-strong) 22%, transparent); color: var(--gold-ink); }

/* ============================================================
   Calculadora Dropshipper (Gestion Financiera > Calculadora)
   Paleta de la marca: negro + dorado para el panel de resultado,
   igual que el resto de la app en las tarjetas de formulario.
   ============================================================ */
.calc-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-form-panel { display: flex; flex-direction: column; gap: 16px; }
.calc-form-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.calc-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #B8860B; }
.calc-title { font-size: 22px; font-weight: 800; margin: 4px 0 6px; }
.calc-market { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.calc-market select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 13px; color: var(--ink); }
.calc-market-rate { font-size: 11px; color: var(--ink-muted); font-family: "IBM Plex Mono", monospace; }
.calc-field { display: flex; flex-direction: column; gap: 6px; }
.calc-field label { font-size: 12px; font-weight: 600; color: var(--ink-secondary); }
.calc-field input, .calc-field select { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-family: inherit; color: var(--ink); }
.calc-readonly-value { padding: 9px 11px; border-radius: 9px; background: var(--surface-2); font-weight: 800; font-family: "IBM Plex Mono", monospace; font-size: 14px; color: var(--ink); }
.calc-fields-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.calc-fields-row2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .calc-fields-row3, .calc-fields-row2 { grid-template-columns: 1fr; } }
.calc-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-secondary); }
.calc-section-label { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 2px; }
.calc-sliders-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 640px) { .calc-sliders-row { grid-template-columns: 1fr; } }
.calc-slider-block { display: flex; flex-direction: column; gap: 8px; }
.calc-slider-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink); }
.calc-slider-label b { font-family: "IBM Plex Mono", monospace; color: #B8860B; }
.calc-bar-slider { position: relative; height: 120px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; overflow: hidden; user-select: none; touch-action: none; }
.calc-bar-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; background: linear-gradient(180deg, #FFD65C, var(--gold-strong)); border-radius: 0 0 11px 11px; }
.calc-bar-handle { position: absolute; left: 0; right: 0; bottom: 70%; height: 4px; background: var(--gold-ink); border-radius: 2px; transform: translateY(50%); }
.calc-result-panel { background: #15130C; color: #fff; border-radius: 16px; padding: 22px 20px; }
.calc-result-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--gold-strong); }
.calc-result-sub { font-size: 12px; color: #9c9c9c; margin-top: 4px; }
.calc-result-big { font-size: 32px; font-weight: 800; color: #4ADE80; margin: 6px 0 4px; font-family: "IBM Plex Mono", monospace; word-break: break-word; }
.calc-result-big.neg { color: #F97066; }
.calc-result-margen { display: flex; justify-content: space-between; font-size: 12px; color: #c9c9c9; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 6px; }
.calc-breakdown-row { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; color: #d8d8d8; }
.calc-breakdown-row b { font-family: "IBM Plex Mono", monospace; }
.calc-breakdown-row.neg b { color: #F97066; }
.calc-breakdown-row.good b { color: #4ADE80; }
.calc-metrics { margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 8px; }
.calc-metric-row { display: flex; justify-content: space-between; font-size: 12.5px; color: #c9c9c9; }
.calc-metric-row b { font-family: "IBM Plex Mono", monospace; color: #fff; }
.calc-footnote { font-size: 11px; color: var(--ink-muted); margin: 0; }

/* Tarjeta de estado de la integracion (Integraciones): muestra si hay una tienda
   Shopify conectada ahora mismo y con cual especificamente, ademas de la guia de
   pasos que ya existia para configurarla. */
.integracion-estado-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.integracion-estado-icon { width: 44px; height: 44px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--surface); border-radius: 10px; border: 1px solid var(--border); }
.integracion-estado-info { flex: 1; min-width: 0; }
.integracion-estado-nombre { font-weight: 800; font-size: 15px; color: var(--ink); }
.integracion-estado-detalle { font-size: 12.5px; color: var(--ink-secondary); margin-top: 2px; }
.badge-estado { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--nodata-soft); color: var(--nodata); }
.badge-estado.activa { background: var(--good-soft); color: var(--good); }
.integracion-estado-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.integracion-estado-tag { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-secondary); border: 1px solid var(--border); }

/* ============================================================
   Franja de Proveedores en el Catalogo (inspirada en el "slide infinito" de
   proveedores de Aliclik): chips con nombre + cantidad de productos, corriendo en
   loop continuo. Se pausa al pasar el mouse para poder hacer clic con comodidad.
   ============================================================ */
.proveedores-strip-wrap { display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 10px; border-radius: 12px; background: linear-gradient(90deg, #FFF7E0, #FFFDF5); border: 1px solid var(--border); overflow: hidden; }
.proveedor-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer; white-space: nowrap; }
.proveedor-chip:hover { filter: brightness(.97); }
.proveedor-chip.active { background: var(--gold-ink); color: var(--gold-strong); border-color: var(--gold-ink); }
.proveedor-chip-todos { flex: 0 0 auto; }
.proveedor-chip-count { font-size: 11px; font-weight: 600; color: var(--ink-muted); }
.proveedor-chip.active .proveedor-chip-count { color: #d9b354; }
.proveedor-chip-logo { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.proveedor-chip-logo-fallback { display: flex; align-items: center; justify-content: center; background: var(--gold-ink); color: var(--gold-strong); font-size: 11px; font-weight: 800; }
.producto-card-proveedor-logo { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; vertical-align: -2px; margin-right: 2px; }
.sidebar-perfil-btn { width: 100%; white-space: normal; line-height: 1.3; text-align: center; }
.soporte-hilo-mensajes { display: flex; flex-direction: column; gap: 12px; max-height: 480px; overflow-y: auto; padding: 6px 4px 16px; }
.soporte-msg { max-width: 72%; padding: 10px 14px; border-radius: 14px; }
.soporte-msg-propio { align-self: flex-end; background: var(--gold-ink); color: var(--gold-strong); border-bottom-right-radius: 4px; }
.soporte-msg-admin { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.soporte-msg-autor { font-size: 11px; font-weight: 700; opacity: .75; margin-bottom: 3px; }
.soporte-msg-texto { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; }
.soporte-msg-fecha { font-size: 10.5px; opacity: .6; margin-top: 4px; text-align: right; }
.soporte-hilo-reply { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.soporte-hilo-reply textarea { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 13.5px; resize: vertical; }
.btn-copy-sku { border: 1px solid var(--border); background: var(--surface-2); border-radius: 6px; padding: 2px 7px; font-size: 12px; cursor: pointer; line-height: 1.4; }
.btn-copy-sku:hover { filter: brightness(.95); }
.proveedores-strip-viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.proveedores-strip-track { display: flex; gap: 10px; width: max-content; animation: proveedoresScroll 30s linear infinite; }
.proveedores-strip-wrap:hover .proveedores-strip-track { animation-play-state: paused; }
@keyframes proveedoresScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Gestión de Diseño: créditos y mosaico de imágenes generadas en la sesión */
.diseno-creditos-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  background: #fff3cd;
  color: #7a5b00;
  border: 1px solid #f0d98c;
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.diseno-flujo-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.diseno-flujo-main {
  flex: 1 1 380px;
  min-width: 0;
}
.diseno-galeria {
  flex: 0 0 220px;
  width: 220px;
  max-height: 640px;
  overflow-y: auto;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 10px;
  background: #fafafa;
  position: sticky;
  top: 16px;
}
.diseno-galeria-titulo {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  color: #333;
}
.diseno-galeria-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.diseno-galeria-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}
.diseno-galeria-item img {
  width: 100%;
  border-radius: 6px;
  display: block;
}
.diseno-galeria-item-nombre {
  font-size: 12px;
  font-weight: 700;
  margin: 6px 0 4px;
  color: #222;
}
.diseno-galeria-item a {
  font-size: 12px;
  display: inline-block;
}
@media (max-width: 760px) {
  .diseno-galeria {
    position: static;
    width: 100%;
    max-height: none;
  }
}

/* Analista IA — resultado del análisis mostrado como tarjetas por módulo */
.analisis-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.analisis-card {
  background: #fafbff;
  border: 1px solid var(--border, #e5e9f2);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(20, 25, 40, 0.04);
}
.analisis-card-titulo {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--ink, #1b1f2a);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.analisis-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand, #4f6bff);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex: none;
}
.analisis-card-cuerpo {
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted, #555c6e);
  font-family: inherit;
  margin: 0;
}

/* Sorteo del Mes: animacion tipo "ruleta" que va mostrando nombres al azar hasta
   caer en el ganador. */
.sorteo-ruleta-nombre {
  font-size: 26px;
  font-weight: 800;
  padding: 22px 10px;
  border-radius: 14px;
  background: #fafbff;
  border: 2px solid var(--border, #e5e9f2);
  color: var(--ink, #1b1f2a);
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease;
}
.sorteo-ruleta-nombre.sorteo-tick {
  transform: scale(1.04);
}
.sorteo-ruleta-nombre.sorteo-ganador {
  background: var(--good-soft, #e6f8ee);
  border-color: var(--good, #34c77b);
  color: var(--good, #1e8f57);
}

/* ===== Alertas de pedidos (bandeja de triage) ===== */
.alertas-pedidos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 16px;
}
.alerta-card {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.alerta-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.alerta-card.activa { border-color: var(--gold); background: var(--gold-soft); }
.alerta-card-num { font-size: 22px; font-weight: 800; line-height: 1; }
.alerta-card-label { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.alerta-card.alerta-warn .alerta-card-num { color: var(--warn); }
.alerta-card.alerta-critico .alerta-card-num { color: var(--critical); }
.alerta-card.alerta-neutral .alerta-card-num { color: var(--gold-ink); }

/* ===== Badge de riesgo de cliente ===== */
.badge-riesgo {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-riesgo.riesgo-alto { background: var(--critical-soft); color: var(--critical); }
.badge-riesgo.riesgo-medio { background: var(--warn-soft); color: var(--warn); }
.badge-riesgo.riesgo-seguro { background: var(--good-soft); color: var(--good); }
.badge-riesgo.riesgo-sin-historial { background: var(--nodata-soft); color: var(--nodata); }
.novedad-cell { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.novedad-cell.novedad-mal { color: var(--critical); }
.novedad-cell.novedad-bien { color: var(--good); }
.novedad-cell.novedad-neutral { color: var(--ink-muted); font-weight: 600; }

/* ===== Recuadro "Informacion importante" en Solicitar retiro ===== */
.info-box-retiro {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink);
}
.info-box-retiro .info-box-ico { flex: 0 0 auto; font-size: 16px; color: var(--gold-ink); line-height: 1.4; }
.info-box-retiro b { display: block; margin-bottom: 6px; }
.info-box-retiro ul { margin: 0; padding-left: 18px; }
.info-box-retiro li { margin-bottom: 4px; }
.info-box-retiro li:last-child { margin-bottom: 0; }

/* ===== Version fija (grande) del recuadro de info de retiro: se muestra siempre en la ===== */
/* wallet del dropshipper sin importar la pestaña activa (Balance/Retiro/Historial/Cuentas) */
.info-box-retiro-fijo {
  font-size: 15px;
  padding: 18px 20px;
  margin: 4px 0 20px;
  gap: 14px;
}
.info-box-retiro-fijo .info-box-ico { font-size: 22px; }
.info-box-retiro-fijo b { font-size: 16px; margin-bottom: 8px; }
.info-box-retiro-fijo li { margin-bottom: 6px; }
