:root {
  --bg: #0b0b0d;
  --panel: #131317;
  --panel-2: #1a1a20;
  --line: #26262e;
  --text: #ececf1;
  --muted: #8b8b98;
  --accent: #c6ff3d;
  --accent-ink: #111;
  --danger: #ff5d5d;
  --warn: #ffb547;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: rgba(11,11,13,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.02em; font-size: 16px; text-decoration: none; }
.logo i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tabs a { padding: 6px 12px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs a.on { background: var(--panel-2); color: var(--text); }
.search { flex: 1; max-width: 420px; margin-left: auto; }
.search input { width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); outline: none; }
.search input:focus { border-color: #3a3a46; }
.iconbtn { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--muted); }
.iconbtn:hover { color: var(--text); }

/* Layout */
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 20px; }
.side { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 92px); overflow: auto; display: flex; flex-direction: column; gap: 18px; padding-right: 4px; }
.side h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12.5px; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.chip small { opacity: .7; margin-left: 4px; }
select.sel { width: 100%; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: var(--muted); }
.toolbar b { color: var(--text); }

/* Grid */
.grid { column-width: 240px; column-gap: 16px; }
.card { break-inside: avoid; margin: 0 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; }
.card:hover { border-color: #3a3a46; transform: translateY(-2px); }
.media { position: relative; background: #000; min-height: 120px; }
.media img, .media video { display: block; width: 100%; height: auto; }
.media video { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.badge { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge.hot { background: var(--accent); color: var(--accent-ink); }
.badge.off { background: rgba(255,93,93,.85); }
.play { position: absolute; bottom: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; font-size: 10px; z-index: 2; }
.star { position: absolute; top: 6px; right: 6px; z-index: 3; background: rgba(0,0,0,.55); border: 0; border-radius: 50%; width: 30px; height: 30px; font-size: 15px; color: #fff; }
.star.on { color: var(--accent); }
.body { padding: 10px 12px 12px; }
.brand { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy { color: var(--muted); font-size: 12.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 11.5px; flex-wrap: wrap; }
.tagrow { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.status { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.st-idea { background: #2a2a35; color: #c9c9d6; }
.st-produccion { background: rgba(255,181,71,.15); color: var(--warn); }
.st-publicado { background: rgba(198,255,61,.14); color: var(--accent); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.more { display: block; margin: 10px auto 30px; }

/* Buttons */
.btn { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: #3a3a46; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }

/* Modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.75); display: grid; place-items: center; padding: 20px; }
.modal { width: min(1040px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; display: grid; grid-template-columns: minmax(0, 420px) 1fr; }
.modal .player { background: #000; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.modal .player video, .modal .player img { width: 100%; max-height: calc(100vh - 40px); object-fit: contain; }
.modal .info { padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.modal h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.stat b { display: block; font-size: 17px; }
.stat span { color: var(--muted); font-size: 11.5px; }
.fullcopy { white-space: pre-wrap; color: #cfcfd8; font-size: 13px; max-height: 180px; overflow: auto; background: var(--panel-2); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; outline: none; }
.field textarea { min-height: 70px; resize: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.grow > * { flex: 1; min-width: 140px; }
.link { color: var(--accent); text-decoration: none; word-break: break-all; }
.close { position: absolute; top: 14px; right: 18px; font-size: 26px; background: none; border: 0; color: #fff; z-index: 60; }

/* Brands */
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.bcard:hover { border-color: #3a3a46; }
.bhead { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.bname { font-weight: 600; font-size: 15px; }
.bnums { display: flex; gap: 16px; }
.bnums div b { display: block; font-size: 20px; letter-spacing: -.02em; }
.bnums div span { font-size: 11.5px; color: var(--muted); }
.up { color: var(--accent); } .down { color: var(--danger); }
.follow { border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 4px 9px; font-size: 12px; color: var(--muted); }
.follow.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.bdetail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.box h3 { margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.lrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.lrow:first-of-type { border-top: 0; }
.lrow .bar { grid-column: 1 / -1; height: 4px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.lrow .bar i { display: block; height: 100%; background: var(--accent); }
.lrow.on { color: var(--accent); }
.spark { width: 100%; height: 120px; }

/* Upload */
.drop { border: 1.5px dashed #3a3a46; border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); margin-bottom: 16px; background: var(--panel); }
.drop.over { border-color: var(--accent); color: var(--text); }
.progress { margin-top: 8px; font-size: 12.5px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin: 0; font-size: 20px; display: flex; gap: 10px; align-items: center; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; z-index: 100; }

@media (max-width: 860px) {
  .top { flex-wrap: wrap; padding: 10px 16px; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .side { position: static; max-height: none; }
  .modal { grid-template-columns: 1fr; }
  .bdetail { grid-template-columns: 1fr; }
  .grid { column-width: 160px; column-gap: 10px; }
}
