/* Willoughby brand
   Logo orange ~ #FF791C, charcoal ~ #33302D
   #FF791C  primary
   #CC7A3F  secondary
   #996D4E  tertiary
   #665548  muted
   #33302D  ink
*/

:root,
[data-bs-theme="light"] {
  --bs-primary: #ff791c;
  --bs-primary-rgb: 255, 121, 28;
  --bs-secondary: #cc7a3f;
  --bs-secondary-rgb: 204, 122, 63;
  --bs-body-color: #33302d;
  --bs-body-bg: #f7f1eb;
  --bs-emphasis-color: #33302d;
  --bs-secondary-color: #665548;
  --bs-tertiary-bg: #efe6dc;
  --bs-border-color: #d4c4b5;
  --bs-link-color: #cc7a3f;
  --bs-link-hover-color: #996d4e;
  --staff-panel: #ffffff;
  --staff-ink: #33302d;
  --staff-muted: #665548;
  --staff-accent: #ff791c;
  --staff-accent-2: #cc7a3f;
  --staff-warm: #996d4e;
}

[data-bs-theme="dark"] {
  --bs-primary: #ff791c;
  --bs-primary-rgb: 255, 121, 28;
  --bs-secondary: #cc7a3f;
  --bs-secondary-rgb: 204, 122, 63;
  --bs-body-color: #f3ebe3;
  --bs-body-bg: #33302d;
  --bs-emphasis-color: #f7f1eb;
  --bs-secondary-color: #cc7a3f;
  --bs-tertiary-bg: #3f3b37;
  --bs-border-color: #665548;
  --bs-link-color: #ff791c;
  --bs-link-hover-color: #cc7a3f;
  --staff-panel: #3f3b37;
  --staff-ink: #f3ebe3;
  --staff-muted: #cc7a3f;
  --staff-accent: #ff791c;
  --staff-accent-2: #cc7a3f;
  --staff-warm: #996d4e;
}

html {
  min-height: 100%;
  min-height: 100dvh;
  background-color: var(--bs-body-bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bs-body-bg);
  background-image: radial-gradient(
    900px 420px at 8% -10%,
    color-mix(in srgb, var(--bs-primary) 18%, transparent),
    transparent
  );
}

.staff-shell {
  flex: 1 0 auto;
  width: 100%;
}

.btn-primary {
  --bs-btn-bg: #ff791c;
  --bs-btn-border-color: #ff791c;
  --bs-btn-hover-bg: #e56a12;
  --bs-btn-hover-border-color: #e56a12;
  --bs-btn-active-bg: #cc7a3f;
  --bs-btn-active-border-color: #cc7a3f;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
}

.btn-outline-primary {
  --bs-btn-color: #ff791c;
  --bs-btn-border-color: #ff791c;
  --bs-btn-hover-bg: #ff791c;
  --bs-btn-hover-border-color: #ff791c;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #cc7a3f;
  --bs-btn-active-border-color: #cc7a3f;
}

.nav-pills .nav-link {
  color: var(--staff-muted);
}

.nav-pills .nav-link.active {
  background-color: var(--bs-primary);
  color: #fff;
}

.staff-header-utils {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--bs-border-color);
}

.staff-icon-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  line-height: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  background: var(--staff-panel, var(--bs-body-bg));
  color: var(--staff-muted);
  text-decoration: none;
  cursor: pointer;
}

.staff-icon-btn:hover {
  color: var(--staff-ink);
  border-color: color-mix(in srgb, var(--staff-accent) 55%, var(--bs-border-color));
  background: color-mix(in srgb, var(--staff-accent) 8%, var(--staff-panel, var(--bs-body-bg)));
}

.staff-icon-btn.active {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.staff-icon-btn.active:hover {
  color: #fff;
  border-color: var(--bs-primary);
  background-color: var(--bs-primary);
}

.staff-theme-icon-sun {
  display: block;
}

.staff-theme-icon-moon {
  display: none;
}

[data-bs-theme="dark"] .staff-theme-icon-sun {
  display: none;
}

[data-bs-theme="dark"] .staff-theme-icon-moon {
  display: block;
}

.staff-card {
  background: var(--staff-panel);
  border-color: var(--bs-border-color) !important;
}

.staff-brand {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  color: var(--staff-ink);
  letter-spacing: -0.03em;
}

.staff-brand .staff-brand-accent,
.staff-brand-app {
  color: var(--staff-ink);
}

.staff-logo {
  display: inline-block;
  object-fit: contain;
  border-radius: 22%;
}

.staff-logo-lg {
  width: 5.5rem;
  height: 5.5rem;
}

.staff-logo-sm {
  width: 2.25rem;
  height: 2.25rem;
}

.staff-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
  color: inherit;
  text-decoration: none;
}

a.staff-brand-lockup:hover .staff-brand-app {
  color: var(--staff-accent);
}

.staff-brand-app {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.staff-task-card .card-body {
  position: relative;
  padding-right: 2.5rem;
  padding-bottom: 1.85rem;
}

.staff-task-card.is-hidden {
  opacity: 0.55;
  cursor: pointer;
}

.staff-task-card.is-hidden:hover {
  opacity: 0.72;
}

.staff-task-card.is-hidden .card-body {
  padding-bottom: 0.7rem;
  padding-right: 1rem;
}

.staff-task-card.is-hidden .staff-task-title {
  margin-bottom: 0 !important;
}

.staff-task-card.is-hidden .staff-task-title-text {
  color: var(--staff-muted);
  font-weight: 600;
}

.staff-task-card.is-hidden .staff-task-meta,
.staff-task-card.is-hidden .staff-task-footer,
.staff-task-card.is-hidden .staff-task-hide,
.staff-task-card.is-hidden .staff-task-open,
.staff-task-card.is-hidden .staff-task-due {
  display: none;
}

.staff-task-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.staff-task-due {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--staff-muted);
  white-space: nowrap;
}

.staff-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}

.staff-imp-meter {
  --imp-n: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  padding: 4px 0;
  line-height: 0;
}

.staff-imp-bar {
  appearance: none;
  width: 8px;
  height: 15px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.staff-imp-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--staff-muted) 40%, var(--bs-border-color));
  transition: height 0.12s ease, margin-top 0.12s ease, background-color 0.15s ease;
}

.staff-imp-bar.is-on::after {
  background: color-mix(
    in srgb,
    var(--staff-accent) calc((var(--imp-n) - 1) * 16%),
    #c4b8ae
  );
}

[data-bs-theme="dark"] .staff-imp-bar.is-on::after {
  background: color-mix(
    in srgb,
    var(--staff-accent) calc((var(--imp-n) - 1) * 16%),
    #665548
  );
}

.staff-imp-bar:hover::after,
.staff-imp-bar:focus-visible::after {
  height: 5px;
  margin-top: -2.5px;
}

.staff-imp-meter:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--staff-accent) 55%, transparent);
  outline-offset: 3px;
  border-radius: 2px;
}

.staff-task-directive {
  min-width: 0;
}

.staff-task-footer {
  position: absolute;
  left: 1rem;
  bottom: 0.35rem;
  display: flex;
  align-items: center;
}

.staff-task-hide {
  appearance: none;
  position: absolute;
  right: 2.55rem;
  bottom: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--staff-muted);
  opacity: 0.65;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.staff-task-hide.is-end {
  right: 0.65rem;
}

.staff-task-hide:hover,
.staff-task-hide:focus-visible {
  opacity: 1;
  color: var(--staff-ink);
  background: color-mix(in srgb, var(--staff-muted) 12%, transparent);
  outline: none;
}

.staff-task-open {
  position: absolute;
  right: 0.65rem;
  bottom: 0.45rem;
}

.staff-task-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.staff-task-tab {
  appearance: none;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--staff-muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.staff-task-tab:hover:not(:disabled) {
  color: var(--staff-ink);
  border-color: color-mix(in srgb, var(--staff-accent) 35%, var(--bs-border-color));
}

.staff-task-tab.active {
  color: var(--staff-ink);
  border-color: color-mix(in srgb, var(--staff-accent) 45%, var(--bs-border-color));
  background: color-mix(in srgb, var(--staff-accent) 12%, transparent);
}

.staff-task-tab.is-past-due.has-items {
  color: #c62828;
  border-color: color-mix(in srgb, #c62828 45%, var(--bs-border-color));
}

.staff-task-tab.is-past-due.has-items.active {
  background: color-mix(in srgb, #c62828 14%, transparent);
  color: #b71c1c;
}

[data-bs-theme="dark"] .staff-task-tab.is-past-due.has-items,
[data-theme="dark"] .staff-task-tab.is-past-due.has-items {
  color: #ff8a80;
  border-color: color-mix(in srgb, #ff8a80 40%, var(--bs-border-color));
}

[data-bs-theme="dark"] .staff-task-tab.is-past-due.has-items.active,
[data-theme="dark"] .staff-task-tab.is-past-due.has-items.active {
  background: color-mix(in srgb, #ff8a80 16%, transparent);
  color: #ffab91;
}

.staff-task-tab.is-empty,
.staff-task-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--staff-muted);
}

.staff-task-tab-count {
  font-weight: 700;
}

.staff-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  align-items: baseline;
}

.staff-mode-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.15rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--staff-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.staff-mode-tab:hover {
  color: var(--staff-ink);
}

.staff-mode-tab.active {
  color: var(--staff-ink);
  border-bottom-color: var(--staff-accent);
}

.staff-today-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.staff-period-wrap {
  position: relative;
  flex: 0 1 11rem;
  width: 11rem;
  max-width: 11rem;
  margin-left: auto;
}

button.staff-day-timeline {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  display: block;
  padding: 0.7rem 0 0.15rem;
  cursor: pointer;
  color: var(--staff-ink);
  text-align: left;
  font: inherit;
  overflow: visible;
}

.staff-day-timeline:hover .staff-day-timeline-track,
.staff-day-timeline[aria-expanded="true"] .staff-day-timeline-track {
  background: color-mix(in srgb, var(--staff-ink) 16%, var(--bs-border-color));
}

.staff-day-timeline-track {
  position: relative;
  display: block;
  height: 3px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--staff-ink) 14%, var(--bs-border-color));
}

.staff-day-timeline-work-host {
  position: absolute;
  inset: -2px 0;
  pointer-events: none;
}

.staff-day-timeline-work {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  background: var(--staff-accent);
}

.staff-day-timeline-pin {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  width: 0;
  height: 0;
  pointer-events: none;
  color: var(--staff-ink);
}

.staff-day-timeline-pin::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px var(--staff-panel, var(--bs-body-bg));
}

.staff-day-timeline-pin-mark {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: translate(-50%, calc(-100% - 0.38rem));
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid currentColor;
}

.staff-period-details {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 20;
  min-width: 14rem;
  max-width: min(22rem, 80vw);
  padding: 0.7rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid var(--bs-border-color);
  background: var(--staff-panel, var(--bs-body-bg));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--staff-ink) 12%, transparent);
}

.staff-period-details-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0;
}

.staff-gap-headline {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.staff-wn-headline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.staff-wn-headline > svg {
  flex-shrink: 0;
  color: var(--staff-warm);
}

.staff-wn-headline .staff-gap-headline {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.staff-mode-lead {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.staff-replan-slot {
  margin-left: auto;
  flex-shrink: 0;
}

.staff-section-rule {
  border: 0;
  border-top: 1px solid var(--bs-border-color);
  margin: 1.2rem 0 1.1rem;
}

.staff-missed {
  line-height: 1.45;
}

.staff-wn-options {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--staff-muted);
  font-size: 0.875rem;
}

.staff-spotlight-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--staff-accent);
  margin-bottom: 0.15rem;
}

.staff-spotlight-meeting {
  border-left: 3px solid color-mix(in srgb, var(--staff-accent) 55%, transparent);
  padding: 0.55rem 0.75rem 0.55rem 0.85rem;
  background: color-mix(in srgb, var(--staff-accent) 5%, transparent);
}

.staff-spotlight-meeting.is-next {
  border-left-color: var(--staff-accent);
  background: color-mix(in srgb, var(--staff-accent) 8%, transparent);
}

.staff-spotlight-meeting.is-focus {
  border-left-style: dashed;
  border-left-color: color-mix(in srgb, var(--staff-ink) 45%, var(--staff-accent));
  background: transparent;
}

.staff-spotlight-body {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.staff-spotlight-title {
  font-size: 0.95rem;
}

.staff-meeting-notes-open,
.staff-meeting-notes-details {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--staff-accent) 22%, var(--bs-border-color));
}

.staff-meeting-notes-heading {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.staff-meeting-notes-label {
  font-size: 0.8rem;
  color: var(--staff-muted);
  margin-bottom: 0.4rem;
}

.staff-meeting-notes-details > summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--staff-ink);
  list-style: none;
}

.staff-meeting-notes-details > summary::-webkit-details-marker {
  display: none;
}

.staff-meeting-notes-details > summary::before {
  content: "▸ ";
  color: var(--staff-accent);
}

.staff-meeting-notes-details[open] > summary::before {
  content: "▾ ";
}

.staff-meeting-notes-details .staff-meeting-notes {
  margin-top: 0.5rem;
}

.staff-meeting-card .staff-meeting-notes-details,
.staff-meeting-card .staff-meeting-notes-open {
  margin-top: 0.65rem;
}

.staff-meeting-notes textarea {
  resize: vertical;
  min-height: 6rem;
}

.staff-wn-task {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.staff-wn-task-inner {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.35rem 0;
}

.staff-focus-kind {
  flex-shrink: 0;
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  line-height: 1.2;
}

.staff-focus-kind-do {
  color: #fff;
  background: var(--staff-accent);
}

.staff-focus-kind-think,
.staff-focus-kind-look {
  color: var(--staff-ink);
  background: color-mix(in srgb, var(--staff-accent) 18%, transparent);
}

.staff-compose-compact {
  opacity: 0.88;
  max-width: 32rem;
  padding-top: 0.35rem;
}

.staff-mail-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--staff-accent) 14%, transparent);
  color: var(--staff-ink);
}

.staff-mail-badge.is-reply {
  background: color-mix(in srgb, var(--staff-accent) 28%, transparent);
  color: var(--staff-accent);
}

.staff-mail-badge.is-work {
  background: color-mix(in srgb, var(--staff-ink) 8%, transparent);
}

.staff-mail-badge.is-moved {
  background: color-mix(in srgb, var(--staff-accent) 12%, transparent);
  color: var(--staff-accent);
}

.staff-mail-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.staff-mail-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.1rem;
}

.staff-mail-move-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--staff-muted);
}

.staff-mail-move-text {
  white-space: nowrap;
}

.staff-mail-move {
  margin: 0;
  padding: 0.08rem 0.3rem;
  font-size: 0.68rem;
  line-height: 1.3;
  height: auto;
  min-height: 0;
  width: auto;
  max-width: 7.5rem;
  border-color: color-mix(in srgb, var(--staff-ink) 12%, var(--bs-border-color));
  background: color-mix(in srgb, var(--staff-ink) 3%, transparent);
  color: var(--staff-muted);
}

.staff-mail-move:focus {
  border-color: color-mix(in srgb, var(--staff-accent) 40%, var(--bs-border-color));
  box-shadow: none;
}

.staff-mail-reanalyze {
  line-height: 1;
  padding: 0.25rem 0.4rem;
}

.staff-mail-reanalyze.is-spinning svg {
  animation: staff-mail-spin 0.8s linear infinite;
}

.staff-mail-reanalyze-pending {
  color: var(--staff-accent);
  border-color: color-mix(in srgb, var(--staff-accent) 45%, var(--bs-border-color));
}

@keyframes staff-mail-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.staff-mail-section-title {
  font-family: var(--staff-font-display, inherit);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  margin: 0 0 0.65rem;
  color: var(--staff-ink);
}

.staff-mail-section.is-attention .staff-mail-section-title {
  color: var(--staff-accent);
}

.staff-mail-section.is-ignore {
  opacity: 0.78;
}

.staff-mail-why {
  color: color-mix(in srgb, var(--staff-accent) 75%, var(--staff-ink));
  font-style: italic;
}

.staff-patterns-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.staff-pattern-chip {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--staff-accent) 35%, var(--bs-border-color));
  background: color-mix(in srgb, var(--staff-accent) 8%, transparent);
  color: var(--staff-ink);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 0.35rem;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}

.staff-pattern-chip:hover {
  border-color: var(--staff-accent);
  background: color-mix(in srgb, var(--staff-accent) 14%, transparent);
}

.staff-pattern-chip .staff-pattern-imp {
  font-weight: 700;
  color: var(--staff-accent);
  margin-right: 0.25rem;
}

.staff-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 10rem;
  padding: 2rem 1rem;
  color: var(--staff-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.staff-loading.is-hidden,
.staff-loading.d-none {
  display: none;
}

.staff-loading-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2.5px solid color-mix(in srgb, var(--staff-accent) 25%, transparent);
  border-top-color: var(--staff-accent);
  border-radius: 50%;
  animation: staff-spin 0.7s linear infinite;
}

@keyframes staff-spin {
  to {
    transform: rotate(360deg);
  }
}

.staff-chat > .card-body {
  padding: 0.75rem;
}

.staff-chat-log {
  max-height: 16rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.staff-chat-log:empty {
  display: none;
}

.staff-chat-log:not(:empty) {
  margin-bottom: 0.75rem;
}

.staff-chat-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.staff-chat-status:not(.d-none)::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--staff-accent);
  animation: staff-chat-pulse 1s ease-in-out infinite;
}

#chat-form.is-busy #chat-input {
  opacity: 0.92;
}

.staff-pattern-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes staff-chat-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.staff-weekday-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.staff-asana-advanced {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--bs-border-color);
}

.staff-advanced-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--staff-accent);
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.staff-advanced-toggle:hover,
.staff-advanced-toggle:focus-visible {
  color: var(--staff-accent-2);
  outline: none;
}

.staff-advanced-chevron {
  display: block;
  transition: transform 0.15s ease;
}

.staff-advanced-toggle[aria-expanded="true"] .staff-advanced-chevron {
  transform: rotate(180deg);
}

.staff-advanced-panel {
  margin-top: 0.75rem;
}

.staff-asana-account {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--staff-ink);
}

.staff-asana-ws {
  margin-bottom: 0.65rem;
}

.staff-asana-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
}

.staff-asana-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.staff-asana-projects {
  margin: 0.35rem 0 0 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.staff-asana-ws.is-off .staff-asana-projects {
  opacity: 0.45;
}

.staff-asana-empty {
  font-size: 0.8rem;
  color: var(--staff-muted);
  margin: 0;
}

.staff-stub-row {
  padding: 0.65rem 0.75rem;
  border-radius: 0.4rem;
  background: var(--bs-tertiary-bg);
}


#login-view .card {
  max-width: 420px;
}

.staff-landing-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--bs-border-color) 80%, transparent);
}

.staff-landing-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.staff-landing-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.staff-landing {
  padding: 2.5rem 0 3.5rem;
}

.staff-landing-banner {
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--staff-accent) 28%, var(--bs-border-color));
  background: color-mix(in srgb, var(--staff-accent) 10%, var(--staff-panel));
  color: var(--staff-ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.staff-landing-banner.is-warning {
  border-color: color-mix(in srgb, var(--bs-warning) 35%, var(--bs-border-color));
  background: color-mix(in srgb, var(--bs-warning) 12%, var(--staff-panel));
}

.staff-landing-banner.is-danger {
  border-color: color-mix(in srgb, var(--bs-danger) 35%, var(--bs-border-color));
  background: color-mix(in srgb, var(--bs-danger) 10%, var(--staff-panel));
}

.staff-landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.staff-landing-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--staff-warm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.staff-landing-headline {
  margin: 0 0 1rem;
  font-family: Nunito, system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--staff-ink);
}

.staff-landing-lede {
  margin: 0 0 1rem;
  max-width: 36rem;
  color: var(--staff-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.staff-landing-sublede {
  margin: 0;
  max-width: 36rem;
  color: var(--staff-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.staff-landing-invite {
  border: 1px solid color-mix(in srgb, var(--staff-accent) 18%, var(--bs-border-color));
}

.staff-landing-invite-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.staff-landing-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.staff-landing-feature h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (max-width: 991.98px) {
  .staff-landing-hero {
    grid-template-columns: 1fr;
  }

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

.text-staff-muted {
  color: var(--staff-muted) !important;
}

.stat-label {
  color: var(--staff-muted);
  font-size: 0.85rem;
}

.section-label {
  color: var(--staff-warm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
}

.staff-settings {
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.staff-settings-head {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--staff-accent) 22%, var(--bs-border-color));
}

.staff-settings-head h2 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--staff-ink);
}

.staff-settings-head p {
  margin: 0;
  color: var(--staff-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.staff-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: var(--bs-body-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--bs-border-color) 80%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--staff-ink) 4%, transparent);
  transition: box-shadow 0.18s ease, background-color 0.18s ease;
}

.staff-header.is-compact {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--staff-ink) 8%, transparent);
}

.staff-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  padding-bottom: 0.7rem;
  transition: padding 0.18s ease;
}

.staff-header.is-compact .staff-header-inner {
  padding-top: calc(0.35rem + env(safe-area-inset-top, 0px));
  padding-bottom: 0.35rem;
  gap: 0.35rem 0.75rem;
}

.staff-header-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
  min-width: 0;
}

.staff-header .staff-brand-lockup {
  margin-bottom: 0;
  flex-shrink: 0;
}

.staff-header .staff-logo-sm {
  width: 2.15rem;
  height: 2.15rem;
  transition: width 0.18s ease, height 0.18s ease;
}

.staff-header.is-compact .staff-logo-sm {
  width: 1.7rem;
  height: 1.7rem;
}

.staff-header .staff-brand-app {
  font-size: 1.02rem;
  transition: font-size 0.18s ease;
}

.staff-header.is-compact .staff-brand-app {
  font-size: 0.92rem;
}

.staff-header-sync {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.55rem;
  min-width: 0;
}

.staff-sync-ago {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--staff-muted);
}

.staff-sync-ago-short {
  display: none;
}

.staff-sync-progress {
  width: 5.75rem;
  height: 0.38rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--staff-ink) 12%, var(--bs-border-color));
  overflow: hidden;
  flex-shrink: 0;
}

.staff-sync-progress.d-none {
  display: none;
}

.staff-sync-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--staff-accent);
  transition: width 0.28s ease;
}

.staff-header.is-compact .staff-sync-ago-full {
  display: none;
}

.staff-header.is-compact .staff-sync-ago-short {
  display: inline;
}

.staff-header.is-compact .staff-sync-progress {
  width: 3.9rem;
  height: 0.3rem;
}

.staff-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-left: auto;
}

.staff-header.is-compact .nav-pills .nav-link {
  padding: 0.28rem 0.7rem;
  font-size: 0.875rem;
}

.staff-header.is-compact .staff-icon-btn {
  width: 1.85rem;
  height: 1.85rem;
}

@media (max-width: 767.98px) {
  .staff-header-actions {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {
  .staff-sync-ago-full {
    display: none;
  }

  .staff-sync-ago-short {
    display: inline;
  }
}

.staff-compose {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  max-width: 28rem;
}

.staff-compose-form {
  display: flex;
  flex: 1 1 12rem;
  gap: 0.4rem;
  min-width: 0;
}

.staff-compose-form .form-control {
  min-height: 2rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.staff-ahead-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.staff-ahead-heading svg {
  flex-shrink: 0;
  color: var(--staff-warm);
}

.staff-ahead-tasks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.staff-ahead-tasks-head .staff-compose {
  max-width: 18rem;
  margin-bottom: 0;
  margin-left: auto;
}

.staff-icon-btn.is-refreshing svg {
  animation: staff-sync-spin 0.85s linear infinite;
}

.staff-icon-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.staff-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-weight: 600;
  --bs-btn-padding-y: 0.22rem;
  --bs-btn-padding-x: 0.55rem;
  --bs-btn-font-size: 0.78rem;
  --bs-btn-border-radius: 0.4rem;
  --bs-btn-color: #fff;
  --bs-btn-bg: #665548;
  --bs-btn-border-color: #665548;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #33302d;
  --bs-btn-hover-border-color: #33302d;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #33302d;
  --bs-btn-active-border-color: #33302d;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #665548;
  --bs-btn-disabled-border-color: #665548;
}

.staff-header.is-compact .staff-sync-btn {
  --bs-btn-padding-y: 0.14rem;
  --bs-btn-padding-x: 0.45rem;
  --bs-btn-font-size: 0.72rem;
}

[data-bs-theme="dark"] .staff-sync-btn {
  --bs-btn-color: #33302d;
  --bs-btn-bg: #e8d5c4;
  --bs-btn-border-color: #e8d5c4;
  --bs-btn-hover-color: #33302d;
  --bs-btn-hover-bg: #f3ebe3;
  --bs-btn-hover-border-color: #f3ebe3;
  --bs-btn-active-color: #33302d;
  --bs-btn-active-bg: #f3ebe3;
  --bs-btn-active-border-color: #f3ebe3;
  --bs-btn-disabled-color: #33302d;
  --bs-btn-disabled-bg: #e8d5c4;
  --bs-btn-disabled-border-color: #e8d5c4;
}

.staff-sync-icon {
  flex-shrink: 0;
}

.staff-sync-btn.is-syncing .staff-sync-icon {
  animation: staff-sync-spin 0.85s linear infinite;
}

.staff-sync-btn:disabled {
  opacity: 0.85;
}

@keyframes staff-sync-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.staff-meetings-list {
  display: flex;
  flex-direction: column;
}

.staff-meeting-card {
  margin-bottom: 0.5rem;
}

.staff-meeting-card:last-child {
  margin-bottom: 0;
}

.staff-meeting-card.is-followed-tight {
  margin-bottom: calc(0.15rem - 1px);
}

.staff-meeting-card.is-muted {
  opacity: 0.42;
  box-shadow: none !important;
}

.staff-meeting-card.is-declined {
  opacity: 0.38;
}

.staff-meeting-declined-body {
  padding: 0.35rem 0.65rem !important;
}

.staff-meeting-declined-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.25;
}

.staff-meeting-declined-title {
  font-weight: 500;
  color: var(--staff-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(14rem, 42vw);
}

.staff-meeting-declined-badge {
  flex-shrink: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--staff-muted);
}

.staff-meeting-declined-when {
  flex-shrink: 0;
  color: var(--staff-muted);
}

.staff-meeting-card.is-declined .staff-meeting-open {
  width: 1.4rem;
  height: 1.4rem;
}

.staff-meeting-card.is-muted .fw-semibold {
  font-weight: 500 !important;
}

.staff-meeting-note {
  font-size: 0.75rem;
  color: var(--staff-muted);
}

.staff-meeting-countdown {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--staff-accent);
}

.staff-meeting-card:not(.is-next) .staff-meeting-countdown {
  font-weight: 500;
  color: var(--staff-muted);
}

.staff-meeting-card.is-next {
  border-color: color-mix(in srgb, var(--staff-accent) 45%, var(--bs-border-color)) !important;
}

.staff-meeting-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.35rem;
  color: var(--staff-accent-2);
  opacity: 0.72;
  transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.staff-meeting-open:hover,
.staff-meeting-open:focus-visible {
  opacity: 1;
  color: var(--staff-accent);
  background: color-mix(in srgb, var(--staff-accent) 12%, transparent);
  outline: none;
}

.staff-meeting-card.is-muted .staff-meeting-open {
  opacity: 0.5;
}

.staff-missed {
  max-width: 42rem;
  line-height: 1.45;
}

.staff-focus-kind {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3rem;
  background: var(--bs-tertiary-bg);
  color: var(--staff-muted);
}

.staff-focus-kind-do {
  background: color-mix(in srgb, var(--staff-accent) 18%, transparent);
  color: var(--staff-accent);
}

.staff-focus-kind-look {
  background: color-mix(in srgb, var(--staff-accent-2) 18%, transparent);
  color: var(--staff-accent-2);
}

.staff-focus-kind-think {
  background: color-mix(in srgb, var(--staff-warm) 22%, transparent);
  color: var(--staff-warm);
}

.staff-chat-msg-user .staff-chat-bubble {
  margin-left: auto;
  background: color-mix(in srgb, var(--staff-accent) 16%, var(--staff-panel));
  border-radius: 0.75rem 0.75rem 0.2rem 0.75rem;
  padding: 0.55rem 0.75rem;
  max-width: 90%;
}

.staff-chat-msg-assistant .staff-chat-bubble {
  margin-right: auto;
  background: var(--bs-tertiary-bg);
  border-radius: 0.75rem 0.75rem 0.75rem 0.2rem;
  padding: 0.55rem 0.75rem;
  max-width: 90%;
}

.staff-chat-cites {
  font-size: 0.75rem;
  color: var(--staff-muted);
  margin-top: 0.25rem;
}

.staff-legal {
  max-width: 48rem;
}

.staff-legal-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.staff-legal-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.staff-legal-nav a[aria-current="page"] {
  font-weight: 800;
  color: var(--staff-ink);
  text-decoration: none;
}

.staff-legal-prose h1 {
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.staff-legal-prose h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 1.6rem;
  margin-bottom: 0.5rem;
}

.staff-legal-prose h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1rem;
}

.staff-legal-prose p,
.staff-legal-prose li {
  line-height: 1.6;
}

.staff-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.7rem 1.25rem 0.9rem;
  background: color-mix(in srgb, var(--staff-panel) 72%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--staff-accent) 20%, var(--bs-border-color));
}

.staff-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.7rem;
  max-width: 72rem;
  margin: 0 auto;
}

.staff-footer-brand,
.staff-footer-nav a {
  color: var(--staff-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.staff-footer-brand {
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: none;
  color: color-mix(in srgb, var(--staff-ink) 58%, var(--staff-muted));
}

.staff-footer-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.staff-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--staff-accent);
  opacity: 0.45;
  flex-shrink: 0;
}

.staff-footer-brand:hover,
.staff-footer-nav a:hover {
  color: var(--staff-accent);
}

.staff-footer-brand:focus-visible,
.staff-footer-nav a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--staff-accent) 65%, transparent);
  outline-offset: 3px;
  border-radius: 2px;
}

.staff-footer-nav a[aria-current="page"] {
  color: color-mix(in srgb, var(--staff-ink) 72%, var(--staff-muted));
}

.staff-admin-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.staff-admin-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.staff-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}

.staff-kpi {
  background: var(--staff-panel);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.7rem;
  padding: 0.85rem 0.95rem;
}

.staff-kpi-value {
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
}

.staff-kpi-label {
  font-size: 0.75rem;
  color: var(--staff-muted);
  margin-top: 0.2rem;
}

.staff-entity-pills,
.staff-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  color: var(--staff-muted);
}

.staff-pill.is-on {
  background: color-mix(in srgb, var(--staff-accent) 16%, transparent);
  color: var(--staff-ink);
}

.staff-pill.is-off {
  opacity: 0.55;
}

.staff-admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 992px) {
  .staff-admin-split {
    grid-template-columns: 1fr;
  }
}

.staff-admin-filter {
  max-width: 16rem;
}

.staff-admin-table {
  font-size: 0.85rem;
}

.staff-admin-table tbody tr {
  cursor: pointer;
}

.staff-admin-table tbody tr.is-selected {
  background: color-mix(in srgb, var(--staff-accent) 12%, transparent);
}

.staff-admin-user {
  font-weight: 700;
}

.staff-admin-kv th {
  width: 9.5rem;
  color: var(--staff-muted);
  font-weight: 600;
}

.staff-admin-json {
  font-size: 0.72rem;
  max-height: 28rem;
  overflow: auto;
  background: var(--bs-tertiary-bg);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.staff-admin-list {
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
