@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Work+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #f6f0e6;
  --bg-alt: #efe4d2;
  --panel: #fff7ea;
  --ink: #1d1b16;
  --muted: #6f6559;
  --accent: #1b7f5c;
  --accent-2: #e1804f;
  --line: #e2d6c3;
  --shadow: 0 20px 40px rgba(29, 27, 22, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Work Sans", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fffaf2 0%, var(--bg) 42%, #f1e6d1 100%);
  min-height: 100vh;
}

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

.sidebar {
  padding: 28px 22px;
  background: linear-gradient(165deg, #fffaf3 0%, var(--bg-alt) 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  background: var(--accent);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 20px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fffdf8;
  font-family: inherit;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fffdf8;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(29, 27, 22, 0.12);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.nav-item.active {
  background: #fffdf8;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.status {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  padding: 10px;
  border-radius: 12px;
  background: #fff7ea;
  border: 1px dashed var(--line);
}

.main {
  padding: 32px 36px;
}

.view {
  display: none;
  animation: rise 0.4s ease;
}

.view.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-header h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  margin-bottom: 8px;
}

.view-header p {
  color: var(--muted);
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.card {
  background: #fffdf8;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.card h2 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-family: "Space Grotesk", sans-serif;
}

.list {
  display: grid;
  gap: 10px;
  max-height: 540px;
  overflow: auto;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fffaf2;
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.list-item .title {
  font-weight: 600;
  color: var(--ink);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.row > input,
.row > select {
  flex: 1;
  min-width: 140px;
}

.row > .btn {
  flex: 0 0 auto;
}

.token-info {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  word-break: break-word;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .main {
    padding: 24px;
  }

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

.modal {
  position: fixed;
  inset: 0;
  background: rgba(29, 27, 22, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}

.modal.active {
  display: flex;
}

.modal-card {
  width: min(560px, 95vw);
  max-height: 90vh;
  overflow: auto;
  background: #fffdf8;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

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

.modal-form.hidden {
  display: none;
}
