:root {
  --bg-top: #f5f7ff;
  --bg-bottom: #e7f5ea;
  --card: #ffffffcc;
  --line: #d8e3da;
  --text: #14231a;
  --muted: #4e6354;
  --brand: #14532d;
  --brand-2: #2f855a;
  --danger: #9f1239;
  --radius: 16px;
  --shadow: 0 14px 40px rgba(20, 35, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, #fef9c3 0, transparent 36%),
    radial-gradient(circle at 85% 90%, #bbf7d0 0, transparent 40%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero h1 {
  margin: 8px 0;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--brand-2);
  text-transform: uppercase;
}

.sub {
  margin: 0 0 14px;
  color: var(--muted);
}

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

button,
input,
select {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--brand-2);
}

.domain-row {
  margin-bottom: 12px;
}

.domain-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-secondary {
  background: #e7efe8;
  color: #163223;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inbox code {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 10px;
  background: #f4faf3;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
}

.mailbox-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.mailbox-item button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7fbf8;
  padding: 8px 10px;
  text-align: left;
}

.mailbox-item button span {
  display: block;
  font-weight: 600;
}

.mailbox-item button small {
  color: var(--muted);
}

.mailbox-item.active button {
  border-color: #7ac09b;
  background: #ecf9f1;
}

.messages ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.msg button {
  width: 100%;
  text-align: left;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7fbf8;
  padding: 10px;
}

.subject {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.meta {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty {
  padding: 10px;
  color: var(--muted);
}

.detail pre {
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7fbf8;
  padding: 10px;
}

.mail-html-frame {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.detail h3,
.detail h4 {
  margin-bottom: 8px;
}

.detail ul {
  margin: 0;
  padding-left: 18px;
}

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

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