.nt-page {
  background: var(--surface-3, #f7f8fb);
  color: var(--text-primary, #101827);
}

.nt-shell {
  width: min(1320px, calc(100vw - 28px));
  margin: 22px auto 48px;
}

.nt-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
  margin-bottom: 14px;
}

.nt-panel {
  background: var(--surface-1, #fff);
  border: 1px solid var(--border-color, #dde4ee);
  border-radius: var(--radius-lg, 16px);
  padding: var(--space-md, 16px);
  box-shadow: var(--shadow-sm, 0 10px 24px rgba(15, 23, 42, .05));
  transition: border-color var(--transition-normal, .19s ease), box-shadow var(--transition-normal, .19s ease), transform var(--transition-fast, .15s ease);
}

@media (hover:hover) {
  .nt-panel:hover { box-shadow: var(--shadow-md, 0 18px 38px rgba(15,23,42,.08)); }
}

.nt-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.nt-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nt-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.nt-form input,
.nt-form textarea,
.nt-form select,
#statusFilter {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md, 12px);
  min-height: var(--fld-h, 42px);
  padding: 8px 12px;
  font: inherit;
  background: #fff;
}

.nt-form textarea {
  resize: vertical;
  min-height: 82px;
}

.nt-wide {
  grid-column: 1 / -1;
}

.nt-recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}

.nt-recipient {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 5px 4px 9px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.nt-recipient span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nt-recipient button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.nt-recipient button:hover {
  background: #fecaca;
  color: #991b1b;
}

.nt-module-list {
  display: grid;
  gap: 8px;
}

.nt-module-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md, 12px);
  padding: 10px;
  background: #f8fafc;
}

.nt-module-option input {
  width: auto;
  margin-top: 2px;
}

.nt-module-option span {
  display: grid;
  gap: 2px;
}

.nt-module-option small {
  color: #64748b;
  font-weight: 700;
}

.nt-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.nt-help {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.nt-subhead {
  margin: -6px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.nt-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: var(--radius-md, 12px);
  background: var(--surface-1, #fff);
  color: var(--text-primary, #0f172a);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: background-color var(--transition-normal, .19s ease), transform var(--transition-fast, .15s ease);
}

@media (hover:hover) {
  .nt-link-btn:hover {
    background: var(--surface-2, #f8fafc);
    transform: translateY(-1px);
  }
}

.nt-schedule-info {
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md, 12px);
  background: #f0f9ff;
  color: #075985;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.nt-recipient-matrix {
  display: grid;
  gap: 8px;
}

.nt-recipient-row {
  display: grid;
  grid-template-columns: minmax(70px, .45fr) minmax(110px, .8fr) minmax(150px, 1fr) minmax(170px, 1fr) 30px;
  gap: 8px;
  align-items: end;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md, 12px);
  padding: 8px;
  background: #f8fafc;
  min-width: 0;
}

.nt-recipient-active,
.nt-recipient-module {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin: 0;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.nt-recipient-row label,
.nt-recipient-row input {
  min-width: 0;
}

.nt-recipient-row input[type="text"],
.nt-recipient-row input[type="email"] {
  font-size: 12px;
  padding: 7px 9px;
}

.nt-recipient-active input,
.nt-recipient-module input {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
}

.nt-recipient-modules {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-height: 42px;
  min-width: 0;
}

.nt-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md, 12px);
  background: #fff;
  color: #991b1b;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transition: background-color var(--transition-normal, .19s ease), transform var(--transition-fast, .15s ease);
}

@media (hover:hover) {
  .nt-icon-btn:hover {
    background: #fee2e2;
    transform: translateY(-1px);
  }
}

.nt-btn {
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--color-secondary, #fff);
  color: var(--text-primary, #0f172a);
  border-radius: var(--radius-md, 12px);
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color var(--transition-normal, .19s ease), border-color var(--transition-normal, .19s ease), box-shadow var(--transition-normal, .19s ease), transform var(--transition-fast, .15s ease);
}

.nt-primary {
  background: var(--color-primary, #0f766e);
  border-color: var(--color-primary, #0f766e);
  color: #fff;
}

@media (hover:hover) {
  .nt-btn:hover { transform: translateY(-1px); background: var(--color-secondary-hover, #f8fafc); }
  .nt-primary:hover { background: var(--color-primary-hover, #115e59); }
}

.nt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#summaryBox {
  min-height: 120px;
  margin: 14px 0 0;
  padding: 12px;
  border-radius: var(--radius-md, 12px);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  overflow: auto;
}

.nt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.nt-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nt-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.nt-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 900;
  font-size: 12px;
}

.nt-table-wrap {
  overflow-x: auto;
}

.nt-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.nt-table th,
.nt-table td {
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.nt-table th {
  color: var(--text-secondary, #475569);
  background: var(--surface-2, #f8fafc);
  font-size: 12px;
  text-transform: uppercase;
}

@media (hover:hover) {
  .nt-table tbody tr:hover { background: var(--surface-2, #f8fafc); }
}

.nt-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.nt-status.pending { background: #fef3c7; color: #92400e; }
.nt-status.sent { background: #dcfce7; color: #166534; }
.nt-status.error { background: #fee2e2; color: #991b1b; }

.nt-log {
  display: grid;
  gap: 8px;
}

.nt-log-row {
  display: grid;
  grid-template-columns: 160px 120px 1fr;
  gap: 10px;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
  color: #334155;
}

.nt-muted {
  color: #64748b;
}

.nt-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 12px);
  background: #0f172a;
  color: #fff;
  border-radius: var(--radius-md, 12px);
  padding: 10px 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal, 190ms cubic-bezier(.22,.61,.36,1)), transform var(--transition-normal, 190ms cubic-bezier(.22,.61,.36,1));
  z-index: 2000;
}

.nt-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 820px) {
  .nt-shell {
    width: min(100% - 16px, 820px);
  }
  .nt-grid,
  .nt-form {
    grid-template-columns: 1fr;
  }
  .nt-head {
    align-items: stretch;
    flex-direction: column;
  }
  .nt-head-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .nt-log-row {
    grid-template-columns: 1fr;
  }
  .nt-section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .nt-recipient-row {
    grid-template-columns: 1fr;
  }
  .nt-recipient-modules {
    align-items: flex-start;
    flex-direction: column;
  }
  .nt-icon-btn {
    width: 100%;
  }
}
.nt-cron-status {
  display: grid;
  gap: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafc;
  color: #334155;
}

.nt-cron-status strong,
.nt-cron-status span {
  display: block;
}

.nt-cron-status span {
  font-size: 13px;
  line-height: 1.45;
}

.nt-cron-status.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.nt-cron-status.is-error {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #991b1b;
}

.nt-cron-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
