:root {
  --bg: #0f1115; --panel: #171a21; --panel-2: #1e222b; --border: #262b36;
  --text: #e8eaf0; --muted: #8b93a7; --accent: #22c55e; --accent-2: #16a34a;
  --blue: #4f8cff; --amber: #f5b82e; --purple: #a78bfa; --red: #f87171;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }

/* layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--panel); border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; padding: 4px 8px 18px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #0ea5e9); display: grid; place-items: center; color: #fff; font-weight: 800; }
.logo span { color: var(--accent); }
.menu-title { font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c9cedb; font-size: 14.5px; }
.nav a:hover { background: var(--panel-2); }
.nav a.active { background: var(--panel-2); color: #fff; font-weight: 600; }
.nav .soon { margin-left: auto; font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.sidebar .bottom { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); display: grid; place-items: center; font-weight: 700; color: #fff; }
.small { font-size: 12px; color: var(--muted); }

.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 0; font-size: 22px; }
.content { padding: 28px 32px; }

/* building blocks */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.btn.primary { background: #fff; color: #111; border-color: #fff; font-weight: 600; }
.btn.green { background: var(--accent); border-color: var(--accent); color: #04140a; font-weight: 600; }
input, select, textarea { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; }
input::placeholder { color: var(--muted); }

/* stat cards */
.stat-head { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; }
.stat-value { font-size: 32px; font-weight: 700; margin: 14px 0 4px; display: flex; align-items: center; gap: 10px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; }
.chip.up { background: #12301f; color: var(--accent); }
.chip.down { background: #3a1717; color: var(--red); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 60px; margin-top: 14px; }
.bars div { flex: 1; border-radius: 3px 3px 0 0; }

/* chart + lists */
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-title h3 { margin: 0; font-size: 17px; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.list-row:last-child { border-bottom: none; }

/* tables + status pills */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 12px; border-bottom: 1px solid var(--border); }
td { padding: 14px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; border: none; }
.s-New { background: #2a2f3a; color: #c9cedb; }
.s-Contacted { background: #172a4d; color: var(--blue); }
.s-Replied { background: #2a2050; color: var(--purple); }
.s-Interested { background: #3a2e10; color: var(--amber); }
.s-Client { background: #12301f; color: var(--accent); }
.s-Not { background: #3a1717; color: var(--red); }

/* phone width: sidebar becomes a top bar */
@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .menu-title, .sidebar .bottom, .nav .soon { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar, .content { padding: 16px; }
}
