:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-muted: #eef2ec;
  --ink: #18211c;
  --muted: #5a665f;
  --line: #d9ded7;
  --accent: #19675d;
  --accent-strong: #124b44;
  --accent-soft: #dcefed;
  --danger: #8d3322;
  --danger-soft: #f8e5df;
  --shadow: 0 12px 36px rgba(24, 33, 28, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button { cursor: pointer; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 1.3rem; letter-spacing: 0; }
h3 { margin-bottom: 6px; font-size: 1.05rem; letter-spacing: 0; }

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

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  padding: 4px;
  border-radius: 6px;
  background: var(--accent);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-actions, .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.primary-button, .secondary-button, .secondary-link {
  min-height: 44px;
  border-radius: 6px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
}

.primary-button, .secondary-button { border: 0; }
.primary-button { background: var(--accent); color: #ffffff; }
.primary-button:hover { background: var(--accent-strong); }
.secondary-button, .secondary-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
}
.secondary-button:hover, .secondary-link:hover { border-color: var(--accent); color: var(--accent-strong); }

.status-panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow);
}

.status-panel p { margin: 0; color: var(--muted); }
.status-panel.is-error { border-color: var(--danger); background: var(--danger-soft); }
.status-panel.is-error p { color: var(--danger); font-weight: 700; }
.auth-switch-button { margin-top: 14px; }

.workspace {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.list-panel, .activity-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.activity-panel {
  position: sticky;
  top: 18px;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.project-grid {
  padding-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.meta-row, .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip, .pill {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.84rem;
  font-weight: 700;
}

.chip { background: #ffffff; border: 1px solid var(--line); color: var(--muted); }
.pill { background: var(--accent-soft); color: var(--accent-strong); }
.muted { color: var(--muted); }

.activity-list {
  padding-top: 14px;
  display: grid;
  gap: 12px;
}

.activity-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-item p { margin-bottom: 4px; }
.activity-time { color: var(--muted); font-size: 0.86rem; }

.empty-state {
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar, .workspace { grid-template-columns: 1fr; }
  .header-actions, .card-actions { justify-content: stretch; }
  .primary-button, .secondary-button, .secondary-link { width: 100%; }
  .activity-panel { position: static; }
}
