:root {
  --bg: #f7f4ea;
  --text: #1d2f35;
  --muted: #4c6366;
  --teal: #0f7c74;
  --teal-strong: #0b5c57;
  --cream: #fffdf6;
  --line: rgba(21, 73, 77, 0.16);
  --danger: #b83d3d;
  --ok: #1f7c45;
  --shadow: 0 22px 56px rgba(16, 64, 73, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Trebuchet MS", sans-serif;
  background: radial-gradient(1800px 900px at 15% -20%, #ffeabf 0%, rgba(255, 234, 191, 0) 70%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.ambient {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(12px);
}

.ambient-one {
  width: 320px;
  height: 320px;
  border-radius: 42% 58% 58% 42%;
  background: rgba(21, 134, 127, 0.16);
  top: 72px;
  right: 4%;
  animation: floaty 12s ease-in-out infinite;
}

.ambient-two {
  width: 240px;
  height: 240px;
  border-radius: 63% 37% 47% 53%;
  background: rgba(240, 189, 86, 0.24);
  bottom: 80px;
  left: 2%;
  animation: floaty 10s ease-in-out infinite reverse;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 32px));
  margin: 28px auto 46px;
}

.hero {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(252, 243, 221, 0.96));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 30px 30px 24px;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.hero h1 {
  margin: 10px 0 10px;
  font-family: "Space Grotesk", "Verdana", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.08;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  font-size: 1.02rem;
}

.panel {
  margin-top: 18px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel h2 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", "Verdana", sans-serif;
  font-size: 1.25rem;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: 1.3fr 1fr;
}

.grid.three {
  margin-top: 12px;
  grid-template-columns: 1fr 1fr 1fr;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: #2d4247;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="file"],
.field textarea {
  width: 100%;
  border: 1px solid rgba(13, 87, 82, 0.25);
  background: #fffefb;
  border-radius: 13px;
  padding: 11px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  resize: vertical;
  min-height: 92px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(15, 124, 116, 0.62);
  box-shadow: 0 0 0 4px rgba(15, 124, 116, 0.13);
}

.switch-field {
  position: relative;
  align-content: end;
  padding-bottom: 2px;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  width: 64px;
  height: 34px;
  border-radius: 999px;
  background: #d4d8d8;
  position: relative;
  display: inline-block;
  transition: background 0.2s ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch-field input:checked + .switch-ui {
  background: linear-gradient(130deg, #108f86, #0c6d66);
}

.switch-field input:checked + .switch-ui::after {
  transform: translateX(30px);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.primary-btn,
.danger-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: "Space Grotesk", "Verdana", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.primary-btn {
  min-width: 220px;
  background: linear-gradient(130deg, var(--teal), var(--teal-strong));
  box-shadow: 0 12px 24px rgba(13, 91, 86, 0.28);
}

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

.primary-btn:disabled,
.danger-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.danger-btn {
  background: linear-gradient(130deg, #c94f4f, #a23636);
  box-shadow: 0 12px 22px rgba(158, 45, 45, 0.25);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.subtle {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.status {
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 0.95rem;
  border: 1px solid var(--line);
}

.status.idle {
  background: #faf7ec;
}

.status.progress {
  background: #eef8f6;
  border-color: rgba(15, 124, 116, 0.35);
}

.status.error {
  background: #fff0ed;
  border-color: rgba(194, 71, 71, 0.3);
  color: var(--danger);
}

.status.success {
  background: #ebf8ef;
  border-color: rgba(31, 124, 69, 0.28);
  color: var(--ok);
}

.progress-track {
  margin-top: 12px;
  width: 100%;
  height: 12px;
  background: #ece8dc;
  border: 1px solid rgba(17, 87, 83, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0f7c74, #12a094);
  transition: width 0.4s ease;
}

.progress-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #355054;
  font-size: 0.9rem;
}

.download {
  display: inline-flex;
  margin-top: 12px;
  text-decoration: none;
  color: var(--teal-strong);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.52s ease forwards;
  animation-delay: var(--delay, 0s);
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(7deg);
  }
}

@media (max-width: 930px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px 20px 18px;
  }

  .panel {
    padding: 16px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}
