/* =========================================================
   TALENT BENCH — Design tokens
   Color:   base #F6F7F9, ink #16202E, muted #5B6474
            navy #12203D (sidebar), navy-hi #1B2F52
            teal #2F6F5E (primary/approve), amber #C97B3B (consider)
            red #B3452C (reject), blue #3B6EA5 (info)
   Type:    Display -> "Space Grotesk", Body -> "Inter"
   Layout:  Fixed dark sidebar + light content, card-based panels
   ========================================================= */

:root{
  --ink: #16202E;
  --muted: #5B6474;
  --faint: #8C93A1;
  --base: #F6F7F9;
  --surface: #FFFFFF;
  --border: #E3E6EB;

  --navy: #12203D;
  --navy-hi: #1C3155;
  --navy-line: rgba(255,255,255,0.09);

  --teal: #2F6F5E;
  --teal-soft: #E4F0EC;
  --amber: #C97B3B;
  --amber-soft: #FBEEE1;
  --red: #B3452C;
  --red-soft: #FBEAE4;
  --blue: #3B6EA5;
  --blue-soft: #E7EFF7;
  --purple: #6E5A9C;
  --purple-soft: #EEEAF6;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;
  --shadow-card: 0 1px 2px rgba(18,32,61,0.04), 0 8px 24px -12px rgba(18,32,61,0.10);
  --shadow-pop: 0 20px 60px -20px rgba(18,32,61,0.35);
}

*{ box-sizing: border-box; }

html, body{
  margin:0; padding:0;
  background: var(--base);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{
  font-family: "Space Grotesk", "Inter", sans-serif;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

button, input, select{ font-family: inherit; font-size: inherit; color: inherit; }
button{ cursor: pointer; }
a{ color: inherit; }

/* =========================== LAYOUT =========================== */

.sidebar{
  position: fixed;
  top:0; left:0; bottom:0;
  width: 248px;
  background: var(--navy);
  color: #EDEFF3;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  z-index: 40;
  transition: transform .25s ease;
}

.sidebar-brand{
  display:flex; align-items:center; gap:10px;
  padding: 4px 10px 26px 10px;
}
.brand-mark{
  width:34px; height:34px; border-radius: 9px;
  background: linear-gradient(155deg, var(--teal), #244F42);
  display:flex; align-items:center; justify-content:center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.brand-name{ font-family:"Space Grotesk", sans-serif; font-weight:600; font-size: 16.5px; }

.sidebar-nav{ display:flex; flex-direction:column; gap: 2px; margin-top: 6px; flex: 1; }

.nav-item{
  display:flex; align-items:center; gap: 12px;
  padding: 10px 12px;
  border: none; background: transparent; color: #C6CCDA;
  border-radius: var(--radius-s);
  text-align:left; font-size: 14.5px; font-weight: 500;
  position: relative;
}
.nav-item i{ font-size: 16.5px; width: 18px; text-align:center; }
.nav-item:hover{ background: var(--navy-hi); color:#fff; }
.nav-item.active{ background: var(--navy-hi); color:#fff; }
.nav-item.active::before{
  content:""; position:absolute; left:-16px; top:8px; bottom:8px; width:3px;
  background: var(--teal); border-radius: 2px;
}
.nav-badge{
  margin-left:auto; background: var(--amber); color:#fff;
  font-size: 11px; font-weight:700; padding: 1px 7px; border-radius: 20px;
}
.nav-badge:empty, .nav-badge[data-zero="true"]{ display:none; }

.sidebar-footer{
  display:flex; align-items:center; gap:10px;
  border-top: 1px solid var(--navy-line);
  padding-top: 16px; margin-top: 10px;
}
.hr-avatar{
  width: 34px; height:34px; border-radius:50%;
  background: var(--teal-soft); color: var(--teal);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:12.5px;
  background: #2C4A66; color:#DCE6F2;
}
.hr-meta{ display:flex; flex-direction:column; line-height:1.25; }
.hr-name{ font-size:13.5px; font-weight:600; color:#fff; }
.hr-role{ font-size:12px; color:#93A0B4; }

.scrim{ display:none; position:fixed; inset:0; background: rgba(15,20,30,.45); z-index:35; }

.main{ margin-left: 248px; min-height:100vh; display:flex; flex-direction:column; }

.topbar{
  display:flex; align-items:center; gap: 18px;
  padding: 18px 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top:0; z-index: 20;
}
.topbar-title h1{ font-size: 20px; font-weight:600; }
.topbar-title p{ margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions{ margin-left:auto; display:flex; align-items:center; gap:12px; }

.search-box{
  display:flex; align-items:center; gap:8px;
  background: var(--base); border:1px solid var(--border);
  border-radius: 999px; padding: 8px 14px; width: 240px;
}
.search-box i{ color: var(--faint); font-size:14px; }
.search-box input{ border:none; background:transparent; outline:none; width:100%; font-size:13.5px; }

.icon-btn{
  border:1px solid var(--border); background:var(--surface);
  width:38px; height:38px; border-radius: var(--radius-s);
  display:flex; align-items:center; justify-content:center; font-size:17px;
}
.only-mobile{ display:none; }

.content{ padding: 26px 30px 60px; max-width: 1320px; width:100%; margin: 0 auto; }

.page{ display:none; animation: fadeUp .35s ease; }
.page.active{ display:block; }
@keyframes fadeUp{ from{ opacity:0; transform: translateY(6px);} to{opacity:1; transform:none;} }

/* =========================== BUTTONS =========================== */

.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 18px; border-radius: var(--radius-s);
  border: 1px solid transparent; font-weight:600; font-size: 13.5px;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--teal); color:#fff; }
.btn-primary:hover{ background:#28594B; }
.btn-ghost{ background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover{ background: var(--base); }
.btn-danger-outline{ background: var(--red-soft); color: var(--red); border-color: transparent; }
.btn-danger-outline:hover{ background:#F5DCD3; }
.btn-outline{ background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-outline:hover{ background: var(--base); }
.btn-sm{ padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }

.link-btn{
  background:none; border:none; color: var(--teal); font-weight:600; font-size: 13px;
}
.link-btn:hover{ text-decoration: underline; }

/* =========================== STAT CARDS =========================== */

.stat-grid{
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px;
}
.stat-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-m);
  padding: 20px; display:flex; align-items:center; gap:14px; box-shadow: var(--shadow-card);
}
.stat-icon{
  width:46px; height:46px; border-radius: 12px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:19px;
}
.icon-blue{ background: var(--blue-soft); color: var(--blue); }
.icon-green{ background: var(--teal-soft); color: var(--teal); }
.icon-amber{ background: var(--amber-soft); color: var(--amber); }
.icon-purple{ background: var(--purple-soft); color: var(--purple); }

.stat-body{ display:flex; flex-direction:column; }
.stat-value{ font-family:"Space Grotesk", sans-serif; font-size: 25px; font-weight:700; line-height:1.1; }
.stat-label{ color: var(--muted); font-size:12.5px; margin-top:3px; }

/* =========================== PANELS =========================== */

.panel-grid{
  display:grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px;
}
.panel{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-m);
  padding: 20px; box-shadow: var(--shadow-card);
}
.panel-wide{ grid-column: span 1; }
.panel-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap: wrap;
}
.panel-head h2{ font-size: 15.5px; font-weight:600; }
.muted-text{ color: var(--muted); font-size:12.5px; }

.filter-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-left:auto; }

/* =========================== TABLES =========================== */

.table-wrap{ overflow-x:auto; }
.data-table{ width:100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th{
  text-align:left; padding: 10px 12px; color: var(--muted); font-weight:600;
  font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table tbody td{ padding: 12px; border-bottom: 1px solid var(--border); vertical-align:middle; }
.data-table tbody tr:last-child td{ border-bottom:none; }
.data-table tbody tr:hover{ background: var(--base); }

.cand-cell{ display:flex; align-items:center; gap:10px; }
.cand-avatar{
  width:32px; height:32px; border-radius:50%; background: var(--blue-soft); color: var(--blue);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:11.5px; flex-shrink:0;
}
.cand-name{ font-weight:600; }
.cand-email{ display:block; color: var(--muted); font-size:11.5px; }

.skill-tags{ display:flex; flex-wrap:wrap; gap:5px; max-width:220px; }
.skill-tag{
  background: var(--base); border:1px solid var(--border); color: var(--muted);
  padding: 2px 8px; border-radius: 999px; font-size: 11px;
}

.score-cell{ display:flex; align-items:center; gap:8px; min-width:110px; }
.score-num{ font-weight:700; font-family:"Space Grotesk", sans-serif; width: 34px; }
.mini-bar{ flex:1; height:6px; border-radius:4px; background: var(--border); overflow:hidden; }
.mini-bar-fill{ height:100%; border-radius:4px; }

.badge{
  display:inline-flex; align-items:center; gap:5px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight:600; white-space:nowrap;
}
.badge-dot{ width:6px; height:6px; border-radius:50%; }
.badge-high{ background: var(--teal-soft); color: var(--teal); }
.badge-high .badge-dot{ background: var(--teal); }
.badge-rec{ background: var(--blue-soft); color: var(--blue); }
.badge-rec .badge-dot{ background: var(--blue); }
.badge-consider{ background: var(--amber-soft); color: var(--amber); }
.badge-consider .badge-dot{ background: var(--amber); }
.badge-low{ background: var(--red-soft); color: var(--red); }
.badge-low .badge-dot{ background: var(--red); }
.badge-scheduled{ background: var(--blue-soft); color: var(--blue); }
.badge-qualified{ background: var(--teal-soft); color: var(--teal); }
.badge-rejected{ background: var(--red-soft); color: var(--red); }
.badge-pending{ background:#EFEEF1; color: var(--muted); }

.row-actions{ display:flex; gap:6px; }

/* =========================== TOP LIST =========================== */

.top-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.top-list li{ display:flex; align-items:center; gap:10px; }
.top-list .rank-no{
  width:22px; height:22px; border-radius:6px; background: var(--base);
  display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color: var(--muted); flex-shrink:0;
}
.top-list .ti-main{ flex:1; min-width:0; }
.top-list .ti-name{ font-weight:600; font-size:13.5px; display:block; }
.top-list .ti-sub{ color: var(--muted); font-size:11.5px; }
.top-list .ti-score{ font-family:"Space Grotesk", sans-serif; font-weight:700; color: var(--teal); font-size:13.5px; }
.empty-hint{ color: var(--faint); font-size:13px; padding: 6px 0; }

.quickstats{ display:flex; flex-direction:column; gap:14px; }
.qs-row{ display:flex; align-items:center; justify-content:space-between; }
.qs-label{ color: var(--muted); font-size:13px; }
.qs-value{ font-weight:700; font-family:"Space Grotesk", sans-serif; }
.qs-bar{ height:6px; border-radius:4px; background: var(--border); margin-top:6px; overflow:hidden; }
.qs-bar-fill{ height:100%; background: var(--teal); border-radius:4px; }

/* =========================== FORMS =========================== */

.panel-form{ max-width: 100%; }
.form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field-wide{ grid-column: span 2; }
.field label{ font-size:13px; font-weight:600; color: var(--ink); }
.field input, .field select, .text-input{
  border:1px solid var(--border); border-radius: var(--radius-s);
  padding: 10px 12px; background: var(--base); outline:none; font-size:13.5px;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .text-input:focus{
  border-color: var(--teal); background:#fff;
}
.text-input{ min-width: 220px; }

.file-drop{
  border: 1.5px dashed var(--border); border-radius: var(--radius-s);
  padding: 22px; display:flex; flex-direction:column; align-items:center; gap:8px;
  color: var(--muted); background: var(--base); text-align:center; font-size:13px;
}
.file-drop i{ font-size:22px; color: var(--faint); }
.file-drop.has-file{ border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }
.file-drop.has-file i{ color: var(--teal); }

.analysis-box{
  display:flex; align-items:center; gap:10px; background: var(--blue-soft); color: var(--blue);
  padding: 12px 16px; border-radius: var(--radius-s); margin-top: 18px; font-size: 13px; font-weight:500;
}
.analysis-box i{ font-size:16px; }

.form-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top: 22px; }

/* =========================== CHIPS / FILTERS =========================== */

.chip-group{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  background: var(--base); border:1px solid var(--border); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size:12.5px; font-weight:600;
}
.chip:hover{ border-color: var(--teal); color: var(--teal); }
.chip.active{ background: var(--teal); border-color: var(--teal); color:#fff; }

/* =========================== MODAL =========================== */

.modal-backdrop{
  display:none; position:fixed; inset:0; background: rgba(15,20,30,.5);
  align-items:center; justify-content:center; z-index: 100; padding: 20px;
}
.modal-backdrop.open{ display:flex; }
.modal{
  background: var(--surface); border-radius: var(--radius-l); max-width: 560px; width:100%;
  max-height: 88vh; overflow-y:auto; padding: 30px; position:relative; box-shadow: var(--shadow-pop);
  animation: modalIn .2s ease;
}
@keyframes modalIn{ from{ opacity:0; transform: translateY(8px) scale(.98);} to{ opacity:1; transform:none;} }
.modal-close{
  position:absolute; top:18px; right:18px; border:none; background: var(--base);
  width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; color: var(--muted);
}
.modal-close:hover{ background: var(--border); }

.mc-header{ display:flex; align-items:center; gap:14px; margin-bottom: 20px; padding-right: 30px; }
.mc-avatar{
  width:54px; height:54px; border-radius:50%; background: var(--blue-soft); color: var(--blue);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:17px; flex-shrink:0;
}
.mc-name{ font-size:18px; font-weight:700; font-family:"Space Grotesk", sans-serif; }
.mc-position{ color: var(--muted); font-size:13px; }

.mc-section{ margin-bottom:18px; }
.mc-section h4{ font-size:12px; text-transform:none; color: var(--muted); font-weight:600; margin: 0 0 8px; }
.mc-grid{ display:grid; grid-template-columns:1fr 1fr; gap: 10px 16px; font-size: 13.5px; }
.mc-grid div span{ display:block; color: var(--faint); font-size:11.5px; margin-bottom:2px; }

.score-block{ display:flex; flex-direction:column; gap:10px; }
.score-row{ display:flex; align-items:center; gap:10px; }
.score-row .label{ width:110px; font-size:12.5px; color: var(--muted); flex-shrink:0; }
.score-row .bar{ flex:1; height:8px; border-radius:5px; background: var(--border); overflow:hidden; }
.score-row .bar-fill{ height:100%; border-radius:5px; }
.score-row .val{ width:34px; text-align:right; font-weight:700; font-family:"Space Grotesk", sans-serif; font-size:13px; }

.mc-actions{ display:flex; gap:10px; margin-top: 22px; flex-wrap:wrap; }

/* =========================== TOASTS =========================== */

.toast-container{
  position: fixed; bottom: 22px; right: 22px; display:flex; flex-direction:column; gap:10px; z-index: 200;
}
.toast{
  background: var(--ink); color:#fff; padding: 13px 18px; border-radius: var(--radius-s);
  display:flex; align-items:flex-start; gap:10px; min-width: 280px; max-width: 340px;
  box-shadow: var(--shadow-pop); animation: toastIn .25s ease;
  font-size: 13px;
}
.toast i{ font-size:16px; margin-top:1px; }
.toast.success i{ color:#7BC9A6; }
.toast.error i{ color:#E38E76; }
.toast .toast-body{ flex:1; }
.toast .toast-title{ font-weight:700; font-size:13px; margin-bottom:2px; }
.toast .toast-msg{ color:#C7CCD6; font-size:12px; }
@keyframes toastIn{ from{ opacity:0; transform: translateX(20px);} to{opacity:1; transform:none;} }

/* =========================== NOTIFICATIONS PAGE =========================== */

.notif-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.notif-list li{
  display:flex; gap:12px; padding: 14px 6px; border-bottom: 1px solid var(--border);
}
.notif-list li:last-child{ border-bottom:none; }
.notif-icon{
  width:36px; height:36px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:15px;
}
.notif-icon.email{ background: var(--blue-soft); color: var(--blue); }
.notif-icon.slack{ background: var(--purple-soft); color: var(--purple); }
.notif-icon.system{ background: var(--teal-soft); color: var(--teal); }
.notif-title{ font-weight:600; font-size:13.5px; }
.notif-msg{ color: var(--muted); font-size:12.5px; margin-top:2px; }
.notif-time{ color: var(--faint); font-size:11px; margin-top:4px; }

/* =========================== CHAT / ASSISTANT =========================== */

.chat-panel{ display:flex; flex-direction:column; height: 640px; max-height: 75vh; }
.chat-window{
  flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:14px;
  padding: 6px 4px 14px;
}
.msg{ display:flex; gap:10px; max-width: 78%; }
.msg-bot{ align-self:flex-start; }
.msg-user{ align-self:flex-end; flex-direction:row-reverse; }
.msg-avatar{
  width:28px; height:28px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:13px;
}
.msg-bot .msg-avatar{ background: var(--teal-soft); color: var(--teal); }
.msg-user .msg-avatar{ background: var(--blue-soft); color: var(--blue); }
.msg-bubble{ padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height:1.5; }
.msg-bot .msg-bubble{ background: var(--base); border-bottom-left-radius: 4px; }
.msg-user .msg-bubble{ background: var(--teal); color:#fff; border-bottom-right-radius: 4px; }
.msg-bubble ul{ margin: 6px 0 0; padding-left: 18px; }

.suggested-questions{ display:flex; flex-wrap:wrap; gap:8px; padding: 10px 0 14px; border-top: 1px solid var(--border); margin-top: 4px; }
.chat-input-row{ display:flex; gap:10px; }
.chat-input-row .text-input{ flex:1; }

/* =========================== RESPONSIVE =========================== */

@media (max-width: 1080px){
  .panel-grid{ grid-template-columns: 1fr; }
  .stat-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px){
  .sidebar{ transform: translateX(-100%); box-shadow: var(--shadow-pop); }
  .sidebar.open{ transform: translateX(0); }
  .scrim.open{ display:block; }
  .main{ margin-left:0; }
  .only-mobile{ display:flex; }
  .topbar{ padding: 14px 16px; }
  .content{ padding: 18px 16px 50px; }
  .search-box{ display:none; }
  .form-grid{ grid-template-columns: 1fr; }
  .field-wide{ grid-column: span 1; }
  .stat-grid{ grid-template-columns: 1fr 1fr; gap:12px; }
  .btn span{ display:inline; }
  .topbar-actions .btn{ padding: 9px 12px; }
}

@media (max-width: 520px){
  .stat-grid{ grid-template-columns: 1fr; }
  .msg{ max-width: 92%; }
}
