* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: transparent;
  margin: 0;
  padding: 20px;
  color: #f0e9e4;
  position: relative;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  inset: -5%;
  width: 110%;
  height: 110%;
  background: url('/copper-wave-bg.jpg') center/cover no-repeat;
  filter: grayscale(100%) sepia(75%) saturate(230%) hue-rotate(-6deg) brightness(1) contrast(1.1);
  z-index: -2;
  animation: bg-drift 16s ease-in-out infinite alternate;
}
@keyframes bg-drift {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.08) translate(-1.5%, -1%); }
  100% { transform: scale(1.15) translate(1.5%, 1%); }
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0.2) 50%, rgba(10,10,10,0.4) 100%);
  z-index: -1;
}
#app { max-width: 560px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 4px; color: #fff; }
h2 { font-size: 16px; margin: 0 0 12px; color: #fff; }
.header { display: flex; justify-content: space-between; align-items: center; }
.card {
  background: rgba(15,13,12,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border: 1px solid rgba(184,115,51,0.15);
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid #3a332e;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: rgba(26,22,20,0.7);
  color: #f0e9e4;
}
input::placeholder, textarea::placeholder { color: #8a7a6e; }
.label { font-size: 14px; font-weight: 600; color: #ddd0c5; display: block; margin-bottom: 10px; }
.step-indicator { font-size: 12px; color: #a08d7d; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #ccc;
  margin-bottom: 10px;
}
.checkbox-row input { width: auto; margin: 0; }
.button-row { display: flex; gap: 8px; margin-bottom: 12px; }
button {
  background: #B87333;
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}
button.secondary { background: rgba(255,255,255,0.06); color: #ddd0c5; }
button.secondary.active { background: #B87333; color: white; }
button.small { padding: 8px 14px; font-size: 13px; }
button:hover { opacity: 0.92; }
.step-nav { display: flex; justify-content: space-between; margin-top: 8px; }
.step-nav button { flex: 1; }
.step-nav button:first-child { flex: 0 0 auto; margin-right: 10px; }
.error { color: #ff8080; font-size: 13px; }
.success { color: #80ff9f; font-size: 13px; }
.link-text { color: #D9925A; font-size: 13px; cursor: pointer; margin: 4px 0 0; text-align: center; }
.link-text-inline { color: #D9925A; cursor: pointer; text-decoration: underline; }
.hint-text { font-size: 12px; color: #ddd0c5; margin: -6px 0 12px; text-shadow: 0 2px 6px rgba(0,0,0,0.85); }
.more-options {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 0;
}
.more-options summary {
  padding: 10px 14px;
  font-size: 13px;
  color: #D9925A;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.more-options summary::-webkit-details-marker { display: none; }
.more-options summary::before { content: "▸ "; }
.more-options[open] summary::before { content: "▾ "; }
.more-options-body { padding: 4px 14px 14px; }
.more-options-body input, .more-options-body select { margin-bottom: 8px; }
.edit-banner {
  background: rgba(184,115,51,0.12);
  color: #D9925A;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
button.danger { background: #b02a2a; color: white; }
.email-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.email-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.email-item-actions button { padding: 6px 10px; font-size: 12px; }
.recipient-row { display: flex; gap: 8px; align-items: center; }
.recipient-row input { flex: 1; }
.preview-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  white-space: pre-wrap;
  margin-bottom: 12px;
  color: #f0e9e4;
}
.preview-meta { font-size: 13px; color: #a08d7d; margin-bottom: 4px; }
.wizard-nav { display: flex; gap: 6px; margin-bottom: 20px; }
.wizard-nav button { flex: 1; background: rgba(255,255,255,0.06); color: #a08d7d; padding: 10px 4px; font-size: 12px; font-weight: 600; border-radius: 8px; line-height: 1.3; }
.wizard-nav button .wizard-num { display: block; font-size: 14px; margin-bottom: 2px; }
.wizard-nav button.active { background: #B87333; color: white; }
.wizard-nav button.done { background: rgba(184,115,51,0.25); color: #D9925A; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-next-btn { width: 100%; margin-top: 6px; }
.email-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
}
.email-item:last-child { border-bottom: none; }
.status-scheduled { color: #D9925A; }
.status-sent { color: #80ff9f; }
.status-failed { color: #ff8080; }
.status-cancelled, .status-skipped_unsubscribed { color: #8a7a6e; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal { max-width: 380px; width: 100%; margin: 0; }

.hero-intro {
  text-align: center;
  margin-bottom: 20px;
  background: rgba(15,16,19,0.55);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,166,77,0.4);
  border-radius: 12px;
  padding: 18px 20px;
}
.hero-intro .welcome-tag { color: #ffa64d; font-size: 14px; margin: 0 0 2px; text-shadow: 0 2px 8px rgba(0,0,0,0.85); font-weight: bold; }
.hero-intro .tagline { color: #ddd0c5; font-size: 12px; margin: 0 0 14px; text-shadow: 0 2px 8px rgba(0,0,0,0.85); }
.hero-intro p { color: #ffffff; font-size: 14px; line-height: 1.5; margin: 0; text-shadow: 0 2px 8px rgba(0,0,0,0.85); }
.hero-intro a { color: #D9925A; }

.welcome-card {
  background: rgba(15,13,12,0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(184,115,51,0.2);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #ddd0c5;
  position: relative;
}
.welcome-card .close-x { position: absolute; top: 10px; right: 14px; cursor: pointer; color: #a08d7d; font-size: 18px; }
.trust-line { font-size: 11px; color: #ddd0c5; text-align: center; margin-top: 8px; text-shadow: 0 2px 6px rgba(0,0,0,0.85); }

.scheduler-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,166,77,0.25);
  text-align: center;
  font-size: 12px;
  color: #ddd0c5;
}
.scheduler-footer a {
  color: #ffa64d;
  text-decoration: none;
}
.scheduler-footer a:hover {
  text-decoration: underline;
}
.scheduler-footer #footerContactBox {
  margin-bottom: 8px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}
.scheduler-footer .footer-links {
  margin-bottom: 6px;
  color: #a08d7d;
}
.scheduler-footer .footer-links span {
  margin: 0 6px;
  color: #a08d7d;
}
.scheduler-footer .footer-copy {
  color: #8a7a6e;
  font-size: 11px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}

.howto-details {
  background: rgba(15,16,19,0.55);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,166,77,0.4);
  border-radius: 12px;
  padding: 4px 20px;
  margin-bottom: 20px;
}
.howto-details summary {
  cursor: pointer;
  padding: 14px 16px;
  margin: 10px 0;
  color: #ffa64d;
  font-weight: bold;
  font-size: 14px;
  text-shadow: none;
  list-style: none;
  background: rgba(255,166,77,0.15);
  border: 2px solid rgba(255,166,77,0.6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
}
.howto-details summary:hover {
  background: rgba(255,166,77,0.25);
}
.howto-details summary:active {
  background: rgba(255,166,77,0.35);
}
.howto-details summary::-webkit-details-marker {
  display: none;
}
.howto-details summary::after {
  content: "+";
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  font-size: 16px;
  border-radius: 50%;
  background: rgba(255,166,77,0.9);
  color: #0f1013;
  flex-shrink: 0;
}
.howto-details[open] summary::after {
  content: "\2212";
}
.howto-steps {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.7;
  text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}
.howto-steps li {
  margin-bottom: 8px;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #a7f3c4;
  text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}
.pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 rgba(52,211,153,0.6);
  animation: pulse-glow 2s infinite;
}
.pulse-dot.small {
  width: 7px;
  height: 7px;
  margin-right: 5px;
  vertical-align: middle;
  background: #D9925A;
  animation: pulse-glow-orange 2s infinite;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
@keyframes pulse-glow-orange {
  0% { box-shadow: 0 0 0 0 rgba(217,146,90,0.6); }
  70% { box-shadow: 0 0 0 6px rgba(217,146,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,146,90,0); }
}

.live-stat-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 18px;
  padding: 10px 18px;
  background: rgba(15,16,19,0.55);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,166,77,0.5);
  border-radius: 999px;
  font-size: 13px;
  color: #ddd0c5;
  text-shadow: 0 2px 6px rgba(0,0,0,0.85);
  width: fit-content;
}
.live-stat-card #liveStatNumber {
  font-weight: bold;
  font-size: 20px;
  color: #ffa64d;
}
.live-stat-card .live-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 8px;
  background: rgba(52,211,153,0.15);
  border: 1px solid rgba(52,211,153,0.5);
  border-radius: 999px;
  font-size: 10px;
  font-weight: bold;
  color: #34d399;
  letter-spacing: 0.5px;
}

[class*="reveal-"] {
  opacity: 0;
  animation: reveal-up 0.6s ease-out forwards;
}
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.15s; }
.reveal-3 { animation-delay: 0.25s; }
.reveal-4 { animation-delay: 0.4s; }
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.contact-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 0;
}
.contact-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: #ddd0c5;
}
.contact-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.contact-edit-form {
  margin-top: 8px;
}
.contact-edit-form input {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px;
  box-sizing: border-box;
}
button.small {
  padding: 6px 12px;
  font-size: 12px;
}
