/* Estilos del portal. Base: artifact "Portal Lëns Noviembre" (vista cliente). */
:root {
  --bg: #f3f5f4; --surface: #ffffff; --ink: #101312; --muted: #5a6663; --line: #dce2e0;
  --accent: #00846f; --accent-ink: #ffffff; --accent-soft: #dcf5f0; --mucho: #f9e11e;
  --warn-bg: #fff1d6; --warn-fg: #8a5300;
  --chg-bg: #ffe1e6; --chg-fg: #a3203c;
  --ok-bg: #d6f3e7; --ok-fg: #0f6a45;
  --display: "Archivo Black", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1110; --surface: #161b1a; --ink: #eaf0ee; --muted: #9aa8a4; --line: #27302e;
    --accent: #4fd6bd; --accent-ink: #06201b; --accent-soft: #12352f;
    --warn-bg: #3a2d10; --warn-fg: #f3c76b;
    --chg-bg: #3d1822; --chg-fg: #ff9bb0;
    --ok-bg: #123225; --ok-fg: #7fdcab;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, select, input, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a { color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Barra superior */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.mucho { font-family: var(--display); background: var(--mucho); color: #111; padding: 4px 10px; border-radius: 6px; font-size: 15px; line-height: 1.1; text-transform: uppercase; }
.x { color: var(--muted); }
.marca { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.ctx { color: var(--muted); font-size: 14px; flex: 1; min-width: 160px; }
.ctx b { color: var(--ink); font-weight: 500; }
.equipo { font-size: 13px; background: var(--warn-bg); color: var(--warn-fg); border-radius: 8px; padding: 4px 10px; }

/* Avisos */
.aviso { padding: 10px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-fg); margin: 0 0 16px; }
.aviso--error { background: var(--chg-bg); color: var(--chg-fg); }
.nota, .note { color: var(--muted); font-size: 13px; margin: 0; }

/* Norte y avance */
.portal { padding: 24px 0 56px; }
.intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 820px) { .intro { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.norte h2 { font-size: 26px; line-height: 1.1; margin-bottom: 10px; text-transform: uppercase; }
.norte p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.norte .norte-sub { font-family: var(--body); font-weight: 700; font-size: 14px; margin: 12px 0 4px; }
.norte .bloque--bulleted_list_item::before, .norte .bloque--numbered_list_item::before { content: "• "; }
.prog { display: flex; flex-direction: column; gap: 10px; }
.prog .big { font-family: var(--display); font-size: 36px; line-height: 1; }
.prog .big small { font-family: var(--body); font-size: 16px; color: var(--muted); font-weight: 500; }
.bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.bar i { display: block; }
.bar .ok { background: var(--ok-fg); } .bar .chg { background: var(--chg-fg); } .bar .pen { background: var(--warn-fg); opacity: .55; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend b { color: var(--ink); }

/* Filtros y botones */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lab { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-right: 4px; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-weight: 500; font-size: 14px; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.good { background: var(--ok-fg); border-color: var(--ok-fg); color: var(--surface); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); text-decoration: underline; }
.boton { display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; border: 0; }
.en-linea { display: inline; }

/* Tarjetas */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-top: 16px; align-items: start; }
.split.sin-feed { grid-template-columns: minmax(0, 1fr); }
.col-items { min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 90px; }
.card:target { box-shadow: 0 0 0 3px var(--accent); }
.card.s-revision { border-top: 4px solid var(--warn-fg); }
.card.s-cambios { border-top: 4px solid var(--chg-fg); }
.card.s-aprobada { border-top: 4px solid var(--ok-fg); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; flex-wrap: wrap; }
.fmt { font-size: 12px; font-weight: 700; background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; }
.date { font-size: 13px; color: var(--muted); flex: 1; min-width: 80px; }
.pill { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.pill.revision { background: var(--warn-bg); color: var(--warn-fg); }
.pill.cambios { background: var(--chg-bg); color: var(--chg-fg); }
.pill.aprobada { background: var(--ok-bg); color: var(--ok-fg); }
.card-b { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.titulo { font-weight: 500; }
.canal { font-size: 12px; color: var(--muted); }

/* Vista previa */
.marco { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #e9eeed; }
.media-vacia { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #5a6663; font-size: 13px; padding: 16px; text-align: center; }
.detalle-error { font-size: 12px; opacity: .8; }
.cargando { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #c3cac8; border-top-color: #00846f; animation: girar 0.9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cargando { animation: none; } }
.laminas img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; background: #e9eeed; }
.dots { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0; background: #fff; }
.dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; background: #c3cac8; padding: 0; }
.dots button[aria-current="true"] { background: #00846f; }
.dots .nav { width: auto; height: auto; background: transparent; font-size: 16px; font-weight: 700; color: #444; padding: 0 8px; }
.videos { display: flex; flex-direction: column; gap: 2px; }
.video { margin: 0; background: #000; }
.video video { display: block; width: 100%; max-height: 560px; background: #000; }
.video figcaption { font-size: 12px; color: #fff; padding: 4px 8px; }

/* Copy y respuestas */
.copy { white-space: pre-wrap; font-size: 14px; margin: 0; max-height: 210px; overflow: auto; }
.copy-l { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
textarea, input[type="text"], input[type="password"] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); color: var(--ink); font-size: 14px; }
textarea { min-height: 76px; resize: vertical; }
.desplegable > summary { list-style: none; display: inline-block; }
.desplegable > summary::-webkit-details-marker { display: none; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Feed de Instagram */
.feedcol { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .feedcol { position: static; order: -1; } }
.ph { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.ph-top { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid #e6e6e6; }
.ph-av { width: 56px; height: 56px; border-radius: 50%; background: #00846f; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; flex: none; }
.ph-n { font-weight: 700; font-size: 16px; line-height: 1.2; }
.ph-s { font-size: 13px; color: #555; }
.pg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; max-height: min(560px, calc(100vh - 360px)); min-height: 120px; overflow-y: auto; background: #fff; }
.pt { position: relative; aspect-ratio: 3 / 4; background: #e9eeed; overflow: hidden; display: block; }
.pt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st { position: absolute; left: 5px; bottom: 5px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; }
.st.revision { background: #e0a21b; } .st.cambios { background: #d6304f; } .st.aprobada { background: #1f9d62; }
.fleg { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.fleg i { display: inline-block; position: static; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; border: 0; }

/* Portal del equipo en amarillo y negro (colores de Mucho Brand) */
.tema-equipo { --accent: #101312; --accent-ink: #f9e11e; --accent-soft: #fbf1a6; }
.tema-equipo .top { background: var(--mucho); border-bottom-color: #101312; color: #101312; }
.tema-equipo .top .mucho { background: #101312; color: var(--mucho); }
.tema-equipo .top .ctx, .tema-equipo .top .ctx b { color: #101312; }
.tema-equipo .top .btn { background: #101312; border-color: #101312; color: var(--mucho); }
.tema-equipo .top .btn.ghost { background: transparent; border-color: transparent; color: #101312; }
.tema-equipo .tile { border-top: 4px solid var(--mucho); }
@media (prefers-color-scheme: dark) {
  .tema-equipo { --accent: #f9e11e; --accent-ink: #101312; --accent-soft: #3a3510; }
}

/* Portal del equipo (artifact "Portal Multicliente", vista Todos los clientes) */
.crumb { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.crumb h1 { font-size: 24px; text-transform: uppercase; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile .n { font-family: var(--display); font-size: 36px; line-height: 1.05; }
.tile .n small { font-family: var(--body); font-size: 16px; color: var(--muted); }
.tile .l { font-size: 13px; color: var(--muted); }
.tile.chg .n { color: var(--chg-fg); } .tile.pen .n { color: var(--warn-fg); } .tile.ok .n { color: var(--ok-fg); }
.bloque-equipo { margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sec-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.sec-h h2 { font-size: 16px; text-transform: uppercase; } .sec-h span { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; padding-top: 0; }
.thumb { width: 48px; height: 60px; border-radius: 8px; flex: none; object-fit: cover; background: var(--line); display: block; }
.row .info { flex: 1; min-width: 0; }
.row .info b { font-weight: 500; }
.row .info q, .ev q { quotes: none; display: block; font-size: 14px; margin-top: 2px; color: var(--ink); }
.row .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row .actions { flex-wrap: nowrap; }
.alerta { color: var(--warn-fg); font-weight: 700; }
.tw { overflow-x: auto; }
.tw table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 14px; }
.tw th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tw td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tw .num-c { text-align: right; font-variant-numeric: tabular-nums; }
tr.apagada td { color: var(--muted); }
.cc { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; white-space: nowrap; background: var(--accent-soft); }
.feed { display: flex; flex-direction: column; gap: 12px; }
.ev { display: flex; gap: 8px; font-size: 13px; line-height: 1.4; }
.ev .d { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--muted); }
.ev .d.cambios { background: var(--chg-fg); } .ev .d.aprobada { background: var(--ok-fg); }
.ev-cuerpo { flex: 1; min-width: 0; }
.ev .t { color: var(--muted); white-space: nowrap; }

/* Equipo y entrada */
main.simple { max-width: 960px; margin: 0 auto; padding: 48px 16px; }
.entrada { max-width: 420px; margin: 0 auto; padding: 64px 16px; text-align: center; display: flex; flex-direction: column; gap: 16px; }
.login { display: flex; flex-direction: column; gap: 10px; }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.barra nav { display: flex; align-items: center; gap: 16px; }
