/* ============================================================
   notify-hub.css — Panel › Notificaciones (0072)
   Reutiliza dash-card / dash-stat / ag-tabs / rq-chip de dashboard.css;
   aquí solo lo propio del centro. Móvil primero.
   ============================================================ */

.nh-panel[hidden] { display: none; }

/* --------- Resumen --------- */
.nh-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 16px; }
.nh-stat {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.nh-stat:hover { border-color: var(--ink); }
.nh-stat:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nh-stat .dash-stat__v { display: block; font-size: 1.6rem; }
.nh-stat .dash-stat__l { display: block; }
.nh-stat.is-warn .dash-stat__v { color: #b42318; }
@media (max-width: 560px) {
  .nh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nh-stat { padding: 14px; }
  .nh-stat .dash-stat__v { font-size: 1.35rem; }
}

.nh-tabs { position: sticky; top: calc(var(--dash-top-h, 64px) + 4px); z-index: 3; }

/* --------- Cabeceras de tarjeta con acción --------- */
.nh-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.nh-head .dash-card__hint { margin-bottom: 12px; }
.nh-chips { margin-bottom: 14px; }
.nh-flag { margin: 0 0 14px; }
.nh-foot { margin: 14px 0 0; }

.nh-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fafafa;
  color: var(--ink-soft);
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}
.nh-pill.is-ok, .nh-pill.is-sent { background: #ecfdf3; border-color: #bbf7d0; color: #14532d; }
.nh-pill.is-pending, .nh-pill.is-sending, .nh-pill.is-scheduled { background: #eef4ff; border-color: #c9d8fb; color: #1c3f8a; }
.nh-pill.is-failed, .nh-pill.is-expired { background: #fdecee; border-color: #f7c6cc; color: #8a1020; }
.nh-pill.is-skipped, .nh-pill.is-cancelled, .nh-pill.is-off { background: #f4f4f5; color: var(--muted); }
.nh-pill.is-soon { background: #fff7ed; border-color: #fed7aa; color: #7c2d12; font-weight: 600; }

.nh-empty { list-style: none; padding: 18px 4px; color: var(--muted); font-size: .9rem; }
.nh-err { margin: 6px 0 0; min-height: 1.2em; color: #b42318; font-size: .85rem; }

/* --------- Bandeja --------- */
.nh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nh-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.nh-item:hover { border-color: var(--ink); }
.nh-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nh-item.is-unread { background: #f7f9ff; border-color: #c9d8fb; }
.nh-item.is-unread .nh-item__title::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #2563eb;
  vertical-align: middle;
}
.nh-item__icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #f4f4f5;
  color: var(--ink-soft);
}
.nh-item--citas .nh-item__icon { background: #ecfdf3; color: #14532d; }
.nh-item--solicitudes .nh-item__icon { background: #fff7ed; color: #7c2d12; }
.nh-item--mensajes .nh-item__icon { background: #eef4ff; color: #1c3f8a; }
.nh-item__main { display: grid; gap: 2px; min-width: 0; }
.nh-item__title { font-weight: 700; font-size: .92rem; }
.nh-item__body { color: var(--ink-soft); font-size: .85rem; overflow-wrap: anywhere; }
.nh-item__time { color: var(--muted); font-size: .76rem; white-space: nowrap; }
@media (max-width: 560px) {
  .nh-item { grid-template-columns: 32px minmax(0, 1fr); }
  .nh-item__icon { width: 32px; height: 32px; }
  .nh-item__time { grid-column: 2; }
}

/* --------- Citas y solicitudes --------- */
.nh-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.nh-events li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .7fr) minmax(0, 2fr);
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.nh-events__t { font-weight: 700; }
.nh-events__who { color: var(--ink-soft); font-weight: 600; }
.nh-events__how { color: var(--muted); }
@media (max-width: 760px) {
  .nh-events li { grid-template-columns: 1fr; gap: 2px; }
  .nh-events__who::before { content: "Recibe: "; font-weight: 400; color: var(--muted); }
}

.nh-wa summary { list-style: none; cursor: pointer; display: grid; gap: 2px; }
.nh-wa summary::-webkit-details-marker { display: none; }
.nh-wa summary .dash-card__title::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: .9rem; }
.nh-wa[open] summary .dash-card__title::after { content: "▴"; }
.nh-wa summary .dash-card__hint { margin-bottom: 0; }
.nh-wa[open] summary { margin-bottom: 14px; }

/* --------- Recordatorios --------- */
.nh-rem { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 4px 0 16px; }
.nh-rem__opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nh-rem__opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.nh-rem__opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.nh-rem__txt { display: grid; gap: 2px; }
.nh-rem__txt span { color: var(--muted); font-size: .82rem; }
.nh-rules { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-soft); font-size: .88rem; }

/* --------- Crear mensaje --------- */
.nh-limits { margin: -6px 0 16px; color: var(--muted); font-size: .8rem; }
.nh-compose__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .nh-compose__grid { grid-template-columns: 1fr; } }
.nh-compose__side { position: sticky; top: calc(var(--dash-top-h, 64px) + 64px); display: grid; gap: 8px; }
@media (max-width: 980px) { .nh-compose__side { position: static; } }
.nh-compose .dash-field { position: relative; }
.nh-compose input[type=text], .nh-compose input[type=search], .nh-compose input[type=date],
.nh-compose input[type=time], .nh-compose textarea, .nh-compose select { width: 100%; }
.nh-count { justify-self: end; color: var(--muted); font-size: .74rem; }

.nh-aud, .nh-when { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.nh-aud legend, .nh-when legend {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.nh-aud { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nh-aud legend { grid-column: 1 / -1; }
@media (max-width: 480px) { .nh-aud { grid-template-columns: 1fr; } }
.nh-aud__opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: .86rem;
}
.nh-aud__opt.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.nh-aud__opt input { margin-top: 3px; accent-color: var(--ink); flex: none; }
.nh-aud__opt span { display: grid; gap: 2px; }
.nh-aud__opt span span { color: var(--muted); font-size: .78rem; }
.nh-days { max-width: 260px; }
.nh-aud__info {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f9ff;
  border: 1px solid #c9d8fb;
  font-size: .88rem;
}
.nh-aud__skip { color: var(--muted); font-size: .8rem; }

.nh-pick { margin-bottom: 10px; }
.nh-pick__list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.nh-pick__row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.nh-pick__row:hover { background: #fafafa; }
.nh-pick__row.is-off { cursor: not-allowed; opacity: .7; }
.nh-pick__row input { accent-color: var(--ink); width: 18px; height: 18px; }
.nh-pick__who { display: grid; min-width: 0; font-size: .86rem; }
.nh-pick__who span { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
  .nh-pick__row { grid-template-columns: 22px minmax(0, 1fr); }
  .nh-pick__row .nh-pill { grid-column: 2; justify-self: start; }
}

.nh-when { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.nh-when legend { width: 100%; }
.nh-when__opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: .9rem; cursor: pointer; }
.nh-when__opt input { accent-color: var(--ink); }
.nh-when__row { display: grid; grid-template-columns: 1fr 140px; gap: 10px; width: 100%; }
.nh-when .dash-card__hint { width: 100%; margin: 0; }
@media (max-width: 400px) { .nh-when__row { grid-template-columns: 1fr; } }

.nh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
@media (max-width: 480px) { .nh-actions .dash-btn { flex: 1 1 100%; } }

/* Vista previa (correo + push) */
.nh-prev__label { font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: var(--ink-soft); }
.nh-mail { border: 1px solid var(--line); border-radius: 14px; background: #f4f4f5; padding: 12px; }
.nh-mail__from { display: grid; gap: 1px; margin: 0 4px 10px; font-size: .8rem; }
.nh-mail__from span { color: var(--muted); }
.nh-mail__card { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 18px; display: grid; gap: 8px; }
.nh-mail__card img { height: 28px; width: auto; }
.nh-mail__sender { margin: 6px 0 0; color: #6b6b6b; font-size: .78rem; }
.nh-mail__card h3 { margin: 0; font-family: var(--font-head); font-size: 1.08rem; overflow-wrap: anywhere; }
.nh-mail__card p { margin: 0; font-size: .88rem; line-height: 1.5; color: #262626; overflow-wrap: anywhere; }
.nh-mail__cta { justify-self: start; margin-top: 6px; padding: 10px 18px; border-radius: 999px; background: #0a0a0a; color: #fff; font-weight: 700; font-size: .84rem; }
.nh-mail__card .nh-mail__foot { margin-top: 8px; color: #8a8a8a; font-size: .72rem; }
.nh-push {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.nh-push img { width: 36px; height: 36px; border-radius: 9px; }
.nh-push div { display: grid; min-width: 0; font-size: .84rem; }
.nh-push span { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Growth */
.nh-growth .dash-card__title { flex-wrap: wrap; }
.nh-growth__item { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; font-size: .88rem; }
.nh-growth__item span { color: var(--muted); }

/* Confirmación */
.nh-confirm__dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: .9rem; }
.nh-confirm__dl dt { color: var(--muted); }
.nh-confirm__dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.nh-confirm__ok { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; cursor: pointer; }
.nh-confirm__ok input { margin-top: 3px; accent-color: var(--ink); }

/* --------- Historial --------- */
.nh-camps, .nh-deliv { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nh-camp { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.nh-camp__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.nh-camp__top b { overflow-wrap: anywhere; }
.nh-camp__meta, .nh-camp__skip { color: var(--muted); font-size: .8rem; }
.nh-camp__nums { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; }
.nh-camp__nums .is-bad { color: #b42318; }

.nh-deliv__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  gap: 6px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .86rem;
}
.nh-deliv__main { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.nh-deliv__when { color: var(--ink-soft); }
.nh-deliv__to { color: var(--muted); font-size: .78rem; }
.nh-deliv__err { color: #b42318; font-size: .78rem; }
.nh-deliv__go {
  border: 0;
  background: none;
  padding: 6px 4px;
  color: var(--ink);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.nh-chan { justify-self: start; padding: 3px 8px; border-radius: 8px; background: #f4f4f5; font-size: .72rem; font-weight: 700; color: var(--ink-soft); }
.nh-chan--push { background: #eef4ff; color: #1c3f8a; }
@media (max-width: 640px) {
  .nh-deliv__row { grid-template-columns: minmax(0, 1fr) auto; }
  .nh-chan { grid-column: 1; }
  .nh-deliv__row .nh-pill { grid-column: 2; grid-row: 1; justify-self: end; }
  .nh-deliv__main { grid-column: 1 / -1; }
  .nh-deliv__go { grid-column: 1; justify-self: start; }
}

/* Cita enfocada desde un aviso (#agenda/cita/<id>) */
.appt-row.is-focus { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  .nh-stat, .nh-item { transition: none; }
}
