:root {
  --bg: #0f1412;
  --bg-2: #171e1b;
  --panel: #1c2622;
  --line: #2c3a34;
  --text: #e8f0eb;
  --muted: #93a69b;
  --accent: #3dcf8e;
  --accent-2: #2aa56e;
  --danger: #e85d5d;
  --warn: #e6b84d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --font: "Instrument Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1d3a2e 0%, transparent 50%), var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 0.5rem; letter-spacing: -0.03em; }
h1 { font-size: 2rem; }
code { background: #0c1210; padding: 0.1rem 0.35rem; border-radius: 6px; }

.topbar, .sidebar { background: rgba(15, 20, 18, 0.85); border-bottom: 1px solid var(--line); }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 6vw; position: sticky; top: 0; backdrop-filter: blur(12px); z-index: 5;
}
.topbar nav, .sidebar nav { display: flex; gap: 1rem; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 700; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #1e7a52); color: #062016; font-weight: 800;
}

.is-app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line); border-bottom: 0;
  padding: 1.25rem; display: flex; flex-direction: column; gap: 1.5rem;
}
.sidebar nav { flex-direction: column; align-items: stretch; gap: 0.3rem; }
.sidebar nav a {
  color: var(--text); padding: 0.55rem 0.75rem; border-radius: 10px; text-decoration: none;
}
.sidebar nav a:hover { background: var(--panel); }
.sidebar-user { margin-top: auto; display: grid; gap: 0.35rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--panel);
  display: grid; place-items: center; font-weight: 700; border: 1px solid var(--line);
}

.app-main, .public-main { padding: 1.5rem 2rem 3rem; }
.public-main { max-width: 1100px; margin: 0 auto; padding: 2.5rem 6vw 4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #062016; font-weight: 700; border: 0;
  border-radius: 999px; padding: 0.7rem 1.15rem; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.9rem; }
.btn-danger { background: var(--danger); color: #fff; }
.linkish { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font: inherit; }
.linkish.danger { color: var(--danger); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--muted); margin: 0 0 0.3rem; }
.muted { color: var(--muted); }

.hero { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 2rem; align-items: center; margin: 2rem 0 3rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.hero-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; }
.checklist { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.checklist li { margin: 0.45rem 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.features article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }

.auth-wrap { display: grid; place-items: center; min-height: 60vh; }
.auth-card { width: min(420px, 100%); }
.stack { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.35rem; font-size: 0.92rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: #101714; border: 1px solid var(--line);
  border-radius: 10px; padding: 0.65rem 0.75rem; width: 100%;
}
.field-error { color: var(--danger); font-size: 0.88rem; }
.flash { padding: 0.75rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.flash-success { background: #163528; border: 1px solid #2a6a4a; }
.flash-error { background: #3a1b1b; border: 1px solid #7a3030; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin-bottom: 1.25rem; }
.stat span { color: var(--muted); font-size: 0.9rem; }
.stat strong { display: block; font-size: 1.8rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.15rem; }
.list li:last-child { border-bottom: 0; }
.badge {
  display: inline-flex; align-items: center; background: #123528; color: var(--accent);
  border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.75rem; text-transform: capitalize;
}
.filters { display: flex; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters input, .filters select { max-width: 280px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.project-card { color: inherit; text-decoration: none; display: grid; gap: 0.5rem; }
.project-card:hover { border-color: var(--accent); text-decoration: none; }
.row-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.task-item { border: 1px solid var(--line); border-radius: 12px; padding: 0.65rem; }
.task-update { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr auto; gap: 0.4rem; align-items: center; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 2rem; }

@media (max-width: 900px) {
  .is-app { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-user { margin-top: 0; width: 100%; }
  .hero, .features, .two-col, .stat-grid, .task-update, .split { grid-template-columns: 1fr; }
}
