/* Employees. Rows follow the inset lists of finance-files.css. */
.employee-open {
  display: grid;
  flex: 1;
  grid-template-columns: 40px minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.employee-open:focus-visible {
  outline-offset: -2px;
}

.employee-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.employee-name {
  font-weight: 600;
}

.employee-role,
/* Whether they can sign in, and with which password */
.employee-account {
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
}

.employee-account.is-starting,
.employee-account.is-clash {
  color: var(--color-warn);
  font-weight: 600;
}

.employee-account.is-own {
  color: var(--color-good);
  font-weight: 600;
}

.employee-contact {
  overflow: hidden;
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-work {
  overflow: hidden;
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-row .file-actions {
  margin-right: var(--space-2);
}

#employee-fields[hidden],
.dialog-text[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .employee-open {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .employee-work {
    grid-column: 2;
  }
}

/* One list per team */
.employee-team + .employee-team {
  margin-top: var(--space-6);
}

.employee-team-name {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0 0 var(--space-2) var(--space-1);
  font-size: var(--text-md);
  font-weight: 600;
}

.employee-team-count {
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  font-weight: 400;
}

/* Adding someone to the payroll */
.employee-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
  font-weight: 500;
  cursor: pointer;
}

.employee-payroll {
  margin-bottom: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-sunken);
}

.employee-payroll[hidden] {
  display: none;
}

.employee-payroll .form-input {
  background: var(--color-surface);
}

.employee-payroll-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-3);
}

.employee-payroll-note {
  margin: 0 0 var(--space-3);
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
}

.employee-payroll-note:last-child {
  margin: 0;
}

.employee-badge {
  align-self: flex-start;
  margin-top: 2px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-good-soft);
  color: var(--color-good);
  font-size: var(--text-xs);
  font-weight: 600;
}

#employee-dialog {
  max-height: calc(100vh - 2 * var(--space-4));
  overflow-y: auto;
}

.employee-payroll .date-field {
  margin: 0;
  background: var(--color-surface);
}

/* A saved signature: a small copy in the row, and the pad in the dialog */
.employee-sign {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
}

.employee-sign img {
  width: auto;
  max-width: 96px;
  height: 22px;
  object-fit: contain;
}

.employee-signature .sign-pad {
  height: 130px;
}

.employee-signature .sign-pad-line {
  bottom: 34px;
}

.employee-signature .sign-pad-hint {
  bottom: 12px;
}

.employee-signature .sign-pad-actions {
  margin-bottom: 0;
}

.employee-sign-note {
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
}
