:root {
  --staff-purple-900: #240046;
  --staff-purple-700: #5a189a;
  --staff-purple-100: #ede9ff;
  --staff-purple-50: #f7f2ff;
  --staff-orange: #f97316;
  --staff-green: #15803d;
  --staff-yellow: #92400e;
  --staff-red: #b91c1c;
  --staff-blue: #075985;
  --staff-bg: #f6f4f8;
  --staff-card: #ffffff;
  --staff-border: #ddd4ea;
  --staff-muted: #5f6673;
  --staff-text: #1f1729;
  --staff-shadow: 0 18px 55px rgba(36, 0, 70, .12);
  --staff-radius: 8px;
  --staff-font-display: 'Fraunces', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--staff-bg);
}

body.occ-staff-app {
  min-height: 100vh;
  margin: 0;
  color: var(--staff-text);
  background:
    linear-gradient(180deg, rgba(36, 0, 70, .08), rgba(36, 0, 70, 0) 320px),
    var(--staff-bg);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(249, 115, 22, .45);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.staff-root {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 calc(88px + env(safe-area-inset-bottom));
}

.staff-auth,
.staff-state {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
}

.staff-auth__panel,
.staff-state__panel,
.staff-panel {
  background: var(--staff-card);
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
  box-shadow: var(--staff-shadow);
}

.staff-auth__panel,
.staff-state__panel {
  width: min(480px, 100%);
  padding: 28px;
  border-top: 4px solid var(--staff-orange);
}

.staff-kicker {
  margin: 0 0 6px;
  color: var(--staff-orange);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  color: var(--staff-purple-900);
  font-family: var(--staff-font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 6px;
  color: var(--staff-purple-900);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  color: var(--staff-purple-900);
  font-size: 1rem;
}

.staff-copy,
.staff-sync,
.staff-summary {
  color: var(--staff-muted);
}

.staff-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.staff-form label,
.staff-search label {
  color: var(--staff-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.staff-form input,
.staff-search input {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--staff-border);
  border-radius: var(--staff-radius);
  padding: 10px 12px;
  background: #fff;
}

.staff-btn {
  min-height: 44px;
  border: 1.5px solid transparent;
  border-radius: var(--staff-radius);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

.staff-btn[disabled] {
  cursor: progress;
  opacity: .68;
}

.staff-btn--primary {
  color: #fff;
  background: var(--staff-purple-700);
}

.staff-btn--ghost {
  color: var(--staff-purple-700);
  background: #fff;
  border-color: var(--staff-border);
}

.staff-message {
  min-height: 22px;
  margin-top: 16px;
  color: var(--staff-muted);
}

.staff-message.is-error,
.staff-status.is-error {
  color: var(--staff-red);
}

.staff-status {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  max-width: min(420px, calc(100% - 32px));
  padding: 10px 14px;
  border-radius: var(--staff-radius);
  background: #fff;
  box-shadow: 0 8px 30px rgba(36, 0, 70, .16);
  color: var(--staff-muted);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.staff-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.staff-shell {
  display: grid;
  gap: 18px;
}

.staff-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 10px;
}

.staff-topbar h1 {
  margin-bottom: 0;
}

.staff-segments,
.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-segment {
  min-height: 44px;
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
  padding: 10px 14px;
  background: #fff;
  color: var(--staff-purple-900);
  cursor: pointer;
  font-weight: 800;
}

.staff-segment.is-active {
  border-color: var(--staff-purple-700);
  box-shadow: inset 0 -3px 0 var(--staff-orange);
}

.staff-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  background: #fff;
  border-top: 1px solid var(--staff-border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(36, 0, 70, .06);
}

.staff-tabs__inner {
  display: flex;
  width: min(1180px, 100%);
}

.staff-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 60px;
  border: 0;
  background: transparent;
  padding: 8px 4px 6px;
  color: var(--staff-muted);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
}

.staff-tab svg {
  stroke: currentColor;
}

.staff-tab.is-active {
  color: var(--staff-purple-700);
}

.staff-panel {
  padding: 22px;
}

.staff-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.staff-list,
.staff-resource-grid {
  display: grid;
  gap: 12px;
}

.staff-resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.staff-card {
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
  padding: 16px;
  background: #fff;
}

.staff-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.staff-card p {
  color: var(--staff-muted);
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.staff-pill--current {
  color: var(--staff-green);
  background: #ecfdf3;
}

.staff-pill--due_soon,
.staff-pill--required {
  color: var(--staff-yellow);
  background: #fffbeb;
}

.staff-pill--expired,
.staff-pill--overdue,
.staff-pill--missing {
  color: var(--staff-red);
  background: #fef2f2;
}

.staff-pill--info {
  color: var(--staff-blue);
  background: #e0f2fe;
}

.staff-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.staff-empty {
  border: 1px dashed var(--staff-border);
  border-radius: var(--staff-radius);
  padding: 18px;
  color: var(--staff-muted);
  background: rgba(255, 255, 255, .72);
}

.staff-search {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.staff-ring-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.staff-ring {
  width: 54px;
  height: 54px;
  flex: none;
}

.staff-ring-row .staff-summary {
  font-family: var(--staff-font-display);
  font-size: 1.05rem;
  color: var(--staff-purple-900);
}

.staff-resource-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--staff-purple-50);
  color: var(--staff-purple-700);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  flex: none;
}

@media (max-width: 780px) {
  .staff-root {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .staff-topbar,
  .staff-panel__head {
    display: grid;
  }

  .staff-resource-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.15rem;
  }
}

@media (min-width: 781px) and (max-width: 1040px) {
  .staff-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
