:root {
  --bg: #0c0e13; --side: #10131a; --panel: #151922; --panel2: #1b202b; --panel3: #222837; --line: #252b39; --line2: #2f3647;
  --text: #e8eaf0; --muted: #8b93a7; --dim: #5f677b;
  --accent: #3b82f6; --accent2: #60a5fa; --accent-soft: rgba(59,130,246,.14);
  --ok: #22c55e; --warn: #f59e0b; --danger: #ef4444; --violet: #8b5cf6;
  --r: 12px; --shadow: 0 10px 40px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); text-decoration: none; }
h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
h3 { font-size: 12px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 10px; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- layout ---------------- */
.app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; gap: 4px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 20px; }
.brand .logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--violet)); box-shadow: 0 6px 20px rgba(59,130,246,.35); }
.brand .logo svg { width: 20px; height: 20px; stroke: #fff; }
.brand b { font-size: 15.5px; letter-spacing: .02em; display: block; }
.brand span { font-size: 11.5px; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent2); }
.nav a .count { margin-left: auto; font-size: 11px; background: var(--panel3); color: var(--text); border-radius: 999px; padding: 0 7px; }
.side .foot { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 10px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.main { overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(12,14,19,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  padding: 16px 28px; display: flex; align-items: center; gap: 14px; min-height: 72px; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.content { padding: 24px 28px 60px; }

/* ---------------- controles ---------------- */
button, .btn { font: inherit; border: 1px solid transparent; border-radius: 9px; padding: 8px 14px; cursor: pointer; color: var(--text); background: var(--panel2);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s; }
button:hover { background: var(--panel3); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover { background: #2f74e6; }
button.soft { background: var(--accent-soft); color: var(--accent2); }
button.soft:hover { background: rgba(59,130,246,.24); }
button.ghost { background: transparent; border-color: var(--line2); }
button.ghost:hover { background: var(--panel2); }
button.danger { color: #fca5a5; }
button.danger.solid { background: var(--danger); color: #fff; }
button.warn { background: rgba(245,158,11,.15); color: #fbbf24; font-weight: 600; }
button.warn:hover { background: rgba(245,158,11,.25); }
button.icon { padding: 7px; background: transparent; color: var(--muted); }
button.icon:hover { background: var(--panel2); color: var(--text); }
button.sm { padding: 5px 10px; font-size: 13px; }
input[type=text], input[type=password], input[type=email], input:not([type]), input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line2); border-radius: 9px; padding: 8px 11px; outline: none; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 42px; height: 36px; padding: 3px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); cursor: pointer; }
::-webkit-calendar-picker-indicator { filter: invert(.75); cursor: pointer; }
label.f, div.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.f > span { color: var(--text); font-weight: 500; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line2); border-radius: 9px; padding: 3px; }
.seg button { background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 7px; font-size: 13px; }
.seg button.on { background: var(--panel3); color: var(--text); }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.toggle input { display: none; }
.toggle i { width: 36px; height: 21px; border-radius: 999px; background: var(--panel3); position: relative; flex: none; transition: background .15s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(15px); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); cursor: pointer; font-size: 13px; background: transparent; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent2); }

/* ---------------- tarjetas ---------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.card.pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent2); }
.stat .ic.g { background: rgba(34,197,94,.13); color: #4ade80; } .stat .ic.v { background: rgba(139,92,246,.15); color: #a78bfa; } .stat .ic.o { background: rgba(245,158,11,.14); color: #fbbf24; }
.stat b { font-size: 22px; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12.5px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.section-title:first-child { margin-top: 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel3); color: var(--muted); white-space: nowrap; }
.badge.ok { background: rgba(34,197,94,.13); color: #4ade80; }
.badge.warn { background: rgba(245,158,11,.14); color: #fbbf24; }
.badge.err { background: rgba(239,68,68,.14); color: #f87171; }
.badge.blue { background: var(--accent-soft); color: var(--accent2); }
.badge.violet { background: rgba(139,92,246,.16); color: #a78bfa; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.dot.off { background: var(--danger); }

/* ---------------- dispositivos ---------------- */
.devgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dev { display: flex; flex-direction: column; overflow: hidden; }
.dev .screen { aspect-ratio: 16/8; background: #07080c; border-bottom: 1px solid var(--line); display: grid; place-items: center; position: relative; overflow: hidden; }
.dev .screen img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dev .screen .ph { color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; }
.dev .screen .ph svg { width: 34px; height: 34px; }
.dev .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dev .name { font-weight: 600; font-size: 15px; }
.dev .kv { display: grid; grid-template-columns: 116px 1fr; gap: 4px 10px; font-size: 12.5px; }
.dev .kv dt { color: var(--muted); } .dev .kv dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev .actions { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.paircode { font: 700 30px/1 "Cascadia Mono", Consolas, ui-monospace, monospace; letter-spacing: .12em; color: #fff; background: var(--bg); border: 1px dashed var(--accent); border-radius: 12px; padding: 16px 20px; text-align: center; }

/* ---------------- publicaciones ---------------- */
.pubgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.pub { overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; position: relative; }
.pub:hover { border-color: var(--line2); transform: translateY(-1px); }
.pub.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.thumb { aspect-ratio: 9/16; background: #07080c; position: relative; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.thumb .tb { position: absolute; left: 8px; top: 8px; }
.thumb .cd { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); border-radius: 8px; padding: 6px 8px; font-size: 11.5px; text-align: center; font-weight: 600; }
.pub .meta { padding: 10px 12px; }
.pub .meta b { display: block; font-weight: 600; font-size: 13.5px; }
.pub .check { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.7); display: grid; place-items: center; }
.pub.sel .check { background: var(--accent); border-color: var(--accent); }
.pub .check svg { width: 14px; height: 14px; stroke: #fff; opacity: 0; } .pub.sel .check svg { opacity: 1; }
/* selector de la biblioteca: tarjetas más bajas (caben más) y las que ya están añadidas, apagadas */
.pubgrid.pick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pubgrid.pick .thumb { aspect-ratio: 1; }
.pubgrid.pick .thumb img { object-fit: contain; }
.pub.taken { cursor: default; opacity: .5; } .pub.taken:hover { transform: none; border-color: var(--line); }

/* ---------------- tablas / listas ---------------- */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--panel2); }

.editor { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.items { list-style: none; margin: 0; padding: 8px; min-height: 120px; }
.item { display: grid; grid-template-columns: 20px 24px 46px 1fr auto auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.item:hover { background: var(--panel2); }
.item .grip { color: var(--dim); cursor: grab; }
.item .n { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.item .mini { width: 46px; height: 82px; border-radius: 6px; overflow: hidden; background: #07080c; border: 1px solid var(--line); }
.item .mini img, .item .mini video { width: 100%; height: 100%; object-fit: cover; display: block; }
.item.off .mini, .item.off .info { opacity: .4; }
.item.drag { opacity: .35; } .item.ot { border-top-color: var(--accent); } .item.ob { border-bottom-color: var(--accent); }
.item .dur { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); } .item .dur input { width: 72px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state svg { width: 42px; height: 42px; stroke: var(--dim); margin-bottom: 8px; }
.empty-state b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.sticky { position: sticky; top: 90px; }

/* ---------------- calendario ---------------- */
.week { display: grid; grid-template-columns: 52px repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.week .wh { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-size: 12.5px; }
.week .wh b { display: block; font-size: 17px; }
.week .wh.today { color: var(--accent2); background: var(--accent-soft); }
.week .hours { position: relative; }
.week .hours div { height: 26px; box-sizing: border-box; font-size: 10.5px; color: var(--dim); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.week .daycol { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, rgba(37,43,57,.6) 25px, rgba(37,43,57,.6) 26px); }
.week .blk { position: absolute; border-radius: 6px; padding: 3px 6px; font-size: 11px; overflow: hidden; color: #fff; border-left: 3px solid rgba(255,255,255,.7); cursor: pointer; line-height: 1.25; }
.week .blk:hover { filter: brightness(1.15); z-index: 2; }
.week .blk.lost { opacity: .35; }
.week .now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; }
.week .now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.week .evt { position: absolute; left: 2px; right: 2px; height: 20px; background: var(--warn); color: #111; border-radius: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 6px; z-index: 2; overflow: hidden; white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------------- modal / toast ---------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4,6,10,.72); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; padding: 24px; animation: fade .15s; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { width: min(980px, 100%); } .modal.xl { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--panel3); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 420px; }
.toast.ok { border-color: rgba(34,197,94,.45); } .toast.err { border-color: rgba(239,68,68,.5); }
.progress { height: 6px; background: var(--panel3); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.preview-frame { background: #000; border-radius: 14px; border: 6px solid #1e2330; box-shadow: var(--shadow); overflow: hidden; margin: 0 auto; }
.preview-frame.v { aspect-ratio: 9/16; height: min(68vh, 720px); }
.preview-frame.h { aspect-ratio: 16/9; width: min(100%, 860px); }
.preview-frame.sm { height: 440px; }
.preview-frame > div { width: 100%; height: 100%; }
.drop-overlay { position: fixed; inset: 0; background: rgba(12,14,19,.86); z-index: 60; display: grid; place-items: center; pointer-events: none; }
.drop-overlay div { border: 2px dashed var(--accent); border-radius: 20px; padding: 60px 90px; font-size: 18px; color: var(--accent2); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--panel3); border-radius: 10px; border: 3px solid var(--bg); }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .editor { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--line); }
  .side .brand, .side .foot, .nav a span, .nav a .count { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; }
  .main { padding-bottom: 64px; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .item { grid-template-columns: 20px 46px 1fr auto; } .item .n, .item .dur { display: none; }
}

.editor .seg, .modal .seg { display: flex; } .editor .seg button, .modal .seg button { flex: 1; }
.col > .badge { align-self: flex-start; }
.accbox { padding: 0 6px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.acc-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin: 0 0 6px 4px; font-weight: 700; }
.accbox select { background: var(--panel); font-weight: 600; }
.acc-name { font-weight: 600; padding: 0 4px; }
@media (max-width: 760px) { .accbox { display: none; } }
/* ---------- editores de carrusel y evento ---------- */
.strip { display: flex; gap: 10px; flex-wrap: wrap; background: var(--bg); border: 1px dashed var(--line2); border-radius: 12px; padding: 10px; min-height: 110px; }
.sthumb { position: relative; width: 58px; height: 102px; border-radius: 8px; overflow: hidden; background: #07080c; border: 1px solid var(--line2); cursor: grab; }
.sthumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sthumb > span { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.7); font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 6px; }
.sthumb button { position: absolute; right: 2px; top: 2px; padding: 2px; background: rgba(0,0,0,.65); border-radius: 6px; color: #fff; }
.sthumb button svg { width: 13px; height: 13px; }
.fontsample { font-size: 30px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv { color: var(--accent2); font-weight: 700; margin-left: 4px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
label.inline-f { flex-direction: row; align-items: center; justify-content: space-between; }
textarea { resize: vertical; font-family: inherit; }
.pub .check b { color: #fff; }
.badge.pro { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; letter-spacing: .08em; }
.pro-box { border-color: rgba(245,158,11,.35); background: linear-gradient(180deg, rgba(245,158,11,.06), transparent 60%), var(--panel); }
.optrow { display: grid; grid-template-columns: 110px 64px 1fr 1fr; gap: 10px; align-items: center; }
.optrow input.em { text-align: center; font-size: 18px; padding: 6px; }
.audchart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.audchart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); height: 100%; justify-content: flex-end; }
.audchart .bar i { width: 100%; max-width: 26px; border-radius: 5px 5px 0 0; background: var(--accent); min-height: 2px; }
.audchart .bar.today i { background: #f59e0b; }
.audstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.audstats div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.audstats b { display: block; font-size: 20px; } .audstats span { font-size: 12px; color: var(--muted); }

.brand .ver { font-style: normal; opacity: .75; margin-left: 2px; }
.accent { color: var(--accent2); } .danger-t { color: #f87171; }
.qrbox { width: 220px; margin: 0 auto; background: #fff; padding: 10px; border-radius: 12px; }
.qrbox svg { display: block; width: 100%; height: auto; }
code.secret { display: inline-block; margin-top: 4px; font: 600 14px "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; color: var(--text); background: var(--panel2); padding: 4px 8px; border-radius: 6px; user-select: all; }
input.otp { font: 700 22px "Cascadia Mono", Consolas, monospace; letter-spacing: .3em; text-align: center; }
[hidden] { display: none !important; }

.usebar { height: 8px; border-radius: 99px; background: var(--panel2, #1c212c); overflow: hidden; margin: 6px 0 4px; }
.usebar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.usebar.near i { background: #f59e0b; } .usebar.full i { background: #ef4444; }
.plangrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card.plan { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card.plan.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card.plan .price { font-size: 26px; font-weight: 700; }
.card.plan .price span { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.card.plan .feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; flex: 1; }
.card.plan .feat li { display: flex; gap: 8px; align-items: center; }
.card.plan .feat .i { width: 16px; height: 16px; color: var(--accent2); flex: none; }
.card.plan button { margin-top: 6px; }
.section-title .seg { display: inline-flex; }

/* creatividades */
.crgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.crcard { overflow: hidden; display: flex; flex-direction: column; }
.crcard .body { padding: 12px; }
.crthumb { position: relative; aspect-ratio: 9 / 16; background: #000; overflow: hidden; container-type: size; }
.crthumb.h { aspect-ratio: 16 / 9; }
.crthumb > img, .crthumb > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.crover, .crlayer { position: absolute; inset: 0; pointer-events: none; }
.crlayer { pointer-events: auto; }
.crempty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 30px; color: var(--muted); gap: 4px; }
.crempty span { font-size: 12px; }
.crspin { position: absolute; inset: 0; background: rgba(0,0,0,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='18' fill='none' stroke='%2360a5fa' stroke-width='4' stroke-dasharray='80 40'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center / 44px no-repeat; }
.crtext { position: absolute; white-space: pre; line-height: 1.15; }
.crphoto { position: absolute; transform: translate(-50%, -50%); border: 2px dashed rgba(255,255,255,.6); border-radius: 8px; display: grid; place-items: center; color: rgba(255,255,255,.8); font-size: 12px; background: rgba(255,255,255,.06); }
.crphoto img { width: 100%; height: 100%; object-fit: contain; }
.crcanvas { position: relative; width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #111; container-type: size; touch-action: none; user-select: none; }
.crcanvas > img, .crcanvas > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.crcanvas .drag { cursor: grab; outline: 1px dashed rgba(255,255,255,.35); outline-offset: 4px; }
.crcanvas .drag:active { cursor: grabbing; }
.crcanvas .sel { outline: 2px solid var(--accent); outline-offset: 4px; }
.crcanvas .rs { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; background: var(--accent); border-radius: 4px; cursor: nwse-resize; }
.tpled { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 24px; align-items: start; }
.tplcanvas-wrap .crcanvas { max-width: 380px; }
.tplside { max-height: 74vh; overflow-y: auto; padding-right: 4px; }
.kindbtn { text-align: left; cursor: pointer; gap: 6px; align-items: flex-start; }
.kindbtn:hover { border-color: var(--accent); }
@media (max-width: 860px) { .tpled { grid-template-columns: 1fr; } }
a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
a.btn.primary { background: var(--accent); color: #fff; font-weight: 600; }
a.btn.ghost { background: transparent; border-color: var(--line2); }
a.btn.sm { padding: 5px 10px; font-size: 12.5px; }
a.btn .i { width: 14px; height: 14px; }
/* catálogo de plantillas */
.crfilters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.crfilters select { width: auto; min-width: 150px; }
.crfav { position: absolute; top: 6px; right: 6px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.crfav.on { color: #fbbf24; }
.crfav:hover { background: rgba(0,0,0,.75); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags span { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent2); }
.refthumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: #0003; display: grid; place-items: center; flex: 0 0 auto; }
.refthumb img { width: 100%; height: 100%; object-fit: cover; }
.crai { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.crai svg { width: 12px; height: 12px; vertical-align: -1px; }
.tesub { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.crcanvas.busy::after { content: 'Generando el fondo con IA…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-weight: 700; z-index: 5; animation: cibp-lp-blink 1.6s ease-in-out infinite; }
/* tiradores de las etiquetas en el lienzo: estirar (esquina) y girar (debajo) */
.crcanvas .cibp-ctext .h-rs, .crcanvas .cibp-ctext .h-rot { position: absolute; display: none; pointer-events: auto; z-index: 6; font-style: normal; }
.crcanvas .cibp-ctext.drag:hover .h-rs, .crcanvas .cibp-ctext.drag:hover .h-rot, .crcanvas .cibp-ctext.sel .h-rs, .crcanvas .cibp-ctext.sel .h-rot { display: block; }
.crcanvas .cibp-ctext .h-rs { right: -9px; bottom: -9px; width: 14px; height: 14px; background: #fff; border: 2px solid #3b82f6; border-radius: 3px; cursor: nwse-resize; }
.crcanvas .cibp-ctext .h-rot { left: 50%; bottom: -34px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #fff; border: 2px solid #3b82f6; color: #3b82f6;
  font: 700 14px/18px system-ui, sans-serif; text-align: center; cursor: grab; text-shadow: none; -webkit-text-stroke: 0; }
.crcanvas .cibp-ctext .h-rot::before { content: ''; position: absolute; left: 50%; top: -12px; height: 10px; border-left: 2px solid #3b82f6; }
.crcanvas .cibp-ctext .h-rot:active { cursor: grabbing; }
.crcanvas .cibp-ctext.low .h-rot { bottom: auto; top: -34px; }
.crcanvas .cibp-ctext.low .h-rot::before { top: auto; bottom: -12px; }
/* plantillas en cajas plegables */
.crsec { border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; background: var(--card, rgba(255,255,255,.02)); }
.crsec-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; background: transparent; border: 0; color: inherit; cursor: pointer; text-align: left; font-size: 16px; }
.crsec-h:hover { background: rgba(255,255,255,.03); border-radius: 14px; }
.crsec .chev { width: 14px; color: var(--muted); }
.crsec-b { padding: 0 16px 16px; }
.crcard.picked { outline: 3px solid var(--accent); outline-offset: -3px; }
.crpick { position: absolute; top: 8px; left: 8px; z-index: 4; width: 26px; height: 26px; border-radius: 7px; background: rgba(0,0,0,.55); border: 2px solid #fff; color: #fff; display: grid; place-items: center; font-weight: 800; cursor: pointer; }
.crcard.picked .crpick { background: var(--accent); border-color: var(--accent); }
.hexin { width: 92px !important; font-family: ui-monospace, monospace; font-size: 13px; text-transform: uppercase; padding: 6px 8px !important; }
.colorrow { display: flex; gap: 8px; align-items: center; }
/* 3.17: formatos para redes y descargas */
.crthumb.p { aspect-ratio: 4 / 5; }
.crthumb.s { aspect-ratio: 1 / 1; }
.fmtbox { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.035); }
.fmtline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.fmtline .fmtname { min-width: 52px; margin-right: auto; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.fmtline .dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; display: inline-block; }
.fmtline .dot.ok { background: #4ade80; } .fmtline .dot.blue { background: #60a5fa; animation: cibpulse 1.2s infinite; } .fmtline .dot.err { background: #f87171; }
@keyframes cibpulse { 50% { opacity: .35 } }
button.xs, .btn.xs { padding: 3px 8px; font-size: 12px; border-radius: 7px; gap: 4px; min-height: 0; }
button.xs svg { width: 13px; height: 13px; }
.icon.xs { padding: 2px; }
.fmttog { display: inline-flex; gap: 4px; margin-left: 6px; }
.chip.xs { padding: 2px 9px; font-size: 12px; min-height: 0; line-height: 1.5; }
.chip.xs:not(.on) { opacity: .55; text-decoration: line-through; }
.srvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.srvgrid > div { background: rgba(255,255,255,.035); border-radius: 10px; padding: 10px 12px; }
.srvgrid b { display: block; font-size: 15px; margin-top: 2px; }
/* etiqueta de proporción: cada formato con su color */
.fmtb { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; line-height: 1.6; border: 1px solid transparent; }
.fmtb.f9x16, .fmtc.f9x16.on { background: rgba(34,197,94,.16); color: #4ade80; border-color: rgba(74,222,128,.45); }
.fmtb.f4x5, .fmtc.f4x5.on { background: rgba(167,139,250,.18); color: #c4b5fd; border-color: rgba(196,181,253,.45); }
.fmtb.f1x1, .fmtc.f1x1.on { background: rgba(250,204,21,.16); color: #fde047; border-color: rgba(253,224,71,.45); }
.fmtb.f16x9, .fmtc.f16x9.on { background: rgba(244,114,182,.16); color: #f9a8d4; border-color: rgba(249,168,212,.45); }
.crfav svg { display: block; }
/* 3.19: avisos arriba y códigos de recuperación */
#banner:empty { display: none; }
#banner { padding: 0 28px; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.topnote { padding: 10px 14px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.topnote a { color: inherit; font-weight: 700; }
.topnote.info { background: rgba(59,130,246,.1); border-color: rgba(96,165,250,.35); color: #bfdbfe; }
.topnote.ok { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.35); color: #bbf7d0; }
.topnote.warn { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.35); color: #fde68a; }
.topnote.err { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.35); color: #fecaca; }
.reccodes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reccodes code { display: block; text-align: center; padding: 8px; border-radius: 8px; background: rgba(255,255,255,.06); font-size: 15px; letter-spacing: .08em; color: var(--text); }
.dangerzone { border: 1px solid rgba(248,113,113,.35); background: rgba(248,113,113,.06); border-radius: 10px; padding: 12px 14px; }
/* Audiencia por creatividad */
.audstats.aud5 { grid-template-columns: repeat(5, 1fr); }
.audhi { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.audhicard { display: flex; gap: 12px; align-items: center; padding: 12px; border-left: 3px solid var(--accent); }
.audhicard.ok { border-left-color: #4ade80; } .audhicard.warn { border-left-color: #f59e0b; } .audhicard.blue { border-left-color: #60a5fa; }
.audhicard .audthumb { width: 54px; }
.audthumb { width: 40px; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); flex: none; display: grid; place-items: center; color: var(--muted); }
.audthumb.h { aspect-ratio: 16 / 9; width: 64px; } .audthumb.sq { aspect-ratio: 1; width: 48px; } .audthumb.p { aspect-ratio: 4 / 5; width: 44px; }
.audthumb img, .audthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.audthumb .i { width: 16px; height: 16px; }
.tscroll { overflow-x: auto; }
.audt th[data-k] { cursor: pointer; white-space: nowrap; user-select: none; }
.audt th[data-k].on { color: var(--text); }
.audt td { white-space: nowrap; vertical-align: middle; }
.audbar { width: 60px; height: 6px; border-radius: 3px; background: var(--line); display: inline-block; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.audbar i { display: block; height: 100%; background: #f59e0b; border-radius: 3px; }
.audchart.aud2 .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.audchart.aud2 .pair i { flex: 1; max-width: 13px; }
.audchart.aud2 .pair i.st { background: #f59e0b; }
.audchart.aud2 .bar.today .pair i:not(.st) { background: #93c5fd; }
.ldot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 2px 0 8px; }
.audhow ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.6; }
.audhow summary { cursor: pointer; }
#topActions select#audDev { max-width: 220px; }
@media (max-width: 760px) { .audstats.aud5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; flex-shrink: 0; }
  .topbar > .grow { flex-basis: 100%; min-width: 0; }
  #topActions { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  #topActions:has(#audDev) { width: 100%; flex-wrap: nowrap; }
  #topActions #audDev { flex: 1; min-width: 0; max-width: none; }
  #audDays button { padding: 6px 9px; }
}
/* Colores de marca */
.brsw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); display: inline-block; flex: none; }
.brsw.lg { width: 26px; height: 26px; }
.brcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brcol input[type=color] { width: 54px; height: 40px; padding: 2px; border-radius: 10px; cursor: pointer; }
.warn-box { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.3); border-radius: 10px; padding: 10px 12px; margin: 0; }
.rclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; margin-top: 8px; }
.rcitem { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rcitem img { width: 38px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.rcitem input { flex: none; }
#topActions #audArch { color: #fca5a5; border-color: rgba(248,113,113,.4); }
.bndrop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center; margin-top: 4px; }
.bndrop.over { border-color: var(--accent); background: rgba(59,130,246,.06); }
.bndrop img { max-height: 220px; max-width: 100%; border-radius: 8px; }
.bndrop .i { width: 26px; height: 26px; }
.kindbtn.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.brsrc { width: 54px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
#brAmb { width: 100%; margin-top: 6px; }

textarea.tline { resize: vertical; min-height: 2.4em; line-height: 1.3; font: inherit; }

/* calendario con arrastre (pasos de 5 minutos) */
.week.cal5 .daycol { background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hh) - 1px), rgba(37,43,57,.6) calc(var(--hh) - 1px), rgba(37,43,57,.6) var(--hh)); cursor: crosshair; touch-action: none; user-select: none; }
.week.cal5 .blk { touch-action: none; }
.week.cal5 .blk.dragok { cursor: grab; }
.week.cal5 .blk.moving { cursor: grabbing; z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.week.cal5 .blk .rs { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.week.cal5 .blk .rs::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: rgba(255,255,255,.7); }
.week.cal5 .blk.ghost { background: var(--accent-soft); border: 1px dashed var(--accent2); color: var(--text); font-weight: 700; z-index: 6; pointer-events: none; }

/* ---------------- redes sociales ---------------- */
.sonet { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #fff; margin-right: 3px; vertical-align: middle; }
.sonet.instagram { background: #d6336c; } .sonet.facebook { background: #2563eb; } .sonet.tiktok { background: #0f766e; }
.sonet.off { background: var(--panel3); color: var(--muted); text-decoration: line-through; }
.sonet.big { min-width: 34px; height: 28px; font-size: 13px; border-radius: 8px; }
.sopend { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #111; font-size: 11px; margin-left: 4px; }
.socal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.sodow { padding: 8px; text-align: center; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--panel2); }
.soday { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.soday:nth-child(7n) { border-right: 0; }
.soday.other { background: rgba(0,0,0,.18); } .soday.other .sodn span { color: var(--dim); }
.soday.past .sochip { opacity: .75; }
.soday.today .sodn span { background: var(--accent); color: #fff; }
.soday.over { outline: 2px dashed var(--accent2); outline-offset: -3px; background: var(--accent-soft); }
.sodn { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.sodn span { font-size: 12.5px; font-weight: 600; min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.soadd { padding: 3px !important; opacity: 0; } .soadd svg { width: 14px; height: 14px; }
.soday:hover .soadd { opacity: 1; }
.sochip { display: flex; gap: 7px; align-items: center; padding: 4px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--dim); cursor: pointer; min-width: 0; }
.sochip:hover { border-color: var(--accent2); }
.sochip[draggable="true"] { cursor: grab; }
.soth { width: 30px; height: 38px; border-radius: 5px; overflow: hidden; background: #07080c; flex: none; display: grid; place-items: center; }
.soth.lg { width: 48px; height: 60px; }
.soth img, .soth video, .som img, .som video { width: 100%; height: 100%; object-fit: cover; display: block; }
.soinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; line-height: 1.2; }
.sonoimg { display: grid; place-items: center; gap: 6px; color: var(--dim); width: 100%; height: 100%; font-size: 12px; text-align: center; }
.sonoimg svg { width: 18px; height: 18px; }
.st-pending { border-left-color: var(--warn) !important; } .st-scheduled, .st-publishing { border-left-color: var(--accent) !important; }
.st-published { border-left-color: var(--ok) !important; } .st-partial { border-left-color: var(--warn) !important; } .st-failed { border-left-color: var(--danger) !important; }
.solegend { display: inline-flex; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.solegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; border-left: 0 !important; }
.solegend i.st-pending { background: var(--warn); } .solegend i.st-scheduled { background: var(--accent); } .solegend i.st-published { background: var(--ok); } .solegend i.st-failed { background: var(--danger); }
.soloose { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.sotable tr { cursor: pointer; } .sotable tr[class*="st-"] td:first-child { border-left: 3px solid transparent; }
.sotable tr.st-pending td:first-child { border-left-color: var(--warn); } .sotable tr.st-failed td:first-child { border-left-color: var(--danger); }
.socap { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; max-width: 560px; }
.soaccs .card { min-height: 190px; }
.soava { width: 40px; height: 40px; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; font-weight: 700; text-transform: uppercase; flex: none; object-fit: cover; }
.soava.sm { width: 28px; height: 28px; font-size: 12px; }
.sopost { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .sopost { grid-template-columns: 1fr; } .socal { font-size: 11px; } .soday { min-height: 84px; padding: 3px; } .soinfo span { display: none; } .soinfo b { font-size: 10px; } .sochip { flex-direction: column; gap: 2px; padding: 2px; } .solegend { display: none; } }
.somedia { display: flex; gap: 8px; flex-wrap: wrap; }
.som { width: 72px; height: 90px; border-radius: 8px; overflow: hidden; background: #07080c; position: relative; border: 1px solid var(--line2); flex: none; }
.som.xs { width: 34px; height: 42px; border-radius: 5px; }
.som.add { display: grid; place-items: center; align-content: center; gap: 4px; background: transparent; border-style: dashed; color: var(--muted); cursor: pointer; font-size: 11.5px; padding: 0; }
.som.add:hover { border-color: var(--accent2); color: var(--text); }
.somx { position: absolute; top: 2px; right: 2px; padding: 2px !important; background: rgba(0,0,0,.65) !important; border-radius: 50%; } .somx svg { width: 12px; height: 12px; stroke: #fff; }
.sonrow { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 10px; }
.sonrow.on { border-color: var(--line2); background: var(--panel2); }
.sonmore { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.sophone { border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; background: #0a0b10; }
.sophead { display: flex; gap: 9px; align-items: center; padding: 10px 12px; font-size: 13px; }
.sopimg { position: relative; background: #000; min-height: 200px; display: grid; place-items: center; }
.sopimg img, .sopimg video { width: 100%; display: block; max-height: 460px; object-fit: contain; }
.sopnav { position: absolute; top: 50%; transform: translateY(-50%); padding: 5px !important; border-radius: 50%; background: rgba(0,0,0,.6) !important; } .sopnav.l { left: 6px; } .sopnav.r { right: 6px; } .sopnav svg { stroke: #fff; width: 14px; height: 14px; }
.sopcount { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.sopcap { padding: 12px; font-size: 13px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.sopcap i { color: var(--accent2); font-style: normal; }
.solog { margin-top: 12px; font-size: 12px; } .solog summary { cursor: pointer; color: var(--muted); } .solog div { padding: 3px 0; }

/* ===== Marketing: equipo, briefing, plan, conversación ===== */
.sonet.screens { background: #7c3aed; }
.mkava { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff; }
.mkava svg { width: 20px; height: 20px; stroke: #fff; }
.mkbrief { max-width: 760px; margin: 0 auto; }
.mkq { font-size: 19px; line-height: 1.35; margin: 0 0 16px; }
.mkopts { display: flex; flex-direction: column; gap: 8px; }
.mkopts.multi, .mkopts.sm { flex-direction: row; flex-wrap: wrap; }
.mkopt { text-align: left; padding: 11px 14px; border: 1px solid var(--line2); background: var(--panel2); border-radius: 10px; color: var(--text); }
.mkopts.sm .mkopt { padding: 6px 12px; font-size: 13px; }
.mkopt:hover:not(:disabled) { border-color: var(--accent2); }
.mkopt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent2); font-weight: 600; }
.mkopt:disabled { opacity: .6; cursor: default; }
.mkfound { border: 1px dashed var(--accent); border-radius: 10px; padding: 9px 12px; background: var(--accent-soft); margin-bottom: 10px; font-size: 13.5px; }
.mkfound .i { width: 15px; height: 15px; vertical-align: -2px; color: var(--accent2); }
.mkopt.own { border-style: dashed; }
.mkopt.own::after { content: ' ×'; opacity: .6; }
.mkdocbar { display: flex; gap: 12px; align-items: center; margin-top: 22px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); }
.mkdocbar > div { flex: 1; min-width: 0; } .mkdocbar .i { width: 16px; height: 16px; vertical-align: -3px; }
.sotabrow { gap: 10px 14px; align-items: center; } .soquick { gap: 8px; flex: none; margin-left: auto; } .soquick:empty { display: none; } .soquick button .i { width: 15px; height: 15px; }
.mkways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 16px; }
.mkway { display: flex; gap: 14px; align-items: center; text-align: left; white-space: normal; min-width: 0; height: auto; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); cursor: pointer; }
.mkway:hover { border-color: var(--accent); background: var(--accent-soft); }
.mkway > span:last-child { display: flex; flex-direction: column; gap: 3px; } .mkway b { font-size: 16px; } .mkway span span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.mkwayi { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent2); } .mkwayi .i { width: 24px; height: 24px; }
.modal.mkplanm { width: min(720px, 100%); } .modal .seg.wrapseg { flex-wrap: wrap; } .mkdocuse { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; align-items: flex-start; }
@media (max-width: 720px) { .mkways { grid-template-columns: minmax(0, 1fr); } .mkdocbar { flex-direction: column; align-items: stretch; } }
.mkwait { text-align: center; max-width: 620px; margin: 30px auto; padding: 34px 26px; }
.mkspin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--panel3); border-top-color: var(--accent); margin: 0 auto 14px; animation: mkspin 1s linear infinite; }
@keyframes mkspin { to { transform: rotate(360deg); } }
.mkprods { display: flex; flex-direction: column; gap: 8px; }
.mkprod { display: grid; grid-template-columns: 1fr 150px 34px; gap: 8px; align-items: center; }
.mkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mkgrid.four { grid-template-columns: repeat(4, 1fr); }
.mkobj { font-size: 17px; font-weight: 600; line-height: 1.35; }
.mkcounts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 13px; }
/* «Te toca a ti»: tarjetas verticales, la publicación en miniatura */
.mktodo { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.mktc { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; text-align: left; transition: border-color .15s, transform .15s; }
.mktc:hover, .mktc:focus-visible { border-color: var(--line2); transform: translateY(-2px); outline: none; }
.mktc.need { border-color: color-mix(in srgb, #f59e0b 55%, var(--line)); } .mktc.bad { border-color: color-mix(in srgb, #f87171 55%, var(--line)); }
.mktch { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 11px 8px; font-size: 13px; } .mktch span { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.mktci { position: relative; aspect-ratio: 4 / 5; background: #07080c; display: grid; place-items: center; overflow: hidden; }
.mktci img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mktcch { display: flex; flex-wrap: wrap; gap: 4px; }
.mktcph { position: absolute; inset: 9px; border: 2px dashed color-mix(in srgb, #f59e0b 70%, transparent); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center; color: #f59e0b; background: repeating-linear-gradient(135deg, rgba(245,158,11,.05) 0 10px, transparent 10px 20px); }
.mktcph svg { width: 44px; height: 44px; stroke-width: 1.5; } .mktcph b { font-size: 14px; } .mktcph span { font-size: 12px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mktcph.err { border-color: color-mix(in srgb, #f87171 70%, transparent); color: #f87171; background: none; }
.mktc.rev .mktcph { border-color: var(--line2); color: var(--muted); background: none; }
.mktcst { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(14,16,22,.78); backdrop-filter: blur(6px); }
/* Habilidades de un agente (ficha) y diseño con el estilo de marca (asistente) */
.mkoskchip { margin-top: 5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font-size: 11.5px; cursor: pointer; } .mkoskchip:hover { border-color: var(--accent2); }
.mkosk { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.mkoskr { gap: 10px; padding: 8px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); cursor: pointer; align-items: center; } .mkoskr:hover { border-color: var(--accent2); } .mkoskr.off { opacity: .6; }
.mkoskt { display: flex; flex: none; } .mkoskt img { width: 34px; height: 42px; object-fit: cover; border-radius: 5px; margin-left: -8px; border: 1px solid var(--line2); } .mkoskt img:first-child { margin-left: 0; } .mkoskt .i { width: 26px; height: 26px; color: var(--muted); }
.mkoskex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .mkoskex .pt, #skL .pt { position: relative; width: 72px; height: 90px; border-radius: 8px; overflow: hidden; background: #07080c; } .mkoskex .pt img, #skL .pt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkoskex .pt button, #skL .pt button { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; line-height: 1; cursor: pointer; }
.pcstyles { margin-top: 12px; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.pcsl { gap: 10px; align-items: center; } .pcsl img { border-radius: 6px; object-fit: cover; flex: none; background: #07080c; } .pcsl .grow { display: flex; flex-direction: column; min-width: 0; } .pcsl .grow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* «Crear y publicar»: el equipo trabajando en una publicación suelta, y qué pasa cuando termine */
.pcteam { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.pcwho { gap: 10px; align-items: center; padding: 6px 0; } .pcwho img { border-radius: 50%; flex: none; object-fit: cover; } .pcwho .grow { display: flex; flex-direction: column; min-width: 0; } .pcwho .grow span { font-size: 12.5px; color: var(--muted); }
.pcwho > i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--ok); animation: pcspin .9s linear infinite; } .pcwho.done > svg { color: var(--ok); width: 18px; height: 18px; flex: none; }
@keyframes pcspin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .pcwho > i { animation: none; } }
.mktcst.ok { background: color-mix(in srgb, var(--ok) 82%, #000); }
.mktc.loose { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.mktcb { display: flex; flex-direction: column; gap: 6px; padding: 9px 11px 0; min-height: 76px; }
.mktct { font-size: 12.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mktcn { font-size: 11.5px; color: #f59e0b; display: flex; align-items: center; gap: 5px; } .mktcn svg { width: 13px; height: 13px; }
.mktcf { display: flex; gap: 6px; padding: 10px 11px 11px; margin-top: auto; } .mktcf .primary, .mktcf .ghost, .mktcf .btn { flex: 1; justify-content: center; } .mktcf .icon { flex: none; }
.mktodox { gap: 10px; margin-top: 12px; align-items: center; } .mktodox span { flex: 1; min-width: 220px; }
.mkphf { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; margin-bottom: 14px; } .mkphf .mktc { cursor: default; } .mkphf .mktcph b { font-size: 12px; } .mkphf .mktcph svg { width: 30px; height: 30px; }
.mkphopts { display: grid; gap: 8px; } .mkphopts .mkway { width: 100%; }
.mkbank { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 60vh; overflow: auto; }
.mkbanki { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #07080c; cursor: pointer; } .mkbanki:hover, .mkbanki:focus-visible { border-color: var(--accent, #f97316); } .mkbanki img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) { .mktodo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .mktcf { flex-wrap: wrap; } .mkphf { grid-template-columns: 90px 1fr; } }
.mkpieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.section-title.mksec { justify-content: flex-start; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.section-title.mksec h2 { margin: 0; }
.section-title.mksec .grow { flex: 1; }
.mkpiece { display: flex; gap: 12px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.mkpiece:hover { border-color: var(--line2); }
.mkpth { width: 120px; flex: none; border-radius: 9px; overflow: hidden; background: #07080c; aspect-ratio: 4 / 5; display: grid; place-items: center; }
.mkpth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkpbody { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.mkcap { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mknote { font-size: 12.5px; padding: 7px 10px; border-radius: 8px; background: rgba(245,158,11,.12); color: #fbbf24; }
.mknote.err { background: rgba(239,68,68,.12); color: #f87171; }
.mknote svg { width: 13px; height: 13px; vertical-align: -2px; }
.mklist { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mklist li { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.mkdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: mkpulse 1.2s ease-in-out infinite; }
@keyframes mkpulse { 50% { opacity: .3; } }
.mkrow { cursor: pointer; } .mkrow:hover td { background: var(--panel2); }
.mkgoal { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.mkpill { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line2); font-size: 12.5px; color: var(--muted); }
.mkpill b { color: var(--text); }
.mkpm { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 22px; }
.mkpmImgs { display: flex; gap: 10px; flex-wrap: wrap; }
.mkpmImgs figure { margin: 0; flex: 1 1 150px; max-width: 100%; }
.mkpmImgs img { width: 100%; border-radius: 10px; display: block; background: #07080c; }
.mkpmImgs figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; text-align: center; }
.mkpmEmpty { aspect-ratio: 4 / 5; border: 1px dashed var(--line2); border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 20px; }
.mkpmEmpty svg { width: 34px; height: 34px; stroke: var(--dim); }
.mkpmR { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mkro { padding: 8px 11px; border-radius: 9px; background: var(--panel2); color: var(--text); }
.mkscr { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: var(--text); }
label.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--text); }
label.chk input { width: auto; }
.mkchat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 440px; max-width: 900px; margin: 0 auto; }
.mkchatH { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mkmsgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mkmsg { display: flex; flex-direction: column; max-width: 78%; }
.mkmsg.user { align-self: flex-end; align-items: flex-end; }
.mkmsg.system { align-self: center; align-items: center; max-width: 90%; }
.mkbub { padding: 10px 14px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); line-height: 1.5; overflow-wrap: anywhere; }
.mkmsg.user .mkbub { background: var(--accent); border-color: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.mkmsg.director .mkbub { border-bottom-left-radius: 4px; }
.mkmsg.system .mkbub { background: transparent; border-style: dashed; color: var(--muted); font-size: 13px; padding: 6px 12px; }
.mkmeta { font-size: 11px; color: var(--dim); margin-top: 3px; padding: 0 4px; }
.mkact { margin-top: 10px; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--accent); color: var(--text); }
.mkact.st-done, .mkact.st-cancelled, .mkact.st-failed, .mkact.st-expired { border-color: var(--line2); opacity: .8; }
.mkactT { font-size: 13.5px; }
.mkchips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 10px; }
.mksend { display: flex; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.mksend textarea { resize: none; }
.mkempty { margin: auto; color: var(--muted); text-align: center; max-width: 380px; }
.mkmat { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.mkmatI { display: flex; flex-direction: column; gap: 7px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.mkmatT { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #07080c; }
.mkmatT img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkreport { line-height: 1.6; max-width: 820px; }
.mkteam { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mkagent.soon { opacity: .6; }
.mkagent .an { font-weight: 600; font-size: 15px; background: transparent; border-color: transparent; padding: 2px 6px; margin-left: -6px; }
.mkagent .an:hover, .mkagent .an:focus { border-color: var(--line2); background: var(--bg); }
.mklog { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.mkprof { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
.mkblock { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.mkblock:last-child { border-bottom: 0; }
.mkblockT { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent2); font-weight: 600; margin-bottom: 6px; }
.mkans { padding: 7px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; }
.mkans:hover { background: var(--panel2); }
.sochip.mkc { flex-direction: column; align-items: stretch; gap: 2px; padding: 5px 7px; border-style: dashed; }
.sochip.mkc.st-review, .mkbar.st-review { border-left-color: var(--warn); }
.sochip.mkc.st-need_material, .sochip.mkc.st-failed { border-left-color: var(--danger); }
.sochip.mkc.st-producing { border-left-color: var(--accent); }
.mkcidea { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkbar { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: rgba(124,58,237,.18); color: #c4b5fd; border-left: 3px solid #7c3aed; cursor: pointer; white-space: nowrap; overflow: hidden; }
.mkbar.st-review { opacity: .6; }
.mkbar.on { background: rgba(124,58,237,.38); }
table.t.compact th, table.t.compact td { padding: 7px 12px; }
.mkpre { white-space: pre-wrap; font: inherit; color: var(--muted); margin: 0; }
@media (max-width: 1100px) { .mkgrid, .mkgrid.four { grid-template-columns: 1fr 1fr; } .mkpm, .mkprof { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .mkgrid, .mkgrid.four { grid-template-columns: 1fr; } .mkpieces { grid-template-columns: 1fr; } .mkmsg { max-width: 92%; } .mkprod { grid-template-columns: 1fr 100px 34px; } }
/* IA de la plataforma: elección de modelos (principal y de reserva) */
.aimodel { display: grid; grid-template-columns: 92px 190px minmax(0, 1fr) 190px 200px; gap: 10px; align-items: center; padding: 6px 0; }
.aimodel + .aimodel { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.aimodel .lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.aimodel select, .aimodel input { width: 100%; min-width: 0; }
.aihint { text-align: right; white-space: nowrap; }
tr.aichg input.pi, tr.aichg input.po { border-color: #34d399; box-shadow: 0 0 0 2px rgba(52, 211, 153, .18); }
#apPrices input.pm[readonly] { background: transparent; border-color: transparent; padding-left: 0; font-weight: 600; }
@media (max-width: 1100px) { .aimodel { grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr); } .aimodel .aihint { grid-column: 2 / -1; text-align: left; } }
@media (max-width: 700px) { .aimodel { grid-template-columns: 1fr; } .aimodel .aihint { grid-column: auto; } }

.abrow.off { opacity: .55; } .abrow.off:focus-within { opacity: 1; }

.week .wh.whx { padding: 4px; display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; }
.week .wh.whl { justify-content: center; align-items: center; font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.mkbar.plan { background: transparent; border: 1px dashed #7c3aed; border-left-width: 3px; opacity: .8; }
.mkbar.nolist { opacity: .55; border-left-color: var(--warn); }

/* ---- equipo de marketing en vivo: avatares, tarjetas del equipo, tablero y actividad */
.mkoav { --c: var(--line2); flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: color-mix(in srgb, var(--c) 78%, #000); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); }
.mkoav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkoav.sm { width: 22px; height: 22px; font-size: 8px; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.mkoav.md { width: 40px; height: 40px; font-size: 12px; } .mkoav.lg { width: 56px; height: 56px; font-size: 15px; } .mkoav.xl { width: 76px; height: 76px; font-size: 19px; }
.mkoav.you { --c: #94a3b8; background: var(--panel3); color: var(--text); }
.mkoia { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line2); color: var(--muted); }
.mkoib { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line2); font: italic 700 13px/1 Georgia, serif; color: var(--muted); flex: none; }
.mkoib:hover { color: var(--accent2); border-color: var(--accent); }
.mkoteam { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mkocard { padding: 16px; border-top: 3px solid var(--c); display: flex; flex-direction: column; }
.mkocard.st-soon { opacity: .6; } .mkohead { display: flex; gap: 12px; align-items: center; }
.mkostate { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkostate.sm { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.mkostate i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.st-working .mkostate i { background: var(--ok); animation: mkopulse 1.4s ease-out infinite; } .st-waiting .mkostate i { background: var(--warn); } .st-paused .mkostate i { background: var(--danger); }
@keyframes mkopulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 100% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } }
.mkosec { margin: 14px 0 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.mkotasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.mkotasks li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; line-height: 1.35; }
.mkotasks li i { flex: none; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--dim); transform: translateY(-1px); }
.mkotasks li.doing i { border-color: var(--ok); background: var(--ok); animation: mkopulse 1.4s ease-out infinite; } .mkotasks li.wait i { border-color: var(--warn); background: var(--warn); }
.mkotasks li.done i { border: 0; width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); border-radius: 0; transform: rotate(-45deg) translateY(-3px); }
.mkotasks li.done span { color: var(--muted); } .mkotasks li span { flex: 1; min-width: 0; } .mkotasks li time { font-size: 11px; color: var(--dim); }
.mkotasks li.link { cursor: pointer; } .mkotasks li.link:hover span { color: var(--accent2); }
.mkofoot { margin-top: auto; padding-top: 14px; }
.mkoinfo b { display: block; margin-top: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); } .mkoinfo p { margin: 4px 0 0; } .mkoinfo ul { margin: 4px 0 0; padding-left: 18px; } .mkoinfo li { margin: 3px 0; }
.mkostrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 16px; }
.mkochip { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; min-width: 0; border-left: 3px solid var(--c); }
.mkochip:hover { border-color: var(--c); } .mkochip .grow { min-width: 0; } .mkochip b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mkochip.st-soon { opacity: .55; }
/* Tablero: una sola fila. Los títulos de las columnas son el recorrido; las vacías se pliegan en una tira estrecha y las demás se reparten el ancho. */
.mkoboardx { overflow-x: auto; transform: rotateX(180deg); padding-top: 8px; }   /* girado para que la barra de desplazamiento quede arriba */
.mkoboard { display: flex; gap: 6px; align-items: flex-start; transform: rotateX(180deg); min-width: min-content; }
.mkoarrow { flex: none; align-self: flex-start; margin-top: 12px; color: var(--dim); font-size: 15px; line-height: 1; }
.mkocol { flex: 1 1 0; min-width: 190px; max-width: 360px; padding: 0; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color .3s; max-height: var(--mkoh, max(430px, calc(100vh - 330px))); container-type: inline-size; text-align: left; color: inherit; font: inherit; }
.mkocol.you { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.mkocolh { flex: none; display: flex; align-items: center; gap: 7px; width: 100%; font-size: 12.5px; font-weight: 700; padding: 10px 10px 8px; background: none; border: 0; border-radius: 14px 14px 0 0; color: inherit; cursor: pointer; text-align: left; }
.mkocolh:hover, .mkocolh:focus-visible { background: var(--panel2); outline: none; }
.mkocolh > span:not(.mkoav) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mkocolh b, .mkocol.rail b { padding: 1px 7px; border-radius: 999px; background: var(--panel3); font-size: 11.5px; color: var(--muted); }
.mkocol.has .mkocolh b, .mkocol.rail.has b { background: var(--accent); color: #fff; }
.mkocolb { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 10px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.mkocol.rail { flex: none; width: 44px; min-width: 44px; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); min-height: 190px; }
.mkocol.rail:hover, .mkocol.rail:focus-visible { border-color: var(--accent2); color: var(--text); outline: none; }
.mkocol.rail > span:not(.mkoav) { writing-mode: vertical-rl; white-space: nowrap; letter-spacing: .02em; }
.mkoempty { padding: 14px 4px; text-align: center; color: var(--dim); font-size: 12px; }
@container (max-width: 225px) { .mkopc .soth.lg { width: 38px; height: 38px; } .mkopc { padding: 8px; font-size: 12.5px; } .mkopci { -webkit-line-clamp: 2; } .mkopc .primary.sm, .mkopc .ghost.sm { padding-inline: 8px; font-size: 12px; } }
.mkopc { padding: 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line2); cursor: pointer; font-size: 13px; }
.mkopc:hover { border-color: var(--accent2); } .mkopc.live { border-color: color-mix(in srgb, var(--ok) 55%, var(--line2)); }
.mkopci { margin-top: 7px; color: var(--muted); font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mkopcs { margin-top: 7px; font-size: 11.5px; color: var(--ok); display: flex; gap: 6px; align-items: center; } .mkopcs i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: mkopulse 1.4s ease-out infinite; }
.mkopcs.warn { color: var(--warn); } .mkopcs.err { color: var(--danger); } .mkopcs .i { width: 13px; height: 13px; flex: none; }
.mkoday { margin: 16px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); } .mkoday:first-of-type { margin-top: 0; }
.mkofeed { padding: 4px 0; } .mkomsg { display: flex; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); } .mkomsg:last-child { border-bottom: 0; }
.mkomsg.link { cursor: pointer; } .mkomsg.link:hover { background: var(--panel2); } .mkomsg.new { animation: mkoin .9s ease-out; }
@keyframes mkoin { 0% { background: var(--accent-soft); transform: translateY(-6px); opacity: 0; } 100% { background: transparent; transform: none; opacity: 1; } }
.mkowho { flex: none; width: 82px; display: flex; align-items: center; gap: 5px; } .mkoto { color: var(--dim); font-size: 13px; }
.mkoline { font-size: 12.5px; } .mkotext { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 720px) { .mkocol:not(.rail) { flex: none; width: 230px; } .mkowho { width: 64px; } .mkostrip { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .st-working .mkostate i, .mkotasks li.doing i, .mkopcs i, .mkomsg.new { animation: none; } }

/* ---- la oficina del equipo (escena isométrica en vivo) */
.ofbox { position: relative; margin-bottom: 16px; }
.ofbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; min-height: 30px; }
.oflive { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ok); flex: none; }
.oflive i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: mkopulse 1.6s ease-out infinite; }
.ofticker { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .ofticker b { color: var(--text); font-weight: 600; }
.ofbar .icon { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line2); font-size: 17px; line-height: 1; color: var(--muted); }
.ofwrap { position: relative; overflow: hidden; border-radius: 18px; background: #03060e; border: 1px solid var(--line); touch-action: pan-y; min-height: 200px; }
.ofwrap canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: block; }
.ofov { position: absolute; inset: 0; pointer-events: none; }
.ofov > * { position: absolute; left: 0; top: 0; pointer-events: auto; }
.oftag { --c: var(--line2); display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 0; background: none; border: 0; cursor: pointer; translate: -50% -100%; white-space: nowrap; }
.ofpill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(14,16,22,.82); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); backdrop-filter: blur(6px); }
.ofpill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.oftag.st-working .ofpill i { background: var(--ok); animation: mkopulse 1.4s ease-out infinite; } .oftag.st-waiting .ofpill i { background: var(--warn); } .oftag.st-paused .ofpill i { background: var(--danger); }
.oftag.st-soon { opacity: .6; } .oftag:hover .ofpill { border-color: var(--c); background: rgba(14,16,22,.95); }
.ofbub { max-width: 250px; white-space: normal; text-align: left; padding: 5px 9px; border-radius: 10px; font-size: 11.5px; line-height: 1.3; color: var(--muted); background: rgba(14,16,22,.86); border: 1px solid var(--line2); }
.ofbub.say { color: #14161c; background: #f6f1e8; border-color: #f6f1e8; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.45); animation: ofsay .25s ease-out; }
@keyframes ofsay { from { transform: translateY(6px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.oftray { translate: -50% -100%; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: var(--muted); background: rgba(14,16,22,.82); border: 1px solid var(--line2); cursor: pointer; white-space: nowrap; }
.oftray.on { color: #fff; border-color: var(--warn); } .oftray.on b { color: var(--warn); }
.ofhot { background: transparent; border: 0; border-radius: 12px; cursor: pointer; } .ofhot:hover, .ofhot:focus-visible { background: rgba(249,115,22,.14); outline: 1.5px solid rgba(249,115,22,.6); }
.ofpop { position: absolute; right: 12px; top: 50px; width: min(320px, calc(100% - 24px)); padding: 14px; z-index: 3; border-top: 3px solid var(--c); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
/* La oficina ocupa todo el ancho que quepa en pantalla sin tener que bajar; objetivo, plan y créditos van al lado si queda sitio y, si no, debajo en fila */
.mkhero { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-start; margin-bottom: 4px; }
.mkhero > #mkoOffice { flex: 0 1 var(--ofw, 100%); min-width: min(100%, 420px); } .mkhero > #mkoOffice:empty { display: none; } .mkhero .ofbox { margin-bottom: 0; }
.mkhero .mkgrid { flex: 1 1 236px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 0; } .mkhero .mkgrid.side { margin-top: 38px; }
@media (max-width: 760px) { .ofpill { font-size: 10px; padding: 2px 6px; } .ofbub { display: none; } .ofbub.say { display: block; max-width: 170px; font-size: 10.5px; } .oftray { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { .oflive i, .oftag.st-working .ofpill i, .ofbub.say { animation: none; } }
/* habilidades: archivos que acompañan a una habilidad y lo que no se ha podido usar de un ZIP */
.mkoskf { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; gap: 8px; }
.mkoskno { max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.mkoskno code { font-size: 12px; }
/* galería de estilos y kit de marca */
.mkogal { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mkogc { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel2); display: flex; flex-direction: column; }
.mkogc.own { border-color: rgba(34,197,94,.45); }
.mkogi { aspect-ratio: 4 / 5; background: #0b0d12; } .mkogi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkogn { height: 100%; display: grid; place-items: center; color: var(--muted, #8b93a7); }
.mkogt { display: flex; gap: 4px; padding: 6px 8px 0; } .mkogt img { width: 34px; height: 42px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .55; border: 1px solid transparent; } .mkogt img.on { opacity: 1; border-color: var(--accent, #ff7a00); }
.mkogb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; } .mkogb p { margin: 2px 0 8px; flex: 1; }
.mkobkc { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 3px; border: 1px solid var(--line); border-radius: 10px; } .mkobkc input { width: 38px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; } .mkobkc button { background: none; border: 0; color: inherit; cursor: pointer; opacity: .6; }

/* elementos de lista con fechas (piezas del equipo de marketing) y arrastre en el calendario de pantallas */
.plwin { display: inline-block; margin: 2px 0 1px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid rgba(124,58,237,.45); background: rgba(124,58,237,.16); color: #c4b5fd; cursor: default; line-height: 1.6; }
.plwin[data-piece] { cursor: pointer; }
.plwin[data-piece]:hover { background: rgba(124,58,237,.3); }
.plwin.wait { border-style: dashed; background: transparent; color: var(--muted, #9aa3b2); }
.plwin.end { border-color: rgba(148,163,184,.35); background: rgba(148,163,184,.12); color: var(--muted, #9aa3b2); }
.mkscr2 { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 10px; }
.mkscr2 .mkscrL { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.week .wh.whx.drop { outline: 2px dashed #7c3aed; outline-offset: -3px; background: rgba(124,58,237,.12); }
.mkbar[draggable="true"] { cursor: grab; }
.mkbar.inlist { background: rgba(124,58,237,.3); }

/* plataforma: inicio de los administradores */
.platstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 4px 0 22px; }
.platstat { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.platstat:hover { transform: translateY(-2px); border-color: var(--acc, #f97316); }
.platstat b { font-size: 30px; line-height: 1.1; }

/* aviso de una pantalla que ha dejado de contar (en su tarjeta y bajo la gráfica de Inicio) */
.devwarn { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; color: #ffd9a8;
  background: rgba(255, 159, 67, .12); border: 1px solid rgba(255, 159, 67, .35); text-decoration: none; }
.devwarn svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: #ff9f43; }
a.devwarn:hover { background: rgba(255, 159, 67, .18); }
#dWarn:empty { display: none; }

/* crear y publicar: publicación normal, historia o las dos (Instagram y Facebook) */
.pcstory { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.pcstory .chips { margin: 0; }

/* Apariencia: galería de fondos */
.apgal { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 12px; }
.apth { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .12); background: #111 center / cover no-repeat; cursor: pointer; padding: 0; overflow: hidden; }
.apth:hover { border-color: rgba(255, 255, 255, .4); }
.apth.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .35); }
.apth span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px; font-size: 10.5px; line-height: 1.2; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apth i { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-style: normal; font-size: 14px; line-height: 20px; text-align: center; opacity: 0; transition: opacity .15s; }
.apth:hover i { opacity: 1; }
.apth i:hover { background: #dc2626; }

/* ---- flujo de publicación (Configuración) y pasos fijos plegados en «Crear y publicar» ---- */
.pfbody { gap: 14px; padding: 16px 18px; }
.pfbody .seg { align-self: flex-start; }
.pfrow { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.pfn { display: flex; align-items: center; gap: 8px; font-weight: 600; padding-top: 7px; }
.pfn b { width: 22px; height: 22px; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; font-size: 12px; }
.pfv { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; min-width: 0; }
.pfv > select { flex: 1 1 260px; min-width: 0; max-width: 460px; }
.pfv > .muted, .pfv > .chips, .pfv > .pfas { flex: 1 1 100%; }
.pfas { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pfas select { width: auto; }
.pfsum { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); line-height: 1.5; }
.pfsum svg { flex: 0 0 auto; margin-top: 2px; }
@media (max-width: 620px) { .pfrow { grid-template-columns: 1fr; gap: 6px; } .pfn { padding-top: 0; } }
.pcstep.fold > :not(h3) { display: none; }
.pcstep.fold h3 { margin-bottom: 0; }
.pcstep h3 .pcfx { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--accent); cursor: pointer; text-decoration: underline; padding-left: 10px; white-space: nowrap; }

/* ---- packs de plantillas ---- */
.tpkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card.tpk { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; padding: 0; }
.tpkcover { position: relative; aspect-ratio: 16 / 10; background: var(--panel3); overflow: hidden; }
.tpkcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpkcover .badge { position: absolute; top: 10px; left: 10px; }
.tpkcover .ph, .tpkone .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; background: var(--panel3); }
.tpkcover.edit { border-radius: 12px; border: 1px solid var(--line); }
.tpkbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tpkbody h3 { margin: 0; }
.tpksum { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpkmini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tpkmini > div { aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: var(--panel3); }
.tpkmini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpkprice { font-size: 18px; font-weight: 700; }
.tpkprice span { font-size: 12px; font-weight: 400; color: var(--muted); }
.tpkbig { width: 260px; max-width: 100%; border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; }
.tpkall { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.tpkone { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; min-width: 0; border-radius: 10px; padding: 6px; border: 1px solid transparent; }
.tpkone img, .tpkone > .ph { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; display: block; }
.tpkall.pick .tpkone { cursor: pointer; }
.tpkone.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tpkone.off img { opacity: .4; }

/* pestañas en el móvil: un desplegable en lugar de la fila de botones (lo crea tabSelect) */
.tabsel { display: none; }
@media (max-width: 760px) {
  .tabsel { display: block; width: 100%; flex: 1 1 100%; min-height: 44px; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
  .tabsel + .chips { display: none !important; }
  .sotabrow .tabsel { margin-bottom: 0; }
  .sotabrow .soquick { flex: 1 1 100%; margin-left: 0; }
  .sotabrow .soquick button { flex: 1 1 0; justify-content: center; min-height: 42px; white-space: nowrap; }
  .sotabrow > .muted.small { flex: 1 1 100%; }
}
