/* Hoy: rejilla de tarjetas blancas con mucho aire (estilo «Dashboard V18»), sobre comun/sistema.css.
   Primero el celular (una columna); 6 columnas desde 720 px y 12 desde 1180 px. */
.h-rejilla { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.h-tarjeta { min-width: 0; padding: 18px; background: var(--panel); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); }
.h-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; min-width: 0; }
.h-cab h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-size: 18px; letter-spacing: -0.01em; min-width: 0; }
.h-cab h2 .s-tenue { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.h-eyebrow { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tenue); }
.h-enlace { flex: none; padding: 6px 0; border: 0; background: none; color: var(--neon); font-size: 14px; font-weight: 700; }
:root { --negro-btn: #0b0d10; --negro-btn-tx: #fff; }
html[data-tema="oscuro"] { --negro-btn: #eef1f3; --negro-btn-tx: #050607; }
.h-negro { display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 18px; border: 0; border-radius: 999px; background: var(--negro-btn); color: var(--negro-btn-tx); font-size: 15px; font-weight: 700; white-space: nowrap; transition: transform 160ms var(--ease-out); }
.h-negro i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--pildora-on); color: var(--tinta); transition: transform 200ms var(--ease-out); }
.h-negro svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.h-negro:active { transform: scale(0.97); }
.h-negro.chico { padding: 4px 4px 4px 14px; font-size: 14px; } .h-negro.chico i { width: 30px; height: 30px; }

/* ---------- banner ---------- */
.h-banner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(34, 197, 107, 0.2), transparent 60%), linear-gradient(135deg, #dcf5e6 0%, #eef9f2 50%, #ffffff 100%); border-color: transparent; }
html[data-tema="oscuro"] .h-banner { background: radial-gradient(90% 120% at 100% 0%, rgba(62, 224, 122, 0.2), transparent 60%), linear-gradient(135deg, #0f2318 0%, #0d0f12 70%); border-color: var(--linea); }
.h-banner-txt { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.h-banner h1 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -0.03em; }
.h-banner p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--texto); max-width: 40ch; }
.h-banner-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 8px; }
.h-destacado { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: var(--radio-m); background: var(--panel-3); aspect-ratio: 16 / 10; text-align: left; transition: transform 200ms var(--ease-out); }
.h-destacado img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.h-destacado-pie { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; padding: 36px 14px 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); }
.h-destacado-pie small { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #5cff9d; }
.h-destacado-pie strong { font-size: 16px; line-height: 1.25; }
.h-destacado-pie .s-precio { color: #fff; }
.h-destacado:active { transform: scale(0.985); }

/* ---------- datos con mini gráfica ---------- */
.h-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.h-dato { display: flex; flex-direction: column; padding: 16px; border-radius: var(--radio-m); }
.h-dato-lbl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; font-size: 12px; font-weight: 700; color: var(--tenue); }
.h-dato-lbl .s-tag { font-size: 10px; padding: 1px 6px; }
.h-dato b { margin-top: 8px; font-size: 30px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-dato small { margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--tenue); }
.h-graf { display: block; width: 100%; height: 38px; margin-top: auto; padding-top: 12px; overflow: visible; }
.h-area { fill: var(--verde-suave); }
.h-traza { fill: none; stroke: var(--verde); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; }
.h-barra { fill: var(--verde); opacity: 0.35; transform-box: fill-box; transform-origin: bottom; }
.h-barra.ultima { opacity: 1; }
.h-graf rect:nth-child(1):nth-last-child(4) { opacity: 1; }
.h-graf rect:nth-child(2):nth-last-child(3) { opacity: 0.7; }
.h-graf rect:nth-child(3):nth-last-child(2) { fill: var(--ambar); opacity: 0.8; }
.h-graf rect:nth-child(4):nth-last-child(1) { fill: var(--rojo); opacity: 0.8; }

/* ---------- notificaciones ---------- */
.h-notis { display: flex; flex-direction: column; }
.h-tabs { display: flex; gap: 2px; padding: 4px; margin-bottom: 8px; border-radius: 999px; background: var(--panel-2); overflow-x: auto; scrollbar-width: none; }
.h-tabs::-webkit-scrollbar { display: none; }
.h-tabs button { flex: 1 0 auto; padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--tenue); font-size: 13px; font-weight: 700; white-space: nowrap; transition: background-color 180ms ease, color 180ms ease; }
.h-tabs button span { margin-left: 5px; font-size: 11px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.h-tabs button[aria-selected="true"] { background: var(--negro-btn); color: var(--negro-btn-tx); }
.h-notis-lista { display: flex; flex-direction: column; }
.h-notis-lista.cambia { animation: h-cambia 220ms var(--ease-out) both; }
@keyframes h-cambia { from { opacity: 0; filter: blur(3px); transform: translateY(4px); } }
.h-noti { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 8px; text-align: left; border: 0; border-top: 1px solid var(--linea); background: none; border-radius: 0; }
.h-noti:first-child { border-top: 0; }
.h-noti > i { flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--tenue); }
.h-noti > i.verde { background: var(--verde); } .h-noti > i.rojo { background: var(--rojo); } .h-noti > i.ambar { background: var(--ambar); }
.h-noti > i.azul { background: var(--azul); } .h-noti > i.violeta { background: var(--violeta); }
.h-noti > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h-noti strong { font-size: 14px; font-weight: 600; line-height: 1.35; }
.h-noti .s-tenue { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .h-noti:hover { background: var(--panel-2); border-radius: 12px; } .h-noti:hover + .h-noti { border-top-color: transparent; } }

/* ---------- el lote en miniatura (de noche, como el lote 3D) ---------- */
.h-lote { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; cursor: pointer; color: #eef1f3; border-color: transparent;
  background: radial-gradient(80% 100% at 0% 0%, rgba(92, 255, 157, 0.14), transparent 60%), #07090b; transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.h-lote-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.h-lote .h-eyebrow { color: #5cff9d; }
.h-lote h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.h-lote .h-negro { margin-top: 6px; background: #fff; color: #050607; }
.h-ley { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: #c9d1d9; }
.h-ley span { display: inline-flex; align-items: center; gap: 6px; }
.h-ley span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: #5cff9d; }
.h-ley .e-apartado::before { background: #f5b83d; } .h-ley .e-vendido::before { background: #5a5f66; }
.h-plano { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 14px 12px 14px 32px; border-radius: var(--radio-m); background: #11151a; border: 1px solid rgba(255, 255, 255, 0.06); }
.h-lona { position: absolute; left: 7px; top: 14px; bottom: 14px; width: 16px; display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); border-radius: 6px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.22em; color: #5cff9d; background: rgba(92, 255, 157, 0.1); }
.h-fila { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; }
.h-auto { display: block; height: clamp(24px, 3.2vw, 40px); border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), inset 0 -5px 0 rgba(0, 0, 0, 0.25); }
.h-auto.e-apartado { outline: 2px solid #f5b83d; outline-offset: 1px; }
.h-auto.e-vendido { opacity: 0.22; }
.h-pasillo { display: block; height: 12px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 8px, transparent 8px 16px) center / 100% 1px no-repeat; }
.h-lote:active { transform: scale(0.99); }

/* ---------- calendario ---------- */
.h-cal-nav { display: flex; gap: 6px; flex: none; }
.h-cal-nav button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--linea); background: var(--panel); font-size: 18px; line-height: 1; transition: transform 160ms var(--ease-out); }
.h-cal-nav button:active { transform: scale(0.92); }
.h-semana { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.h-dia { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 10px 0 9px; border: 1px solid var(--linea); border-radius: 16px; background: var(--panel); transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.h-dia:active { transform: scale(0.95); }
.h-dia small { font-size: 11px; font-weight: 700; color: var(--tenue); text-transform: uppercase; letter-spacing: 0.04em; }
.h-dia b { font-size: 18px; font-variant-numeric: tabular-nums; }
.h-dia.hoy b { color: var(--neon); }
.h-dia.paso { opacity: 0.55; }
.h-dia.sel { background: var(--negro-btn); color: var(--negro-btn-tx); border-color: transparent; opacity: 1; }
.h-dia.sel small { color: inherit; opacity: 0.7; } .h-dia.sel b { color: inherit; }
.h-puntos { display: flex; gap: 3px; height: 6px; }
.h-puntos i { width: 5px; height: 5px; border-radius: 50%; background: var(--tenue); }
.h-puntos i.prueba { background: var(--verde); }
.h-cal-dia { margin: 16px 0 8px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tenue); }
.h-citas { display: flex; flex-direction: column; gap: 8px; }
.h-cita { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; text-align: left; border: 0; border-radius: 16px; background: var(--panel-2); transition: transform 160ms var(--ease-out); }
.h-cita:active { transform: scale(0.98); }
.h-cita.prueba { background: var(--verde-suave); }
.h-cita img { flex: none; width: 54px; height: 42px; object-fit: cover; border-radius: 11px; background: var(--panel-3); }
.h-cita > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h-cita strong { font-size: 14px; }
.h-cita .s-tenue { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-cal > .h-enlace { margin-top: 8px; }

/* ---------- recién publicados ---------- */
.h-tira { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 2px 2px 6px; margin: -2px -2px 0; scrollbar-width: thin; }
.h-pub { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0; text-align: left; border: 0; background: none; scroll-snap-align: start; transition: transform 200ms var(--ease-out); }
.h-pub img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio-m); background: var(--panel-3); margin-bottom: 6px; }
.h-pub strong { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-pub .s-precio { font-size: 15px; }
.h-pub .s-tenue { font-size: 12px; }
.h-pub:active { transform: scale(0.97); }

/* ---------- agentes y lo que sigue: sin tarjeta dentro de tarjeta ---------- */
.h-agentes .s-decision { background: var(--panel-2); border: 0; box-shadow: none; }
.h-siguen .s-lista { background: none; border: 0; box-shadow: none; border-radius: 0; }
.h-siguen .s-fila { padding: 12px 0; }
.h-siguen button.s-fila:hover { background: none; }

/* al llegar a Hoy las tarjetas suben en cascada; las gráficas se dibujan */
.escalona > * { animation: h-sube 420ms var(--ease-out) both; }
.escalona > :nth-child(2) { animation-delay: 40ms; } .escalona > :nth-child(3) { animation-delay: 80ms; } .escalona > :nth-child(4) { animation-delay: 120ms; }
.escalona > :nth-child(5) { animation-delay: 160ms; } .escalona > :nth-child(n + 6) { animation-delay: 200ms; }
@keyframes h-sube { from { opacity: 0; transform: translateY(12px); } }
.escalona .h-traza { animation: h-dibuja 800ms var(--ease-out) 200ms both; }
@keyframes h-dibuja { from { stroke-dashoffset: 1; } }
.escalona .h-barra { animation: h-crece 500ms var(--ease-out) both; animation-delay: calc(200ms + var(--i) * 40ms); }
@keyframes h-crece { from { transform: scaleY(0.15); } }
.escalona .h-auto { animation: h-auto 360ms var(--ease-out) both; animation-delay: calc(180ms + var(--i) * 16ms); }
@keyframes h-auto { from { opacity: 0; transform: translateY(3px) scale(0.9); } }

@media (hover: hover) and (pointer: fine) {
  .h-lote:hover, .h-pub:hover { transform: translateY(-4px); }
  .h-lote:hover { box-shadow: var(--sombra-alta); }
  .h-destacado:hover img { transform: scale(1.04); }
  .h-negro:hover i { transform: translateX(2px); }
}

@media (min-width: 640px) {
  .h-datos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .h-banner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
  .h-banner h1 { font-size: 34px; }
}
@media (min-width: 720px) {
  .h-rejilla { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 18px; }
  .h-rejilla > * { grid-column: span 6; }
  .h-rejilla > .h-notis, .h-rejilla > .h-cal { grid-column: span 3; }
  .h-tarjeta { padding: 22px; }
  .h-tira { grid-auto-columns: 196px; }
}
@media (min-width: 1180px) {
  .h-rejilla { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
  .h-rejilla > * { grid-column: span 12; }
  .h-rejilla > .h-banner, .h-rejilla > .h-datos { grid-column: span 8; }
  .h-rejilla > .h-notis { grid-column: 9 / span 4; grid-row: 1 / span 2; }
  .h-rejilla > .h-lote { grid-column: span 7; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); align-items: center; }
  .h-rejilla > .h-cal { grid-column: span 5; }
  .h-rejilla > .h-agentes { grid-column: span 8; }
  .h-rejilla > .h-siguen { grid-column: span 4; }
  .h-dato b { font-size: 34px; }
}
@media (max-width: 440px) { .h-tabs button { padding: 8px 7px; font-size: 12.5px; } .h-tabs button span { margin-left: 3px; } }
@media (max-width: 370px) { .h-tabs button { padding: 8px 6px; font-size: 12px; } }
@media (max-width: 380px) {
  .h-tarjeta { padding: 16px; }
  .h-banner h1 { font-size: 25px; }
  .h-dato { padding: 14px; } .h-dato b { font-size: 26px; }
  .h-semana { gap: 4px; } .h-dia b { font-size: 16px; }
  .h-plano { padding-left: 28px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .escalona > *, .escalona .h-auto { animation: s-fundido 200ms ease both; }
  .escalona .h-traza, .escalona .h-barra { animation: none; }
  .h-notis-lista.cambia { animation: s-fundido 160ms ease both; }
}
