:root {
  --teal: #2F5D6E;
  --navy: #1A2B3A;
  --mint: #5CE0C0;
  --purple: #6352A3;
  --ice: #EDF2F0;
  --green: #0A9E84;
  --yellow: #b87d0a;
  --red: #c0392b;
  --border: #c2cfc9;
  --muted: #5E7680;
  --text2: #3D5A68;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Archivo', system-ui, sans-serif;
  background: var(--ice);
  color: var(--navy);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

/* Sidebar */
aside.nav {
  background: var(--navy);
  color: #fff;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { padding: 0 20px 24px; display: flex; align-items: center; gap: 10px; }
.brand-mark { font-weight: 800; font-size: 18px; letter-spacing: -0.5px; }
.brand-mark .x { color: var(--mint); }
.brand-sub { font-size: 11px; color: var(--mint); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 2px; }
nav.menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; color: rgba(255,255,255,0.75);
  font-size: 13.5px; border-left: 3px solid transparent;
}
nav.menu a:hover { color: #fff; background: rgba(255,255,255,0.04); text-decoration: none; }
nav.menu a.active {
  color: #fff; background: rgba(92,224,192,0.08); border-left-color: var(--mint);
}
nav.menu .group-label {
  padding: 18px 20px 6px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 1.5px; color: rgba(255,255,255,0.4);
}

/* Main */
main { padding: 0; }
header.topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 28px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 5;
}
header.topbar h1 { margin: 0; font-size: 18px; font-weight: 700; }
header.topbar .crumbs { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.search { background: var(--ice); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 13px; width: 280px; font-family: inherit; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: var(--mint); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }

.content { padding: 24px 28px 60px; }

/* Cards */
.card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.card h3 { margin: 0 0 14px; font-size: 14px; font-weight: 700; }
.card .card-sub { color: var(--muted); font-size: 12px; margin-top: -10px; margin-bottom: 14px; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 4px; font-family: 'DM Mono', monospace; }
.stat .delta { font-size: 12px; margin-top: 6px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

/* Grid utilities */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--teal); color: var(--mint); }
.btn-primary:hover { background: #244c5b; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { background: var(--ice); }
.btn-danger { background: var(--red); color: #fff; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th { text-align: left; padding: 10px 12px; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); border-bottom: 1px solid var(--border); background: #fafbfb; }
table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #fafbfb; }
.table-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

/* Badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; line-height: 1.4; }
.badge-open { background: #e6f4f1; color: var(--green); }
.badge-screen { background: #e8eef0; color: var(--teal); }
.badge-interview { background: #ece8f5; color: var(--purple); }
.badge-offer { background: #fef3e1; color: var(--yellow); }
.badge-hired { background: var(--mint); color: var(--navy); }
.badge-closed { background: #f0f0f0; color: var(--muted); }
.badge-rejected { background: #fbe9e6; color: var(--red); }
.badge-overdue { background: #fbe9e6; color: var(--red); }
.badge-ontrack { background: #e6f4f1; color: var(--green); }
.badge-warning { background: #fef3e1; color: var(--yellow); }

/* Pipeline kanban */
.kanban { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kanban .col { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-height: 480px; }
.kanban .col h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); display: flex; justify-content: space-between; }
.kanban .col h4 .count { background: var(--ice); color: var(--navy); padding: 1px 7px; border-radius: 99px; font-size: 11px; }
.candidate-card { background: var(--ice); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: pointer; }
.candidate-card .name { font-weight: 600; font-size: 13px; }
.candidate-card .role { color: var(--muted); font-size: 12px; margin-top: 2px; }
.candidate-card .meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 11px; color: var(--muted); }

/* Forms */
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
label.field input, label.field select, label.field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px;
  font-family: inherit; font-size: 13.5px; background: #fff;
}

/* Timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline:before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item:before { content: ''; position: absolute; left: -22px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--mint); }
.timeline-item .when { font-size: 11.5px; color: var(--muted); }
.timeline-item .what { font-size: 13.5px; margin-top: 2px; }

/* Chart placeholder */
.chart {
  background: linear-gradient(180deg, #f6f9f8 0%, #fff 100%);
  border: 1px dashed var(--border); border-radius: 8px;
  height: 240px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
}
.bars { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 12px; }
.bars .bar { flex: 1; background: var(--teal); border-radius: 4px 4px 0 0; position: relative; }
.bars .bar.alt { background: var(--mint); }
.bars .bar span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Misc */
.tag { display: inline-block; background: var(--ice); border: 1px solid var(--border); padding: 2px 8px; border-radius: 5px; font-size: 11px; color: var(--text2); margin-right: 4px; }
.divider { border-top: 1px solid var(--border); margin: 18px 0; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
h2 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
.lead { color: var(--muted); margin-bottom: 18px; }
.mini { font-size: 11.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }

/* Progress */
.progress { background: var(--ice); border-radius: 99px; height: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--mint); }
