:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --soft: #eef3f8;
  --text: #162233;
  --muted: #657489;
  --line: #dce5ef;
  --primary: #0b8178;
  --primary-dark: #08665f;
  --brand: var(--primary);
  --accent: #d55238;
  --ok: #10854f;
  --bad: #c5413a;
  --blue: #2667d8;
  --violet: #7453d8;
  --amber: #b87313;
  --pink: #c64778;
  --shadow: 0 12px 32px rgba(30, 48, 70, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(11, 129, 120, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0, var(--bg) 270px);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--primary-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

svg {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 max(16px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand,
.support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.brand {
  min-width: 0;
  max-width: min(58vw, 360px);
  white-space: nowrap;
}

.brand span:not(.brand-mark) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(135deg, #0b8178, #2667d8);
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 129, 120, 0.22);
}

.token-brand-mark {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.suda-brand-mark {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(11, 129, 120, 0.18);
}

.suda-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.token-logo {
  width: 100%;
  height: 100%;
  display: block;
}

.token-logo-chain {
  filter: drop-shadow(0 8px 14px rgba(11, 129, 120, 0.24));
}

.token-logo-chain .token-bg {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 0.7;
}

.token-logo-chain .token-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.25;
  stroke-linecap: round;
}

.token-logo-chain .token-link-a,
.token-logo-chain .token-link-b {
  fill: none;
  stroke: #fff;
  stroke-width: 2.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.token-logo-chain .token-link-b {
  stroke: rgba(255, 255, 255, 0.86);
}

.token-logo-chain .token-scan {
  fill: none;
  stroke: #bff7eb;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.token-logo-chain .token-spark {
  fill: #ffffff;
}

.brand-mark-small {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  margin-right: 9px;
  font-size: 16px;
  font-weight: 900;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-link {
  color: #101b2b;
  font-size: 14px;
}

.batch-entry-link {
  color: inherit;
}

.admin-link {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
}

main {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.simple-footer {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.simple-footer a:hover {
  color: #101b2b;
}

.hero {
  min-height: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #08756f, #203243);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 10px;
  color: #b8ebe4;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.hero-subtitle {
  max-width: 680px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.7;
}

.hero-side {
  display: grid;
  gap: 10px;
}

.side-stat {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.side-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.side-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.search-panel {
  max-width: 820px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 117, 111, 0.16);
}

.input-error {
  border-color: var(--accent);
}

.input-error:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(185, 71, 47, 0.16);
}

.search-error,
.header-search-error {
  min-height: 20px;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
}

.search-error {
  margin-top: 8px;
}

.header-search-error {
  grid-column: 1 / -1;
  flex-basis: 100%;
  margin-top: -4px;
  padding-left: 2px;
}

.ticker-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(190px, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.ticker,
.ticker-band p,
.tool-strip,
.panel,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ticker {
  padding: 13px 15px;
}

.ticker span,
.stats span,
.batch-totals span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.ticker strong {
  display: inline-block;
  margin-top: 7px;
  font-size: 22px;
}

.ticker small {
  color: var(--muted);
}

.ticker-band p {
  margin: 0;
  display: flex;
  align-items: center;
  padding: 13px 15px;
  color: var(--muted);
  font-size: 13px;
}

.tool-strip {
  margin-bottom: 18px;
  padding: 14px;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tool-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fbfd;
}

.tool-card svg {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.tool-card strong {
  font-size: 14px;
}

.tool-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tool-card:hover {
  border-color: rgba(8, 117, 111, 0.45);
  background: #f0f8f7;
}

.tool-card-disabled {
  cursor: default;
}

.tool-card-disabled:hover {
  border-color: var(--line);
  background: #f9fbfd;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

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

.panel-head span,
.panel-head p {
  color: var(--muted);
  font-size: 13px;
}

.panel-head p {
  margin: 5px 0 0;
}

.status {
  color: var(--muted);
}

.empty-state {
  min-height: 138px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
}

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

.asset,
.stats div,
.batch-totals span {
  padding: 13px;
  border-radius: 8px;
  background: var(--soft);
}

.asset span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.asset strong,
.stats strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.address-line,
.hash-line {
  margin: 0 0 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.hash-line strong {
  color: var(--text);
}

.stats {
  display: grid;
  gap: 10px;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
}

.icon-button:hover:not(:disabled) {
  background: #dde9ef;
}

.table-panel,
.batch-panel {
  margin-bottom: 18px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-width: thin;
}

.record-panel > .table-wrap,
.batch-lite .table-wrap {
  scrollbar-width: none;
}

.record-panel > .table-wrap::-webkit-scrollbar,
.batch-lite .table-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

#recordTable {
  min-width: 1092px;
  table-layout: fixed;
}

#recordTable th,
#recordTable td {
  padding: 10px 9px;
}

#recordTable th:nth-child(1),
#recordTable td:nth-child(1) {
  width: 158px;
  min-width: 158px;
}

#recordTable th:nth-child(2),
#recordTable td:nth-child(2) {
  width: 330px;
  min-width: 330px;
}

#recordTable th:nth-child(3),
#recordTable td:nth-child(3) {
  width: 68px;
  min-width: 68px;
  text-align: center;
  font-weight: 800;
}

#recordTable th:nth-child(1),
#recordTable td:nth-child(1) {
  font-weight: 800;
}

#recordTable th:nth-child(4),
#recordTable td:nth-child(4) {
  width: 138px;
  min-width: 138px;
  padding-left: 34px;
  padding-right: 6px;
  text-align: left;
}

#recordTable th:nth-child(5),
#recordTable td:nth-child(5),
#recordTable th:nth-child(6),
#recordTable td:nth-child(6) {
  width: 146px;
  min-width: 146px;
  text-align: center;
}

#recordTable th:nth-child(7),
#recordTable td:nth-child(7) {
  width: 106px;
  min-width: 106px;
  text-align: center;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0f5f8;
  color: #33414f;
  font-weight: 800;
}

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

.muted-cell {
  text-align: center;
  color: var(--muted);
}

.mono {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.peer-cell {
  width: 330px;
  max-width: 330px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.55;
  color: #101b2b;
  font-size: 15px;
  font-weight: 700;
}

.copyable-text,
.copy-text-button {
  cursor: pointer;
}

.copy-text-button {
  width: auto;
  max-width: 100%;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 1px 2px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #101b2b;
  font: inherit;
  font-weight: inherit;
  line-height: 1.25;
  text-align: left;
  gap: 0;
  justify-content: flex-start;
}

.copy-text-button:hover:not(:disabled),
.copy-text-button:hover,
.copyable-text:hover {
  background: transparent;
  text-decoration: underline;
}

.copy-text-button:focus,
.copyable-text:focus {
  outline: none;
}

.copy-text-button:focus-visible,
.copyable-text:focus-visible {
  outline: 1px solid rgba(11, 122, 70, 0.45);
  outline-offset: 1px;
}

.copy-text-button.copied,
.copyable-text.copied {
  color: #0b7a46;
}

.hash-column {
  max-width: 146px;
  padding-inline: 6px;
  overflow: hidden;
}

.hash-column .hash-with-copy,
.hash-column .block-cell {
  max-width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

.hash-column .hash-with-copy .hash-copy-text,
.hash-column .block-hash-copy,
.hash-column .block-hash-text {
  min-width: 0;
  color: #101b2b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hash-column .block-detail-button {
  color: #101b2b;
}

.direction-in {
  color: var(--ok);
  font-weight: 800;
}

.direction-out {
  color: var(--accent);
  font-weight: 800;
}

.amount-cell {
  text-align: left;
  white-space: nowrap;
}

.amount-badge {
  min-width: 0;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.amount-in {
  background: var(--ok);
  color: #fff;
}

.amount-out {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: #e7eef3;
  color: var(--text);
}

.secondary:hover:not(:disabled) {
  background: #dce7ee;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

.batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.batch-actions span {
  color: var(--muted);
  font-size: 13px;
}

.batch-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.batch-totals strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.admin-main {
  max-width: 1000px;
}

.admin-hero {
  margin-bottom: 18px;
  padding: 26px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #08756f, #203243);
}

.admin-hero h1 {
  margin-bottom: 8px;
  font-size: 34px;
}

.admin-hero p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
}

.admin-login,
.admin-editor {
  margin-bottom: 18px;
}

.admin-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

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

.form-grid.single {
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wide-label {
  margin-top: 14px;
}

.wide-label textarea {
  min-height: 90px;
}

.admin-health {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 2fr) 128px;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfd;
}

.admin-health > div:first-child {
  display: grid;
  gap: 4px;
}

.admin-health strong {
  color: var(--text);
}

.admin-health span {
  color: var(--muted);
  font-size: 13px;
}

.unsubscribe-main {
  width: min(100% - 32px, 640px);
  margin: 0 auto;
  padding: 42px 0;
}

.unsubscribe-panel {
  display: grid;
  gap: 16px;
}

.mailer-main {
  max-width: 1280px;
}

.mailer-hero {
  background: linear-gradient(135deg, #0b8178, #33505f);
}

.hero-return {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.hero-return:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

.mailer-front {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
  padding: 28px 0 42px;
}

.mailer-front-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: center;
  min-height: 420px;
  padding: 42px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(7, 42, 48, 0.72), rgba(7, 42, 48, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='700' viewBox='0 0 1200 700'%3E%3Crect width='1200' height='700' fill='%230b8178'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.16' stroke-width='2'%3E%3Cpath d='M80 160h1040v380H80z'/%3E%3Cpath d='M80 160l520 250 520-250'/%3E%3Cpath d='M80 540l340-210M1120 540L780 330'/%3E%3Ccircle cx='930' cy='150' r='76'/%3E%3Cpath d='M170 105h320M170 595h520'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
}

.mailer-front-hero h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: 48px;
  line-height: 1.1;
}

.mailer-front-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.front-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.front-status {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.front-status span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.front-status strong {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.front-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.front-band div {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.front-band i {
  color: var(--brand);
}

.front-band span {
  color: var(--muted);
  line-height: 1.55;
}

.mailer-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.mailer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.mailer-nav {
  position: sticky;
  top: 76px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mailer-nav button {
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.mailer-nav button.active {
  background: #eef8f6;
  color: var(--brand);
}

.mailer-view-stack {
  min-width: 0;
}

.admin-view {
  margin-bottom: 18px;
}

.mailer-status-grid span,
.mailer-counter,
.mailer-note {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfd;
  color: var(--muted);
  font-size: 13px;
}

.mailer-status-grid strong,
.mailer-counter strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.send-control-center {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.send-control-center > div:first-child {
  min-width: 220px;
  display: grid;
  gap: 4px;
}

.send-control-center strong {
  font-size: 15px;
}

.send-control-center span {
  color: var(--muted);
  font-size: 12px;
}

.preset-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.preset-actions button {
  background: #f8fbfd;
  color: #25364a;
  border: 1px solid #cfdbe7;
}

.preset-actions button:hover:not(:disabled) {
  background: #eef4fa;
  border-color: #b8c7d8;
}

.preset-actions button.active {
  background: #e9f1fb;
  color: #1d4f8f;
  border-color: #8fb2dc;
  box-shadow: 0 0 0 2px rgba(38, 103, 216, 0.1);
}

.task-failure-summary {
  color: #8a4b12;
}

.mailer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
}

.mailer-config-view #configMount {
  display: grid;
  gap: 14px;
}

.smtp-test-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.identity-sync-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #cfe7e2;
  border-radius: 8px;
  background: #f6fbfa;
}

.identity-sync-note {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.identity-sync-note strong {
  color: var(--text);
}

.identity-health-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.identity-health-panel span {
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.identity-health-panel strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 14px;
}

.identity-health-panel .ok {
  border-color: #bdebd8;
  background: #f3fcf8;
}

.identity-health-panel .warn {
  border-color: #ffe0a3;
  background: #fffbf0;
}

.identity-health-panel .bad {
  border-color: #ffc8c8;
  background: #fff7f7;
}

.identity-table-card,
.identity-detail-card {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.identity-table-actions {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 10px;
}

.identity-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.identity-detail-card {
  display: grid;
  gap: 12px;
}

.identity-detail-card summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  list-style: none;
}

.identity-detail-card summary::-webkit-details-marker {
  display: none;
}

.identity-detail-card[open] summary {
  margin-bottom: 12px;
}

.identity-detail-card textarea {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.cleaner-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}

.cleaner-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.cleaner-table-wrap {
  max-height: 250px;
}

.cleaner-table {
  min-width: 520px;
  font-size: 12px;
}

.cleaner-table th,
.cleaner-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.cleaner-batches {
  display: flex;
  min-height: 48px;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.cleaner-batches span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fbfd;
}

.cleaner-batches strong {
  color: var(--text);
}

.identity-table-wrap {
  max-height: 430px;
}

.identity-table {
  min-width: 1040px;
  font-size: 12px;
}

.identity-table th,
.identity-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.domain-health-table th,
.domain-health-table td {
  vertical-align: top;
}

.dns-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dns-badges span,
.health-pill,
.health-issue,
.identity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 6px 6px 0;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.dns-badges span {
  min-width: 54px;
  justify-content: center;
}

.dns-badges .ok,
.health-pill.ok {
  background: rgba(16, 133, 79, 0.12);
  color: var(--ok);
}

.dns-badges .bad,
.health-pill.bad {
  background: rgba(213, 82, 56, 0.13);
  color: var(--accent);
}

.health-pill.warn {
  background: rgba(184, 115, 19, 0.14);
  color: var(--amber);
}

.health-issue {
  background: var(--soft);
  color: var(--text);
}

.identity-chip {
  background: #f7fafc;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
}

.muted-mini {
  color: var(--muted);
  font-size: 11px;
}

.test-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.smtp-debug {
  min-height: 150px;
  max-height: 320px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101828;
  color: #d0d5dd;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.config-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

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

.config-hints div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.config-hints strong {
  color: var(--text);
}

.config-hints span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.config-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.mailer-form {
  display: grid;
  gap: 14px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  color: var(--text);
}

.form-section-title span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #eef8f6;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.form-section-title strong {
  font-size: 15px;
}

.provider-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.provider-tabs button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.provider-tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(19, 35, 47, 0.12);
}

.api-config {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.api-config textarea {
  min-height: 96px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.send-pool-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe7e2;
  border-radius: 8px;
  background: #f6fbfa;
}

.send-pool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.send-pool-head div {
  display: grid;
  gap: 4px;
}

.send-pool-head strong {
  color: var(--text);
}

.send-pool-head span,
.send-pool-preview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.send-pool-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.send-pool-metrics span,
.send-pool-preview {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.send-pool-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.api-switch {
  min-height: 40px;
  align-items: center;
  margin-top: 22px;
}

.mailer-form textarea {
  min-height: 130px;
}

#htmlBodyInput {
  min-height: 110px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.composer-field {
  display: grid;
  gap: 8px;
}

.field-caption {
  color: #263445;
  font-size: 13px;
  font-weight: 800;
}

.content-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
}

.content-toolbar .icon-button {
  width: 36px;
  height: 36px;
}

.content-toolbar .mini-action {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.inline-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-input-action .mini-action {
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

.toolbar-spacer {
  flex: 1 1 auto;
  min-width: 16px;
}

.attachment-tool {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.attachment-tool svg {
  display: block;
  width: 18px;
  height: 18px;
}

.attachment-tool input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.toolbar-attachment-summary {
  max-width: min(360px, 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #dce7f0;
  border-radius: 8px;
  background: #f8fbfd;
}

.attachment-total {
  color: #506173;
  font-weight: 800;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  gap: 6px;
  padding: 3px 6px;
  border: 1px solid #d7e3ec;
  border-radius: 999px;
  background: #ffffff;
  color: #263445;
}

.attachment-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  min-height: 18px;
  width: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #edf3f7;
  color: #526173;
  font-size: 14px;
  line-height: 18px;
}

.attachment-chip button:hover {
  background: #fee2e2;
  color: #b42318;
}

.attachment-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.attachment-box input[type="file"] {
  margin-top: 8px;
  width: 100%;
}

#templateHtmlBodyInput {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.mailer-options,
.mailer-side {
  display: grid;
  gap: 10px;
}

.send-command-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce7f0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 252, 253, 0.92)),
    #ffffff;
  box-shadow: 0 10px 22px rgba(30, 48, 70, 0.06);
}

.send-command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.send-command-head div {
  display: grid;
  gap: 4px;
}

.send-command-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.send-command-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.send-option-grid {
  grid-template-columns: minmax(260px, 1.2fr) repeat(2, minmax(180px, 0.9fr));
  align-items: stretch;
}

.send-option-grid .check-label {
  min-height: 74px;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #f8fbfd;
  color: #304256;
}

.send-option-grid .check-label:hover {
  border-color: rgba(11, 129, 120, 0.28);
  background: #ffffff;
}

.send-option-grid .check-label input {
  margin-top: 3px;
}

.send-option-grid .check-label span {
  display: grid;
  gap: 3px;
}

.send-option-grid .check-label strong {
  color: #162233;
  font-size: 13px;
  font-weight: 850;
}

.send-option-grid .check-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.send-option-grid .consent-card {
  background: #f6fbfa;
}

.send-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(220, 229, 239, 0.86);
}

.send-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.send-secondary-actions button {
  min-height: 42px;
}

.send-primary-button {
  width: 100%;
  min-height: 48px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(135deg, #0b8178, #2667d8);
  box-shadow: 0 14px 26px rgba(11, 129, 120, 0.2);
  font-weight: 900;
}

.form-status {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  color: var(--muted);
  font-size: 13px;
}

.form-status.ok {
  border-color: rgba(21, 128, 61, 0.24);
  background: #f0fdf4;
  color: var(--ok);
}

.form-status.bad {
  border-color: rgba(197, 65, 58, 0.28);
  background: #fff5f5;
  color: var(--bad);
}

.attachment-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.preflight-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.preflight-panel.ok {
  border-color: rgba(16, 133, 79, 0.24);
}

.preflight-panel.warn {
  border-color: rgba(184, 115, 19, 0.28);
}

.preflight-panel.bad {
  border-color: rgba(213, 82, 56, 0.28);
}

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

.preflight-head span {
  color: var(--muted);
  font-size: 12px;
}

.preflight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preflight-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.preflight-list .ok {
  background: rgba(16, 133, 79, 0.12);
  color: var(--ok);
}

.preflight-list .warn {
  background: rgba(184, 115, 19, 0.14);
  color: var(--amber);
}

.preflight-list .bad {
  background: rgba(213, 82, 56, 0.13);
  color: var(--accent);
}

.send-check-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.send-check-card strong {
  color: var(--text);
}

.send-check-card span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.send-check-card span::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #b8c2cc;
}

.send-check-card .check-ok::before {
  background: var(--ok);
}

.send-check-card .check-warn::before {
  background: #d59c22;
}

.check-label {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  line-height: 1.5;
}

.check-label input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.mailer-results {
  margin-top: 18px;
}

.mailer-manage {
  margin-top: 18px;
}

.mailer-manage-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(260px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.mailer-manage textarea {
  min-height: 130px;
}

.compact-actions {
  justify-content: flex-start;
  margin-top: 10px;
}

.inline-head {
  margin-bottom: 10px;
}

.blacklist-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.blacklist-guide div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.blacklist-guide strong {
  color: var(--text);
}

.blacklist-guide span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.contact-table-wrap {
  max-height: 430px;
}

.contact-table {
  min-width: 800px;
  font-size: 12px;
}

.contact-table th,
.contact-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.template-table-wrap {
  max-height: 430px;
}

.template-table {
  min-width: 860px;
  font-size: 12px;
}

.template-table th,
.template-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.user-table-wrap {
  margin-top: 16px;
  max-height: calc(100vh - 360px);
}

.user-table {
  min-width: 980px;
  font-size: 12px;
}

.user-table th,
.user-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.user-table code {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  color: #304256;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.invite-manage-grid {
  margin-top: 16px;
}

.invite-table-wrap {
  max-height: 320px;
}

.invite-table {
  min-width: 720px;
  font-size: 12px;
}

.invite-table th,
.invite-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.login-front {
  width: min(980px, calc(100% - 56px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  padding-top: 42px;
}

.unified-login {
  margin: 0;
}

@media (max-width: 760px) {
  .login-front {
    width: min(560px, calc(100% - 28px));
    grid-template-columns: minmax(0, 1fr);
  }
}

.mailer-auth-body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 0, rgba(11, 129, 120, 0.12), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(38, 103, 216, 0.11), transparent 32%),
    linear-gradient(180deg, #ffffff 0, #f5f7fb 46%, #eef3f8 100%);
  background-size: auto;
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  overflow-x: hidden;
}

.mailer-auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 129, 120, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(38, 103, 216, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.72;
}

.mailer-auth-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(245, 247, 251, 0.62)),
    radial-gradient(circle at 50% 100%, rgba(11, 129, 120, 0.08), transparent 34%);
}

.mailer-auth-top {
  width: min(1180px, calc(100% - 48px));
  height: 72px;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

.mailer-auth-brand {
  position: relative;
  z-index: 1;
  max-width: none;
  color: #162233;
  white-space: nowrap;
}

.mailer-auth-brand span:not(.brand-mark) {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.mailer-auth-main {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 520px);
  grid-template-areas:
    "intro login"
    "intro register";
  gap: 16px 32px;
  align-content: center;
  align-items: center;
  margin: 0 auto;
  padding: 24px 0 58px;
}

.single-auth-main {
  width: min(760px, calc(100% - 48px));
  min-height: calc(100vh - 96px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "intro"
    "login";
  gap: 24px;
  justify-items: center;
  align-content: center;
}

.mailer-auth-intro {
  grid-area: intro;
  max-width: 760px;
  text-align: center;
}

.mailer-auth-intro span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(11, 129, 120, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #0b8178;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(30, 48, 70, 0.06);
}

.mailer-auth-intro h1 {
  margin: 18px 0 12px;
  color: #162233;
  font-size: 64px;
  line-height: 1.06;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 16px 42px rgba(38, 103, 216, 0.10);
}

.mailer-auth-intro p {
  max-width: 460px;
  margin: 0 auto;
  color: #657489;
  font-size: 17px;
  line-height: 1.75;
}

.auth-card {
  position: relative;
  grid-area: login;
  width: 100%;
  max-width: 560px;
  padding: 28px;
  border: 1px solid rgba(220, 229, 239, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 253, 0.92)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 22px 60px rgba(30, 48, 70, 0.11);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.auth-card::before {
  content: none;
}

.auth-card::after {
  content: none;
}

.register-card {
  grid-area: register;
  background: rgba(255, 255, 255, 0.82);
}

.merged-auth-card {
  align-self: center;
  min-height: 0;
}

.auth-switch {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  padding: 6px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #eef3f8;
}

.auth-switch button {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #657489;
  box-shadow: none;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.auth-switch button:hover:not(:disabled) {
  border-color: rgba(11, 129, 120, 0.18);
  background: rgba(255, 255, 255, 0.76);
  color: #0b8178;
  box-shadow: none;
  transform: none;
}

.auth-switch button.active {
  border-color: rgba(11, 129, 120, 0.22);
  background: #ffffff;
  color: #0b8178;
  box-shadow: 0 8px 18px rgba(30, 48, 70, 0.08);
}

.auth-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 22px;
}

.auth-card-head h2 {
  margin: 0 0 8px;
  color: #162233;
  font-size: 26px;
}

.auth-card-head span {
  color: #657489;
  font-size: 13px;
  line-height: 1.5;
}

.auth-card-head > i {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(11, 129, 120, 0.08);
  color: #0b8178;
  box-shadow: 0 10px 24px rgba(11, 129, 120, 0.08);
}

.auth-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.auth-form.form-grid.single {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.auth-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 88px;
  color: #304256;
  font-weight: 800;
  padding: 12px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 251, 253, 0.86)),
    #ffffff;
}

.auth-form input {
  display: block;
  width: 100%;
  max-width: none;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  background: #fbfdff;
  color: #162233;
  font-size: 15px;
  box-shadow: none;
}

.auth-form input::placeholder {
  color: #8a98aa;
}

.auth-form input:focus {
  border-color: rgba(11, 129, 120, 0.42);
  box-shadow: 0 0 0 3px rgba(11, 129, 120, 0.11);
  outline: none;
}

.auth-form button {
  width: 100%;
  height: 52px;
  min-height: 52px;
  margin-top: 2px;
  padding: 0 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(135deg, #0b8178, #2667d8);
  box-shadow: 0 14px 28px rgba(11, 129, 120, 0.18);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.auth-form button:hover:not(:disabled) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(135deg, #0f9187, #2e72e8);
  box-shadow: 0 18px 36px rgba(38, 103, 216, 0.22);
}

@media (max-width: 860px) {
  .mailer-auth-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "login";
    gap: 16px;
    align-content: start;
    padding-top: 28px;
  }

  .mailer-auth-intro {
    max-width: 560px;
    justify-self: center;
  }

  .mailer-auth-intro h1 {
    font-size: 56px;
    white-space: normal;
  }

  .mailer-auth-intro p {
    margin: 0 auto;
  }
}

@media (max-width: 540px) {
  .mailer-auth-top,
  .mailer-auth-main {
    width: min(100% - 28px, 520px);
  }

  .mailer-auth-top {
    height: 62px;
    justify-content: center;
  }

  .mailer-auth-intro h1 {
    font-size: 42px;
  }

  .auth-card {
    padding: 18px;
    min-height: 0;
  }

  .send-option-grid,
  .send-action-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .send-secondary-actions,
  .send-secondary-actions button {
    width: 100%;
  }

  .superadmin-main {
    width: min(100% - 28px, 720px);
  }

  .super-login,
  .super-workspace,
  .super-hero,
  .super-grid,
  .super-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .super-nav {
    position: static;
  }
}

@keyframes authSweep {
  0% { transform: translateX(-8%); }
  50% { transform: translateX(6%); }
  100% { transform: translateX(-8%); }
}

@keyframes authScan {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(420px); opacity: 0.95; }
}

.selected-row {
  background: #eef8f6 !important;
}

.template-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.template-preview strong {
  color: var(--text);
}

.template-preview pre {
  min-height: 120px;
  max-height: 260px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.compact-table {
  max-height: 260px;
}

.task-report-wrap {
  position: relative;
  min-width: 0;
  margin-top: 16px;
}

.table-tools {
  position: absolute;
  top: 0;
  right: 0;
}

.report-metrics,
.contact-metrics,
.cleaner-metrics,
.identity-metrics,
.result-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.report-metrics span,
.contact-metrics span,
.cleaner-metrics span,
.identity-metrics span,
.result-metrics span {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  color: var(--muted);
  font-size: 13px;
}

.report-metrics strong,
.contact-metrics strong,
.cleaner-metrics strong,
.identity-metrics strong,
.result-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.result-filter-bar {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
}

.result-filter-bar label {
  margin: 0;
}

.result-filter-bar span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.report-filter-bar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 12px;
}

.report-filter-bar label {
  width: min(320px, 100%);
}

.task-table-wrap {
  max-height: 310px;
}

.task-table {
  min-width: 1500px;
  font-size: 12px;
}

.task-table th,
.task-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.task-table th {
  color: #2e3350;
  font-weight: 800;
}

.task-table tbody tr:nth-child(odd) {
  background: #f4f4f5;
}

.task-table .link-button {
  font-size: 12px;
  color: #1f2b52;
  text-decoration: underline;
}

/* Full-screen mailer admin workspace */
.admin-body {
  min-height: 100vh;
  background: #f3f6fa;
}

.admin-body .topbar {
  min-height: 56px;
  padding: 0 24px;
}

.admin-body .nav {
  gap: 10px;
}

.admin-body .nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.admin-main.mailer-main {
  width: min(1360px, calc(100% - 144px));
  max-width: none;
  margin: 0 auto;
  padding: 14px 0 28px;
}

.admin-hero.mailer-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px 18px;
  border-radius: 8px;
}

.admin-hero.mailer-hero h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.admin-hero.mailer-hero p {
  max-width: none;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.admin-hero.mailer-hero .hero-return {
  margin-top: 0;
  white-space: nowrap;
}

.admin-login {
  max-width: 720px;
  margin: 18px auto;
}

.unified-entry-panel {
  max-width: 560px;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 28px;
  text-align: center;
}

.unified-entry-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(11, 129, 120, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, #f0fbf9, #e8f4ff);
  color: var(--brand);
  box-shadow: 0 14px 28px rgba(11, 129, 120, 0.12);
}

.unified-entry-icon svg {
  width: 26px;
  height: 26px;
}

.unified-entry-panel .panel-head {
  width: 100%;
  margin-bottom: 0;
  padding-bottom: 12px;
}

.unified-entry-panel .panel-head h2 {
  font-size: 22px;
}

.unified-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mailer-workspace {
  gap: 12px;
}

.mailer-nav {
  top: 56px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
}

.mailer-nav button {
  flex: 1 1 112px;
  min-width: 104px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
  white-space: nowrap;
}

.mailer-view-stack,
.admin-view,
.admin-view.panel {
  width: 100%;
}

.admin-view.panel,
.mailer-panel.panel,
.mailer-config-view.panel,
.mailer-manage.panel,
.mailer-results.panel {
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(30, 48, 70, 0.06);
}

.panel-head {
  min-height: 34px;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 17px;
}

.mailer-status-grid {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 8px;
}

.mailer-status-grid span,
.mailer-counter,
.mailer-note,
.report-metrics span,
.contact-metrics span,
.cleaner-metrics span,
.identity-metrics span,
.result-metrics span {
  padding: 10px 12px;
}

.send-control-center {
  margin-bottom: 12px;
  padding: 12px;
}

.mailer-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}

.mailer-form {
  gap: 12px;
}

.form-grid {
  gap: 10px;
}

.api-config,
.send-pool-card,
.identity-sync-card,
.identity-table-card,
.identity-detail-card,
.ops-card,
.template-preview,
.preflight-panel {
  border-radius: 8px;
}

.mailer-side {
  position: sticky;
  top: 122px;
  align-self: start;
}

.contact-layout,
.template-layout {
  grid-template-columns: minmax(380px, 0.42fr) minmax(0, 0.58fr);
  gap: 14px;
}

.cleaner-layout {
  grid-template-columns: minmax(420px, 0.45fr) minmax(0, 0.55fr);
  gap: 14px;
}

.identity-sync-card {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.identity-secondary-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.config-action-bar {
  grid-template-columns: minmax(0, 1fr) auto;
}

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

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

.mailer-manage-grid {
  grid-template-columns: minmax(420px, 0.5fr) minmax(0, 0.5fr);
}

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

.compact-table,
.contact-table-wrap,
.template-table-wrap,
.identity-table-wrap,
.domain-health-table-wrap,
.task-table-wrap {
  max-height: calc(100vh - 300px);
  min-height: 260px;
}

.identity-table-wrap {
  max-height: calc(100vh - 380px);
}

.task-table-wrap {
  max-height: calc(100vh - 330px);
}

.cleaner-table-wrap {
  max-height: 360px;
}

.result-metrics,
.report-metrics,
.contact-metrics,
.cleaner-metrics,
.identity-metrics {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.admin-actions.compact-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.admin-actions.compact-actions button {
  flex: 0 1 auto;
}

.row-action {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  background: #fff;
  color: #304256;
  box-shadow: 0 1px 2px rgba(30, 48, 70, 0.05);
  font-size: 12px;
  font-weight: 800;
}

.row-action:hover:not(:disabled) {
  border-color: rgba(11, 129, 120, 0.36);
  background: #f5fbfa;
  color: var(--primary-dark);
}

.row-action.danger {
  border-color: rgba(197, 65, 58, 0.28);
  color: var(--bad);
}

.row-action.danger:hover:not(:disabled) {
  border-color: rgba(197, 65, 58, 0.46);
  background: #fff5f4;
  color: #9f2f2a;
}

.superadmin-main {
  width: min(1280px, calc(100% - 80px));
}

.super-login {
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px;
}

.super-login-copy {
  display: grid;
  gap: 10px;
  padding: 10px 8px;
}

.super-login-copy span,
.super-hero span {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(11, 129, 120, 0.16);
  border-radius: 999px;
  background: #f0fbf9;
  color: #0b8178;
  font-size: 12px;
  font-weight: 850;
}

.super-login-copy h1,
.super-hero h1 {
  margin: 0;
  color: #122033;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.super-login-copy p,
.super-hero p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.super-login-box {
  padding: 18px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(30, 48, 70, 0.06);
}

.super-login-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.super-workspace {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.super-nav {
  position: sticky;
  top: 70px;
  display: grid;
  gap: 8px;
}

.super-nav a,
.super-nav button {
  width: 100%;
}

.super-view-stack {
  display: grid;
  gap: 14px;
}

.super-section {
  display: grid;
  gap: 14px;
}

.super-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
}

.super-hero div {
  display: grid;
  gap: 8px;
}

.super-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.super-metrics div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(30, 48, 70, 0.05);
}

.super-metrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.super-metrics strong {
  color: #122033;
  font-size: 28px;
  line-height: 1;
}

.super-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.super-card,
.super-table-panel {
  padding: 16px;
}

.super-card textarea {
  min-height: 84px;
}

.super-tips {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.super-tips span {
  padding: 9px 10px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.super-table-panel .table-wrap {
  margin-top: 0;
}

.super-section .invite-table {
  min-width: 980px;
}

#templateTextBodyInput,
#templateHtmlBodyInput {
  min-height: 180px;
}

/* Mailer visual polish */
.admin-body {
  background:
    linear-gradient(180deg, #f7fafc 0, #eef3f8 360px),
    #eef3f8;
}

.admin-body .topbar {
  border-bottom-color: rgba(202, 213, 226, 0.78);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(38, 57, 77, 0.06);
}

.admin-body .brand span:not(.brand-mark) {
  font-size: 15px;
  letter-spacing: 0;
}

.admin-body .nav a {
  border-color: #d8e2ee;
  background: #f8fbfd;
  box-shadow: 0 1px 2px rgba(30, 48, 70, 0.04);
}

.admin-body .nav a:hover {
  border-color: rgba(11, 129, 120, 0.38);
  color: var(--brand);
}

.mailer-nav,
.admin-view.panel,
.mailer-panel.panel,
.mailer-config-view.panel,
.mailer-manage.panel,
.mailer-results.panel,
.admin-login {
  border-color: rgba(203, 215, 228, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 16px 34px rgba(31, 45, 61, 0.08);
}

.mailer-nav {
  backdrop-filter: blur(12px);
}

.mailer-nav button {
  border: 1px solid transparent;
  color: #24364b;
  font-weight: 800;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.mailer-nav button:hover:not(:disabled) {
  border-color: #dce7f0;
  background: #f6fafc;
  color: #102235;
}

.mailer-nav button.active {
  border-color: rgba(11, 129, 120, 0.22);
  background: linear-gradient(180deg, #f0fbf9, #e6f6f3);
  color: #075e58;
  box-shadow: 0 6px 14px rgba(11, 129, 120, 0.12);
}

.panel-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(220, 229, 239, 0.72);
}

.panel-head h2 {
  color: #122033;
  font-weight: 850;
}

.panel-head span,
.panel-head p {
  color: #718095;
}

button {
  box-shadow: 0 7px 14px rgba(11, 129, 120, 0.14);
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(11, 129, 120, 0.18);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

.secondary,
.task-control,
.icon-button {
  border: 1px solid #d8e2ee;
  background: #fff;
  color: #304256;
  box-shadow: 0 1px 2px rgba(30, 48, 70, 0.05);
}

.secondary:hover:not(:disabled),
.task-control:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: rgba(11, 129, 120, 0.35);
  background: #f7fbfa;
  color: var(--brand);
  box-shadow: 0 6px 14px rgba(30, 48, 70, 0.08);
}

input,
select,
textarea {
  border-color: #d6e0eb;
  background: #fbfdff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c6d4e3;
}

input:focus,
select:focus,
textarea:focus {
  background: #fff;
}

.api-config,
.send-pool-card,
.identity-sync-card,
.identity-table-card,
.identity-detail-card,
.ops-card,
.template-preview,
.preflight-panel,
.form-status,
.mailer-status-grid span,
.mailer-counter,
.mailer-note,
.report-metrics span,
.contact-metrics span,
.cleaner-metrics span,
.identity-metrics span,
.result-metrics span,
.send-pool-metrics span,
.send-pool-preview,
.config-hints div {
  border-color: rgba(211, 222, 234, 0.94);
  background: #fbfdff;
  box-shadow: 0 1px 2px rgba(31, 45, 61, 0.035);
}

.send-pool-card,
.identity-sync-card {
  background: linear-gradient(180deg, #f7fcfb, #f2f8f7);
}

.mailer-status-grid strong,
.mailer-counter strong,
.report-metrics strong,
.contact-metrics strong,
.cleaner-metrics strong,
.identity-metrics strong,
.result-metrics strong,
.send-pool-metrics strong {
  color: #111d2d;
  font-weight: 850;
}

.table-wrap {
  border: 1px solid rgba(211, 222, 234, 0.9);
  border-radius: 8px;
  background: #fff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #dbe5ef;
  background: #f3f7fb;
  color: #24364b;
  font-weight: 850;
}

table td {
  border-bottom: 1px solid #edf2f7;
}

tbody tr:hover {
  background: #f8fbfd;
}

.selected-row {
  background: #eaf7f4 !important;
  box-shadow: inset 3px 0 0 var(--brand);
}

.status-badge,
.health-pill,
.health-issue,
.identity-chip,
.dns-badges span {
  border-radius: 999px;
}

.form-section-title {
  padding-top: 4px;
}

.form-section-title span {
  box-shadow: 0 5px 12px rgba(11, 129, 120, 0.12);
}

.template-preview pre,
.smtp-debug {
  border-color: #d7e1ec;
}

.task-action {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  background: #2f86d9;
  color: #fff;
  font-size: 12px;
}

.task-action:hover:not(:disabled) {
  background: #2374c4;
}

.task-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-control {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.task-control:hover:not(:disabled) {
  border-color: rgba(47, 134, 217, 0.45);
  color: #2374c4;
}

.task-control.danger {
  color: var(--bad);
  border-color: rgba(197, 65, 58, 0.28);
}

.ops-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.ops-checklist {
  align-content: start;
}

.ops-checklist strong {
  color: var(--text);
}

.ops-checklist span {
  color: var(--muted);
  line-height: 1.5;
}

.ok {
  color: var(--ok);
}

.bad {
  color: var(--accent);
}

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

.health-grid span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.health-grid .ok {
  color: var(--ok);
}

.health-grid .bad {
  color: var(--accent);
}

.editor-head,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.editor-head h2 {
  margin-bottom: 4px;
}

.editor-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tool-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.15fr) minmax(160px, 1fr) minmax(96px, 0.7fr) 76px repeat(3, 42px);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.tool-row input {
  min-width: 0;
}

.tool-row:hover {
  border-color: rgba(8, 117, 111, 0.32);
  background: #f5faf9;
}

.toggle-label input {
  width: auto;
  min-height: auto;
}

.toggle-label {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.simple-header {
  width: min(1120px, calc(100% - 24px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(218, 228, 239, 0.82);
  color: #304054;
  font-size: 14px;
}

.simple-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  font-size: 20px;
  font-weight: 900;
  color: #101b2b;
  overflow-wrap: anywhere;
}

.simple-brand span:last-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simple-header a:not(.simple-brand):hover {
  color: var(--primary);
}

.header-search {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 76px;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}

.header-search input {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 13px;
}

.header-search button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 13px;
}

.result-main {
  padding-top: 8px;
}

.result-panel {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(218, 228, 239, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.address-summary {
  margin: 0;
  padding: 0;
}

.record-panel {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(218, 228, 239, 0.95);
}

.address-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.address-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 14px;
}

.address-title small {
  color: #888;
}

.address-line-large {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 8px 10px;
  border: 1px solid #dce8ef;
  border-radius: 7px;
  background: #f8fbff;
  color: #101b2b;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.address-line-large #addressText {
  color: #101b2b;
}

.address-line-large span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
  white-space: nowrap;
}

.address-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.copy-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 5px;
}

.copy-button.copied {
  border-color: rgba(11, 122, 70, 0.28);
  background: #edf8f3;
  color: #0b7a46;
}

.hash-with-copy {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.hash-with-copy .hash-copy-text {
  color: #101b2b;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hash-with-copy .hash-copy-text:hover {
  text-decoration: underline;
}

.block-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.block-hash-text {
  overflow-wrap: normal;
}

.block-detail-button {
  flex: 0 0 auto;
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.inline-copy {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
}

.inline-copy i {
  width: 13px;
  height: 13px;
}

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

.summary-grid div {
  position: relative;
  overflow: hidden;
  min-height: 62px;
  padding: 12px 13px;
  border: 1px solid #e7edf4;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
}

.summary-grid div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d9e5ee;
}

.summary-grid span {
  display: block;
  margin-bottom: 6px;
  color: #5f6e7e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.summary-grid strong {
  display: block;
  color: #101b2b;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-trx {
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
}

.metric-trx::before {
  background: var(--blue);
}

.metric-trx strong {
  color: var(--blue);
}

.metric-usdt {
  background: linear-gradient(180deg, #ffffff, #f2fbf7);
}

.metric-usdt::before {
  background: var(--ok);
}

.metric-usdt strong {
  color: var(--ok);
}

.metric-cny {
  background: linear-gradient(180deg, #ffffff, #fff9ee);
}

.metric-cny::before {
  background: var(--amber);
}

.metric-cny strong {
  color: var(--amber);
}

.metric-energy::before {
  background: var(--violet);
}

.metric-time::before {
  background: #8ba0b4;
}

.metric-time strong {
  font-size: 17px;
}

.record-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e5e8ec;
}

.record-tabs a {
  margin-bottom: -1px;
  padding: 9px 20px;
  color: #506174;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  font-weight: 700;
}

.record-tabs a.active {
  color: var(--primary);
  border-color: #dce8ef;
  border-bottom-color: #fff;
  background: #fff;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #555;
  font-size: 14px;
}

.filter-row input {
  width: 150px;
  min-height: 36px;
}

.segmented {
  display: inline-flex;
  border: 1px solid #dfe6ea;
  border-radius: 7px;
  overflow: hidden;
}

.segmented button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 0;
  background: #fff;
  color: #444;
}

.segmented button.active {
  background: var(--primary);
  color: #fff;
}

.segmented button[data-direction="in"].active {
  background: var(--ok);
}

.segmented button[data-direction="out"].active {
  background: var(--accent);
}

.result-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #666;
  font-size: 13px;
}

#loadingState {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6f5;
  color: #0a7b72;
  font-weight: 700;
}

.total-line {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #e7edf4;
  border-radius: 7px;
  background: #fbfcfd;
  color: #333;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0a7b72;
  font: inherit;
}

.link-button:hover {
  background: transparent;
  text-decoration: underline;
}

.block-hash-text {
  color: var(--muted);
  overflow-wrap: normal;
}

.peer-links {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 6px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.peer-links .peer-link {
  color: #101b2b;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  white-space: nowrap;
}

.peer-link {
  color: #101b2b;
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  white-space: nowrap;
}

.peer-link:hover {
  text-decoration: underline;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.35);
}

.modal-card {
  width: min(420px, 100%);
  padding: 20px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-card h2 {
  margin-bottom: 14px;
}

.modal-card p {
  margin-bottom: 10px;
  color: #555;
  overflow-wrap: anywhere;
}

.modal-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.modal-copy-row span {
  min-width: 0;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.email-preview-card {
  width: min(980px, 100%);
  max-height: min(92vh, 820px);
  display: grid;
  gap: 14px;
  overflow: auto;
}

.email-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#closeEmailPreview {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.email-preview-head p {
  margin: 4px 0 0;
}

.email-preview-meta {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.email-preview-meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.email-preview-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.email-preview-meta strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.email-preview-tabs {
  display: flex;
  gap: 8px;
}

.email-preview-tabs button {
  min-height: 34px;
}

.email-preview-tabs button.active {
  background: var(--primary);
  color: #fff;
}

.email-preview-frame,
.email-preview-text {
  width: 100%;
  min-height: 360px;
  border: 1px solid #d8e3ec;
  border-radius: 8px;
  background: #fff;
}

.email-preview-text {
  margin: 0;
  padding: 18px;
  color: #263445;
  white-space: pre-wrap;
  overflow: auto;
}

.email-preview-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.qr-modal-card {
  text-align: center;
}

.qr-code-box {
  width: 232px;
  min-height: 232px;
  display: grid;
  place-items: center;
  margin: 8px auto 10px;
}

.qr-code-box canvas,
.qr-code-box img {
  width: 232px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.qr-address {
  margin-bottom: 14px;
  color: #101b2b;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.home-main {
  width: min(960px, calc(100% - 24px));
  padding-top: 46px;
}

.home-search {
  margin: 0 auto 26px;
  text-align: center;
}

.home-search h1 {
  max-width: none;
  margin-bottom: 12px;
  color: #152133;
  font-size: 40px;
  font-weight: 900;
}

.home-search p {
  width: min(680px, 100%);
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.home-search [data-hero-subtitle]:empty {
  display: none;
}

.home-search-form {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  border: 1px solid #d8e2e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(28, 48, 72, 0.09);
  overflow: hidden;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.home-search-form::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(8, 117, 111, 0.12) 45%, rgba(18, 145, 133, 0.18) 52%, transparent 62%);
  opacity: 0;
  transform: translateX(-110%);
}

.home-search-form:focus-within {
  border-color: rgba(8, 117, 111, 0.58);
  box-shadow:
    0 18px 36px rgba(28, 48, 72, 0.12),
    0 0 0 4px rgba(8, 117, 111, 0.12);
  transform: translateY(-1px);
}

.home-search-form:focus-within::before {
  opacity: 1;
  animation: search-sheen 1.4s ease;
}

.home-search-form input {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-search-form button {
  position: relative;
  z-index: 1;
  flex: 0 0 104px;
  min-height: 50px;
  border-radius: 0;
  gap: 7px;
  overflow: hidden;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.home-search-form button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}

.home-search-form button:hover::after {
  transform: translateX(120%);
}

.home-search-form button i {
  width: 17px;
  height: 17px;
}

@keyframes search-sheen {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(110%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-search-form,
  .home-search-form button,
  .home-search-form::before,
  .home-search-form button::after {
    transition: none;
    animation: none;
  }
}

.home-prices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}

.price-item {
  min-height: 82px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 12px;
  border: 1px solid #e5ecf3;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  box-shadow: 0 10px 26px rgba(28, 48, 72, 0.055);
}

.price-item:nth-child(1) strong {
  color: var(--primary);
}

.price-item:nth-child(2) strong {
  color: var(--amber);
}

.price-item:nth-child(3) strong {
  color: var(--accent);
}

.price-item:nth-child(4) strong {
  color: var(--blue);
}

.price-item span {
  color: #555;
  font-size: 13px;
}

.price-item strong {
  margin-top: 5px;
  color: #111;
  font-size: 22px;
}

.price-item small {
  color: #777;
}

.home-prices p {
  grid-column: 1 / -1;
  margin: 0;
  color: #555;
  text-align: center;
  font-size: 13px;
}

.home-links {
  margin-bottom: 18px;
  text-align: center;
}

.home-link-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.home-link-list .tool-card {
  min-height: auto;
  display: inline-flex;
  max-width: 100%;
  width: auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #eef8f6;
  color: var(--primary);
  line-height: 1.5;
  box-shadow: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-link-list .tool-card svg {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.home-link-list .tool-card strong {
  font-size: 14px;
}

.home-link-list .tool-card span {
  margin-left: 0;
  color: currentColor;
  font-size: 13px;
  opacity: 0.78;
}

.home-link-list .tool-card:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.home-link-list .tool-card-disabled:hover {
  transform: none;
}

.tool-tone-1 {
  background: #eef8f6 !important;
  color: var(--primary) !important;
}

.tool-tone-2 {
  background: #eef4ff !important;
  color: var(--blue) !important;
}

.tool-tone-3 {
  background: #fff5e5 !important;
  color: var(--amber) !important;
}

.tool-tone-4 {
  background: #fff1ed !important;
  color: var(--accent) !important;
}

.tool-tone-5 {
  background: #f4f0ff !important;
  color: var(--violet) !important;
}

.tool-tone-6 {
  background: #fff0f6 !important;
  color: var(--pink) !important;
}

.result-links {
  margin: 18px 0 0;
  padding: 0 6px;
}

.batch-entry {
  display: inline-block;
  margin-top: 12px;
  color: #0a7b72;
  font-weight: 700;
}

.batch-lite {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e5e8ec;
  border-radius: 8px;
  background: #fbfcfd;
}

.batch-lite h2 {
  margin-bottom: 10px;
  color: #26343d;
  font-size: 16px;
}

.batch-page h1 {
  margin-bottom: 6px;
  color: #26343d;
  font-size: 22px;
}

.batch-page p {
  margin-bottom: 12px;
  color: #65727d;
  font-size: 14px;
}

.balances-main {
  padding-top: 18px;
}

.result-main .batch-lite {
  margin: 18px 0 0;
}

.batch-lite textarea {
  min-height: 116px;
  border-radius: 5px;
  background: #fff;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.batch-lite .batch-actions {
  justify-content: flex-start;
  margin: 10px 0;
}

.batch-dedupe-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #52616b;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.batch-dedupe-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.batch-lite .batch-totals {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 10px 0;
}

.batch-lite .batch-totals span {
  padding: 10px 12px;
  border: 1px solid #e5e8ec;
  border-radius: 5px;
  background: #fff;
  color: #65727d;
  font-size: 13px;
}

.batch-lite .batch-totals strong {
  color: #202b33;
  font-size: 17px;
}

.batch-table {
  margin-top: 12px;
}

.batch-table .mono a {
  color: #101b2b;
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
  white-space: nowrap;
}

.batch-table .mono a:hover {
  text-decoration: underline;
}

.status-badge {
  min-width: 58px;
  display: inline-flex;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid #dfe6ea;
  border-radius: 999px;
  background: #f7fafc;
  color: #65727d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.ok {
  border-color: rgba(11, 122, 70, 0.24);
  background: #edf8f3;
  color: #0b7a46;
}

.status-badge.bad {
  border-color: rgba(185, 71, 47, 0.25);
  background: #fff2ef;
  color: #b9472f;
}

.status-badge.pending {
  border-color: rgba(8, 117, 111, 0.22);
  background: #eef8f6;
  color: #08756f;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: #55636d;
  font-size: 14px;
}

.pagination-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-range {
  color: var(--muted);
  white-space: nowrap;
}

.pagination-bar input,
.pagination-bar select {
  width: 74px;
  min-height: 34px;
  padding: 0 8px;
  text-align: center;
}

.pagination-bar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 880px) {
  .topbar {
    padding: 0 14px;
  }

  .nav {
    display: none;
  }

  .support-link {
    font-size: 0;
  }

  .admin-link {
    display: none;
  }

  main {
    width: min(100% - 22px, 1120px);
    padding-top: 14px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.16;
  }

  .home-search h1 {
    font-size: 30px;
    line-height: 1.18;
  }

  .hero {
    min-height: 300px;
    padding: 22px;
  }

  .hero-side {
    display: none;
  }

  .search-panel,
  .ticker-band,
  .home-prices,
  .tool-list,
  .dashboard,
  .asset-grid,
  .admin-health,
  .health-grid,
  .mailer-status-grid,
  .mailer-workspace,
  .mailer-layout,
  .mailer-manage-grid,
  .contact-layout,
  .cleaner-layout,
  .template-layout,
  .blacklist-guide,
  .send-pool-metrics,
  .config-action-bar,
  .config-hints,
  .test-channel-grid,
  .report-metrics,
  .contact-metrics,
  .cleaner-metrics,
  .identity-metrics,
  .result-metrics,
  .identity-sync-card,
  .identity-secondary-grid,
  .mailer-front-hero,
  .front-band,
  .batch-totals,
  .hero,
  .form-grid,
  .form-grid.single,
  .tool-row,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .send-control-center {
    align-items: stretch;
    flex-direction: column;
  }

  .send-control-center > div:first-child {
    min-width: 0;
  }

  .preset-actions {
    justify-content: stretch;
  }

  .preset-actions button {
    flex: 1 1 150px;
  }

  .home-search-form {
    display: flex;
  }

  .mailer-nav {
    position: static;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .mailer-nav button {
    flex: 0 0 auto;
  }

  .home-search-form button {
    flex-basis: 82px;
    padding-inline: 12px;
  }

  .filter-row {
    align-items: stretch;
  }

  .address-summary-head {
    align-items: stretch;
    flex-direction: column;
  }

  .simple-header {
    flex-wrap: wrap;
    padding-bottom: 10px;
  }

  .header-search {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 72px;
    margin-left: 0;
  }

  .filter-row input,
  .filter-row button,
  .segmented,
  .pagination-bar button,
  .pagination-bar label {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .pagination-bar {
    align-items: stretch;
    justify-content: stretch;
  }

  .pagination-bar label {
    justify-content: space-between;
  }

  .page-range {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .pagination-bar input {
    flex: 1;
  }

  table {
    min-width: 760px;
  }
}


@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #ffffff 0, var(--bg) 220px);
  }

  .simple-header {
    width: min(100% - 20px, 1120px);
    min-height: 0;
    gap: 8px 12px;
    padding: 8px 0 10px;
    align-items: center;
  }

  .simple-brand {
    flex: 1 1 100%;
    max-width: 100%;
    font-size: 19px;
  }

  .brand-mark-small {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    margin-right: 7px;
  }

  .simple-header > a:not(.simple-brand) {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    color: #4c5b6b;
    font-size: 14px;
    white-space: nowrap;
  }

  .header-search {
    order: 5;
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 6px;
    width: 100%;
    margin-top: 2px;
  }

  .header-search input,
  .header-search button {
    min-height: 38px;
    font-size: 14px;
  }

  main,
  .home-main {
    width: min(100% - 20px, 1120px);
  }

  .result-main {
    padding-top: 8px;
  }

  .result-panel {
    padding: 12px;
    border-radius: 7px;
    box-shadow: 0 8px 22px rgba(30, 48, 70, 0.07);
  }

  .address-summary-head {
    gap: 8px;
  }

  .address-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
  }

  .address-summary-head #toggleBatch {
    width: 100%;
    min-height: 38px;
  }

  .address-line-large {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 10px 0 12px;
    padding: 9px;
    font-size: 13px;
  }

  .address-line-large span {
    align-self: center;
    line-height: 1.45;
    width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .address-actions {
    justify-self: end;
    align-self: center;
    gap: 5px;
  }

  .copy-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .summary-grid {
    gap: 8px;
  }

  .summary-grid div {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px 12px 14px;
  }

  .summary-grid span {
    margin: 0;
    flex: 0 0 auto;
    font-size: 13px;
  }

  .summary-grid strong {
    min-width: 0;
    text-align: right;
    font-size: 21px;
  }

  .metric-time strong {
    font-size: 16px;
  }

  .record-panel {
    margin-top: 14px;
    padding-top: 14px;
  }

  .record-tabs {
    gap: 6px;
    margin-bottom: 10px;
  }

  .record-tabs a {
    flex: 1;
    padding: 9px 10px;
    text-align: center;
  }

  .filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .filter-row > span:first-child,
  .filter-row .segmented,
  .filter-row button {
    grid-column: 1 / -1;
  }

  .filter-row > span:not(:first-child) {
    display: none;
  }

  .filter-row input,
  .filter-row button,
  .segmented {
    width: 100%;
  }

  .filter-row input {
    min-height: 38px;
    font-size: 14px;
  }

  .segmented button {
    min-height: 38px;
  }

  .result-tools {
    gap: 8px;
    margin-bottom: 8px;
  }

  #loadingState {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .total-line {
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.55;
  }

  .table-wrap {
    border-radius: 7px;
  }

  .record-panel > .table-wrap {
    scrollbar-width: thin;
  }

  .record-panel > .table-wrap::-webkit-scrollbar {
    height: 6px;
    display: block;
  }

  #recordTable {
    min-width: 986px;
  }

  #recordTable th,
  #recordTable td {
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 13px;
  }

  #recordTable th:nth-child(1),
  #recordTable td:nth-child(1) {
    width: 142px;
    min-width: 142px;
  }

  #recordTable th:nth-child(2),
  #recordTable td:nth-child(2) {
    width: 304px;
    min-width: 304px;
  }

  #recordTable th:nth-child(4),
  #recordTable td:nth-child(4) {
    width: 126px;
    min-width: 126px;
    padding-left: 20px;
  }

  #recordTable th:nth-child(5),
  #recordTable td:nth-child(5),
  #recordTable th:nth-child(6),
  #recordTable td:nth-child(6) {
    width: 132px;
    min-width: 132px;
  }

  .amount-badge {
    padding: 3px 7px;
    font-size: 12px;
  }

  .pagination-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
    font-size: 13px;
  }

  .pagination-bar > span,
  .pagination-bar label {
    grid-column: 1 / -1;
  }

  .pagination-bar button {
    width: 100%;
    min-height: 38px;
  }

  .pagination-bar label {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
  }

  .pagination-bar input,
  .pagination-bar select {
    width: 92px;
  }

  .batch-lite {
    padding: 12px;
  }

  .batch-lite textarea {
    min-height: 132px;
  }

  .batch-dedupe-option {
    min-height: 38px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }

  .home-main {
    padding-top: 26px;
  }

  .home-search {
    padding-top: 6px;
  }

  .home-search h1 {
    font-size: 28px;
  }

  .home-search-form {
    min-height: 48px;
  }

  .home-search-form input {
    min-width: 0;
    padding-inline: 12px;
  }

  .home-search-form button {
    flex: 0 0 74px;
    min-width: 74px;
    padding-inline: 10px;
  }

  .home-prices {
    gap: 8px;
  }

  .home-link-list {
    justify-content: flex-start;
  }

  .home-link-list .tool-card {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 390px) {
  .simple-header {
    gap: 6px 10px;
  }

  .simple-brand {
    font-size: 18px;
  }

  .simple-header > a:not(.simple-brand) {
    font-size: 13px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .home-search h1 {
    font-size: 25px;
  }
}

@media (max-width: 1080px) {
  .tool-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 72px repeat(3, 42px);
  }

  .tool-row label:nth-child(3),
  .tool-row label:nth-child(4) {
    grid-column: span 2;
  }
}

@media (max-width: 880px) {
  .admin-health {
    align-items: stretch;
  }

  .admin-health button,
  .admin-actions button,
  .editor-actions button,
  .batch-actions button,
  .batch-actions .button-link,
  .result-tools button {
    width: 100%;
  }

  .result-tools,
  .batch-actions,
  .admin-actions,
  .admin-preview-links,
  .editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-preview-links .button-link {
    width: 100%;
  }

  .tool-row {
    grid-template-columns: 1fr;
  }

  .tool-row label:nth-child(3),
  .tool-row label:nth-child(4) {
    grid-column: auto;
  }
}
