:root {
  --bg: #f7efe3;
  --panel: rgba(255, 252, 248, 0.88);
  --ink: #2d1f1a;
  --muted: #79584f;
  --accent: #f2673a;
  --accent-2: #f4b53f;
  --accent-3: #126e68;
  --line: rgba(45, 31, 26, 0.12);
  --shadow: 0 24px 60px rgba(113, 55, 29, 0.12);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(242, 103, 58, 0.24), transparent 28%),
    radial-gradient(circle at bottom right, rgba(18, 110, 104, 0.18), transparent 24%),
    linear-gradient(180deg, #fffaf4, #f6ebdd 45%, #f2e4d4);
  color: var(--ink);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.sidebar {
  padding: 2.5rem;
  background: rgba(45, 31, 26, 0.92);
  color: #fff6ef;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: #ffb494;
  font-size: 0.8rem;
}

.nav {
  display: grid;
  gap: 0.9rem;
}

.nav a,
.link-button {
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.content {
  padding: 2rem;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

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

.hero-card {
  min-height: 140px;
  border-radius: 28px;
  padding: 1.5rem;
  text-decoration: none;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: end;
}

.hero-card.income { background: linear-gradient(135deg, #126e68, #23a38d); }
.hero-card.expense { background: linear-gradient(135deg, #f2673a, #ff8b37); }
.hero-card.dashboard { background: linear-gradient(135deg, #533483, #8a59da); }

.toolbar,
.chip-row,
.stack,
.flash-stack {
  display: grid;
  gap: 1rem;
}

.toolbar {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.chip-row {
  grid-auto-flow: column;
}

.chip {
  color: var(--ink);
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #f2dfd2;
}

.chip.active {
  background: var(--accent);
  color: white;
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.84);
}

button {
  border: 0;
  border-radius: 18px;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  cursor: pointer;
}

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

th,
td {
  text-align: left;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 16px;
}

.flash.success,
.flash.info {
  background: rgba(18, 110, 104, 0.12);
}

.flash.error {
  background: rgba(242, 103, 58, 0.15);
}

.auth-panel {
  max-width: 480px;
}

.split-links,
.inline-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

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

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .chip-row {
    grid-auto-flow: row;
  }
}
