/* Creative Studio Pro · identidad concepto B · mobile-first */
@font-face { font-family: 'Inter'; src: url('/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/space-grotesk-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/space-grotesk-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --midnight: #10121C; --graphite: #1D2233; --graphite-2: #262C40; --line: #2E3550;
  --violet: #8B5CF6; --cyan: #22D3EE; --white: #F8FAFC; --silver: #94A3B8;
  --ok: #34D399; --warn: #FBBF24; --err: #F87171;
  --r: 16px; --pad: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--midnight); color: var(--white); }
body { font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .top-title, .hero-n, .kpi .n { font-family: 'Space Grotesk', Inter, sans-serif; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--cyan); }
.pro { color: var(--cyan); }
.muted { color: var(--silver); }

/* Barra superior */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 12px 10px; background: rgba(16, 18, 28, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-title { flex: 1; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title .pos { color: var(--silver); font-weight: 500; font-size: 14px; font-family: Inter, sans-serif; }
.icon-btn { background: var(--graphite); border: 1px solid var(--line); width: 40px; height: 40px; border-radius: 12px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.logo-mark { width: 30px; height: 30px; flex: none; background: linear-gradient(160deg, var(--violet), var(--cyan)); clip-path: polygon(22% 12%, 22% 88%, 88% 50%); border-radius: 4px; }
.logo-mark.big { width: 72px; height: 72px; }

/* Botones */
.btn { background: var(--graphite-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; min-height: 44px; font-weight: 600; }
.btn.primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.big { min-height: 54px; font-size: 17px; padding: 14px 24px; border-radius: 14px; }
.btn.wide { display: block; width: 100%; text-align: center; margin-top: 12px; text-decoration: none; color: var(--white); }
.btn:disabled { opacity: 0.35; cursor: default; }
.linkbtn { background: none; border: 0; color: var(--silver); text-decoration: underline; padding: 8px 0 0; font-size: 13px; }

/* Pantallas */
.center { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--silver); padding: 24px; text-align: center; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--cyan); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 24px; text-align: center; background: radial-gradient(120% 60% at 50% 0%, rgba(139, 92, 246, 0.16), transparent 60%); }
.brandmark { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.login h1 { font-size: 30px; margin: 0; }
.login .tag { margin: 0; color: var(--silver); letter-spacing: 0.22em; font-size: 12px; }
.login .lead { color: var(--silver); margin: 4px 0 6px; }
.login .msg { color: var(--warn); max-width: 340px; }
.login .fine { color: var(--silver); font-size: 12px; opacity: 0.8; margin-top: 24px; }

.page { max-width: 760px; margin: 0 auto; padding: var(--pad) var(--pad) calc(96px + var(--safe-b)); }
.hello h1 { margin: 6px 0 2px; font-size: 26px; }
.hello p { margin: 0 0 14px; color: var(--silver); font-size: 13px; }
.note { color: var(--silver); font-size: 13px; background: var(--graphite); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.hero { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; text-align: left; background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(34, 211, 238, 0.14)); border: 1px solid rgba(139, 92, 246, 0.5); border-radius: var(--r); padding: 18px; margin-bottom: 12px; }
.hero-n { font-size: 44px; font-weight: 700; line-height: 1; }
.hero-t { font-weight: 600; }
.hero-a { color: var(--cyan); font-weight: 600; }

/* Tarjeta de marca */
.bcard { background: var(--graphite); border: 1px solid var(--line); border-left: 4px solid var(--bc); border-radius: var(--r); padding: 14px; margin: 12px 0; }
.bhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bhead h3 { margin: 0; font-size: 17px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kpi { background: var(--graphite-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 72px; }
.kpi .n { font-size: 24px; font-weight: 700; }
.kpi .l { font-size: 11px; color: var(--silver); text-align: center; line-height: 1.2; }
.kpi.hl { border-color: rgba(34, 211, 238, 0.6); }
.kpi.hl .n { color: var(--cyan); }
.kpi-note { font-size: 11px; color: var(--silver); margin-top: 8px; }

/* Distintivo de marca */
.bchip { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--bg); border: 1px solid rgba(255, 255, 255, 0.12); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: var(--bc); font-family: 'Space Grotesk', sans-serif; font-size: 13px; }
.bchip img { width: 78%; height: 78%; object-fit: contain; }
.bchip.xs { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }

/* Filtros */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { background: var(--graphite); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 13px; white-space: nowrap; min-height: 36px; }
.chip.on { background: rgba(139, 92, 246, 0.22); border-color: var(--violet); color: #fff; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.selects label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--silver); }
select { background: var(--graphite); color: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; min-height: 42px; }
.count { color: var(--silver); font-size: 12px; margin: 8px 2px; }
.empty { color: var(--silver); text-align: center; padding: 32px 12px; }

/* Lista */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; text-align: left; background: var(--graphite); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.item:active { transform: scale(0.99); }
.tbox { position: relative; width: 84px; height: 104px; border-radius: 10px; overflow: hidden; background: var(--graphite-2); display: flex; align-items: center; justify-content: center; }
.tbox .thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.tbox .ph { color: var(--silver); font-size: 20px; }
.tbox .ph.none { font-size: 11px; text-align: center; padding: 4px; }
.tbox .multi { position: absolute; z-index: 2; right: 5px; bottom: 5px; background: rgba(16, 18, 28, 0.82); border-radius: 6px; font-size: 11px; padding: 1px 6px; }
.meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row1 { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ttl { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub { color: var(--silver); font-size: 12px; }
.row2 { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.date { font-size: 12px; color: var(--silver); }

/* Estados */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.st-revisar { background: rgba(34, 211, 238, 0.14); color: var(--cyan); border-color: rgba(34, 211, 238, 0.5); }
.st-producir { background: rgba(148, 163, 184, 0.12); color: var(--silver); border-color: var(--line); }
.st-aprobado { background: rgba(52, 211, 153, 0.12); color: var(--ok); border-color: rgba(52, 211, 153, 0.4); }
.st-programado { background: rgba(251, 191, 36, 0.12); color: var(--warn); border-color: rgba(251, 191, 36, 0.4); }
.st-publicado { background: rgba(139, 92, 246, 0.16); color: #C4B5FD; border-color: rgba(139, 92, 246, 0.45); }
.st-sin-registro, .st-otro, .st-sin-estado { background: transparent; color: var(--silver); border: 1px dashed var(--line); }
.st-test { background: rgba(251, 191, 36, 0.12); color: var(--warn); border: 1px dashed rgba(251, 191, 36, 0.6); }
.ver { background: var(--graphite-2); color: var(--white); border-color: var(--line); }

/* Revisión individual */
.piece .stage { margin: 0 calc(-1 * var(--pad)); background: #000; }
.media { position: relative; display: flex; justify-content: center; align-items: center; min-height: 240px; max-height: 72vh; overflow: hidden; }
/* Las piezas se muestran con sus colores originales: sin filtros ni superposiciones */
.media video, .media img { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; background: #000; }
.media img { cursor: zoom-in; }
.nomedia { padding: 48px 20px; text-align: center; color: var(--silver); background: var(--graphite); }
.finfo { font-size: 12px; color: var(--silver); padding: 8px var(--pad); background: var(--graphite); }
.snav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 56px; border: 0; background: rgba(16, 18, 28, 0.55); font-size: 26px; z-index: 3; }
.snav.prev { left: 0; border-radius: 0 10px 10px 0; } .snav.next { right: 0; border-radius: 10px 0 0 10px; }
.snav:disabled { opacity: 0.2; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; pointer-events: none; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(248, 250, 252, 0.35); }
.dots span.on { background: var(--white); }
.scount { position: absolute; top: 10px; right: 10px; background: rgba(16, 18, 28, 0.7); border-radius: 8px; padding: 2px 8px; font-size: 12px; z-index: 3; }
.vers { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 0 0; font-size: 13px; color: var(--silver); }
.ptitle { font-size: 21px; margin: 14px 0 8px; line-height: 1.25; }
.warn { color: var(--warn); font-size: 13px; margin: 0 0 8px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.fact { background: var(--graphite); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.fact span { display: block; font-size: 11px; color: var(--silver); margin-bottom: 2px; }
.blk { background: var(--graphite); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-top: 12px; }
.blk h3 { margin: 0 0 6px; font-size: 15px; }
.blk-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.blk-h h3 { margin: 0; }
.copy, .notes, .tags { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.55; }
.tags { color: var(--cyan); }
.notes { color: var(--silver); font-size: 14px; }
.att { display: block; padding: 6px 0; word-break: break-all; }
.pager { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 12px calc(10px + var(--safe-b)); background: rgba(16, 18, 28, 0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.pager span { color: var(--silver); font-size: 13px; text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.96); overflow: auto; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; cursor: zoom-in; touch-action: pinch-zoom; }
.lightbox img.zoom { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox .close { position: fixed; top: calc(12px + var(--safe-t)); right: 12px; }
.banner { background: rgba(251, 191, 36, 0.12); border-bottom: 1px solid rgba(251, 191, 36, 0.4); color: var(--warn); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
#toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%) translateY(20px); opacity: 0; transition: 0.2s; background: var(--white); color: var(--midnight); padding: 9px 16px; border-radius: 999px; font-weight: 600; z-index: 60; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (min-width: 900px) {
  .list { display: grid; grid-template-columns: 1fr 1fr; }
  .piece .stage { margin: 0; border-radius: var(--r); overflow: hidden; }
}
