/* =========================================================
   WIRTZ HUB · MI PERFIL · NOTIFICACIONES
   Canales · reglas · resúmenes · automatizaciones
   Premium · minimalista · responsive · dark safe
   ========================================================= */

/* =========================================================
   PAGE
   ========================================================= */

.notifications-page {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 7px;

  min-height: calc(100vh - var(--topbar-height) - 44px);

  color: #050505;

  animation: notificationsPageIn 0.24s ease both;
}

html[data-theme="dark"] .notifications-page {
  color: rgba(255, 255, 255, 0.9);
}

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

.notifications-hero,
.notifications-channels,
.notifications-card,
.notifications-note {
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--panel-solid) 97%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.035),
    0 12px 28px rgba(0, 0, 0, 0.035);

  overflow: hidden;

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

html[data-theme="dark"] .notifications-hero,
html[data-theme="dark"] .notifications-channels,
html[data-theme="dark"] .notifications-card,
html[data-theme="dark"] .notifications-note {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(10, 10, 10, 0.9);

  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 32px rgba(0, 0, 0, 0.28);
}

/* =========================================================
   TEXTO · MODO CLARO / OSCURO
   ========================================================= */

html:not([data-theme="dark"]) .notifications-page,
html:not([data-theme="dark"]) .notifications-page h2,
html:not([data-theme="dark"]) .notifications-page h3,
html:not([data-theme="dark"]) .notifications-page strong,
html:not([data-theme="dark"]) .notifications-page td,
html:not([data-theme="dark"]) .notifications-page button,
html:not([data-theme="dark"]) .notifications-page input,
html:not([data-theme="dark"]) .notifications-page select,
html:not([data-theme="dark"]) .notifications-page textarea {
  color: #050505;
}

html:not([data-theme="dark"]) .notifications-page p,
html:not([data-theme="dark"]) .notifications-page small,
html:not([data-theme="dark"]) .notifications-page span {
  color: #27272a;
}

html:not([data-theme="dark"]) .notifications-page th,
html:not([data-theme="dark"]) .notifications-hero span,
html:not([data-theme="dark"]) .notifications-section-head span,
html:not([data-theme="dark"]) .notification-field span,
html:not([data-theme="dark"]) .notification-mail-route span,
html:not([data-theme="dark"]) .notification-modal__head span {
  color: #3f3f46;
}

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

.notifications-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;

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

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

  min-width: 0;
}

.notifications-hero span,
.notifications-section-head span {
  color: var(--muted);

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

html[data-theme="dark"] .notifications-hero span,
html[data-theme="dark"] .notifications-section-head span {
  color: rgba(255, 255, 255, 0.48);
}

.notifications-hero h2 {
  margin: 0;

  color: var(--text-strong);

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

html[data-theme="dark"] .notifications-hero h2 {
  color: rgba(255, 255, 255, 0.94);
}

.notifications-hero p {
  max-width: 860px;
  margin: 0;

  color: var(--muted);

  font-size: 8.4px;
  font-weight: 720;
  line-height: 1.34;
}

html[data-theme="dark"] .notifications-hero p {
  color: rgba(255, 255, 255, 0.48);
}

.notifications-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

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

.notifications-btn,
.notifications-section-head button,
.notification-digest__edit,
.notification-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  min-height: 28px;
  padding: 5px 8px;

  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 8px;
  background: transparent;

  color: var(--text-strong);

  font-size: 8.3px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;

  cursor: pointer;
  outline: none;

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

.notifications-btn:hover,
.notifications-section-head button:hover,
.notification-digest__edit:hover,
.notification-modal__close:hover {
  border-color: rgba(0, 0, 0, 0.24);
  background: rgba(0, 0, 0, 0.055);
}

.notifications-btn:active,
.notifications-section-head button:active,
.notification-digest__edit:active,
.notification-modal__close:active {
  transform: scale(0.98);
}

.notifications-btn:focus-visible,
.notifications-section-head button:focus-visible,
.notification-digest__edit:focus-visible,
.notification-modal__close:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-strong) 16%, transparent);
}

.notifications-btn .icon,
.notifications-section-head button .icon,
.notification-digest__edit .icon,
.notification-modal__close .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.15;
}

html[data-theme="dark"] .notifications-btn,
html[data-theme="dark"] .notifications-section-head button,
html[data-theme="dark"] .notification-digest__edit,
html[data-theme="dark"] .notification-modal__close {
  border-color: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
}

html[data-theme="dark"] .notifications-btn:hover,
html[data-theme="dark"] .notifications-section-head button:hover,
html[data-theme="dark"] .notification-digest__edit:hover,
html[data-theme="dark"] .notification-modal__close:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.075);
}

/* Botón principal · visible en claro y oscuro */
.notifications-btn--dark {
  border-color: rgba(17, 24, 39, 0.92) !important;
  background: rgba(17, 24, 39, 0.96) !important;
  color: #ffffff !important;
}

.notifications-btn--dark span,
.notifications-btn--dark .icon {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.notifications-btn--dark:hover {
  border-color: rgba(17, 24, 39, 1) !important;
  background: rgba(17, 24, 39, 0.9) !important;
}

html[data-theme="dark"] .notifications-btn--dark {
  border-color: rgba(255, 255, 255, 0.92) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #050505 !important;
}

html[data-theme="dark"] .notifications-btn--dark span,
html[data-theme="dark"] .notifications-btn--dark .icon {
  color: #050505 !important;
  stroke: #050505 !important;
}

html[data-theme="dark"] .notifications-btn--dark:hover {
  border-color: rgba(255, 255, 255, 1) !important;
  background: rgba(255, 255, 255, 0.86) !important;
}

.notifications-btn:disabled,
.notifications-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.78;
}

.notifications-btn--dark:disabled,
.notifications-btn--dark[disabled] {
  opacity: 0.82 !important;
}

/* =========================================================
   CANALES
   ========================================================= */

.notifications-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notification-channel {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;

  min-height: 50px;
  padding: 8px;

  border-right: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;

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

.notification-channel:last-child {
  border-right: 0;
}

.notification-channel:hover {
  background: rgba(0, 0, 0, 0.045);
}

html[data-theme="dark"] .notification-channel {
  border-right-color: rgba(255, 255, 255, 0.09);
}

html[data-theme="dark"] .notification-channel:hover {
  background: rgba(255, 255, 255, 0.065);
}

.notification-channel__icon {
  display: grid;
  width: 25px;
  height: 25px;
  min-width: 25px;
  place-items: center;

  border: 1px solid color-mix(in srgb, #7c3aed 28%, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
  background: color-mix(in srgb, #7c3aed 6%, transparent);

  color: #7c3aed;

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

.notification-channel:hover .notification-channel__icon {
  transform: translateY(-1px);
  filter: saturate(1.12) contrast(1.03);
}

html[data-theme="dark"] .notification-channel__icon {
  border-color: color-mix(in srgb, #a78bfa 30%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, #a78bfa 8%, transparent);
  color: #a78bfa;
}

.notification-channel__icon .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.15;
}

.notification-channel__body {
  min-width: 0;
}

.notification-channel strong {
  display: block;

  color: var(--text-strong);

  font-size: 8.8px;
  font-weight: 950;
  line-height: 1.1;

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

.notification-channel p {
  margin: 2px 0 0;

  color: var(--muted);

  font-size: 7.4px;
  font-weight: 720;
  line-height: 1.25;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

html[data-theme="dark"] .notification-channel strong {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .notification-channel p {
  color: rgba(255, 255, 255, 0.48);
}

/* =========================================================
   SWITCHES
   ========================================================= */

.notification-switch,
.mini-switch {
  position: relative;

  display: inline-flex;
  flex: 0 0 auto;

  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.025);

  padding: 0;

  cursor: pointer;
  outline: none;

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

.notification-switch:hover,
.mini-switch:hover {
  border-color: rgba(0, 0, 0, 0.28);
  background: rgba(0, 0, 0, 0.055);
}

.notification-switch:focus-visible,
.mini-switch:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-strong) 16%, transparent);
}

html[data-theme="dark"] .notification-switch,
html[data-theme="dark"] .mini-switch {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .notification-switch:hover,
html[data-theme="dark"] .mini-switch:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.075);
}

.notification-switch {
  width: 36px;
  height: 20px;
}

.notification-switch span,
.mini-switch span {
  position: absolute;
  top: 50%;

  display: block;

  border-radius: 999px;
  background: var(--muted);

  transform: translateY(-50%);

  transition:
    left var(--transition),
    background var(--transition),
    transform var(--transition);
}

.notification-switch span {
  left: 3px;
  width: 14px;
  height: 14px;
}

.notification-switch.is-on span {
  left: 18px;
  background: #16a34a;
}

html[data-theme="dark"] .notification-switch.is-on span {
  background: #4ade80;
}

.mini-switch {
  width: 31px;
  height: 18px;
}

.mini-switch span {
  left: 3px;
  width: 12px;
  height: 12px;
}

.mini-switch.is-on span {
  left: 16px;
  background: #16a34a;
}

html[data-theme="dark"] .mini-switch.is-on span {
  background: #4ade80;
}

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

.notifications-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.notifications-main {
  display: grid;
  align-content: start;
  gap: 7px;

  min-width: 0;
}

.notifications-side {
  display: none !important;
}

.notifications-card {
  display: grid;
  gap: 8px;

  padding: 8px;
}

.notifications-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

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

.notifications-section-head h3 {
  margin: 2px 0 0;

  color: var(--text-strong);

  font-size: 11.4px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.notifications-section-head > .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.15;

  color: #7c3aed;
}

html[data-theme="dark"] .notifications-section-head h3 {
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .notifications-section-head > .icon {
  color: #a78bfa;
}

/* =========================================================
   TABLA
   ========================================================= */

.notifications-table-wrap {
  width: 100%;
  max-width: 100%;

  overflow: auto;

  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 11px;

  scrollbar-width: thin;
  scrollbar-color: rgba(120, 128, 145, 0.35) transparent;
}

.notifications-table-wrap::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.notifications-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.notifications-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(120, 128, 145, 0.35);
  background-clip: content-box;
}

.notifications-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 128, 145, 0.55);
  background-clip: content-box;
}

html[data-theme="dark"] .notifications-table-wrap {
  border-color: rgba(255, 255, 255, 0.1);
}

.notifications-table {
  width: 100%;
  min-width: 720px;

  border-collapse: collapse;
  background: transparent;
}

.notifications-table th,
.notifications-table td {
  height: 31px;
  padding: 0 8px;

  border-bottom: 1px solid rgba(0, 0, 0, 0.1);

  color: var(--text);

  font-size: 8.45px;
  font-weight: 720;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

html[data-theme="dark"] .notifications-table th,
html[data-theme="dark"] .notifications-table td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.notifications-table th {
  position: sticky;
  top: 0;
  z-index: 2;

  background: color-mix(in srgb, var(--panel-solid) 98%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  color: var(--muted);

  font-size: 6.9px;
  font-weight: 950;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

html[data-theme="dark"] .notifications-table th {
  background: rgba(10, 10, 10, 0.98);
  color: rgba(255, 255, 255, 0.46);
}

.notifications-table tbody tr {
  transition:
    background var(--transition),
    color var(--transition);
}

.notifications-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.045);
}

html[data-theme="dark"] .notifications-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.notifications-table tbody tr:last-child td {
  border-bottom: 0;
}

.notifications-table strong {
  color: var(--text-strong);
  font-weight: 950;
}

html[data-theme="dark"] .notifications-table strong {
  color: rgba(255, 255, 255, 0.9);
}

/* =========================================================
   PRIORIDADES
   ========================================================= */

.priority-alta,
.priority-media,
.priority-baja {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  min-height: 18px;
  padding: 2px 7px;

  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.025);

  color: var(--text-strong);

  font-size: 7.2px;
  font-weight: 950;
  line-height: 1;
}

html[data-theme="dark"] .priority-alta,
html[data-theme="dark"] .priority-media,
html[data-theme="dark"] .priority-baja {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.88);
}

.priority-alta::before,
.priority-media::before,
.priority-baja::before {
  content: "";

  width: 5px;
  height: 5px;

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

.priority-alta::before {
  background: var(--danger);
}

.priority-media::before {
  background: var(--warning);
}

.priority-baja::before {
  background: var(--info);
}

/* =========================================================
   RESÚMENES · OCULTOS EN PÁGINA PRINCIPAL
   ========================================================= */

.notification-digests,
.notifications-note {
  display: none;
}

.notification-digest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;

  min-height: 66px;
  padding: 8px;

  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;

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

.notification-digest:last-child {
  border-bottom: 0;
}

.notification-digest:hover {
  background: rgba(0, 0, 0, 0.035);
}

html[data-theme="dark"] .notification-digest {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

html[data-theme="dark"] .notification-digest:hover {
  background: rgba(255, 255, 255, 0.055);
}

.notification-digest strong {
  display: block;

  color: var(--text-strong);

  font-size: 8.8px;
  font-weight: 950;
  line-height: 1.1;
}

.notification-digest p {
  margin: 2px 0 0;

  color: var(--muted);

  font-size: 7.4px;
  font-weight: 720;
  line-height: 1.3;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-digest small {
  display: block;
  margin-top: 4px;

  color: var(--muted-2);

  font-size: 6.9px;
  font-weight: 820;
  line-height: 1.25;

  overflow-wrap: anywhere;
}

html[data-theme="dark"] .notification-digest strong {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .notification-digest p {
  color: rgba(255, 255, 255, 0.48);
}

html[data-theme="dark"] .notification-digest small {
  color: rgba(255, 255, 255, 0.38);
}

.notification-digest__meta {
  display: grid;
  justify-items: end;
  gap: 4px;

  min-width: 74px;
}

.notification-digest__meta span,
.notification-digest__meta em {
  font-size: 7.4px;
  font-weight: 950;
  font-style: normal;
  line-height: 1;

  white-space: nowrap;
}

.notification-digest__meta span {
  color: var(--text-strong);
}

.notification-digest__meta em {
  color: #16a34a;
}

.notification-digest__meta em.is-inactive {
  color: var(--muted);
}

html[data-theme="dark"] .notification-digest__meta span {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .notification-digest__meta em {
  color: #4ade80;
}

html[data-theme="dark"] .notification-digest__meta em.is-inactive {
  color: rgba(255, 255, 255, 0.42);
}

.notification-digest__edit {
  min-height: 22px;
  padding: 4px 6px;

  font-size: 7.4px;
}

/* =========================================================
   NOTA
   ========================================================= */

.notifications-note__icon {
  display: grid;
  width: 25px;
  height: 25px;
  min-width: 25px;
  place-items: center;

  border: 1px solid color-mix(in srgb, #2563eb 28%, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
  background: color-mix(in srgb, #2563eb 6%, transparent);

  color: #2563eb;
}

html[data-theme="dark"] .notifications-note__icon {
  border-color: color-mix(in srgb, #60a5fa 30%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, #60a5fa 8%, transparent);
  color: #60a5fa;
}

.notifications-note__icon .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.15;
}

.notifications-note strong {
  display: block;

  color: var(--text-strong);

  font-size: 8.8px;
  font-weight: 950;
  line-height: 1.1;
}

.notifications-note p {
  margin: 2px 0 0;

  color: var(--muted);

  font-size: 7.4px;
  font-weight: 720;
  line-height: 1.32;
}

html[data-theme="dark"] .notifications-note strong {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .notifications-note p {
  color: rgba(255, 255, 255, 0.48);
}

/* =========================================================
   MODAL EDICIÓN RESUMEN
   ========================================================= */

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

  display: none;
  place-items: center;

  padding: 18px;

  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.notification-modal.is-open {
  display: grid;
  animation: notificationModalBackdropIn 0.16s ease both;
}

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

  width: min(720px, 100%);
  max-height: min(640px, calc(100vh - 36px));

  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--panel-solid) 98%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;

  overflow: hidden;

  animation: notificationModalIn 0.2s ease both;
}

html[data-theme="dark"] .notification-modal__card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.96);

  box-shadow:
    0 22px 80px rgba(0, 0, 0, 0.58),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

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

  padding: 9px;

  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .notification-modal__head {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.notification-modal__head span {
  color: var(--muted);

  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.notification-modal__head h3 {
  margin: 2px 0 0;

  color: var(--text-strong);

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

.notification-modal__head p {
  margin: 3px 0 0;

  color: var(--muted);

  font-size: 8px;
  font-weight: 760;
}

html[data-theme="dark"] .notification-modal__head span,
html[data-theme="dark"] .notification-modal__head p {
  color: rgba(255, 255, 255, 0.48);
}

html[data-theme="dark"] .notification-modal__head h3 {
  color: rgba(255, 255, 255, 0.92);
}

.notification-modal__close {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
}

.notification-modal__body {
  display: grid;
  gap: 8px;

  min-height: 0;
  padding: 9px;

  overflow: auto;

  scrollbar-width: thin;
  scrollbar-color: rgba(120, 128, 145, 0.35) transparent;
}

.notification-modal__body::-webkit-scrollbar {
  width: 7px;
}

.notification-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.notification-modal__body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(120, 128, 145, 0.35);
  background-clip: content-box;
}

.notification-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 5px;

  padding: 9px;

  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .notification-modal__footer {
  border-top-color: rgba(255, 255, 255, 0.09);
}

.notification-mail-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 7px;
  align-items: center;

  padding: 8px;

  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 11px;
  background: transparent;
}

html[data-theme="dark"] .notification-mail-route {
  border-color: rgba(255, 255, 255, 0.1);
}

.notification-mail-route article {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.notification-mail-route span {
  color: var(--muted);

  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.notification-mail-route strong {
  color: var(--text-strong);

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

  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-mail-route .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.15;

  color: #7c3aed;
}

html[data-theme="dark"] .notification-mail-route span {
  color: rgba(255, 255, 255, 0.48);
}

html[data-theme="dark"] .notification-mail-route strong {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .notification-mail-route .icon {
  color: #a78bfa;
}

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

.notification-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 11px;

  overflow: hidden;
}

html[data-theme="dark"] .notification-form-grid {
  border-color: rgba(255, 255, 255, 0.1);
}

.notification-field,
.notification-active-box {
  display: grid;
  gap: 5px;

  min-height: 54px;
  padding: 8px;

  border-right: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;

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

.notification-field:hover,
.notification-field:focus-within,
.notification-active-box:hover {
  background: rgba(0, 0, 0, 0.035);
}

html[data-theme="dark"] .notification-field,
html[data-theme="dark"] .notification-active-box {
  border-right-color: rgba(255, 255, 255, 0.09);
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

html[data-theme="dark"] .notification-field:hover,
html[data-theme="dark"] .notification-field:focus-within,
html[data-theme="dark"] .notification-active-box:hover {
  background: rgba(255, 255, 255, 0.055);
}

.notification-field:nth-child(2n),
.notification-active-box:nth-child(2n) {
  border-right: 0;
}

.notification-field--full {
  grid-column: 1 / -1;
  border-right: 0;
}

.notification-field span {
  color: var(--muted);

  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

html[data-theme="dark"] .notification-field span {
  color: rgba(255, 255, 255, 0.48);
}

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

  border: 0;
  background: transparent;

  color: var(--text-strong);
  outline: none;

  font-size: 8.8px;
  font-weight: 820;
}

.notification-field input::placeholder,
.notification-field textarea::placeholder {
  color: var(--muted-2);
}

html[data-theme="dark"] .notification-field input,
html[data-theme="dark"] .notification-field select,
html[data-theme="dark"] .notification-field textarea {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .notification-field input::placeholder,
html[data-theme="dark"] .notification-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.notification-field textarea {
  min-height: 60px;
  resize: vertical;
}

.notification-active-box {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-right: 0;
}

.notification-active-box span {
  display: grid;
  gap: 3px;
}

.notification-active-box strong {
  color: var(--text-strong);

  font-size: 8.8px;
  font-weight: 950;
}

.notification-active-box small {
  color: var(--muted);

  font-size: 7.4px;
  font-weight: 760;
}

html[data-theme="dark"] .notification-active-box strong {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .notification-active-box small {
  color: rgba(255, 255, 255, 0.48);
}

.notification-active-box input {
  display: none;
}

.notification-active-box b {
  position: relative;

  width: 36px;
  height: 20px;

  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.025);

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

.notification-active-box b::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;

  width: 14px;
  height: 14px;

  border-radius: 999px;
  background: var(--muted);

  transition:
    transform var(--transition),
    background var(--transition);
}

.notification-active-box input:checked + b {
  border-color: color-mix(in srgb, #16a34a 36%, rgba(0, 0, 0, 0.13));
  background: color-mix(in srgb, #16a34a 7%, transparent);
}

.notification-active-box input:checked + b::before {
  transform: translateX(16px);
  background: #16a34a;
}

html[data-theme="dark"] .notification-active-box b {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .notification-active-box input:checked + b {
  border-color: color-mix(in srgb, #4ade80 36%, rgba(255, 255, 255, 0.13));
  background: color-mix(in srgb, #4ade80 8%, transparent);
}

html[data-theme="dark"] .notification-active-box input:checked + b::before {
  background: #4ade80;
}

/* =========================================================
   TOAST
   ========================================================= */

.notifications-toast {
  position: fixed;
  right: 14px;
  bottom: 38px;
  z-index: 10000;

  max-width: min(390px, calc(100vw - 28px));
  padding: 9px 11px;

  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-solid) 98%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  color: var(--text-strong);

  font-size: 8.8px;
  font-weight: 900;
  line-height: 1.25;

  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;

  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);

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

.notifications-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

html[data-theme="dark"] .notifications-toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.96);
  color: rgba(255, 255, 255, 0.9);

  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.58),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

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

@media (max-width: 1180px) {
  .notifications-layout {
    grid-template-columns: 1fr;
  }

  .notifications-channels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .notifications-page {
    gap: 6px;
  }

  .notifications-hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .notifications-actions {
    justify-content: flex-start;
  }

  .notifications-channels {
    grid-template-columns: 1fr;
  }

  .notification-channel {
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .notification-channel:last-child {
    border-bottom: 0;
  }

  html[data-theme="dark"] .notification-channel {
    border-bottom-color: rgba(255, 255, 255, 0.09);
  }

  .notification-form-grid,
  .notification-mail-route {
    grid-template-columns: 1fr;
  }

  .notification-mail-route .icon {
    transform: rotate(90deg);
  }

  .notification-field,
  .notification-active-box {
    border-right: 0;
  }

  .notification-modal {
    padding: 10px;
  }

  .notification-modal__card {
    max-height: calc(100vh - 20px);
  }

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

  .notification-modal__footer .notifications-btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .notifications-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .notifications-btn,
  .notifications-section-head button {
    width: 100%;
  }

  .notifications-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-channel {
    grid-template-columns: 25px minmax(0, 1fr);
  }

  .notification-switch {
    grid-column: 1 / -1;
    width: 100%;
  }

  .notification-switch span {
    left: 3px;
  }

  .notification-switch.is-on span {
    left: calc(100% - 17px);
  }

  .notification-digest {
    grid-template-columns: 1fr;
  }

  .notification-digest__meta {
    display: flex;
    justify-content: space-between;
    justify-items: initial;
    align-items: center;
    flex-wrap: wrap;

    width: 100%;
  }

  .notification-digest__edit {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .notifications-hero,
  .notifications-channels,
  .notifications-card,
  .notifications-note {
    border-radius: 12px;
  }

  .notifications-card {
    padding: 8px;
  }

  .notifications-hero h2 {
    font-size: 15px;
  }

  .notifications-table {
    min-width: 680px;
  }

  .notification-modal__head {
    align-items: flex-start;
  }

  .notification-modal__head p {
    display: none;
  }

  .notifications-toast {
    right: 10px;
    bottom: 34px;
    max-width: calc(100vw - 20px);
  }
}

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

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

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

@keyframes notificationModalBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

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

/* Respeta usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .notifications-page,
  .notifications-page *,
  .notifications-page *::before,
  .notifications-page *::after,
  .notification-modal,
  .notification-modal *,
  .notification-modal *::before,
  .notification-modal *::after,
  .notifications-toast {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}