:root {
  color-scheme: dark;
  --bg: #070811;
  --panel: rgba(22, 24, 38, 0.88);
  --panel-2: rgba(31, 32, 50, 0.86);
  --field: rgba(9, 12, 22, 0.78);
  --text: #f8f4ff;
  --muted: #b9b0cc;
  --line: rgba(206, 196, 255, 0.18);
  --line-strong: rgba(178, 139, 255, 0.42);
  --accent: #8b5cf6;
  --accent-2: #dba4ff;
  --accent-3: #6d5dfc;
  --ok: #4ade80;
  --warn: #f5c869;
  --danger: #ff6b8b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 92, 246, 0.22), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(219, 164, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #11101d 0%, var(--bg) 62%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.1), transparent 36%);
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.topbar,
.section-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  min-height: 70px;
  padding: 0 2px 8px;
}

.eyebrow,
.label,
.data-grid span,
label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.eyebrow {
  color: #cfc5ff;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 10px 36px rgba(139, 92, 246, 0.28);
}

h2 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.status-badge {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(19, 20, 32, 0.82);
  color: #d8d0ef;
  font-size: 13px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.status-badge.ok {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.12);
  color: var(--ok);
}

.status-badge.warn {
  border-color: rgba(245, 200, 105, 0.48);
  background: rgba(245, 200, 105, 0.12);
  color: var(--warn);
}

.status-badge.bad {
  border-color: rgba(255, 107, 139, 0.48);
  background: rgba(255, 107, 139, 0.12);
  color: var(--danger);
}

.lookup-panel,
.info-card,
.delivery-panel,
.support-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015) 42%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.lookup-form {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
button {
  min-height: 48px;
  border-radius: 14px;
}

input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

input::placeholder {
  color: rgba(220, 211, 240, 0.5);
}

input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(139, 92, 246, 0.24);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(139, 92, 246, 0.3);
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(22, 24, 38, 0.88);
  color: var(--text);
  box-shadow: none;
}

.message {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(206, 196, 255, 0.1);
  border-radius: 16px;
  background: var(--panel-2);
  color: #d2c9e4;
  line-height: 1.45;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.data-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(206, 196, 255, 0.1);
  border-radius: 16px;
  background: var(--panel-2);
}

.data-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.option-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.option-list div {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(206, 196, 255, 0.1);
  border-radius: 14px;
  background: var(--panel-2);
}

.option-list span {
  color: var(--muted);
}

.option-list strong {
  overflow-wrap: anywhere;
}

pre {
  margin: 16px 0 0;
  min-height: 104px;
  padding: 14px;
  border-radius: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
}

.support-panel {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1fr);
  gap: 16px;
}

.support-panel p:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  max-width: 520px;
  margin: 0 auto;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(25, 24, 38, 0.96);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 900px);
    padding: 16px 0 22px;
  }

  .topbar,
  .section-head,
  .card-head,
  .support-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .control-row,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .lookup-panel,
  .info-card,
  .delivery-panel,
  .support-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .status-badge,
  .secondary-button {
    width: max-content;
  }

  button,
  input {
    width: 100%;
  }
}
