/* HR-CRM Golden Taurus — Soft Bento Design System (по эталону Вадима + UX FriendWork) */
:root {
  --bg-app: #F6F7F9;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F3F6;
  --bg-rail: #FFFFFF;
  --ink: #14151A;
  --border: rgba(20, 21, 26, 0.08);
  --border-strong: rgba(20, 21, 26, 0.14);
  --text-primary: #14151A;
  --text-secondary: #525866;
  --text-muted: #868C98;
  --accent: #14151A;
  --accent-blue: #4F46E5;
  --accent-blue-soft: #EEF2FF;
  --gold: #F59E0B;
  --ok: #059669;
  --ok-soft: #ECFDF5;
  --ok-text: #065F46;
  --warn: #D97706;
  --warn-soft: #FFFBEB;
  --warn-text: #92400E;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --danger-text: #991B1B;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-bento: 22px;
  --shadow-xs: 0 1px 2px rgba(20, 21, 26, 0.04);
  --shadow-sm: 0 6px 24px rgba(20, 21, 26, 0.05), 0 1px 3px rgba(20, 21, 26, 0.04);
  --shadow-lg: 0 20px 50px rgba(20, 21, 26, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.num, .tabular { font-variant-numeric: tabular-nums; }

a { color: inherit; }

/* App Shell: Narrow Light Icon-Rail + Main Area */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-app);
}

.icon-rail {
  width: 68px;
  flex-shrink: 0;
  background: var(--bg-rail);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 10px;
  z-index: 60;
}

.rail-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.brand-sun {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FDE68A 0%, #FB923C 55%, #F43F5E 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(251, 146, 60, 0.35);
  position: relative;
  overflow: hidden;
}

.brand-sun::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: rgba(20, 21, 26, 0.72);
}

.brand-sun span {
  position: relative;
  z-index: 1;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.rail-link {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
  position: relative;
}

.rail-link svg {
  width: 20px;
  height: 20px;
}

.rail-link:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.rail-link.active {
  background: var(--ink);
  color: #FFFFFF;
  box-shadow: 0 6px 14px rgba(20, 21, 26, 0.22);
}

.rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rail-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FDBA74 0%, #FB7185 100%);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

/* Main Area & Topbar */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 16px 28px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-greet {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* White Capsule Switch with Black Active Pill */
.pill-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  box-shadow: var(--shadow-xs);
}

.pill-switch-item {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}

.pill-switch-item:hover {
  color: var(--ink);
}

.pill-switch-item.active {
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 600;
}

/* Circular Icon Buttons */
.icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.icon-circle-btn:hover {
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.icon-circle-btn svg {
  width: 16px;
  height: 16px;
}

/* Health Traffic Light Capsule */
.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.health-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.health-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94A3B8;
  display: inline-block;
}

/* Warm Team Capsule */
.team-capsule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 4px 14px 4px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FB923C 0%, #F97316 55%, #FB7185 100%);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25);
}

.team-avatars {
  display: inline-flex;
  align-items: center;
}

.team-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FB923C;
  margin-left: -6px;
}

.team-av:first-child { margin-left: 0; }

/* Page Content */
.page-content {
  padding: 12px 28px 36px;
  max-width: 1460px;
  width: 100%;
  margin: 0 auto;
}

h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.02em; color: var(--ink); }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; color: var(--ink); }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.muted { color: var(--text-muted); font-size: 12px; }

/* Bento Cards & Grids */
.card, .bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-bento);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 1.15fr;
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}

.bento-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bento-mini-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bento-tile {
  border-radius: var(--radius-bento);
  padding: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.bento-warm {
  background: linear-gradient(155deg, #FBBF24 0%, #FB923C 42%, #F472B6 100%);
  color: #FFFFFF;
  min-height: 310px;
}

.bento-indigo {
  background: linear-gradient(145deg, #818CF8 0%, #6366F1 55%, #4F46E5 100%);
  color: #FFFFFF;
  min-height: 158px;
}

.bento-emerald {
  background: linear-gradient(145deg, #BEF264 0%, #4ADE80 55%, #10B981 100%);
  color: #0F291E;
  min-height: 158px;
}

.bento-white {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-bento);
  padding: 20px;
}

.bento-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.bento-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
}

.bento-metric {
  font-size: 46px;
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.bento-metric-sm {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.bento-unit {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.85;
  margin-left: 4px;
}

.bento-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.bento-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
}

.bento-glass-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background-color 140ms ease, transform 120ms ease;
}

.bento-glass-cta:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Segmented Bar Strip (Energy Balance style) */
.seg-bars {
  display: grid;
  grid-template-columns: repeat(36, 1fr);
  gap: 3px;
  height: 30px;
  margin: 14px 0 10px;
  align-items: stretch;
}

.seg-bar {
  border-radius: 3px;
  min-width: 3px;
}

.seg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.seg-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.bento-sub-box {
  background: var(--bg-app);
  border-radius: 16px;
  padding: 14px 16px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

/* Buttons — Pill CTA #14151A */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 100ms ease;
  white-space: nowrap;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

.btn-primary { background: var(--ink); color: #FFFFFF; }
.btn-primary:hover { background: #272932; }

.btn-secondary { background: var(--bg-surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-subtle); }

.btn-call { background: var(--ok); color: #FFFFFF; }
.btn-call:hover { background: #047857; }

.btn-warn-soft { background: var(--warn-soft); color: var(--warn-text); border-color: #FDE68A; }
.btn-warn-soft:hover { background: #FEF3C7; }

.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-danger-outline { background: var(--bg-surface); color: var(--danger); border-color: #FECACA; }
.btn-danger-outline:hover { background: var(--danger-soft); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-ok { background: var(--ok-soft); color: var(--ok-text); }
.badge-warn { background: var(--warn-soft); color: var(--warn-text); }
.badge-red { background: var(--danger-soft); color: var(--danger-text); }
.badge-blue { background: var(--accent-blue-soft); color: #3730A3; }

.kbd-hint {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* Inputs */
input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-surface);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 21, 26, 0.08);
}

label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: #FAFBFD;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: 0; }

/* Segment Filter Bar */
.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.seg-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.seg-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.seg-tab:hover { color: var(--ink); }
.seg-tab.active {
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 600;
}

.seg-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.seg-tab.active .seg-count { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; }
.seg-count.is-hot { background: #FEF3C7; color: #92400E; }
.seg-count.is-red { background: #FEE2E2; color: #991B1B; }

/* Split-View Workspace */
.split-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(380px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.queue-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-bento);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.queue-list {
  max-height: 620px;
  overflow-y: auto;
}

.queue-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #F9FAFB; }
.queue-item.selected { background: #EEF2FF; border-left-color: var(--accent-blue); }
.queue-item.priority-red { border-left-color: var(--danger); }
.queue-item.priority-hot { border-left-color: var(--warn); }
.queue-item.selected.priority-red { border-left-color: var(--danger); }

.cand-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E0E7FF 0%, #FCE7F3 100%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.queue-main { min-width: 0; }
.queue-title-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.queue-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.queue-sub { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.queue-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; }

.queue-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  white-space: nowrap;
}

.detail-pane {
  position: sticky;
  top: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-bento);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

/* Busy Strip */
.busy-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.busy-slot {
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid #BBF7D0;
  background: #F0FDF4;
  color: #166534;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.busy-slot:hover { border-color: #22C55E; }
.busy-slot.is-busy { background: #FEF3C7; border-color: #F59E0B; color: #92400E; }
.busy-slot.is-picked { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Scorecard & Tabs */
.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.score-row:last-of-type { border-bottom: 0; }
.score-pills { display: flex; gap: 5px; }
.score-pills button {
  width: 32px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
}
.score-pills button.selected {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}
.tab-btn {
  padding: 9px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* FriendWork Candidate Layout (68% left / 32% right) */
.fw-header-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
}

.fw-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(310px, 1fr);
  gap: 16px;
  align-items: start;
}

.candidate-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(310px, 1fr);
  gap: 16px;
  align-items: start;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
}

.feed-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

.feed-item.is-note {
  background: #FFFBEB;
  border-color: #FDE68A;
}

/* Modals & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 26, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-bento);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--ink);
  color: #FFFFFF;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: none;
  z-index: 1200;
  box-shadow: var(--shadow-lg);
}
.toast.show { display: block; }

/* Candidates Directory (/candidates) — Soft Bento + FriendWork */
.dir-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dir-filters {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 0;
}

.dir-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dir-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dir-list-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 14px;
}

.cand-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.35fr) minmax(200px, 0.85fr) 210px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background-color 120ms ease;
  cursor: pointer;
}

.cand-row:last-child { border-bottom: 0; }
.cand-row:hover { background: #F9FAFB; }

.cand-row-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.cand-row-name:hover {
  text-decoration: underline;
}

.cand-row-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.cand-row-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cand-row-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.cand-row-stage select {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.dir-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-bento);
  box-shadow: var(--shadow-xs);
}

.badge-tier-silver { background: #EEF2FF; color: #3730A3; }
.badge-tier-reserve { background: #ECFDF5; color: #065F46; }
.badge-tier-dnh { background: #FEF2F2; color: #991B1B; }

.contact-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  font-size: 13px;
}

/* Vacancies & Settings (V2-2) — Soft Bento + FriendWork */
.bento-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.bento-kpi-tile {
  border-radius: var(--radius-bento);
  padding: 18px 20px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.bento-kpi-tile.amber {
  background: linear-gradient(135deg, #F59E0B 0%, #FB923C 52%, #FB7185 100%);
}

.bento-kpi-tile.indigo {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 55%, #4338CA 100%);
}

.bento-kpi-tile.emerald {
  background: linear-gradient(135deg, #34D399 0%, #10B981 55%, #059669 100%);
}

.bento-kpi-label {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
}

.bento-kpi-num {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.bento-kpi-sub {
  font-size: 12px;
  opacity: 0.88;
  margin-top: 6px;
}

.vac-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.vac-filter-inputs {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.vac-filter-inputs > div {
  min-width: 170px;
}

.vac-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vac-row-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-bento);
  padding: 16px 20px;
  box-shadow: var(--shadow-xs);
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(210px, 0.95fr) auto;
  gap: 16px;
  align-items: center;
  transition: transform 120ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.vac-row-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.vac-title-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
}

.vac-title-link:hover {
  text-decoration: underline;
}

.vac-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.vac-metrics {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.vac-metric-box {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  min-width: 84px;
  text-align: center;
}

.vac-metric-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.vac-metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Horizontal Clickable Funnel Stage Ribbon (/vacancies/{id}) */
.funnel-ribbon-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-bento);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.funnel-ribbon {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.funnel-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}

.funnel-pill:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.funnel-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.funnel-pill.active .funnel-count {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.funnel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.funnel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pub-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.3fr) 140px 140px auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.pub-row:last-child { border-bottom: 0; }

/* Settings Tables & Handover */
.settings-table-wrap {
  overflow-x: auto;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.settings-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.settings-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.settings-table tr:last-child td { border-bottom: 0; }

.handover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.status-pill-open { background: var(--ok-soft); color: var(--ok-text); }
.status-pill-paused { background: var(--warn-soft); color: var(--warn-text); }
.status-pill-closed { background: var(--bg-subtle); color: var(--text-secondary); }

/* Schedule (/schedule) — Soft Bento */
.sched-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.sched-toolbar-card {
  padding: 16px 20px;
}

.sched-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sched-nav-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sched-nav-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sched-period-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.sched-filters-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sched-filter-item {
  min-width: 165px;
}

.sched-legend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sched-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sched-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sched-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.sched-legend-dot.is-hr { background: #4F46E5; }
.sched-legend-dot.is-day0 { background: #F59E0B; }
.sched-legend-dot.is-call { background: #059669; }

.sched-offhours-card {
  padding: 16px 20px;
  border-color: #FDE68A;
  background: #FFFDF5;
}

.sched-offhours-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sched-offhours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.sched-grid-card {
  padding: 0;
  overflow: hidden;
}

.sched-table-wrap {
  overflow-x: auto;
}

.sched-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.sched-table.is-week {
  min-width: 940px;
}

.sched-hour-col {
  width: 78px;
}

.sched-day-col.is-today {
  background: #EEF2FF;
  color: #3730A3;
}

.sched-day-col.is-weekend {
  background: #F8FAFC;
}

.sched-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sched-day-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
}

.sched-day-col.is-today .sched-day-label {
  color: #3730A3;
}

.sched-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
}

.sched-hour-cell {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  vertical-align: top;
  padding: 10px 12px;
  background: #FAFBFD;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

.sched-cell {
  vertical-align: top;
  padding: 6px 8px;
  min-height: 52px;
  border-right: 1px solid var(--border);
}

.sched-cell:last-child { border-right: 0; }
.sched-cell.is-today { background: rgba(238, 242, 255, 0.35); }
.sched-cell.is-weekend { background: rgba(248, 250, 252, 0.7); }

.sched-event {
  display: block;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--ink);
  background: var(--bg-surface);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.sched-event:last-child { margin-bottom: 0; }
.sched-event:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.sched-event.is-hr {
  background: #EEF2FF;
  border-color: #C7D2FE;
  border-left-color: #4F46E5;
}

.sched-event.is-day0 {
  background: #FFFBEB;
  border-color: #FDE68A;
  border-left-color: #F59E0B;
}

.sched-event.is-call {
  background: #ECFDF5;
  border-color: #A7F3D0;
  border-left-color: #059669;
}

.sched-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 3px;
}

.sched-event-time {
  font-weight: 700;
  color: var(--ink);
}

.sched-event-kind {
  font-weight: 600;
  font-size: 10.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-event-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.sched-event-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Analytics (/analytics) — Soft Bento */
.analytics-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1.1fr;
  gap: 16px;
  margin-bottom: 18px;
  align-items: stretch;
}

.analytics-bento-warm {
  min-height: 290px;
}

.analytics-warm-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  height: 76px;
  align-items: end;
  margin: 14px 0 10px;
}

.analytics-warm-bar-col {
  height: 100%;
  display: flex;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 3px;
}

.analytics-warm-bar-fill {
  width: 100%;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  min-height: 6px;
}

.analytics-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.analytics-filter-grid > div {
  min-width: 0;
}

.analytics-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.funnel-bar-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.funnel-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  min-width: 72px;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 200ms ease;
}

/* Responsive */
@media (max-width: 1200px) {
  .bento-grid, .analytics-bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-right-col { grid-column: span 2; }
  .fw-header-card { grid-template-columns: 1fr; }
  .cand-row { grid-template-columns: 40px minmax(0, 1fr) 200px; }
  .cand-row-mid { display: none; }
  .vac-row-card { grid-template-columns: 1fr; }
  .pub-row { grid-template-columns: 1fr; }
}

@media (max-width: 1060px) {
  .split-layout, .fw-grid, .candidate-grid, .dir-layout, .handover-grid { grid-template-columns: 1fr; }
  .detail-pane, .dir-filters { position: static; max-height: none; }
  .bento-kpi-row, .sched-kpi-row { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .bento-grid, .analytics-bento-grid { grid-template-columns: 1fr; }
  .bento-right-col { grid-column: span 1; }
  .topbar { padding: 14px 16px 6px; }
  .page-content { padding: 10px 16px 28px; }
  .grid-2, .grid-4, .bento-mini-pair { grid-template-columns: 1fr; }
  .cand-row { grid-template-columns: 1fr; }
}

/* Audio playback speed switch (1x / 1.5x / 2x) */
.speed-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.speed-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.speed-btn:hover { color: var(--ink); }
.speed-btn.active {
  background: var(--ink);
  color: #FFFFFF;
}
