.metalflow-app [hidden] { display: none !important; }

.staff-skip {
  position: fixed;
  inset: .5rem auto auto .5rem;
  transform: translateY(-150%);
  z-index: 2;
  padding: .5rem .75rem;
  background: var(--mf-surface-raised);
  color: var(--mf-platinum);
}
.staff-skip:focus { transform: none; }

.staff-header-controls, .staff-actions, .staff-directory-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.staff-header-controls { justify-content: flex-end; }
.staff-language { display: flex; align-items: center; gap: 8px; }
.staff-language .mf-label { margin: 0; }

.staff-login {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 470px);
  align-items: center;
  gap: clamp(32px, 7vw, 100px);
  margin: clamp(35px, 9vh, 112px) auto 0;
}
.staff-intro { margin-bottom: 0; padding-bottom: 25px; border-bottom: 1px solid var(--mf-accent-border); }
.staff-login .mf-title { font-size: clamp(44px, 5.5vw, 72px); line-height: 1.04; }
.staff-login .mf-subtitle { font-size: clamp(16px, 1.35vw, 19px); margin-top: 18px; }
.staff-login > .mf-panel { padding: clamp(22px, 3vw, 34px); border-color: var(--mf-accent-border); }
.staff-login .staff-form { gap: 17px; }
.staff-login .mf-button--primary { width: 100%; margin-top: 7px; }
.staff-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  color: var(--mf-gold);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.staff-kicker::before {
  content: "";
  width: 15px;
  height: 1px;
  background: currentColor;
}
.staff-login .mf-panel, #create-panel { border-top-color: var(--mf-accent-border); }
.staff-form, .staff-grid { display: grid; gap: 12px; }
.staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.staff-company-fields { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.staff-company-fields legend { margin-bottom: 7px; color: var(--mf-gold); }
.staff-create { margin-top: 16px; }
.staff-help { margin: 5px 0 0; color: var(--mf-text-muted); font-size: .875rem; }
.staff-section-title { margin: 0 0 5px; color: var(--mf-platinum); font-size: 1.22rem; line-height: 1.3; }
.staff-directory-header { justify-content: space-between; margin-bottom: 10px; }
.staff-access-list { margin: 0; padding-inline-start: 1rem; }
.staff-cell-label { display: none; }
.staff-table-actions .mf-button { font-size: .875rem; }
.staff-dialog {
  width: min(calc(100% - 2 * var(--mf-gutter)), 550px);
  max-height: calc(100% - 2 * var(--mf-gutter));
  color: var(--mf-text);
  border-color: var(--mf-accent-border);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.staff-dialog::backdrop { background: rgb(2 8 12 / 77%); }
.staff-manage-target { margin: 6px 0 9px; color: var(--mf-platinum); font-weight: 700; overflow-wrap: anywhere; }
.staff-manage-options, .staff-manage-form, .staff-manage-cancel { margin-top: 16px; }
.staff-manage-options { align-items: stretch; }
.staff-manage-options > button { flex: 1 1 11rem; }
.staff-manage-form > button { justify-self: start; }
.staff-button-danger {
  color: var(--mf-danger);
  background: var(--mf-danger-surface);
  border-color: var(--mf-danger);
}
.staff-button-danger:hover:not(:disabled) { background: #533338; }
.staff-credentials {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--mf-accent-border);
  border-radius: 11px;
  background: var(--mf-gold-muted);
}
.staff-credentials dl {
  display: grid;
  grid-template-columns: fit-content(45%) minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border-radius: 9px;
  background: var(--mf-surface-raised);
}
.staff-credentials dt { font-weight: 700; }
.staff-credentials dd { margin: 0; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.staff-notice {
  width: fit-content;
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--mf-border);
  border-radius: 10px;
  background: var(--mf-surface);
}
.staff-login .staff-notice { width: 100%; }
#employees-page > .staff-notice { margin-bottom: 16px; }
.staff-notice[data-tone="error"] { color: var(--mf-danger); background: var(--mf-danger-surface); }
.staff-notice[data-tone="success"] { color: var(--mf-success); background: var(--mf-success-surface); }

@media (max-width: 800px) {
  .staff-login { display: block; width: min(100%, 520px); margin: clamp(20px, 5vh, 54px) auto 0; }
  .staff-intro { margin-bottom: 20px; padding-bottom: 0; border: 0; }
  .staff-login .mf-title { font-size: clamp(34px, 7vw, 49px); }
  .staff-login .mf-subtitle { margin-top: 8px; }
}

@media (max-width: 640px) {
  .staff-header-controls { display: contents; }
  .staff-brand { grid-area: 1 / 1; }
  .staff-language { grid-area: 1 / 2; justify-self: end; }
  .staff-nav { grid-area: 2 / 1; }
  #logout { grid-area: 2 / 2; justify-self: end; padding-inline: 10px; font-size: .875rem; }
  .staff-actions > .mf-button { width: 100%; }
  .staff-table, .staff-table tbody { display: block; }
  .staff-table thead {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .staff-table tbody { display: grid; gap: 9px; }
  .staff-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 12px;
    border: 1px solid var(--mf-border);
    border-radius: 10px;
    background: var(--mf-surface-raised);
  }
  .staff-table td { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .staff-table td:nth-child(4), .staff-table .staff-table-actions { grid-column: 1 / -1; }
  .staff-table .staff-table-actions--unavailable, .staff-table-actions .staff-cell-label { display: none; }
  .staff-table-actions .mf-button, .staff-manage-form > button, .staff-manage-cancel { width: 100%; }
  .staff-cell-label { display: block; color: var(--mf-text-muted); font-size: .75rem; font-weight: 700; }
}

@media (max-width: 350px) {
  .staff-nav { gap: 2px; }
  .staff-nav a { padding-inline: 5px; }
  .staff-company-fields .staff-grid { grid-template-columns: 1fr; }
}

.staff-row-controls { display: flex; flex-wrap: wrap; gap: 8px; }
#record-dialog > label { display: block; margin-block-start: 16px; }
#record-form { margin-block-start: 16px; }
#record-photo { padding: 8px; }
#record-photo::file-selector-button {
  padding: 6px 10px;
  margin-inline-end: 8px;
  border: 1px solid var(--mf-border);
  border-radius: 6px;
  background: var(--mf-surface);
  color: inherit;
  font: inherit;
}
