:root {
  --bg: #0f172a;
  --panel: #111b34;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --danger: #f87171;
  font-size: 16px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, rgba(34, 211, 238, 0.15), transparent 45%),
    var(--bg);
  padding: 24px;
}

.layout {
  display: grid;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 920px) {
  .layout {
    grid-template-columns: 1fr 1fr;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.35);
}

.form-panel header,
.results-panel header {
  margin-bottom: 24px;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

h1,
h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.5vw, 2.3rem);
}

.description {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

input {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
  transition: border 0.2s, background 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--accent-strong);
  background: rgba(15, 23, 42, 0.85);
}

.hint {
  color: var(--muted);
  margin: 16px 0 0;
  font-size: 0.9rem;
}

.primary {
  margin-top: 20px;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #020617;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(6, 182, 212, 0.35);
}

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.alert.error {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

.alert.success {
  background: rgba(52, 211, 153, 0.1);
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.4);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.results-meta {
  text-align: right;
  color: var(--muted);
  font-size: 0.9rem;
}

.results-state {
  margin-bottom: 18px;
  color: var(--muted);
}

.orders {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.8);
}

.order-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.order-title {
  font-size: 1.1rem;
  margin: 0;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge.success {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.5);
}

.badge.warning {
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.5);
}

.badge.info {
  color: #bae6fd;
  border-color: rgba(14, 165, 233, 0.4);
}

.order-details {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.detail {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail dt {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.detail dd {
  margin: 4px 0 0;
  font-size: 0.95rem;
}

.progress-bar {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

details {
  margin-top: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  padding: 10px 12px;
}

details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}

pre {
  margin: 12px 0 0;
  padding: 12px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.85rem;
}
