body[data-staff-page] {
  color-scheme: light;
  --bg: #f4f6fa;
  --panel: #fff;
  --text: #142033;
  --muted: #52637a;
  --line: #d4dce7;
  --accent: #126e75;
}
body[data-staff-page],
body[data-staff-page] * {
  box-sizing: border-box;
}
body[data-staff-page] {
  margin: 0;
  font:
    15px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
body[data-staff-page] a {
  color: var(--accent);
}
body[data-staff-page] button,
body[data-staff-page] input,
body[data-staff-page] select {
  font: inherit;
}
body[data-staff-page] button,
body[data-staff-page] a,
body[data-staff-page] input,
body[data-staff-page] select {
  touch-action: manipulation;
}
body[data-staff-page] button {
  cursor: pointer;
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 10px 15px;
  min-height: 44px;
  background: var(--accent);
  color: #fff;
}
body[data-staff-page] button:disabled {
  opacity: 0.55;
  cursor: wait;
}
body[data-staff-page] input,
body[data-staff-page] select {
  width: 100%;
  padding: 10px;
  border: 1px solid #95a4b8;
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}
body[data-staff-page] label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
body[data-staff-page] form {
  display: grid;
  gap: 16px;
}
.check {
  display: flex;
  align-items: center;
  font-weight: 400;
}
.check input {
  width: 20px;
  height: 20px;
  flex: none;
}
.staff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 4vw;
  background: #11263e;
  color: white;
}
.staff-header a {
  color: white;
}
.staff-brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.08em;
}
.staff-brand span {
  font-weight: 400;
}
.staff-header nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.staff-main {
  max-width: 1120px;
  margin: auto;
  padding: 28px 24px;
}
body[data-staff-page] h1 {
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.2;
}
body[data-staff-page] h2 {
  font-size: 19px;
}
body[data-staff-page] h3 {
  font-size: 16px;
}
.staff-card {
  background: var(--panel);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 20px 0;
}
.narrow {
  max-width: 480px;
  margin: 24px auto;
}
.staff-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}
.staff-inline label {
  flex: 1;
  min-width: 180px;
}
.staff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.staff-list {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.staff-list > li {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.staff-list h3 {
  margin: 0 0 6px;
}
.staff-list small,
.muted {
  color: var(--muted);
}
.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.staff-actions button {
  font-size: 14px;
}
.staff-badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 20px;
  background: #e9f4f4;
  color: #13575d;
  margin-left: 8px;
}
#staff-message {
  min-height: 24px;
}
#staff-message.error {
  color: #a42020;
}
#invitation {
  padding: 18px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  margin-top: 20px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  padding: 8px;
  background: white;
  z-index: 10;
}
body[data-staff-page] :focus-visible {
  outline: 3px solid #d69b15;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.staff-sync {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 12px 24px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}
.staff-sync .staff-row {
  gap: 10px;
}
.staff-sync button {
  font-size: 13px;
  min-height: 36px;
  padding: 6px 10px;
}
.staff-sync nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.staff-sync strong {
  font-size: 14px;
}
.staff-sync p {
  margin: 8px 0;
}
.staff-conflict {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}
.staff-conflict button {
  margin: 4px 8px 4px 0;
}
.staff-diff {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 2fr);
  gap: 8px;
  overflow-wrap: anywhere;
}
.staff-diff dt {
  font-weight: 600;
}
.staff-diff dd {
  margin: 0;
  white-space: pre-wrap;
}
html[data-theme="dark"] body[data-staff-page] {
  color-scheme: dark;
  --bg: #0d1826;
  --panel: #162538;
  --text: #e9eff7;
  --muted: #b2c1d3;
  --line: #344a63;
  --accent: #62c7ca;
}
html[data-theme="dark"] body[data-staff-page] button {
  color: #102032;
}
@media (max-width: 600px) {
  .staff-header {
    padding: 16px;
  }
  .staff-main {
    padding: 20px 16px;
  }
  .staff-card {
    padding: 18px;
  }
  .staff-inline {
    display: grid;
    align-items: stretch;
  }
  .staff-sync {
    margin: 10px 14px;
  }
  .staff-header nav {
    gap: 12px;
  }
  body[data-staff-page] h1 {
    font-size: 24px;
  }
}

.staff-sync nav a {
  color: var(--accent);
  padding: 4px 0;
  text-decoration: underline;
}

body[data-staff-page] form[inert] {
  opacity: 0.65;
}
