* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  max-width: 900px;
  width: 100%;
  padding: 32px 24px;
}

h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.subtitle {
  margin: 0 0 24px;
  color: #9ca3af;
}

.card, .result-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(16px);
}

.card {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.file-label {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  position: relative;
  overflow: hidden;
}

.file-label::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.3), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.file-label:hover::after {
  opacity: 1;
}

.file-label:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.5);
}

.file-label input {
  display: none;
}

.file-name {
  font-size: 14px;
  color: #e5e7eb;
  max-width: 260px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#analyzeBtn {
  margin-left: auto;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: #22c55e;
  color: #052e16;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.4);
}

#analyzeBtn:hover:enabled {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.5);
}

#analyzeBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.status {
  font-size: 13px;
  min-height: 18px;
}

.status.loading {
  color: #fde68a;
}

.status.success {
  color: #bbf7d0;
}

.status.error {
  color: #fecaca;
}

.result-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.results {
  font-size: 14px;
  color: #cbd5f5;
}

.order-card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), transparent 55%);
}

.order-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.badge {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.order-name {
  font-weight: 600;
  color: #e5e7eb;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 4px 16px;
  font-size: 13px;
  color: #cbd5f5;
}

.order-grid strong {
  color: #e5e7eb;
}

@media (max-width: 640px) {
  .card {
    flex-direction: column;
    align-items: flex-start;
  }

  #analyzeBtn {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .file-name {
    max-width: 100%;
  }
}

