/* ==========================================================================
   LecaTube — hoja de estilos
   Paleta y tipografía tomadas del sistema "LecaTube Corporate Video System"
   generado en Google Stitch (proyecto 3041158628961031596). Es un tema
   oscuro Material 3 con tinte cálido y el rojo corporativo como acento.
   ========================================================================== */

:root {
  /* Superficies, de la más profunda a la más elevada */
  --bg:            #190a0b;
  --surface:       #1f0f10;
  --surface-low:   #281718;
  --surface-c:     #2c1b1c;
  --surface-high:  #382526;
  --surface-var:   #443030;

  /* Texto */
  --text:          #fbdbdb;
  --text-var:      #e5bdbe;
  --muted:         #ac8889;

  /* Bordes */
  --border:        #5c3f40;
  --border-soft:   #443030;

  /* Acento y estados */
  --accent:        #e11d48;
  --accent-hover:  #f43f5e;
  --accent-soft:   rgba(225, 29, 72, .14);
  --on-accent:     #fffaf9;
  --accent-text:   #ffb3b6;

  --ok:            #74d8bd;
  --ok-soft:       rgba(116, 216, 189, .13);
  --warn:          #f0b849;
  --warn-soft:     rgba(240, 184, 73, .13);
  --fail:          #ffb4ab;
  --fail-soft:     rgba(255, 180, 171, .13);

  --radio:         10px;
  --radio-sm:      6px;
  --sombra:        0 1px 3px rgba(0, 0, 0, .45);

  --fuente: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fuente);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- cabecera */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  white-space: nowrap;
}
/* "Leca" normal + "Tube" sobre pastilla roja, como el logotipo del sistema */
.brand::after {
  content: "Tube";
  background: var(--accent);
  color: var(--on-accent);
  padding: 1px 7px;
  border-radius: var(--radio-sm);
  margin-left: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}
.nav a { color: var(--text-var); transition: color .15s; }
.nav a:hover { color: var(--text); }
.nav .user { color: var(--muted); font-size: 13.5px; }

.logout-form { display: inline; }
.logout-form button {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radio-sm);
  padding: 7px 16px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.logout-form button:hover { background: var(--accent-hover); }

/* `button[type=submit]` gana en especificidad a `.link-btn`, así que los
   botones de acción secundaria necesitan el mismo peso para no salir como
   bloques rojos. Una acción destructiva no debe ser lo más llamativo de la
   pantalla. */
.link-btn,
button[type=submit].link-btn {
  background: none;
  border: none;
  color: var(--text-var);
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  padding: 4px 6px;
  margin: 0;
  border-radius: var(--radio-sm);
  transition: background .15s, color .15s;
}
.link-btn:hover,
button[type=submit].link-btn:hover { color: var(--text); background: var(--surface-var); }

.link-btn.danger,
button[type=submit].link-btn.danger { color: var(--fail); }
.link-btn.danger:hover,
button[type=submit].link-btn.danger:hover { background: var(--fail-soft); color: var(--fail); }

.link-btn.accent,
button[type=submit].link-btn.accent { color: var(--accent-text); text-decoration: underline; }

/* ----------------------------------------------------------------- diseño */

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

h1 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 4px; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 600; }

.muted { color: var(--muted); font-size: 13px; }

/* --------------------------------------------------------------- catálogo */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 18px;
}

.card {
  background: var(--surface-c);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio);
  overflow: hidden;
  display: block;
  transition: border-color .15s, transform .15s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-high);
  overflow: hidden;
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: .88;
  transition: opacity .15s;
}
.card:hover .thumb img { opacity: 1; }
.thumb-placeholder { font-size: 26px; color: var(--muted); }

.duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-body { padding: 12px 14px 14px; }
.card-body h3 { margin: 0 0 5px; line-height: 1.35; }
.card-body .muted { font-size: 12.5px; }

/* -------------------------------------------------------- zona de subida */

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radio);
  background: var(--surface-low);
  padding: 34px 22px;
  margin-bottom: 30px;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dz-idle { display: flex; flex-direction: column; gap: 5px; }
.dz-idle strong { font-size: 16px; font-weight: 600; }

.dz-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dz-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px minmax(96px, auto);
  grid-template-areas: "n b s" "d d d";
  align-items: center;
  gap: 4px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio-sm);
  padding: 10px 14px;
  font-size: 13px;
  text-align: left;
}
.dz-name  { grid-area: n; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-bar   { grid-area: b; height: 6px; background: var(--surface-var); border-radius: 3px; overflow: hidden; }
.dz-fill  { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .3s; }
.dz-state { grid-area: s; font-size: 12px; text-align: right; white-space: nowrap; color: var(--muted); }
.dz-detail{ grid-area: d; font-size: 11.5px; color: var(--muted); }

.dz-item.is-converting .dz-fill { background: var(--warn); }
.dz-item.is-converting .dz-state { color: var(--warn); }
.dz-item.is-done .dz-fill { background: var(--ok); }
.dz-item.is-done .dz-state { color: var(--ok); }
.dz-item.is-error { border-color: var(--fail); }
.dz-item.is-error .dz-fill { background: var(--fail); }
.dz-item.is-error .dz-state,
.dz-item.is-error .dz-detail { color: var(--fail); }

/* ------------------------------------------------------------ formularios */

form { display: flex; flex-direction: column; gap: 6px; text-align: left; }

label {
  font-size: 13px;
  color: var(--text-var);
  margin-top: 8px;
  font-weight: 500;
}

input[type=text], input[type=password], input[type=search],
input[type=file], textarea, select {
  background: var(--surface-high);
  border: 1px solid transparent;
  border-radius: var(--radio-sm);
  color: var(--text);
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  background: var(--surface-var);
}

button[type=submit] {
  margin-top: 18px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radio-sm);
  padding: 12px 18px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
button[type=submit]:hover { background: var(--accent-hover); }

/* ----------------------------------------------------------- acceso/login */

.auth-box {
  max-width: 400px;
  margin: 8vh auto 0;
  text-align: center;
}
.auth-marca {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-c);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.auth-marca .brand { font-size: 22px; }
.auth-sub { color: var(--text-var); font-size: 15px; margin: 0 0 26px; }

.auth-panel {
  background: var(--surface-c);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio);
  padding: 26px 26px 30px;
  box-shadow: var(--sombra);
}
.auth-pie {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------------------------------------------------------------- tablas */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radio);
  background: var(--surface-c);
}
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-high); }
.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-low);
}
.mono, code { font-family: var(--mono); }
td .mono { font-size: 12px; color: var(--text-var); }

/* --------------------------------------------------------- indicadores */

.tarjetas-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 26px;
}
.kpi {
  background: var(--surface-c);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio);
  padding: 16px 18px;
}
.kpi .num {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi .lab { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* --------------------------------------------------------- etiquetas */

.status, .pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status-ready      { background: var(--ok-soft);   color: var(--ok); }
.status-pending,
.status-processing { background: var(--warn-soft); color: var(--warn); }
.status-error      { background: var(--fail-soft); color: var(--fail); }

.rol-admin  { background: var(--accent-soft); color: var(--accent-text); }
.rol-viewer { background: var(--surface-var); color: var(--text-var); }

.scope-tag {
  display: inline-block;
  background: var(--surface-var);
  border: 1px solid var(--border-soft);
  color: var(--text-var);
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 1px 2px 1px 0;
  white-space: nowrap;
}

/* ------------------------------------------------------------- avisos */

.alert {
  background: var(--fail-soft);
  border: 1px solid var(--fail);
  color: var(--fail);
  padding: 11px 15px;
  border-radius: var(--radio-sm);
  margin: 14px 0;
  font-size: 14px;
}
.alert-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

.aviso {
  background: var(--warn-soft);
  border: 1px solid var(--warn);
  border-radius: var(--radio-sm);
  padding: 12px 15px;
  margin: 16px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

.ok   { color: var(--ok); }
.fail { color: var(--fail); }

/* -------------------------------------------------------- reproducción */

.volver {
  display: inline-block;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 16px;
}
.volver:hover { color: var(--accent-text); }

.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 30px;
  align-items: start;
}
@media (max-width: 1000px) { .watch { grid-template-columns: minmax(0, 1fr); } }

.watch-main { min-width: 0; }
.player {
  width: 100%;
  max-height: 72vh;
  background: #000;
  border-radius: var(--radio);
  display: block;
}
.watch-titulo { font-size: 21px; margin: 16px 0 4px; }
.watch-desc { font-size: 14px; line-height: 1.65; margin-top: 12px; color: var(--text-var); }

.player-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.velocidad { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.vel {
  background: var(--surface-high);
  border: 1px solid transparent;
  color: var(--text-var);
  border-radius: var(--radio-sm);
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.vel:hover { background: var(--surface-var); color: var(--text); }
.vel.activa { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.nav-videos { display: flex; gap: 16px; font-size: 13.5px; }
.nav-videos a { color: var(--text-var); }
.nav-videos a:hover { color: var(--accent-text); }

.compartir {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.compartir-fila, .token-value {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.compartir-fila code, .token-value code {
  background: var(--surface-high);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio-sm);
  padding: 9px 12px;
  font-size: 12px;
  word-break: break-all;
  flex: 1 1 300px;
  color: var(--text-var);
}
.copy-btn {
  background: var(--surface-var);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radio-sm);
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.copy-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* -------------------------------------------------- lista lateral */

.watch-lista { min-width: 0; }
.lista-cabeza { margin-bottom: 14px; }
.lista-cabeza h2 { margin: 0 0 10px; }
#buscador { width: 100%; }

#lista { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  border-radius: var(--radio-sm);
  padding: 6px;
  transition: background .15s;
}
.item:hover { background: var(--surface-c); }
.item-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-high);
  border-radius: var(--radio-sm);
  overflow: hidden;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-thumb .thumb-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item-info strong { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.item-info .muted { font-size: 11.5px; }
.sin-resultados { padding: 10px 6px; }

/* ------------------------------------------------- credenciales de API */

.token-box {
  background: var(--ok-soft);
  border: 1px solid var(--ok);
  border-radius: var(--radio);
  padding: 16px 18px;
  margin: 16px 0 24px;
}
.scope-list { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.scope {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text);
  margin: 0;
  font-weight: 400;
}
.scope input { margin-top: 3px; accent-color: var(--accent); }
.scope code {
  background: var(--surface-high);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent-text);
}

/* ------------------------------------------------------ manual de la API */

.manual { max-width: 880px; }
.manual h2 {
  font-size: 19px;
  margin: 38px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.manual h3 { margin: 24px 0 6px; }
.manual p { font-size: 14px; line-height: 1.7; color: var(--text-var); }
.manual p strong { color: var(--text); }
.manual code {
  background: var(--surface-high);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--accent-text);
}
.manual pre {
  background: var(--surface-low);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio-sm);
  padding: 15px 17px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.6;
}
.manual pre code { background: none; padding: 0; color: var(--text); font-size: inherit; }
.manual .table { margin: 0; }
.manual .table-wrap { margin: 14px 0 20px; }

.manual-indice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 14px 0 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.manual-indice a { color: var(--accent-text); }
.manual-indice a:hover { text-decoration: underline; }

.endpoint {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 12px 0 8px !important;
}
.met {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: .04em;
}
.met.get   { background: var(--ok-soft);   color: var(--ok); }
.met.post  { background: var(--warn-soft); color: var(--warn); }
.met.patch { background: rgba(185, 199, 224, .16); color: #b9c7e0; }
.met.del   { background: var(--fail-soft); color: var(--fail); }

/* ------------------------------------------------------------ estado */

.help { margin-top: 26px; font-size: 14px; }
.help li { margin-bottom: 7px; color: var(--text-var); }
.help code { background: var(--surface-high); padding: 1px 6px; border-radius: 4px; color: var(--accent-text); }

.note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft);
}

.credbox {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  background: var(--surface-c);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio);
  padding: 18px 20px;
}
.credbox .field .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.credbox .field .v { font-size: 14px; font-weight: 600; margin-top: 3px; }

/* ------------------------------------------------------- solicitudes */

.solicitudes { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

.solicitud {
  background: var(--surface-c);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio);
  padding: 16px 18px;
}
.sol-cabeza {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.sol-cabeza h3 { margin: 0; font-size: 15.5px; }
.sol-etiquetas { display: flex; gap: 6px; flex-wrap: wrap; }
.sol-desc { font-size: 14px; margin: 8px 0; color: var(--text-var); line-height: 1.6; }

.estado-nueva       { background: var(--accent-soft); color: var(--accent-text); }
.estado-en_revision { background: var(--warn-soft);   color: var(--warn); }
.estado-planeada    { background: rgba(185,199,224,.16); color: #b9c7e0; }
.estado-en_progreso { background: var(--warn-soft);   color: var(--warn); }
.estado-completada  { background: var(--ok-soft);     color: var(--ok); }
.estado-descartada  { background: var(--surface-var); color: var(--muted); }

.prioridad-alta  { background: var(--fail-soft);   color: var(--fail); }
.prioridad-media { background: var(--surface-var); color: var(--text-var); }
.prioridad-baja  { background: var(--surface-var); color: var(--muted); }

.sol-respuesta {
  background: var(--surface-low);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radio-sm) var(--radio-sm) 0;
  padding: 11px 14px;
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.6;
}

.sol-admin {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft);
  gap: 8px;
}
.sol-controles { display: flex; gap: 8px; flex-wrap: wrap; }
.sol-controles select { flex: 1 1 160px; padding: 8px 10px; font-size: 13px; }
.sol-admin textarea { font-size: 13px; }
.sol-admin button[type=submit] { margin-top: 8px; align-self: flex-start; padding: 8px 16px; font-size: 13.5px; }

/* ==========================================================================
   Adaptación a pantallas pequeñas
   ========================================================================== */

/* Botón de menú: oculto en escritorio, visible en móvil */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 36px;
  background: var(--surface-high);
  border: 1px solid var(--border-soft);
  border-radius: var(--radio-sm);
  cursor: pointer;
  padding: 0 9px;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

@media (max-width: 860px) {
  .topbar { padding: 0 16px; }
  .menu-btn { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-c);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sombra);
    padding: 6px 0;
  }
  .nav.abierto { display: flex; }
  .nav a, .nav .user {
    padding: 13px 20px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 15px;
  }
  .nav .user { color: var(--muted); }
  .logout-form { padding: 12px 20px; }
  .logout-form button { width: 100%; padding: 12px; font-size: 15px; }

  .container { padding: 20px 16px 48px; }
  h1 { font-size: 20px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-body { padding: 10px 11px 12px; }
  .card-body h3 { font-size: 14px; }

  .dropzone { padding: 24px 16px; }
  .dz-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "n s" "b b" "d d";
  }

  /* Las tablas anchas se recorren en horizontal dentro de su contenedor */
  .table th, .table td { padding: 10px 11px; }

  .watch { gap: 22px; }
  .player { max-height: 46vh; }
  .watch-titulo { font-size: 18px; }
  .item { grid-template-columns: 110px minmax(0, 1fr); }

  .tarjetas-kpi { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi .num { font-size: 18px; }

  .manual pre { font-size: 11.5px; padding: 12px; }
  .auth-box { margin-top: 4vh; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .tarjetas-kpi { grid-template-columns: 1fr 1fr; }
  .compartir-fila code, .token-value code { flex: 1 1 100%; font-size: 11px; }
  .copy-btn { width: 100%; }
  .velocidad { flex-wrap: wrap; }
}

/* En pantallas táctiles, los objetivos de toque deben ser cómodos */
@media (hover: none) {
  .nav a, .link-btn, .vel { padding-top: 8px; padding-bottom: 8px; }
  .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
