:root {
  --bg: #f6f9ff;
  --surface: #ffffff;
  --text: #101828;
  --muted: #475467;
  --line: #e4e7ec;
  --primary: #635bff;
  --primary-soft: #efeeff;
  --success: #027a48;
  --warning: #b54708;
  --danger: #b42318;
  --radius: 18px;
  --shadow: 0 22px 55px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 0%, #eef5ff 0%, var(--bg) 40%, #f8faff 100%);
  min-height: 100vh;
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 25% 18%, rgba(99, 91, 255, 0.11), transparent 40%),
    radial-gradient(circle at 75% 30%, rgba(0, 184, 217, 0.12), transparent 45%);
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
}

.card {
  background: color-mix(in srgb, var(--surface) 88%, #f6f8ff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.hero {
  padding: clamp(1.5rem, 5vw, 3rem);
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-weight: 600;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

h3 {
  margin-bottom: 0.5rem;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.flow-card,
.history-card {
  padding: 1.3rem;
}


.upload-zone {
  border: 1.5px dashed #c7d7fe;
  border-radius: 16px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 160px;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.upload-zone.dragging {
  border-color: #7f8cff;
  background: #e4e9ff;
}

.upload-zone:hover {
  transform: translateY(-1px);
  background: #e7e6ff;
}

.upload-zone input {
  display: none;
}

.upload-title {
  font-weight: 600;
  color: #2b2e68;
}

.upload-subtitle {
  font-size: 0.87rem;
  color: #4f4f74;
}

.preview {
  margin-top: 1rem;
}

.preview img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.preview figcaption {
  margin-top: 0.45rem;
  font-size: 0.86rem;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  padding: 0.62rem 1rem;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.primary-btn {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.secondary-btn {
  background: #f2f4f7;
  color: #344054;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: #ffffffb3;
  color: #344054;
}

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

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.review-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.review-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 500;
}

.review-form input {
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  font: inherit;
}

.actions {
  display: flex;
  gap: 0.7rem;
}

.status {
  margin: 0.9rem 0 0;
  min-height: 1.4rem;
  font-weight: 500;
}

.status.success {
  color: var(--success);
}

.status.warning {
  color: var(--warning);
}

.status.error {
  color: var(--danger);
}

.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.8rem;
}

.history-item p,
.history-item small {
  margin: 0;
}

.history-item strong {
  color: #111827;
}

.meta {
  font-size: 0.8rem;
  color: #667085;
}

.payee {
  font-weight: 600;
  color: #344054;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  gap: 0.7rem;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none;
}

code {
  background: #f2f4f7;
  border-radius: 8px;
  padding: 0.12rem 0.4rem;
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
