:root {
  --bg: oklch(0.985 0.004 80);
  --bg-2: oklch(0.97 0.005 80);
  --bg-3: oklch(0.945 0.006 80);
  --line: oklch(0.9 0.006 80);
  --line-2: oklch(0.83 0.008 80);
  --ink: oklch(0.22 0.01 80);
  --ink-2: oklch(0.42 0.01 80);
  --ink-3: oklch(0.6 0.01 80);
  --accent: oklch(0.55 0.14 260);
  --accent-soft: oklch(0.93 0.04 260);
  --accent-ink: oklch(0.32 0.13 260);
  --good: oklch(0.62 0.13 145);
  --good-soft: oklch(0.93 0.05 145);
  --warn: oklch(0.75 0.13 80);
  --warn-soft: oklch(0.95 0.06 85);
  --bad: oklch(0.6 0.16 28);
  --bad-soft: oklch(0.94 0.05 28);
  --paused: oklch(0.7 0.05 250);
  --paused-soft: oklch(0.94 0.02 250);
  --closed: oklch(0.55 0.01 80);
  --closed-soft: oklch(0.92 0.005 80);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 0 oklch(0.85 0.01 80 / 0.4);
  --shadow: 0 1px 2px oklch(0.5 0.02 80 / 0.06), 0 4px 14px oklch(0.5 0.02 80 / 0.06);

  --font-sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ── App layout ─────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  grid-template-rows: 1fr;
  height: 100vh;
}
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr 60px; }
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  gap: 4px;
  overflow-y: auto;
}
@media (max-width: 880px) {
  .sidebar {
    grid-row: 2; grid-column: 1;
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 6px 8px;
    overflow-x: auto;
    gap: 2px;
  }
  .sidebar .brand, .sidebar .side-section-title, .sidebar .side-spacer { display: none; }
  .sidebar .nav-item { flex: 1 0 auto; flex-direction: column; gap: 2px; padding: 6px 10px; min-width: 64px; font-size: 11px; }
  .sidebar .nav-item .nav-icon { width: 18px; height: 18px; }
  .sidebar .role-switch { display: none; }
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 14px;
}
.brand-mark {
  width: 32px; height: 32px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.brand-edit {
  margin-left: auto;
  background: transparent; border: none; color: var(--ink-3);
  cursor: pointer; padding: 4px; border-radius: 6px;
  display: flex; align-items: center;
}
.brand-edit:hover { color: var(--ink); background: var(--surface-2); }

.side-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 14px 10px 6px;
  font-weight: 600;
}
.side-spacer { flex: 1; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  font-weight: 500;
}
.nav-item:hover { background: var(--bg-3); color: var(--ink); }
.nav-item.active { background: oklch(1 0 0); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }
.nav-count {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.nav-item.active .nav-count { background: var(--bg); }

/* role switch */
.role-switch {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.role-switch-label { font-size: 11px; color: var(--ink-3); padding: 0 10px 6px; }
.role-pill-wrap {
  display: flex; gap: 4px; align-items: stretch;
}
.role-pill {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}
.role-pill:hover { border-color: var(--line-2); }
.role-pill.active { border-color: var(--ink); background: var(--surface-2); }
.role-pill > div:nth-child(2) { min-width: 0; flex: 1; }
.role-pill .role-name, .role-pill .role-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-logout {
  flex-shrink: 0;
  width: 32px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  color: var(--ink-3);
  cursor: pointer;
}
.role-logout:hover { color: var(--ink); border-color: var(--line-2); }
.role-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center;
  font-weight: 600; font-size: 11px;
  flex-shrink: 0;
  overflow: hidden;
}
.role-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.role-name { font-weight: 500; font-size: 13px; line-height: 1.2; }
.role-role { font-size: 11px; color: var(--ink-3); }

/* ── Main ─────────────────────────────────── */
.main {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg);
  z-index: 5;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.topbar-sub { color: var(--ink-3); font-size: 13px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }

.content { padding: 24px; flex: 1; }
@media (max-width: 880px) {
  .topbar { padding: 12px 16px; }
  .content { padding: 16px; }
}

/* ── Generic UI ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: oklch(1 0 0);
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  transition: border-color .12s, background .12s;
}
.btn:hover { border-color: var(--line-2); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: oklch(0.32 0.01 80); border-color: oklch(0.32 0.01 80); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-3); }
.btn-danger { color: var(--bad); }
.btn-sm { padding: 3px 8px; font-size: 12px; }
.btn-icon { padding: 5px; }

.input, .select {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: oklch(1 0 0);
  font-size: 13px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' fill='none' stroke='%23666' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; }
.input-mono { font-family: var(--font-mono); }

.card {
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.card-h {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--ink-2);
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.badge-open { background: var(--good-soft); color: var(--good); }
.badge-paused { background: var(--paused-soft); color: var(--paused); }
.badge-closed { background: var(--closed-soft); color: var(--closed); }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink-3);
}

/* ── Tables ─────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.tbl th {
  font-weight: 500;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-2);
  position: sticky; top: 0;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: var(--bg-2); }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl td.muted { color: var(--ink-3); }
.tbl tr.clickable { cursor: pointer; }

/* ── Funnel ─────────────────────────────────── */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.funnel-row {
  display: grid;
  grid-template-columns: 220px 1fr 96px;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}
.funnel-label { font-weight: 500; }
.funnel-label-sub { color: var(--ink-3); font-size: 11px; margin-top: 1px; }
.funnel-bar-wrap {
  background: var(--bg-3);
  height: 32px;
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
}
.funnel-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-soft), oklch(0.88 0.06 260));
  border-right: 2px solid var(--accent);
  display: flex; align-items: center;
  padding: 0 12px;
  transition: width .4s cubic-bezier(.2,.7,.2,1);
}
.funnel-bar-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-ink);
}
.funnel-conv {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  text-align: right;
}
.funnel-conv-arrow { color: var(--ink-3); font-size: 11px; margin-right: 4px; }
.conv-good { color: var(--good); }
.conv-warn { color: var(--warn); }
.conv-bad { color: var(--bad); }
.conv-mid { color: var(--ink-2); }

@media (max-width: 720px) {
  .funnel-row { grid-template-columns: 1fr; gap: 4px; padding: 8px 0; }
  .funnel-conv { text-align: left; }
}

/* ── Stat tiles ─────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}
.stat-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.stat-value { font-family: var(--font-mono); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.stat-delta { font-size: 12px; margin-top: 2px; color: var(--ink-3); }

/* ── Filters bar ─────────────────────────────────── */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px;
}
.filter-group {
  display: flex; align-items: center; gap: 6px;
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 2px 4px 2px 10px;
}
.filter-group-label { font-size: 11px; color: var(--ink-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.filter-group .select, .filter-group .input { border: 0; padding: 5px 8px; background: transparent; }
.filter-group .select:focus, .filter-group .input:focus { box-shadow: none; }

/* ── Modal ─────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: oklch(0.2 0.01 80 / 0.4);
  display: grid; place-items: center;
  z-index: 50;
  padding: 16px;
}
.modal {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px oklch(0.2 0.02 80 / 0.2);
}
.modal-h {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.modal-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-f {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex; gap: 8px; justify-content: flex-end;
  background: var(--bg-2);
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
}

/* ── Form ─────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.form-row:last-child { border-bottom: 0; }
.form-row label { font-weight: 500; color: var(--ink-2); font-size: 13px; }
.form-row .input, .form-row .select { width: 100%; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* daily entry stage grid */
.stage-grid {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 6px 12px;
  align-items: center;
}
.stage-grid label { font-size: 13px; color: var(--ink-2); }
.stage-grid input {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Vacancy detail ─────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}
@media (max-width: 1080px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.timeline {
  display: flex; align-items: center; gap: 0;
  margin: 8px 0;
  position: relative;
}
.timeline-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--line-2);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.timeline-dot.done { background: var(--accent); border-color: var(--accent); }
.timeline-dot.now { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline-line { flex: 1; height: 2px; background: var(--line); }
.timeline-line.done { background: var(--accent); }
.timeline-labels {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin-top: 6px;
  font-size: 11px;
}
.timeline-labels > div { color: var(--ink-3); }
.timeline-labels > div .date { color: var(--ink); font-family: var(--font-mono); display: block; margin-top: 2px; }

/* stage editor */
.stage-list { display: flex; flex-direction: column; gap: 4px; }
.stage-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: oklch(1 0 0);
}
.stage-handle {
  cursor: grab; color: var(--ink-3); padding: 0 4px;
}
.stage-row .input { flex: 1; border: 0; padding: 2px 6px; }
.stage-row .input:focus { box-shadow: 0 0 0 2px var(--accent-soft); }

/* empty state */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
}
.empty-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.4; }
.empty h3 { margin: 0 0 4px; font-size: 14px; color: var(--ink); font-weight: 500; }

/* login */
.login-bg {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 20%, oklch(0.95 0.04 260 / 0.6), transparent 50%),
    radial-gradient(circle at 80% 80%, oklch(0.95 0.03 80 / 0.5), transparent 50%),
    var(--bg);
}
.login-card {
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 24px; color: var(--ink-3); font-size: 13px; }
.login-card .form-row { grid-template-columns: 1fr; gap: 6px; padding: 8px 0; border: 0; }
.login-card label { font-size: 12px; color: var(--ink-3); }
.login-roles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.login-role-pill {
  flex: 1; min-width: 80px;
  padding: 8px;
  font-size: 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  text-align: center;
  cursor: pointer;
  font-family: var(--font-mono);
}
.login-role-pill:hover { background: var(--bg-3); }

/* utility */
.row { display: flex; align-items: center; gap: 10px; }
.row-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.h2 { font-size: 15px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--ink-2);
  font-weight: 500;
}
.priority-high { background: var(--bad-soft); color: var(--bad); }
.priority-mid { background: var(--warn-soft); color: oklch(0.5 0.13 70); }
.priority-low { background: var(--bg-3); color: var(--ink-3); }

/* search input */
.search {
  position: relative;
  display: flex; align-items: center;
}
.search input {
  padding-left: 30px;
  width: 220px;
}
.search-icon {
  position: absolute; left: 8px;
  width: 14px; height: 14px;
  color: var(--ink-3);
  pointer-events: none;
}

/* tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* bar chart for recruiter compare */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 100px 1fr 60px; gap: 12px; align-items: center; }
.bar-row .name { font-weight: 500; font-size: 13px; }
.bar-row .bar-wrap { background: var(--bg-3); height: 18px; border-radius: 4px; overflow: hidden; }
.bar-row .bar { height: 100%; background: var(--accent); }
.bar-row .val { font-family: var(--font-mono); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

/* role-restricted note */
.alert {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid oklch(0.85 0.06 260);
  color: var(--accent-ink);
  font-size: 13px;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px;
}
.alert-warn { background: var(--warn-soft); border-color: oklch(0.83 0.1 80); color: oklch(0.4 0.13 70); }

/* checkbox */
.checkbox {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  cursor: pointer;
}
.checkbox input { accent-color: var(--ink); }

.row-clickable { cursor: pointer; }
.row-clickable:hover { background: var(--surface-2); }
.btn-link {
  background: transparent; border: none; padding: 0;
  color: var(--ink-2); cursor: pointer; text-decoration: underline;
  font-size: inherit; font-family: inherit;
}
.btn-link:hover { color: var(--ink); }

/* ── Profile ─────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
}
.profile-side {
  display: flex; flex-direction: column; gap: 18px;
}
.profile-photo-wrap {
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.profile-photo {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2);
}
.profile-photo-placeholder {
  display: grid; place-items: center;
  font-size: 76px; font-weight: 600;
}
.profile-photo-edit {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.profile-id h2 { font-size: 22px; letter-spacing: -0.02em; }
.profile-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.profile-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.profile-stat-num { font-family: var(--font-mono); font-size: 22px; font-weight: 600; line-height: 1; }
.profile-stat-lbl { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

.profile-main { min-width: 0; }
.profile-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 540px) {
  .profile-meta-grid { grid-template-columns: 1fr; }
}
.profile-section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3); font-weight: 600; margin-bottom: 6px;
}
.tag-soft { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }

/* ── Personal Dashboard ─────────────── */
.dash-hero {
  display: flex; gap: 18px; align-items: center;
  padding: 18px 20px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent-soft), oklch(0.97 0.02 260));
  border: 1px solid oklch(0.88 0.04 260);
  border-radius: 14px;
}
.dash-hero-avatar {
  width: 56px; height: 56px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  border: 1px solid oklch(0.85 0.05 260);
}
.dash-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-hero-greeting { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.dash-hero-name { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.dash-hero-sub { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

.dash-kpi {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 720px) { .dash-kpi { grid-template-columns: repeat(2, 1fr); } }
.dash-kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
}
.dash-kpi-lbl { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.dash-kpi-num { font-family: var(--font-mono); font-size: 28px; font-weight: 600; line-height: 1.1; margin-top: 6px; }
.dash-kpi-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.dash-kpi-sub.up { color: var(--good-ink, oklch(0.42 0.13 145)); }
.dash-kpi-sub.down { color: var(--bad-ink, oklch(0.5 0.16 25)); }

.dash-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px;
}
@media (max-width: 920px) { .dash-grid { grid-template-columns: 1fr; } }

.quick-vac-list {
  display: flex; flex-direction: column;
}
.quick-vac-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.quick-vac-row:last-child { border-bottom: none; }
.quick-vac-row:hover { background: var(--surface-2); }
.quick-vac-title { font-weight: 500; font-size: 13.5px; }
.quick-vac-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.quick-vac-stale { color: oklch(0.5 0.16 25); font-weight: 500; }

.chev-back { transform: rotate(180deg); }


/* ── Tasks (kanban) ─────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } }

.kanban-col {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  min-height: 220px;
  transition: background .15s, border-color .15s;
}
.kanban-col-hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  border-style: dashed;
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.kanban-col-title { font-weight: 600; font-size: 13px; letter-spacing: -0.01em; }
.kanban-col-count {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  padding: 1px 7px; border-radius: 999px; min-width: 22px; text-align: center;
}
.kanban-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban-empty { color: var(--ink-3); font-size: 12px; padding: 16px 8px; text-align: center; font-style: italic; }

.task-card {
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: grab;
  transition: border-color .12s, box-shadow .12s, transform .12s;
  user-select: none;
}
.task-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.task-card-dragging { opacity: 0.4; transform: rotate(1.5deg); }
.task-card-overdue { border-left: 3px solid var(--bad); }
.task-card-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; margin: 2px 0 4px; letter-spacing: -0.005em; }
.task-card-desc {
  font-size: 12px; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}
.task-card-vacancy {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-2);
  background: var(--bg-3);
  padding: 2px 7px; border-radius: 999px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 8px;
}
.task-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-card-assignee { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2); }
.task-card-due { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); margin-left: auto; }
.task-card-due.is-overdue { color: var(--bad); font-weight: 600; }
.task-card-due.is-today { color: oklch(0.55 0.13 60); font-weight: 600; }
.task-card-comments { font-size: 11px; color: var(--ink-3); }

.task-new {
  font-size: 9px; font-weight: 700; padding: 1px 5px;
  background: var(--accent); color: oklch(1 0 0);
  border-radius: 3px; letter-spacing: 0.05em;
}
.task-due-bad { font-size: 10px; color: var(--bad); font-weight: 600; }
.task-due-warn { font-size: 10px; color: oklch(0.55 0.13 60); font-weight: 600; }

.task-status-pill {
  font-size: 11px; font-weight: 500;
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-3); color: var(--ink-2);
}
.task-status-doing { background: oklch(0.93 0.04 260); color: var(--accent-ink); }
.task-status-review { background: oklch(0.93 0.05 60); color: oklch(0.4 0.12 60); }
.task-status-done { background: var(--good-soft); color: oklch(0.32 0.12 145); }

.task-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px;
}
.task-meta-row { display: flex; align-items: center; gap: 8px; }
.task-meta-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; min-width: 100px; }
.task-meta-val { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.task-meta-row .select, .task-meta-row .input { flex: 1; }
@media (max-width: 640px) { .task-meta { grid-template-columns: 1fr; } }

.task-desc-display {
  border: 1px dashed var(--line); padding: 10px 12px;
  border-radius: var(--r-sm); cursor: text;
  white-space: pre-wrap; min-height: 40px; font-size: 13px;
}
.task-desc-display:hover { border-color: var(--line-2); background: var(--bg-2); }

.task-comment {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px; background: var(--bg-2); border-radius: var(--r-sm);
}

/* ── Notification bell (floating top-right) ──────── */
.floating-bell {
  position: fixed; top: 14px; right: 24px; z-index: 6;
}
.notif-btn {
  position: relative;
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 999px;
}
.notif-btn:hover { border-color: var(--line-2); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--bad); color: oklch(1 0 0);
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 999px; display: grid; place-items: center;
  padding: 0 4px; border: 2px solid var(--bg);
}
.notif-pop {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: 340px; background: oklch(1 0 0);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 12px 32px oklch(0.3 0.02 80 / 0.18);
  overflow: hidden; max-height: 460px; display: flex; flex-direction: column;
}
.notif-pop-h {
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.notif-pop-list { overflow-y: auto; }
.notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; width: 100%;
  border: 0; background: transparent; text-align: left; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.notif-item:hover { background: var(--bg-2); }
.notif-item:last-child { border-bottom: 0; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--ink-3); }
.notif-dot-assigned { background: var(--accent); }
.notif-dot-comment { background: oklch(0.6 0.13 200); }
.notif-dot-overdue { background: var(--bad); }
.notif-dot-today { background: oklch(0.6 0.13 60); }

/* Task assignment toast */
.task-toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 50;
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 14px 36px oklch(0.3 0.02 80 / 0.22);
  padding: 12px 14px; width: 320px;
  animation: toastIn .25s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.task-toast-h { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.task-toast-x {
  margin-left: auto; background: transparent; border: 0; cursor: pointer; color: var(--ink-3);
  display: flex; align-items: center;
}
.task-toast-x:hover { color: var(--ink); }
.task-toast-title { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; line-height: 1.3; }

/* ── Guide (knowledge base) ─────────────────── */
.guide-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 60px);
}
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } }
.guide-side {
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  padding: 14px 8px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  position: sticky; top: 60px;
}
@media (max-width: 900px) { .guide-side { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); } }
.guide-side-h {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3); padding: 0 8px 8px; font-weight: 600;
}

.guide-tree-item {
  display: flex; align-items: center; gap: 2px;
  padding: 3px 4px;
  border-radius: 6px;
  position: relative;
}
.guide-tree-item:hover { background: var(--bg-3); }
.guide-tree-item.active { background: oklch(1 0 0); box-shadow: var(--shadow-sm); }
.guide-tree-toggle {
  background: transparent; border: 0; cursor: pointer;
  font-size: 10px; color: var(--ink-3); padding: 2px 4px;
  line-height: 1; flex-shrink: 0;
}
.guide-tree-name {
  background: transparent; border: 0; cursor: pointer;
  flex: 1; min-width: 0; text-align: left;
  font-size: 13px; color: var(--ink); padding: 4px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.guide-tree-add {
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-3); font-size: 14px; padding: 2px 6px;
  border-radius: 4px;
  opacity: 0; transition: opacity .12s;
}
.guide-tree-item:hover .guide-tree-add { opacity: 1; }
.guide-tree-add:hover { background: var(--bg-3); color: var(--ink); }

.guide-main {
  padding: 0 0 80px;
  overflow-x: hidden;
}
.guide-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 36px;
}
@media (max-width: 640px) { .guide-page { padding: 20px 16px; } }
.guide-page-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: var(--ink-3);
  margin-bottom: 16px;
}
.guide-page-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
  position: relative;
}
.guide-page-icon {
  font-size: 42px; line-height: 1; background: transparent; border: 0; cursor: pointer;
  padding: 0;
}
.guide-page-title {
  font-size: 36px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0; cursor: text; line-height: 1.1;
  flex: 1;
}
.guide-icon-picker {
  position: absolute; top: 50px; left: 0;
  display: flex; flex-wrap: wrap; gap: 4px;
  background: oklch(1 0 0); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px;
  box-shadow: 0 8px 24px oklch(0.3 0.02 80 / 0.15);
  z-index: 10;
  width: 240px;
}
.guide-icon-opt {
  background: transparent; border: 0; cursor: pointer;
  font-size: 22px; padding: 4px 6px; border-radius: 4px;
}
.guide-icon-opt:hover { background: var(--bg-2); }

.guide-blocks { display: flex; flex-direction: column; gap: 2px; }

.guide-block {
  position: relative;
  display: flex; gap: 4px; align-items: flex-start;
  padding: 2px 0;
  border-radius: 4px;
}
.guide-block:hover { background: oklch(1 0 0 / 0.4); }
.guide-block-handles {
  width: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding-top: 4px;
  position: relative;
}
.guide-block-handle {
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-3); font-size: 12px; padding: 2px;
  border-radius: 3px;
  opacity: 0; transition: opacity .12s;
}
.guide-block:hover .guide-block-handle { opacity: 0.6; }
.guide-block-handle:hover { opacity: 1 !important; background: var(--bg-3); color: var(--ink); }
.guide-block-menu {
  position: absolute; top: 22px; left: 0;
  background: oklch(1 0 0); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 4px;
  box-shadow: 0 8px 24px oklch(0.3 0.02 80 / 0.15);
  z-index: 10;
  display: flex; flex-direction: column;
  min-width: 140px;
}
.guide-block-menu button {
  background: transparent; border: 0; cursor: pointer;
  text-align: left; padding: 5px 10px; border-radius: 4px;
  font-size: 12.5px; color: var(--ink);
}
.guide-block-menu button:hover { background: var(--bg-2); }
.guide-block-menu button:disabled { color: var(--ink-3); cursor: not-allowed; }
.guide-block-menu button.btn-danger { color: var(--bad); }

.guide-block-body {
  flex: 1; min-width: 0;
  display: flex; gap: 6px; align-items: flex-start;
}
.guide-block-input {
  width: 100%; border: 0; background: transparent;
  font-family: inherit; font-size: 14.5px; line-height: 1.55;
  color: var(--ink); padding: 4px 0; outline: none;
}
.guide-block-input:focus { background: var(--bg-2); padding: 4px 8px; border-radius: 4px; }
.guide-block-input::placeholder { color: var(--ink-3); }

.guide-block-h1 .guide-block-input { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; padding-top: 16px; }
.guide-block-h2 .guide-block-input { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; padding-top: 12px; }
.guide-li-bullet { padding-top: 6px; color: var(--ink-2); }
.guide-todo-cb { margin-top: 8px; cursor: pointer; flex-shrink: 0; }
.guide-block-todo .guide-block-input { padding-top: 4px; }

.guide-block-callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 8px 10px;
}
.guide-block-callout .guide-block-input { color: var(--accent-ink); font-size: 13.5px; }

.guide-block-code {
  background: var(--bg-3);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.guide-block-code .guide-block-input {
  font-family: var(--font-mono); font-size: 12.5px;
  white-space: pre; resize: vertical;
}

.guide-add-block {
  background: transparent; border: 1px dashed var(--line);
  cursor: pointer; padding: 8px;
  border-radius: var(--r-sm); margin-top: 12px;
  color: var(--ink-3); font-size: 12.5px;
  text-align: left; padding-left: 14px;
}
.guide-add-block:hover { border-color: var(--ink-3); color: var(--ink-2); background: var(--bg-2); }


/* Notification tabs + reminders */
.notif-pop-h { padding: 6px 6px; }
.notif-tab {
  background: transparent; border: 0; cursor: pointer;
  padding: 6px 10px; border-radius: 6px;
  font-size: 12px; color: var(--ink-3); font-weight: 500;
}
.notif-tab.active { background: var(--bg-2); color: var(--ink); font-weight: 600; }
.notif-tab:hover { color: var(--ink); }

.reminder-card {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  background: oklch(1 0 0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 6px;
}
.reminder-card.is-today { border-left: 3px solid oklch(0.6 0.13 60); }
.reminder-card.is-past { border-left: 3px solid var(--bad); background: oklch(0.99 0.01 30); }


/* Company profile */
.company-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.company-logo {
  width: 84px; height: 84px; border-radius: 18px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 30px;
  letter-spacing: -0.04em; flex-shrink: 0;
  overflow: hidden;
}
.company-logo img { width: 100%; height: 100%; object-fit: cover; }
.company-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.company-section:last-child { border-bottom: 0; }
.company-section-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.company-section-h h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin: 0; font-weight: 600; }
.company-mission {
  background: var(--accent-soft); color: var(--accent-ink);
  border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: 6px;
}
.company-values {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (max-width: 720px) { .company-values { grid-template-columns: 1fr; } }
.company-value {
  background: oklch(1 0 0); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; position: relative;
}
.company-x {
  position: absolute; top: 6px; right: 6px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-3); padding: 4px; border-radius: 4px;
  opacity: 0; transition: opacity .12s;
}
.company-x:hover { background: var(--bg-2); color: var(--bad); }
.company-value:hover .company-x, .company-perks li:hover .company-x, .company-social:hover .company-x { opacity: 1; }
.company-x-inline { position: static; }
.company-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.company-perks li { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.company-perk-bullet { color: var(--accent); font-size: 14px; }
.company-socials { display: flex; flex-direction: column; gap: 8px; }
.company-social { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.company-social-link {
  display: flex; align-items: center; padding: 8px 12px;
  background: var(--bg-2); border-radius: var(--r-sm);
  text-decoration: none; color: var(--ink); width: 100%;
}
.company-social-link:hover { background: var(--bg-3); }
.company-contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .company-contacts { grid-template-columns: 1fr; } }
.company-contact { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--bg-2); border-radius: var(--r-sm); }
.company-contact .muted { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
