/* ————— Tokens ————— */
:root {
  color-scheme: dark;
  --bg: #18191a; --panel: #1f2023; --line: #2b2c30;
  --text: #e9e7e2; --muted: #96969e; --accent: #ff7a1a; /* naranja BNO */
  --ok: #31a24c; --no: #e0442e; --fav: #e8c95a;
  --card: #ffffff; --card-text: #101114; --card-muted: #65676b;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }

/* ————— Header 1 línea ————— */
#topbar {
  position: sticky; top: 0; z-index: 30; height: 52px;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: rgba(15,15,17,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
#tb-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
#tb-count { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 12px; transition: border-color .15s, transform .12s;
}
.btn:hover { border-color: var(--accent); }
.btn.ghost { color: var(--muted); } .btn.ghost:hover { color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #17130e; font-weight: 650; }
.btn.canasta { font-size: 15px; } .btn.canasta.bump { transform: scale(1.18); }

/* ————— Popover de filtros ————— */
.pop {
  position: fixed; top: 58px; right: 12px; z-index: 40; width: min(340px, calc(100vw - 24px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  display: grid; gap: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.5);
}
.pop label { display: grid; gap: 4px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pop select, .pop input[type="search"] {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; width: 100%;
}
.pop .fila { display: flex; gap: 8px; justify-content: space-between; }

/* ————— Estados / grid ————— */
main { max-width: 1480px; margin: 0 auto; padding: 22px 18px 120px; }
.screen { color: var(--muted); text-align: center; padding: 80px 20px; font-size: 15px; }
.screen.error { color: #e08b7c; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }

/* ————— Card ————— */
.card { background: var(--card); color: var(--card-text); border-radius: 10px; overflow: hidden;
        box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 26px rgba(0,0,0,.25); }
.card-top { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 12px; color: var(--card-muted); }
.card-top .pid { font-weight: 700; color: #b3540e; letter-spacing: .05em; }
.chip { font-size: 11px; border: 1px solid #dadde1; background: #f5f6f7; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.chip.warn { color: #b3392a; border-color: #e07862; }
.media { position: relative; background: #f0f2f5; display: grid; }
.media > img, .media .pendiente { grid-area: 1 / 1; width: 100%; height: 100%; }
.media > img { object-fit: contain; display: block; cursor: zoom-in; }
.pendiente { display: grid; place-items: center; color: #65676b; font-size: 11px; letter-spacing: .16em;
             text-transform: uppercase; background: repeating-linear-gradient(-45deg, #f0f2f5 0 14px, #e4e6eb 14px 28px); }
.copy { padding: 10px 12px 4px; font-size: 13.5px; line-height: 1.45; }
.copy .headline { font-weight: 700; margin: 0 0 2px; }
.copy .caption { color: #3a3b3e; white-space: pre-line; word-break: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; cursor: pointer; }
.copy .caption.open { -webkit-line-clamp: unset; line-clamp: unset; }

/* Las secciones de carrusel (Task 3), feedback (Task 4), canasta (Task 5),
   lightbox (Task 3) y modales (Task 4/5) se agregan AL FINAL de este archivo
   en sus tasks, bajo comentarios /* ——— TaskN ——— */

/* ————— Toast ————— */
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60;
         background: #2a2b2f; color: var(--text); border: 1px solid var(--line);
         border-radius: 8px; padding: 10px 16px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ——— Task3: carrusel + lightbox + mock ——— */
.media.is-carousel { overflow: hidden; }
.slides { grid-area: 1/1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: 100%; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; display: grid; }
.slide img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; display: block; }
.slide-label { position: absolute; top: 8px; left: 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
               background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; padding: 2px 8px; }
.slide-count { position: absolute; bottom: 8px; right: 10px; z-index: 2; font-size: 11px;
               background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; padding: 2px 8px; }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 30px;
             border-radius: 50%; border: none; cursor: pointer; background: rgba(0,0,0,.45); color: #fff; font-size: 18px; line-height: 1; }
.slide-nav.prev { left: 8px; } .slide-nav.next { right: 8px; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.93); }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 30px; padding: 56px 80px; }
.lb-media { min-width: 0; max-width: calc(100vw - 520px); display: grid; place-items: center; }
.lb-media > img { max-height: 86vh; max-width: 100%; object-fit: contain; border-radius: 8px; }
.lb-carousel { width: min(80vh, calc(100vw - 560px)); aspect-ratio: 1/1; border-radius: 8px; position: relative; }
.lb-pendiente { width: min(56vh, 60vw); aspect-ratio: 1/1; border-radius: 8px; }
.lb-topline { position: absolute; top: 16px; left: 20px; color: #bdbdc4; font-size: 13px; pointer-events: none; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
            background: rgba(20,20,22,.6); color: #fff; border: 1px solid rgba(255,255,255,.25); font-size: 26px; cursor: pointer; }
.lb-arrow.prev { left: 16px; } .lb-arrow.next { right: 16px; }
.lb-close { position: absolute; top: 12px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
            background: rgba(20,20,22,.6); color: #fff; border: 1px solid rgba(255,255,255,.25); font-size: 16px; cursor: pointer; }

.mock { width: 380px; flex: none; max-height: 88vh; overflow-y: auto; background: var(--card); color: var(--card-text);
        border-radius: 10px; box-shadow: 0 12px 44px rgba(0,0,0,.55); }
.mock-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 4px; }
.mock-avatar { width: 40px; height: 40px; border-radius: 50%; background: #101114; color: #fff; font-weight: 700;
               display: grid; place-items: center; }
.mock-name { font-size: 15px; font-weight: 700; }
.mock-sub { font-size: 12.5px; color: var(--card-muted); }
.mock-text { padding: 8px 14px 12px; font-size: 14px; line-height: 1.45; white-space: pre-line; word-break: break-word; }
.mock-link { display: flex; align-items: center; gap: 12px; background: #f0f2f5; border-block: 1px solid #dadde1; padding: 10px 14px; }
.mock-link-info { flex: 1; min-width: 0; }
.mock-domain { font-size: 11.5px; color: var(--card-muted); text-transform: uppercase; }
.mock-headline { font-size: 15px; font-weight: 700; line-height: 1.3; }
.mock-cta { flex: none; border: none; background: #e4e6eb; font: inherit; font-size: 13.5px; font-weight: 600;
            padding: 8px 13px; border-radius: 6px; cursor: pointer; }
.lb-review { padding: 10px 14px 14px; }
@media (max-width: 920px) {
  .lb-stage { flex-direction: column; overflow-y: auto; padding: 60px 14px 90px; gap: 16px; }
  .lb-media { max-width: 92vw; }
  .lb-carousel { width: min(88vw, 60vh); }
  .mock { width: min(380px, 100%); max-height: none; }
}

/* ——— Task4: feedback + modal ——— */
.fbz { background: #f5f6f8; border-top: 1px solid #e3e5e8; padding: 10px 12px 12px; display: grid; gap: 8px; }
.fbz-others { font-size: 11.5px; color: var(--card-muted); }
.fbz-actions { display: flex; gap: 6px; }
.fbz-actions .btn { background: #e9ebee; color: #1c1d20; border: 1px solid #d4d7dc; flex: 1; padding: 7px 6px; font-size: 12.5px; white-space: nowrap; }
.fbz-actions .fbz-fav { flex: 0 0 44px; }
.fbz-actions .fbz-fav.on { background: #fdf3d1; border-color: var(--fav); }
.fbz-actions .fbz-ok.on { background: #e3f5e9; border-color: var(--ok); color: #1d7a3f; }
.fbz-actions .fbz-no.on { background: #fde8e4; border-color: var(--no); color: #b3392a; }
.fbz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.pick { cursor: pointer; background: #fff; }
.chip.pick.on { background: #fde8e4; border-color: #e07862; color: #b3392a; }
.fbz-comment { width: 100%; min-height: 48px; resize: vertical; font: inherit; font-size: 13px;
               border: 1px solid #d4d7dc; border-radius: 6px; padding: 7px 9px; background: #fff; color: #1c1d20; }
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: grid; place-items: center; }
.modal-box { width: min(400px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line);
             border-radius: 12px; padding: 20px; display: grid; gap: 12px; }
.modal-box h3 { margin: 0; font-size: 17px; }
.modal-sub { margin: 0; color: var(--muted); font-size: 13px; }
.modal-box input[type="text"], .modal-box textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px;
  padding: 10px 12px; font: inherit; font-size: 14px; width: 100%;
}
