/* Visor de mediciones: estilo iOS (fondo agrupado, tarjetas redondeadas), claro y oscuro segun el sistema o el boton del tema. */

:root {
  --fondo: #F2F2F7;
  --tarjeta: #FFFFFF;
  --texto: #000000;
  --texto-2: #6E6E73;
  --texto-3: #8E8E93;
  --separador: rgba(60, 60, 67, 0.16);
  --relleno: rgba(120, 120, 128, 0.12);
  --borde-tarjeta: transparent;
  --segmento-elegido: #FFFFFF;
  --acento: #007AFF;
  --acento-fondo: rgba(0, 122, 255, 0.10);
  --temperatura: #FF9500;
  --humedad: #30B0C7;
  --rojo: #FF3B30;
  --alerta: #B25000;
  --alerta-fondo: #FFF4E5;
  --error: #D70015;
  --error-fondo: #FFECEE;
  --radio: 12px;
  --radio-grande: 16px;
  --barra-alto: 56px;
  --sombra: 0 1px 2px rgba(0, 0, 0, 0.06);
  --sombra-tarjeta: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --opacidad-manchas: 0.30;
  --google-fondo: #FFFFFF;
  --google-borde: #747775;
  --google-texto: #1F1F1F;
  --vidrio: rgba(255, 255, 255, 0.72);
  --vidrio-borde: rgba(255, 255, 255, 0.5);
  --vidrio-sombra: 0 30px 60px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

/* Tema oscuro: el del sistema, salvo que se haya elegido "claro" con el boton del tema */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo: #000000;
    --tarjeta: #1C1C1E;
    --texto: #FFFFFF;
    --texto-2: #8E8E93;
    --texto-3: #8E8E93;
    --separador: rgba(84, 84, 88, 0.65);
    --relleno: rgba(120, 120, 128, 0.24);
    --borde-tarjeta: rgba(255, 255, 255, 0.06);
    --segmento-elegido: #636366;
    --acento: #0A84FF;
    --acento-fondo: rgba(10, 132, 255, 0.18);
    --temperatura: #FF9F0A;
    --humedad: #40C8E0;
    --rojo: #FF453A;
    --alerta: #FFB340;
    --alerta-fondo: rgba(255, 159, 10, 0.14);
    --error: #FF453A;
    --error-fondo: rgba(255, 69, 58, 0.16);
    --sombra: none;
    --sombra-tarjeta: none;
    --opacidad-manchas: 0.35;
    --google-fondo: #131314;
    --google-borde: #8E918F;
    --google-texto: #E3E3E3;
    --vidrio: rgba(28, 28, 30, 0.72);
    --vidrio-borde: rgba(255, 255, 255, 0.1);
    --vidrio-sombra: 0 30px 60px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* Tema oscuro elegido con el boton del tema: los mismos valores que el bloque de arriba */
:root[data-theme="dark"] {
  --fondo: #000000;
  --tarjeta: #1C1C1E;
  --texto: #FFFFFF;
  --texto-2: #8E8E93;
  --texto-3: #8E8E93;
  --separador: rgba(84, 84, 88, 0.65);
  --relleno: rgba(120, 120, 128, 0.24);
  --borde-tarjeta: rgba(255, 255, 255, 0.06);
  --segmento-elegido: #636366;
  --acento: #0A84FF;
  --acento-fondo: rgba(10, 132, 255, 0.18);
  --temperatura: #FF9F0A;
  --humedad: #40C8E0;
  --rojo: #FF453A;
  --alerta: #FFB340;
  --alerta-fondo: rgba(255, 159, 10, 0.14);
  --error: #FF453A;
  --error-fondo: rgba(255, 69, 58, 0.16);
  --sombra: none;
  --sombra-tarjeta: none;
  --opacidad-manchas: 0.35;
  --google-fondo: #131314;
  --google-borde: #8E918F;
  --google-texto: #E3E3E3;
  --vidrio: rgba(28, 28, 30, 0.72);
  --vidrio-borde: rgba(255, 255, 255, 0.1);
  --vidrio-sombra: 0 30px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--fondo); }
body {
  margin: 0;
  color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; font-weight: 600; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

/* Botones y avisos */
/* Botones de la barra y del detalle: sin fondo, y con --relleno al tocarlos */
.boton-barra {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--acento);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.boton-barra--rojo { color: var(--rojo); }
.boton-icono {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--acento);
  cursor: pointer;
}
.boton-texto {
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--acento);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.boton-texto:disabled { color: var(--texto-3); cursor: default; }
.boton-barra:hover,
.boton-icono:hover,
.boton-texto:hover { background: var(--relleno); }
.boton-texto:disabled:hover { background: transparent; }

/* Exportar: botones dentro del grupo .acciones */
.boton-accion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--acento);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.boton-accion:hover { background: var(--tarjeta); }
.boton-accion svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aviso {
  margin: 12px 20px 0;
  padding: 10px 14px;
  border-radius: var(--radio);
  font-size: 14px;
}
.aviso--error { background: var(--error-fondo); color: var(--error); }
.aviso--advertencia { background: var(--alerta-fondo); color: var(--alerta); }
.aviso--info { background: var(--acento-fondo); color: var(--texto); }
#aviso { width: min(1624px, 100% - 56px); margin: 16px auto 0; }
#avisos { display: grid; gap: 8px; }
#avisos:empty { display: none; }
#avisos .aviso { margin: 0; }

/* Pantalla de entrada: fondo con manchas de color, columna de texto y una vista previa de vidrio a la derecha */
@keyframes girar {
  to { transform: rotate(360deg); }
}
@keyframes derivar {
  from { transform: translate(0, 0); }
  to { transform: translate(40px, -30px); }
}
@keyframes flotar {
  0%, 100% { transform: translateY(-6px); }
  50% { transform: translateY(6px); }
}

.entrada {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--fondo);
}

/* Manchas de color difuminadas detras del contenido (decorativas) */
.entrada-fondo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.mancha {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--opacidad-manchas);
  animation: derivar 24s ease-in-out infinite alternate;
}
.mancha--acento { top: -18%; left: -12%; width: 600px; height: 600px; background: var(--acento); }
.mancha--temperatura {
  top: calc(50% - 260px);
  right: -10%;
  width: 520px;
  height: 520px;
  background: var(--temperatura);
  animation-duration: 28s;
}
.mancha--humedad {
  bottom: -24%;
  left: calc(50% - 320px);
  width: 640px;
  height: 640px;
  background: var(--humedad);
  animation-duration: 22s;
}

.entrada-contenido {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .entrada-contenido { grid-template-columns: minmax(0, 1fr) 440px; gap: 64px; }
}
.entrada-columna { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.entrada-icono { width: 72px; height: 72px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18)); }
.entrada-columna h1 { font-size: 48px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.entrada-bajada { margin: 0; color: var(--texto-2); font-size: 21px; line-height: 1.35; }
.entrada-parrafo { margin: 0; color: var(--texto-2); font-size: 16px; }
.entrada-columna .aviso { margin: 0; width: 100%; }

/* Boton con el estilo de marca de Google */
.boton-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--google-borde);
  border-radius: 999px;
  background: var(--google-fondo);
  color: var(--google-texto);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.boton-google:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16); }
.boton-google:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }
.boton-google:disabled { opacity: 0.6; cursor: default; box-shadow: none; }
.boton-google img { display: block; width: 20px; height: 20px; }
.boton-google.cargando img { display: none; }
.boton-google.cargando::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--acento);
  border-right-color: transparent;
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}

.entrada-demo { color: var(--acento); font-size: 15px; text-decoration: none; }
.entrada-demo:hover { text-decoration: underline; }

.entrada-puntos {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.entrada-puntos li { display: flex; align-items: center; gap: 12px; }
.punto-icono {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #FFFFFF;
}
.punto-icono--acento { background: var(--acento); }
.punto-icono--temperatura { background: var(--temperatura); }
.punto-icono--humedad { background: var(--humedad); }
.punto-icono svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entrada-pie { margin: 8px 0 0; color: var(--texto-3); font-size: 13px; }

/* Vista previa decorativa: tarjeta de vidrio con valores de ejemplo */
.entrada-vista {
  justify-self: center;
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid var(--vidrio-borde);
  border-radius: 24px;
  background: var(--vidrio);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--vidrio-sombra);
  animation: flotar 6s ease-in-out infinite;
}
.vista-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.vista-titulo { font-size: 17px; font-weight: 600; }
.vista-pildora {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--relleno);
  color: var(--texto-2);
  font-size: 12px;
  white-space: nowrap;
}
.vista-valores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vista-tarjeta {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  background: var(--fondo);
}
.vista-etiqueta { color: var(--texto-2); font-size: 13px; }
.vista-numero { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vista-numero--temperatura { color: var(--temperatura); }
.vista-numero--humedad { color: var(--humedad); }
.vista-grafico { display: block; width: 100%; height: auto; margin-top: 16px; }
.vista-grilla { fill: none; stroke: var(--separador); stroke-width: 1; }
.vista-area-temperatura { fill: url(#degradeTemperatura); }
.vista-area-humedad { fill: url(#degradeHumedad); }
.vista-linea { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.vista-linea--temperatura { stroke: var(--temperatura); }
.vista-linea--humedad { stroke: var(--humedad); }

@media (max-width: 640px) {
  .entrada-vista { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mancha,
  .entrada-vista { animation: none; }
}

.enlace { color: var(--acento); text-decoration: none; }
.enlace:hover { text-decoration: underline; }

/* Barra superior: marca a la izquierda; estado, tema, actualizar y cuenta a la derecha */
.barra {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--barra-alto);
  padding: 0 max(28px, calc((100% - 1680px) / 2 + 28px));
  background: color-mix(in srgb, var(--fondo) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separador);
}
.barra-marca {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}
.barra-icono { width: 28px; height: 28px; }
.barra-derecha {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.barra-estado {
  min-width: 0;
  overflow: hidden;
  color: var(--texto-2);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.barra-estado:empty { display: none; }
.barra-separador { width: 1px; height: 20px; background: var(--separador); }
.cuenta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 12px 3px 3px;
  border-radius: 999px;
  background: var(--relleno);
}
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--acento);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
}
.cuenta-usuario {
  max-width: 260px;
  overflow: hidden;
  color: var(--texto-2);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icono-actualizar {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#btn-actualizar.cargando .icono-actualizar { animation: girar 0.9s linear infinite; }

/* Diseno: lista a la izquierda, detalle a la derecha */
.diseno {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 28px;
}
.panel-lista {
  position: sticky;
  top: calc(var(--barra-alto) + 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - var(--barra-alto) - 48px);
  padding: 16px;
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-grande);
  background: var(--tarjeta);
  box-shadow: var(--sombra-tarjeta);
}
.lista-cabecera {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px;
}
.lista-cabecera h2 { font-size: 22px; font-weight: 700; }
.cantidad { color: var(--texto-3); font-size: 13px; }
.buscador-caja { position: relative; display: block; }
.buscador-lupa {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--texto-3);
  pointer-events: none;
}
.buscador {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 32px;
  border: 0;
  border-radius: 10px;
  background: var(--relleno);
}
.lista {
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.item:hover { background: var(--relleno); }
.item--elegido,
.item--elegido:hover { background: var(--acento); color: #FFFFFF; }
.item-texto { display: grid; min-width: 0; }
.item-nombre {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: normal;
}
.item-detalle {
  color: var(--texto-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.item--elegido .item-detalle { color: rgba(255, 255, 255, 0.8); }
.iconos { display: inline-flex; flex-shrink: 0; gap: 4px; }
.icono {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #FFFFFF;
}
.icono--temperatura { background: var(--temperatura); }
.icono--humedad { background: var(--humedad); }
.item--elegido .icono { background: rgba(255, 255, 255, 0.25); }
.icono svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.vacio { margin: 8px 4px; color: var(--texto-2); font-size: 14px; }
.vacio-grande {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 20px;
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-grande);
  background: var(--tarjeta);
  color: var(--texto-2);
  box-shadow: var(--sombra-tarjeta);
}

/* Detalle */
.detalle { display: grid; align-content: start; gap: 16px; min-width: 0; }
#contenido { display: grid; gap: 16px; min-width: 0; }
.tarjeta {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-grande);
  background: var(--tarjeta);
  box-shadow: var(--sombra-tarjeta);
}
.encabezado { display: grid; gap: 16px; }
.encabezado-superior {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.encabezado h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.acciones {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: var(--relleno);
}
.datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px 24px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-grande);
  background: var(--tarjeta);
  box-shadow: var(--sombra-tarjeta);
}
.dato dt {
  color: var(--texto-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dato dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

/* Desde 700 px, el periodo ocupa dos columnas para que la fecha no se parta en dos renglones */
@media (min-width: 700px) {
  .datos > .dato:first-child { grid-column: span 2; }
}

/* Rangos: control segmentado y, al lado, los campos de fecha de "Personalizado" */
.rangos { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.segmentado {
  display: inline-flex;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: var(--relleno);
}
.segmentado::-webkit-scrollbar { display: none; }
.segmento {
  flex: none;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--texto);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.segmento--elegido {
  background: var(--segmento-elegido);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.fechas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fechas label { display: inline-flex; align-items: center; gap: 8px; color: var(--texto-2); font-size: 13px; }
.fechas input {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: var(--relleno);
  color: var(--texto);
  font-size: 13px;
}

/* Tarjetas de resumen */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.tarjeta-titulo { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.valores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.valor { display: grid; gap: 2px; min-width: 0; }
.valor .etiqueta { color: var(--texto-2); font-size: 12px; }
.valor .numero {
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.valor .numero small {
  margin-left: 3px;
  color: var(--texto-2);
  font-size: 15px;
  font-weight: 500;
}
.nota { margin: 12px 0 0; color: var(--texto-2); font-size: 13px; }

/* Graficos */
.graficos { display: grid; gap: 16px; }
.grafico-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.grafico-cabecera h2 { font-size: 17px; font-weight: 600; }
.grafico-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.grafico-ayuda { margin: 0; color: var(--texto-3); font-size: 12px; }
.grafico-lienzo { position: relative; height: clamp(280px, 40vh, 460px); margin-top: 12px; }
.grafico .vacio { margin: 0; padding: 40px 0; text-align: center; }

/* Tabla de lecturas */
.tabla-cabecera {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.tabla-cabecera h2 { font-size: 17px; font-weight: 600; }
.tabla-scroll { max-height: 520px; overflow: auto; border-radius: 10px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th,
.tabla td {
  padding: 0 12px;
  border-bottom: 1px solid var(--separador);
  text-align: left;
  white-space: nowrap;
}
.tabla tbody tr { height: 40px; }
.tabla tbody tr:hover { background: var(--relleno); }
.tabla thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 36px;
  background: var(--tarjeta);
  color: var(--texto-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tabla .numerico { text-align: right; font-variant-numeric: tabular-nums; }
.paginacion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: var(--texto-2);
  font-size: 13px;
}

/* Pantallas angostas (debajo de 1000 px): la lista arriba, sin pegarse, y el detalle abajo */
@media (max-width: 1000px) {
  .diseno { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 32px; }
  .panel-lista { position: static; max-height: 300px; }
  .barra { padding: 0 16px; }
  #aviso { width: calc(100% - 32px); }
}

/* Telefono (debajo de 600 px): se ocultan el texto de "Actualizar" (queda el icono) y el correo (queda el avatar) */
@media (max-width: 600px) {
  .texto-actualizar,
  .cuenta-usuario { display: none; }
  .cuenta { padding: 3px; }
  .barra-derecha { gap: 6px; }
  .boton-barra { padding: 0 8px; }
  .barra-marca { font-size: 16px; }
  .valor .numero { font-size: 22px; }
}
