:root {
  color-scheme: light;
  --ink: #18212d;
  --muted: #566576;
  --line: rgba(24, 33, 45, 0.12);
  --line-strong: rgba(24, 33, 45, 0.22);
  --accent: #0a7ea1;
  --accent-strong: #0d5d80;
  --sand: #f4e8d6;
  --mist: #dfeaf5;
  --mint: #dbf1e9;
  --paper: rgba(255, 255, 255, 0.54);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(244, 232, 214, 0.96), transparent 26%),
    radial-gradient(circle at 100% 8%, rgba(223, 234, 245, 0.98), transparent 28%),
    linear-gradient(130deg, #fbf7ef 0%, #f5f8fb 48%, #edf4fb 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(24px);
}

body::before {
  top: 10vh;
  left: -10vw;
  width: 44vw;
  height: 44vw;
  background: rgba(244, 232, 214, 0.72);
  animation: drift 15s ease-in-out infinite alternate;
}

body::after {
  right: -12vw;
  bottom: -10vh;
  width: 48vw;
  height: 48vw;
  background: rgba(181, 214, 236, 0.62);
  animation: drift 17s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(2vw, -2vh, 0) scale(1.06);
  }
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 30;
  width: min(420px, calc(100vw - 32px));
  padding: 18px 20px;
  border-left: 4px solid transparent;
  background: rgba(24, 33, 45, 0.92);
  color: #f7fbff;
  box-shadow: 0 16px 36px rgba(24, 33, 45, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  border-left-color: #2fbf71;
}

.toast--warning {
  border-left-color: #d48a2f;
}

.toast--error {
  border-left-color: #dd5b5b;
}

.toast--info {
  border-left-color: #65b9d4;
}

.toast-label {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 251, 255, 0.68);
}

.toast-message {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.hero,
.console {
  grid-column: span 6;
  min-height: 100vh;
  padding: clamp(26px, 3vw, 52px);
}

.hero {
  display: grid;
  align-content: start;
  gap: 36px;
}

.hero-top {
  display: grid;
  gap: 22px;
  max-width: 760px;
}

.hero-workbench {
  display: grid;
  gap: 22px;
  max-width: 760px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

.hero-workbench .section-title {
  max-width: 12ch;
}

.hero-workbench .caption {
  max-width: 48rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
}

h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3.5rem, 7.8vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.lede {
  margin: 0;
  max-width: 44rem;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.7;
  color: var(--muted);
}

.status-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.strip {
  min-height: 220px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    transparent;
}

.strip--admin {
  background-color: rgba(223, 234, 245, 0.38);
}

.strip--web {
  background-color: rgba(219, 241, 233, 0.34);
}

.strip--dispatch {
  background-color: rgba(244, 232, 214, 0.42);
}

.label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.status {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hint {
  margin: 0;
  max-width: 30rem;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--muted);
}

.console {
  display: grid;
  align-content: stretch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.32)),
    var(--paper);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.console-scroll {
  display: grid;
  align-content: start;
  gap: 28px;
}

.console-scroll--composer-only {
  padding-top: 6px;
}

.section {
  display: grid;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.section-head {
  display: grid;
  gap: 10px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.9rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.caption {
  margin: 0;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 14px;
}

fieldset {
  margin: 0;
  min-width: 0;
  padding: 0;
  border: 0;
}

.target-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-self: start;
  padding: 8px;
  border: 1px solid rgba(24, 33, 45, 0.12);
  background: rgba(255, 255, 255, 0.46);
}

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

.target-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.target-option:hover {
  transform: translateY(-1px);
}

.target-option.is-active {
  background: rgba(24, 33, 45, 0.92);
  color: #f8fcff;
}

.field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

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

input,
textarea {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(24, 33, 45, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 249, 252, 0.88)),
    transparent;
  color: #123042;
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

input {
  min-height: 60px;
  font: inherit;
}

textarea {
  min-height: 180px;
  resize: vertical;
  font: 0.98rem/1.72 "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

.composer-textarea {
  min-height: 160px;
}

.json-textarea {
  min-height: 300px;
}

.target-panel.is-hidden {
  display: none;
}

input:focus,
textarea:focus {
  border-color: rgba(13, 93, 128, 0.48);
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
}

.field-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

.action-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-row--between {
  justify-content: space-between;
  flex-wrap: wrap;
}

button {
  min-height: 62px;
  padding: 16px 22px;
  border: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #f8fcff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

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

.button-wide {
  width: 100%;
}

.button-secondary {
  background: rgba(24, 33, 45, 0.08);
  color: var(--ink);
  border: 1px solid rgba(24, 33, 45, 0.14);
}

.button-secondary:hover {
  filter: none;
  background: rgba(24, 33, 45, 0.12);
}

.button-danger {
  background: linear-gradient(135deg, #d94b4b 0%, #9f2020 100%);
  color: #fff7f7;
}

.button-danger:hover {
  background: linear-gradient(135deg, #df5757 0%, #ab2525 100%);
}

.button-secondary:disabled {
  background: rgba(24, 33, 45, 0.06);
  color: rgba(24, 33, 45, 0.36);
  border-color: rgba(24, 33, 45, 0.08);
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.result-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.result-list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
  line-height: 1.66;
  color: var(--muted);
  word-break: break-word;
}

.result-list li:first-child {
  border-top: 0;
}

.foot-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

.foot-note strong {
  color: var(--ink);
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .hero,
  .console {
    grid-column: span 1;
    min-height: auto;
  }

  .console {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .status-wall {
    grid-template-columns: 1fr;
  }

  .field-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero,
  .console {
    padding: 22px;
  }

  h1 {
    max-width: none;
  }

  .foot-note,
  .action-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-row button {
    width: 100%;
  }
}
