:root {
  --blue: #2b4fe0;
  --blue-dark: #1c37a8;
  --ink: #152057;
  --text: #5b6472;
  --muted: #8b94a7;
  --line: #e3e7f0;
  --soft: #f7f9fd;
  --green: #009b3a;
  --red: #c0492f;
  --shadow: 0 12px 34px rgba(21, 32, 87, 0.08);
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
.global-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(227, 232, 248, 0.58);
  backdrop-filter: blur(2px);
}
.global-loader-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 170px;
  padding: 13px 16px;
  border: 1px solid #dce2f0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(21, 32, 87, 0.14);
  color: var(--ink);
  font-size: 13px;
  text-align: center;
}
.global-loader-spinner {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid #dfe5ff;
  border-top-color: var(--blue);
  border-right-color: transparent;
  border-radius: 50%;
  animation: global-loader-spin 0.7s linear infinite;
}
@keyframes global-loader-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .global-loader-spinner {
    animation-duration: 1.8s;
  }
}
body {
  overflow-x: hidden;
}
.shell.generator-shell {
  max-width: 1280px;
  padding: 22px 20px 50px;
}
.generator-page {
  max-width: 1120px;
  margin: 0 auto;
  color: var(--text);
}

.workspace-header,
.workspace-brand,
.account-actions,
.card-heading,
.section-title,
.employee-card-head,
.employee-total,
.generator-footer,
.footer-actions {
  display: flex;
  align-items: center;
}
.workspace-header {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.workspace-brand {
  gap: 13px;
}
.workspace-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.workspace-brand h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
}
.workspace-brand p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
}
.eyebrow,
.step-label {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.account-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.sync-indicator {
  color: var(--green);
  font-size: 12px;
}
.sync-indicator.is-syncing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sync-indicator.is-syncing::before {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: sync-spin 0.7s linear infinite;
}
@keyframes sync-spin {
  to {
    transform: rotate(360deg);
  }
}

.card,
.employee-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.card {
  padding: 24px;
  margin-bottom: 16px;
}
.card-heading {
  justify-content: space-between;
  gap: 20px;
}
.card-heading h2 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 21px;
}
.card-heading p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}
.company-fields {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.company-address {
  grid-column: span 4;
}
.company-address textarea {
  width: 100%;
  min-height: 58px;
  border: 1px solid #d6dce8;
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  resize: vertical;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-height: 15px;
}
.field-wide {
  grid-column: span 1;
}
.field b {
  color: var(--red);
}
.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #d6dce8;
  border-radius: 7px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.field input:focus,
.field select:focus,
.line-item input:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 79, 224, 0.12);
}
.select2-container {
  display: block;
  width: 100% !important;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  vertical-align: top;
}
.select2-container--payroll .select2-selection--single {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid #d6dce8;
  border-radius: 7px;
  background: #fff;
}
.select2-container--payroll
  .select2-selection--single
  .select2-selection__rendered {
  padding-left: 11px;
  color: var(--ink);
  line-height: 38px;
}
.select2-container--payroll
  .select2-selection--single
  .select2-selection__arrow {
  top: 6px;
  right: 8px;
  height: 26px;
}
.select2-container--payroll.select2-container--focus .select2-selection--single,
.select2-container--payroll.select2-container--open .select2-selection--single {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 79, 224, 0.12);
}
.select2-container--payroll .select2-dropdown {
  overflow: hidden;
  border: 1px solid #c7d3f7;
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(21, 32, 87, 0.16);
}
.select2-container--payroll .select2-search--dropdown {
  padding: 8px;
}
.select2-container--payroll .select2-search--dropdown .select2-search__field {
  height: 34px;
  border: 1px solid #d6dce8;
  border-radius: 6px;
  outline: 0;
}
.select2-container--payroll .select2-results__option {
  padding: 9px 11px;
}
.select2-container--payroll
  .select2-results__option--highlighted[aria-selected] {
  background: var(--blue);
  color: #fff;
}
.line-item .select2-container--payroll .select2-selection--single {
  height: 35px;
  border-radius: 6px;
}
.line-item
  .select2-container--payroll
  .select2-selection--single
  .select2-selection__rendered {
  padding-left: 8px;
  font-size: 11px;
  line-height: 33px;
}
.line-item
  .select2-container--payroll
  .select2-selection--single
  .select2-selection__arrow {
  top: 3px;
  right: 4px;
}
.logo-control {
  display: grid;
  justify-items: end;
  gap: 5px;
}
.logo-picker {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 62px;
  overflow: hidden;
  border: 1px dashed #b9c6eb;
  border-radius: 9px;
  background: #f5f7ff;
  color: var(--blue);
  font-size: 11px;
  cursor: pointer;
}
.logo-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.logo-picker img {
  max-width: 72px;
  max-height: 52px;
  object-fit: contain;
}
.text-button {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}
.text-button:hover {
  color: var(--blue-dark);
  background: transparent;
}
.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.icon-danger {
  color: var(--red);
}
.button {
  min-height: 38px;
  border-radius: 7px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}
.button:disabled {
  cursor: wait;
  opacity: 0.72;
}
.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
}
@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}
.button-primary {
  background: var(--blue);
  color: #fff;
}
.button-primary:hover {
  background: var(--blue-dark);
}
.button-light {
  border: 1px solid #d5dcf0;
  background: #fff;
  color: var(--blue);
}
.button-light:hover {
  background: #f3f6ff;
}
.button-danger {
  border: 1px solid #f1cbc4;
  background: #fff8f6;
  color: var(--red);
}

.acknowledgement {
  padding: 13px 17px;
  box-shadow: none;
}
.acknowledgement label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
}
.acknowledgement input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}
.acknowledgement a {
  color: var(--blue);
}
.acknowledgement b {
  color: var(--red);
}
.company-workspace {
  margin-bottom: 28px;
}
.company-header-card {
  margin-bottom: 16px;
}
.company-details-card .company-fields {
  margin-top: 0;
}
.staff-workspace {
  margin-top: 0;
}
.employee-view-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 4px;
  border: 1px solid #d8def0;
  border-radius: 10px;
  background: #f6f8fd;
}
.employee-view-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 82px;
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}
.employee-view-tab:hover,
.employee-view-tab.is-active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(21, 32, 87, 0.08);
}
.employee-view-tab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.employee-list {
  display: grid;
  gap: 16px;
}
.employee-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.employee-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--text);
  font-size: 12px;
}
.employee-table caption {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}
.employee-table th,
.employee-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}
.employee-table th {
  background: #f5f7fc;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.employee-table th:nth-child(1) { width: 22%; }
.employee-table th:nth-child(2) { width: 11%; }
.employee-table th:nth-child(3) { width: 18%; }
.employee-table th:nth-child(4) { width: 13%; }
.employee-table th:nth-child(5),
.employee-table th:nth-child(6),
.employee-table th:nth-child(7) { width: 9%; }
.employee-table th:nth-child(8) { width: 9%; }
.employee-table tbody tr:last-child td {
  border-bottom: 0;
}
.employee-table tbody tr:hover {
  background: #fbfcff;
}
.table-employee-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.table-employee-meta .employee-number {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.table-employee-meta > div {
  min-width: 0;
  width: 100%;
}
.table-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #d6dce8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}
.table-input:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(43, 79, 224, 0.12);
}
.table-name-input {
  font-weight: 700;
}
.table-code-input {
  height: 23px;
  margin-top: 4px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
.table-code-input:focus {
  border-color: var(--blue);
  background: #fff;
}
.table-base-cell {
  display: grid;
  gap: 4px;
}
.table-base-cell > .table-input {
  min-width: 0;
}
.table-pay-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.table-base-cell.table-hourly-base {
  grid-template-columns: 1fr 1fr;
}
.table-base-cell.table-hourly-base .table-pay-pair {
  grid-column: 1 / -1;
}
.table-base-cell.table-hourly-base .table-input {
  width: 100%;
}
.table-total-cell {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}
.table-net-cell {
  color: var(--green);
}
.table-action-cell {
  text-align: right !important;
}
.table-edit-employee {
  min-height: 31px;
  padding: 6px 8px;
  font-size: 10px;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.employee-table-v2 .table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.table-toolbar-title,
.table-toolbar-help {
  display: block;
}
.table-toolbar-title {
  color: var(--ink);
  font-size: 13px;
}
.table-toolbar-help {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.table-pay-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #d8def0;
  border-radius: 8px;
  background: #f0f3fb;
}
.table-pay-tab {
  min-width: 78px;
  min-height: 30px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
}
.table-pay-tab:hover,
.table-pay-tab.is-active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 7px rgba(21, 32, 87, 0.08);
}
.employee-table-v2 .employee-table {
  table-layout: fixed;
}
.employee-table-v2 .employee-table th:nth-child(1) { width: 18%; }
.employee-table-v2 .employee-table th:nth-child(2) { width: 16%; }
.employee-table-v2 .employee-table th:nth-child(3) { width: 25%; }
.employee-table-v2 .employee-table th:nth-child(4) { width: 16%; }
.employee-table-v2 .employee-table th:nth-child(5) { width: 17%; }
.employee-table-v2 .employee-table th:nth-child(6) { width: 8%; }
.employee-table-v2 .employee-table td {
  vertical-align: top;
}
.table-employee-top,
.table-line-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.table-employee-meta {
  align-items: center;
}
.table-employee-label {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.table-remove-employee,
.table-remove-line {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 19px;
  line-height: 1;
  box-shadow: none;
}
.table-remove-employee:hover,
.table-remove-line:hover {
  color: #a93725;
  background: #fff0ed;
}
.table-employee-fields,
.table-personal-fields,
.table-contribution-fields,
.table-lines-fields {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.table-detail-stack {
  display: grid;
  gap: 8px;
}
.table-pay-group {
  padding: 7px;
  border: 1px solid #e5e9f2;
  border-radius: 7px;
  background: #fbfcff;
}
.table-pay-group > strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 10px;
}
.table-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.table-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.table-field-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-table-v2 .table-input {
  height: 29px;
  padding: 0 6px;
  font-size: 10px;
}
.employee-table-v2 .table-code-input {
  height: 22px;
}
.employee-table-v2 .select2-container {
  width: 100% !important;
  font-size: 10px;
}
.table-line-group {
  display: grid;
  gap: 5px;
}
.table-line-group + .table-line-group {
  padding-top: 8px;
  border-top: 1px solid #e5e9f2;
}
.table-line-heading strong {
  color: var(--ink);
  font-size: 10px;
}
.table-add-line {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  box-shadow: none;
}
.table-line-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 70px 24px;
  gap: 4px;
}
.table-line-item:not(.has-wage-type) {
  grid-template-columns: minmax(0, 1fr) 70px 24px;
}
.table-line-item .table-input {
  min-width: 0;
}
.table-total-stack {
  display: grid;
  gap: 8px;
}
.table-total-stack > div {
  display: grid;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e9f2;
}
.table-total-stack > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.table-total-stack span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.table-total-stack strong {
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}
.table-total-stack .table-net-line strong {
  color: var(--green);
}
.employee-table-v2 .table-empty {
  padding: 26px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.employee-table-v3 .table-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 16px 26px;
  color: var(--muted);
  text-align: center;
}
.employee-table-v3 .table-empty-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--blue);
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}
.employee-table-v3 .table-empty-title {
  color: var(--ink);
  font-size: 13px;
}
.employee-table-v3 .table-empty-help {
  font-size: 11px;
}
.employee-table-v3 .table-empty-add {
  min-height: 34px;
  margin-top: 7px;
  padding: 7px 12px;
  font-size: 11px;
}
.employee-table-v3 .employee-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #aebce8 #f5f7fc;
  scrollbar-width: thin;
}
.employee-table-v3 .table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.employee-table-v3 .table-toolbar-title,
.employee-table-v3 .table-toolbar-help {
  display: block;
}
.employee-table-v3 .table-toolbar-title {
  color: var(--ink);
  font-size: 13px;
}
.employee-table-v3 .table-toolbar-help {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.employee-table-v3 .table-pay-tabs {
  flex: 0 0 auto;
}
.employee-table-v3 .employee-table {
  min-width: 2600px;
  table-layout: auto;
  white-space: nowrap;
}
.employee-table-v3 .employee-table th,
.employee-table-v3 .employee-table td {
  min-width: 112px;
  padding: 8px;
  vertical-align: middle;
}
.employee-table-v3 .employee-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.employee-table-v3 .employee-table th:nth-child(1),
.employee-table-v3 .employee-table td:nth-child(1) { min-width: 50px; width: 50px; }
.employee-table-v3 .employee-table th:nth-child(2),
.employee-table-v3 .employee-table td:nth-child(2) { min-width: 190px; }
.employee-table-v3 .employee-table th:nth-child(3),
.employee-table-v3 .employee-table td:nth-child(3) { min-width: 125px; }
.employee-table-v3 .employee-table th:nth-child(4),
.employee-table-v3 .employee-table td:nth-child(4) { min-width: 130px; }
.employee-table-v3 .employee-table th:nth-child(5),
.employee-table-v3 .employee-table td:nth-child(5) { min-width: 220px; }
.employee-table-v3 .employee-table th:nth-child(6),
.employee-table-v3 .employee-table td:nth-child(6),
.employee-table-v3 .employee-table th:nth-child(7),
.employee-table-v3 .employee-table td:nth-child(7) { min-width: 150px; }
.employee-table-v3 .employee-table th:nth-child(8),
.employee-table-v3 .employee-table td:nth-child(8),
.employee-table-v3 .employee-table th:nth-child(9),
.employee-table-v3 .employee-table td:nth-child(9),
.employee-table-v3 .employee-table th:nth-child(10),
.employee-table-v3 .employee-table td:nth-child(10) { min-width: 135px; }
.employee-table-v3 .employee-table th:nth-child(11),
.employee-table-v3 .employee-table td:nth-child(11) { min-width: 190px; }
.employee-table-v3 .table-lines-cell-v3 {
  min-width: 190px;
}
.employee-table-v3 .employee-table th:nth-child(1),
.employee-table-v3 .employee-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}
.employee-table-v3 .employee-table th:nth-child(1) {
  background: #f5f7fc;
}
.employee-table-v3 .employee-table th:nth-child(2),
.employee-table-v3 .employee-table td:nth-child(2) {
  position: sticky;
  left: 50px;
  z-index: 2;
  background: #fff;
  box-shadow: 7px 0 9px -9px rgba(21, 32, 87, 0.4);
}
.employee-table-v3 .employee-table th:nth-child(2) {
  background: #f5f7fc;
}
.employee-table-v3 .table-readonly-cell {
  min-width: 105px;
}
.employee-table-v3 .table-compact-cell > .table-input,
.employee-table-v3 .table-compact-cell > .select2-container {
  width: 100%;
}
.employee-table-v3 .table-compact-cell > .table-input {
  height: 34px;
}
.employee-table-v3 .table-readonly-cell {
  color: var(--ink);
  font-weight: 800;
}
.employee-table-v3 .table-net-cell {
  color: var(--green);
}
.table-lines-cell-v3 {
  position: relative;
}
.table-lines-button {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #d6dce8;
  border-radius: 6px;
  background: #fbfcff;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: none;
}
.table-lines-button:hover {
  border-color: var(--blue);
  background: #f0f4ff;
}
.table-lines-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 4;
  display: grid;
  gap: 8px;
  width: 320px;
  max-height: 280px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid #d8def0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(21, 32, 87, 0.18);
  white-space: normal;
}
.table-lines-popover-heading {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.table-popover-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 24px;
  gap: 5px;
}
.table-popover-line.has-wage-type {
  grid-template-columns: minmax(0, 1fr) 65px 88px 24px;
}
.table-popover-line .table-input {
  min-width: 0;
  height: 30px;
}
.table-action-cell {
  text-align: center !important;
}
.employee-table-v3 .table-remove-employee {
  margin: 0 auto;
}
.employee-card {
  overflow: hidden;
}
.employee-card-head {
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.employee-toggle {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  min-width: 0;
  padding: 13px 7px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}
.employee-toggle:hover {
  background: #f6f8ff;
}
.employee-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.accordion-icon {
  color: var(--blue);
  transition: transform 0.18s ease;
}
.employee-toggle[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}
.employee-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e9edff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.employee-title {
  flex: 1;
  min-width: 0;
}
.employee-title h3 {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-head-summary {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-status {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #fff4e8;
  color: #ad6518;
  font-size: 10px;
  font-weight: 700;
}
.employee-status.is-ready {
  background: #eaf8ef;
  color: var(--green);
}
.employee-card-body[hidden] {
  display: none;
}
.employee-section {
  padding: 22px 20px;
  border-bottom: 1px solid var(--line);
}
.employee-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}
.employee-section p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.employee-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px 12px;
  margin-top: 16px;
}
.employee-grid .field-wide {
  grid-column: span 2;
}
.pay-section {
  background: #fbfcff;
}
.section-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.mode-pill {
  padding: 5px 9px;
  border-radius: 20px;
  background: #eef2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}
.pay-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.pay-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e0e5f0;
  border-radius: 10px;
  background: #fff;
}
.pay-group h5 {
  margin: 0 0 11px;
  color: var(--ink);
  font-size: 12px;
}
.pay-group-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.line-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.line-columns > div {
  min-width: 0;
}
.line-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 140px 26px;
  gap: 7px;
  margin-top: 8px;
}
.line-item:not(.has-wage-type) {
  grid-template-columns: minmax(0, 1fr) 100px 26px;
}
.line-item input {
  width: 100%;
  height: 35px;
  border: 1px solid #d6dce8;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}
.line-item select {
  width: 100%;
  height: 35px;
  border: 1px solid #d6dce8;
  border-radius: 6px;
  padding: 0 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}
.remove-line {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 35px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  box-shadow: none;
}
.employee-total {
  flex-wrap: wrap;
  gap: 1px;
  padding: 0;
  background: #f5f7fc;
}
.employee-total > div {
  display: grid;
  flex: 1 1 130px;
  gap: 4px;
  min-height: 60px;
  padding: 12px 15px;
  border-right: 1px solid var(--line);
}
.employee-total span {
  color: var(--muted);
  font-size: 11px;
}
.employee-total strong {
  color: var(--ink);
  font-size: 14px;
}
.employee-total .net-total {
  background: #edf9f1;
}
.employee-total .net-total strong {
  color: var(--green);
}
.employee-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}
.employee-card-actions .remove-employee {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #f1cbc4;
  border-radius: 7px;
  background: #fff8f6;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}
.employee-card-actions .remove-employee:hover {
  border-color: #dca398;
  background: #fff0ed;
  color: #a93725;
}
.add-employee {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px dashed #aebce8;
  border-radius: 10px;
  background: #f8faff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}
.add-employee:hover {
  border-color: var(--blue);
  background: #f0f4ff;
}
.add-employee {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.generator-footer {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 13px 16px;
  border: 1px solid #dce2f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(21, 32, 87, 0.14);
  backdrop-filter: blur(10px);
}
.footer-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.footer-summary strong {
  color: var(--ink);
  font-size: 13px;
}
.footer-summary span {
  color: var(--text);
  font-size: 12px;
}
.terms-line {
  margin-top: 14px;
  padding: 13px 2px 0;
  border-top: 1px solid #dce2f0;
}
.terms-line label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}
.terms-line input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}
.terms-line a {
  color: var(--blue);
}
.terms-line b {
  color: var(--red);
}
.footer-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.action-status {
  position: absolute;
  left: 16px;
  bottom: -23px;
  margin: 0;
  color: var(--green);
  font-size: 11px;
}
.generator-footnote {
  margin: 30px 0 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21, 32, 87, 0.45);
}
.modal[hidden] {
  display: none;
}
.modal-card {
  position: relative;
  width: min(500px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 27px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(21, 32, 87, 0.24);
}
.modal-card h2 {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: 23px;
}
.modal-card > p {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f3ff;
  color: var(--ink);
  font-size: 22px;
  box-shadow: none;
}
.button-danger:hover {
  border-color: #dca398;
  background: #fff0ed;
  color: #a93725;
}
.confirm-dialog {
  width: min(420px, 100%);
  padding: 28px;
}
.confirm-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 13px;
  border-radius: 50%;
  background: #fff0ed;
  color: var(--red);
  font-size: 20px;
  font-weight: 800;
}
.confirm-dialog h2 {
  margin-bottom: 8px;
}
.confirm-dialog p {
  margin-bottom: 22px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-form {
  display: grid;
  gap: 13px;
  margin-top: 17px;
}
.modal-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
}
.modal-form input[type="email"],
.modal-form input[name="otp"] {
  height: 40px;
  border: 1px solid #d6dce8;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}
.check-line {
  display: flex !important;
  align-items: center;
  gap: 7px;
}
.check-line input {
  width: 16px;
  height: 16px;
}
.modal-status {
  min-height: 18px;
  margin-bottom: 0;
}
.line-item-dialog {
  width: min(640px, 100%);
}
.modal-line-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 12px;
}
.modal-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 125px 32px;
  gap: 7px;
  align-items: center;
}
.modal-line-row:not(.has-wage-type) {
  grid-template-columns: minmax(0, 1fr) 110px 32px;
}
.modal-line-row input,
.modal-line-row select {
  width: 100%;
  height: 38px;
  min-width: 0;
  border: 1px solid #d6dce8;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}
.modal-line-row input:focus,
.modal-line-row select:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(43, 79, 224, 0.12);
}
.modal-remove-line {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #fff0ed;
  color: var(--red);
  font-size: 19px;
  box-shadow: none;
}
.modal-remove-line:hover {
  background: #ffe2dc;
}
.modal-empty-line {
  margin: 0;
  padding: 14px;
  border: 1px dashed #d6dce8;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.modal-add-line {
  margin-top: 2px;
}
.modal-line-actions {
  margin-top: 20px;
}
.dev-otp {
  padding: 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: var(--blue);
  font-size: 12px;
}
.history-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.history-item {
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}
.history-item:hover {
  border-color: var(--blue);
  background: #f1f4ff;
}
.history-item span {
  color: var(--text);
  font-size: 11px;
}

@media (max-width: 900px) {
  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-actions {
    justify-content: flex-start;
  }
  .company-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .company-address {
    grid-column: span 2;
  }
  .employee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .employee-grid .field-wide {
    grid-column: span 2;
  }
  .employee-view-tabs {
    align-self: flex-start;
  }
  .pay-fields {
    grid-template-columns: 1fr;
  }
  .generator-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .shell.generator-shell {
    padding: 14px 10px 44px;
  }
  .workspace-brand h1 {
    font-size: 23px;
  }
  .workspace-brand p {
    font-size: 12px;
  }
  .card {
    padding: 16px;
  }
  .card-heading {
    align-items: flex-start;
  }
  .company-fields,
  .employee-grid,
  .pay-fields,
  .pay-group-fields,
  .line-columns {
    grid-template-columns: 1fr;
  }
  .company-address {
    grid-column: auto;
  }
  .employee-grid .field-wide {
    grid-column: auto;
  }
  .employee-table th,
  .employee-table td {
    padding: 8px 6px;
  }
  .employee-table th:nth-child(1) { width: 28%; }
  .employee-table th:nth-child(2) { width: 15%; }
  .employee-table th:nth-child(3) { width: 22%; }
  .employee-table th:nth-child(5) { width: 12%; }
  .employee-table th:nth-child(7) { width: 13%; }
  .employee-table .table-secondary-column {
    display: none;
  }
  .employee-table th:nth-child(8) { width: 10%; }
  .employee-table td:nth-child(8) { padding-right: 4px; }
  .table-edit-employee {
    min-width: 31px;
    padding: 6px;
  }
  .table-edit-employee span { display: none; }
  .employee-view-tabs {
    width: 100%;
  }
  .employee-view-tab {
    flex: 1;
  }
  .employee-toggle {
    padding-left: 12px;
  }
  .employee-head-summary {
    max-width: 190px;
  }
  .line-columns {
    gap: 20px;
  }
  .line-item {
    grid-template-columns: minmax(0, 1fr) 82px 120px 24px;
  }
  .line-item:not(.has-wage-type) {
    grid-template-columns: minmax(0, 1fr) 82px 24px;
  }
  .employee-total > div {
    flex-basis: 50%;
  }
  .footer-actions,
  .footer-actions .button {
    width: 100%;
  }
  .action-status {
    position: static;
  }
}

@media (max-width: 760px) {
  .employee-table-v3 .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .employee-table-v3 .table-pay-tabs {
    width: 100%;
  }
  .employee-table-v3 .table-pay-tab {
    flex: 1;
  }
  .employee-table-v2 .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .employee-table-v2 .table-pay-tabs {
    width: 100%;
  }
  .employee-table-v2 .table-pay-tab {
    flex: 1;
  }
  .employee-table-v2 .employee-table,
  .employee-table-v2 .employee-table tbody,
  .employee-table-v2 .employee-table tr,
  .employee-table-v2 .employee-table td {
    display: block;
    width: 100%;
  }
  .employee-table-v2 .employee-table thead {
    display: none;
  }
  .employee-table-v2 .employee-table tbody tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .employee-table-v2 .employee-table tbody tr:last-child {
    border-bottom: 0;
  }
  .employee-table-v2 .employee-table td {
    position: relative;
    padding: 10px 14px 10px 104px;
    border: 0;
  }
  .employee-table-v2 .employee-table td::before {
    position: absolute;
    top: 12px;
    left: 14px;
    width: 84px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .employee-table-v2 .table-employee-cell {
    padding-top: 14px;
  }
  .employee-table-v2 .table-employee-top {
    margin-top: -3px;
  }
  .employee-table-v2 .table-pay-fields,
  .employee-table-v2 .table-contribution-fields,
  .employee-table-v2 .table-personal-fields,
  .employee-table-v2 .table-lines-fields {
    max-width: 100%;
  }
}
