:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --purple: #7c3aed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .24), transparent 30%),
    linear-gradient(135deg, #111827, #1e293b);
  color: white;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: rgba(255,255,255,.72);
  max-width: 720px;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: inherit;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.toolbar {
  margin: 22px 0;
  display: grid;
  grid-template-columns: 1fr 240px auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: white;
  color: #111827;
}

.secondary-btn {
  background: #e0edff;
  color: #1d4ed8;
}

.success-btn {
  background: #dcfce7;
  color: #15803d;
}

.warning-btn {
  background: #fef3c7;
  color: #b45309;
}

.danger-btn {
  background: #fee2e2;
  color: #b91c1c;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #111827;
  font-size: 24px;
  padding: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.claims-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.claim-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.claim-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.claim-card h3 {
  margin: 0;
  font-size: 20px;
}

.claim-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.chip.pending {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip.need_more_info {
  background: #fef3c7;
  color: #b45309;
}

.chip.approved {
  background: #dcfce7;
  color: #15803d;
}

.chip.rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.empty {
  grid-column: 1 / -1;
  background: white;
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .62);
  display: grid;
  place-items: center;
  padding: 22px;
  z-index: 10;
}

.hidden {
  display: none;
}

.modal-card {
  width: min(880px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: white;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 25px 80px rgba(0,0,0,.28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.modal-head .badge {
  background: #eef2ff;
  color: var(--purple);
}

.modal-head h2 {
  margin: 8px 0 0;
}

.modal-body {
  display: grid;
  gap: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.detail-item strong {
  font-size: 14px;
}

.match-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  white-space: pre-wrap;
  overflow: auto;
}

.review-box {
  margin-top: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

@media (max-width: 800px) {
  .page {
    padding: 16px;
  }

  .hero,
  .toolbar,
  .stats,
  .claims-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: stretch;
    flex-direction: column;
  }
}
