:root {
  --bg: #f4efe6;
  --paper: rgba(255, 250, 242, 0.78);
  --paper-strong: rgba(255, 248, 238, 0.94);
  --ink: #231913;
  --muted: #6b5c54;
  --line: rgba(76, 50, 35, 0.16);
  --accent: #c9622b;
  --accent-soft: #f2c6a8;
  --green: #2f7c58;
  --green-soft: #dff2e8;
  --amber: #c4881f;
  --amber-soft: #fff1cf;
  --error: #a13b36;
  --error-soft: #f8d7d3;
  --shadow: 0 24px 60px rgba(96, 57, 33, 0.14);
  --radius: 24px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(230, 176, 122, 0.38), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(211, 109, 55, 0.2), transparent 24%),
    linear-gradient(160deg, #f7f1e7 0%, #f1e8da 52%, #eadfcd 100%);
}

.page-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.5;
  pointer-events: none;
}

.glow-one {
  inset: 4rem auto auto 6%;
  width: 16rem;
  height: 16rem;
  background: rgba(214, 116, 59, 0.16);
}

.glow-two {
  inset: auto 8% 10% auto;
  width: 20rem;
  height: 20rem;
  background: rgba(103, 130, 95, 0.14);
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.topbar,
.hero-card,
.panel,
.stat-card,
.domain-card,
.alert {
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(145deg, rgba(255, 248, 239, 0.88), rgba(252, 241, 229, 0.66));
}

.topbar h1,
.hero-card h2,
.panel h3,
.domain-card h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.topbar h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 700;
}

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

.small {
  font-size: 0.92rem;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.4rem;
  margin-top: 1.3rem;
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, rgba(255, 249, 242, 0.92), rgba(247, 236, 221, 0.72));
}

.login-card {
  min-height: 360px;
  align-items: center;
}

.hero-copy p {
  max-width: 58ch;
}

.stats-grid,
.grid-two,
.dns-grid,
.meta-grid,
.code-grid {
  display: grid;
  gap: 1rem;
}

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

.grid-two,
.message-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.3rem;
}

.stat-card,
.panel,
.domain-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.stat-card {
  padding: 1.15rem;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

.panel {
  margin-top: 1.3rem;
  padding: 1.4rem;
}

.warning-panel {
  background: rgba(255, 245, 225, 0.9);
}

.form-stack {
  display: grid;
  gap: 0.95rem;
}

label span,
.label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  padding: 0.88rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(95, 63, 40, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

input:focus {
  outline: 2px solid rgba(201, 98, 43, 0.18);
  border-color: rgba(201, 98, 43, 0.4);
}

button,
.ghost-button,
.ghost-link {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button {
  width: fit-content;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #cf6e38, #b34d22);
  color: #fff9f4;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(179, 77, 34, 0.24);
}

.secondary-button {
  background: rgba(255, 250, 244, 0.92);
  color: var(--ink);
  border: 1px solid rgba(95, 63, 40, 0.14);
  box-shadow: 0 6px 16px rgba(83, 55, 39, 0.08);
}

.danger-button {
  background: linear-gradient(135deg, #b64941, #8c2f2a);
  box-shadow: 0 10px 24px rgba(140, 47, 42, 0.22);
}

.button-compact {
  padding: 0.56rem 0.95rem;
  font-size: 0.9rem;
  box-shadow: 0 6px 16px rgba(83, 55, 39, 0.12);
}

button:hover,
.ghost-button:hover,
.ghost-link:hover,
.row-link:hover {
  transform: translateY(-1px);
}

.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.7);
  color: var(--ink);
  text-decoration: none;
}

.topbar-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
}

.alert {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid transparent;
}

.success {
  background: var(--green-soft);
  border-color: rgba(47, 124, 88, 0.18);
}

.error {
  background: var(--error-soft);
  border-color: rgba(161, 59, 54, 0.18);
}

.pill-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.78rem;
  font-size: 0.88rem;
}

.pill {
  background: rgba(255, 247, 240, 0.95);
  border: 1px solid var(--line);
}

.badge-success {
  background: var(--green-soft);
  color: var(--green);
}

.badge-pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.section-head,
.domain-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.domain-list {
  display: grid;
  gap: 0.8rem;
}

.domain-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  background: var(--paper-strong);
}

.dns-grid,
.meta-grid,
.code-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.domain-card .domain-title-row {
  align-items: center;
}

.domain-meta p,
.dns-item p {
  margin: 0;
}

.domain-dns-grid {
  grid-template-columns: minmax(200px, 0.95fr) minmax(280px, 1.5fr) minmax(160px, 0.8fr);
  gap: 0.75rem;
}

.dns-item {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(82, 55, 39, 0.1);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.86);
}

.dns-item .label {
  margin-bottom: 0.32rem;
  font-size: 0.82rem;
}

.domain-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.domain-actions form {
  margin: 0;
}

.list-table {
  display: grid;
  gap: 0.8rem;
}

.inline-delete {
  margin-top: -0.2rem;
}

.row-link {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(82, 55, 39, 0.12);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.82);
}

.static-row {
  cursor: default;
}

.row-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.section-stack {
  display: grid;
  gap: 1rem;
}

pre {
  margin: 0;
  overflow: auto;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #241914;
  color: #f7eadf;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.mail-body {
  max-height: 420px;
}

@media (max-width: 900px) {
  .hero-card,
  .grid-two,
  .message-grid,
  .dns-grid,
  .meta-grid,
  .code-grid {
    grid-template-columns: 1fr;
  }

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

  .topbar,
  .section-head,
  .domain-title-row,
  .row-link {
    flex-direction: column;
  }

  .domain-card .domain-title-row {
    align-items: flex-start;
  }

  .row-meta {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 100%);
    padding-top: 0.8rem;
  }

  .topbar,
  .hero-card,
  .panel {
    padding: 1.05rem;
    border-radius: 20px;
  }

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