#employees-workspace { width: 100%; min-width: 0; color: #0f172a; }
#employees-workspace, #employees-workspace * { box-sizing: border-box; }
.employees-page { width: 100%; min-width: 0; padding: 0 0 56px; }

.employees-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: -16px -16px 0; padding: 26px 28px 24px; color: #fff; background: radial-gradient(circle at 88% -30%, rgba(59,130,246,.72), transparent 38%), linear-gradient(120deg, #0f172a 0%, #172554 68%, #1d4ed8 145%); border-bottom: 1px solid rgba(255,255,255,.1); }
.employees-hero > div:first-child { min-width: 0; }
.employees-hero > div:first-child > span { display: block; margin-bottom: 5px; color: #93c5fd; font-size: 11px; line-height: 1.2; font-weight: 850; letter-spacing: .105em; }
.employees-hero h1 { margin: 0; font-size: clamp(27px, 3vw, 39px); line-height: 1.06; letter-spacing: -.04em; }
.employees-hero p { max-width: 650px; margin: 9px 0 0; color: #cbd5e1; font-size: 14px; line-height: 1.5; }
.employees-hero-actions { display: flex; flex: 0 1 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; }
.employees-hero-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: 0 15px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: #e2e8f0; background: rgba(15,23,42,.28); font-size: 12px; font-weight: 750; text-decoration: none; transition: .18s ease; }
.employees-hero-actions a:first-child { color: #0f172a; background: #fff; }
.employees-hero-actions a:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.45); }

.employees-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.employees-overview > div { position: relative; min-width: 0; min-height: 104px; padding: 16px 17px; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.035); }
.employees-overview small { display: block; color: #64748b; font-size: 10px; font-weight: 800; letter-spacing: .055em; }
.employees-overview b { display: block; margin-top: 7px; font-size: 27px; line-height: 1; letter-spacing: -.035em; }
.employees-overview span { display: block; margin-top: 7px; overflow-wrap: anywhere; color: #64748b; font-size: 11px; line-height: 1.35; }
.employees-overview > div > i { position: absolute; right: 17px; bottom: 15px; left: 17px; height: 5px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.employees-overview > div > i > em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #10b981); }

.employees-notice { margin: 0 0 12px; padding: 11px 14px; border: 1px solid; border-radius: 10px; font-size: 12px; font-weight: 650; }
.employees-notice.success { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.employees-notice.error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }

.employees-layout { display: grid; grid-template-columns: minmax(210px, 238px) minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; }
.employees-units { position: sticky; top: 12px; min-width: 0; padding: 12px; border: 1px solid #dbe4f0; border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.035); }
.employees-units-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 5px 10px; }
.employees-units-title span, .employees-units-label { color: #94a3b8; font-size: 9px; font-weight: 850; letter-spacing: .09em; }
.employees-units-title b { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; color: #1d4ed8; background: #dbeafe; font-size: 10px; }
.employees-units-label { padding: 15px 6px 7px; }
.employees-unit { position: relative; display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; width: 100%; min-width: 0; margin: 2px 0; padding: 9px 7px; border: 1px solid transparent; border-radius: 10px; color: #334155; text-align: left; background: transparent; cursor: pointer; transition: .15s ease; }
.employees-unit > span { grid-row: 1 / 3; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; color: #64748b; background: #f1f5f9; font-size: 11px; }
.employees-unit b { min-width: 0; overflow: hidden; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.employees-unit small { grid-column: 2; min-width: 0; overflow: hidden; margin-top: 2px; color: #94a3b8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.employees-unit em { grid-column: 3; grid-row: 1 / 3; align-self: center; min-width: 22px; padding: 3px 6px; border-radius: 999px; color: #64748b; background: #f1f5f9; text-align: center; font-size: 9px; font-style: normal; font-weight: 800; }
.employees-unit:hover { border-color: #bfdbfe; background: #f8fbff; }
.employees-unit.active { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; box-shadow: inset 3px 0 #2563eb; }
.employees-unit.active > span, .employees-unit.active em { color: #1d4ed8; background: #dbeafe; }

.employees-main { min-width: 0; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.035); }
.employees-list-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 18px; border-bottom: 1px solid #e2e8f0; }
.employees-list-header > div:first-child { min-width: 150px; }
.employees-list-header > div:first-child > span { color: #2563eb; font-size: 9px; font-weight: 850; letter-spacing: .09em; }
.employees-list-header h2 { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
.employees-list-header p { margin: 4px 0 0; color: #64748b; font-size: 10px; }
.employees-list-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; }
.employees-list-controls > label { display: flex; align-items: center; gap: 6px; width: min(235px, 100%); min-height: 37px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; }
.employees-list-controls > label span { color: #64748b; font-size: 18px; }
.employees-list-controls input { min-width: 0; width: 100%; border: 0; outline: 0; color: #0f172a; background: transparent; font: inherit; font-size: 11px; }
.employees-status-tabs { display: flex; min-width: 0; padding: 3px; border-radius: 9px; background: #f1f5f9; }
.employees-status-tabs button { min-height: 31px; padding: 0 9px; border: 0; border-radius: 7px; color: #64748b; background: transparent; font-size: 10px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.employees-status-tabs button.active { color: #0f172a; background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.employees-status-tabs b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; color: #1d4ed8; background: #dbeafe; font-size: 8px; }

.employees-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); align-items: stretch; gap: 10px; min-width: 0; padding: 13px; }
.employee-card { display: flex; flex-direction: column; min-width: 0; min-height: 238px; padding: 14px; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 13px; color: #0f172a; text-align: left; background: linear-gradient(180deg, #fff, #fbfdff); cursor: pointer; box-shadow: 0 2px 8px rgba(15,23,42,.025); transition: .17s ease; }
.employee-card:hover { transform: translateY(-2px); border-color: #93c5fd; box-shadow: 0 10px 24px rgba(37,99,235,.09); }
.employee-card-head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.employee-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; color: #1d4ed8; background: linear-gradient(135deg, #dbeafe, #e0e7ff); font-size: 11px; font-weight: 850; }
.employee-identity { min-width: 0; flex: 1; }
.employee-identity b, .employee-identity small, .employee-identity em { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-identity b { font-size: 12px; line-height: 1.35; }
.employee-identity small { margin-top: 3px; color: #334155; font-size: 10px; font-weight: 650; }
.employee-identity em { margin-top: 2px; color: #94a3b8; font-size: 9px; font-style: normal; }
.employee-status { flex: 0 0 auto; padding: 4px 6px; border-radius: 999px; font-size: 8px; font-weight: 800; }
.employee-status.active { color: #166534; background: #dcfce7; }
.employee-status.archived { color: #475569; background: #e2e8f0; }
.employee-badges { display: flex; flex-wrap: wrap; gap: 5px; min-height: 23px; margin-top: 10px; }
.employee-badges i { padding: 4px 6px; border-radius: 6px; color: #1d4ed8; background: #eff6ff; font-size: 8px; font-style: normal; font-weight: 750; }
.employee-badges i.warning { color: #9a3412; background: #ffedd5; }
.employee-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.employee-metrics > span { min-width: 0; min-height: 73px; padding: 8px; border-radius: 9px; background: #f8fafc; }
.employee-metrics small, .employee-metrics b, .employee-metrics > span > em { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-metrics small { color: #94a3b8; font-size: 7px; font-weight: 850; letter-spacing: .045em; }
.employee-metrics b { margin-top: 5px; font-size: 13px; }
.employee-metrics > span > em { margin-top: 4px; color: #64748b; font-size: 8px; font-style: normal; }
.employee-metrics > span > i { display: block; height: 4px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.employee-metrics > span > i > em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #10b981); }
.employee-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: auto; padding-top: 11px; border-top: 1px solid #eef2f7; color: #64748b; }
.employee-card-foot > span { min-width: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.employee-card-foot b { flex: 0 0 auto; color: #2563eb; font-size: 18px; }

.employees-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; padding: 30px; text-align: center; }
.employees-empty > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #2563eb; background: #eff6ff; font-size: 24px; }
.employees-empty h3 { margin: 13px 0 4px; font-size: 16px; }
.employees-empty p { max-width: 390px; margin: 0; color: #64748b; font-size: 11px; }
.employees-empty a, .employees-empty button { margin-top: 15px; padding: 9px 13px; border: 0; border-radius: 9px; color: #fff; background: #2563eb; font-size: 11px; font-weight: 750; text-decoration: none; cursor: pointer; }
.employees-empty.standalone { min-height: 480px; }
.employees-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 480px; gap: 10px; color: #64748b; font-size: 12px; }
.employees-loading i { width: 34px; height: 34px; border: 3px solid #dbeafe; border-top-color: #2563eb; border-radius: 50%; animation: employees-spin .8s linear infinite; }
@keyframes employees-spin { to { transform: rotate(360deg); } }

.employees-overlay { position: fixed; z-index: 109; inset: 0; background: rgba(15,23,42,.48); backdrop-filter: blur(2px); }
.employee-drawer { position: fixed; z-index: 110; top: 0; right: 0; display: flex; flex-direction: column; width: min(540px, 100vw); height: 100dvh; overflow: hidden; border-left: 1px solid #cbd5e1; background: #f8fafc; box-shadow: -24px 0 60px rgba(15,23,42,.22); }
.employee-drawer > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; padding: 18px 20px; color: #fff; background: linear-gradient(115deg, #0f172a, #172554); }
.employee-drawer > header > button { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 1px solid #475569; border-radius: 9px; color: #e2e8f0; background: transparent; font-size: 22px; cursor: pointer; }
.employee-drawer-person { display: flex; align-items: center; min-width: 0; gap: 11px; }
.employee-drawer-person > span { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border-radius: 12px; color: #1e3a8a; background: #dbeafe; font-size: 12px; font-weight: 850; }
.employee-drawer-person > div { min-width: 0; }
.employee-drawer-person small { display: block; color: #93c5fd; font-size: 8px; font-weight: 850; letter-spacing: .09em; }
.employee-drawer-person h2 { max-width: 390px; margin: 3px 0 0; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.employee-drawer-person p { margin: 3px 0 0; color: #cbd5e1; font-size: 10px; }
.employee-drawer-scroll { flex: 1; min-height: 0; overflow: auto; padding: 13px; overscroll-behavior: contain; }
.employee-drawer-scroll > section { min-width: 0; margin-bottom: 10px; padding: 14px; border: 1px solid #dbe4f0; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(15,23,42,.025); }
.employee-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.employee-section-title > div { min-width: 0; }
.employee-section-title span { display: block; color: #64748b; font-size: 8px; font-weight: 850; letter-spacing: .085em; }
.employee-section-title h3 { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.25; }
.employee-section-title > em { flex: 0 0 auto; max-width: 44%; padding: 4px 6px; border-radius: 7px; color: #1d4ed8; background: #eff6ff; font-size: 8px; font-style: normal; font-weight: 750; text-align: right; overflow-wrap: anywhere; }
.employee-role-control, .employee-archive-control { display: block; margin-top: 12px; color: #475569; font-size: 9px; font-weight: 750; }
.employee-role-control select, .employee-archive-control textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 9px; color: #0f172a; background: #fff; font: inherit; font-size: 11px; outline: 0; }
.employee-role-control select:focus, .employee-archive-control textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.employee-archive-control textarea { resize: vertical; }
.employee-role-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.employee-role-meta.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.employee-role-meta > span { min-width: 0; padding: 8px; border-radius: 9px; background: #f8fafc; }
.employee-role-meta small, .employee-role-meta b { display: block; min-width: 0; overflow-wrap: anywhere; }
.employee-role-meta small { color: #94a3b8; font-size: 8px; }
.employee-role-meta b { margin-top: 3px; font-size: 10px; line-height: 1.35; }
.employee-actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.employee-actions a, .employee-actions button, .employees-secondary, .employees-danger { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; color: #334155; background: #fff; font-size: 9px; font-weight: 750; text-decoration: none; cursor: pointer; }
.employee-actions .employees-primary { color: #fff; border-color: #2563eb; background: #2563eb; }
.employee-actions button:disabled, .employees-secondary:disabled, .employees-danger:disabled { opacity: .5; cursor: default; }
.employee-chain { margin: 10px 0 0; padding: 10px; border-radius: 9px; color: #334155; background: #f8fafc; font-size: 10px; line-height: 1.45; }
.employee-team-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
.employee-team-list > span { min-width: 0; padding: 7px 8px; border: 1px solid #e2e8f0; border-radius: 8px; }
.employee-team-list b, .employee-team-list small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-team-list b { font-size: 9px; }
.employee-team-list small { margin-top: 2px; color: #64748b; font-size: 8px; }
.employee-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.employee-check { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 7px; border-radius: 8px; color: #64748b; background: #f8fafc; }
.employee-check i { display: grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; color: #94a3b8; background: #e2e8f0; font-size: 9px; font-style: normal; }
.employee-check b { min-width: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.employee-check.done { color: #166534; background: #f0fdf4; }
.employee-check.done i { color: #fff; background: #10b981; }
.employee-course-list { display: grid; gap: 5px; margin-top: 9px; }
.employee-course-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-width: 0; padding: 8px 9px; border: 1px solid #e2e8f0; border-radius: 8px; }
.employee-course-row > span { min-width: 0; }
.employee-course-row b, .employee-course-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-course-row b { font-size: 9px; }
.employee-course-row small { margin-top: 3px; color: #64748b; font-size: 8px; }
.employee-course-row > em { flex: 0 0 auto; color: #1d4ed8; font-size: 9px; font-style: normal; font-weight: 800; }
.employee-empty-line { margin: 9px 0 0; color: #94a3b8; font-size: 9px; }
.employee-history-row { display: flex; gap: 8px; margin-top: 9px; }
.employee-history-row > i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #2563eb; }
.employee-history-row b, .employee-history-row small { display: block; }
.employee-history-row b { font-size: 9px; }
.employee-history-row small { margin-top: 2px; color: #64748b; font-size: 8px; line-height: 1.35; }
.employee-archive-reason { padding: 9px; border-radius: 8px; color: #475569; background: #f1f5f9; font-size: 9px; }
.employee-lifecycle .employees-danger { margin-top: 9px; color: #b91c1c; border-color: #fecaca; background: #fff; }
.employee-lifecycle .employees-secondary { margin-top: 9px; color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }

@media (max-width: 1120px) {
  .employees-hero { flex-direction: column; }
  .employees-hero-actions { justify-content: flex-start; }
  .employees-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employees-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .employees-list-header { flex-direction: column; }
  .employees-list-controls { justify-content: flex-start; width: 100%; }
}
@media (max-width: 850px) {
  .employees-layout { grid-template-columns: 1fr; }
  .employees-units { position: static; display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 9px; scrollbar-width: thin; }
  .employees-units-title { display: none; }
  .employees-units-label { display: none; }
  .employees-unit { flex: 0 0 175px; margin: 0; }
  .employees-grid { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
}
@media (max-width: 640px) {
  .employees-hero { margin: -16px -16px 0; padding: 20px 17px; }
  .employees-hero-actions { width: 100%; }
  .employees-hero-actions a { flex: 1 1 145px; }
  .employees-overview { grid-template-columns: 1fr 1fr; }
  .employees-overview > div { min-height: 92px; padding: 13px; }
  .employees-overview b { font-size: 23px; }
  .employees-list-controls > label { width: 100%; }
  .employees-status-tabs { width: 100%; }
  .employees-status-tabs button { flex: 1; }
  .employees-grid { grid-template-columns: 1fr; padding: 9px; }
  .employee-metrics { grid-template-columns: 1fr 1fr; }
  .employee-metrics > span:last-child { grid-column: 1 / -1; }
  .employee-role-meta.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .employees-overview { grid-template-columns: 1fr; }
  .employees-list-header { padding: 14px; }
  .employee-drawer > header { padding: 15px; }
  .employee-drawer-person h2 { max-width: 245px; }
  .employee-drawer-scroll { padding: 9px; }
  .employee-drawer-scroll > section { padding: 12px; }
  .employee-section-title { flex-direction: column; }
  .employee-section-title > em { max-width: 100%; text-align: left; }
  .employee-role-meta, .employee-role-meta.three { grid-template-columns: 1fr; }
  .employee-checklist { grid-template-columns: 1fr; }
  .employee-team-list { grid-template-columns: 1fr; }
}
