/* App: panel con menú lateral, modo claro/oscuro (misma base que el Panel Benzi) */
:root {
  --brand: #6d5efc;
  --bg: #f6f7f9; --surface: #fff; --text: #1d2330; --text-2: #374151; --dim: #6b7280; --line: #e3e6eb;
  --tag-bg: #eef0f3; --row-hover: #f8f9fb; --side-bg: #fbfbfc;
  --accent: var(--brand); --accent-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --green-bg: #e7f6ec; --green: #13703a; --red-bg: #fdecec; --red: #b42318;
  --amber-bg: #fff4dc; --amber: #8a5a00; --blue-bg: #e8efff; --blue: #1d4ed8;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --side-w: 236px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b; --surface: #1a1e26; --text: #e6e8ec; --text-2: #c9ced8; --dim: #9aa3b2; --line: #2a303b;
    --tag-bg: #262c37; --row-hover: #20252f; --side-bg: #161a21; --accent-soft: color-mix(in srgb, var(--brand) 22%, #1a1e26);
    --accent: color-mix(in srgb, var(--brand) 70%, #fff);
    --green-bg: #12301f; --green: #6fdc9a; --red-bg: #3a1717; --red: #ff9b93; --amber-bg: #3a2c10; --amber: #ffcf70; --blue-bg: #17264a; --blue: #9db8ff;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151b; --surface: #1a1e26; --text: #e6e8ec; --text-2: #c9ced8; --dim: #9aa3b2; --line: #2a303b;
  --tag-bg: #262c37; --row-hover: #20252f; --side-bg: #161a21; --accent-soft: color-mix(in srgb, var(--brand) 22%, #1a1e26);
  --accent: color-mix(in srgb, var(--brand) 70%, #fff);
  --green-bg: #12301f; --green: #6fdc9a; --red-bg: #3a1717; --red: #ff9b93; --amber-bg: #3a2c10; --amber: #ffcf70; --blue-bg: #17264a; --blue: #9db8ff;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); margin: 20px 0 8px; }
.dim { color: var(--dim); }
.hint { color: var(--dim); font-size: 13px; margin: 4px 0 0; }
.center-text { text-align: center; }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.logo-mark { display: inline-flex; align-items: flex-end; gap: 2px; width: 24px; height: 24px; padding: 5px; border-radius: 7px; background: linear-gradient(135deg, var(--brand), #22d3ee); }
.logo-mark i { flex: 1; background: #fff; border-radius: 1px; }
.logo-mark i:nth-child(1) { height: 40%; } .logo-mark i:nth-child(2) { height: 70%; } .logo-mark i:nth-child(3) { height: 100%; }
.brand.big { justify-content: center; font-size: 22px; margin-bottom: 20px; }
.brand.big .logo-mark { width: 30px; height: 30px; }

/* Estructura */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 35; display: flex; flex-direction: column; background: var(--side-bg); border-right: 1px solid var(--line); }
.side .brand { padding: 18px 20px 10px; }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-width: thin; }
.side-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 16px 10px 6px; }
.side-nav a, .side-nav .soon { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 1px 0; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.side-nav .ico { color: var(--dim); flex: none; }
.side-nav a > span, .side-nav .soon > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav a:hover { background: var(--tag-bg); color: var(--text); }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-nav a.on .ico { color: var(--accent); }
.side-nav .soon { opacity: .55; cursor: default; }
.side-nav .soon em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: var(--tag-bg); color: var(--dim); }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-weight: 600; font-size: 13px; }
.side-user > span:last-child { display: grid; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { font-weight: 400; color: var(--dim); font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.side-out { color: var(--dim); padding: 6px; border-radius: 8px; display: inline-flex; }
.side-out:hover { background: var(--tag-bg); color: var(--text); }
.side-backdrop { display: none; }
.shell { margin-left: var(--side-w); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.store-switch { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.store-switch select { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; padding: 6px 28px 6px 10px; font: inherit; font-weight: 600; max-width: 260px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--tag-bg); color: var(--text); }
.theme-btn .ico-sun { display: none; }
:root[data-theme="dark"] .theme-btn .ico-sun { display: inline; }
:root[data-theme="dark"] .theme-btn .ico-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .ico-sun { display: inline; } :root:not([data-theme="light"]) .theme-btn .ico-moon { display: none; } }
.only-mobile { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
main { max-width: 1280px; margin: 0 auto; padding: 24px 24px 60px; }

/* Bloques */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.narrow-card { max-width: 520px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.grid-2.even { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.kpi span { color: var(--dim); font-size: 13px; }
.kpi b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi b.sm { font-size: 17px; }

.progress { height: 6px; border-radius: 99px; background: var(--tag-bg); overflow: hidden; margin-bottom: 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #22d3ee); border-radius: 99px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li > div { flex: 1; display: grid; }
.checklist small { color: var(--dim); }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: #fff; }
.checklist li.done .tick { background: var(--green); border-color: var(--green); }
.checklist li.done b { color: var(--dim); text-decoration: line-through; }

/* Tablas */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); font-weight: 600; padding: 10px 16px; background: var(--side-bg); border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--row-hover); }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl .actions form { display: inline; }
.tbl tr.muted td { opacity: .8; }
.tbl a.dim { text-decoration: none; }
.inline { display: inline; }

/* Formularios */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 13.5px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 0; border-color: var(--brand); }
input:disabled { opacity: .6; }
select { width: auto; }
.form select { width: 100%; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form label.check input { width: auto; margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 9px; border: 0; background: var(--brand); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.full { width: 100%; }
.btn.ghost { background: var(--tag-bg); color: var(--text); }
.btn.ghost:hover { filter: none; background: var(--line); }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: var(--green-bg); color: var(--green); }
.flash.error { background: var(--red-bg); color: var(--red); }

.empty-box { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 20px; }
.empty-box p { color: var(--dim); max-width: 520px; margin: 0; }
.empty-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

ul.plain { padding-left: 18px; margin: 0; display: grid; gap: 6px; color: var(--text-2); }

/* Conexión de tienda */
.connect-card { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.steps-v { margin: 0; padding-left: 20px; display: grid; gap: 16px; }
.steps-v li { line-height: 1.6; }
.code-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 6px; }
.code-box code { font: 600 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; padding: 14px 18px; border-radius: 10px; background: var(--tag-bg); border: 1px dashed var(--line); }

/* Facturación */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); gap: 16px; margin-bottom: 10px; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 10px; }
.plan-card.featured { border: 2px solid var(--brand); }
.plan-card h3 { margin: 0; }
.price b { font-size: 34px; letter-spacing: -.03em; }
.price span { color: var(--dim); margin-left: 4px; }
.ribbon { position: absolute; top: -11px; right: 16px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }

/* Páginas de acceso */
body.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 45%), var(--bg); }
.auth { width: 100%; max-width: 420px; }
.auth .card { padding: 28px; }
.auth h1 { margin-bottom: 8px; }
.auth .hint { margin-bottom: 14px; }

/* Informes */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 16px; }
.filters select, .filters input { width: auto; padding: 7px 10px; font-size: 13px; }
.filters .range { margin-left: auto; font-size: 13px; }
.kpis.six { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi small { font-size: 12px; }
.delta { font-size: 12px; font-weight: 600; color: var(--dim); }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.chart { position: relative; }
.chart svg { width: 100%; height: 240px; display: block; overflow: visible; }
.chart .bar { fill: color-mix(in srgb, var(--brand) 55%, transparent); }
.chart .bar:hover { fill: var(--brand); }
.chart .line { stroke: #22d3ee; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.chart .axis { stroke: var(--line); vector-effect: non-scaling-stroke; }
.chart text { font-size: 11px; fill: var(--dim); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--dim); margin-bottom: 6px; }
.legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lg-bar { background: color-mix(in srgb, var(--brand) 55%, transparent); }
.lg-line { background: #22d3ee; height: 3px !important; }
.card-head.pad { padding: 16px 16px 6px; margin: 0; }
.card-head a { font-size: 13px; text-decoration: none; }
.tbl th.num, .tbl td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl td.wrap { min-width: 220px; font-size: 13px; }
.tbl td.warn { color: var(--amber); font-weight: 600; }
.tbl-wrap { overflow-x: auto; }
.tbl-wrap.short { max-height: 380px; overflow-y: auto; }
.tbl td.prod { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.tbl td.prod img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--tag-bg); flex: none; }
.tbl td.prod span { display: grid; }
.tbl td.prod a { color: var(--text); text-decoration: none; font-weight: 500; }
.tbl td.prod a:hover { color: var(--accent); }
.hbar { display: block; height: 4px; border-radius: 99px; background: var(--tag-bg); margin-top: 6px; overflow: hidden; max-width: 220px; }
.hbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #22d3ee); }
.hbar.big { height: 10px; max-width: none; margin: 4px 0 2px; }
.funnel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fl-top { display: flex; justify-content: space-between; font-size: 13.5px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split > div { background: var(--tag-bg); border-radius: 10px; padding: 12px; display: grid; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.plain-list li { display: flex; justify-content: space-between; gap: 10px; }
.chip { display: inline-flex; padding: 4px 10px; border-radius: 99px; background: var(--tag-bg); color: var(--text-2); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.chip.on { background: var(--accent-soft); color: var(--accent); }
.sync-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }

/* Tiempo real */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: livepulse 1.8s infinite; vertical-align: middle; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.kpi.accent { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.kpi.accent b { color: var(--accent); font-size: 34px; }
.spark svg { width: 100%; height: 36px; display: block; }
.spark polyline { stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.feed { list-style: none; margin: 0; padding: 0 0 6px; max-height: 520px; overflow-y: auto; }
.feed li { display: grid; grid-template-columns: 26px 70px 1fr auto; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.feed .fi { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--tag-bg); color: var(--dim); font-weight: 700; font-size: 12px; }
.feed .ft { color: var(--dim); font-variant-numeric: tabular-nums; }
.feed li.k-purchase .fi { background: var(--green-bg); color: var(--green); }
.feed li.k-add_cart .fi, .feed li.k-checkout .fi { background: var(--amber-bg); color: var(--amber); }
.nav-count { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }

/* Alertas */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.alert-list li:first-child { border-top: 0; }
.alert-list .lv { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--dim); }
.alert-list .lv.critical { background: var(--red); }
.alert-list .lv.warning { background: #f59e0b; }
.alert-list .lv.good { background: var(--green); }
.alert-list li.unseen b { color: var(--text); }
.alert-list li.seen { opacity: .72; }
.alert-list p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; }

/* Gestión */
.edit-tbl td { vertical-align: middle; }
.edit-tbl input:not([type=checkbox]) { padding: 6px 8px; font-size: 13px; min-width: 110px; }
.in-num { width: 96px !important; min-width: 0 !important; text-align: right; font-variant-numeric: tabular-nums; }
.in-num.sm { width: 72px !important; }
.neg, input.neg { color: var(--red); }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled + span { opacity: .5; cursor: default; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 20px; font-size: 13px; }
.prod-head { display: flex; gap: 14px; align-items: flex-end; }
.prod-head img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--tag-bg); }
.prod-head .grow { flex: 1; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; }
.hist li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.hist li:last-child { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tfoot td { border-bottom: 0; padding-top: 6px; padding-bottom: 6px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.state i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
h1 small { font-size: 14px; color: var(--dim); font-weight: 400; }

/* Móvil */
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.side-open .side { transform: none; }
  body.side-open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.35); }
  .shell { margin-left: 0; }
  .only-mobile { display: inline-flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .filters .range { margin-left: 0; width: 100%; }
  main { padding: 18px 14px 50px; }
  .topbar { padding: 0 12px; }
  .store-switch select { max-width: 160px; }
  .tbl th:nth-child(3), .tbl td:nth-child(3) { display: none; }
  .feed li { grid-template-columns: 26px 60px 1fr; }
  .feed li > span:last-child { display: none; }
}

/* Emails de la tienda (carritos, avisos de stock, opiniones) */
.flash.warn { background: var(--amber-bg); color: var(--amber); }
.flash.warn a { color: inherit; font-weight: 700; }
.mini-lines { display: flex; gap: 4px; align-items: center; }
.mini-lines span { width: 38px; height: 38px; border-radius: 7px; overflow: hidden; background: var(--tag-bg); flex: none; }
.mini-lines img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-lines em { font-style: normal; font-size: 12px; color: var(--dim); margin-left: 2px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acts form { margin: 0; }
details.settings { margin-bottom: 18px; }
details.settings > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.settings > summary::-webkit-details-marker { display: none; }
details.settings > summary::after { content: "Ajustes ▾"; font-weight: 600; font-size: 13px; color: var(--accent); }
details.settings[open] > summary::after { content: "Cerrar ▴"; }
details.settings[open] > summary { margin-bottom: 14px; }
.step-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.tabs-mini { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.code-box.url code { font-size: 13px; letter-spacing: 0; line-height: 1.4; word-break: break-all; padding: 10px 12px; flex: 1 1 260px; }
details.more > summary::after { content: "Ver ▾"; }
details.more[open] > summary::after { content: "Ocultar ▴"; }

/* Ficha de producto: editor, fotos, categorías */
.rte { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.rte-bar { display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--line); background: var(--tag-bg); }
.rte-bar button { border: 0; background: none; padding: 5px 9px; border-radius: 6px; font: 600 13px/1 inherit; color: var(--text-2); cursor: pointer; }
.rte-bar button:hover { background: var(--surface); color: var(--text); }
.rte-ed { min-height: 120px; max-height: 420px; overflow: auto; padding: 12px 14px; outline: none; line-height: 1.55; }
.rte-ed p { margin: 0 0 8px; }
.rte textarea { display: none; border: 0; border-radius: 0; min-height: 200px; font: 13px/1.5 ui-monospace, Menlo, monospace; }
.rte.src .rte-ed { display: none; }
.rte.src textarea { display: block; width: 100%; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.photo { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); display: grid; }
.photo.cover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.photo .ph-img { aspect-ratio: 1; background: var(--tag-bg); position: relative; }
.photo .ph-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo .ph-img .badge { position: absolute; top: 8px; left: 8px; }
.photo form { padding: 8px; display: grid; gap: 6px; margin: 0; }
.photo .ph-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.photo input[type=text] { font-size: 12.5px; padding: 6px 8px; }
.photo select[multiple] { font-size: 12px; min-height: 60px; }
.cat-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; display: grid; gap: 2px; }
.cat-list label { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 14px; margin: 0; }
.cat-list label small { color: var(--dim); }
.hint.count { display: block; text-align: right; }
.cat-list label { display: flex !important; justify-content: flex-start; text-align: left; }
.cat-list input, .photo input[type=checkbox] { width: auto !important; flex: none; margin: 0; }
.photo .check { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.attr-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; }
.attr-box legend { font-weight: 700; padding: 0 4px; }
.attr-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex !important; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 13px; font-weight: 500; cursor: pointer; margin: 0; }
.chip-check input { width: auto !important; margin: 0; }
.chip-check i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
h2.sec { margin: 26px 0 12px; font-size: 17px; }
h2.sec small { font-weight: 500; font-size: 13px; }
.hint code { word-break: break-all; }

/* Superadmin */
.admin-tag { margin: -6px 14px 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: linear-gradient(90deg, #e11d48, #f97316); border-radius: 6px; padding: 4px 8px; display: inline-block; }
.admin-search input { min-width: 320px; }
.imp-bar { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.imp-bar a { color: inherit; font-weight: 700; margin-left: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 14px; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.mini-bars i { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.danger-zone { border: 1px solid var(--red-bg); }
@media (max-width: 860px) { .admin-search input { min-width: 0; width: 100%; } }
.prov { display: grid; gap: 10px; margin-bottom: 14px; }
.prov-opt { display: flex !important; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 400 !important; }
.prov-opt input { width: auto !important; margin-top: 4px; }
.prov-opt small { display: block; color: var(--dim); margin-top: 2px; }
.prov-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.prov-box { border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 10px; }
.prov-box h3 { margin: 0; font-size: 15px; }
