.workforce-shell {
  --wf-ink: #092a25;
  --wf-green: #0d4b40;
  --wf-green-2: #176052;
  --wf-lime: #c8f36a;
  --wf-mint: #eaf6f1;
  --wf-line: #d9e5e1;
  --wf-muted: #667b76;
  --wf-bg: #f4f8f6;
  color: var(--wf-ink);
  max-width: 1480px;
  margin: 0 auto;
  padding: 38px 34px 70px;
}

.wf-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--wf-green-2);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.wf-hero,
.wf-detail-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.wf-hero h1,
.wf-detail-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.75rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.wf-hero p,
.wf-detail-hero p {
  margin: 12px 0 0;
  color: var(--wf-muted);
  font-size: 1rem;
}

.wf-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.wf-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--wf-line);
  border-radius: 13px;
  background: #fff;
  color: var(--wf-green);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.wf-button:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(9, 42, 37, .1); }
.wf-button.primary { border-color: var(--wf-green); background: var(--wf-green); color: #fff; }
.wf-button.accent { border-color: var(--wf-lime); background: var(--wf-lime); color: #163a32; }
.wf-button.small { min-height: 36px; padding: 0 13px; border-radius: 10px; font-size: .83rem; }

.wf-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.wf-stat,
.wf-card {
  border: 1px solid var(--wf-line);
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 38px rgba(19, 62, 53, .06);
}

.wf-stat { padding: 20px 22px; }
.wf-stat strong { display: block; margin: 4px 0; font-size: 2rem; letter-spacing: -.04em; }
.wf-stat span { color: var(--wf-muted); font-size: .76rem; font-weight: 700; }
.wf-stat.emphasis { border-color: var(--wf-green); background: var(--wf-green); color: #fff; }
.wf-stat.emphasis span { color: #cfe3dd; }

.wf-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(2, minmax(180px, .6fr)) auto;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--wf-line);
  border-radius: 17px;
  background: #fff;
}

.wf-toolbar input,
.wf-toolbar select,
.wf-form input,
.wf-form select,
.wf-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #cddbd7;
  border-radius: 11px;
  background: #fbfdfc;
  color: var(--wf-ink);
  font: inherit;
  box-sizing: border-box;
  outline: none;
}

.wf-toolbar input:focus,
.wf-toolbar select:focus,
.wf-form input:focus,
.wf-form select:focus,
.wf-form textarea:focus { border-color: var(--wf-green-2); box-shadow: 0 0 0 3px rgba(23, 96, 82, .1); }

.wf-table-card { overflow: hidden; }
.wf-table { width: 100%; border-collapse: collapse; }
.wf-table th {
  padding: 14px 18px;
  border-bottom: 1px solid var(--wf-line);
  color: var(--wf-muted);
  font-size: .67rem;
  letter-spacing: .12em;
  text-align: left;
  text-transform: uppercase;
}
.wf-table td { padding: 15px 18px; border-bottom: 1px solid #e7efec; vertical-align: middle; }
.wf-table tr:last-child td { border-bottom: 0; }
.wf-table tbody tr:hover { background: #f8fbfa; }

.wf-person { display: flex; align-items: center; gap: 12px; }
.wf-avatar {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--wf-green);
  color: var(--wf-lime);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.wf-avatar.large { width: 76px; height: 76px; flex-basis: 76px; border-radius: 23px; font-size: 1.35rem; }
.wf-person b { display: block; }
.wf-person small, .wf-muted { color: var(--wf-muted); }

.wf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf3f1;
  color: #43615a;
  font-size: .72rem;
  font-weight: 800;
}
.wf-badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.wf-badge.active { background: #e2f6e9; color: #137541; }
.wf-badge.leave, .wf-badge.vacation { background: #fff2cf; color: #9a6200; }
.wf-badge.inactive { background: #f1eeee; color: #816e6e; }

.wf-area-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #eef5f2;
  font-size: .76rem;
  font-weight: 750;
}
.wf-area-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--area-color, var(--wf-green)); }

.wf-empty { padding: 72px 24px; text-align: center; }
.wf-empty strong { display: block; margin-bottom: 8px; font-size: 1.15rem; }
.wf-empty p { color: var(--wf-muted); }

.wf-area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.wf-area-card { position: relative; overflow: hidden; padding: 23px; }
.wf-area-card::before { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--area-color, var(--wf-green)); content: ""; }
.wf-area-card h2 { margin: 15px 0 7px; font-size: 1.25rem; }
.wf-area-card p { min-height: 42px; margin: 0 0 20px; color: var(--wf-muted); font-size: .88rem; }
.wf-area-code { color: var(--wf-muted); font-size: .66rem; font-weight: 900; letter-spacing: .14em; }
.wf-area-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.wf-area-metrics div { padding: 12px; border-radius: 12px; background: var(--wf-bg); }
.wf-area-metrics strong { display: block; font-size: 1.2rem; }
.wf-area-metrics span { color: var(--wf-muted); font-size: .7rem; }

.wf-form-layout,
.wf-detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr); gap: 18px; align-items: start; }
.wf-form-stack { display: grid; gap: 16px; }
.wf-form-card { padding: 24px; }
.wf-form-card h2 { margin: 0 0 5px; font-size: 1.1rem; }
.wf-form-card > p { margin: 0 0 20px; color: var(--wf-muted); font-size: .84rem; }
.wf-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wf-field { display: grid; gap: 7px; }
.wf-field.full { grid-column: 1 / -1; }
.wf-field label { font-size: .74rem; font-weight: 850; }
.wf-field textarea { min-height: 108px; resize: vertical; }
.wf-field .helptext { color: var(--wf-muted); font-size: .7rem; }
.wf-errors, .wf-field .errorlist { margin: 0; padding: 0; color: #a72c2c; font-size: .72rem; list-style: none; }

.wf-checkboxes ul,
.wf-checkboxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.wf-checkboxes li label { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--wf-line); border-radius: 11px; background: #fbfdfc; cursor: pointer; }
.wf-checkboxes input { width: 17px; min-height: auto; height: 17px; accent-color: var(--wf-green); }

.wf-side-card { position: sticky; top: 24px; padding: 24px; }
.wf-side-card h3 { margin: 18px 0 6px; }
.wf-side-card p { margin: 0 0 18px; color: var(--wf-muted); font-size: .84rem; }
.wf-side-list { display: grid; gap: 0; margin-top: 18px; }
.wf-side-list div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--wf-line); font-size: .78rem; }
.wf-side-list span { color: var(--wf-muted); }

.wf-profile { padding: 25px; }
.wf-profile-head { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--wf-line); }
.wf-profile h2 { margin: 0; }
.wf-profile dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0 0; }
.wf-profile dt { color: var(--wf-muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.wf-profile dd { margin: 4px 0 0; font-weight: 750; }
.wf-section { padding: 24px; }
.wf-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.wf-section-head h2 { margin: 0; font-size: 1.15rem; }
.wf-assignment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wf-assignment { padding: 16px; border: 1px solid var(--wf-line); border-left: 5px solid var(--area-color, var(--wf-green)); border-radius: 14px; }
.wf-assignment strong { display: block; margin-bottom: 4px; }
.wf-assignment small { color: var(--wf-muted); }

.wf-back { display: inline-flex; margin-bottom: 16px; color: var(--wf-green); font-size: .82rem; font-weight: 800; text-decoration: none; }
.wf-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 1050px) {
  .wf-stats { grid-template-columns: repeat(2, 1fr); }
  .wf-toolbar { grid-template-columns: 1fr 1fr; }
  .wf-area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-form-layout, .wf-detail-grid { grid-template-columns: 1fr; }
  .wf-side-card { position: static; }
}

@media (max-width: 720px) {
  .workforce-shell { padding: 25px 16px 60px; }
  .wf-hero, .wf-detail-hero { align-items: flex-start; flex-direction: column; }
  .wf-actions, .wf-actions .wf-button { width: 100%; }
  .wf-stats, .wf-area-grid, .wf-field-grid, .wf-assignment-grid { grid-template-columns: 1fr; }
  .wf-toolbar { grid-template-columns: 1fr; }
  .wf-table thead { display: none; }
  .wf-table, .wf-table tbody, .wf-table tr, .wf-table td { display: block; width: 100%; box-sizing: border-box; }
  .wf-table tr { padding: 10px 0; border-bottom: 1px solid var(--wf-line); }
  .wf-table td { padding: 7px 16px; border: 0; }
  .wf-checkboxes ul, .wf-checkboxes { grid-template-columns: 1fr; }
.wf-profile dl { grid-template-columns: 1fr; }
}

.wf-employee-photo { display: block; object-fit: cover; border-radius: 24px; background: #fff; border: 4px solid #fff; box-shadow: 0 10px 28px rgba(2,72,108,.16); }
.wf-employee-photo.large { width: 94px; height: 94px; }
.wf-document-form { padding: 18px; margin: 16px 0; border: 1px solid var(--wf-line); border-radius: 20px; background: var(--wf-soft); }
.wf-document-list, .wf-payroll-list { display: grid; gap: 10px; margin-top: 16px; }
.wf-document-list article, .wf-payroll-list article { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px 18px; border: 1px solid var(--wf-line); border-radius: 18px; background: #fff; }
.wf-document-list small, .wf-payroll-list small { display: block; color: var(--wf-muted); margin-top: 4px; }
.wf-document-actions, .wf-document-actions form, .wf-payroll-list article > div:last-child { display: flex; align-items: center; gap: 8px; }
.wf-financial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wf-financial-grid div { padding: 16px; border-radius: 18px; background: var(--wf-soft); }
.wf-financial-grid dt { font-size: .75rem; color: var(--wf-muted); text-transform: uppercase; letter-spacing: .06em; }
.wf-financial-grid dd { font-size: 1.05rem; font-weight: 800; margin: 7px 0 0; }
.wf-auto-code { min-height: 45px; display: flex; align-items: center; padding: 0 14px; border: 1px dashed #9dbdb4; border-radius: 12px; background: #f0f8f5; color: #176052; font-weight: 800; }
@media (max-width: 760px) { .wf-financial-grid { grid-template-columns: 1fr; } .wf-document-list article, .wf-payroll-list article { align-items: flex-start; flex-direction: column; } .wf-document-actions { flex-wrap: wrap; } }
