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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #f4f6ff 0, #eef2ff 35%, #f9fafb 100%);
  color: #0f172a;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.85),
    rgba(30, 64, 175, 0.9)
  );
  color: #e5e7eb;
}

.branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #22c55e, #22d3ee);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.app-header h1 {
  margin: 0;
  font-size: 1.3rem;
}

.subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.app-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
}

.card {
  width: 100%;
  max-width: 780px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1.1rem;
  padding: 1.75rem 2rem 2rem;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(148, 163, 184, 0.25);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.helper {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #4b5563;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid #cbd5e1;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

button {
  margin-top: 0.9rem;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(to right, #2563eb, #22c55e);
  color: white;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.45);
}

button:disabled {
  opacity: 0.7;
  cursor: progress;
  box-shadow: none;
}

.status-area {
  margin-top: 1rem;
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.75rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-area.error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.hidden {
  display: none;
}

.followup-block {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #e5e7eb;
}

.followup-question {
  margin-bottom: 1rem;
}

.followup-question p {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.options-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.options-list li {
  margin-bottom: 0.3rem;
}

.options-list label {
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.result-block {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #e5e7eb;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill.department {
  background: #eff6ff;
  color: #1d4ed8;
}

.pill.urgency-high {
  background: #fef2f2;
  color: #b91c1c;
}

.pill.urgency-medium {
  background: #fffbeb;
  color: #92400e;
}

.pill.urgency-low {
  background: #ecfdf5;
  color: #166534;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  background: #0b1020;
  color: #e5e7eb;
  border-radius: 0.7rem;
  padding: 0.7rem 0.8rem;
  overflow-x: auto;
}

.app-footer {
  padding: 0.75rem 2rem 1.25rem;
  font-size: 0.8rem;
  color: #64748b;
  text-align: right;
}

@media (max-width: 720px) {
  .app-header {
    padding: 0.9rem 1.25rem;
  }

  .app-main {
    padding: 1.5rem 1rem 2rem;
  }

  .card {
    padding: 1.4rem 1.35rem 1.7rem;
  }

  .app-footer {
    padding-inline: 1.35rem;
  }
}


