@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f2e6;
  --bg-strong: #f2e7d2;
  --ink: #1d1b16;
  --muted: #5a5345;
  --accent: #ef6a44;
  --accent-2: #3c7a6f;
  --card: #fff8ee;
  --border: #e7d7bf;
  --shadow: rgba(48, 37, 20, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff4db 0%, var(--bg) 45%, #efe1c3 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, rgba(239, 106, 68, 0.15), rgba(60, 122, 111, 0.1));
  pointer-events: none;
  opacity: 0.7;
}

header {
  padding: 3rem 7vw 1.5rem;
  position: relative;
  z-index: 1;
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.5rem, 3vw, 3.5rem);
  letter-spacing: -0.02em;
}

header p {
  margin: 0;
  color: var(--muted);
  max-width: 620px;
  font-size: 1.05rem;
}

main {
  padding: 0 7vw 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: rise 0.6s ease forwards;
  opacity: 0;
  transform: translateY(10px);
  animation-delay: var(--delay, 0s);
}

.card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(239, 106, 68, 0.1);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.3rem;
}

input,
select,
textarea,
button {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  background: #fffdfa;
}

textarea {
  min-height: 110px;
  resize: vertical;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #fffaf2;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.secondary {
  background: #f1e3cb;
  color: var(--ink);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(239, 106, 68, 0.25);
}

pre {
  background: #fffdfa;
  border-radius: 12px;
  border: 1px dashed var(--border);
  padding: 0.8rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

.status {
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(60, 122, 111, 0.12);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status.deny {
  background: rgba(239, 106, 68, 0.16);
  color: var(--accent);
}

.control-plane {
  border-style: dashed;
  border-color: rgba(60, 122, 111, 0.3);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  header {
    padding: 2rem 6vw 1rem;
  }
  main {
    padding: 0 6vw 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
