/* =========================================================
   WIRTZ HUB · NOTIFICACIONES
   CSS completo
   Premium · Minimalista · Responsive · Dark safe
   ========================================================= */

/* =========================================================
   RESET LOCAL
   ========================================================= */

.notificaciones-page,
.notificaciones-page *,
.notificaciones-modal,
.notificaciones-modal * {
  box-sizing: border-box;
  font-family:
    "ATF Franklin Gothic",
    "Franklin Gothic Medium",
    "Arial Narrow",
    Arial,
    sans-serif !important;
}

.notificaciones-page button,
.notificaciones-modal button,
.notificaciones-page input,
.notificaciones-modal input,
.notificaciones-page select,
.notificaciones-modal select,
.notificaciones-page textarea,
.notificaciones-modal textarea {
  font: inherit;
}

.notificaciones-page button,
.notificaciones-modal button,
.notificaciones-page label {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   VARIABLES
   ========================================================= */

.notificaciones-page {
  --ntf-surface: rgba(255, 255, 255, 0.97);
  --ntf-surface-soft: rgba(248, 250, 252, 0.96);
  --ntf-surface-strong: #ffffff;
  --ntf-surface-hover: rgba(15, 23, 42, 0.045);

  --ntf-border: rgba(15, 23, 42, 0.1);
  --ntf-border-strong: rgba(15, 23, 42, 0.16);

  --ntf-text: #111827;
  --ntf-text-strong: #030712;
  --ntf-muted: #6b7280;
  --ntf-muted-soft: #9ca3af;

  --ntf-primary: #111827;
  --ntf-primary-hover: #030712;

  --ntf-purple: #7c3aed;
  --ntf-blue: #2563eb;
  --ntf-green: #16a34a;
  --ntf-orange: #ea580c;
  --ntf-red: #dc2626;
  --ntf-cyan: #0891b2;

  --ntf-radius-xl: 18px;
  --ntf-radius-lg: 15px;
  --ntf-radius-md: 12px;
  --ntf-radius-sm: 10px;

  --ntf-shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 10px 28px rgba(15, 23, 42, 0.045);

  --ntf-shadow-soft:
    0 10px 26px rgba(15, 23, 42, 0.055);

  --ntf-shadow-modal:
    0 34px 110px rgba(15, 23, 42, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;

  --ntf-transition: 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);

  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;

  width: 100%;
  min-width: 0;
  height: calc(100vh - var(--topbar-height, 52px) - 54px);
  min-height: 0;

  color: var(--ntf-text);
  overflow: hidden;

  animation: notificacionesPageIn 0.22s var(--ntf-transition) both;
}

html[data-theme="dark"] .notificaciones-page {
  --ntf-surface: rgba(12, 12, 12, 0.97);
  --ntf-surface-soft: rgba(18, 18, 18, 0.96);
  --ntf-surface-strong: rgba(8, 8, 8, 0.98);
  --ntf-surface-hover: rgba(255, 255, 255, 0.055);

  --ntf-border: rgba(255, 255, 255, 0.105);
  --ntf-border-strong: rgba(255, 255, 255, 0.16);

  --ntf-text: rgba(255, 255, 255, 0.92);
  --ntf-text-strong: rgba(255, 255, 255, 0.98);
  --ntf-muted: rgba(255, 255, 255, 0.54);
  --ntf-muted-soft: rgba(255, 255, 255, 0.36);

  --ntf-primary: rgba(255, 255, 255, 0.92);
  --ntf-primary-hover: rgba(255, 255, 255, 0.82);

  --ntf-purple: #a78bfa;
  --ntf-blue: #60a5fa;
  --ntf-green: #4ade80;
  --ntf-orange: #fb923c;
  --ntf-red: #f87171;
  --ntf-cyan: #22d3ee;

  --ntf-shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.045) inset,
    0 14px 34px rgba(0, 0, 0, 0.32);

  --ntf-shadow-soft:
    0 14px 34px rgba(0, 0, 0, 0.34);

  --ntf-shadow-modal:
    0 34px 110px rgba(0, 0, 0, 0.62),
    0 1px 0 rgba(255, 255, 255, 0.055) inset;
}

/* =========================================================
   BLOQUES BASE
   ========================================================= */

.notificaciones-hero,
.notificaciones-layout,
.notificaciones-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  border: 1px solid var(--ntf-border);
  border-radius: var(--ntf-radius-xl);
  background: var(--ntf-surface);
  box-shadow: var(--ntf-shadow-card);

  overflow: hidden;

  transition:
    background var(--ntf-transition),
    border-color var(--ntf-transition),
    box-shadow var(--ntf-transition);
}

.notificaciones-hero:hover,
.notificaciones-layout:hover {
  border-color: color-mix(in srgb, var(--ntf-border-strong) 78%, var(--ntf-purple));
}

/* =========================================================
   HERO
   ========================================================= */

.notificaciones-hero {
  display: grid;
  grid-template-rows: auto auto;
  gap: 9px;

  min-height: auto;
  padding: 11px 13px;

  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--ntf-purple) 6%, transparent), transparent 34%),
    var(--ntf-surface);
}

.notificaciones-hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;

  min-width: 0;
}

.notificaciones-hero__main {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
}

.notificaciones-hero__icon {
  display: grid;
  place-items: center;

  width: 40px;
  height: 40px;
  min-width: 40px;

  border: 1px solid color-mix(in srgb, var(--ntf-purple) 34%, var(--ntf-border));
  border-radius: 13px;
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--ntf-purple) 20%, transparent), transparent 44%),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--ntf-purple) 12%, transparent),
      color-mix(in srgb, var(--ntf-blue) 6%, transparent)
    );

  color: var(--ntf-purple);

  transition:
    transform var(--ntf-transition),
    border-color var(--ntf-transition),
    filter var(--ntf-transition);
}

.notificaciones-hero:hover .notificaciones-hero__icon {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ntf-purple) 48%, var(--ntf-border));
  filter: saturate(1.08);
}

.notificaciones-hero__icon .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.15;
}

.notificaciones-hero__copy {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.notificaciones-hero__copy span,
.notificaciones-card__head span,
.notificaciones-detail__identity span,
.notificaciones-message-card span,
.notificaciones-metadata-card span,
.notificaciones-url-card span,
.notificaciones-field span,
.notificaciones-modal__head span {
  color: var(--ntf-muted);

  font-size: 7.2px;
  font-weight: 950;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.notificaciones-hero__copy h1 {
  margin: 0;

  color: var(--ntf-text-strong);

  font-size: 21px;
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: -0.06em;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notificaciones-hero__copy p {
  margin: 0;

  color: var(--ntf-muted);

  font-size: 8.8px;
  font-weight: 760;
  line-height: 1.22;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notificaciones-hero__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;

  min-width: 0;
}

.notificaciones-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;

  min-width: 0;
}

.notificaciones-stat {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;

  min-width: 0;
  min-height: 38px;
  padding: 6px 8px;

  border: 1px solid var(--ntf-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ntf-surface-soft) 88%, transparent);

  transition:
    background var(--ntf-transition),
    border-color var(--ntf-transition),
    transform var(--ntf-transition);
}

.notificaciones-stat:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--ntf-purple) 5%, var(--ntf-surface-soft));
  border-color: color-mix(in srgb, var(--ntf-purple) 25%, var(--ntf-border));
}

.notificaciones-stat__icon {
  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  border-radius: 10px;
  background: color-mix(in srgb, currentColor 8%, transparent);

  color: var(--ntf-purple);
}

.notificaciones-stat__icon .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.notificaciones-stat__copy {
  display: grid;
  gap: 2px;

  min-width: 0;
}

.notificaciones-stat__copy small {
  color: var(--ntf-muted);

  font-size: 6.8px;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notificaciones-stat__copy strong {
  color: var(--ntf-text-strong);

  font-size: 13px;
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: -0.045em;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notificaciones-stat__copy em {
  color: var(--ntf-muted-soft);

  font-size: 6.9px;
  font-style: normal;
  font-weight: 780;
  line-height: 1;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notificaciones-stat.is-green .notificaciones-stat__icon,
.notificaciones-stat.is-green .notificaciones-stat__copy strong {
  color: var(--ntf-green);
}

.notificaciones-stat.is-purple .notificaciones-stat__icon,
.notificaciones-stat.is-purple .notificaciones-stat__copy strong {
  color: var(--ntf-purple);
}

.notificaciones-stat.is-blue .notificaciones-stat__icon,
.notificaciones-stat.is-blue .notificaciones-stat__copy strong {
  color: var(--ntf-blue);
}

.notificaciones-stat.is-orange .notificaciones-stat__icon,
.notificaciones-stat.is-orange .notificaciones-stat__copy strong {
  color: var(--ntf-orange);
}

.notificaciones-stat.is-red .notificaciones-stat__icon,
.notificaciones-stat.is-red .notificaciones-stat__copy strong {
  color: var(--ntf-red);
}

/* =========================================================
   BOTONES
   ========================================================= */

.notificaciones-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 30px;
  padding: 0 10px;

  border: 1px solid var(--ntf-border-strong);
  border-radius: 10px;
  background: transparent;

  color: var(--ntf-text);

  font-size: 9.2px;
  font-weight: 860;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;
  outline: none;

  transition:
    background var(--ntf-transition),
    border-color var(--ntf-transition),
    color var(--ntf-transition),
    transform var(--ntf-transition),
    opacity var(--ntf-transition),
    box-shadow var(--ntf-transition);
}

.notificaciones-action:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ntf-text) 24%, transparent);
  background: var(--ntf-surface-hover);
}

.notificaciones-action:active,
.notificaciones-icon-btn:active {
  transform: scale(0.98);
}

.notificaciones-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.notificaciones-action--primary {
  border-color: var(--ntf-primary);
  background: var(--ntf-primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.notificaciones-action--primary:hover {
  border-color: var(--ntf-primary-hover);
  background: var(--ntf-primary-hover);
  color: #ffffff;
}

html[data-theme="dark"] .notificaciones-action--primary {
  color: #080808;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .notificaciones-action--primary:hover {
  color: #080808;
}

.notificaciones-page .icon,
.notificaciones-modal .icon,
.notificaciones-action .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.15;
}

.notificaciones-icon-btn {
  display: grid;
  place-items: center;

  width: 30px;
  height: 30px;
  min-width: 30px;

  border: 1px solid var(--ntf-border-strong);
  border-radius: 10px;
  background: transparent;

  color: var(--ntf-text);

  cursor: pointer;
  outline: none;

  transition:
    background var(--ntf-transition),
    border-color var(--ntf-transition),
    color var(--ntf-transition),
    transform var(--ntf-transition);
}

.notificaciones-icon-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ntf-purple) 36%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-purple) 8%, transparent);
  color: var(--ntf-purple);
}

.notificaciones-icon-btn.is-active {
  border-color: color-mix(in srgb, var(--ntf-purple) 42%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-purple) 12%, transparent);
  color: var(--ntf-purple);
}

.notificaciones-icon-btn--danger:hover {
  border-color: color-mix(in srgb, var(--ntf-red) 42%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-red) 9%, transparent);
  color: var(--ntf-red);
}

/* =========================================================
   LAYOUT
   ========================================================= */

.notificaciones-layout {
  display: grid;
  grid-template-columns: minmax(315px, 390px) minmax(0, 1fr);

  min-width: 0;
  min-height: 0;
  background: var(--ntf-surface);
}

.notificaciones-sidebar {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;

  min-width: 0;
  min-height: 0;

  border-right: 1px solid var(--ntf-border);
}

.notificaciones-detail {
  display: grid;

  min-width: 0;
  min-height: 0;

  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--ntf-purple) 5%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.018), transparent 28%);
}

html[data-theme="dark"] .notificaciones-detail {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--ntf-purple) 10%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%);
}

/* =========================================================
   TOOLBAR / FILTROS
   ========================================================= */

.notificaciones-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;

  padding: 9px;
  border-bottom: 1px solid var(--ntf-border);
}

.notificaciones-search {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;
  height: 31px;
  padding: 0 10px;

  border: 1px solid var(--ntf-border);
  border-radius: 10px;
  background: var(--ntf-surface-soft);

  color: var(--ntf-muted);

  transition:
    border-color var(--ntf-transition),
    background var(--ntf-transition);
}

.notificaciones-search:focus-within {
  border-color: color-mix(in srgb, var(--ntf-purple) 38%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-purple) 6%, var(--ntf-surface-soft));
}

.notificaciones-search input {
  width: 100%;
  min-width: 0;

  border: 0;
  outline: 0;
  background: transparent;

  color: var(--ntf-text);

  font-size: 9.4px;
  font-weight: 850;
}

.notificaciones-search input::placeholder {
  color: var(--ntf-muted-soft);
}

.notificaciones-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 31px;
  padding: 0 10px;

  border: 1px solid var(--ntf-border);
  border-radius: 10px;
  background: transparent;

  color: var(--ntf-text);

  font-size: 8.8px;
  font-weight: 900;

  cursor: pointer;

  transition:
    background var(--ntf-transition),
    border-color var(--ntf-transition),
    color var(--ntf-transition),
    transform var(--ntf-transition);
}

.notificaciones-filter:hover,
.notificaciones-filter.is-active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ntf-purple) 36%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-purple) 8%, transparent);
  color: var(--ntf-purple);
}

.notificaciones-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;

  padding: 9px;

  border-bottom: 1px solid var(--ntf-border);
  background: color-mix(in srgb, var(--ntf-surface-soft) 70%, transparent);
}

.notificaciones-filters label {
  display: grid;
  gap: 5px;

  min-width: 0;
}

.notificaciones-filters label span {
  color: var(--ntf-muted);

  font-size: 6.8px;
  font-weight: 950;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.notificaciones-filters select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;

  border: 1px solid var(--ntf-border);
  border-radius: 10px;
  background: var(--ntf-surface);
  color: var(--ntf-text);

  font-size: 8.7px;
  font-weight: 850;

  outline: none;

  transition:
    border-color var(--ntf-transition),
    background var(--ntf-transition);
}

.notificaciones-filters select:focus {
  border-color: color-mix(in srgb, var(--ntf-purple) 38%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-purple) 6%, var(--ntf-surface));
}

/* =========================================================
   ALERTA
   ========================================================= */

.notificaciones-alert {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 8px 9px 0;
  padding: 8px 9px;

  border: 1px solid color-mix(in srgb, var(--ntf-red) 32%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--ntf-red) 8%, transparent);

  color: var(--ntf-red);

  font-size: 9px;
  font-weight: 850;
  line-height: 1.3;
}

/* =========================================================
   LISTA
   ========================================================= */

.notificaciones-list {
  display: grid;
  align-content: start;
  gap: 6px;

  min-height: 0;
  padding: 7px;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ntf-muted) 24%, transparent) transparent;
}

.notificaciones-list::-webkit-scrollbar,
.notificaciones-detail__body::-webkit-scrollbar,
.notificaciones-modal__body::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.notificaciones-list::-webkit-scrollbar-thumb,
.notificaciones-detail__body::-webkit-scrollbar-thumb,
.notificaciones-modal__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--ntf-muted) 26%, transparent);
}

.notificaciones-list__item {
  position: relative;

  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;

  width: 100%;
  min-height: 74px;
  padding: 8px;

  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;

  color: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    background var(--ntf-transition),
    border-color var(--ntf-transition),
    transform var(--ntf-transition),
    opacity var(--ntf-transition);
}

.notificaciones-list__item:hover {
  background: var(--ntf-surface-hover);
}

.notificaciones-list__item.is-active {
  border-color: color-mix(in srgb, var(--ntf-purple) 32%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-purple) 8%, transparent);
}

.notificaciones-list__item.is-read {
  opacity: 0.74;
}

.notificaciones-list__item.is-unread {
  opacity: 1;
}

.notificaciones-list__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;

  width: 3px;
  border-radius: 999px;

  background: transparent;
}

.notificaciones-list__item.is-unread::before {
  background: var(--ntf-purple);
}

.notificaciones-list__item.priority-alta::before {
  background: var(--ntf-orange);
}

.notificaciones-list__item.priority-urgente::before {
  background: var(--ntf-red);
}

.notificaciones-list__icon {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;
  min-width: 34px;

  border: 1px solid color-mix(in srgb, var(--ntf-purple) 24%, var(--ntf-border));
  border-radius: 12px;
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--ntf-purple) 18%, transparent), transparent 48%),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--ntf-purple) 10%, transparent),
      color-mix(in srgb, var(--ntf-blue) 5%, transparent)
    );

  color: var(--ntf-purple);
}

.notificaciones-list__item.is-success .notificaciones-list__icon {
  border-color: color-mix(in srgb, var(--ntf-green) 28%, var(--ntf-border));
  color: var(--ntf-green);
}

.notificaciones-list__item.is-warning .notificaciones-list__icon,
.notificaciones-list__item.priority-alta .notificaciones-list__icon {
  border-color: color-mix(in srgb, var(--ntf-orange) 28%, var(--ntf-border));
  color: var(--ntf-orange);
}

.notificaciones-list__item.is-danger .notificaciones-list__icon,
.notificaciones-list__item.priority-urgente .notificaciones-list__icon {
  border-color: color-mix(in srgb, var(--ntf-red) 28%, var(--ntf-border));
  color: var(--ntf-red);
}

.notificaciones-list__icon .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.15;
}

.notificaciones-list__copy {
  display: grid;
  align-content: center;
  gap: 5px;

  min-width: 0;
}

.notificaciones-list__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  min-width: 0;
}

.notificaciones-list__top strong {
  min-width: 0;

  color: var(--ntf-text-strong);
  font-size: 10px;
  font-weight: 950;
  line-height: 1.08;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notificaciones-list__top small {
  flex: 0 0 auto;

  color: var(--ntf-muted);
  font-size: 7.3px;
  font-weight: 800;
  line-height: 1;
}

.notificaciones-list__message {
  min-width: 0;

  color: var(--ntf-muted);
  font-size: 8.6px;
  font-weight: 760;
  line-height: 1.25;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notificaciones-list__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;

  min-width: 0;
}

.notificaciones-list__meta em {
  display: inline-flex;
  align-items: center;

  min-height: 17px;
  padding: 0 6px;

  border: 1px solid var(--ntf-border);
  border-radius: 999px;
  background: var(--ntf-surface-soft);

  color: var(--ntf-muted);

  font-size: 6.8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.notificaciones-list__flags {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;

  min-width: 16px;
}

.notificaciones-list__flags .icon {
  width: 11px;
  height: 11px;
  color: var(--ntf-muted);
}

.notificaciones-list__flags b {
  width: 7px;
  height: 7px;

  border-radius: 999px;
  background: var(--ntf-purple);
}

/* =========================================================
   EMPTY / LOADING
   ========================================================= */

.notificaciones-empty,
.notificaciones-detail__empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;

  min-height: 100%;
  padding: 24px;

  color: var(--ntf-muted);
  text-align: center;
}

.notificaciones-empty .icon,
.notificaciones-detail__empty .icon {
  width: 34px;
  height: 34px;
  color: var(--ntf-muted);
}

.notificaciones-empty h3,
.notificaciones-detail__empty h3 {
  margin: 4px 0 0;

  color: var(--ntf-text-strong);

  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.notificaciones-empty p,
.notificaciones-detail__empty p {
  max-width: 360px;
  margin: 0;

  color: var(--ntf-muted);

  font-size: 10px;
  font-weight: 760;
  line-height: 1.36;
}

/* =========================================================
   PAGINACIÓN
   ========================================================= */

.notificaciones-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  min-height: 44px;
  padding: 7px 9px;

  border-top: 1px solid var(--ntf-border);
}

.notificaciones-pagination > span {
  color: var(--ntf-muted);

  font-size: 8.4px;
  font-weight: 850;
  white-space: nowrap;
}

.notificaciones-pagination > span strong {
  color: var(--ntf-text-strong);
  font-weight: 950;
}

/* =========================================================
   DETALLE
   ========================================================= */

.notificaciones-detail__content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);

  min-width: 0;
  min-height: 0;
}

.notificaciones-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  min-height: 74px;
  padding: 12px 14px;

  border-bottom: 1px solid var(--ntf-border);
  background: var(--ntf-surface);
}

.notificaciones-detail__identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  min-width: 0;
}

.notificaciones-detail__icon {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;
  min-width: 42px;

  border: 1px solid color-mix(in srgb, var(--ntf-purple) 30%, var(--ntf-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--ntf-purple) 9%, transparent);

  color: var(--ntf-purple);
}

.notificaciones-detail__content.is-success .notificaciones-detail__icon {
  border-color: color-mix(in srgb, var(--ntf-green) 30%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-green) 9%, transparent);
  color: var(--ntf-green);
}

.notificaciones-detail__content.is-warning .notificaciones-detail__icon,
.notificaciones-detail__content.priority-alta .notificaciones-detail__icon {
  border-color: color-mix(in srgb, var(--ntf-orange) 30%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-orange) 9%, transparent);
  color: var(--ntf-orange);
}

.notificaciones-detail__content.is-danger .notificaciones-detail__icon,
.notificaciones-detail__content.priority-urgente .notificaciones-detail__icon {
  border-color: color-mix(in srgb, var(--ntf-red) 30%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-red) 9%, transparent);
  color: var(--ntf-red);
}

.notificaciones-detail__icon .icon {
  width: 18px;
  height: 18px;
}

.notificaciones-detail__identity > div {
  min-width: 0;
}

.notificaciones-detail__identity h2 {
  margin: 4px 0 0;

  color: var(--ntf-text-strong);

  font-size: 18px;
  font-weight: 950;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.notificaciones-detail__identity p {
  max-width: 720px;
  margin: 6px 0 0;

  color: var(--ntf-muted);

  font-size: 10.2px;
  font-weight: 760;
  line-height: 1.34;
}

.notificaciones-detail__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;

  flex: 0 0 auto;
}

.notificaciones-detail__body {
  display: grid;
  align-content: start;
  gap: 10px;

  min-height: 0;
  padding: 12px;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ntf-muted) 24%, transparent) transparent;
}

.notificaciones-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.notificaciones-info-grid div,
.notificaciones-message-card,
.notificaciones-metadata-card,
.notificaciones-url-card {
  min-width: 0;

  border: 1px solid var(--ntf-border);
  border-radius: 14px;
  background: var(--ntf-surface);
  box-shadow: var(--ntf-shadow-card);
}

.notificaciones-info-grid div {
  display: grid;
  gap: 5px;

  min-height: 58px;
  padding: 9px;
}

.notificaciones-info-grid small {
  color: var(--ntf-muted);

  font-size: 6.9px;
  font-weight: 950;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.notificaciones-info-grid strong {
  min-width: 0;

  color: var(--ntf-text-strong);

  font-size: 10.6px;
  font-weight: 950;
  line-height: 1.15;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notificaciones-url-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px;
}

.notificaciones-url-card div {
  display: grid;
  gap: 5px;

  min-width: 0;
}

.notificaciones-url-card strong {
  min-width: 0;

  color: var(--ntf-text-strong);

  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notificaciones-message-card,
.notificaciones-metadata-card {
  display: grid;
  gap: 8px;

  padding: 12px;
}

.notificaciones-message-card p {
  margin: 0;

  color: var(--ntf-text);

  font-size: 11.2px;
  font-weight: 760;
  line-height: 1.42;
  white-space: pre-wrap;
}

.notificaciones-metadata-card pre {
  max-height: 280px;
  margin: 0;
  padding: 10px;

  border: 1px solid var(--ntf-border);
  border-radius: 12px;
  background: var(--ntf-surface-soft);

  color: var(--ntf-muted);

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace !important;
  font-size: 9.2px;
  font-weight: 700;
  line-height: 1.45;

  overflow: auto;
}

/* =========================================================
   MODAL
   ========================================================= */

.notificaciones-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: grid;
  place-items: center;

  padding: 18px;

  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px) saturate(0.92);
  -webkit-backdrop-filter: blur(14px) saturate(0.92);

  animation: notificacionesModalBackdropIn 0.16s var(--ntf-transition) both;
}

.notificaciones-modal__card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);

  width: min(680px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);

  border: 1px solid var(--ntf-border-strong);
  border-radius: 20px;
  background: var(--ntf-surface);
  color: var(--ntf-text);
  box-shadow: var(--ntf-shadow-modal);

  overflow: hidden;

  animation: notificacionesModalIn 0.2s var(--ntf-transition) both;
}

.notificaciones-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  min-height: 70px;
  padding: 14px 16px;

  border-bottom: 1px solid var(--ntf-border);
  background: var(--ntf-surface-soft);
}

.notificaciones-modal__head h3 {
  margin: 4px 0 0;

  color: var(--ntf-text-strong);

  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

.notificaciones-modal__head p {
  margin: 5px 0 0;

  color: var(--ntf-muted);

  font-size: 9.4px;
  font-weight: 760;
  line-height: 1.25;
}

.notificaciones-modal__close {
  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;

  border: 1px solid var(--ntf-border-strong);
  border-radius: 12px;
  background: var(--ntf-surface);

  color: var(--ntf-text);

  cursor: pointer;

  transition:
    background var(--ntf-transition),
    border-color var(--ntf-transition),
    transform var(--ntf-transition);
}

.notificaciones-modal__close:hover {
  transform: translateY(-1px);
  background: var(--ntf-surface-hover);
  border-color: color-mix(in srgb, var(--ntf-text) 24%, transparent);
}

.notificaciones-modal__body {
  display: grid;
  align-content: start;
  gap: 11px;

  min-height: 0;
  padding: 14px;

  overflow-y: auto;
  overflow-x: hidden;
}

.notificaciones-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.notificaciones-field {
  display: grid;
  gap: 7px;

  min-width: 0;
}

.notificaciones-field input,
.notificaciones-field select,
.notificaciones-field textarea {
  width: 100%;
  min-width: 0;

  border: 1px solid var(--ntf-border);
  border-radius: 13px;
  background: var(--ntf-surface-soft);

  color: var(--ntf-text);

  font-size: 10.8px;
  font-weight: 820;

  outline: none;

  transition:
    border-color var(--ntf-transition),
    background var(--ntf-transition);
}

.notificaciones-field input,
.notificaciones-field select {
  height: 38px;
  padding: 0 10px;
}

.notificaciones-field textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.notificaciones-field input:focus,
.notificaciones-field select:focus,
.notificaciones-field textarea:focus {
  border-color: color-mix(in srgb, var(--ntf-purple) 38%, var(--ntf-border));
  background: color-mix(in srgb, var(--ntf-purple) 7%, var(--ntf-surface-soft));
}

.notificaciones-field input::placeholder,
.notificaciones-field textarea::placeholder {
  color: var(--ntf-muted-soft);
}

.notificaciones-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  padding-top: 4px;
}

/* =========================================================
   LOADING CARD
   ========================================================= */

.notificaciones-card {
  display: grid;
  gap: 12px;

  padding: 14px;
}

.notificaciones-card--loading {
  min-height: 120px;
}

.notificaciones-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notificaciones-card__head h3 {
  margin: 3px 0 0;

  color: var(--ntf-text-strong);

  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1120px) {
  .notificaciones-layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }

  .notificaciones-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .notificaciones-page {
    height: auto;
    min-height: calc(100vh - var(--topbar-height, 52px) - 54px);
    overflow: visible;
  }

  .notificaciones-hero__top {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .notificaciones-hero__actions {
    justify-content: flex-start;
  }

  .notificaciones-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notificaciones-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .notificaciones-sidebar {
    min-height: 430px;
    max-height: 520px;
    border-right: 0;
    border-bottom: 1px solid var(--ntf-border);
  }

  .notificaciones-detail {
    min-height: 540px;
  }
}

@media (max-width: 680px) {
  .notificaciones-page {
    gap: 8px;
  }

  .notificaciones-hero,
  .notificaciones-layout {
    border-radius: 15px;
  }

  .notificaciones-hero {
    padding: 10px;
  }

  .notificaciones-hero__main {
    align-items: flex-start;
  }

  .notificaciones-hero__copy h1 {
    font-size: 20px;
  }

  .notificaciones-hero__copy p {
    font-size: 8.8px;
    white-space: normal;
  }

  .notificaciones-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .notificaciones-hero__actions .notificaciones-action,
  .notificaciones-action {
    width: 100%;
    min-height: 33px;
  }

  .notificaciones-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .notificaciones-stat {
    min-height: 40px;
  }

  .notificaciones-toolbar {
    grid-template-columns: 1fr;
  }

  .notificaciones-filter {
    width: 100%;
  }

  .notificaciones-filters {
    grid-template-columns: 1fr;
  }

  .notificaciones-sidebar {
    max-height: 520px;
  }

  .notificaciones-list__item {
    min-height: 78px;
  }

  .notificaciones-detail {
    min-height: 520px;
  }

  .notificaciones-detail__head {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 11px;
  }

  .notificaciones-detail__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .notificaciones-detail__body {
    padding: 10px;
  }

  .notificaciones-info-grid {
    grid-template-columns: 1fr;
  }

  .notificaciones-url-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .notificaciones-modal {
    padding: 8px;
  }

  .notificaciones-modal__card {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .notificaciones-modal__head {
    min-height: auto;
    padding: 12px;
  }

  .notificaciones-modal__head p {
    display: none;
  }

  .notificaciones-modal__body {
    padding: 10px;
  }

  .notificaciones-form-grid {
    grid-template-columns: 1fr;
  }

  .notificaciones-modal__footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .notificaciones-modal__footer .notificaciones-action {
    width: 100%;
  }

  .notificaciones-pagination {
    display: grid;
    grid-template-columns: 1fr;
  }

  .notificaciones-pagination > span {
    text-align: center;
  }
}

@media (max-width: 420px) {
  .notificaciones-hero,
  .notificaciones-layout {
    border-radius: 13px;
  }

  .notificaciones-hero__icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 12px;
  }

  .notificaciones-hero__copy h1 {
    font-size: 18px;
  }

  .notificaciones-hero__stats {
    grid-template-columns: 1fr;
  }

  .notificaciones-sidebar {
    max-height: 500px;
  }

  .notificaciones-detail {
    min-height: 500px;
  }

  .notificaciones-list__item {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 82px;
    padding: 7px;
  }

  .notificaciones-list__icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .notificaciones-detail__identity h2 {
    font-size: 16px;
  }

  .notificaciones-detail__identity p {
    font-size: 9.6px;
  }
}

/* =========================================================
   HEIGHT SAFETY
   ========================================================= */

@media (max-height: 760px) and (min-width: 921px) {
  .notificaciones-page {
    height: calc(100vh - var(--topbar-height, 52px) - 44px);
  }

  .notificaciones-hero {
    padding: 9px 11px;
    gap: 7px;
  }

  .notificaciones-stat {
    min-height: 34px;
  }

  .notificaciones-list__item {
    min-height: 68px;
  }

  .notificaciones-detail__head {
    min-height: 66px;
  }
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

.notificaciones-spin {
  animation: notificacionesSpin 0.9s linear infinite;
}

@keyframes notificacionesSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes notificacionesPageIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notificacionesModalBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes notificacionesModalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .notificaciones-page,
  .notificaciones-page *,
  .notificaciones-page *::before,
  .notificaciones-page *::after,
  .notificaciones-modal,
  .notificaciones-modal *,
  .notificaciones-modal *::before,
  .notificaciones-modal *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}