/* TASALO Miniapp — componentes de la pestaña Tasas. Sin estilos en línea (CSP): todo por clases y variables. */

.slot { display: contents; }
.slot:empty { display: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 1.375rem; height: 1.375rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hd-actions { display: flex; align-items: center; gap: 0.25rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: 50%; background: transparent; color: var(--text2); cursor: pointer;
}
.icon-btn:disabled { opacity: 0.6; cursor: default; }
.icon-btn.spinning .icon { animation: spin 0.8s linear infinite; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0 1rem;
  border: 1px solid var(--border-accent); border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  font: inherit; font-weight: 600; cursor: pointer;
}

/* ---------- Selector de fuente ---------- */
.seg {
  display: flex; gap: 0.25rem; padding: 0.25rem;
  border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface);
}
.seg-btn {
  flex: 1; min-height: 2.5rem; padding: 0 0.5rem;
  border: 0; border-radius: 1.25rem; background: transparent; color: var(--text2);
  font: inherit; font-size: 0.875rem; cursor: pointer;
}
.seg-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ---------- Aviso de datos ---------- */
.notice {
  padding: 0.625rem 0.875rem; border-radius: 12px;
  background: var(--error-bg); color: var(--error); font-size: 0.8125rem;
}

/* ---------- Tarjetas de tasas ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }

.rcard {
  display: flex; flex-direction: column; gap: 0.25rem; min-width: 0;
  padding: 0.875rem; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card);
}
.rc-head { display: flex; align-items: center; gap: 0.375rem; }
.rc-flag { font-size: 1.25rem; }
.rc-code { font-weight: 700; }
.rc-name, .rc-sub { font-size: 0.8125rem; color: var(--text2); overflow-wrap: anywhere; }
.rc-rate { font-size: 1.625rem; font-weight: 700; line-height: 1.2; }
.rc-chg { font-family: var(--font-mono); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.chg-up { color: var(--up); }
.chg-down { color: var(--down); }
.chg-neutral { color: var(--neutral); }

.skeleton { height: 6rem; border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--border); }

.empty { padding: 1.5rem; text-align: center; color: var(--text2); }
.center { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; }

/* ---------- Año y frase ---------- */
.year { display: flex; flex-direction: column; gap: 0.5rem; }
.year-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem; }
.bar { height: 0.5rem; border-radius: 0.25rem; background: var(--accent-soft); overflow: hidden; }
.bar-fill { height: 100%; width: calc(var(--p, 0) * 1%); background: var(--accent); border-radius: 0.25rem; }
.months { display: flex; font-size: 0.6875rem; color: var(--text2); }
.months span { flex: 1; text-align: center; }
.months .on { color: var(--accent); font-weight: 800; }

.label { font-size: 0.75rem; font-weight: 700; color: var(--accent); }
.quote-text { font-style: italic; margin-top: 0.375rem; }

/* ---------- Overlay (imagen de El Toque) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column;
  background: var(--bg); padding-top: var(--safe-top);
}
.ov-head { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; }
.ov-title { font-size: 1.125rem; font-weight: 700; }
.ov-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; padding: 1rem 1rem calc(1rem + var(--safe-bottom)); overflow: auto; text-align: center;
}
.ov-img { max-width: 100%; height: auto; border-radius: 12px; }

/* ---------- Historial (S2): sparkline en tarjetas y detalle ---------- */
.rcard[role="button"] { cursor: pointer; }
.rcard[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rc-spark { margin-top: 0.25rem; }
.spark { display: block; width: 100%; height: 1.75rem; }
.spark-line {
  fill: none; stroke: var(--neutral); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.spark-up .spark-line { stroke: var(--up); }
.spark-down .spark-line { stroke: var(--down); }

.ov-body.top { align-items: stretch; justify-content: flex-start; text-align: left; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: var(--tap); padding: 0 0.875rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text2);
  font: inherit; font-size: 0.875rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--border-accent); color: var(--accent); font-weight: 700; }
.chip:focus-visible, .date-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dh { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; }
.dh-id { min-width: 0; }
.dh-name { font-weight: 700; overflow-wrap: anywhere; }
.dh-big { font-size: 2rem; font-weight: 700; line-height: 1.1; }

.dh-chart { display: flex; flex-direction: column; gap: 0.5rem; }
.chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.ch-area { fill: var(--accent-soft); }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ch-cursor { stroke: var(--border-accent); stroke-width: 1; opacity: 0; }
.ch-cursor.on { opacity: 1; }
.ch-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.dh-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 0.75rem; font-size: 0.8125rem; }
.ch-read { color: var(--text2); }

.dh-list { padding: 0.25rem 1rem; }
.drow {
  display: grid; grid-template-columns: 1fr auto minmax(4.5rem, auto); align-items: center; gap: 0.5rem;
  padding: 0.625rem 0; border-bottom: 1px solid var(--border);
}
.drow:last-child { border-bottom: 0; }
.drow-chg { text-align: right; }
.t2 { color: var(--text2); }

.dh-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.dh-field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.date-input {
  min-height: var(--tap); min-width: 0; padding: 0 0.75rem;
  border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); color: var(--text);
  font: inherit; color-scheme: dark;
}
:root[data-theme="light"] .date-input { color-scheme: light; }

.note { padding: 0.625rem 0.875rem; border-radius: 12px; background: var(--accent-soft); color: var(--text2); font-size: 0.8125rem; }
.skeleton.tall { height: 11rem; }

/* ---------- Calculadora (S4) ---------- */
.conv { display: flex; flex-direction: column; gap: 0.5rem; }
.conv-row { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.cur-select {
  flex: none; max-width: 48%; min-height: 2.75rem; padding: 0 0.75rem;
  border: 1px solid var(--border-accent); border-radius: 1rem; background: var(--accent-soft); color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer;
}
.cur-select:focus-visible, .conv-amount:focus-visible, .inv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.conv-amount {
  flex: 1; min-width: 0; padding: 0.25rem 0; border: 0; background: transparent; color: var(--text);
  font-family: var(--font-mono); font-size: 1.875rem; font-weight: 700; text-align: right;
}
.conv-amount::placeholder { color: var(--text2); }
.conv-result {
  flex: 1; min-width: 0; color: var(--accent); font-size: 1.875rem; font-weight: 700; text-align: right;
  overflow-wrap: anywhere;
}
.conv-sep { display: flex; align-items: center; gap: 0.75rem; }
.conv-line { flex: 1; height: 1px; background: var(--border); }
.conv-unit { margin: 0.25rem 0 0; color: var(--text2); font-size: 0.8125rem; text-align: right; overflow-wrap: anywhere; }
.conv-unit:empty { display: none; }
.inv-head { display: flex; align-items: center; gap: 0.25rem; }
.inv-id { flex: 1; min-width: 0; }
.inv-title { color: var(--accent); font-size: 0.8125rem; font-weight: 700; }
.inv-status { color: var(--text2); font-size: 0.75rem; }
.inv-rows { display: flex; flex-direction: column; }
.inv-row {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 3.25rem; padding: 0.5rem 0;
  border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.inv-cur { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inv-val { font-size: 1.125rem; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.inv-row.on .inv-val { color: var(--accent); }
.clip-fallback { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Blog (S5) ---------- */
.card-accent { border-color: var(--border-accent); }
.post { display: flex; flex-direction: column; gap: 0.25rem; cursor: pointer; }
.post:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-title { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; margin: 0.25rem 0; }
.post .post-title { margin: 0; }
.post-summary {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-actions, .reader-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.post-actions > *, .reader-actions > * { flex: 1 1 8rem; }

.reader { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; min-width: 0; }
.reader-title { font-size: 1.375rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.md-slot { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.md { width: 100%; min-width: 0; overflow-wrap: anywhere; line-height: 1.55; }
.md > * + * { margin-top: 0.75rem; }
.md p { margin: 0; }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 0.25rem 0; }
.md .md-img-fail { color: var(--text2); font-style: italic; }
.md .md-h { line-height: 1.3; margin-top: 1.25rem; }
.md .md-h1 { font-size: 1.25rem; }
.md .md-h2 { font-size: 1.125rem; }
.md .md-h3 { font-size: 1rem; }
.md blockquote { margin: 0; padding: 0.25rem 0 0.25rem 0.875rem; border-left: 3px solid var(--border-accent); color: var(--text2); }
.md ul, .md ol { margin: 0; padding-left: 1.25rem; }
.md li + li { margin-top: 0.25rem; }
.md code { font-family: var(--font-mono); font-size: 0.875em; background: var(--card-high); border-radius: 6px; padding: 0.05rem 0.3rem; }
.md pre { margin: 0; padding: 0.75rem; overflow-x: auto; background: var(--card-high); border-radius: 12px; }
.md pre code { background: transparent; padding: 0; white-space: pre; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
/* Tablas del blog: como en Android, cada columna tiene el ancho de su celda más larga (--cw) y la tabla el suyo
   (--tw); si no cabe en la pantalla se desplaza en horizontal en vez de comprimirse. Las celdas largas se envuelven. */
.md-table {
  max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  border: 1px solid var(--border); border-radius: 8px;
}
.md-table:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.md table { border-collapse: collapse; table-layout: fixed; width: var(--tw); max-width: none; font-size: 0.875rem; }
.md col { width: var(--cw); }
.md th, .md td {
  padding: 0.375rem 0.75rem; vertical-align: top; text-align: start; overflow-wrap: anywhere;
  border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.md tr > :last-child { border-right: 0; }
.md tbody tr:last-child > * { border-bottom: 0; }
.md th { background: var(--card-high); font-weight: 600; }
.md .md-a-center { text-align: center; }
.md .md-a-end { text-align: end; }

/* ---------- Alertas (S6) ---------- */
.alist { display: flex; flex-direction: column; gap: 0.75rem; }
.acard {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.acard:focus-visible, .arow .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acard-main { display: flex; flex-direction: column; gap: 0.125rem; flex: 1; min-width: 0; }
.acard > .icon { flex: none; color: var(--text2); }
.pill {
  flex: none; max-width: 45%; padding: 0.25rem 0.625rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; text-align: center; overflow-wrap: anywhere;
}
.pill-on { background: var(--accent-soft); color: var(--accent); }
.pill-off { border: 1px solid var(--border); color: var(--text2); }
.pill-warn { background: var(--error-bg); color: var(--error); }

.panel { display: flex; flex-direction: column; gap: 1rem; width: 100%; min-width: 0; }
.pfield { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.label-text { font-size: 0.8125rem; font-weight: 700; color: var(--text2); }
.hour-row { display: flex; flex-direction: column; gap: 0.5rem; }
.hour-select { max-width: none; width: 100%; }
.add-slot { display: contents; }
.add-slot[hidden] { display: none; }
.arow { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; }
.arow-main { min-width: 0; overflow-wrap: anywhere; }
.btn.block { width: 100%; }
.btn-ghost.danger { border-color: var(--error); background: var(--error-bg); color: var(--error); }

/* ---------- Mercado (S10): búsqueda por símbolo, top 5 y tarjeta de datos ---------- */
.mk-search { display: flex; gap: 0.5rem; }
.mk-input {
  flex: 1; min-width: 0; min-height: var(--tap); padding: 0 0.875rem;
  border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); color: var(--text);
  font: inherit; text-transform: uppercase;
}
.mk-input::placeholder { text-transform: none; color: var(--text2); }
.mk-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-go { min-width: var(--tap); padding: 0 0.875rem; }
.mk-err { margin: 0; padding: 0 0.25rem; font-size: 0.8125rem; color: var(--error); }
.mk-err[hidden] { display: none; }
.mk-back { align-self: flex-start; }
.mk-stack { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.mk-card { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.mk-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.mk-id { display: flex; flex-direction: column; min-width: 0; }
.mk-symbol { font-size: 1.125rem; font-weight: 700; }
.mk-name { font-size: 0.8125rem; color: var(--text2); overflow-wrap: anywhere; }
.mk-rank, .mk-src {
  padding: 0.125rem 0.625rem; border: 1px solid var(--border-accent); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.mk-price { font-size: 2rem; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.mk-chg { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.mk-chg-item { display: flex; flex-direction: column; gap: 0.125rem; font-size: 0.875rem; }
.mk-label { font-size: 0.8125rem; color: var(--text2); }
.mk-rows { display: flex; flex-direction: column; margin: 0; }
.mk-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
  padding: 0.625rem 0; border-top: 1px solid var(--border);
}
.mk-val { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.mk-sub { display: block; font-size: 0.75rem; color: var(--text2); font-family: inherit; }
.mk-ai-p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.mk-ai-hint, .mk-ai-wait { margin: 0; font-size: 0.875rem; color: var(--text2); }

/* ---------- Perfil (plan Perfil, P2): tarjeta de usuario y encabezado de «Mis avisos» ---------- */
.pf-card { display: flex; flex-direction: column; gap: 0.875rem; min-width: 0; }
.pf-head { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.pf-avatar {
  position: relative; flex: none; display: grid; place-items: center; overflow: hidden;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--border-accent);
  color: var(--accent); font-size: 1.5rem; font-weight: 700;
}
.pf-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-id { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.pf-name { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pf-handle { margin: 0; overflow-wrap: anywhere; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.pf-tag {
  padding: 0.25rem 0.625rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.pf-tag-plain { border: 1px solid var(--border); color: var(--text2); }
.pf-tag-accent { border: 1px solid var(--border-accent); background: var(--accent-soft); color: var(--accent); }
.pf-avisos { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }

a.icon-btn { text-decoration: none; }
a.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Ajustes (plan Perfil, P3) ---------- */
.sub-back { margin-bottom: 0.25rem; }
.aj-card { display: flex; flex-direction: column; gap: 0.875rem; min-width: 0; }
.aj-row { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.aj-label { display: flex; flex-direction: column; gap: 0.125rem; }
.aj-label > span:first-child { font-weight: 600; }
.aj-preview { display: flex; gap: 1rem; margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.aj-up { color: var(--up); }
.aj-down { color: var(--down); }
/* Mercado con convención propia (Ajustes → Mercado). Sin atributo = hereda la de Tasas. Sin ciclos: se parte de --red/--green. */
:root[data-market-up="red"] .mk-stack,
:root[data-market-up="red"] .aj-mk { --up: var(--red); --down: var(--green); }
:root[data-market-up="green"] .mk-stack,
:root[data-market-up="green"] .aj-mk { --up: var(--green); --down: var(--red); }
.aj-toggle { width: 100%; }
.aj-panel { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.aj-panel[hidden] { display: none; }
.aj-coins { display: flex; flex-direction: column; }
.aj-coin {
  display: flex; align-items: center; gap: 0.625rem; min-height: var(--tap); padding: 0 0.25rem;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.aj-coin:last-child { border-bottom: 0; }
.aj-coin-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aj-check { flex: none; width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.aj-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Estado y estadísticas (plan Perfil, P4): barras con ancho por variable CSS, sin estilos en línea ---------- */
.ad-body { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.ad-card { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.ad-sub { margin: 0.25rem 0 0; font-size: 0.8125rem; font-weight: 700; color: var(--text2); }
.ad-health { display: flex; align-items: center; gap: 0.75rem; }
.ad-health-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.ad-dot { flex: none; width: 0.875rem; height: 0.875rem; border-radius: 50%; box-sizing: border-box; }
.ad-dot-ok { background: var(--green); }
.ad-dot-bad { background: var(--error); }
.ad-dot-warn { border: 3px solid var(--error); }
.ad-dot-unknown { border: 3px solid var(--text2); }
.ad-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.ad-kpi { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.ad-kpi-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ad-bars { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.ad-bar-row { display: grid; grid-template-columns: minmax(3.5rem, 28%) 1fr auto; align-items: center; gap: 0.5rem; min-width: 0; }
.ad-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; }
.ad-bar-track { display: block; height: 0.5rem; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.ad-bar { display: block; height: 100%; width: var(--w, 0%); border-radius: 999px; background: var(--accent); }
.ad-bar-value { font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--text2); text-align: right; }
.ad-stack { display: flex; height: 0.75rem; border-radius: 999px; overflow: hidden; background: var(--accent-soft); }
.ad-seg { display: block; height: 100%; width: var(--w, 0%); }
.ad-seg-0 { background: var(--accent); }
.ad-seg-1 { background: var(--text2); }
.ad-seg-2 { background: var(--green); }
.ad-seg-3 { background: var(--red); }
.ad-seg-4 { background: var(--border-accent); }
.ad-legend { display: flex; flex-direction: column; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.ad-legend li { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.ad-swatch { flex: none; width: 0.625rem; height: 0.625rem; border-radius: 3px; }
.ad-legend-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }
.ad-jobs { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.ad-jobs li { display: flex; flex-direction: column; gap: 0.125rem; }
.ad-job-name { font-size: 0.875rem; font-weight: 600; }
.ad-job-err { overflow-wrap: anywhere; }
.ad-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.ad-day { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.ad-day-bar-wrap { display: flex; align-items: flex-end; width: 100%; height: 3.5rem; border-radius: 6px; background: var(--accent-soft); overflow: hidden; }
.ad-day-bar { display: block; width: 100%; height: var(--h, 0%); background: var(--accent); }

/* Novedades (Ajustes, P5) */
.nv-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.nv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.nv-item { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.9rem; border-top: 1px solid var(--border, rgba(127, 127, 127, 0.25)); }
.nv-item:first-child { border-top: 0; padding-top: 0; }
.nv-item-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.nv-title { font-weight: 600; overflow-wrap: anywhere; }
.nv-text { overflow-wrap: anywhere; }
.nv-text > :first-child { margin-top: 0.25rem; }
.nv-text > :last-child { margin-bottom: 0; }
