/* ---------- Reset & base ---------- */
*,*::before,*::after { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }

:root {
  --bg: #F5F4F2;
  --bg-soft: #FBFAF8;
  --surface: #FFFFFF;
  --ink: #16161D;
  --ink-soft: #4B4B57;
  --muted: #8A8A95;
  --line: rgba(22,22,29,.08);
  --line-strong: rgba(22,22,29,.14);
  --brand: #7C3AED;
  --brand-soft: #EDE7FE;
  --brand-ink: #4C1D95;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #0EA5E9;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(22,22,29,.06), 0 1px 1px rgba(22,22,29,.04);
  --shadow: 0 4px 18px rgba(22,22,29,.06), 0 1px 2px rgba(22,22,29,.04);
  --shadow-lg: 0 24px 48px rgba(22,22,29,.10), 0 6px 12px rgba(22,22,29,.04);
  --shadow-pop: 0 18px 60px rgba(124,58,237,.22);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gap: 18px;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 32px; line-height: 1.15; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.25; }

/* ---------- Layout shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #241B47;
  border-right: 1px solid rgba(0,0,0,.06);
  padding: 24px 16px 20px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: rgba(255,255,255,.85);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px 32px;
  text-decoration: none;
  color: inherit;
}
.brand img {
  height: 44px;
  width: auto;
  display: block;
}

/* Login: full-width white logo on dark gradient */
.brand-logo-full {
  height: 56px;
  width: auto;
  display: block;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.45); padding: 18px 12px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.78);
  font-weight: 500;
  transition: background .15s, color .15s, transform .15s;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active {
  background: #fff; color: #241B47;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.nav-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: grid; place-items: center;
  color: rgba(255,255,255,.85);
}
.nav a.active .nav-icon { background: rgba(36,27,71,.10); color: #241B47; }
.nav-icon svg { display: block; }
.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}
.nav a.active .nav-badge { background: #241B47; color: #fff; }

.sidebar-user {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 16px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar { width: 36px; height: 36px; font-size: 13px; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.sidebar-user-info { line-height: 1.15; }
.sidebar-user-info .n { font-weight: 600; font-size: 13px; color: #fff; }
.sidebar-user-info .t { color: rgba(255,255,255,.55); font-size: 11px; }
.logout-btn {
  margin-left: auto;
  background: none; border: 0; color: rgba(255,255,255,.55);
  padding: 6px; border-radius: 8px;
  display: grid; place-items: center;
}
.logout-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(245,244,242,.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  display: flex; align-items: center; gap: 16px;
}
.search {
  flex: 1; max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,58,237,.12); color: var(--ink); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; padding: 2px 6px; border-radius: 6px;
  background: rgba(22,22,29,.06); color: var(--muted);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.page {
  padding: 28px 32px 56px;
  width: 100%;
}
.page-header { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-header .meta { color: var(--muted); margin-top: 6px; font-size: 14px; }
.page-header-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600; font-size: 13px;
  transition: transform .12s, box-shadow .15s, background .15s, color .15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--brand); }
.btn.brand { background: var(--brand); color: #fff; box-shadow: var(--shadow-pop); }
.btn.brand:hover { background: var(--brand-ink); }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface); }
.btn.subtle { background: rgba(22,22,29,.05); }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn.lg { padding: 14px 22px; font-size: 14px; border-radius: 14px; }
.btn.icon-only { padding: 10px; }

/* ---------- Surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card.flat { border: 0; box-shadow: var(--shadow-sm); }
.card.hoverable { transition: transform .15s, box-shadow .2s; cursor: pointer; }
.card.hoverable:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px;
}
.kpi {
  background: var(--surface); border-radius: var(--radius); padding: 18px 20px;
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .value { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; margin-top: 4px; }
.kpi .trend { font-size: 12px; font-weight: 600; color: var(--success); margin-top: 6px; display: inline-flex; gap: 4px; align-items: center; }
.kpi .trend.down { color: var(--danger); }
.kpi .glyph {
  position: absolute; right: 14px; top: 14px;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
}
.kpi .glyph svg { display: block; }
.kpi.is-pink .glyph { background: #FCE7F3; color: #BE185D; }
.kpi.is-green .glyph { background: #DCFCE7; color: #15803D; }
.kpi.is-amber .glyph { background: #FEF3C7; color: #92400E; }
.kpi.is-blue .glyph { background: #DBEAFE; color: #1D4ED8; }

.section-title {
  display: flex; align-items: baseline; gap: 14px; margin: 14px 0 16px;
}
.section-title h2 { font-size: 19px; }
.section-title .sub { color: var(--muted); font-size: 13px; }
.section-title .more { margin-left: auto; font-size: 13px; color: var(--brand); font-weight: 600; }

/* ---------- Masonry (Pinterest-style) ---------- */
.masonry {
  column-count: 4;
  column-gap: var(--gap);
}
@media (max-width: 1500px) { .masonry { column-count: 3; } }
@media (max-width: 1100px) { .masonry { column-count: 2; } }
@media (max-width: 720px)  { .masonry { column-count: 1; } }

.pin {
  break-inside: avoid;
  margin-bottom: var(--gap);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
  display: block;
  color: inherit;
}
.pin:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.pin-cover {
  position: relative;
  padding: 26px 22px;
  color: #16161D;
  min-height: 140px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.pin-cover.tall { min-height: 200px; }
.pin-cover.taller { min-height: 240px; }
.pin-cover .pin-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.06), inset 0 0 0 1px rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
  color: rgba(22,22,29,.78);
}
.pin-cover .pin-icon svg { display: block; }
.pin-cover .status-chip {
  position: absolute; top: 14px; right: 14px;
}
.pin-cover .pin-title {
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
  margin-top: 14px;
}
.pin-cover .pin-company { font-size: 12px; opacity: .7; margin-top: 2px; }
.pin-cover .pin-pitch {
  font-size: 13px; margin-top: 12px; line-height: 1.4;
  opacity: .85; max-width: 30ch;
}
.pin-body { padding: 14px 18px 18px; }
.pin-meta {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.pin-footer {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 10px 18px 16px;
  font-size: 12px; color: var(--muted);
}
.pin-footer .stats { display: flex; gap: 12px; }
.pin-footer .stats b { color: var(--ink); font-weight: 600; }

/* ---------- Tag/Chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: rgba(22,22,29,.06);
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip.success { background: #DCFCE7; color: #14532D; }
.chip.warn { background: #FEF3C7; color: #78350F; }
.chip.danger { background: #FEE2E2; color: #7F1D1D; }
.chip.info { background: #DBEAFE; color: #1E3A8A; }
.chip.outline { background: transparent; border: 1px solid var(--line-strong); }
.chip.dark { background: var(--ink); color: #fff; }

.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.85);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.status-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-chip.active { color: #15803D; }
.status-chip.paused { color: #B45309; }
.status-chip.closed { color: #7F1D1D; }

/* ---------- Avatars ---------- */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700; font-size: 11px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 18px; }
.avatar.xl { width: 88px; height: 88px; font-size: 26px; border-radius: 24px; }

.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- Filters / tabs ---------- */
.tabs {
  display: flex; gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
}
.tabs a, .tabs button {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
  background: none; border: 0;
}
.tabs a.active, .tabs button.active { background: var(--ink); color: #fff; }
.tabs a:not(.active):hover, .tabs button:not(.active):hover { color: var(--ink); background: rgba(22,22,29,.04); }

.filterbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 22px;
}
.select {
  appearance: none;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 5l3 3 3-3' fill='none' stroke='%238A8A95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 12px center;
  padding: 9px 32px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit; color: var(--ink);
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Candidate card ---------- */
.candidate-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: transform .15s, box-shadow .2s;
  position: relative; overflow: hidden;
  break-inside: avoid; margin-bottom: var(--gap);
  display: block; color: inherit;
}
.candidate-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.candidate-card .head { display: flex; gap: 12px; align-items: center; }
.candidate-card .name { font-weight: 700; }
.candidate-card .headline { color: var(--muted); font-size: 12px; margin-top: 2px; }
.candidate-card .meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.candidate-card .footer {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.candidate-card .score-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-weight: 700; font-size: 12px;
}
.candidate-card .score-pill.good { background: #DCFCE7; color: #14532D; }
.candidate-card .score-pill.mid { background: #FEF3C7; color: #78350F; }
.candidate-card .score-pill.bad { background: #FEE2E2; color: #7F1D1D; }
.candidate-card .star { position: absolute; top: 14px; right: 14px; color: #F59E0B; display: grid; place-items: center; }
.candidate-card .star svg { display: block; fill: currentColor; }

/* ---------- Profile / CV layout ---------- */
.profile-grid {
  display: grid; grid-template-columns: 360px 1fr; gap: 20px;
}
@media (max-width: 1100px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-hero {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative; overflow: hidden;
}
.profile-hero .cover {
  position: absolute; inset: 0; height: 100px;
  background: linear-gradient(135deg, var(--brand) 0%, #F472B6 100%);
}
.profile-hero .inner {
  position: relative; padding-top: 60px;
  display: flex; flex-direction: column; gap: 6px;
}
.profile-hero .avatar.xl { box-shadow: 0 8px 22px rgba(0,0,0,.18); border: 4px solid var(--surface); }
.profile-hero .name { font-size: 22px; font-weight: 800; margin-top: 12px; }
.profile-hero .headline { color: var(--muted); font-size: 13px; }

.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 14px; }
.detail-list .k { color: var(--muted); font-size: 12px; }
.detail-list .v { font-weight: 600; font-size: 13px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.cv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.cv-section + .cv-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.cv-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.cv-item { padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); margin-bottom: 10px; }
.cv-item h4 { font-size: 15px; }
.cv-item .place { color: var(--muted); font-size: 12px; }
.cv-item .desc { margin-top: 8px; color: var(--ink-soft); font-size: 13px; }
.cv-item ul { margin: 8px 0 0; padding-left: 18px; }
.cv-item ul li { font-size: 13px; color: var(--ink-soft); margin-bottom: 2px; }

/* ---------- Scoring widget ---------- */
.score-hero {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px; display: flex; gap: 24px; align-items: center;
}
.score-ring { width: 120px; height: 120px; position: relative; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .num {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 800; font-size: 30px; letter-spacing: -0.025em;
}
.score-bar {
  margin: 10px 0;
  background: rgba(22,22,29,.06);
  height: 8px; border-radius: 999px; position: relative; overflow: hidden;
}
.score-bar .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #7C3AED, #F472B6);
  border-radius: 999px;
}
.score-row { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.score-row:last-child { border-bottom: 0; }
.score-row .top { display: flex; justify-content: space-between; align-items: baseline; }
.score-row .top .n { font-weight: 600; font-size: 14px; }
.score-row .top .v { font-weight: 700; font-size: 14px; color: var(--ink); }
.score-row .c { font-size: 12px; color: var(--muted); margin-top: 4px; }
.score-row .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Chat ---------- */
.chat-shell { display: grid; grid-template-columns: 320px 1fr; gap: 20px; min-height: 70vh; }
@media (max-width: 1100px) { .chat-shell { grid-template-columns: 1fr; } }

.chat-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px;
  max-height: 75vh; overflow: auto;
}
.chat-list-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  color: inherit;
}
.chat-list-item:hover { background: rgba(22,22,29,.04); }
.chat-list-item.active { background: var(--brand-soft); }
.chat-list-item .name { font-weight: 600; font-size: 13px; }
.chat-list-item .preview { color: var(--muted); font-size: 12px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-item .time { font-size: 11px; color: var(--muted); }

.chat-pane {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
}
.chat-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
}
.chat-header .actions { margin-left: auto; display: flex; gap: 8px; }

.chat-thread {
  flex: 1; min-height: 320px;
  padding: 22px;
  background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
}
.bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}
.bubble .ts {
  display: block; margin-top: 4px;
  font-size: 10.5px; opacity: .6;
}
.bubble.incoming {
  background: var(--surface); align-self: flex-start;
  border-bottom-left-radius: 6px;
}
.bubble.outgoing {
  background: #2563EB; color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}
.bubble.outgoing.bot { background: linear-gradient(135deg, #7C3AED, #F472B6); }
.bubble .sender { display: block; font-size: 11px; font-weight: 600; margin-bottom: 4px; opacity: .8; }
.day-divider { text-align: center; color: var(--muted); font-size: 11px; padding: 8px 0; }

.chat-composer {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.ai-suggestion {
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(244,114,182,.08));
  border: 1px dashed rgba(124,58,237,.3);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; gap: 12px;
}
.ai-suggestion .ai-tag {
  background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.ai-suggestion .text { flex: 1; font-size: 13px; color: var(--ink); }
.ai-suggestion .why { color: var(--muted); font-size: 11px; margin-top: 4px; }
.ai-suggestion .actions { display: flex; gap: 6px; align-self: center; }

.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer-row textarea {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit; resize: none; min-height: 50px; max-height: 160px;
}
.composer-row textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }

/* ---------- Pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin: 10px 0 28px; }
.pipeline-col {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px;
  min-height: 80px;
}
.pipeline-col .title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.pipeline-col .count { font-size: 22px; font-weight: 800; margin-top: 4px; }
.pipeline-col .bar { margin-top: 8px; height: 4px; border-radius: 999px; background: var(--brand); opacity: .4; }

/* ---------- Activity feed ---------- */
.activity-list { display: flex; flex-direction: column; gap: 4px; }
.activity-item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; transition: background .15s; }
.activity-item:hover { background: var(--bg-soft); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex-shrink: 0; }
.activity-item .t { font-size: 13px; }
.activity-item .ts { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Vacancy detail ---------- */
.vacancy-cover {
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative; overflow: hidden;
  margin-bottom: 24px;
  min-height: 200px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.vacancy-cover .pin-icon {
  position: absolute; top: 28px; right: 28px;
  width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255,255,255,.55); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(0,0,0,.08), inset 0 0 0 1px rgba(255,255,255,.4);
  color: rgba(22,22,29,.78);
}
.vacancy-cover h1 { font-size: 34px; }
.vacancy-cover .company { font-size: 14px; opacity: .8; margin-top: 4px; }
.vacancy-cover .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.side-card + .side-card { margin-top: 18px; }
.side-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }

.lists li {
  list-style: none; padding: 8px 0 8px 26px; position: relative;
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
}
.lists li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); position: absolute; left: 8px; top: 16px;
}
.lists.requirements li::before { background: var(--ink); }
.lists.nice li::before { background: var(--info); }
.lists.benefits li::before { background: var(--success); }

/* ---------- Empty state ---------- */
.empty {
  background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 48px; text-align: center;
}
.empty .emo { font-size: 38px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 4px 0 14px; }

/* ---------- Login ---------- */
.login-shell {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) { .login-shell { grid-template-columns: 1fr; } }
.login-art {
  background:
    radial-gradient(800px 600px at 80% 20%, rgba(244,114,182,.6) 0%, transparent 60%),
    radial-gradient(700px 500px at 20% 80%, rgba(96,165,250,.6) 0%, transparent 60%),
    linear-gradient(135deg, #4C1D95 0%, #1D1D43 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px;
  color: #fff;
}
.login-art .brand { color: #fff; }
.login-art .brand-name { color: #fff; }
.login-art .brand-sub { color: rgba(255,255,255,.7); }
.login-art .blurb { max-width: 360px; position: relative; z-index: 2; }
.login-art .blurb h1 { font-size: 38px; line-height: 1.05; }
.login-art .blurb p { color: rgba(255,255,255,.75); margin-top: 12px; font-size: 14px; line-height: 1.55; }

.login-pin-grid {
  position: absolute; inset: 0; opacity: .6; padding: 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 75%);
}
.login-pin {
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  padding: 16px;
  height: 100px;
  display: flex; flex-direction: column; justify-content: space-between;
  backdrop-filter: blur(6px);
  font-size: 11px; color: rgba(255,255,255,.85);
}
.login-pin .emj { font-size: 22px; }

.login-form-wrap {
  display: grid; place-items: center;
  padding: 40px;
  background: var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-card h2 { font-size: 26px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); margin-bottom: 24px; font-size: 14px; }
.demo-creds {
  margin-top: 18px; padding: 14px;
  background: var(--brand-soft);
  border-radius: 12px;
  font-size: 12.5px; color: var(--brand-ink);
}
.demo-creds b { display: block; margin-bottom: 4px; }
.demo-creds code {
  background: rgba(255,255,255,.6); padding: 2px 6px; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: 11.5px;
}
.error-banner {
  background: #FEE2E2; color: #7F1D1D;
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px; margin-bottom: 16px;
}

/* ---------- Misc utility ---------- */
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.spacer { flex: 1; }

.salary { font-weight: 700; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- Animations ---------- */
@keyframes pop {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.pin, .candidate-card, .kpi, .card { animation: pop .35s ease both; }

/* ---------- Dropdown menus ---------- */
.menu-anchor { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu[open] > .menu-body { display: block; }
.menu-body {
  display: none;
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  z-index: 30;
}
.menu-body a, .menu-body button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 8px;
  font: inherit; background: none; border: 0; color: var(--ink);
}
.menu-body a:hover, .menu-body button:hover { background: var(--bg-soft); }

.recommendation {
  font-weight: 800; font-size: 13px;
  padding: 6px 12px; border-radius: 999px;
}
.recommendation.strong { background: #DCFCE7; color: #14532D; }
.recommendation.good { background: var(--brand-soft); color: var(--brand-ink); }
.recommendation.neutral { background: #F1F5F9; color: #475569; }
.recommendation.weak { background: #FEE2E2; color: #7F1D1D; }

/* ---------- Uniform grid (same-size cards) ---------- */
.grid-uniform {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card-uniform {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transition: transform .18s ease, box-shadow .18s ease;
  color: inherit;
  text-decoration: none;
  position: relative;
}
.card-uniform:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-cover {
  padding: 22px 20px 18px;
  position: relative;
  min-height: 110px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card-cover .status-chip { position: absolute; top: 14px; right: 14px; }
.card-body { padding: 14px 20px 12px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-body .title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .sub { color: var(--muted); font-size: 12px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .pitch { color: var(--ink-soft); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 4px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 14px; margin-top: auto; }
.card-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.card-foot .stats { display: flex; gap: 12px; }
.card-foot .stats b { color: var(--ink); font-weight: 600; }

/* ---------- List view ---------- */
.list-view { display: flex; flex-direction: column; gap: 4px; }
.list-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .12s, box-shadow .15s, border-color .15s;
  color: inherit;
  text-decoration: none;
}
.list-row:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.list-row .list-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: rgba(22,22,29,.78);
}
.list-row .list-icon svg { display: block; }
.list-row .list-main { min-width: 0; }
.list-row .list-title {
  font-weight: 700; font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-row .list-sub {
  color: var(--muted); font-size: 12px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-row .list-tags { display: flex; gap: 6px; }
.list-row .list-stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.list-row .list-stats b { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .list-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .list-row .list-tags, .list-row .list-stats { display: none; }
  .list-row .list-icon { width: 36px; height: 36px; border-radius: 10px; }
}

/* ---------- View toggle ---------- */
.view-toggle {
  display: inline-flex; gap: 2px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.view-toggle a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600;
  transition: background .12s, color .12s;
}
.view-toggle a:hover { color: var(--ink); }
.view-toggle a.active { background: var(--ink); color: #fff; }
.view-toggle svg { display: block; }

/* ---------- Onboarding (docs / equipment / housing) ---------- */
.onboarding-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.onboarding-card { padding: 20px; }
.onboarding-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.onboarding-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.onboarding-icon.docs { background: #DBEAFE; color: #1D4ED8; }
.onboarding-icon.gear { background: #FEF3C7; color: #92400E; }
.onboarding-icon.home { background: #DCFCE7; color: #15803D; }
.onboarding-icon svg { display: block; }

.asset-list { display: flex; flex-direction: column; gap: 4px; }
.asset-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  transition: background .12s;
}
.asset-row:hover { background: rgba(124,58,237,.06); }
.asset-thumb {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.asset-thumb svg { display: block; }
.asset-name {
  font-weight: 600; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.asset-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.housing-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(22,163,74,.08), rgba(22,163,74,.02));
  border: 1px solid rgba(22,163,74,.12);
}
.housing-address { font-weight: 700; font-size: 15px; }
.housing-room { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.housing-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(22,163,74,.18);
}
.housing-meta .k { color: var(--muted); font-size: 11px; }
.housing-meta .v { font-weight: 600; font-size: 13px; margin-top: 2px; }

.onboarding-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg-soft);
  margin-bottom: 6px;
  color: inherit;
  text-decoration: none;
  transition: background .12s;
}
.onboarding-summary:hover { background: rgba(124,58,237,.06); }

/* ---------- Modal (native <dialog>) ---------- */
dialog.modal {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 540px;
  width: 90vw;
  box-shadow: 0 32px 80px rgba(22,22,29,.30);
  background: var(--surface);
  color: var(--ink);
}
dialog.modal::backdrop {
  background: rgba(15,12,28,.55);
  backdrop-filter: blur(6px);
}
dialog.modal[open] {
  animation: modalIn .22s ease both;
}
@keyframes modalIn {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: translateY(0)   scale(1);   opacity: 1; }
}
.modal-head {
  padding: 22px 24px 14px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head .icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.modal-head .icon.docs { background: #DBEAFE; color: #1D4ED8; }
.modal-head .icon.gear { background: #FEF3C7; color: #92400E; }
.modal-head .icon.home { background: #DCFCE7; color: #15803D; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-head .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.modal-head .close {
  margin-left: auto; background: none; border: 0; padding: 6px;
  color: var(--muted); border-radius: 8px; cursor: pointer;
}
.modal-head .close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-body { padding: 18px 24px; }
.modal-actions {
  padding: 14px 24px 20px;
  display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 18px;
  border: 2px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.file-drop strong { color: var(--ink); font-weight: 600; }

/* ---------- Apartment cards ---------- */
.apartment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .2s;
  color: inherit;
  text-decoration: none;
}
.apartment-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.apartment-cover {
  height: 110px; padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: rgba(22,22,29,.85);
}
.apartment-cover .pin-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,.55); backdrop-filter: blur(6px);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}
.apartment-body { padding: 16px 20px 12px; flex: 1; }
.apartment-body .name { font-weight: 700; font-size: 15.5px; }
.apartment-body .address { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.apartment-stats {
  margin-top: 14px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.apartment-stat .k { font-size: 11px; color: var(--muted); }
.apartment-stat .v { font-size: 14px; font-weight: 700; margin-top: 2px; }
.occupancy-bar {
  height: 6px; border-radius: 999px; background: var(--bg);
  margin-top: 6px; overflow: hidden;
}
.occupancy-bar .fill { height: 100%; background: linear-gradient(90deg, #16A34A, #34D399); }
.occupancy-bar.full .fill { background: linear-gradient(90deg, #DC2626, #F87171); }
.occupancy-bar.high .fill { background: linear-gradient(90deg, #D97706, #F59E0B); }

.resident-card {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: background .12s, transform .12s;
}
.resident-card:hover { background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ---------- Manager picker ---------- */
.manager-edit-btn {
  margin-left: auto;
  background: none; border: 0; padding: 4px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: grid; place-items: center;
}
.manager-edit-btn:hover { background: rgba(124,58,237,.08); color: var(--brand); }

.manager-grid {
  display: grid; grid-template-columns: 1fr; gap: 8px;
}
.manager-option {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
  position: relative;
}
.manager-option input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.manager-option:hover { background: var(--bg-soft); }
.manager-option:has(input:checked) {
  border-color: var(--brand);
  background: rgba(124,58,237,.04);
  box-shadow: 0 0 0 1px var(--brand);
}
.manager-option:has(input:checked)::after {
  content: '';
  position: absolute; top: 14px; right: 14px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / 12px 12px;
}

/* ---------- Recruiter dashboard ---------- */
.dash-grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start;
}

.cal-widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px 24px;
  box-shadow: var(--shadow-sm);
}
.cal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.cal-head h2 { font-size: 19px; }
.cal-head .cal-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.cal-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cal-sync-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
  color: #166534; font-size: 12px; font-weight: 600;
  border: 1px solid rgba(22,163,74,.25);
}
.cal-sync-pill .sync-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #16A34A;
  box-shadow: 0 0 0 4px rgba(22,163,74,.18);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,.35); }
  50%     { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
}

.week-strip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  margin: 16px 0 18px;
}
.week-day {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s, border-color .12s, background .12s, box-shadow .15s;
  position: relative;
}
.week-day:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.week-day.is-weekend { background: transparent; color: var(--muted); }
.week-day .wd { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.week-day .dd { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.week-day .cnt {
  font-size: 10px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.week-day.is-today {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.week-day.is-today .wd,
.week-day.is-today .dd { color: var(--brand); }
.week-day.is-selected {
  background: var(--brand); color: #fff;
  border-color: var(--brand);
  box-shadow: 0 10px 28px rgba(124,58,237,.32);
}
.week-day.is-selected .wd { color: rgba(255,255,255,.7); }
.week-day.is-selected .cnt { color: rgba(255,255,255,.7); }
.week-day.is-today.is-selected {
  background: var(--brand-ink); border-color: var(--brand-ink);
  box-shadow: 0 10px 28px rgba(76,29,149,.38), inset 0 0 0 2px rgba(255,255,255,.18);
}
.week-day.is-today.is-selected .wd,
.week-day.is-today.is-selected .cnt { color: rgba(255,255,255,.7); }
.week-day.is-today.is-selected .dd { color: #fff; }
.wm-dots {
  display: flex; gap: 3px; min-height: 6px; margin: 2px 0 0;
}
.wm-dot {
  width: 5px; height: 5px; border-radius: 50%; display: inline-block;
}
.wm-dot.is-empty {
  background: var(--line-strong); opacity: .35;
}

.agenda-head {
  display: flex; align-items: baseline; gap: 12px;
  padding-top: 6px;
}
.agenda-head h3 { font-size: 16px; display: flex; gap: 10px; align-items: baseline; }
.agenda-head .agenda-date { color: var(--muted); font-weight: 500; font-size: 13px; }
.agenda-head .agenda-count {
  margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600;
}

.agenda { display: flex; flex-direction: column; margin-top: 14px; }
.agenda-row {
  display: grid; grid-template-columns: 70px 1fr 36px; gap: 14px; align-items: stretch;
  padding: 8px 0;
  position: relative;
}
.agenda-row + .agenda-row::before {
  content: ''; position: absolute; left: 28px; top: -2px; bottom: calc(100% - 12px);
  width: 1px; background: var(--line);
}
.agenda-time {
  padding-top: 12px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.agenda-time .th { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.agenda-time .ts { font-size: 11px; color: var(--muted); margin-top: 2px; }

.agenda-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  padding: 12px 14px 12px 14px;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.agenda-row:hover .agenda-card { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.agenda-card-head {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.event-type {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .02em;
}
.src-pill {
  width: 18px; height: 18px; border-radius: 5px;
  display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff;
  letter-spacing: 0;
}
.src-pill.src-google {
  background: linear-gradient(135deg, #4285F4 0%, #34A853 50%, #FBBC04 100%);
  box-shadow: 0 2px 6px rgba(66,133,244,.35);
}
.src-pill.src-outlook { background: #0078D4; box-shadow: 0 2px 6px rgba(0,120,212,.35); }
.agenda-card-title { font-weight: 700; font-size: 14.5px; margin-top: 6px; line-height: 1.3; }
.agenda-card-desc { color: var(--ink-soft); font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
.agenda-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px;
  font-size: 12px; color: var(--muted);
}
.agenda-card-meta .meta-item {
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none; color: inherit;
}
.agenda-card-meta .meta-item.link { color: var(--brand-ink); font-weight: 600; }
.agenda-card-meta .meta-item.link:hover { color: var(--brand); }

.agenda-row.is-done .agenda-card { opacity: .65; }
.agenda-row.is-done .agenda-card-title { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--muted); }
.agenda-row.is-cancelled .agenda-card { opacity: .45; background: var(--bg-soft); }

.agenda-actions { display: flex; align-items: center; }
.agenda-iconbtn {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background .12s, color .12s, border-color .12s;
}
.agenda-iconbtn:hover { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-soft); }

.agenda-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px;
  margin-top: 14px;
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}
.agenda-empty .emoji {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.agenda-empty .t { font-weight: 700; font-size: 14px; }
.agenda-empty .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.agenda-empty button { margin-left: auto; }

/* ---------- Sync providers (modal) ---------- */
.sync-provider {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  background: var(--surface);
}
.sync-provider.connected {
  border-color: rgba(22,163,74,.35);
  background: linear-gradient(135deg, rgba(220,252,231,.45), transparent);
}
.sync-brand {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: #fff;
  flex-shrink: 0;
}
.sync-brand-google {
  background: linear-gradient(135deg, #4285F4 0%, #34A853 50%, #EA4335 100%);
}
.sync-brand-outlook { background: #0078D4; }
.sync-brand-apple { background: #111; }
.sync-info { flex: 1; min-width: 0; }
.sync-info .sync-name { font-weight: 700; font-size: 14px; }
.sync-info .sync-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }

.sync-info-block {
  margin-top: 12px;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 14px 16px;
}
.sync-info-block .sync-info-title {
  display: inline-flex; gap: 6px; align-items: center;
  font-weight: 700; font-size: 12.5px;
  color: var(--ink); margin-bottom: 6px;
}
.sync-list {
  margin: 0; padding-left: 22px;
  color: var(--ink-soft); font-size: 12.5px;
  display: flex; flex-direction: column; gap: 4px;
}

/* Compact responsive collapse: stack columns under 1200px */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .week-strip { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .week-day { padding: 8px 2px; }
  .week-day .dd { font-size: 15px; }
  .agenda-row { grid-template-columns: 56px 1fr 32px; gap: 10px; }
}

/* ---------- Counter-agent & shared components ---------- */

/* KPI strip (horizontal row of kpi cards) */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s;
}
.kpi-card:hover { box-shadow: var(--shadow); }
.kpi-card .kpi-label { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.kpi-card .kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.kpi-card .kpi-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.kpi-card .kpi-sub.warn { color: var(--warning); font-weight: 600; }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--brand);
  transition: width .4s ease;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.filter-tab:hover { background: var(--bg-soft); color: var(--ink); }
.filter-tab.active { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; font-weight: 600; }

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-soft); }

/* Timeline (submission detail) */
.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline-item { display: flex; align-items: flex-start; gap: 10px; }
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Donut legend */
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.legend-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}
.legend-val { margin-left: auto; font-weight: 700; }

/* Detail grid (submission detail) */
.detail-grid { display: flex; flex-direction: column; gap: 10px; }
.detail-row { display: flex; gap: 12px; font-size: 13px; }
.detail-label { color: var(--muted); min-width: 90px; flex-shrink: 0; }
.detail-val { font-weight: 500; }

/* List stack */
.list-stack { display: flex; flex-direction: column; }

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--muted); text-align: center;
}
.empty-state p { font-size: 14px; margin: 0; }

/* ---------- CEO / Executive styles ---------- */

.ceo-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  margin-bottom: 22px;
  color: #fff;
}
.ceo-banner-left { flex: 1; }
.ceo-banner-right { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.9); }
.ceo-greeting { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.ceo-date { font-size: 13px; opacity: .65; }

.ceo-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.ceo-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s;
}
.ceo-kpi:hover { box-shadow: var(--shadow); }
.ceo-kpi-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ceo-kpi-val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.ceo-kpi-label { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.ceo-kpi-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.ceo-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.ceo-col-main { min-width: 0; }
.ceo-col-side { min-width: 0; }

.ceo-section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 12px;
}
.ceo-section-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.ceo-sub { font-size: 12px; color: var(--muted); }

.ceo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1100px) {
  .ceo-grid { grid-template-columns: 1fr; }
  .ceo-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ceo-kpi-row { grid-template-columns: 1fr; }
  .ceo-banner { flex-direction: column; gap: 14px; align-items: flex-start; }
}

