:root {
  --bg: #f3efe5;
  --bg-accent: #e2dac7;
  --surface: rgba(255, 251, 244, 0.88);
  --surface-strong: #fffdf9;
  --ink: #181512;
  --muted: #6d6255;
  --line: rgba(24, 21, 18, 0.12);
  --primary: #154734;
  --primary-soft: rgba(21, 71, 52, 0.12);
  --danger: #9f2d25;
  --shadow: 0 24px 60px rgba(31, 20, 10, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 30%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-accent) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 21, 18, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 21, 18, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
}

.page-shell {
  position: relative;
  max-width: 1380px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.hero-card,
.panel {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  border-radius: 28px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 4.4rem);
  line-height: 0.95;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: 1.75rem;
}

.hero-text,
.panel-subtitle,
.hero-aside p,
.meta-note p,
.message {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.hero-aside {
  min-width: 220px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(24, 21, 18, 0.9);
  color: #f7f1e6;
}

.signal {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.signal span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9fd8a5;
  box-shadow: 0 0 14px rgba(159, 216, 165, 0.8);
  animation: pulse 1.8s infinite ease-in-out;
}

.signal span:nth-child(2) {
  animation-delay: 0.25s;
}

.signal span:nth-child(3) {
  animation-delay: 0.5s;
}

.panel {
  margin-top: 24px;
  padding: 28px;
  border-radius: 28px;
}

.panel-head {
  margin-bottom: 24px;
}

.panel-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

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

.stack-form,
.table-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.stack-form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

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

.field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(24, 21, 18, 0.16);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fffdf9;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  transform: translateY(-1px);
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.meta-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(21, 71, 52, 0.06);
  border: 1px solid rgba(21, 71, 52, 0.12);
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #123b2c 0%, #1e6047 100%);
  color: #f7f1e6;
  box-shadow: 0 18px 35px rgba(21, 71, 52, 0.2);
}

.ghost-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(24, 21, 18, 0.16);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.table-card {
  padding: 18px;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(24, 21, 18, 0.06);
  color: var(--muted);
  font-size: 0.92rem;
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--surface-strong);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f0e4;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

td {
  font-size: 0.95rem;
  line-height: 1.5;
  transition: background-color 0.2s ease;
}

.data-row:hover td {
  background: rgba(21, 71, 52, 0.045);
}

.domain-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.domain-link:hover {
  opacity: 0.72;
}

.accesses-cell {
  text-align: left;
}

.accesses-text {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Manrope", sans-serif;
  background: rgba(24, 21, 18, 0.04);
  padding: 3px 6px;
  border-radius: 8px;
  text-align: left;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
}

.toggle-track {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(24, 21, 18, 0.12);
  transition: background-color 0.22s ease;
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fffdf9;
  box-shadow: 0 6px 16px rgba(24, 21, 18, 0.16);
  transition: transform 0.22s ease;
}

.toggle-label {
  min-width: 30px;
  font-size: 0.9rem;
  color: var(--muted);
}

.toggle-switch.is-active .toggle-track {
  background: linear-gradient(135deg, #123b2c 0%, #1e6047 100%);
}

.toggle-switch.is-active .toggle-thumb {
  transform: translateX(24px);
}

.toggle-switch:disabled {
  opacity: 0.6;
  cursor: wait;
}

.message {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(24, 21, 18, 0.05);
}

.message.success {
  color: var(--primary);
  background: rgba(21, 71, 52, 0.08);
}

.message.error {
  color: var(--danger);
  background: rgba(159, 45, 37, 0.1);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-shell[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 21, 18, 0.46);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 32px 80px rgba(24, 21, 18, 0.24);
  animation: modal-in 0.24s ease;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.icon-btn {
  padding-inline: 16px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.45;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 22px 14px 40px;
  }

  .hero-card,
  .panel {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-card,
  .panel-head-row,
  .table-toolbar,
  .modal-head,
  .panel-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-aside {
    min-width: 0;
  }

  .stack-form,
  .table-card {
    border-radius: 20px;
  }

  .modal-card {
    padding: 20px;
    border-radius: 22px;
  }
}
