:root {
  --bg: #f7f3ee;
  --bg-accent: #f2e9df;
  --surface: #ffffff;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --accent: #1b7f79;
  --accent-strong: #0c4c47;
  --warning: #d9891a;
  --good: #2f9e44;
  --shadow: rgba(16, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #fff, var(--bg)),
    radial-gradient(circle at 80% 0%, #f9e7cc, var(--bg));
  min-height: 100vh;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(27, 127, 121, 0.08), rgba(217, 137, 26, 0.08));
  z-index: -1;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  margin: 0 0 0.25rem 0;
}

h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.4rem;
}

p {
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

.subhead {
  color: var(--muted);
  margin-top: 0.4rem;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2rem;
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem) 1.5rem;
  align-items: start;
}

.status-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 24px var(--shadow);
}

.status-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

main {
  padding: 0 clamp(1.5rem, 5vw, 4rem) 3rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 8px 20px var(--shadow);
  margin-bottom: 2rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

select, input {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #d7d2c8;
  background: #fffdfa;
  font-family: inherit;
}

button {
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.primary {
  background: var(--accent);
  color: white;
  align-self: end;
  box-shadow: 0 6px 16px rgba(27, 127, 121, 0.25);
}

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

button.ghost {
  background: transparent;
  color: var(--accent);
}

.status-card button {
  width: 100%;
  border: 1px solid rgba(27, 127, 121, 0.3);
}

.table-section {
  background: var(--surface);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 8px 20px var(--shadow);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.table-wrapper {
  overflow-x: auto;
}

th, td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid #efe6dc;
  font-size: 0.92rem;
  vertical-align: top;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.dot.good {
  background: var(--good);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dialog {
  width: min(900px, 90vw);
}

#opportunityModal {
  border: none;
  border-radius: 20px;
  padding: 1.5rem;
  width: min(900px, 92vw);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#opportunityModal::backdrop {
  background: rgba(20, 20, 20, 0.35);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.modal-column {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.outcome-card {
  padding: 0.75rem;
  border-radius: 12px;
  background: #fff7ee;
  border: 1px solid #f1dfcc;
}

.stake-summary {
  padding: 0.75rem;
  border-radius: 12px;
  background: #f4fbf9;
  border: 1px solid #c7ebe3;
  color: var(--accent-strong);
  font-weight: 600;
}

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

  .status-card {
    width: 100%;
  }
}
