/* ============================================
   Pansro Tech — HR Admin System Styles
   Extends css/styles.css design tokens
   ============================================ */

/* === HR LAYOUT === */
.hr-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* === SIDEBAR === */
.hr-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: #0a0a0a;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform .35s cubic-bezier(.77,0,.175,1);
  overflow-y: auto;
  overflow-x: hidden;
}
.hr-sidebar::-webkit-scrollbar { width: 3px; }
.hr-sidebar::-webkit-scrollbar-thumb { background: rgba(249,115,22,.2); border-radius: 10px; }

.hr-sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hr-sidebar-logo a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.hr-sidebar-logo .badge-hr {
  font-size: 9px; font-weight: 700; letter-spacing: .1em;
  background: rgba(249,115,22,.15); border: 1px solid rgba(249,115,22,.3);
  color: var(--orange); border-radius: 4px; padding: 2px 6px;
  text-transform: uppercase; margin-top: 2px;
}

.hr-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hr-nav-section {
  margin-bottom: 6px;
}
.hr-nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3);
  padding: 10px 10px 6px;
}
.hr-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  transition: background .2s, color .2s;
  position: relative;
}
.hr-nav-link svg { flex-shrink: 0; opacity: .7; transition: opacity .2s; }
.hr-nav-link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.hr-nav-link:hover svg { opacity: 1; }
.hr-nav-link.active {
  background: rgba(249,115,22,.1);
  color: var(--orange);
  font-weight: 600;
}
.hr-nav-link.active svg { opacity: 1; }
.hr-nav-link.active::before {
  content: '';
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 2px 2px 0;
  background: var(--orange);
}
.hr-nav-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  background: var(--orange); color: white;
  border-radius: 9px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.hr-sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.hr-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s, border-color .2s;
  text-decoration: none;
}
.hr-user-card:hover { background: rgba(255,255,255,.06); border-color: rgba(249,115,22,.2); }
.hr-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg,rgba(249,115,22,.38),rgba(251,146,60,.18));
  border: 1.5px solid rgba(249,115,22,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--orange-l);
  flex-shrink: 0;
}
.hr-user-info { flex: 1; min-width: 0; }
.hr-user-name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-user-role { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* === MAIN CONTENT === */
.hr-main {
  margin-left: 248px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* === TOPBAR === */
.hr-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(8,8,8,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-shrink: 0;
}
.hr-page-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.hr-breadcrumb {
  font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.hr-breadcrumb a { color: var(--text-3); text-decoration: none; transition: color .2s; }
.hr-breadcrumb a:hover { color: var(--orange); }
.hr-topbar-actions { display: flex; align-items: center; gap: 10px; }

.hr-menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-2); padding: 6px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.hr-menu-toggle:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* === HR CONTENT AREA === */
.hr-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* === STAT CARDS === */
.hr-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.hr-stat-card {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color .3s, background .3s;
}
.hr-stat-card:hover { border-color: rgba(249,115,22,.22); background: rgba(249,115,22,.03); }
.hr-stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.18);
}
.hr-stat-icon.blue { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.18); }
.hr-stat-icon.green { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.18); }
.hr-stat-icon.purple { background: rgba(168,85,247,.12); border-color: rgba(168,85,247,.18); }
.hr-stat-icon.red { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.18); }
.hr-stat-value {
  font-size: 2rem; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg,#f97316,#fb923c);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 4px;
}
.hr-stat-value.blue { background: linear-gradient(135deg,#6366f1,#818cf8); -webkit-background-clip: text; background-clip: text; }
.hr-stat-value.green { background: linear-gradient(135deg,#22c55e,#4ade80); -webkit-background-clip: text; background-clip: text; }
.hr-stat-value.purple { background: linear-gradient(135deg,#a855f7,#c084fc); -webkit-background-clip: text; background-clip: text; }
.hr-stat-value.red { background: linear-gradient(135deg,#ef4444,#f87171); -webkit-background-clip: text; background-clip: text; }
.hr-stat-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.hr-stat-trend { font-size: 11px; color: #22c55e; margin-top: 6px; font-weight: 500; }
.hr-stat-trend.down { color: #ef4444; }

/* === DATA TABLE === */
.hr-table-wrap {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.hr-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.hr-table-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.hr-table-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hr-table th {
  padding: 11px 16px; text-align: left;
  color: var(--text-3); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.02); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.hr-table th:first-child { padding-left: 20px; }
.hr-table th:last-child { padding-right: 20px; }
.hr-table td {
  padding: 13px 16px; color: var(--text-2);
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.hr-table td:first-child { padding-left: 20px; }
.hr-table td:last-child { padding-right: 20px; }
.hr-table tr:last-child td { border-bottom: none; }
.hr-table tr { transition: background .2s; }
.hr-table tr:hover td { background: rgba(255,255,255,.025); }
.hr-table .td-main { color: var(--text); font-weight: 600; }
.hr-table .td-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.hr-table-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

/* === SEARCH & FILTER BAR === */
.hr-search-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.01);
}
.hr-search-wrap {
  position: relative;
  flex: 1; min-width: 200px;
}
.hr-search-wrap svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.hr-search-input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px 8px 34px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
  caret-color: var(--orange);
}
.hr-search-input::placeholder { color: var(--text-3); }
.hr-search-input:focus { border-color: rgba(249,115,22,.4); background: rgba(249,115,22,.04); }
.hr-select {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  transition: border-color .2s, background-color .2s;
  color-scheme: dark;
}
.hr-select:focus { border-color: rgba(249,115,22,.4); outline: none; }
.hr-select option { background: #1a1a1a; color: #f8fafc; }

/* === BUTTONS === */
.hr-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap; font-family: inherit;
}
.hr-btn:hover { transform: translateY(-1px); }
.hr-btn:active { transform: translateY(0); }
.hr-btn-primary {
  background: linear-gradient(135deg,#f97316,#ea580c);
  color: white;
}
.hr-btn-primary:hover { box-shadow: 0 6px 20px rgba(249,115,22,.38); }
.hr-btn-ghost {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.hr-btn-ghost:hover { border-color: rgba(249,115,22,.3); color: var(--text); background: rgba(255,255,255,.07); }
.hr-btn-danger {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  color: #f87171;
}
.hr-btn-danger:hover { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.4); }
.hr-btn-success {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.2);
  color: #4ade80;
}
.hr-btn-success:hover { background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.4); }
.hr-btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.hr-btn-icon {
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); color: var(--text-2);
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.hr-btn-icon:hover { background: rgba(255,255,255,.08); border-color: rgba(249,115,22,.3); color: var(--orange); }

/* === BADGES / STATUS PILLS === */
.hr-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.hr-badge-orange { background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.2); color: var(--orange-l); }
.hr-badge-blue { background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.2); color: #a5b4fc; }
.hr-badge-green { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.2); color: #4ade80; }
.hr-badge-red { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.2); color: #f87171; }
.hr-badge-yellow { background: rgba(234,179,8,.12); border: 1px solid rgba(234,179,8,.2); color: #fde047; }
.hr-badge-purple { background: rgba(168,85,247,.12); border: 1px solid rgba(168,85,247,.2); color: #c084fc; }
.hr-badge-gray { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: var(--text-2); }
.hr-badge-teal { background: rgba(20,184,166,.12); border: 1px solid rgba(20,184,166,.2); color: #2dd4bf; }
.hr-badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}

/* === CARDS === */
.hr-card {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color .3s;
}
.hr-card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.hr-card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.hr-card-body { padding: 20px; }

/* === MODAL === */
.hr-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.hr-modal-overlay.open { opacity: 1; pointer-events: auto; }
.hr-modal {
  background: #0e0e0e;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  width: 100%; max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  flex-shrink: 0;
}
.hr-modal-overlay.open .hr-modal { transform: none; }
.hr-modal-lg { max-width: 800px; }
.hr-modal-xl { max-width: 960px; }
.hr-modal-header {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0;
  background: #0e0e0e; z-index: 1;
  border-radius: 18px 18px 0 0;
}
.hr-modal-title { font-size: 16px; font-weight: 700; color: var(--text); }
.hr-modal-body { padding: 24px; }
.hr-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}

/* === FORM ROWS === */
.hr-form-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.hr-form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.hr-form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media(max-width:600px) {
  .hr-form-grid.cols-2, .hr-form-grid.cols-3 { grid-template-columns: 1fr; }
}
.hr-form-group { display: flex; flex-direction: column; gap: 7px; }
.hr-form-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  letter-spacing: .02em;
}
.hr-form-label span.req { color: var(--orange); margin-left: 2px; }
.hr-form-help { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* === PIPELINE / KANBAN === */
.hr-pipeline {
  display: flex; gap: 16px;
  overflow-x: auto; padding-bottom: 16px;
}
.hr-pipeline::-webkit-scrollbar { height: 5px; }
.hr-pipeline::-webkit-scrollbar-thumb { background: rgba(249,115,22,.2); border-radius: 10px; }
.hr-pipeline-col {
  flex-shrink: 0;
  width: 240px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.hr-pipeline-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0;
  background: rgba(255,255,255,.03);
}
.hr-pipeline-col-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-2);
  display: flex; align-items: center; gap: 7px;
}
.hr-pipeline-col-count {
  min-width: 20px; height: 20px; border-radius: 10px;
  background: rgba(255,255,255,.08); color: var(--text-2);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
}
.hr-pipeline-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.hr-pipeline-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.hr-pipeline-card:hover {
  border-color: rgba(249,115,22,.3);
  background: rgba(249,115,22,.04);
  transform: translateY(-2px);
}
.hr-pipeline-card-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.hr-pipeline-card-role { font-size: 11.5px; color: var(--text-3); margin-bottom: 8px; }
.hr-pipeline-card-meta { display: flex; align-items: center; justify-content: space-between; }

/* === KANBAN STAGE COLORS === */
.stage-applied .hr-pipeline-col-title { color: var(--text-2); }
.stage-applied .hr-pipeline-col { border-color: rgba(255,255,255,.08); }
.stage-screening .hr-pipeline-col-title { color: #fde047; }
.stage-screening .hr-pipeline-col { border-color: rgba(234,179,8,.18); }
.stage-interview1 .hr-pipeline-col-title { color: #a5b4fc; }
.stage-interview1 .hr-pipeline-col { border-color: rgba(99,102,241,.18); }
.stage-interview2 .hr-pipeline-col-title { color: #c084fc; }
.stage-interview2 .hr-pipeline-col { border-color: rgba(168,85,247,.18); }
.stage-test .hr-pipeline-col-title { color: #2dd4bf; }
.stage-test .hr-pipeline-col { border-color: rgba(20,184,166,.18); }
.stage-offer .hr-pipeline-col-title { color: var(--orange-l); }
.stage-offer .hr-pipeline-col { border-color: rgba(249,115,22,.28); }
.stage-hired .hr-pipeline-col-title { color: #4ade80; }
.stage-hired .hr-pipeline-col { border-color: rgba(34,197,94,.28); }
.stage-rejected .hr-pipeline-col-title { color: #f87171; }
.stage-rejected .hr-pipeline-col { border-color: rgba(239,68,68,.18); }

/* === EMPLOYEE ID BADGE === */
.emp-id-badge {
  font-family: 'Courier New', monospace;
  font-size: 12px; font-weight: 700;
  background: rgba(249,115,22,.08);
  border: 1px solid rgba(249,115,22,.2);
  color: var(--orange-l);
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: .08em;
}

/* === SURVEY ID BADGE === */
.survey-id-badge {
  font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 700;
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.2);
  color: #a5b4fc;
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: .06em;
}

/* === ACTIVITY FEED === */
.hr-activity-feed { display: flex; flex-direction: column; gap: 0; }
.hr-activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.hr-activity-item:last-child { border-bottom: none; }
.hr-activity-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(249,115,22,.1);
  color: var(--orange);
}
.hr-activity-text { flex: 1; }
.hr-activity-title { font-size: 13px; color: var(--text); font-weight: 500; line-height: 1.45; }
.hr-activity-time { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* === RATING STARS === */
.hr-rating { display: flex; gap: 2px; }
.hr-rating-star { color: rgba(255,255,255,.15); font-size: 14px; cursor: pointer; transition: color .15s; }
.hr-rating-star.filled { color: #fbbf24; }
.hr-rating-star:hover ~ .hr-rating-star,
.hr-rating:hover .hr-rating-star { color: rgba(255,255,255,.15); }
.hr-rating:hover .hr-rating-star:hover,
.hr-rating:hover .hr-rating-star:hover ~ .hr-rating-star { color: rgba(255,255,255,.15); }
.hr-rating:hover .hr-rating-star { color: #fbbf24; }
.hr-rating .hr-rating-star:hover ~ .hr-rating-star { color: rgba(255,255,255,.15); }

/* === PROGRESS BAR === */
.hr-progress {
  height: 6px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden;
}
.hr-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg,#f97316,#fb923c);
  transition: width .6s var(--ease);
}
.hr-progress-fill.blue { background: linear-gradient(90deg,#6366f1,#818cf8); }
.hr-progress-fill.green { background: linear-gradient(90deg,#22c55e,#4ade80); }

/* === TABS === */
.hr-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 20px; }
.hr-tab-btn {
  padding: 12px 16px;
  background: none; border: none;
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.hr-tab-btn:hover { color: var(--text); }
.hr-tab-btn.active { color: var(--orange); border-color: var(--orange); font-weight: 600; }
.hr-tab-content { display: none; }
.hr-tab-content.active { display: block; }

/* === ALERT BANNERS === */
.hr-alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  line-height: 1.5; margin-bottom: 16px;
}
.hr-alert-warning { background: rgba(234,179,8,.08); border: 1px solid rgba(234,179,8,.2); color: #fde047; }
.hr-alert-danger { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: #fca5a5; }
.hr-alert-info { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); color: #a5b4fc; }
.hr-alert-success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.2); color: #86efac; }

/* === TOAST NOTIFICATIONS === */
#hr-toasts {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.hr-toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px; border-radius: 12px; min-width: 280px; max-width: 360px;
  background: #131313; border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 36px rgba(0,0,0,.6);
  pointer-events: auto;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
  font-size: 13.5px; font-weight: 500; color: var(--text);
}
.hr-toast.removing { animation: toastOut .25s ease forwards; }
.hr-toast-icon { flex-shrink: 0; margin-top: 1px; }
.hr-toast-text { flex: 1; }
.hr-toast-title { font-weight: 700; color: var(--text); }
.hr-toast-msg { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.hr-toast.success { border-color: rgba(34,197,94,.3); }
.hr-toast.success .hr-toast-icon { color: #4ade80; }
.hr-toast.error { border-color: rgba(239,68,68,.3); }
.hr-toast.error .hr-toast-icon { color: #f87171; }
.hr-toast.warning { border-color: rgba(234,179,8,.3); }
.hr-toast.warning .hr-toast-icon { color: #fde047; }
.hr-toast.info { border-color: rgba(99,102,241,.3); }
.hr-toast.info .hr-toast-icon { color: #a5b4fc; }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: none; } }
@keyframes toastOut { to { opacity:0; transform: translateX(10px); height:0; margin:0; padding:0; } }

/* === LOGIN PAGE === */
.hr-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(rgba(249,115,22,.06) 1px,transparent 1px);
  background-size: 32px 32px;
  padding: 24px;
  position: relative;
}
.hr-login-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  padding: 40px 36px;
  width: 100%; max-width: 440px;
  position: relative; z-index: 1;
}

/* === DETAIL VIEW === */
.hr-detail-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr 320px;
}
@media(max-width:1024px){ .hr-detail-grid { grid-template-columns: 1fr; } }
.hr-profile-header {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.hr-profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg,rgba(249,115,22,.38),rgba(251,146,60,.18));
  border: 2px solid rgba(249,115,22,.3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px; color: var(--orange-l);
  flex-shrink: 0;
}
.hr-info-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr 1fr;
  padding: 20px;
}
@media(max-width:640px){ .hr-info-grid { grid-template-columns: 1fr; } }
.hr-info-item {}
.hr-info-key { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.hr-info-value { font-size: 13.5px; color: var(--text); font-weight: 500; }

/* === DASHBOARD CHARTS (CSS-based) === */
.hr-chart-bar-wrap { display: flex; flex-direction: column; gap: 10px; }
.hr-chart-bar-row { display: flex; align-items: center; gap: 10px; }
.hr-chart-bar-label { font-size: 12px; color: var(--text-2); width: 110px; flex-shrink: 0; }
.hr-chart-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.hr-chart-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg,#f97316,#fb923c); transition: width .8s var(--ease); }
.hr-chart-bar-val { font-size: 12px; font-weight: 600; color: var(--text-2); width: 28px; text-align: right; flex-shrink: 0; }

/* === RESPONSIVE === */
@media(max-width: 1024px) {
  .hr-sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 32px rgba(0,0,0,.6);
  }
  .hr-sidebar.open { transform: translateX(0); }
  .hr-main { margin-left: 0; }
  .hr-menu-toggle { display: flex; align-items: center; justify-content: center; }
  .hr-content { padding: 20px 16px; }
}
@media(max-width: 640px) {
  .hr-topbar { padding: 0 16px; }
  .hr-content { padding: 16px; }
  .hr-stats-grid { grid-template-columns: 1fr 1fr; }
  .hr-modal { border-radius: 14px; }
  .hr-login-card { padding: 28px 20px; }
}
@media(max-width: 400px) {
  .hr-stats-grid { grid-template-columns: 1fr; }
}

/* === SIDEBAR OVERLAY (mobile) === */
.hr-sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 49;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}
.hr-sidebar-overlay.open { display: block; }

/* === INACTIVITY ALERT === */
.inactivity-flag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.25);
  font-size: 10.5px; font-weight: 700; color: #f87171;
  text-transform: uppercase; letter-spacing: .06em;
  animation: blink 2.5s ease infinite;
}

/* === LEAVE CALENDAR === */
.hr-calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.hr-cal-day-name { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 8px 4px; text-align: center; }
.hr-cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 12px; color: var(--text-2);
  cursor: pointer; transition: background .2s, color .2s;
  position: relative;
}
.hr-cal-day:hover { background: rgba(255,255,255,.06); color: var(--text); }
.hr-cal-day.today { background: rgba(249,115,22,.15); color: var(--orange); font-weight: 700; }
.hr-cal-day.on-leave { background: rgba(239,68,68,.12); color: #f87171; }
.hr-cal-day.approved { background: rgba(34,197,94,.12); color: #4ade80; }
.hr-cal-day.pending { background: rgba(234,179,8,.12); color: #fde047; }
.hr-cal-day.other-month { opacity: .3; }

/* === REASSIGNMENT PANEL === */
.reassign-warning {
  background: linear-gradient(135deg, rgba(239,68,68,.06), rgba(249,115,22,.04));
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 12px; padding: 20px;
  margin-bottom: 20px;
}
.reassign-warning h3 { color: #f87171; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.reassign-warning p { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* === LEAD SOURCE TAG === */
.source-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text-2);
}

/* ── LEAD RESEARCH MODULE ─────────────────────────────────────────────────── */
.lr-tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.lr-tab-btn:hover   { color: var(--text); }
.lr-tab-btn.active  { color: var(--orange); border-bottom-color: var(--orange); }

/* Drawer */
.lr-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
}
.lr-drawer-overlay.open { display: block; }
.lr-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(680px, 96vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.lr-drawer.open { transform: translateX(0); }
.lr-drawer-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lr-drawer-company {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.lr-drawer-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.lr-drawer-tabs::-webkit-scrollbar { display: none; }
.lr-dtab {
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.lr-dtab:hover  { color: var(--text); }
.lr-dtab.active { color: var(--orange); border-bottom-color: var(--orange); }
.lr-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.lr-dp { /* default shown */ }

/* Info grid inside drawer */
.lr-info-grid { display: flex; flex-direction: column; gap: 0; }
.lr-info-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,.04));
  align-items: flex-start;
}
.lr-info-label {
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 500;
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 1px;
}
.lr-info-val {
  font-size: 13px;
  color: var(--text);
  flex: 1;
  word-break: break-word;
}
.lr-notes-preview {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,.04));
}

/* Online links grid */
.lr-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 0;
}
.lr-link-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: border-color .15s, background .15s;
}
.lr-link-chip:hover { border-color: var(--orange); background: rgba(249,115,22,.06); }

/* Notes */
.lr-note-composer {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.lr-note-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface-2);
}
.lr-note-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.lr-note-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Timeline */
.lr-timeline { padding: 4px 0; }
.lr-tl-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,.04));
  align-items: flex-start;
}
.lr-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.lr-tl-dot-green  { background: #22c55e; }
.lr-tl-dot-orange { background: #f97316; }
.lr-tl-dot-blue   { background: #3b82f6; }
.lr-tl-dot-purple { background: #a855f7; }
.lr-tl-dot-teal   { background: #14b8a6; }
.lr-tl-dot-gray   { background: #6b7280; }
.lr-tl-type  { font-size: 12.5px; font-weight: 600; color: var(--text); }
.lr-tl-desc  { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.lr-tl-meta  { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.lr-tl-content { flex: 1; }

/* Assignment history */
.lr-hist-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,.04));
  align-items: flex-start;
}
.lr-hist-idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3, var(--surface-2));
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lr-hist-body { flex: 1; }
.lr-hist-title  { font-size: 13px; font-weight: 500; color: var(--text); }
.lr-hist-meta   { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.lr-hist-reason { font-size: 12px; color: var(--text-2); margin-top: 4px; font-style: italic; }

/* Count badge in drawer tab */
.lr-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Form sections */
.lr-form-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.lr-form-section:last-of-type { border-bottom: none; }
.lr-form-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: 14px;
}

/* Stat card colours */
.lr-stat-val-blue   { color: #3b82f6; }
.lr-stat-val-purple { color: #a855f7; }
.lr-stat-val-yellow { color: #eab308; }
.lr-stat-val-green  { color: #22c55e; }

/* Analytics grid */
.lr-analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .lr-analytics-row { grid-template-columns: 1fr; }
  .lr-link-grid { grid-template-columns: 1fr; }
  .lr-drawer { width: 100vw; }
}
