:root {
  --bg: #f2efe7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #fffefb;
  --text: #1f2430;
  --muted: #5f6b7a;
  --line: rgba(31, 36, 48, 0.12);
  --accent: #0d7c66;
  --accent-strong: #085d4d;
  --danger: #b84545;
  --shadow: 0 20px 50px rgba(18, 31, 44, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 124, 102, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f5ee 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

.page-shell,
.setup-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero,
.setup-card,
.panel,
.stat-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 28px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.2rem, 3vw, 3.5rem);
}

h2 {
  font-size: 1.3rem;
}

.intro,
.subtle,
th,
td,
label,
input {
  color: var(--muted);
}

.intro {
  max-width: 720px;
  line-height: 1.6;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.stats-grid,
.panel-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel-grid {
  grid-template-columns: 1.1fr 1fr;
}

.stat-card,
.panel {
  border-radius: 24px;
  padding: 22px;
}

.trades-panel {
  margin-top: 18px;
}

.stat-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 1.8rem;
  color: var(--text);
}

.label {
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 0;
}

.detail-list div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

dt {
  color: var(--muted);
  font-size: 0.9rem;
}

dd {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(31, 36, 48, 0.08);
}

.pill.usdc,
.pill.sell {
  background: rgba(13, 124, 102, 0.12);
  color: var(--accent-strong);
}

.pill.sol,
.pill.buy {
  background: rgba(184, 124, 33, 0.14);
  color: #8a5a12;
}

.alert {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(13, 124, 102, 0.1);
  color: var(--accent-strong);
}

.alert.error {
  background: rgba(184, 69, 69, 0.12);
  color: var(--danger);
}

.empty {
  text-align: center;
  padding: 28px 0;
}

.setup-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.setup-shell {
  width: min(640px, calc(100% - 32px));
}

.setup-card {
  border-radius: 32px;
  padding: 32px;
}

.setup-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

input {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 14px 16px;
  color: var(--text);
}

@media (max-width: 960px) {
  .stats-grid,
  .panel-grid,
  .detail-list {
    grid-template-columns: 1fr;
  }

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