:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #eef2ea;
  --text: #182018;
  --muted: #667066;
  --line: #dce3da;
  --primary: #315c3a;
  --primary-dark: #173c17;
  --accent: #8f6d2d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font: 700 0.92rem/1 var(--font, inherit);
  min-height: 42px;
  padding: 0 14px;
}

button.secondary {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--line);
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #183c20;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.brand strong, .brand span { display: block; }
.brand span { color: #cad9c9; font-size: 0.88rem; }

nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  background: transparent;
  color: #dce8d9;
  text-align: left;
  font-weight: 650;
}

.nav-item.active {
  background: #e5efe5;
  color: var(--primary-dark);
}

.sync-card {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
}

.sync-card span {
  color: #dce8d9;
  font-size: 0.88rem;
}

main {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.04; }
h2 { font-size: 1.05rem; }
p { color: var(--muted); line-height: 1.55; }

.empty-state {
  min-height: 70vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
}

.empty-state p {
  max-width: 560px;
}

.empty-art {
  width: 132px;
  height: 132px;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(24, 60, 32, 0.16);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics article, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics article {
  padding: 16px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 16px;
}

.panel {
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.row strong, .row span { display: block; }
.row span { color: var(--muted); font-size: 0.86rem; margin-top: 3px; }
.row .value { color: var(--primary-dark); font-weight: 800; white-space: nowrap; }

.photo-panel {
  min-height: 220px;
  margin-bottom: 16px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(49,92,58,0.05), rgba(49,92,58,0.25)),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=900&q=80") center/cover;
}

.detail-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; gap: 16px; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-grid { grid-template-columns: 1fr; }
}
