.novtide-lead-open {
  overflow: hidden;
}

.novtide-lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 15, 27, 0.72);
  animation: novtideLeadFade 180ms ease-out;
}

.novtide-lead-overlay.is-closing {
  opacity: 0;
  transition: opacity 180ms ease;
}

.novtide-lead-dialog {
  width: min(800px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px 42px 34px;
  border: 1px solid #cad7e6;
  border-top: 5px solid #1b5fc1;
  border-radius: 8px;
  background:
    linear-gradient(rgba(227, 232, 239, 0.46) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 232, 239, 0.46) 1px, transparent 1px),
    #fff;
  background-size: 56px 56px;
  box-shadow: 0 26px 70px rgba(6, 15, 27, 0.28);
  animation: novtideLeadEnter 220ms ease-out;
}

.novtide-lead-brand-row {
  position: relative;
  display: grid;
  place-items: start center;
  min-height: 110px;
}

.novtide-lead-brand-lockup {
  position: relative;
  width: 190px;
  aspect-ratio: 600 / 333;
  overflow: hidden;
  border-radius: 3px;
  background: #13243a;
}

.novtide-lead-brand-lockup span,
.novtide-lead-brand-lockup img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.novtide-lead-brand-lockup span {
  display: grid;
  place-items: center;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

.novtide-lead-brand-lockup img {
  object-fit: contain;
  object-position: center;
  background: #13243a;
  opacity: 0;
}

.novtide-lead-brand-lockup.is-loaded img {
  opacity: 1;
}

.novtide-lead-brand-lockup.is-loaded span {
  opacity: 0;
  visibility: hidden;
}

.novtide-lead-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #cad7e6;
  border-radius: 999px;
  background: #fff;
  color: #0b1727;
  cursor: pointer;
}

.novtide-lead-close:hover,
.novtide-lead-close:focus-visible {
  border-color: #1b5fc1;
  background: #eef5ff;
}

.novtide-lead-close span::before,
.novtide-lead-close span::after {
  content: '';
  position: absolute;
  top: 21px;
  left: 13px;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.novtide-lead-close span::before {
  transform: rotate(45deg);
}

.novtide-lead-close span::after {
  transform: rotate(-45deg);
}

.novtide-lead-heading {
  max-width: 690px;
  margin: 4px auto 26px;
  text-align: center;
}

.novtide-lead-heading > p {
  margin: 0 0 10px;
  color: #1b5fc1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.novtide-lead-heading h2 {
  margin: 0;
  color: #0d1117;
  font-size: clamp(28px, 4.2vw, 43px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
}

.novtide-lead-heading h2 strong {
  color: #1b5fc1;
  font-weight: 700;
}

.novtide-lead-heading > span {
  display: block;
  max-width: 620px;
  margin: 16px auto 0;
  color: #4a5567;
  font-size: 16px;
  line-height: 1.55;
}

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

.novtide-lead-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #0d1117;
  font-size: 14px;
  font-weight: 700;
}

.novtide-lead-form input {
  width: 100%;
  height: 54px;
  min-width: 0;
  padding: 0 16px;
  border: 1px solid #cad7e6;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #0d1117;
  font-size: 16px;
}

.novtide-lead-form input:focus {
  border-color: #1b5fc1;
  box-shadow: 0 0 0 3px rgba(27, 95, 193, 0.12);
}

.novtide-lead-phone,
.novtide-lead-consent,
.novtide-lead-status,
.novtide-lead-submit {
  grid-column: 1 / -1;
}

.novtide-lead-phone small {
  color: #4a5567;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.novtide-lead-phone small::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 2px;
  border-radius: 999px;
  background: #00a884;
}

.novtide-lead-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.novtide-lead-consent {
  margin: 0;
  color: #66707f;
  font-size: 12px;
  line-height: 1.5;
}

.novtide-lead-status {
  display: none;
  min-height: 42px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.novtide-lead-status.success,
.novtide-lead-status.error {
  display: flex;
}

.novtide-lead-status.success {
  border: 1px solid #9ce7bc;
  background: #ecfdf3;
  color: #087443;
}

.novtide-lead-status.error {
  border: 1px solid #f7b5b0;
  background: #fff1f0;
  color: #b42318;
}

.novtide-lead-submit {
  min-height: 54px;
  border: 0;
  border-radius: 6px;
  background: #0b1727;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.novtide-lead-submit:hover,
.novtide-lead-submit:focus-visible {
  background: #1b5fc1;
}

.novtide-lead-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

@keyframes novtideLeadFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes novtideLeadEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.novtide-usd-only-field {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #d5dfeb;
  border-radius: 6px;
  background: #f8fafc;
  color: #0d1117;
  font-weight: 700;
}

body.novtide-popup-leads-route .admin-main > :not(.admin-topbar):not(.novtide-popup-leads-page) {
  display: none !important;
}

.novtide-popup-leads-page {
  display: grid;
  gap: 20px;
}

.novtide-leads-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.novtide-leads-heading h2,
.novtide-leads-heading p {
  margin-top: 0;
}

.novtide-leads-refresh,
.novtide-leads-toolbar button,
.novtide-leads-pagination button,
.novtide-leads-table button,
.novtide-coupon-template-form button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #1b5fc1;
  border-radius: 6px;
  background: #1b5fc1;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.novtide-leads-table td.table-actions > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.novtide-leads-table .novtide-lead-delete {
  border-color: #f1b5b1;
  background: #fff;
  color: #b42318;
}

.novtide-leads-table .novtide-lead-delete:hover,
.novtide-leads-table .novtide-lead-delete:focus-visible {
  border-color: #b42318;
  background: #fff1f0;
}

.novtide-lead-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.novtide-lead-stats article {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  background: #fff;
}

.novtide-lead-stats span {
  color: #66707f;
  font-size: 14px;
}

.novtide-lead-stats strong {
  color: #0d1117;
  font-size: 30px;
}

.novtide-coupon-template {
  overflow: hidden;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  background: #fff;
}

.novtide-coupon-template > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 16px 20px;
  cursor: pointer;
  list-style-position: inside;
}

.novtide-coupon-template > summary > span:first-child {
  display: inline-grid;
  gap: 4px;
}

.novtide-coupon-template > summary small {
  color: #66707f;
  font-size: 12px;
  font-weight: 500;
}

.novtide-coupon-state {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1f0;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
}

.novtide-coupon-state.active {
  background: #ecfdf3;
  color: #087443;
}

.novtide-coupon-template-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: 22px;
  padding: 0 20px 20px;
  border-top: 1px solid #e1e8f0;
}

.novtide-coupon-template-form {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-top: 20px;
}

.novtide-coupon-template-form label {
  display: grid;
  gap: 7px;
  color: #0d1117;
  font-size: 13px;
  font-weight: 700;
}

.novtide-coupon-template-form input,
.novtide-coupon-template-form textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d5dfeb;
  border-radius: 6px;
  background: #fff;
  color: #0d1117;
  font: inherit;
}

.novtide-coupon-template-form textarea {
  min-height: 310px;
  resize: vertical;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.novtide-coupon-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #b8d1f2;
  border-radius: 6px;
  background: #eef5ff;
}

.novtide-coupon-meta span,
.novtide-coupon-meta small {
  color: #526276;
  font-size: 12px;
}

.novtide-coupon-meta strong {
  color: #0b1727;
  font-size: 16px;
}

.novtide-coupon-meta small {
  margin-left: auto;
  font-weight: 800;
}

.novtide-coupon-placeholders {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.novtide-coupon-placeholders code {
  padding: 4px 7px;
  border-radius: 4px;
  background: #eef2f6;
  color: #465568;
  font-size: 11px;
}

.novtide-coupon-preview {
  min-width: 0;
  padding-top: 20px;
}

.novtide-coupon-preview header {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid #d5dfeb;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f8fafc;
}

.novtide-coupon-preview header span {
  color: #66707f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.novtide-coupon-preview header strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.novtide-coupon-preview iframe {
  display: block;
  width: 100%;
  height: 580px;
  border: 1px solid #d5dfeb;
  border-radius: 0 0 6px 6px;
  background: #f2f5f9;
}

.novtide-leads-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 440px) auto;
  gap: 10px;
  justify-content: start;
}

.novtide-leads-toolbar input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid #d5dfeb;
  border-radius: 6px;
}

.novtide-leads-message {
  min-height: 22px;
  margin: 0;
  color: #66707f;
}

.novtide-leads-message.error {
  color: #b42318;
}

.novtide-leads-table-wrap {
  overflow-x: auto;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  background: #fff;
}

.novtide-leads-table {
  width: 100%;
  min-width: 1080px;
}

.novtide-leads-table td strong,
.novtide-leads-table td small {
  display: block;
}

.novtide-leads-table td small {
  margin-top: 4px;
  color: #66707f;
}

.novtide-leads-table code {
  font-size: 12px;
  word-break: break-word;
}

.novtide-lead-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2f6;
  color: #465568;
  font-size: 12px;
  font-weight: 800;
}

.novtide-lead-state.queued,
.novtide-lead-state.processing,
.novtide-lead-state.accepted,
.novtide-lead-state.sent {
  background: #eef5ff;
  color: #1b5fc1;
}

.novtide-lead-state.delivered,
.novtide-lead-state.read {
  background: #ecfdf3;
  color: #087443;
}

.novtide-lead-state.failed,
.novtide-lead-state.invalid_phone,
.novtide-lead-state.email-failed {
  background: #fff1f0;
  color: #b42318;
}

.novtide-lead-state.email-sending {
  background: #fff7e6;
  color: #9a6700;
}

.novtide-lead-state.email-sent {
  background: #ecfdf3;
  color: #087443;
}

.novtide-action-complete {
  color: #66707f;
  font-size: 12px;
}

.novtide-leads-empty {
  padding: 44px 20px;
  color: #66707f;
  text-align: center;
}

.novtide-leads-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.novtide-leads-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.novtide-admin-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 400;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 16px;
  border-radius: 6px;
  background: #087443;
  color: #fff;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.novtide-admin-toast.error {
  background: #b42318;
}

.novtide-admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .novtide-lead-overlay {
    align-items: end;
    padding: 12px;
  }

  .novtide-lead-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 20px 18px 22px;
  }

  .novtide-lead-brand-row {
    min-height: 88px;
  }

  .novtide-lead-brand-lockup {
    width: 150px;
  }

  .novtide-lead-brand-lockup span {
    font-size: 24px;
  }

  .novtide-lead-close {
    width: 40px;
    height: 40px;
  }

  .novtide-lead-close span::before,
  .novtide-lead-close span::after {
    top: 19px;
    left: 12px;
    width: 16px;
  }

  .novtide-lead-heading {
    margin-bottom: 20px;
  }

  .novtide-lead-heading h2 {
    font-size: 27px;
  }

  .novtide-lead-heading > span {
    margin-top: 12px;
    font-size: 14px;
  }

  .novtide-lead-form {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .novtide-lead-phone,
  .novtide-lead-consent,
  .novtide-lead-status,
  .novtide-lead-submit {
    grid-column: 1;
  }

  .novtide-lead-form input,
  .novtide-lead-submit {
    height: 50px;
    min-height: 50px;
  }

  .novtide-lead-stats {
    grid-template-columns: 1fr;
  }

  .novtide-lead-stats article {
    min-height: 88px;
  }

  .novtide-coupon-template > summary {
    align-items: flex-start;
  }

  .novtide-coupon-template-body {
    grid-template-columns: 1fr;
    padding: 0 14px 14px;
  }

  .novtide-coupon-preview {
    padding-top: 0;
  }

  .novtide-coupon-preview iframe {
    height: 500px;
  }

  .novtide-leads-heading,
  .novtide-leads-toolbar {
    grid-template-columns: 1fr;
  }

  .novtide-leads-heading {
    display: grid;
  }

  .novtide-leads-refresh,
  .novtide-leads-toolbar button {
    width: 100%;
  }

  .novtide-leads-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .novtide-leads-table {
    min-width: 0;
  }

  .novtide-leads-table thead {
    display: none;
  }

  .novtide-leads-table,
  .novtide-leads-table tbody,
  .novtide-leads-table tr,
  .novtide-leads-table td {
    display: block;
    width: 100%;
  }

  .novtide-leads-table tr {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #d5dfeb;
    border-radius: 8px;
    background: #fff;
  }

  .novtide-leads-table td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
    border: 0;
  }

  .novtide-leads-table td::before {
    content: attr(data-label);
    color: #66707f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .novtide-leads-table td.table-actions {
    display: grid;
  }

  .novtide-leads-table td.table-actions button {
    width: 100%;
  }

  .novtide-leads-table td.table-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .novtide-lead-overlay,
  .novtide-lead-dialog,
  .novtide-admin-toast {
    animation: none;
    transition: none;
  }
}

.admin-sidebar nav a > span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-orders-table .email-event-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.admin-orders-table .email-event-stamps > span,
.order-detail-panel .email-event-stamps > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #c9d9eb;
  border-radius: 999px;
  background: #f4f8fd;
  color: #174f87;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

@media (max-width: 760px) {
  .admin-orders-table .email-event-stamps,
  .order-detail-panel .email-event-stamps {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-orders-table .email-event-stamps > span,
  .order-detail-panel .email-event-stamps > span {
    white-space: normal;
  }
}
