:root {
  --bg:#f4f6fb; --surface:#fff; --surface-2:#f8fafc; --border:#e6e9f0;
  --text:#1f2433; --text-soft:#5b6478; --text-faint:#8a93a6;
  --primary:#c1272d; --primary-dark:#a31f24; --primary-soft:#fcecec;
  --shadow:0 1px 3px rgba(20,25,50,.06), 0 8px 24px rgba(20,25,50,.06);
  --shadow-lg:0 12px 40px rgba(20,25,50,.18);
  --radius:14px; --radius-sm:9px;
  --green-bg:#e2f7ec; --green-fg:#137a47;
  --amber-bg:#fff1dd; --amber-fg:#c2700a;
  --red-bg:#fde7e9; --red-fg:#c0314a;
  --blue-bg:#e9eef5; --blue-fg:#3f5a82;
  --purple-bg:#edeef3; --purple-fg:#566179;
  --gray-bg:#eef1f6; --gray-fg:#5b6478;
}
* { box-sizing:border-box; }
html,body { margin:0; padding:0; }
body { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--text); line-height:1.55; font-size:15px; -webkit-font-smoothing:antialiased; }
a { color:var(--primary); }
.hidden { display:none !important; }

/* ---------- Login ---------- */
#login { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:linear-gradient(160deg,#f4f6fb 0%,#e9ecf3 100%); }
.login-card { background:var(--surface); border-radius:18px; box-shadow:var(--shadow-lg); padding:34px 32px; width:100%; max-width:400px; }
.login-card .logo { display:flex; align-items:center; gap:11px; margin-bottom:6px; }
.login-card .logo .mark { width:42px; height:42px; border-radius:11px; background:#334155; color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:20px; }
.login-card h1 { font-size:20px; margin:0; }
.login-card .sub { color:var(--text-soft); font-size:13.5px; margin:2px 0 22px; }
.login-card label { font-size:13px; font-weight:600; color:var(--text-soft); display:block; margin-bottom:6px; }
.login-card input { width:100%; border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 13px; font-size:15px; margin-bottom:16px; font-family:inherit; }
.login-card input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.login-err { background:var(--red-bg); color:var(--red-fg); border-radius:var(--radius-sm); padding:10px 13px; font-size:13.5px; margin-bottom:16px; }
.login-hint { margin-top:20px; font-size:12px; color:var(--text-faint); line-height:1.7; border-top:1px solid var(--border); padding-top:14px; }
.login-hint code { background:var(--surface-2); padding:1px 5px; border-radius:5px; }

/* ---------- App shell ---------- */
header.topbar { background:var(--surface); color:var(--text); box-shadow:0 1px 0 var(--border); }
.topbar-inner { max-width:1180px; margin:0 auto; padding:16px 24px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.topbar .brand { display:flex; align-items:center; gap:11px; }
.topbar .brand .mark { width:34px; height:34px; border-radius:9px; background:rgba(255,255,255,.18); display:flex; align-items:center; justify-content:center; font-weight:800; }
.topbar .brand h1 { font-size:18px; margin:0; font-weight:700; }
.topbar .brand small { display:block; font-size:11.5px; opacity:.85; }
.topbar .who { display:flex; align-items:center; gap:14px; font-size:13.5px; }
.topbar .who .role-chip { background:var(--surface-2); border:1px solid var(--border); color:var(--text-soft); padding:3px 10px; border-radius:999px; font-weight:600; text-transform:capitalize; }

nav.tabs { max-width:1180px; margin:0 auto; padding:0 24px; display:flex; gap:4px; border-bottom:1px solid var(--border); flex-wrap:wrap; background:var(--surface); }
nav.tabs.shell { background:var(--surface); border-bottom:1px solid var(--border); }
.wrap { max-width:1180px; margin:0 auto; padding:24px; }
.tabbar { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:24px; flex-wrap:wrap; }
.tab { background:none; border:none; cursor:pointer; font-size:15px; font-weight:600; color:var(--text-soft); padding:11px 16px; border-bottom:3px solid transparent; margin-bottom:-1px; }
.tab:hover { color:var(--text); }
.tab.active { color:var(--primary); border-bottom-color:var(--primary); }

.section-title { font-size:18px; font-weight:700; margin:0 0 6px; letter-spacing:-.2px; }
.section-sub { color:var(--text-soft); font-size:13.5px; margin:0 0 20px; }
.muted { color:var(--text-soft); }
.row-between { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }

/* ---------- Buttons ---------- */
.btn { border:none; cursor:pointer; font-size:14px; font-weight:600; padding:10px 16px; border-radius:var(--radius-sm); line-height:1.4;
  transition:background .15s, transform .05s; display:inline-flex; align-items:center; gap:7px; font-family:inherit; }
.btn:active { transform:translateY(1px); }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:var(--primary-dark); }
.btn-ghost { background:var(--surface); color:var(--text); border:1px solid var(--border); }
.btn-ghost:hover { background:var(--surface-2); }
.btn-danger { background:var(--red-bg); color:var(--red-fg); }
.btn-danger:hover { background:#fbd3d8; }
.btn-sm { padding:7px 12px; font-size:13px; }
.btn-block { width:100%; justify-content:center; }

/* ---------- KPI ---------- */
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:16px; margin-bottom:26px; }
.kpi { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); position:relative; overflow:visible; }
.kpi .accent { position:absolute; left:0; top:0; bottom:0; width:4px; }
.kpi .label { font-size:12px; color:var(--text-soft); font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.kpi .value { font-size:30px; font-weight:700; margin-top:8px; letter-spacing:-.5px; }
.kpi .sub { font-size:12.5px; color:var(--text-faint); margin-top:3px; }

/* ---------- Panels & charts ---------- */
.panel-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
@media (max-width:820px){ .panel-grid { grid-template-columns:1fr; } }
.panel { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:20px 22px; margin-bottom:18px; }
.panel h3 { margin:0 0 2px; font-size:15px; }
.panel .ph-sub { color:var(--text-soft); font-size:12.5px; margin-bottom:12px; }
.bar-row { display:grid; grid-template-columns:140px 1fr 40px; align-items:center; gap:12px; margin:10px 0; }
.bar-row .bl { font-size:13px; color:var(--text-soft); font-weight:600; }
.bar-track { background:var(--surface-2); border:1px solid var(--border); border-radius:999px; height:15px; overflow:hidden; }
.bar-fill { height:100%; border-radius:999px; min-width:3px; transition:width .5s ease; }
.bar-val { font-size:13px; font-weight:700; text-align:right; }

/* ---------- Tables ---------- */
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:16px; }
.toolbar input[type=search], .toolbar select { border:1px solid var(--border); border-radius:var(--radius-sm); padding:9px 12px; font-size:14px; background:var(--surface); color:var(--text); font-family:inherit; }
.toolbar input[type=search] { min-width:220px; flex:1; }
.table-wrap { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); overflow:auto; }
table { width:100%; border-collapse:collapse; }
thead th { text-align:left; font-size:12px; color:var(--text-faint); padding:12px 16px; background:var(--surface-2); border-bottom:1px solid var(--border); white-space:nowrap; font-weight:600; }
tbody td { padding:13px 16px; border-bottom:1px solid var(--border); font-size:14px; vertical-align:middle; }
tbody tr.clickable { cursor:pointer; transition:background .12s; }
tbody tr.clickable:hover { background:var(--primary-soft); }
tbody tr:last-child td { border-bottom:none; }
.cell-strong { font-weight:600; }
.cell-strong small { display:block; font-weight:500; color:var(--text-faint); font-size:12.5px; }
.empty { padding:46px 20px; text-align:center; color:var(--text-faint); }
.count-note { color:var(--text-soft); font-size:13px; margin-top:12px; }

/* ---------- Badges ---------- */
.badge { display:inline-block; font-size:12px; font-weight:700; padding:4px 10px; border-radius:999px; white-space:nowrap; line-height:1.5; }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:7px; vertical-align:middle; }

/* ---------- Forms ---------- */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:22px 24px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px 20px; }
@media (max-width:640px){ .form-grid { grid-template-columns:1fr; } }
.field { display:flex; flex-direction:column; gap:6px; }
.field.full { grid-column:1/-1; }
.field label { font-size:13px; font-weight:600; color:var(--text-soft); }
.field label .req { color:#d23a52; }
.field input, .field select, .field textarea { border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; font-size:14px; font-family:inherit; background:var(--surface); color:var(--text); line-height:1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.field textarea { resize:vertical; min-height:84px; }
.field .ro { padding:10px 12px; background:var(--surface-2); border:1px dashed var(--border); border-radius:var(--radius-sm); font-size:14px; color:var(--text-soft); }
.hint { font-size:12.5px; color:var(--text-faint); }
.form-actions { display:flex; gap:10px; margin-top:22px; }

/* ---------- Drawer ---------- */
.overlay { position:fixed; inset:0; background:rgba(20,25,50,.45); display:none; z-index:50; }
.overlay.open { display:block; }
.drawer { position:fixed; top:0; right:0; bottom:0; width:600px; max-width:96vw; background:var(--surface); box-shadow:var(--shadow-lg);
  z-index:60; transform:translateX(100%); transition:transform .28s cubic-bezier(.4,0,.2,1); display:flex; flex-direction:column; }
.drawer.open { transform:none; }
.drawer-head { padding:20px 24px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.drawer-head h2 { margin:0 0 4px; font-size:19px; }
.drawer-head .meta { font-size:13px; color:var(--text-soft); }
.x-btn { background:var(--surface-2); border:1px solid var(--border); border-radius:8px; width:34px; height:34px; cursor:pointer; font-size:18px; color:var(--text-soft); line-height:1; flex-shrink:0; }
.x-btn:hover { background:#eceff5; }
.drawer-body { padding:22px 24px; overflow-y:auto; flex:1; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; }
.detail-grid .full { grid-column:1/-1; }
.dl label { font-size:11.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--text-faint); font-weight:700; display:block; margin-bottom:3px; }
.dl .val { font-size:14.5px; }
.sub-head { font-size:14px; font-weight:700; margin:24px 0 12px; display:flex; align-items:center; justify-content:space-between; }

/* timeline */
.timeline { border-left:2px solid var(--border); margin-left:6px; padding-left:18px; }
.tl-item { position:relative; padding-bottom:16px; }
.tl-item:last-child { padding-bottom:0; }
.tl-item .tl-dot { position:absolute; left:-25px; top:3px; width:11px; height:11px; border-radius:50%; background:var(--primary); border:2px solid var(--surface); }
.tl-item .tl-status { font-weight:700; font-size:13.5px; }
.tl-item .tl-meta { font-size:12px; color:var(--text-faint); }
.tl-item .tl-note { font-size:13px; color:var(--text-soft); margin-top:2px; }

/* candidates */
.cand { border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; margin-bottom:10px; background:var(--surface-2); }
.cand .top { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.cand .nm { font-weight:700; font-size:14.5px; }
.cand .info { font-size:13px; color:var(--text-soft); margin-top:4px; }
.cand .info span { margin-right:14px; }
.cand .rm { background:none; border:none; color:var(--text-faint); cursor:pointer; font-size:13px; padding:2px 6px; }
.cand .rm:hover { color:var(--red-fg); }
.inline-form { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; padding:14px; border:1px dashed var(--border); border-radius:var(--radius-sm); }
.inline-form .full { grid-column:1/-1; }
.inline-form input, .inline-form select { border:1px solid var(--border); border-radius:8px; padding:8px 10px; font-size:13.5px; font-family:inherit; width:100%; }

.status-box { background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px; margin-bottom:8px; }
.status-box .row { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.status-box select, .status-box input { border:1px solid var(--border); border-radius:8px; padding:9px 11px; font-size:14px; font-family:inherit; }
.status-box .grow { flex:1; min-width:160px; }

/* ---------- Toast ---------- */
#toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:#1f2433; color:#fff; padding:12px 20px; border-radius:10px; font-size:14px; font-weight:500; opacity:0; pointer-events:none; transition:all .25s; z-index:80; box-shadow:var(--shadow-lg); }
#toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
#toast.err { background:#c0314a; }
.pill-tabs { display:flex; gap:6px; margin-bottom:18px; flex-wrap:wrap; }
.pill { background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:7px 16px; font-size:13.5px; font-weight:600; cursor:pointer; color:var(--text-soft); }
.pill.active { background:var(--primary); color:#fff; border-color:var(--primary); }

/* ---------- Google sign-in & access states ---------- */
.gbtn { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; cursor:pointer;
  background:#fff; color:#1f2433; border:1px solid #dadce0; border-radius:var(--radius-sm); padding:11px 16px;
  font-size:15px; font-weight:600; font-family:inherit; }
.gbtn:hover { background:#f7f8fa; box-shadow:0 1px 3px rgba(20,25,50,.12); }
.gbtn svg { width:18px; height:18px; }
.login-note { font-size:12.5px; color:var(--text-faint); margin-top:14px; line-height:1.7; text-align:center; }
.access-card { text-align:center; }
.access-card .ic { font-size:34px; margin-bottom:6px; }
.spinner { width:34px; height:34px; border:3px solid var(--border); border-top-color:var(--primary); border-radius:50%; animation:spin .8s linear infinite; margin:30px auto; }
@keyframes spin { to { transform:rotate(360deg); } }
.center-screen { min-height:60vh; display:flex; align-items:center; justify-content:center; }

/* ---------- sortable headers & permissions table ---------- */
th.sortable { cursor:pointer; user-select:none; white-space:nowrap; }
th.sortable:hover { color:var(--text); }
.sarr { font-size:10px; opacity:.45; margin-left:2px; }
.sarr.on { opacity:1; color:var(--primary); }
.perm-table th, .perm-table td { font-size:13.5px; }
.perm-table input[type=checkbox] { width:17px; height:17px; cursor:pointer; accent-color:var(--primary); }

/* ---------- brand logo images ---------- */
.login-card .logo .logo-img-lg { width:48px; height:48px; border-radius:11px; display:block; box-shadow:0 1px 3px rgba(20,25,50,.15); }
.topbar .brand .logo-img { width:34px; height:34px; border-radius:8px; display:block; }

/* ---------- candidate inline status ---------- */
.cand select.cstage { border:1px solid var(--border); border-radius:7px; padding:5px 9px; font-size:13px; font-family:inherit; background:var(--surface); color:var(--text); }
.cand select.cstage:focus { outline:none; border-color:var(--primary); }

/* ---------- dashboard number lists ---------- */
.numrows { display:flex; flex-direction:column; }
.numrow { display:flex; justify-content:space-between; align-items:center; padding:9px 0; border-bottom:1px solid var(--border); font-size:14px; }
.numrow:last-child { border-bottom:none; }
.numrow .nl { color:var(--text-soft); }
.numrow .nv { font-weight:700; font-size:17px; letter-spacing:-.3px; }

/* ---------- dashboard stat tiles (pipeline) ---------- */
.stat-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(118px,1fr)); gap:12px; }
.stat-tile { background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px 14px; }
.stat-tile .st-n { font-size:22px; font-weight:700; letter-spacing:-.4px; line-height:1.1; }
.stat-tile .st-l { font-size:12px; color:var(--text-soft); margin-top:4px; }

/* ---------- mobile optimisation ---------- */
.btn { white-space:nowrap; }
.topbar .who .role-chip { white-space:nowrap; }
@media (max-width:640px){
  .topbar-inner { padding:12px 16px; }
  .wrap { padding:16px; }
  .tabbar { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; margin-bottom:0; }
  .tab { white-space:nowrap; padding:11px 12px; }
  #listWrap thead { display:none; }
  #listWrap table, #listWrap tbody, #listWrap tr, #listWrap td { display:block; width:auto; }
  #listWrap .table-wrap { border:none; box-shadow:none; background:transparent; overflow:visible; }
  #listWrap tr.clickable { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:6px 14px 10px; margin-bottom:12px; }
  #listWrap td { border:none !important; padding:7px 0; display:flex; justify-content:space-between; align-items:center; gap:14px; font-size:14px; }
  #listWrap td.cell-strong { display:block; font-size:15.5px; padding:10px 0 4px; }
  #listWrap td[data-label]::before { content:attr(data-label); color:var(--text-faint); font-size:12px; font-weight:600; }
  /* Tighter KPI tiles on mobile — 2-col grid, smaller padding, no shadow,
     compact fonts. Same content, ~30% less vertical real estate per tile. */
  .kpi-grid { grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; margin-bottom:16px; }
  .kpi { padding:11px 13px; border-radius:10px; box-shadow:none; }
  .kpi .accent { width:3px; }
  .kpi .label { font-size:10.5px; letter-spacing:.3px; }
  .kpi .value { font-size:22px; margin-top:3px; letter-spacing:-.3px; }
  .kpi .sub { font-size:11.5px; margin-top:2px; line-height:1.4; }
  .section-title { font-size:17px; }
  .section-sub { font-size:13px; margin-bottom:14px; }
  .row-between { gap:8px; margin-bottom:12px; }
}

/* ---------- new app shell: persistent sidebar (desktop) + drawer (mobile) ---------- */
.app-shell { display:flex; align-items:stretch; max-width:1280px; margin:0 auto; min-height:calc(100vh - 70px); }
.menu-btn { display:none; align-items:center; justify-content:center; background:none; border:none; cursor:pointer; color:var(--text); width:40px; height:40px; border-radius:10px; padding:0; flex:none; margin-right:4px; }
.menu-btn:active { background:var(--surface-2); }
.menu-btn svg { width:24px; height:24px; }
.navdrawer-overlay { position:fixed; inset:0; background:rgba(20,25,50,.45); display:none; z-index:70; }
.navdrawer-overlay.open { display:block; }

/* Sidebar — visible on desktop, slide-in drawer on mobile */
.sidebar { width:240px; flex:none; border-right:1px solid var(--border); background:var(--surface); display:flex; flex-direction:column; min-height:0; }
.sidebar-head { display:none; align-items:center; justify-content:space-between; padding:16px 18px 8px; }
.sidebar-title { font-size:18px; font-weight:700; color:var(--text); }
.sidebar-x { background:none; border:none; font-size:26px; line-height:1; color:var(--primary); cursor:pointer; padding:0 4px; }
.sidebar-nav { padding:18px 12px 12px; overflow-y:auto; flex:1; }
.nav-section { margin-bottom:14px; }
.nav-section-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text-faint); padding:8px 12px 6px; }
.dnav { display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:none; border:none; font-size:14.5px; font-weight:500; color:var(--text-soft); padding:9px 12px; border-radius:9px; cursor:pointer; font-family:inherit; line-height:1.5; transition:background .12s, color .12s; }
.dnav .dnav-ic { width:18px; height:18px; flex:none; color:var(--text-faint); }
.dnav:hover { background:var(--surface-2); color:var(--text); }
.dnav:hover .dnav-ic { color:var(--text-soft); }
.dnav.active { background:var(--primary-soft); color:var(--primary); font-weight:600; }
.dnav.active .dnav-ic { color:var(--primary); }
.sidebar-foot { margin-top:auto; border-top:1px solid var(--border); padding:14px 16px 18px; }
.drawer-user { margin-bottom:12px; }
.drawer-user .du-name { font-size:14px; font-weight:600; color:var(--text); }
.drawer-user .du-email { font-size:12.5px; color:var(--text-soft); margin-top:2px; word-break:break-all; }

.main-pane { flex:1; min-width:0; }
.main-pane .wrap { max-width:100%; padding:28px 32px; }

@media (max-width:900px){
  .app-shell { min-height:calc(100vh - 64px); }
  .menu-btn { display:inline-flex; }
  .topbar .who { display:none; }
  /* Without the who block (hidden on mobile), space-between leaves a big
     middle gap. Left-align hamburger + brand so the topbar reads cleanly. */
  .topbar-inner { flex-wrap:nowrap; justify-content:flex-start; gap:12px; }
  .topbar .brand { flex:0 1 auto; min-width:0; }
  .topbar .brand h1 { font-size:17px; }
  .topbar .brand small { font-size:11.5px; }
  .sidebar-head { display:flex; }
  .sidebar { position:fixed; top:0; left:0; bottom:0; width:300px; max-width:84vw; z-index:75; transform:translateX(-100%); transition:transform .26s cubic-bezier(.4,0,.2,1); box-shadow:var(--shadow-lg); border-right:none; }
  .sidebar.open { transform:none; }
  .main-pane .wrap { padding:18px 16px; }
}
/* Hide legacy top tab bar globally (kept harmless in DOM) */
nav.tabs.shell, #navTabs.hidden { display:none !important; }

/* ---------- candidates (pooled by position) ---------- */
.pos { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:20px; overflow:hidden; }
.pos-head { padding:15px 18px; display:flex; align-items:center; flex-wrap:wrap; gap:10px; border-bottom:1px solid var(--border); }
.pos-title { font-size:16px; font-weight:700; }
.seatchip { font-size:12.5px; font-weight:600; padding:5px 11px; border-radius:999px; background:var(--surface-2); border:1px solid var(--border); color:var(--text-soft); margin-left:auto; }
.seatchip.open { background:var(--blue-bg); color:var(--blue-fg); border-color:transparent; }
.pos-body { padding:6px 10px 12px; }
.cand { display:flex; align-items:center; gap:12px; padding:11px; border-radius:11px; }
.cand + .cand { border-top:1px solid var(--border); }
.cand.done { opacity:.6; }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--primary-soft); color:var(--primary); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13.5px; flex:none; }
.cand-main { flex:1; min-width:0; }
.cand-name { font-weight:600; font-size:14.5px; }
.cand-sub { font-size:12.5px; color:var(--text-faint); }
.cand-actions { display:flex; gap:7px; align-items:center; flex:none; flex-wrap:wrap; justify-content:flex-end; }
.btn-link { background:none; border:none; color:var(--text-faint); font-size:12px; cursor:pointer; text-decoration:underline; padding:4px; font-family:inherit; }
.btn-link:hover { color:var(--primary); }
.addrow { padding:6px 6px 2px; }
.addbtn { color:var(--primary); border:1px dashed var(--primary); background:var(--primary-soft); width:100%; }
.addform { background:var(--surface-2); border:1px solid var(--border); border-radius:11px; padding:11px; margin:6px; display:grid; grid-template-columns:1.4fr 1fr 1fr auto; gap:8px; align-items:center; }
.addform input, .addform select { font-family:inherit; font-size:13.5px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; }
.hired-head { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--green-fg); padding:14px 12px 4px; border-top:1px solid var(--border); margin-top:8px; }
.cmodal-overlay { position:fixed; inset:0; background:rgba(20,25,50,.45); display:none; align-items:center; justify-content:center; padding:20px; z-index:90; }
.cmodal-overlay.open { display:flex; }
.cmodal { background:var(--surface); border-radius:16px; box-shadow:var(--shadow-lg); max-width:420px; width:100%; padding:22px; }
.cmodal h3 { margin:0 0 4px; font-size:18px; }
.cmodal p { margin:0 0 16px; color:var(--text-soft); font-size:13.5px; }
.seat-opt { display:flex; align-items:center; justify-content:space-between; width:100%; padding:14px 16px; border:1px solid var(--border); border-radius:11px; background:var(--surface); cursor:pointer; font-size:15px; font-weight:600; margin-bottom:10px; font-family:inherit; text-align:left; }
.seat-opt:hover { border-color:var(--primary); background:var(--primary-soft); }
@media (max-width:640px){
  .addform { grid-template-columns:1fr 1fr; }
  .cand { flex-wrap:wrap; }
  .seatchip { margin-left:0; }
}
.kpi.clickable { cursor:pointer; transition:transform .12s, box-shadow .12s; }
.kpi.clickable:hover { transform:translateY(-2px); box-shadow:var(--shadow-lg); }
.dmodal-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 2px; border-top:1px solid var(--border); }
.dmodal-row:first-child { border-top:none; }

/* ---------- candidates: accordion + search + detail cards ---------- */
.cand-toolbar { position:sticky; top:0; z-index:6; background:var(--bg); padding:10px 0; }
.cand-search { width:100%; padding:11px 14px; border:1px solid var(--border); border-radius:11px; font-size:15px; font-family:inherit; background:var(--surface); }
.cand-search:focus { outline:none; border-color:var(--primary); }
.cand-chips { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.cand-chip { font-family:inherit; font-size:13px; font-weight:600; border:1px solid var(--border); background:var(--surface); color:var(--text-soft); padding:7px 12px; border-radius:999px; cursor:pointer; display:inline-flex; gap:7px; align-items:center; }
.cand-chip:hover { border-color:var(--primary); }
.cand-chip.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.cand-chip .ct { font-size:11.5px; background:rgba(0,0,0,.07); padding:1px 7px; border-radius:999px; }
.cand-chip.active .ct { background:rgba(255,255,255,.25); }
.pos-head { padding:13px 16px; display:flex; align-items:center; gap:12px; cursor:pointer; user-select:none; border-bottom:none; flex-wrap:nowrap; }
.pos-head:hover { background:var(--surface-2); }
.caret { color:var(--text-faint); font-size:13px; width:14px; flex:none; }
.ph-main { flex:1; min-width:0; }
.ph-title { font-weight:700; font-size:15px; }
.ph-title .dept { font-weight:500; font-size:13px; color:var(--text-faint); }
.pos-sub { font-size:12.5px; color:var(--text-soft); margin-top:2px; }
.pcount { font-weight:700; font-size:15px; min-width:34px; text-align:right; flex:none; }
.pcount small { display:block; font-size:10px; font-weight:600; color:var(--text-faint); }
.pos-body { border-top:1px solid var(--border); padding:6px 8px 10px; }
.cand .cand-main, .cand .avatar { cursor:pointer; }
.cand .cand-main:hover .cand-name { color:var(--primary); }
.empty-row { padding:12px 10px; color:var(--text-faint); font-size:13px; }
.avatar.lg { width:46px; height:46px; font-size:17px; }
.cmodal { max-height:88vh; overflow:auto; }
.m-head { display:flex; align-items:center; gap:13px; margin-bottom:12px; }
.m-head h3 { margin:0; font-size:19px; }
.m-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; border-top:1px solid var(--border); font-size:14px; }
.m-row .m-l { color:var(--text-soft); font-size:13px; }
.m-row input, .m-row select { font-family:inherit; font-size:14px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; min-width:56%; }
.m-sub { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-faint); margin:16px 0 10px; }
.m-actions { display:flex; gap:8px; margin-top:16px; }
.timeline { position:relative; }
.tl { display:flex; gap:12px; padding:0 0 14px; position:relative; }
.tl:before { content:""; position:absolute; left:4px; top:13px; bottom:-2px; width:2px; background:var(--border); }
.tl:last-child:before { display:none; }
.tl-dot { width:10px; height:10px; border-radius:50%; background:var(--primary); flex:none; margin-top:3px; z-index:1; }
.tl-stage { font-weight:600; font-size:14px; }
.tl-date { font-size:12.5px; color:var(--text-faint); }
.stage-ic { display:inline-block; width:14px; height:14px; vertical-align:-2px; margin-right:5px; flex:none; }
.cand-chip .stage-ic { width:13px; height:13px; }
.tl-stage { display:flex; align-items:center; }
.kpi .label { display:flex; align-items:center; gap:6px; }
.kpi .label .stage-ic { width:16px; height:16px; color:var(--text-soft); margin:0; }

/* ---------- PWA install prompt (login screen) ---------- */
.install-prompt { margin-top:16px; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:14px; }
.install-prompt.hidden { display:none; }
.install-prompt .ip-row { display:flex; align-items:center; gap:12px; }
.install-prompt .ip-ic { width:22px; height:22px; color:var(--primary); flex:none; }
.install-prompt .ip-text { flex:1; min-width:0; }
.install-prompt .ip-title { font-weight:700; font-size:14px; color:var(--text); }
.install-prompt .ip-sub { font-size:12.5px; color:var(--text-soft); line-height:1.5; margin-top:2px; }
.install-prompt .ip-ic-inline { width:15px; height:15px; vertical-align:-3px; }

/* ---- Hired-row inline name edit pencil ---- */
.name-edit {
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; margin-left:6px; vertical-align:-3px;
  border:1px solid var(--border); border-radius:6px;
  background:var(--surface); color:var(--text-soft);
  font-size:11.5px; line-height:1; cursor:pointer; padding:0;
  transition:background .12s ease, color .12s ease, border-color .12s ease;
}
.name-edit:hover { background:#fff; color:var(--primary); border-color:var(--primary); }
.name-edit:focus { outline:2px solid var(--primary); outline-offset:1px; }

/* ---- Company chip + "Used in" multi-select ---- */
.co-chip {
  display:inline-block; padding:2px 6px; border-radius:5px;
  color:#fff; font-weight:700; font-size:10.5px; letter-spacing:.3px;
  vertical-align:1px;
}
.usedin-row {
  display:flex; flex-wrap:wrap; gap:8px;
  padding:8px 4px;
}
.usedin-chk {
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 12px; border:1.5px solid var(--border);
  border-radius:8px; background:#fff; cursor:pointer;
  font-size:13px; font-weight:500;
  transition:border-color .12s ease, background .12s ease;
  user-select:none;
}
.usedin-chk:hover { border-color:var(--primary); }
.usedin-chk.on {
  border-color:var(--primary); background:var(--red-bg);
}

/* ---- Sidebar company switcher chip + popover ---- */
.co-switcher-wrap { position:relative; padding:0 14px 14px; margin-top:-2px; }
.co-switcher {
  width:100%; display:flex; align-items:center; gap:10px;
  padding:10px 12px; border:1.5px solid var(--primary); border-radius:10px;
  background:#fff; cursor:pointer; text-align:left; font:inherit;
  transition:box-shadow .12s ease;
}
.co-switcher:hover:not([disabled]) { box-shadow:0 2px 8px rgba(193,39,45,.18); }
.co-switcher.lone { border-color:var(--border); cursor:default; }
.co-sw-dot {
  width:32px; height:32px; border-radius:8px;
  display:grid; place-items:center; color:#fff;
  font-weight:800; font-size:11px; letter-spacing:.3px; flex-shrink:0;
}
.co-sw-name { flex:1; min-width:0; font-weight:700; font-size:13.5px; color:var(--text); line-height:1.25; }
.co-sw-name small { display:block; font-weight:400; color:var(--text-soft); font-size:11px; margin-top:2px; }
.co-sw-chev { color:var(--text-soft); font-size:11px; flex-shrink:0; }
.co-switcher-pop {
  position:absolute; left:14px; right:14px; top:calc(100% - 8px);
  background:#fff; border:1px solid var(--border); border-radius:10px;
  box-shadow:0 8px 28px rgba(20,25,45,.12);
  padding:6px; z-index:20;
}
.co-switcher-pop.hidden { display:none; }
.co-sw-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 10px; border-radius:7px; cursor:pointer;
  font-size:13px;
}
.co-sw-item:hover { background:var(--surface-2); }
.co-sw-item.sel { background:var(--red-bg); }
.co-sw-tick { color:var(--primary); font-weight:700; margin-left:auto; }
.co-sw-divider { height:1px; background:var(--border); margin:5px 0; }
.co-sw-all {
  padding:9px 10px; border-radius:7px; cursor:pointer;
  font-size:12.5px; color:var(--blue-fg); font-weight:700;
}
.co-sw-all:hover { background:var(--surface-2); }
.co-sw-all.sel { background:var(--red-bg); }

/* ---- Login-time company picker ---- */
.co-login-overlay {
  position:fixed; inset:0; background:rgba(20,25,50,.55);
  display:flex; align-items:center; justify-content:center; padding:24px; z-index:100;
}
.co-login-card {
  background:#fff; border-radius:16px; max-width:480px; width:100%;
  padding:32px; text-align:center; box-shadow:0 14px 40px rgba(0,0,0,.18);
}
.co-login-brand {
  width:52px; height:52px; border-radius:13px; background:var(--primary);
  color:#fff; display:grid; place-items:center; font-weight:800; font-size:20px;
  margin:0 auto 10px;
}
.co-login-card h2 { margin:8px 0 6px; font-size:21px; color:var(--text); }
.co-login-sub { font-size:13.5px; color:var(--text-soft); margin:0 0 20px; line-height:1.5; }
.co-tile {
  width:100%; display:flex; align-items:center; gap:14px;
  padding:14px 16px; border:1.5px solid var(--border); border-radius:10px;
  margin-bottom:10px; cursor:pointer; background:#fff; text-align:left; font:inherit;
  transition:border-color .12s ease, background .12s ease;
}
.co-tile:hover { border-color:var(--primary); background:var(--red-bg); }
.co-tile-dot {
  width:42px; height:42px; border-radius:10px;
  display:grid; place-items:center; color:#fff;
  font-weight:800; font-size:13px; letter-spacing:.3px; flex-shrink:0;
}
.co-tile-info { flex:1; min-width:0; }
.co-tile-name { display:block; font-weight:700; font-size:14.5px; color:var(--text); }
.co-tile-meta { display:block; font-size:12px; color:var(--text-soft); margin-top:2px; }
.co-tile-arr { color:var(--text-soft); font-size:18px; }
.co-login-divider { height:1px; background:var(--border); margin:14px 0; }
.co-login-all {
  width:100%; padding:12px 14px; border:1px dashed var(--border);
  border-radius:10px; background:transparent; cursor:pointer;
  font:inherit; font-size:13px; color:var(--blue-fg); font-weight:700;
}
.co-login-all small { display:block; color:var(--text-soft); font-weight:400; font-size:11.5px; margin-top:2px; }
.co-login-all:hover { background:var(--surface-2); }

/* ---- Page-header company chip (used by views) ---- */
.page-co-chip {
  display:inline-block; padding:3px 9px; border-radius:6px;
  color:#fff; font-weight:700; font-size:11px; letter-spacing:.4px;
  vertical-align:middle; margin-right:8px;
}

/* ---- Masters page — grouped tab navigation ---- */
.master-nav { margin: 14px 0 22px; }
.master-nav-group {
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.master-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--text-soft);
  text-transform: uppercase;
  min-width: 170px;
  flex-shrink: 0;
}
.master-nav-label svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-soft);
}
.master-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.master-pills .pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.master-pills .pill:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}
.master-pills .pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
@media (max-width: 640px) {
  .master-nav-group { padding: 12px 14px; gap: 10px; }
  .master-nav-label { min-width: 0; width: 100%; margin-bottom: 4px; font-size: 10.5px; }
  .master-pills .pill { font-size: 12.5px; padding: 6px 11px; }
}

/* ---- Permissions table — group section headers ---- */
.perm-table .perm-group-row td {
  background: var(--surface-2, var(--surface));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--text-soft);
  text-transform: uppercase;
  padding: 9px 14px 7px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.perm-table .perm-group-row:first-child td {
  border-top: none;
}

/* ---- Ideal Staffing — aggregated vacancy queue panel ---- */
.vac-queue {
  border: 1px solid var(--red-bg);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin: 18px 0 22px;
  box-shadow: 0 1px 3px rgba(193,39,45,.08);
}
.vac-queue-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--red-bg);
  border-bottom: 1px solid #f7d6da;
}
.vac-queue-flag {
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
  line-height: 1;
}
.vac-queue-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.vac-queue-sub {
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 2px;
  line-height: 1.5;
}
.vac-queue-body {
  display: flex;
  flex-direction: column;
}
.vac-row {
  display: grid;
  grid-template-columns: 1fr 110px 170px;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}
.vac-row:first-child { border-top: none; }
.vac-row-text {
  min-width: 0;
}
.vac-outlet {
  font-weight: 700;
  color: var(--text);
}
.vac-role {
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 2px;
}
.vac-row-count {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .vac-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "text count" "btn btn";
    gap: 6px 12px;
    padding: 14px 16px;
  }
  .vac-row-text { grid-area: text; }
  .vac-row-count { grid-area: count; text-align: right; }
  .vac-row > div:last-child { grid-area: btn; }
  .vac-row > div:last-child .btn { width: 100%; }
}

/* ---- Performance Appraisal table — clean, compact, low-noise ---- */
.appr-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.appr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  table-layout: auto;
}
.appr-table thead th {
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.appr-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.4;
}
.appr-table tbody tr:last-child td { border-bottom: none; }
.appr-table tbody tr:hover td { background: rgba(241,244,249,.6); }
.appr-table td.appr-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appr-table td.appr-ctc { white-space: nowrap; }
.appr-table td.appr-months { white-space: nowrap; }
/* Overdue rows — soft pink wash plus a 3px red left bar on the first cell */
.appr-table tbody tr.appr-due td { background: #fff5f6; }
.appr-table tbody tr.appr-due td:first-child {
  box-shadow: inset 3px 0 0 var(--red-fg);
  padding-left: 18px;
}
.appr-table tbody tr.appr-due:hover td { background: #fdebee; }
@media (max-width: 720px) {
  .appr-table thead th, .appr-table tbody td { padding: 8px 10px; font-size: 12.5px; }
  .appr-table td.appr-name { max-width: 160px; }
}

/* ===== Unified platform design language: light shell (topbar + sidebar) ===== */
header.topbar { background:#ffffff; color:#1f2430; box-shadow:0 1px 0 #e8eaed; }
.topbar .brand .mark { background:#c1272d; color:#fff; }
.topbar .brand h1 { color:#1f2430; }
.topbar .brand small { color:#8a92a0; opacity:1; }
.topbar .who { color:#5b6472; }
.topbar .who #whoName { color:#1f2430; }
.topbar .who .role-chip { background:#f1f3f5; border:1px solid #e6e8ec; color:#5b6472; }
.topbar .who .btn-ghost { background:#fff; border-color:#e0e3e8; color:#5b6472; }
.topbar .who .btn-ghost:hover { background:#f6f7f8; color:#1f2430; border-color:#d5d9e0; }
.menu-btn { color:#5b6472; }
.menu-btn:active { background:#f1f3f5; }

.sidebar { background:#ffffff; border-right:1px solid #e8eaed; }
.sidebar-title { color:#1f2430; }
.nav-section-title { color:#9aa0ac; }
.dnav { color:#5b6472; }
.dnav .dnav-ic { color:#8a92a0; }
.dnav:hover { background:#f6f7f8; color:#1f2430; }
.dnav:hover .dnav-ic { color:#5b6472; }
.dnav.active { background:#fbeaec; color:#c1272d; }
.dnav.active .dnav-ic { color:#c1272d; }
.sidebar-foot { border-top:1px solid #e8eaed; }
.drawer-user .du-name { color:#1f2430; }
.drawer-user .du-email { color:#8a92a0; }
.sidebar-foot .btn-ghost { background:#fff; border-color:#e0e3e8; color:#5b6472; }
.sidebar-foot .btn-ghost:hover { background:#f6f7f8; color:#1f2430; }

.login-card .logo .mark { background:#c1272d; }

/* ---- Attrition report ---- */
.two-col-attr { display:grid; grid-template-columns:1.2fr 1fr; gap:18px; margin:18px 0; }
.three-col-attr { display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; margin:18px 0; }
@media (max-width: 980px) {
  .two-col-attr, .three-col-attr { grid-template-columns:1fr; }
}
.dim-card {
  padding:14px 16px; border:1px solid var(--border); border-radius:10px;
  background:#fff;
}
.dim-card .card-title { font-size:13.5px; font-weight:700; margin:0 0 6px; }
.dim-card .card-sub { font-size:12px; color:var(--text-soft); margin:0 0 12px; }
.dim-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:7px 0; border-top:1px solid var(--border); font-size:12.5px;
}
.dim-row:first-of-type { border-top:none; padding-top:0; }
.dim-row .name { color:var(--text); font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.dim-row .nums { display:flex; gap:14px; align-items:center; color:var(--text-soft); white-space:nowrap; }
.dim-row .nums b { color:var(--text); }
.dim-row .pct { color:var(--red-fg); font-weight:700; font-size:13px; margin-left:14px; }

/* time-to-leave bar chart */
.attr-bar-chart { display:flex; flex-direction:column; gap:9px; }
.attr-bar-row { display:grid; grid-template-columns:130px 1fr 90px; align-items:center; gap:10px; }
.attr-bar-label { font-size:12.5px; color:var(--text); font-weight:600; }
.attr-bar-track { height:18px; background:var(--surface-2); border-radius:5px; overflow:hidden; }
.attr-bar-fill { height:100%; border-radius:5px; }
.attr-bar-fill.crit { background:var(--red-fg); }
.attr-bar-fill.warn { background:var(--amber-fg); }
.attr-bar-fill.fine { background:var(--blue-fg); }
.attr-bar-fill.ok { background:var(--green-fg); }
.attr-bar-meta { font-size:12px; color:var(--text-soft); text-align:right; white-space:nowrap; }
.attr-bar-meta b { color:var(--text); font-size:13px; }

/* cohort heatmap */
.attr-cohort {
  display:grid; grid-template-columns:120px repeat(5, 1fr); gap:1px;
  background:var(--border); border-radius:10px; overflow:hidden; border:1px solid var(--border);
  font-size:12.5px;
}
.attr-cohort > div { background:#fff; padding:9px 12px; }
.attr-cohort .h { background:var(--surface); font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:var(--text-soft); }
.attr-cohort .month { font-weight:700; color:var(--text); }
.attr-cohort .cell { text-align:center; font-weight:700; }
.attr-cohort .cell.c100 { background:#137a47; color:#fff; }
.attr-cohort .cell.c80 { background:#7ec5a3; color:#fff; }
.attr-cohort .cell.c60 { background:#e7b95a; color:var(--text); }
.attr-cohort .cell.c40 { background:#e08163; color:#fff; }
.attr-cohort .cell.c20 { background:#c0314a; color:#fff; }

/* leakage rows in the detail table */
.appr-table tbody tr.attr-leak td { background:#fff5f6; }
.appr-table tbody tr.attr-leak td:first-child { box-shadow:inset 3px 0 0 var(--red-fg); padding-left:18px; }

/* ---------- Info-icon tooltips on KPI tiles (v54f) ---------- */
.tip-i {
  display:inline-flex; align-items:center; justify-content:center;
  width:15px; height:15px; border-radius:50%;
  background:rgba(0,0,0,.08); color:var(--text-soft);
  font-size:9.5px; font-weight:700;
  font-family:Georgia,'Times New Roman',serif; font-style:italic;
  cursor:help; vertical-align:middle; position:relative;
  user-select:none; flex-shrink:0;
  text-transform:none; letter-spacing:0;
  transition:background .15s, color .15s;
}
.tip-i:hover, .tip-i:focus { background:var(--text); color:#fff; outline:none; }
.tip-i:hover::after, .tip-i:focus::after {
  content:attr(data-tip);
  position:absolute; top:calc(100% + 10px); left:50%;
  transform:translateX(-50%);
  width:250px; max-width:78vw;
  background:#1f1f1f; color:#fff;
  font:400 12px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-style:normal; letter-spacing:0; text-transform:none;
  padding:10px 13px; border-radius:7px;
  box-shadow:0 8px 28px rgba(0,0,0,.25);
  text-align:left; white-space:normal;
  z-index:1000; pointer-events:none;
}
.tip-i:hover::before, .tip-i:focus::before {
  content:""; position:absolute;
  top:calc(100% + 3px); left:50%;
  transform:translateX(-50%);
  border:7px solid transparent; border-bottom-color:#1f1f1f;
  z-index:1001; pointer-events:none;
}

/* ---------- View page headers (v57 mobile pass) ----------
   Pattern: title + sub-text on the left, sync label + refresh button (or
   any controls) on the right. On desktop: side by side. On mobile: stacked
   so the title gets full width and never collapses into a narrow column. */
.view-head { display:flex; align-items:flex-start; flex-wrap:wrap; gap:14px; margin-bottom:14px; }
.view-head .vh-titles { min-width:0; flex:1 1 240px; }
.view-head .vh-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
@media (max-width:640px){
  .view-head { gap:10px; }
  .view-head .vh-titles { flex:1 1 100%; min-width:100%; }
  .view-head .vh-actions { flex:1 1 100%; justify-content:flex-start; }
  .view-head .vh-actions .btn-sm { padding:8px 13px; }
}

/* Filter toolbar — each filter group gets its own line on mobile so
   labels and controls don't squeeze into a single narrow row. */
.view-toolbar { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin:14px 0 6px; padding:4px 0; }
.view-toolbar .vt-filter { display:flex; align-items:center; gap:8px; }
.view-toolbar .vt-filter > span { font-size:13px; color:var(--text-soft); white-space:nowrap; }
.view-toolbar .vt-filter select,
.view-toolbar .vt-filter input { padding:7px 11px; border:1px solid var(--border); border-radius:8px; font:inherit; background:#fff; }
@media (max-width:640px){
  .view-toolbar { gap:10px; flex-direction:column; align-items:stretch; }
  .view-toolbar .vt-filter { width:100%; justify-content:space-between; flex-wrap:wrap; }
  .view-toolbar .vt-filter select { flex:1 1 auto; min-width:0; }
  .view-toolbar .vt-filter input[type="number"] { width:70px; flex:0 0 auto; }
}

/* Shared-masters lock bar (common across apps) */
.lockbar{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-soft);background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:9px 13px;margin:0 0 14px}
.lockbar .lk-ic{font-style:normal}
.lockbar a{margin-left:auto;color:var(--primary);font-weight:600;white-space:nowrap;text-decoration:none}

/* ---------- Dashboard v79 — combined panels ---------- */
.seg-tabs { display:inline-flex; background:var(--surface-2); border-radius:999px; padding:3px; gap:2px; flex-wrap:wrap; }
.seg-tab { background:none; border:none; cursor:pointer; font:inherit; font-size:12.5px; padding:5px 12px; border-radius:999px; color:var(--text-soft); }
.seg-tab.on { background:var(--surface); color:var(--text); font-weight:600; box-shadow:0 0 0 1px var(--border); }
.seg-tab:hover:not(.on) { color:var(--text); }
.dash-search { padding:8px 12px; font:inherit; font-size:13px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); min-width:180px; max-width:240px; flex:0 1 auto; }
.dash-search:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.dash-expander { background:none; border:none; cursor:pointer; font:inherit; font-size:12.5px; color:var(--primary); padding:8px 0 0; display:inline-flex; align-items:center; gap:4px; font-weight:600; }
.dash-expander:hover { text-decoration:underline; }
@media (max-width:640px){
  .seg-tab { font-size:12px; padding:5px 10px; }
  .dash-search { width:100%; max-width:100%; }
}

/* ---------- Drill-down full-screen view (v80) ---------- */
.btn-ghost-link { background:none; border:none; cursor:pointer; padding:0; font:inherit; font-size:13px; color:var(--text-soft); display:inline-flex; align-items:center; gap:6px; }
.btn-ghost-link:hover { color:var(--text); }
.btn-ghost-link .ti { font-size:14px; }
.drill-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:14px 0 16px; }
.drill-search { flex:1 1 240px; min-width:200px; padding:10px 13px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); font:inherit; font-size:14px; color:var(--text); }
.drill-search:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.drill-filter { padding:9px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); font:inherit; font-size:13.5px; color:var(--text); cursor:pointer; }
.drill-filter:focus { outline:none; border-color:var(--primary); }
.drill-group-hd { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--text-faint); margin:18px 0 8px; padding-bottom:4px; border-bottom:1px solid var(--border); }
.drill-group-hd:first-child { margin-top:0; }
.drill-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:10px; margin-bottom:6px; }
.drill-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; cursor:pointer; transition:background .12s, border-color .12s; }
.drill-card:hover { background:var(--surface-2); border-color:var(--text-faint); }
.drill-card .dc-name { font-weight:600; font-size:14.5px; }
.drill-card .dc-meta { font-size:12.5px; color:var(--text-soft); margin-top:3px; line-height:1.45; }
.drill-footer { display:flex; justify-content:space-between; align-items:center; padding:18px 0 4px; border-top:1px solid var(--border); margin-top:18px; font-size:13px; color:var(--text-soft); flex-wrap:wrap; gap:12px; }
.drill-pager { display:flex; align-items:center; gap:14px; }
.drill-page-btn { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); width:32px; height:32px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; color:var(--text); }
.drill-page-btn:hover:not(:disabled) { background:var(--surface-2); }
.drill-page-btn:disabled { opacity:.35; cursor:not-allowed; }
.drill-page-now { font-weight:600; color:var(--text); }
@media (max-width:640px){
  .drill-search { flex:1 1 100%; min-width:0; }
  .drill-filter { flex:1 1 calc(50% - 5px); min-width:0; }
  .drill-cards { grid-template-columns:1fr; }
}

/* ---------- Candidates Kanban (v81, desktop only) ---------- */
.kanban-board { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; -webkit-overflow-scrolling:touch; }
.kcol { flex:1 1 200px; min-width:200px; max-width:260px; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:12px; display:flex; flex-direction:column; transition:background .15s, border-color .15s; }
.kcol.dragover { background:var(--primary-soft); border-color:var(--primary); border-style:dashed; }
.kcol-hd { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; padding:0 2px; font-size:13px; font-weight:700; color:var(--text); }
.kcol-name { display:flex; align-items:center; gap:6px; min-width:0; }
.kcol-name .stage-ic { width:14px; height:14px; }
.kcol-ct { background:var(--surface); padding:2px 9px; border-radius:999px; font-size:11px; font-weight:600; color:var(--text-soft); border:1px solid var(--border); }
.kcol-body { display:flex; flex-direction:column; gap:8px; min-height:60px; }
.kcard { display:flex; gap:9px; align-items:flex-start; padding:10px 11px; background:var(--surface); border:1px solid var(--border); border-radius:8px; cursor:pointer; transition:transform .08s, box-shadow .12s, border-color .12s; }
.kcard:hover { border-color:var(--text-faint); box-shadow:0 2px 6px rgba(20,25,50,.06); }
.kcard[draggable="true"]:not(.dragging) { cursor:grab; }
.kcard[draggable="true"]:active { cursor:grabbing; }
.kcard.dragging { opacity:.4; }
.kc-avatar { width:28px; height:28px; border-radius:50%; background:var(--blue-bg); color:var(--blue-fg); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:11px; flex:none; }
.kc-main { min-width:0; flex:1; }
.kc-nm { font-weight:600; font-size:13.5px; line-height:1.25; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kc-meta { font-size:11.5px; color:var(--text-soft); margin-top:3px; line-height:1.4; }
.kexp { background:none; border:none; padding:8px 0 2px; font:inherit; font-size:12px; color:var(--primary); cursor:pointer; font-weight:600; text-align:center; display:inline-flex; align-items:center; justify-content:center; gap:4px; }
.kexp:hover { text-decoration:underline; }
.kempty { color:var(--text-faint); font-size:12px; padding:14px 6px; text-align:center; font-style:italic; }

/* ---------- Dashboard polish v82 — bars + funnel pills ---------- */
.dash-bars { display:flex; flex-direction:column; }
.dash-bar-row { display:grid; grid-template-columns: 1fr 160px 44px; align-items:center; gap:14px; padding:11px 0; }
.dash-bar-row + .dash-bar-row { border-top:1px solid var(--border); }
.dbr-label { font-size:14px; color:var(--text); font-weight:500; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dbr-track { background:var(--surface-2); border-radius:999px; height:8px; overflow:hidden; }
.dbr-fill { height:100%; background:var(--primary); border-radius:999px; transition:width .4s ease; min-width:6px; }
.dbr-val { font-weight:700; font-size:15px; text-align:right; color:var(--text); letter-spacing:-.2px; }
.dash-funrows { display:flex; flex-direction:column; }
.dash-fun-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; gap:14px; flex-wrap:wrap; }
.dash-fun-row + .dash-fun-row { border-top:1px solid var(--border); }
.dfr-label { font-size:14px; font-weight:500; color:var(--text); min-width:0; }
.dfr-stats { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.dfr-stat { font-size:12.5px; padding:4px 11px; background:var(--surface-2); border-radius:999px; color:var(--text-soft); border:1px solid var(--border); }
.dfr-stat strong { font-weight:700; color:var(--text); margin-right:3px; }
.dfr-stat.green { background:var(--green-bg); color:var(--green-fg); border-color:transparent; }
.dfr-stat.green strong { color:var(--green-fg); }
.dfr-stat.red { background:var(--red-bg); color:var(--red-fg); border-color:transparent; }
.dfr-stat.red strong { color:var(--red-fg); }
@media (max-width:640px){
  .dash-bar-row { grid-template-columns: 1fr 70px 36px; gap:10px; padding:9px 0; }
  .dbr-label { font-size:13.5px; }
  .dbr-val { font-size:14px; }
  .dfr-stat { font-size:12px; padding:3px 9px; }
}

/* ---------- Reports breakdown select wrapper (v84) ---------- */
.rpt-bd-select { display:inline-flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:5px 10px 5px 12px; font-size:12.5px; color:var(--text-soft); }
.rpt-bd-select select { font:inherit; font-size:13px; font-weight:600; color:var(--text); border:none; background:transparent; cursor:pointer; padding:3px 4px 3px 0; }
.rpt-bd-select select:focus { outline:none; }

/* Common Access screen skeleton (shared standard) */
.acc-table{width:100%;border-collapse:collapse}
.acc-table thead th{font-size:11px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--text-faint);text-align:left;padding:11px 14px;border-bottom:1px solid var(--border)}
.acc-table td{padding:11px 14px;border-bottom:1px solid var(--border);vertical-align:middle}
.acc-table tbody tr:last-child td{border-bottom:none}
.acc-table tr.dim{opacity:.5}
.acc-nm{font-weight:600;font-size:13.5px}
.acc-em{font-size:12px;color:var(--text-faint)}
.acc-pill{display:inline-block;font-size:12px;font-weight:600;background:var(--gray-bg);color:var(--gray-fg);border-radius:20px;padding:3px 11px}
.acc-st{font-size:11px;font-weight:600;padding:2px 10px;border-radius:20px}
.acc-st.on{background:var(--green-bg);color:var(--green-fg)}
.acc-st.off{background:var(--gray-bg);color:var(--gray-fg)}
