.meshsmtp-wrap {
  --meshsmtp-bg: radial-gradient(circle at 15% 15%, #dcfce7 0%, #eef2ff 35%, #f8fafc 68%, #ffffff 100%);
  --meshsmtp-border: #cbd5e1;
  --meshsmtp-accent: #0ea5e9;
  --meshsmtp-accent-strong: #0284c7;
  --meshsmtp-ink: #0f172a;
  --meshsmtp-muted: #475569;
  --meshsmtp-card: rgba(255, 255, 255, 0.9);
  background: var(--meshsmtp-bg);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.55);
  margin: 16px 12px 0 0;
  padding: 22px;
}

.meshsmtp-hero {
  align-items: flex-start;
  background: linear-gradient(120deg, #0f172a, #0b4f6c 52%, #0d9488);
  border-radius: 14px;
  color: #f8fafc;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 16px 18px;
}

.meshsmtp-hero h1 {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.meshsmtp-hero p {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.meshsmtp-badge,
.meshsmtp-badge-inline {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

.meshsmtp-badge-inline {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.meshsmtp-statusbar {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  color: #334155;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
  padding: 12px 14px;
  font-size: 13px;
}

.meshsmtp-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.meshsmtp-card-stack {
  display: grid;
  gap: 18px;
}

.meshsmtp-card {
  background: var(--meshsmtp-card);
  backdrop-filter: blur(5px);
  border: 1px solid var(--meshsmtp-border);
  border-radius: 14px;
  box-shadow: 0 12px 30px -26px rgba(15, 23, 42, 0.7);
  padding: 18px;
}

.meshsmtp-card h2,
.meshsmtp-card h3 {
  color: var(--meshsmtp-ink);
  margin-top: 0;
}

.meshsmtp-card h3 {
  margin-bottom: 8px;
}

.meshsmtp-card p,
.meshsmtp-card li,
.meshsmtp-field .description {
  color: var(--meshsmtp-muted);
}

.meshsmtp-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meshsmtp-card-head h2,
.meshsmtp-card-head h3,
.meshsmtp-card-head p {
  margin: 0;
}

.meshsmtp-card-head-lg {
  margin-bottom: 18px;
}

.meshsmtp-field {
  margin-bottom: 12px;
}

.meshsmtp-field label {
  color: var(--meshsmtp-ink);
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.meshsmtp-field input,
.meshsmtp-field select,
.meshsmtp-copy-row textarea {
  border: 1px solid #94a3b8;
  border-radius: 10px;
  box-shadow: none;
  color: var(--meshsmtp-ink);
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.meshsmtp-field input:focus,
.meshsmtp-field select:focus,
.meshsmtp-copy-row textarea:focus {
  border-color: var(--meshsmtp-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.meshsmtp-field input:disabled,
.meshsmtp-field select:disabled,
.meshsmtp-copy-row textarea:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
}

.meshsmtp-field-inline {
  margin-bottom: 16px;
}

.meshsmtp-field-row .description,
.meshsmtp-readonly-note {
  margin-bottom: 0;
}

.meshsmtp-readonly-note {
  color: #92400e !important;
  font-weight: 600;
}

.meshsmtp-preset-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.meshsmtp-preset-row select {
  flex: 1 1 auto;
}

.meshsmtp-dual {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.meshsmtp-toggle {
  align-items: center;
  background: linear-gradient(95deg, #e0f2fe, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px;
}

.meshsmtp-toggle label {
  color: var(--meshsmtp-ink);
  font-weight: 700;
}

.meshsmtp-toggle p {
  margin: 4px 0 0;
}

.meshsmtp-password-wrap {
  display: flex;
  gap: 10px;
}

.meshsmtp-password-wrap input {
  flex: 1 1 auto;
}

.meshsmtp-password-toggle,
.meshsmtp-tertiary,
.meshsmtp-primary,
.meshsmtp-secondary {
  border-radius: 999px;
  font-weight: 700;
  min-height: 38px;
  padding: 0 16px;
}

.meshsmtp-password-toggle {
  min-height: 40px;
  white-space: nowrap;
}

.meshsmtp-tertiary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.meshsmtp-primary {
  background: linear-gradient(120deg, var(--meshsmtp-accent), var(--meshsmtp-accent-strong));
  border-color: #0369a1;
  color: #ffffff;
}

.meshsmtp-primary:hover,
.meshsmtp-primary:focus {
  background: linear-gradient(120deg, #0284c7, #0369a1);
  border-color: #0369a1;
  color: #ffffff;
}

.meshsmtp-secondary {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.meshsmtp-secondary:hover,
.meshsmtp-secondary:focus {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}

.meshsmtp-provider-detect-result {
  margin-top: 8px;
}

.meshsmtp-provider-detect-result.is-success {
  color: #065f46;
  font-weight: 700;
}

.meshsmtp-provider-detect-result.is-warning {
  color: #92400e;
  font-weight: 700;
}

.meshsmtp-stepper {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.meshsmtp-step {
  margin: 0;
}

.meshsmtp-step-trigger {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  color: var(--meshsmtp-ink);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  width: 100%;
}

.meshsmtp-step.is-active .meshsmtp-step-trigger {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border-color: #7dd3fc;
}

.meshsmtp-step.is-complete .meshsmtp-step-trigger {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border-color: #86efac;
}

.meshsmtp-step-count {
  align-items: center;
  background: #0f172a;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.meshsmtp-step.is-active .meshsmtp-step-count {
  background: var(--meshsmtp-accent-strong);
}

.meshsmtp-step.is-complete .meshsmtp-step-count {
  background: #15803d;
}

.meshsmtp-step-label {
  font-weight: 700;
}

.meshsmtp-pane-head {
  margin-bottom: 14px;
}

.meshsmtp-pane-head h3 {
  margin-bottom: 4px;
}

.meshsmtp-provider-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 16px;
}

.meshsmtp-provider-tile {
  align-items: flex-start;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  color: var(--meshsmtp-ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 88px;
  padding: 14px;
  text-align: left;
}

.meshsmtp-provider-tile.is-active {
  border-color: #38bdf8;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.25);
  background: linear-gradient(180deg, #eff6ff, #ecfeff);
}

.meshsmtp-provider-tile span {
  color: var(--meshsmtp-muted);
  font-size: 12px;
  line-height: 1.45;
}

.meshsmtp-provider-tile:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.meshsmtp-pane-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.meshsmtp-guidance-card,
.meshsmtp-inline-card,
.meshsmtp-summary-band,
.meshsmtp-finish-panel {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.7));
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 14px;
}

.meshsmtp-guidance-card h3,
.meshsmtp-inline-card h3 {
  margin-bottom: 8px;
}

.meshsmtp-guidance-list {
  margin: 0;
  padding-left: 18px;
}

.meshsmtp-guidance-list-compact {
  margin-top: 12px;
}

.meshsmtp-summary-band {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 14px;
}

.meshsmtp-finish-panel {
  margin-bottom: 14px;
}

.meshsmtp-finish-badge {
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 6px 10px;
}

.meshsmtp-status-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.72));
}

.meshsmtp-status-copy {
  margin: 0 0 14px;
}

.meshsmtp-status-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
}

.meshsmtp-status-chip.is-success {
  background: #dcfce7;
  color: #166534;
}

.meshsmtp-status-chip.is-warning {
  background: #fef3c7;
  color: #92400e;
}

.meshsmtp-status-chip.is-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.meshsmtp-status-chip.is-muted {
  background: #e2e8f0;
  color: #334155;
}

.meshsmtp-stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 14px;
}

.meshsmtp-stat {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 12px;
}

.meshsmtp-stat-label {
  color: var(--meshsmtp-muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.meshsmtp-stat strong {
  color: var(--meshsmtp-ink);
  display: block;
  font-size: 15px;
}

.meshsmtp-meta-list {
  list-style: none !important;
  margin: 0;
  padding-left: 0 !important;
}

.meshsmtp-meta-list li {
  margin-bottom: 8px;
}

.meshsmtp-compact-list li {
  margin-bottom: 6px;
}

.meshsmtp-provider-notes {
  display: grid;
  gap: 10px;
}

.meshsmtp-disclosure {
  display: block;
}

.meshsmtp-disclosure-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
}

.meshsmtp-disclosure-summary::-webkit-details-marker {
  display: none;
}

.meshsmtp-disclosure-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meshsmtp-disclosure-title {
  color: var(--meshsmtp-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.meshsmtp-disclosure-copy {
  color: var(--meshsmtp-muted);
  line-height: 1.5;
}

.meshsmtp-disclosure-hint {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  padding: 5px 10px;
  white-space: nowrap;
}

.meshsmtp-disclosure-hint::before {
  color: #0f172a;
  content: '+';
  font-size: 14px;
  line-height: 1;
}

.meshsmtp-disclosure[open] .meshsmtp-disclosure-hint::before {
  content: '-';
}

.meshsmtp-disclosure-content {
  margin-top: 14px;
}

.meshsmtp-provider-note {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 12px;
}

.meshsmtp-provider-note h3 {
  margin-bottom: 6px;
}

.meshsmtp-provider-note p {
  margin: 0;
}

.meshsmtp-copy-row {
  display: grid;
  gap: 10px;
}

.meshsmtp-copy-row textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
  min-height: 220px;
  resize: vertical;
}

.meshsmtp-copy-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.meshsmtp-copy-status {
  color: #0f766e;
  font-weight: 700;
}

.meshsmtp-section-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.meshsmtp-section-head p {
  margin: 0;
}

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

.meshsmtp-log-table {
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  overflow: hidden;
}

.meshsmtp-log-table th,
.meshsmtp-log-table td {
  vertical-align: top;
}

.meshsmtp-status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
}

.meshsmtp-status-pill.is-success {
  background: #dcfce7;
  color: #166534;
}

.meshsmtp-status-pill.is-failed {
  background: #fee2e2;
  color: #991b1b;
}

.meshsmtp-empty-state {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.7), rgba(248, 250, 252, 0.95));
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  padding: 18px;
}

.meshsmtp-empty-state p {
  margin: 0;
}

.meshsmtp-empty-state p + p {
  margin-top: 8px;
}

.meshsmtp-log-card {
  margin-top: 18px;
}

.meshsmtp-footer-note {
  color: #475569;
  font-size: 12px;
  margin-top: 14px;
  text-align: center;
}

.meshsmtp-footer-note p {
  margin: 0;
}

.meshsmtp-footer-note a {
  font-weight: 700;
  margin-left: 4px;
}

.meshsmtp-wrap .notice p {
  color: #0f172a !important;
  font-weight: 600;
}

@media (min-width: 900px) {
  .meshsmtp-field-row {
    align-items: center;
    column-gap: 14px;
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
  }

  .meshsmtp-field-row label {
    margin-bottom: 0;
  }

  .meshsmtp-field-row > input,
  .meshsmtp-field-row > select,
  .meshsmtp-field-row > .meshsmtp-password-wrap,
  .meshsmtp-field-row > .meshsmtp-preset-row,
  .meshsmtp-field-row > .description {
    grid-column: 2;
  }

  .meshsmtp-field-row > .description {
    margin-top: 4px;
  }

  .meshsmtp-dual {
    align-items: start;
    column-gap: 14px;
    grid-template-columns: 235px minmax(0, 1fr) minmax(0, 1fr);
  }

  .meshsmtp-dual::before {
    content: '';
  }

  .meshsmtp-dual > .meshsmtp-field {
    margin-bottom: 0;
  }
}

@media (max-width: 1100px) {
  .meshsmtp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 782px) {
  .meshsmtp-wrap {
    margin-right: 0;
    padding: 14px;
  }

  .meshsmtp-hero,
  .meshsmtp-card-head,
  .meshsmtp-section-head,
  .meshsmtp-copy-actions,
  .meshsmtp-pane-actions {
    flex-direction: column;
  }

  .meshsmtp-stepper {
    grid-template-columns: 1fr 1fr;
  }

  .meshsmtp-preset-row,
  .meshsmtp-password-wrap {
    display: grid;
    grid-template-columns: 1fr;
  }

  .meshsmtp-toggle {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .meshsmtp-pane-actions {
    align-items: stretch;
  }

  .meshsmtp-pane-actions .button {
    width: 100%;
  }
}
