/* Admin panel — overrides/extensions sobre styles.css */

.user-row {
  display: grid; grid-template-columns: 1fr 1.2fr 110px 90px 38px;
  align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px;
  transition: .15s;
}
.user-row:hover { border-color: rgba(255,255,255,.28); }
.user-row .em {
  font-size: 14px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-row .nt {
  font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-row .nt input {
  background: transparent; border: none; color: var(--muted);
  width: 100%; font-family: inherit; font-size: 13px; padding: 4px 0;
}
.user-row .nt input:focus { outline: none; color: var(--text); border-bottom: 1px solid rgba(255,255,255,.28); }
.user-row .when { font-size: 11px; color: var(--faint); white-space: nowrap; }
.user-row .toggle {
  position: relative; width: 44px; height: 24px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; padding: 0;
}
.user-row .toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 999px;
  background: var(--muted); transition: .2s;
}
.user-row .toggle.on { background: var(--acento-soft); border-color: var(--acento); }
.user-row .toggle.on::after { left: 22px; background: var(--acento); }
.user-row .icon-btn { width: 32px; height: 32px; font-size: 13px; }
.user-row.inactive .em { color: var(--muted); text-decoration: line-through; }

.card.admin-card .mine-tools { display: flex; gap: 8px; padding: 0 14px 14px; }

/* Modal de preview de secuencia ajena */
.preview-modal { z-index: 60; }
.preview-modal .modal-box { width: min(820px, 96vw); display: flex; flex-direction: column; gap: 14px; }
.preview-modal .modal-box { width: min(1100px, 96vw); }
.preview-modal .frames-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
  max-height: 66vh; overflow: auto; padding: 4px;
}
.preview-modal .frame-img { cursor: zoom-in; transition: .15s; }
.preview-modal .frame-img:hover { border-color: rgba(255,255,255,.35); transform: translateY(-2px); }
.pm-pista { margin-top: 12px; font-size: 12px; color: var(--faint); text-align: center; }
.preview-modal .frames-row canvas {
  width: 100%; aspect-ratio: 9/16; border-radius: 8px; background: #15110d; display: block;
}
.preview-modal .meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.preview-modal .meta-row .pill { font-size: 11px; }

@media (max-width: 760px) {
  .user-row { grid-template-columns: 1fr 90px 36px; gap: 8px; }
  .user-row .nt, .user-row .when { display: none; }
}

/* ------------------ Pendientes de aprobación --------------------------- */
/* Contador en el menú: sólo aparece si hay alguien esperando */
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--acento); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.pending-row { grid-template-columns: 1fr 1.2fr 90px 120px; }
.pending-row .btn { white-space: nowrap; }
.pend-warn {
  margin-left: 8px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--acento-lit);
  background: var(--acento-soft);
  border: 1px solid rgba(255,82,8,.28);
  padding: 2px 7px; border-radius: 999px;
}
.seq-owner { color: var(--orange-2); font-weight: 600; }

@media (max-width: 760px) {
  .pending-row { grid-template-columns: 1fr auto; row-gap: 8px; }
  .pending-row .nt { grid-column: 1 / -1; }
  .pending-row .when { display: none; }
}

/* ------------------- Secuencias a revisar ------------------------------ */
/* La tarjeta es más ancha para que los tres botones se lean bien */
#reviewGrid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.review-card .card-info { padding-bottom: 6px; }
.share-ok  { font-size: 11.5px; color: #6ee79a; font-weight: 600; }
.share-no  { font-size: 11.5px; color: var(--faint); font-weight: 600; }

.review-tools { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }

/* Los tres veredictos, del mismo tamaño y con la estética del resto */
.verdicto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vbtn {
    position: relative;
    height: 42px; border-radius: 12px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 3px;
    background: var(--panel-2); border: 1px solid var(--border);
    transition: .15s;
}
.vbtn svg {
    width: 19px; height: 19px;
    fill: none; stroke: currentColor;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.vbtn svg.v2 { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.vbtn.ok      { color: #6ee79a; }
.vbtn.guardar { color: #6ee79a; }
.vbtn.ko      { color: #ff8f92; }
.vbtn:hover:not(:disabled) {
    border-color: currentColor;
    background: rgba(255,255,255,.06);
    transform: translateY(-1px);
}
.vbtn:disabled { opacity: .3; cursor: not-allowed; }

.comentario { display: flex; flex-direction: column; gap: 8px; }
.comentario.hidden { display: none; }
.comentario textarea {
    font-family: inherit; font-size: 13px; color: var(--text);
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 12px; resize: vertical; line-height: 1.5;
}
.comentario textarea:focus { outline: none; border-color: rgba(255,255,255,.28); }
.comentario-row { display: flex; gap: 8px; }
.comentario-row .btn { flex: 1; }

/* ------------------- Pie de la barra lateral --------------------------- */
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.sidebar-foot .btn { justify-content: center; padding: 12px 16px; border-radius: 12px; }
.sidebar-foot .volver { text-decoration: none; }

/* Los dos del comentario, del mismo tamaño y forma */
.comentario-row .btn { flex: 1; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* Frames reales del cliente al revisar */
/* Ocupan su celda de la rejilla. Con ancho fijo se salían y se pisaban. */
.frame-img {
    width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--border);
    background: #101010; display: block;
}
.sin-fotos {
    width: 100%; font-size: 12.5px; color: var(--faint);
    margin-bottom: 4px;
}


/* ------------------- Un frame a pantalla completa ---------------------- */
.frame-viewer {
    position: fixed; inset: 0; z-index: 120;
    background: rgba(0,0,0,.92);
    display: flex; align-items: center; justify-content: center;
    padding: 32px 76px;
}
.frame-viewer.hidden { display: none; }
.frame-viewer img {
    max-height: calc(100vh - 64px);
    max-width: min(560px, 92vw);
    width: auto; height: auto;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 30px 90px rgba(0,0,0,.8);
}
.fv-cerrar, .fv-nav {
    position: absolute;
    display: grid; place-items: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff; cursor: pointer;
    backdrop-filter: blur(8px);
    transition: .15s;
}
.fv-cerrar {
    top: 22px; right: 24px;
    width: 40px; height: 40px; border-radius: 12px; font-size: 16px;
}
.fv-nav {
    top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 999px; font-size: 26px;
    line-height: 1; padding-bottom: 4px;
}
.fv-prev { left: 22px; }
.fv-next { right: 22px; }
.fv-cerrar:hover, .fv-nav:hover { background: rgba(255,255,255,.14); }
.fv-nav.hidden { display: none; }
.fv-contador {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    font-size: 12.5px; color: var(--muted);
    background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12);
    padding: 6px 14px; border-radius: 999px;
}
@media (max-width: 760px) {
    .frame-viewer { padding: 20px 12px 64px; }
    .fv-nav { width: 40px; height: 40px; }
    .fv-prev { left: 8px; } .fv-next { right: 8px; }
}

/* ------------------- Gestión de la biblioteca -------------------------- */
.biblio-tools { margin-top: auto; display: flex; gap: 6px; padding-top: 12px; }
.biblio-tools .btn { flex: 1; padding: 8px 6px; font-size: 12px; border-radius: 9px; }
.biblio-edit { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.biblio-edit.hidden { display: none; }
.biblio-edit .field span { font-size: 11.5px; }
.biblio-edit input, .biblio-edit select {
    font-family: inherit; font-size: 13px; color: var(--text);
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 9px; padding: 9px 11px; width: 100%;
}
.biblio-edit input:focus, .biblio-edit select:focus { outline: none; border-color: rgba(255,255,255,.28); }

/* ------------------- Filtros de la biblioteca -------------------------- */
.biblio-filtros {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap; margin-bottom: 22px;
}
.biblio-buscar {
    font-family: inherit; font-size: 14px; color: var(--text);
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 999px; padding: 11px 18px;
    min-width: 260px; flex: 0 1 320px;
}
.biblio-buscar::placeholder { color: var(--faint); }
.biblio-buscar:focus { outline: none; border-color: rgba(255,255,255,.28); }
#biblioCats { margin-bottom: 0; flex-wrap: wrap; }
#biblioCats .seg em {
    font-style: normal; font-size: 11px; color: var(--faint);
    margin-left: 5px;
}
#biblioCats .seg.active em { color: var(--muted); }
