/* Fatigue — organizador de sets. Tema "Azul" del sistema de diseño de Fatigue. */
:root {
  /* paleta */
  --azul-fatigue: #112c4e; --celeste-fatigue: #85c5f5; --hueso: #f8f6f0; --celeste-bruma: #cfe6fa; --azul-noche: #0a1b33;
  /* roles (tema Azul) */
  --surface: #112c4e; --surface-alt: #0a1b33; --slab: #1d4373; --ink: #f2f7fc; --ink-muted: #a9cdeb;
  --accent: #85c5f5; --on-accent: #112c4e; --line: #85c5f5;
  --hair: rgba(133, 197, 245, .16); --hair-2: rgba(133, 197, 245, .30); --tint: rgba(133, 197, 245, .10); --tint-2: rgba(133, 197, 245, .18);
  /* estados (se usan poco: tono que combina, calidad del archivo, borrar) */
  --ok: #8fe3b0; --warn: #f6d27a; --bad: #ff9b8f;
  /* compat con nombres viejos */
  --bg: var(--surface); --panel: var(--surface-alt); --panel2: var(--slab); --text: var(--ink); --muted: var(--ink-muted);
  /* tipografía, espacios, radios, trazos */
  --font-display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --space-1: 4px; --space-2: 8px; --space-4: 16px; --space-6: 24px; --space-10: 40px;
  --radius-md: 16px; --radius-sm: 10px; --radius-pill: 999px;
  --stroke-thin: 2px; --stroke-bold: 3px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--surface); color: var(--ink); font: 14px/1.45 var(--font-sans); }
::selection { background: var(--accent); color: var(--on-accent); }
.hidden { display: none !important; }
.muted { color: var(--ink-muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.err { color: var(--bad); min-height: 1.2em; }
.label { font: 700 12px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

/* botones: pill, Space Grotesk bold, contorno celeste */
button, .btn { font: 700 14px/1.2 var(--font-sans); color: var(--ink); background: transparent; border: var(--stroke-bold) solid var(--line); border-radius: var(--radius-pill); padding: 6px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .15s, color .15s; }
.btn:hover, button:hover { background: var(--tint-2); }
.btn:focus-visible, button:focus-visible { outline: 3px solid var(--line); outline-offset: 3px; }
.btn:disabled, button:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover, button.primary:hover { background: var(--celeste-bruma); border-color: var(--celeste-bruma); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { border-color: var(--hair-2); background: var(--tint); }
.btn.small { padding: 3px 10px; font-size: 12px; border-width: var(--stroke-thin); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: rgba(255, 155, 143, .12); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface-alt); border: var(--stroke-thin) solid var(--hair-2); border-radius: var(--radius-sm); padding: 6px 10px; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: .7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--line); }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
.card { background: var(--surface-alt); border: var(--stroke-bold) solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); display: flex; flex-direction: column; gap: 12px; }
.card label { display: flex; flex-direction: column; gap: 4px; color: var(--ink-muted); }

/* entrada */
#login { min-height: 100%; display: grid; place-items: center; padding: var(--space-10) var(--space-4); background: var(--surface); }
#login .card { width: min(400px, 100%); align-items: stretch; padding: var(--space-10) var(--space-6) var(--space-6); border-color: var(--slab); }
.login-logo { display: block; width: min(300px, 100%); height: auto; margin: 0 auto var(--space-4); }
#login h1 { margin: 0; font: 400 32px/1.05 var(--font-display); color: var(--accent); text-align: center; }
#login .lead { text-align: center; }
#login .card .label { color: var(--ink-muted); text-align: center; }
#login .btn.primary { justify-content: center; padding: 10px 16px; font-size: 16px; }

#app { height: 100%; display: flex; flex-direction: column; }
header { display: flex; justify-content: space-between; align-items: center; padding: 10px var(--space-4); border-bottom: var(--stroke-thin) solid var(--hair); gap: 10px; flex-wrap: wrap; background: var(--surface); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 54px; width: auto; display: block; }
.brand .label { color: var(--ink-muted); border: var(--stroke-thin) solid var(--hair-2); border-radius: var(--radius-pill); padding: 3px 10px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.me { color: var(--ink-muted); font: 700 12px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
#progress { padding: 8px var(--space-4); display: flex; align-items: center; gap: 12px; background: var(--celeste-bruma); color: var(--on-accent); font-weight: 500; }
#progress .bar { flex: 0 0 240px; height: 8px; background: rgba(17, 44, 78, .18); border-radius: var(--radius-pill); overflow: hidden; }
#progress .bar i { display: block; height: 100%; width: 0; background: var(--azul-fatigue); border-radius: var(--radius-pill); transition: width .2s; }

main { flex: 1; display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 0; }
aside, #library { min-height: 0; overflow: auto; }
aside { background: var(--surface-alt); padding: var(--space-4) 12px; display: flex; flex-direction: column; gap: var(--space-6); }
h3 { margin: 0 0 8px; font: 700 12px/16px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sec-head h3 { margin: 0; }
.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.list li { padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; display: flex; justify-content: space-between; gap: 6px; border: var(--stroke-thin) solid transparent; }
.list li:hover { background: var(--tint); }
.list li.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.list li small { color: var(--ink-muted); font-family: var(--font-mono); font-weight: 400; }
.list li.active small, .list li.active .own { color: var(--on-accent); opacity: .75; }
#collections { font-size: 13px; color: var(--ink-muted); }

#library { display: flex; flex-direction: column; overflow: hidden; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-bottom: var(--stroke-thin) solid var(--hair); align-items: center; }
.filters #q { flex: 1 1 220px; border-radius: var(--radius-pill); padding-left: 14px; }
.filters select { border-radius: var(--radius-pill); }
.range { color: var(--ink-muted); font: 700 12px var(--font-mono); letter-spacing: .08em; }
.range input { width: 64px; font-family: var(--font-sans); }
.chk { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 13px; }
.table-wrap { flex: 1; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font: 700 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding: 9px 8px; border-bottom: var(--stroke-thin) solid var(--hair-2); cursor: pointer; user-select: none; white-space: nowrap; }
th.sorted { color: var(--accent); }
td { padding: 6px 8px; border-bottom: 1px solid var(--hair); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
tr:hover td { background: var(--tint); }
tr.playing td { background: var(--tint-2); }
tr.playing td:first-child, tr.playing td.pos { box-shadow: inset 3px 0 0 var(--accent); }
tr.inset td { color: var(--ink-muted); }
.num { text-align: right; }
.play { width: 30px; height: 30px; border-radius: 50%; padding: 0; justify-content: center; border-width: var(--stroke-thin); font-size: 11px; }
.play:disabled { opacity: .25; cursor: default; }
.chip { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: var(--radius-pill); background: transparent; border: 1.5px solid var(--hair-2); color: var(--ink-muted); margin-right: 3px; }
.chip.me { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.key { display: inline-block; min-width: 36px; text-align: center; font: 700 11px/18px var(--font-mono); border-radius: var(--radius-pill); padding: 0 6px; color: var(--azul-fatigue); }
.lib-foot { padding: 8px 12px; border-top: var(--stroke-thin) solid var(--hair); color: var(--ink-muted); font: 700 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.empty { color: var(--ink-muted); padding: var(--space-10) var(--space-4); text-align: center; font-size: 15px; }

#set { border-left: 1px solid var(--hair); padding: 12px; }
.set-name { width: 100%; font: 400 26px/1.1 var(--font-display); color: var(--accent); background: transparent; border-color: transparent; padding: 2px 8px; border-radius: var(--radius-sm); }
.set-name:hover, .set-name:focus { border-color: var(--hair-2); background: var(--surface-alt); }
.set-meta { color: var(--ink-muted); font: 700 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin: 4px 6px 10px; }
#setList { list-style: none; padding: 0; margin: 0; }
#setList li.item { display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px; background: var(--surface-alt); border: var(--stroke-thin) solid var(--hair-2); border-radius: var(--radius-sm); }
#setList li.item .t { min-width: 0; }
#setList li.item .t b, #setList li.item .t span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#setList li.item .t span { color: var(--ink-muted); font-size: 12px; }
#setList li.item .r { text-align: right; font-size: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
#setList li.item canvas { grid-column: 2 / 5; width: 100%; height: 22px; display: block; }
#setList .handle { cursor: grab; color: var(--ink-muted); text-align: center; }
#setList .x { background: none; border: 0; color: var(--ink-muted); padding: 0 2px; }
#setList .x:hover { color: var(--bad); }
#setList li.trans { font-size: 11px; color: var(--ink-muted); padding: 3px 0 3px 36px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.sortable-ghost { opacity: .4; }
.set-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.set-actions .btn { justify-content: center; }
#missing { margin-top: 14px; font-size: 13px; }
#missing ul { padding-left: 18px; margin: 6px 0; color: var(--ink-muted); }

/* reproductor */
footer#player { display: grid; grid-template-columns: auto 220px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 10px var(--space-4); border-top: var(--stroke-bold) solid var(--line); background: var(--surface-alt); }
.pp { width: 46px; height: 46px; border-radius: 50%; justify-content: center; background: var(--accent); border: 0; color: var(--on-accent); font-size: 17px; padding: 0; }
.pp:hover { background: var(--celeste-bruma); }
.p-info { display: flex; flex-direction: column; min-width: 0; }
.p-info > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-info b { font-size: 15px; }
#pMeta { font: 700 11px/16px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
#pTime { font-family: var(--font-mono); font-size: 12px; }
#waveBox { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#wave { min-width: 0; cursor: pointer; }
#waveGrid { position: absolute; left: 0; top: 0; pointer-events: none; }
#cues { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
#cueBtns { display: flex; gap: 4px; }
#cueBtns button { width: 30px; height: 24px; padding: 0; justify-content: center; font: 700 11px var(--font-mono); color: var(--ink-muted); border-width: var(--stroke-thin); border-color: var(--hair-2); border-radius: 8px; }
#cueBtns button.set { color: var(--azul-noche); border-color: transparent; }
#cueAuto { height: 24px; padding: 0 10px; font-size: 12px; }
#gridInfo { margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

dialog { background: transparent; border: 0; padding: 0; max-width: min(560px, calc(100% - 32px)); color: var(--ink); }
dialog::backdrop { background: rgba(10, 27, 51, .78); }
dialog p { margin: 0; }
dialog h3, .cmt-head h3 { margin: 0; font: 400 26px/1.1 var(--font-display); letter-spacing: 0; text-transform: none; color: var(--accent); }
dialog .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
dialog b { color: var(--ink); }
dialog i { color: var(--celeste-bruma); }
.help { max-height: calc(100vh - 48px); overflow: auto; }
.help ol { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.help li::marker { color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.help b { color: var(--accent); }

@media (max-width: 1100px) {
  main { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 700px) {
  main { display: flex; flex-direction: column; }
  aside { border-bottom: var(--stroke-thin) solid var(--hair); }
  .brand img { height: 44px; }
  footer#player { grid-template-columns: auto minmax(0, 1fr) auto; }
  #waveBox { grid-column: 1 / -1; grid-row: 2; }
  #pTime { display: none; }
  .tempo { grid-column: 1 / -1; grid-row: 3; }
}

/* vista Biblioteca / Set */
th.pos, td.pos { display: none; width: 34px; color: var(--ink-muted); text-align: right; font-family: var(--font-mono); font-size: 12px; }
.setview th.pos, .setview td.pos { display: table-cell; }
.setview.dragok tbody tr { cursor: grab; }
.setview.dragok tbody tr:active { cursor: grabbing; }
tbody tr.sortable-chosen td { background: var(--tint-2); }

/* estrellas y etiquetas */
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; cursor: pointer; }
.stars i { font-style: normal; color: rgba(133, 197, 245, .25); padding: 0 1px; }
.stars i.on { color: var(--accent); }
.stars:hover i { color: rgba(133, 197, 245, .25); }
.stars i:hover, .stars i:hover ~ i { color: var(--celeste-bruma) !important; }
td.tags { max-width: 230px; }
td.tags.open { white-space: normal; max-width: 320px; }
td.tags.open .tag { margin-bottom: 3px; }
.moretags { background: transparent; border: 1.5px solid var(--hair-2); color: var(--ink-muted); border-radius: var(--radius-pill); padding: 0 7px; font-size: 11px; margin-right: 3px; }
.moretags:hover { color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; padding: 1px 4px 1px 8px; border-radius: var(--radius-pill); background: var(--celeste-bruma); border: 0; color: var(--azul-fatigue); margin-right: 3px; }
.tag b { font-weight: 400; cursor: pointer; opacity: .5; padding: 0 2px; }
.tag b:hover { opacity: 1; color: #b3261e; }
.addtag { background: none; border: 1.5px dashed var(--hair-2); color: var(--ink-muted); border-radius: var(--radius-pill); padding: 0 7px; font-size: 11px; }
.addtag:hover { border-color: var(--line); color: var(--ink); background: none; }
.tagin { width: 110px; padding: 1px 8px; font-size: 12px; border-radius: var(--radius-pill); }
#setList .meta2 { font-size: 11px; }
#setList li.item { cursor: grab; }
.card label.chk { flex-direction: row; align-items: flex-start; gap: 8px; }
.card label.chk input { margin-top: 3px; }

/* barra del set arriba de la grilla */
#setBar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px; background: var(--slab); }
#setBar .set-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1 1 320px; }
#setBar .set-name { width: auto; min-width: 120px; max-width: 420px; font-size: 26px; flex: 0 1 auto; }
#setBar .set-name:focus, #setBar .set-name:hover { background: rgba(10, 27, 51, .4); }
#setBar .set-meta { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--celeste-bruma); }
#setBar .set-actions { flex-direction: row; flex-wrap: wrap; align-items: center; margin: 0; gap: 6px; }
#missing { margin: 0 0 0 4px; font-size: 12px; cursor: help; }
th.setcol, td.setcol { display: none; }
.setview th.setcol, .setview td.setcol { display: table-cell; }
td.mix { font: 700 10px/14px var(--font-mono); white-space: nowrap; }
canvas.mini { width: 120px; height: 22px; display: block; border-radius: 4px; }

/* soltar un tema sobre un set */
.dragging-track #sets li[data-id] { outline: var(--stroke-thin) dashed var(--hair-2); }
#sets li.droptarget { background: var(--tint-2) !important; outline: var(--stroke-thin) solid var(--line) !important; }

.tempo { display: flex; align-items: center; gap: 4px; }
.tempo #tempoBpm { width: 70px; text-align: center; font-family: var(--font-mono); }
.tempo #tempoInfo { min-width: 58px; font-size: 12px; }
.tempo.on #tempoInfo { color: var(--accent); }
.tempo:not(.on) #tempoBpm, .tempo:not(.on) .btn { opacity: .5; }

/* grilla en pantalla completa */
#fsOpen { height: 24px; padding: 0 10px; font-size: 12px; margin-left: auto; }
#fs { position: fixed; inset: 0; z-index: 50; background: var(--surface); display: flex; flex-direction: column; gap: 12px; padding: 14px var(--space-4) var(--space-4); }
.fs-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fs-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.fs-info > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-info b { font: 400 26px/1.1 var(--font-display); color: var(--accent); }
#fsMeta { font: 700 11px/16px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
#fsPos { font: 400 34px/1 var(--font-display); color: var(--accent); min-width: 100px; }
#fsTime { font-size: 15px; }
.fs-zoom { display: flex; align-items: center; gap: 6px; }
#fsZoom { min-width: 92px; text-align: center; font-family: var(--font-mono); font-size: 12px; }
#fsBig { flex: 1 1 auto; min-height: 160px; width: 100%; border-radius: var(--radius-md); background: #111214; cursor: grab; touch-action: none; }
#fsBig.drag { cursor: grabbing; }
#fsOver { height: 64px; width: 100%; border-radius: var(--radius-sm); background: #111214; cursor: pointer; touch-action: none; }
.fs-cues { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#fsCueBtns { display: grid; grid-template-columns: repeat(8, minmax(64px, 120px)); gap: 6px; }
#fsCueBtns button { flex-direction: column; align-items: flex-start; gap: 0; height: 50px; padding: 4px 10px; font: 700 13px var(--font-mono); color: var(--ink-muted); overflow: hidden; border-radius: 12px; border-width: var(--stroke-thin); border-color: var(--hair-2); }
#fsCueBtns button small { font: 400 11px var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#fsCueBtns button.set { color: var(--azul-noche); border-color: transparent; }
#fsAuto { height: 50px; }
.fs-hint { font-size: 12px; }
@media (max-width: 700px) {
  #fsCueBtns { grid-template-columns: repeat(4, minmax(60px, 1fr)); }
  .fs-hint { display: none; }
}

/* comentarios y avisos */
.bellwrap { position: relative; }
#bell { position: relative; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font: 700 10px/18px var(--font-mono); text-align: center; }
#notifs { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 14px; gap: 8px; box-shadow: 6px 6px 0 var(--azul-noche); }
#notifs .n-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#notifs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
#notifs li { padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
#notifs li:hover { background: var(--tint); }
#notifs li.unread { background: var(--tint-2); box-shadow: inset 3px 0 0 var(--accent); }
#notifs li .n-text { font-size: 14px; }
#notifs li small { color: var(--ink-muted); }
button.cmtbtn { position: relative; }
button.cmtbtn.unread { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.cmtbtn.has:not(.unread) { color: var(--ink); }
td.acts { white-space: nowrap; }
td .last-cmt { display: block; font-size: 11px; color: var(--celeste-bruma); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cmtDlg { width: min(520px, calc(100% - 32px)); }
.cmt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
#cmtList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 45vh; overflow: auto; }
#cmtList li { background: var(--surface); border-radius: var(--radius-sm); padding: 8px 12px; }
#cmtList li.mine { background: var(--slab); }
#cmtList li .c-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
#cmtList li .c-top button { margin-left: auto; padding: 0 8px; font-size: 11px; }
#cmtList li .c-text { white-space: pre-wrap; word-break: break-word; margin-top: 3px; }
#cmtList .empty { background: none; color: var(--ink-muted); padding: 0; }
.cmt-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.cmt-quick button { font-size: 12px; padding: 3px 10px; border-width: var(--stroke-thin); border-color: var(--hair-2); font-weight: 500; }
.cmt-quick button:hover { border-color: var(--line); }
.cmt-form { display: flex; gap: 8px; align-items: flex-end; }
.cmt-form textarea { flex: 1; resize: vertical; background: var(--surface); padding: 8px 10px; }
#libTable tr.flash td { background: rgba(133, 197, 245, .32) !important; transition: background .4s; }

.q { font: 700 10px/16px var(--font-mono); letter-spacing: .04em; padding: 0 7px; border-radius: var(--radius-pill); border: 1.5px solid var(--hair-2); margin-left: 4px; white-space: nowrap; }
.q[data-spek] { cursor: pointer; }
.q[data-spek]:hover { border-color: currentColor; }
.q-ok { color: var(--ok); }
.q-mid { color: var(--warn); }
.q-low { color: var(--azul-noche); background: var(--bad); border-color: var(--bad); }

/* acceso a los sets */
.list li .own { font-size: 10px; color: var(--ink-muted); margin-left: 4px; }
#others li { cursor: default; align-items: center; }
#others li:hover { background: transparent; }
#others li .o-name { display: flex; flex-direction: column; min-width: 0; }
#others li .o-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#others li .o-name small { font-size: 11px; }
#others li button { flex: none; font-size: 11px; padding: 2px 9px; }
.badge.inline { position: static; margin-left: 4px; }
#accDlg { width: min(520px, calc(100% - 32px)); }
#accList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#accList li, .acc-req { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: var(--radius-sm); padding: 8px 12px; flex-wrap: wrap; }
#accList li b, .acc-req b { flex: 1; min-width: 100px; }
#accList li .role { font: 700 10px/14px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
#accList li .role.owner { color: var(--accent); }
#accReqs { display: flex; flex-direction: column; gap: 6px; }
.acc-req { background: var(--slab); box-shadow: inset 3px 0 0 var(--accent); }
#accAdd input { flex: 1; background: var(--surface); padding: 8px 12px; }
.small-note { font-size: 12px; }
#notifs .n-req { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--radius-sm); background: var(--slab); }
#notifs .n-req div { display: flex; gap: 6px; }
#notifs h4 { margin: 4px 0 0; font: 700 11px/16px var(--font-mono); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }

/* login con Google, límite de subida, usuarios */
#pwFields, #gFields, #gName { display: flex; flex-direction: column; gap: 12px; }
#gBtn { min-height: 44px; display: flex; justify-content: center; }
#gNameIn { background: var(--surface); padding: 9px 12px; }
#quota { font: 700 11px var(--font-mono); letter-spacing: .04em; }
#quota.near { color: var(--warn); border-color: var(--warn); }
#quota.full { color: var(--azul-noche); background: var(--bad); border-color: var(--bad); }
.qbar { height: 10px; background: var(--surface); border-radius: var(--radius-pill); overflow: hidden; }
.qbar i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }
ul.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
ul.rows li { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: var(--radius-sm); padding: 8px 12px; flex-wrap: wrap; }
ul.rows li .grow { flex: 1; min-width: 140px; display: flex; flex-direction: column; overflow: hidden; }
ul.rows li .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.rows li small { color: var(--ink-muted); }
#admReqs { display: flex; flex-direction: column; gap: 6px; }
#admAdd input { flex: 1; background: var(--surface); padding: 8px 12px; }
span.ghost { font-size: 11px; font-weight: 400; color: var(--warn); margin-left: 4px; }
.adm-h { margin: 6px 0 0; font: 700 11px/16px var(--font-mono); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }
#admOrph { display: flex; flex-direction: column; gap: 6px; }
#admOrph select { font-size: 12px; background: var(--surface); padding: 3px 8px; }
.transport { display: flex; align-items: center; gap: 6px; }
.tbtn { width: 30px; height: 30px; border-radius: 50%; padding: 0; justify-content: center; font-size: 12px; border-width: var(--stroke-thin); }
.auto-btn { width: auto; border-radius: var(--radius-pill); padding: 0 8px; font: 700 10px/1 var(--font-mono); letter-spacing: .06em; color: var(--ink-muted); }
.auto-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Biblioteca y menú "agregar a un set" */
#libLink { font-weight: 700; }
.setsbtn.none { opacity: .8; }
.setsbtn.has { color: var(--accent); }
#setsMenu { position: fixed; z-index: 45; width: 260px; max-height: 60vh; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 6px 6px 0 var(--azul-noche); }
#setsMenu h4 { margin: 0; font: 700 11px/16px var(--font-mono); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }
#setsMenu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
#setsMenu li { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; }
#setsMenu li:hover { background: var(--tint); }
#setsMenu li span { width: 14px; text-align: center; color: var(--ink-muted); }
#setsMenu li.has span { color: var(--accent); font-weight: 700; }
#setsMenu li small { margin-left: auto; color: var(--ink-muted); font-family: var(--font-mono); }

/* ---------- Sets / Pool (arriba, al lado del logo) ---------- */
.modes { display: inline-flex; gap: 4px; padding: 3px; border: var(--stroke-thin) solid var(--hair-2); border-radius: var(--radius-pill); }
.modes button { font: 700 12px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); border: 0; padding: 5px 14px; }
.modes button:hover { color: var(--ink); background: var(--tint); }
.modes button.active { background: var(--accent); color: var(--on-accent); }
.modes .badge { margin-left: 2px; }

#pool { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pool-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px var(--space-4); border-bottom: var(--stroke-thin) solid var(--hair); }
.pool-head > div { flex: 1 1 320px; }
.pool-head h2 { margin: 0; font: 400 26px/1.1 var(--font-display); color: var(--accent); }
.pool-head p { margin: 4px 0 0; font-size: 13px; max-width: 640px; }
#poolQ { flex: 1 1 280px; border-radius: var(--radius-pill); padding: 8px 16px; font-size: 15px; }
#poolReqs { padding: 10px var(--space-4); border-bottom: var(--stroke-thin) solid var(--hair); display: flex; flex-direction: column; gap: 6px; }
#poolReqs h4 { margin: 0; font: 700 11px/16px var(--font-mono); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }
.pool-req { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--slab); }
.pool-req span { flex: 1 1 240px; }
.chip.rb { border-style: dashed; }
#poolTable td.acts { text-align: right; }
.modes button.active .badge { background: var(--on-accent); color: var(--accent); }

/* espectro del archivo (como Spek) */
dialog#spekDlg { max-width: min(1040px, calc(100% - 32px)); width: 100%; }
#spekWrap { display: flex; gap: 6px; align-items: stretch; }
#spekAxis { position: relative; width: 26px; flex: none; font: 700 10px/1 var(--font-mono); color: var(--ink-muted); }
#spekAxis span { position: absolute; right: 0; transform: translateY(50%); }
#spekAxis i { position: absolute; right: 0; top: -16px; font-style: normal; color: var(--ink-muted); }
#spekBox { position: relative; flex: 1; min-width: 0; aspect-ratio: 960 / 360; background: #000; border-radius: var(--radius-sm); overflow: hidden; margin-top: 4px; }
#spekBox img { display: block; width: 100%; height: 100%; }
#spekBox.wait img { visibility: hidden; }
#spekCut { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed currentColor; background: none; pointer-events: none; }
#spekCut::after { content: attr(data-label); position: absolute; right: 6px; bottom: 4px; font: 700 11px/1 var(--font-mono); color: inherit; background: none; }
#spekCut.q-low { color: var(--bad); border-color: var(--bad); background: none; }

/* probar la transición entre dos temas (dos decks) */
#mx { position: fixed; inset: 0; z-index: 50; background: var(--surface); display: flex; flex-direction: column; gap: 8px; padding: 14px var(--space-4) var(--space-4); }
.mx-label { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-label > b { font: 400 20px/1 var(--font-display); color: var(--accent); }
.mx-label .mono { font: 700 11px/16px var(--font-mono); letter-spacing: .04em; color: var(--ink-muted); margin-left: 6px; }
.mx-cv { flex: 1 1 0; min-height: 90px; width: 100%; border-radius: var(--radius-md); background: #111214; cursor: grab; touch-action: none; }
.mx-cv.drag { cursor: grabbing; }
#mxCvB { cursor: ew-resize; }
#mxOver { height: 56px; flex: none; width: 100%; border-radius: var(--radius-sm); background: #111214; cursor: pointer; touch-action: none; }
.mx-ctl { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.mx-grp { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); }
.mx-fade { margin-left: auto; }
#mxFader { width: min(240px, 30vw); accent-color: var(--accent); }
.mx-kill.on { background: var(--bad); border-color: var(--bad); color: var(--azul-noche); }
#mxNote { flex: 1 1 240px; min-width: 0; }
#mxSum { font: 700 12px/16px var(--font-mono); color: var(--accent); }
#mxPos { font-weight: 700; }
#mxPP:disabled { opacity: .4; cursor: default; }
.mixbtn { cursor: pointer; padding: 2px 6px; margin: -2px -6px; border-radius: var(--radius-pill); }
.mixbtn:hover { background: var(--tint-2); }
.mixdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
