:root {
  --bg: #05060a;
  --bg-elevated: #0b0f1a;
  --bg-elevated-soft: #101625;
  --accent: #ffb347;
  --accent-strong: #ff8c42;
  --accent-soft: rgba(255, 179, 71, 0.18);
  --accent-glow: rgba(255, 179, 71, 0.4);
  --danger: #ff4b6e;
  --success: #5af29c;
  --muted: #7b849b;
  --text: #f5f7ff;
  --border-soft: rgba(132, 139, 168, 0.16);
  --shadow-strong: 0 24px 80px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.7);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #161b2e 0, #05060a 55%);
  overflow: hidden;
}

body {
  position: relative;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: -50px;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.75'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 1;
}

.grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      rgba(96, 165, 250, 0.08) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(96, 165, 250, 0.08) 1px,
      transparent 1px
    );
  background-size: 40px 40px;
  opacity: 0.5;
  mask-image: radial-gradient(circle at center, black 0, transparent 70%);
  z-index: 1;
}

.shell {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 40px auto;
  padding: 20px 32px 30px;
  background: radial-gradient(circle at top left, #1a2141 0, #05060b 65%);
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(129, 140, 248, 0.25);
  overflow: hidden;
}

.shell::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
      circle at 10% 0%,
      rgba(129, 140, 248, 0.18) 0,
      transparent 55%
    ),
    radial-gradient(
      circle at 100% 0%,
      rgba(248, 250, 252, 0.16) 0,
      transparent 55%
    );
  opacity: 0.8;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  z-index: 1;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.8),
      rgba(15, 23, 42, 0.3)
    ),
    radial-gradient(circle at top left, rgba(248, 250, 252, 0.12), transparent);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.logo-waffle {
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 0, #ffe29f, #ffa99f);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.7),
    0 0 25px rgba(255, 215, 128, 0.65);
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: #e5e7ff;
}

.header-subtitle {
  max-width: 640px;
  font-size: 14px;
  color: var(--muted);
}

.panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
  gap: 26px;
}

.panel-left {
  display: flex;
  align-items: stretch;
}

.waffle-card {
  position: relative;
  flex: 1;
  padding: 20px 18px 16px;
  border-radius: 22px;
  background: radial-gradient(circle at top, #111827, #020617 70%);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.95);
  overflow: hidden;
}

.waffle-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 30% 0, rgba(252, 211, 77, 0.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.18), transparent 60%);
  opacity: 0.9;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.waffle-plate {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.waffle-plate::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 68px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.3), transparent 55%),
    radial-gradient(circle at 0 100%, rgba(148, 163, 184, 0.38), transparent 60%);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.95);
  transform: translateY(32px);
}

.waffle {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 36px;
  background: radial-gradient(circle at 15% 0, #ffe29f, #ffa751 50%, #ff7b00);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.75),
    0 0 60px rgba(255, 184, 108, 0.6);
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(-20deg);
  animation: float 5s ease-in-out infinite;
}

.waffle::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 26px;
  background: radial-gradient(circle at 0 0, #fff7d6, #ffb347 55%, #e77720);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.waffle-grid {
  position: absolute;
  inset: 15px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  padding: 2px;
  z-index: 1;
}

.waffle-grid div {
  border-radius: 9px;
  background: linear-gradient(145deg, #f7c873, #e09c3c);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 3px 3px 6px rgba(255, 255, 255, 0.22),
    inset -4px -4px 8px rgba(0, 0, 0, 0.25);
}

.waffle-syrup {
  position: absolute;
  inset: 32px 26px 34px 16px;
  background: radial-gradient(circle at 0 0, #ffd18a, #f97316);
  clip-path: path(
    "M8 10C36 -8 72 -6 104 10C128 22 132 52 112 74C98 92 76 100 54 97C26 92 6 70 4 48C2 34 0 20 8 10Z"
  );
  opacity: 0.96;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55));
}

.waffle-glow {
  position: absolute;
  inset: 26px;
  border-radius: 28px;
  background: radial-gradient(
    circle at 40% 0,
    rgba(255, 250, 235, 0.7),
    transparent 60%
  );
  mix-blend-mode: soft-light;
  opacity: 0.8;
}

.waffle-caption {
  position: relative;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.5;
  padding-left: 4px;
}

.waffle-caption::before {
  content: "LOGIC LAYER";
  position: absolute;
  top: -18px;
  left: 4px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.panel-right {
  background: radial-gradient(circle at top left, #0f172a, #020617 75%);
  border-radius: 22px;
  padding: 18px 20px 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 56px rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row.inline {
  flex-direction: row;
  gap: 12px;
}

.form-row.inline > div {
  flex: 1;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.9);
}

.hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  text-transform: none;
  letter-spacing: normal;
  color: rgba(148, 163, 184, 0.9);
}

input,
select {
  margin-top: 2px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  padding: 9px 11px;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.5),
    0 12px 30px rgba(15, 23, 42, 0.9);
  background: rgba(15, 23, 42, 0.96);
  transform: translateY(-1px);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.btn {
  position: relative;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  outline: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast), opacity 0.15s ease-out;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.9);
}

.btn.primary {
  background: radial-gradient(circle at 0 0, #fef3c7, #fb923c);
  color: #111827;
  border-color: rgba(248, 250, 252, 0.8);
}

.btn.primary::before {
  content: "●";
  font-size: 10px;
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.88);
  border-style: dashed;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 1);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.status-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.status-pill {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.status-idle {
  color: rgba(148, 163, 184, 0.9);
}

.status-ok {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.65);
  background: radial-gradient(circle at 0 0, rgba(22, 163, 74, 0.5), #022c22);
}

.status-ok::before {
  background: var(--success);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.85);
}

.status-bad {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.75);
  background: radial-gradient(circle at 0 0, rgba(248, 113, 113, 0.5), #450a0a);
}

.status-bad::before {
  background: var(--danger);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.9);
}

.status-pending {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.7);
  background: radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.5), #422006);
}

.status-pending::before {
  background: #facc15;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.9);
  animation: pulse 1.4s ease-out infinite;
}

.latency {
  font-size: 12px;
  color: var(--muted);
}

.terminal {
  margin-top: 8px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, #020617, #020617 65%);
  border: 1px solid rgba(30, 64, 175, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  max-height: 210px;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #020617, #020617);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}

.terminal-header .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-header .dot.red {
  background: #f97373;
}

.terminal-header .dot.amber {
  background: #fbbf24;
}

.terminal-header .dot.green {
  background: #4ade80;
}

.terminal-header .title {
  margin-left: 4px;
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.terminal-body {
  flex: 1;
  padding: 8px 10px;
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 11px;
  overflow-y: auto;
  background-image: linear-gradient(
    rgba(15, 23, 42, 0.7) 1px,
    transparent 1px
  );
  background-size: 100% 18px;
}

.line {
  white-space: pre-wrap;
  color: #e5e7eb;
}

.line.muted {
  color: rgba(148, 163, 184, 0.8);
}

.line .tag {
  color: #60a5fa;
}

.line .code {
  color: #a5b4fc;
}

.footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(51, 65, 85, 0.9);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(148, 163, 184, 0.9);
}

.dot-sep {
  color: rgba(71, 85, 105, 0.9);
}

@keyframes float {
  0%,
  100% {
    transform: rotateX(18deg) rotateY(-20deg) translateY(0);
  }
  50% {
    transform: rotateX(18deg) rotateY(-20deg) translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

@media (max-width: 960px) {
  html,
  body {
    overflow: auto;
  }

  .shell {
    margin: 16px;
    padding: 18px 16px 22px;
  }

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

  .panel-left {
    order: -1;
  }

  .waffle-card {
    max-width: 320px;
    margin: 0 auto;
  }
}


