/* SkyEdge staff area — MatDash-inspired (Dashboard2 layout) */

.staff-body {
  --staff-primary: 0, 20, 137;
  --staff-accent: 0, 87, 255;
  --staff-secondary: 20, 233, 226;
  --staff-success: 54, 199, 108;
  --staff-warning: 255, 214, 72;
  --staff-error: 255, 102, 146;
  --staff-text: 10, 37, 64;
  --staff-text-muted: 123, 136, 147;
  --staff-border: 224, 230, 235;
  --staff-bg: 244, 247, 251;
  --staff-surface: 255, 255, 255;
  --staff-hover: 246, 249, 252;
  --staff-light-primary: 213, 221, 252;
  --staff-light-secondary: 208, 251, 249;
  --staff-light-success: 225, 247, 233;
  --staff-light-warning: 255, 247, 218;
  --staff-grey100: 234, 239, 244;
  --staff-radius: 8px;
  --staff-radius-lg: 8px;
  --staff-shadow: 0 17px 20px -8px rgba(var(--staff-accent), 0.18);
  --staff-shadow-card: 0 2px 4px -1px rgba(175, 182, 201, 0.2);
  --staff-sidebar: 260px;
  --staff-topbar: 70px;
  --staff-font: "Manrope", system-ui, sans-serif;

  margin: 0;
  font-family: var(--staff-font);
  font-size: 15px;
  line-height: 1.6;
  color: rgb(var(--staff-text));
  background: rgb(var(--staff-bg));
}

.staff-body *,
.staff-body *::before,
.staff-body *::after {
  box-sizing: border-box;
}

.staff-body a {
  color: inherit;
  text-decoration: none;
}

/* Body link reset must not beat component tokens: <a class="staff-btn-primary"> needs light text on brand fill */
.staff-body a.staff-btn-primary,
.staff-body a.staff-btn-primary:visited,
.staff-body a.staff-btn-primary:hover,
.staff-body a.staff-btn-primary:focus-visible,
.staff-body a.staff-btn-success,
.staff-body a.staff-btn-success:visited,
.staff-body a.staff-btn-success:hover,
.staff-body a.staff-btn-success:focus-visible,
.staff-body a.staff-login-submit,
.staff-body a.staff-login-submit:visited,
.staff-body a.staff-login-submit:hover,
.staff-body a.staff-login-submit:focus-visible,
.staff-body a.staff-login-submit:focus-visible,
.staff-body a.staff-btn-danger:hover,
.staff-body a.staff-btn-danger:focus-visible {
  color: #fff;
}

.staff-body a.staff-login-link,
.staff-body a.staff-login-link:visited,
.staff-body .staff-login-signup a,
.staff-body .staff-login-signup a:visited {
  color: #0057ff;
}

.staff-body a.staff-login-link:hover,
.staff-body a.staff-login-link:focus-visible,
.staff-body .staff-login-signup a:hover,
.staff-body .staff-login-signup a:focus-visible {
  color: #0046cc;
}

.staff-body img {
  display: block;
  max-width: 100%;
}

.staff-body button,
.staff-body input,
.staff-body select,
.staff-body textarea {
  font: inherit;
}

/* Shell */
.staff-app {
  display: flex;
  min-height: 100vh;
}

.staff-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  width: var(--staff-sidebar);
  height: 100vh;
  padding: 1.25rem 1rem 1.5rem;
  background: rgb(var(--staff-surface));
  border-right: 1px solid rgb(var(--staff-border));
  transition: transform 0.25s ease;
}

.staff-sidebar__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.staff-sidebar__logo img {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.staff-sidebar__logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  margin-bottom: 0;
  padding: 0 0.5rem;
}

.staff-nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.staff-nav-cap {
  margin: 1.5rem 0 0.65rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--staff-text), 0.55);
}

.staff-nav-cap:first-child {
  margin-top: 0;
}

.staff-nav-list {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--staff-radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(var(--staff-text), 0.82);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.staff-nav-list a:hover {
  color: rgb(var(--staff-accent));
}

.staff-nav-list a.is-active {
  background: rgb(var(--staff-accent));
  color: #fff;
  box-shadow: var(--staff-shadow);
}

.staff-nav-list a .iconify,
.staff-nav-list a .staff-nav-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.staff-nav-list a.is-active .iconify,
.staff-nav-list a.is-active .staff-nav-icon {
  opacity: 1;
}

.staff-nav-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #0057ff;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
}

.staff-nav-list a.is-active .staff-nav-badge {
  background: #fff;
  color: #001489;
}

.staff-nav-group {
  display: grid;
  gap: 0.15rem;
}

.staff-nav-sublist {
  display: grid;
  gap: 0.1rem;
  margin: 0 0 0.15rem;
  padding: 0 0 0 1.5rem;
  list-style: none;
}

.staff-nav-sublist a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.staff-nav-sublist__icon {
  flex-shrink: 0;
  opacity: 0.8;
}

.staff-nav-sublist a.is-active .staff-nav-sublist__icon {
  opacity: 1;
}


.staff-sidebar-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(var(--staff-border));
  font-size: 0.88rem;
}

.staff-sidebar-footer p {
  margin: 0 0 0.35rem;
}

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

.staff-main-wrap {
  flex: 1;
  margin-left: var(--staff-sidebar);
  min-width: 0;
}

#staff-swap-root.is-staff-loading {
  opacity: 0.97;
  pointer-events: none;
}

.staff-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--staff-topbar);
  padding: 0 1.5rem;
  background: rgb(var(--staff-surface));
  border-bottom: 1px solid rgb(var(--staff-border));
}

.staff-topbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.staff-topbar__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.staff-topbar__title-link {
  color: inherit;
  text-decoration: none;
}

.staff-topbar__title-link:hover {
  color: #0057ff;
}

.staff-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-grey100));
  color: rgba(var(--staff-text), 0.7);
  cursor: pointer;
}

/* Desktop: sidebar toggle closes; topbar toggle opens when collapsed */
@media (min-width: 992px) {
  .staff-body:not(.staff-sidebar-collapsed) .staff-sidebar .staff-menu-toggle {
    display: inline-flex;
  }

  .staff-body.staff-sidebar-collapsed .staff-topbar .staff-menu-toggle {
    display: inline-flex;
  }
}

/* Tablet/mobile: topbar opens drawer; sidebar toggle closes */
@media (max-width: 991px) {
  .staff-body:not(.sidebar-open) .staff-topbar .staff-menu-toggle {
    display: inline-flex;
  }

  .staff-body.sidebar-open .staff-sidebar .staff-menu-toggle {
    display: inline-flex;
  }
}

.staff-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.staff-topbar .lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.staff-topbar .lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  background: rgba(0, 20, 137, 0.06);
  border: 1px solid rgba(0, 20, 137, 0.12);
  border-radius: var(--staff-radius);
  color: rgba(var(--staff-text), 0.72);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.staff-topbar .lang-btn:hover,
.staff-topbar .lang-btn:focus-visible {
  background: rgba(0, 87, 255, 0.08);
  border-color: rgba(0, 87, 255, 0.35);
  color: #001489;
  outline: none;
}

.staff-topbar .lang-btn .lang-globe {
  width: 17px;
  height: 17px;
}

.staff-topbar .lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 250;
  display: none;
  min-width: 156px;
  padding: 4px;
  overflow: hidden;
  background: rgb(var(--staff-surface));
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  box-shadow: 0 12px 32px rgba(0, 20, 137, 0.12);
}

.staff-topbar .lang-switcher.is-open .lang-dropdown {
  display: block;
}

.staff-topbar .lang-option-form {
  margin: 0;
}

.staff-topbar .lang-option-form + .lang-option-form {
  margin-top: 2px;
}

.staff-topbar .lang-option-form .lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgb(var(--staff-text));
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.staff-topbar .lang-option-form .lang-option:hover,
.staff-topbar .lang-option-form .lang-option:focus-visible {
  background: rgba(0, 87, 255, 0.08);
  color: #001489;
  outline: none;
}

.staff-topbar .lang-option-form .lang-option.active {
  background: rgba(0, 87, 255, 0.12);
  color: #001489;
}

.staff-topbar .lang-flag {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}

.staff-topbar .lang-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.staff-topbar .lang-code {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--staff-text), 0.55);
}

.staff-topbar .lang-option.active .lang-code {
  color: #001489;
}

.staff-topbar__right .language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem;
  border-radius: var(--staff-radius);
  background: rgba(0, 20, 137, 0.06);
  border: 1px solid rgba(0, 20, 137, 0.1);
}

.staff-topbar__right .language-switcher__btn {
  min-width: 2rem;
  padding: 0.3rem 0.5rem;
  border: 0;
  border-radius: var(--staff-radius);
  background: transparent;
  color: #1b1d27;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.staff-topbar__right .language-switcher__btn.is-active {
  background: #001489;
  color: #fff;
}

.staff-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.staff-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(var(--staff-accent), 0.12);
  color: rgb(var(--staff-accent));
  font-weight: 700;
  font-size: 0.9rem;
}

.staff-profile__meta {
  display: none;
  line-height: 1.3;
}

.staff-profile__meta strong {
  display: block;
  font-size: 0.9rem;
}

.staff-profile__meta span {
  font-size: 0.78rem;
  color: rgb(var(--staff-text-muted));
}

.staff-main {
  padding: 1.5rem;
}

.staff-page-wrapper {
  min-height: calc(100vh - var(--staff-topbar) - 3rem);
  padding: 0.5rem 0 2rem;
}

.staff-max-width {
  max-width: 1320px;
  margin: 0 auto;
}

/* Cards */
.staff-card {
  background: rgb(var(--staff-surface));
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius-lg);
  box-shadow: var(--staff-shadow-card);
}

.staff-card--elevated {
  border: 0;
  box-shadow: 0 10px 30px rgba(var(--staff-primary), 0.08);
}

/* Taxonomy lists (categories / subcategories): readable width, not full-bleed */
.staff-card--compact-table {
  width: 100%;
  max-width: 36rem;
}

.staff-card--compact-table-wide {
  max-width: 48rem;
}

@media (max-width: 600px) {
  .staff-card--compact-table,
  .staff-card--compact-table-wide {
    max-width: 100%;
  }
}

.staff-card__header {
  padding: 1.25rem 1.5rem 0;
}

.staff-card__header h2,
.staff-card__header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.staff-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.staff-card__body--flush-top {
  padding-top: 0.75rem;
}

.staff-card__body--attachment {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.staff-card__body--attachment-inline {
  padding: 0;
}

.staff-card-divider {
  height: 1px;
  margin: 0;
  border: 0;
  background: rgb(var(--staff-border));
}

/* Dashboard */
.staff-dash-grid {
  display: grid;
  gap: 1.5rem;
}

.staff-dash-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1.5rem;
}

.staff-welcome-card {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 1.75rem 2rem;
  border: 0;
  border-radius: var(--staff-radius-lg);
  color: #fff;
  background: linear-gradient(261deg, rgb(var(--staff-primary)) 0%, rgb(var(--staff-accent)) 100%);
  box-shadow: var(--staff-shadow);
}

.staff-welcome-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.staff-welcome-badge {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 600;
}

.staff-welcome-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
}

.staff-welcome-card p {
  margin: 0;
  max-width: 28ch;
  font-size: 0.95rem;
  opacity: 0.92;
}

.staff-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  padding: 1.35rem 1.5rem;
  border-radius: var(--staff-radius-lg);
  border: 0;
}

a.staff-stat-card--link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.staff-stat-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27, 29, 39, 0.08);
}

.staff-related-links {
  margin-top: 1rem;
}

.staff-related-links__label {
  margin-bottom: 0.5rem;
}

.staff-btn-row--wrap {
  flex-wrap: wrap;
}

.staff-stat-card--pink {
  background: linear-gradient(180deg, rgba(var(--staff-error), 0.14), rgba(var(--staff-error), 0.04));
}

.staff-stat-card--mint {
  background: linear-gradient(180deg, rgba(var(--staff-secondary), 0.2), rgba(var(--staff-secondary), 0.05));
}

.staff-stat-card--blue {
  background: linear-gradient(180deg, rgba(var(--staff-accent), 0.14), rgba(var(--staff-accent), 0.04));
}

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

.staff-stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-surface));
  color: rgb(var(--staff-accent));
  box-shadow: var(--staff-shadow-card);
}

.staff-stat-card--pink .staff-stat-card__icon {
  color: rgb(var(--staff-error));
}

.staff-stat-card--mint .staff-stat-card__icon {
  color: #0d9b94;
}

.staff-stat-card__label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(var(--staff-text), 0.85);
}

.staff-stat-card__value {
  margin: 0.35rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.staff-stat-card__trend {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgb(var(--staff-text-muted));
}

.staff-dash-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.staff-cash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.staff-cash-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-cash-chart {
  min-width: 0;
}

.staff-cash-chart__canvas-wrap {
  position: relative;
  height: 240px;
  padding: 0 1rem 1rem;
}

@media (max-width: 640px) {
  .staff-cash-charts {
    grid-template-columns: 1fr;
  }
}

.staff-toolbar--cash {
  width: 100%;
}

.staff-toolbar--cash .staff-toolbar__search--wide .staff-input[type="search"] {
  flex: 1 1 8rem;
  min-width: 7rem;
}

.staff-toolbar--cash .staff-toolbar__panel .staff-input[type="date"] {
  flex: 0 1 7.5rem;
  min-width: 7.5rem;
}

.staff-toolbar--cash .staff-toolbar__panel select.staff-input {
  flex: 0 1 8rem;
  min-width: 7.5rem;
  padding: 0.55rem 2rem 0.55rem 0.65rem;
  cursor: pointer;
  appearance: none;
  background-color: rgb(var(--staff-surface));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1D27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.9rem;
}

.staff-toolbar--cash .staff-toolbar__cash-add {
  flex: 0 0 auto;
}

.staff-client-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-client-stats .staff-stat-card__icon--compact {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 0;
}

.staff-client-stats .staff-stat-card__icon--compact .iconify,
.staff-client-stats .staff-stat-card__icon--compact svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
}

.staff-stat-card--indigo {
  background: linear-gradient(180deg, rgba(0, 20, 137, 0.14), rgba(0, 20, 137, 0.04));
}

.staff-stat-card--gold {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.04));
}

.staff-stat-card--indigo .staff-stat-card__icon {
  color: #001489;
}

.staff-stat-card--gold .staff-stat-card__icon {
  color: #b45309;
}

.staff-stat-card__trend--up {
  color: #059669;
}

.staff-stat-card__trend--down {
  color: rgb(var(--staff-error));
}

.staff-toolbar--clients {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.staff-toolbar--clients .staff-toolbar__search--wide {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  min-width: min-content;
}

.staff-toolbar--clients .staff-input {
  width: auto;
  flex: 0 0 auto;
}

.staff-toolbar--clients .staff-toolbar__main .staff-input[type="search"] {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: none;
  width: auto;
}

.staff-toolbar--clients select.staff-input {
  min-width: 8.25rem;
  max-width: 9.5rem;
  padding: 0.55rem 2rem 0.55rem 0.65rem;
  cursor: pointer;
  appearance: none;
  background-color: rgb(var(--staff-surface));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1D27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.9rem;
}

.staff-toolbar--clients .staff-input[type="date"] {
  min-width: 9.25rem;
}

.staff-toolbar--clients .staff-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.staff-client-charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-client-chart__canvas-wrap {
  position: relative;
  height: 240px;
  padding: 0 1rem 1rem;
}

.staff-table-wrap--wide {
  overflow-x: auto;
}

#clients-table.is-staff-table-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.staff-table--clients {
  min-width: 1100px;
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

/* Double class beats later generic .staff-pill color/background resets. */
.staff-pill.staff-pill--type-normal {
  color: #0057FF;
  background: rgba(0, 87, 255, 0.12);
}

.staff-pill.staff-pill--type-partner {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

/* Success / positive */
.staff-pill.staff-pill--status-active,
.staff-pill.staff-pill--status-available,
.staff-pill.staff-pill--status-paid,
.staff-pill.staff-pill--status-received,
.staff-pill.staff-pill--status-resolved,
.staff-pill.staff-pill--status-completed {
  color: #059669;
  background: rgba(5, 150, 105, 0.12);
}

/* In progress / ordered */
.staff-pill.staff-pill--status-ordered,
.staff-pill.staff-pill--status-partial,
.staff-pill.staff-pill--status-in_progress {
  color: #0057FF;
  background: rgba(0, 87, 255, 0.12);
}

/* Waiting / draft / open */
.staff-pill.staff-pill--status-pending,
.staff-pill.staff-pill--status-draft,
.staff-pill.staff-pill--status-open,
.staff-pill.staff-pill--status-on_order,
.staff-pill.staff-pill--status-on_hold {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

/* Negative / closed */
.staff-pill.staff-pill--status-inactive,
.staff-pill.staff-pill--status-cancelled,
.staff-pill.staff-pill--status-overdue,
.staff-pill.staff-pill--status-closed {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
}

/* Status selects (forms + filters) reflect the chosen value */
.staff-input:has(> option[value="active"]:checked),
.staff-input:has(> option[value="available"]:checked),
.staff-input:has(> option[value="paid"]:checked),
.staff-input:has(> option[value="received"]:checked),
.staff-input:has(> option[value="resolved"]:checked),
.staff-input:has(> option[value="completed"]:checked) {
  color: #059669;
  background-color: rgba(5, 150, 105, 0.1);
  font-weight: 600;
}

.staff-input:has(> option[value="ordered"]:checked),
.staff-input:has(> option[value="partial"]:checked),
.staff-input:has(> option[value="in_progress"]:checked) {
  color: #0057FF;
  background-color: rgba(0, 87, 255, 0.1);
  font-weight: 600;
}

.staff-input:has(> option[value="pending"]:checked),
.staff-input:has(> option[value="draft"]:checked),
.staff-input:has(> option[value="open"]:checked),
.staff-input:has(> option[value="on_order"]:checked),
.staff-input:has(> option[value="on_hold"]:checked) {
  color: #b45309;
  background-color: rgba(245, 158, 11, 0.14);
  font-weight: 600;
}

.staff-input:has(> option[value="inactive"]:checked),
.staff-input:has(> option[value="cancelled"]:checked),
.staff-input:has(> option[value="overdue"]:checked),
.staff-input:has(> option[value="closed"]:checked) {
  color: #dc2626;
  background-color: rgba(220, 38, 38, 0.1);
  font-weight: 600;
}

.staff-pill.staff-pill--scope-national {
  color: #0057FF;
  background: rgba(0, 87, 255, 0.12);
}

.staff-pill.staff-pill--scope-international {
  color: #001489;
  background: rgba(0, 20, 137, 0.14);
}

.staff-supplier-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-supplier-stats .staff-stat-card__icon--compact {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 0;
}

.staff-supplier-stats .staff-stat-card__icon--compact .iconify,
.staff-supplier-stats .staff-stat-card__icon--compact svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
}

.staff-toolbar--suppliers {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.staff-toolbar--suppliers .staff-toolbar__search--wide {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  min-width: min-content;
}

.staff-toolbar--suppliers .staff-input {
  width: auto;
  flex: 0 0 auto;
}

.staff-toolbar--suppliers .staff-toolbar__main .staff-input[type="search"] {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: none;
  width: auto;
}

.staff-toolbar--suppliers select.staff-input {
  min-width: 8.25rem;
  max-width: 9.5rem;
  padding: 0.55rem 2rem 0.55rem 0.65rem;
  cursor: pointer;
  appearance: none;
  background-color: rgb(var(--staff-surface));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1D27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.9rem;
}

.staff-toolbar--suppliers .staff-input[type="date"] {
  min-width: 9.25rem;
}

.staff-toolbar--suppliers .staff-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.staff-supplier-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-supplier-chart--wide {
  grid-column: span 1;
}

.staff-supplier-chart__canvas-wrap {
  position: relative;
  height: 240px;
  padding: 0 1rem 1rem;
}

#suppliers-table.is-staff-table-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.staff-table--suppliers {
  min-width: 1200px;
}

@media (max-width: 1200px) {
  .staff-supplier-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .staff-supplier-stats {
    grid-template-columns: 1fr;
  }
}

.staff-employee-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-employee-stats .staff-stat-card__icon--compact {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 0;
}

.staff-employee-stats .staff-stat-card__icon--compact .iconify,
.staff-employee-stats .staff-stat-card__icon--compact svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
}

.staff-toolbar--employees {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.staff-toolbar--employees .staff-toolbar__search--wide {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  min-width: min-content;
}

.staff-toolbar--employees .staff-input {
  width: auto;
  flex: 0 0 auto;
}

.staff-toolbar--employees .staff-toolbar__main .staff-input[type="search"] {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: none;
  width: auto;
}

.staff-toolbar--employees select.staff-input {
  min-width: 8.25rem;
  max-width: 9.5rem;
  padding: 0.55rem 2rem 0.55rem 0.65rem;
  cursor: pointer;
  appearance: none;
  background-color: rgb(var(--staff-surface));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1D27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.9rem;
}

.staff-toolbar--employees .staff-input[type="date"] {
  min-width: 9.25rem;
}

.staff-toolbar--employees .staff-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.staff-employee-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-employee-chart__canvas-wrap {
  position: relative;
  height: 240px;
  padding: 0 1rem 1rem;
}

#employees-table.is-staff-table-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.staff-table--employees {
  min-width: 1100px;
}

.staff-page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 1200px) {
  .staff-employee-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .staff-employee-stats {
    grid-template-columns: 1fr;
  }
}

.staff-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgb(var(--staff-text-muted));
}

.staff-breadcrumb a.staff-link {
  color: rgb(var(--staff-text-muted));
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.staff-breadcrumb a.staff-link:hover {
  color: rgb(var(--staff-accent));
}

.staff-breadcrumb > span:last-child {
  color: rgb(var(--staff-text));
  font-weight: 600;
}

.staff-breadcrumb__sep {
  color: rgba(var(--staff-text-muted), 0.55);
  font-weight: 400;
  user-select: none;
}

.staff-employee-profile-head {
  margin-bottom: 1rem;
}

.accounting-line-product {
  min-width: 14rem;
}

.accounting-line-product__control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 12rem;
}

.accounting-line-product__field {
  flex: 1 1 auto;
  min-width: 0;
}

.accounting-line-product__control[data-product-mode="select"] .accounting-line-product__field--type,
.accounting-line-product__control[data-product-mode="type"] .accounting-line-product__field--select {
  display: none;
}

.accounting-line-product__control[data-product-mode="select"] .accounting-line-product__icon--select,
.accounting-line-product__control[data-product-mode="type"] .accounting-line-product__icon--type {
  display: none;
}

.accounting-line-product__toggle {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
}

.accounting-line-product select.staff-input,
.accounting-line-product input[type="text"],
.accounting-line-product input:not([type]) {
  width: 100%;
  min-width: 9rem;
}

.staff-employee-hero {
  position: relative;
  overflow: hidden;
}

.staff-employee-hero__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.5rem 0;
}

.staff-employee-hero__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.staff-employee-hero__body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  padding: 1.5rem;
  align-items: start;
}

.staff-employee-hero:has(.staff-employee-hero__toolbar) .staff-employee-hero__body {
  padding-top: 1rem;
}

.staff-employee-hero__aside {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem 1rem;
  min-width: min(100%, 22rem);
}

.staff-employee-hero__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  gap: 0.85rem 1.25rem;
  margin: 0;
  flex: 1 1 auto;
}

.staff-employee-hero__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.staff-employee-hero__actions .staff-inline-form {
  margin: 0;
  display: inline-flex;
}

.staff-employee-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #001489, #0057FF);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.staff-employee-hero__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.staff-employee-hero__title-row h1 {
  margin: 0;
  font-size: 1.5rem;
}

.staff-employee-hero__position {
  margin: 0 0 0.85rem;
  color: rgb(var(--staff-text-muted));
  font-size: 0.95rem;
}

.staff-employee-hero__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: rgb(var(--staff-text));
}

.staff-employee-hero__quick li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.staff-employee-hero__meta dt {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(var(--staff-text-muted));
}

.staff-employee-hero__meta dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
}

.staff-employee-overview {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.staff-employee-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.staff-employee-form .staff-form-actions {
  margin-top: 0;
}

.staff-employee-info-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.staff-employee-info-list div {
  display: grid;
  grid-template-columns: minmax(0, 42%) 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.staff-employee-info-list dt {
  margin: 0;
  font-size: 0.82rem;
  color: rgb(var(--staff-text-muted));
}

.staff-employee-info-list dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: right;
}

.staff-employee-doc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-employee-doc-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgb(var(--staff-border));
  color: inherit;
  text-decoration: none;
}

.staff-employee-doc-list__item:last-child {
  border-bottom: 0;
}

.staff-employee-doc-list__item:hover .staff-employee-doc-list__title {
  color: #0057FF;
}

.staff-employee-doc-list__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--staff-radius);
  background: rgba(0, 87, 255, 0.1);
  color: #0057FF;
  flex-shrink: 0;
}

.staff-employee-doc-list__content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.staff-employee-doc-list__title {
  font-weight: 650;
  font-size: 0.9rem;
}

.staff-employee-doc-list__meta {
  font-size: 0.8rem;
  color: rgb(var(--staff-text-muted));
}

.staff-employee-placeholder {
  margin: 0;
  color: rgb(var(--staff-text-muted));
  font-size: 0.9rem;
}

.staff-employee-leave-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.staff-employee-leave-stats dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--staff-text-muted));
}

.staff-employee-leave-stats dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #001489;
}

@media (max-width: 1100px) {
  .staff-employee-hero__body {
    grid-template-columns: auto 1fr;
  }

  .staff-employee-hero__aside {
    grid-column: 1 / -1;
  }

  .staff-employee-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .staff-employee-hero__body {
    grid-template-columns: 1fr;
    text-align: left;
  }

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

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

  .staff-employee-info-list div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .staff-employee-info-list dd {
    text-align: left;
  }

  .staff-employee-leave-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .staff-client-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .staff-client-stats {
    grid-template-columns: 1fr;
  }
}

/* Page sections */
.staff-page-head {
  margin-bottom: 0.75rem;
}

.staff-page-head > .staff-toolbar {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.staff-page-head .staff-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--staff-accent));
}

.staff-page-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.staff-page-head p {
  margin: 0;
  color: rgb(var(--staff-text-muted));
}

.staff-page-head__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.staff-page-head__title-row h1 {
  margin: 0;
  flex: 1;
  min-width: min(100%, 10rem);
}

.staff-page-head__form {
  flex-shrink: 0;
  margin: 0;
}

.staff-btn-mark-read {
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(
    135deg,
    rgb(var(--staff-primary)) 0%,
    rgb(var(--staff-accent)) 100%
  );
  box-shadow:
    0 10px 22px -8px rgba(var(--staff-accent), 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.staff-btn-mark-read:hover {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgb(var(--staff-accent)) 0%,
    rgb(var(--staff-primary)) 100%
  );
  box-shadow:
    0 14px 28px -8px rgba(var(--staff-accent), 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.staff-btn-mark-read:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px -6px rgba(var(--staff-accent), 0.5);
}

.staff-btn-mark-read:focus-visible {
  outline: 2px solid rgb(var(--staff-accent));
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .staff-page-head__title-row {
    align-items: flex-start;
  }

  .staff-page-head__form,
  .staff-page-head__form .staff-btn-mark-read {
    width: 100%;
  }
}

.staff-stack {
  display: grid;
  gap: 1.25rem;
}

/* Forms */
.staff-form label:not(.staff-switch) {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(var(--staff-text));
}

.staff-form .staff-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
}

.staff-form .staff-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.staff-form .staff-switch__slider {
  flex-shrink: 0;
}

.staff-form input,
.staff-form select,
.staff-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgba(0, 0, 0, 0.02);
  color: rgb(var(--staff-text));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.staff-form input:focus,
.staff-form select:focus,
.staff-form textarea:focus {
  outline: 0;
  border-color: rgba(var(--staff-accent), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--staff-accent), 0.12);
}

.staff-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.02);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1D27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.staff-form textarea {
  min-height: 120px;
  resize: vertical;
}

.staff-form textarea.staff-textarea--compact {
  min-height: calc(1lh + 1.5rem);
  resize: vertical;
  overflow-y: auto;
}

.staff-form-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  align-items: flex-start;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgba(0, 0, 0, 0.02);
}

.staff-form-toggle {
  display: grid;
  gap: 0.35rem;
}

.staff-form-toggle--inline-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.staff-form-toggle .staff-muted {
  margin: 0;
  max-width: 18rem;
  padding-left: calc(44px + 0.75rem);
  font-size: 0.82rem;
  line-height: 1.45;
}

.staff-form-toggle--inline-help .staff-muted {
  max-width: none;
  padding-left: 0;
}

.staff-form-toggle--inline-help .errorlist {
  flex-basis: 100%;
}

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

.staff-form-grid .full-width {
  grid-column: 1 / -1;
}

.staff-form-grid--logos {
  row-gap: 0.5rem;
}

.staff-form-grid--hr-defaults {
  grid-template-columns: 1fr;
  row-gap: 0.75rem;
  flex: initial;
  align-content: start;
}

.staff-company-info-form .staff-attachment-preview--image .staff-product-image-preview__img {
  max-width: 100%;
  max-height: none;
  width: auto;
  height: auto;
  object-fit: contain;
}

.staff-company-info-form .staff-form-grid--logos input[type="file"] {
  margin-top: 1.15rem;
}

.staff-company-info-form.staff-dash-bottom {
  align-items: stretch;
}

.staff-company-info-form .staff-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.staff-card__header--company-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.5rem;
  background: rgb(var(--staff-hover));
  border-bottom: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius-lg) var(--staff-radius-lg) 0 0;
}

.staff-card__header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--staff-radius);
  background: rgba(var(--staff-accent), 0.12);
  color: rgb(var(--staff-accent));
}

.staff-card__header--company-info h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: rgb(var(--staff-text));
}

.staff-card__header--company-info + .staff-card-divider {
  display: none;
}

.staff-company-info-form .staff-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.staff-company-info-form .staff-form-grid {
  flex: 1;
}

.staff-company-info-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.staff-company-info-card-footer--actions-only {
  justify-content: flex-end;
}

.staff-company-info-footer-note {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.staff-company-info-card-footer .staff-form-actions {
  margin-top: 0;
  flex-shrink: 0;
}

.staff-company-info-readonly-note {
  margin-top: auto;
  padding-top: 1.25rem;
}

.staff-form .errorlist {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: rgb(var(--staff-error));
  font-size: 0.85rem;
}

/* Buttons */
.staff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border: 0;
  border-radius: var(--staff-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

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

.staff-btn-primary:hover {
  background: rgb(var(--staff-primary));
}

.staff-btn-success {
  background: #36c76c;
  color: #fff;
}

.staff-btn-success:hover {
  background: #2da85a;
  color: #fff;
}

.staff-btn-secondary {
  background: rgb(var(--staff-grey100));
  color: rgb(var(--staff-text));
}

.staff-btn-secondary:hover {
  background: rgba(var(--staff-accent), 0.12);
  color: rgb(var(--staff-accent));
}

.staff-btn-danger {
  background: rgba(var(--staff-error), 0.12);
  color: #c41e56;
  border: 1px solid rgba(var(--staff-error), 0.18);
}

.staff-btn-danger:hover {
  background: rgb(var(--staff-error));
  color: #fff;
  border-color: rgb(var(--staff-error));
}

.staff-btn-small {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.staff-btn-block {
  width: 100%;
}

.staff-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* List items */
.staff-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.staff-list-item__grow {
  flex: 1;
  min-width: 200px;
}

.staff-list-item h3 {
  margin: 0.5rem 0 0.35rem;
  font-size: 1.1rem;
}

.staff-list-item p {
  margin: 0.25rem 0;
  color: rgb(var(--staff-text-muted));
  font-size: 0.92rem;
}

.staff-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.staff-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgb(var(--staff-grey100));
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(var(--staff-text), 0.8);
}

.staff-nested-list {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgb(var(--staff-border));
}

.staff-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-top: 0.65rem;
}

/* Django messages — fixed at header band, centered over main column (no layout shift) */
.staff-main-wrap > .flash-stack {
  position: fixed;
  top: 0;
  left: var(--staff-sidebar);
  right: 0;
  height: var(--staff-topbar);
  margin: 0;
  padding: 0 6rem 0 3rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  z-index: 35;
  list-style: none;
  pointer-events: none;
}

.staff-main-wrap > .flash-stack .flash {
  pointer-events: auto;
  width: min(360px, calc(100% - 2rem));
  margin: 0;
  padding: 0.45rem 1rem;
  border-radius: var(--staff-radius);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--staff-shadow-card);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

/* Keep success/error chrome (layout rule above must not override these) */
.staff-main-wrap > .flash-stack .flash.flash-success {
  border: 1px solid rgba(var(--staff-success), 0.35);
  background: rgb(var(--staff-light-success));
  color: #067647;
}

.staff-main-wrap > .flash-stack .flash.flash-error {
  border: 1px solid rgba(var(--staff-error), 0.35);
  background: rgba(var(--staff-error), 0.08);
  color: #b42318;
}

.staff-main-wrap > .flash-stack .flash.flash-info,
.staff-main-wrap > .flash-stack .flash.flash-warning {
  border: 1px solid rgb(var(--staff-border));
  background: rgb(var(--staff-surface));
  color: rgb(var(--staff-text));
}

.staff-main-wrap > .flash-stack .flash.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
}

@media (max-width: 991px) {
  .staff-main-wrap > .flash-stack {
    left: 0;
    padding: 0 1.25rem 0 3rem;
  }
}

@media (max-width: 600px) {
  /* Compact pill between menu toggle (left) and avatar (right), same band as staff-topbar__title */
  .staff-main-wrap:has(> .flash-stack) .staff-topbar__title {
    opacity: 0;
    pointer-events: none;
  }

  .staff-main-wrap > .flash-stack {
    /*
      Match .staff-topbar: padding 0 1rem, 40px controls, gap matches .staff-topbar__left
      so the toast sits in the title strip (not edge-to-edge).
    */
    --staff-topbar-pad-x: 1rem;
    --staff-topbar-control: 40px;
    --staff-topbar-gap: 0.75rem;
    left: calc(
      var(--staff-topbar-pad-x) + var(--staff-topbar-control) + var(--staff-topbar-gap)
    );
    right: calc(
      var(--staff-topbar-pad-x) + var(--staff-topbar-control) + var(--staff-topbar-gap)
    );
    padding: 0;
    justify-content: center;
    align-items: center;
  }

  .staff-main-wrap > .flash-stack .flash {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    min-width: 0;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(175, 182, 201, 0.2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.staff-body .flash-success {
  border-color: rgba(var(--staff-success), 0.35);
  background: rgb(var(--staff-light-success));
  color: #067647;
}

.staff-body .flash-error {
  border-color: rgba(var(--staff-error), 0.35);
  background: rgba(var(--staff-error), 0.08);
}

/* Messages (django messages) */
.staff-body .messages {
  position: fixed;
  top: calc(var(--staff-topbar) + 0.75rem);
  right: 1rem;
  z-index: 50;
  display: grid;
  gap: 0.5rem;
  max-width: 360px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-body .messages li {
  padding: 0.75rem 1rem;
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-surface));
  border: 1px solid rgb(var(--staff-border));
  box-shadow: var(--staff-shadow-card);
  font-size: 0.9rem;
}

/* Auth — homepage modal parity */
.staff-body.staff-login-body {
  --staff-font: "Inter", system-ui, sans-serif;
  --auth-page-bg: #d0e2f8;
  --auth-brand-bg: #1c5fbf;
  background: var(--auth-page-bg);
  min-height: 100vh;
}

.staff-login-page {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.staff-login-bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--auth-page-bg);
  overflow: hidden;
  pointer-events: none;
}

.staff-login-bg-pattern::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(900px, 120vw);
  height: min(600px, 80vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(28, 95, 191, 0.12) 0%,
    transparent 72%
  );
}

.staff-login-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  max-width: min(820px, 100%);
  width: 100%;
  max-height: min(92vh, 100dvh);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 32px 80px rgba(6, 16, 32, 0.3);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--auth-brand-bg);
  color: #fff;
  overflow: hidden;
}

.auth-brand-panel__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand-panel__glow--top {
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, transparent 70%);
}

.auth-brand-panel__glow--bottom {
  bottom: -40px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, transparent 70%);
}

.auth-brand-panel__main {
  position: relative;
  z-index: 1;
}

.auth-brand-panel__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.auth-brand-panel__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #0057ff;
  flex-shrink: 0;
}

.auth-brand-panel__name {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.auth-brand-panel__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.5vw, 1.625rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

.auth-brand-panel__lead {
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  max-width: 28ch;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #a8c4e8;
}

.auth-brand-panel__features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-brand-panel__feature {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.81rem;
  font-weight: 500;
  color: #c8deff;
}

.auth-brand-panel__feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #93c5fd;
  flex-shrink: 0;
}

.auth-brand-panel__footer {
  position: relative;
  z-index: 1;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
  font-size: 0.72rem;
  color: #fff;
}

.auth-form-panel {
  position: relative;
  align-self: stretch;
  box-sizing: border-box;
  min-height: 0;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 3.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.auth-form-panel__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgb(var(--staff-text-muted));
  transition: color 0.15s ease;
}

.auth-form-panel__back:hover,
.auth-form-panel__back:focus-visible {
  color: #0057ff;
  outline: 0;
}

.auth-form-panel .staff-form label:not(.staff-login-check),
.auth-form .staff-form label:not(.staff-login-check) {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(var(--staff-text-muted));
}

.auth-form-panel .auth-form__input,
.auth-form-panel .staff-password-field input,
.auth-form .auth-form__input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid rgb(var(--staff-border));
  border-radius: 9px;
  background: #fafbfd;
  font-family: inherit;
  font-size: 0.875rem;
  color: rgb(var(--staff-text));
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-form-panel .auth-form__input:focus,
.auth-form-panel .staff-password-field input:focus,
.auth-form .auth-form__input:focus {
  outline: 0;
  border-color: #0057ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12);
}

.auth-form-panel .staff-password-field input {
  padding-right: 2.75rem;
}

.staff-login-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 2vw, 1.25rem);
  font-weight: 800;
  color: #1b1d27;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.staff-login-lead {
  margin: 0 0 1.5rem;
  font-size: 0.81rem;
  line-height: 1.45;
  color: rgb(var(--staff-text-muted));
}

.staff-login-form {
  display: grid;
  gap: 1rem;
}

.staff-login-form-error .errorlist {
  margin: 0;
  padding: 0.55rem 0.75rem;
  list-style: none;
  border-radius: var(--staff-radius);
  background: rgba(var(--staff-error), 0.08);
  border: 1px solid rgba(var(--staff-error), 0.25);
  color: #b42318;
  font-size: 0.84rem;
}

.staff-login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.staff-login-label-row label {
  margin-bottom: 0;
}

.staff-login-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0057ff;
}

.staff-login-link:hover {
  text-decoration: underline;
}

.staff-login-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: rgb(var(--staff-text));
  cursor: pointer;
  margin: 0;
}

.auth-form-panel .staff-form .staff-login-check,
.auth-form .staff-form .staff-login-check {
  display: flex;
  margin-bottom: 0;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: rgb(var(--staff-text));
}

.staff-login-check input[type="checkbox"],
.auth-form-panel .staff-form .staff-login-check input[type="checkbox"],
.auth-form .staff-form .staff-login-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgb(var(--staff-border));
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  flex-shrink: 0;
  accent-color: #0057ff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.staff-login-check input[type="checkbox"]:focus,
.auth-form-panel .staff-form .staff-login-check input[type="checkbox"]:focus,
.auth-form .staff-form .staff-login-check input[type="checkbox"]:focus {
  outline: 0;
  border-color: #0057ff;
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12);
}

.staff-login-submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 10px;
  background: #0057ff;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.staff-login-submit:hover {
  background: #2563eb;
}

.staff-password-field {
  position: relative;
}

.staff-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgb(var(--staff-text-muted));
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s ease, background 0.2s ease;
}

.staff-password-toggle:hover,
.staff-password-toggle:focus-visible {
  color: #0057ff;
  background: rgba(0, 87, 255, 0.08);
  outline: 0;
}

.staff-password-toggle__hide {
  display: none;
}

.staff-password-toggle.is-visible .staff-password-toggle__show {
  display: none;
}

.staff-password-toggle.is-visible .staff-password-toggle__hide {
  display: block;
}

.staff-register-success {
  text-align: center;
}

.staff-register-success__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.staff-register-success__notice {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--staff-radius);
  background: rgba(0, 87, 255, 0.06);
  border: 1px solid rgba(0, 87, 255, 0.14);
  text-align: left;
}

.staff-register-success__notice p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgb(var(--staff-text));
}

.staff-register-success__notice p + p {
  margin-top: 0.55rem;
}

.staff-register-success__notice strong {
  color: #001489;
  font-weight: 700;
}

.staff-register-success__hint {
  color: rgb(var(--staff-text-muted)) !important;
  font-size: 0.88rem !important;
}

.staff-register-success__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.staff-registration-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  justify-content: flex-end;
}

.staff-registration-actions form {
  margin: 0;
}

.staff-registration-actions .staff-btn {
  min-width: 5.5rem;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(27, 29, 39, 0.08);
}

.staff-registration-actions .staff-btn .iconify {
  flex-shrink: 0;
}

.staff-login-signup {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgb(var(--staff-text-muted));
}

.staff-login-signup a {
  font-weight: 700;
  color: #0057ff;
}

.staff-login-signup a:hover {
  text-decoration: underline;
}

.staff-login-body .flash-stack {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: min(360px, calc(100% - 2rem));
  margin: 0;
  pointer-events: none;
}

.staff-login-body .flash-stack .flash {
  width: 100%;
  margin: 0;
  pointer-events: auto;
  text-align: center;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.staff-login-body .flash-stack .flash.is-hiding {
  opacity: 0;
  transform: translateY(-10px);
}

@media (max-width: 880px) {
  .staff-login-page {
    align-items: flex-start;
    padding: clamp(0.75rem, 3vw, 1.5rem);
  }

  .staff-login-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    max-width: min(480px, 100%);
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .auth-brand-panel {
    padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1.25rem, 4vw, 1.5rem);
  }

  .auth-brand-panel__logo {
    margin-bottom: 1.25rem;
  }

  .auth-brand-panel__lead {
    margin-bottom: 1.25rem;
  }

  .auth-brand-panel__footer {
    margin-top: 1.25rem;
  }

  .auth-form-panel,
  .auth-form-panel.staff-register-success {
    justify-content: flex-start;
    overflow-y: visible;
    min-height: unset;
    padding-top: clamp(1.25rem, 4vw, 1.75rem);
    padding-bottom: clamp(1.5rem, 5vw, 2rem);
  }
}

@media (max-width: 880px) and (min-height: 700px) {
  .staff-login-page {
    align-items: center;
  }

  .staff-login-card {
    max-height: min(94vh, 100dvh);
    overflow: hidden;
  }

  .auth-brand-panel,
  .auth-form-panel {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* CRUD tables & toolbar */
.staff-toolbar {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.staff-toolbar > * {
  min-height: 0;
}

.staff-toolbar__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  min-height: 0;
}

.staff-toolbar form {
  margin: 0;
}

/* Nested wrap + min-height:auto inflates the row; keep search on one line. */
.staff-toolbar__main > *,
.staff-toolbar__search,
.staff-toolbar__actions {
  min-height: 0;
}

.staff-toolbar__search,
.staff-toolbar__filter {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.staff-toolbar__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.staff-toolbar__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-surface));
}

.staff-toolbar__panel[hidden] {
  display: none;
}

.staff-toolbar__panel label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(var(--staff-text-muted));
  white-space: nowrap;
}

.staff-toolbar__filter label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(var(--staff-text-muted));
  white-space: nowrap;
}

.staff-toolbar .staff-input {
  min-width: 12rem;
}

.staff-toolbar__panel .staff-input {
  width: auto;
  min-width: 11rem;
  flex: 0 1 auto;
}

.staff-toolbar__panel .staff-input[type="date"] {
  min-width: 9rem;
}

.staff-toolbar__main .staff-toolbar__search {
  flex: 1 1 18rem;
  min-width: 0;
}

.staff-toolbar__main .staff-toolbar__search .staff-input[type="search"] {
  flex: 1 1 14rem;
  min-width: 10rem;
  max-width: none;
  width: auto;
}

.staff-toolbar__main .staff-toolbar__actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.staff-toolbar__panel select.staff-input,
.staff-toolbar__filter select.staff-input {
  width: auto;
  min-width: 11rem;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  cursor: pointer;
  appearance: none;
  background-color: rgb(var(--staff-surface));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1D27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.staff-toolbar__panel select.staff-input:focus,
.staff-toolbar__filter select.staff-input:focus {
  outline: 2px solid rgba(var(--staff-accent), 0.35);
  border-color: rgb(var(--staff-accent));
}

.staff-table-wrap {
  overflow-x: auto;
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.staff-table th,
.staff-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid rgb(var(--staff-border));
}

.staff-table thead th {
  white-space: nowrap;
  vertical-align: middle;
}

.staff-table th {
  font-weight: 600;
  color: rgb(var(--staff-text-muted));
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.staff-table tbody tr:hover {
  background: rgb(var(--staff-hover));
}

.staff-table--start th,
.staff-table--start td {
  text-align: left;
}

.staff-table--start .staff-table__sort,
.staff-table--start .staff-table__cell-inner:not(.staff-table__cell-inner--actions) {
  justify-content: flex-start;
}

.staff-table--start thead .staff-table__actions {
  text-align: center;
}

.staff-table--start tbody .staff-table__actions {
  text-align: right;
  width: auto;
  min-width: 0;
  max-width: none;
}

.staff-table__actions {
  white-space: nowrap;
  text-align: center;
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
}

.staff-table__actions--wide {
  width: auto;
  min-width: 12.5rem;
  max-width: none;
  text-align: right;
}

.staff-table__cell-inner--actions {
  width: 100%;
}

.staff-table__sort,
.staff-table__cell-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
}

.staff-table__sort {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.staff-table__cell-label {
  min-width: 0;
  white-space: nowrap;
}

.staff-table__sort:hover {
  color: rgb(var(--staff-accent));
}

.staff-table__sort.is-active {
  color: rgb(var(--staff-accent));
}

.staff-table__sort-label {
  white-space: nowrap;
}

.staff-table__sort-indicator {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 0.85rem;
  font-size: 0.75rem;
  line-height: 1;
}

.staff-table__sort:not(.is-active) .staff-table__sort-indicator {
  visibility: hidden;
}

.staff-table__sort-indicator--spacer {
  visibility: hidden;
}

.staff-action-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.staff-action-menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0;
}

.staff-action-menu__dots {
  display: block;
  flex-shrink: 0;
  width: 16px;
  height: 4px;
  background-color: transparent;
  background-image:
    radial-gradient(circle, currentColor 2px, transparent 2px),
    radial-gradient(circle, currentColor 2px, transparent 2px),
    radial-gradient(circle, currentColor 2px, transparent 2px);
  background-size: 4px 4px;
  background-repeat: no-repeat;
  background-position: 0 center, 6px center, 12px center;
}

.staff-action-menu__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  left: auto;
  z-index: 30;
  display: grid;
  gap: 0.15rem;
  width: max-content;
  min-width: 8.5rem;
  max-width: min(11rem, calc(100vw - 1.5rem));
  max-height: min(14rem, calc(100vh - 1.5rem));
  padding: 0.35rem;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-surface));
  box-shadow: var(--staff-shadow);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.staff-action-menu__panel.is-floating {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  transform: none;
}

.staff-action-menu__panel[hidden] {
  display: none !important;
}

.staff-action-menu__item {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.75rem;
  white-space: nowrap;
  border: 0;
  border-radius: calc(var(--staff-radius) - 2px);
  background: transparent;
  color: rgb(var(--staff-text));
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.staff-action-menu__item:hover,
.staff-action-menu__item:focus-visible {
  background: rgba(var(--staff-accent), 0.1);
  color: rgb(var(--staff-accent));
  outline: 0;
}

.staff-action-menu__item--danger:hover,
.staff-action-menu__item--danger:focus-visible {
  background: rgba(var(--staff-error), 0.12);
  color: #c41e56;
}

.staff-action-menu__form {
  margin: 0;
}

.staff-table__actions .staff-inline-form {
  display: inline-block;
  margin-left: 0.35rem;
}

.staff-table__row--warn {
  background: rgb(var(--staff-light-warning));
}

.staff-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid rgb(var(--staff-border));
}

.staff-pagination a {
  color: rgb(var(--staff-accent));
  font-weight: 600;
}

.staff-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.staff-form-actions--end {
  justify-content: flex-end;
}

.staff-link {
  color: rgb(var(--staff-accent));
  font-weight: 600;
}

/* Attachment panel (cash documents, product images, etc.) */
.staff-attachment-preview {
  margin: 0;
  padding: 1rem;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-hover));
  text-align: center;
}

.staff-attachment-preview--image .staff-product-image-preview__img {
  display: block;
  max-width: 100%;
  max-height: min(320px, 50vh);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: var(--staff-radius);
  border: 1px solid rgb(var(--staff-border));
  background: rgb(var(--staff-surface));
  box-shadow: var(--staff-shadow-card);
}

.staff-attachment-preview--document .staff-attachment-preview__frame {
  display: block;
  width: 100%;
  min-height: 360px;
  max-height: min(480px, 60vh);
  border: 0;
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-surface));
}

.staff-attachment-preview__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 160px;
  padding: 1.5rem 1rem;
  color: rgb(var(--staff-accent));
}

.staff-attachment-preview__placeholder p {
  margin: 0;
  font-size: 0.9rem;
}

.staff-attachment-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(var(--staff-border));
}

.staff-attachment-panel__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.staff-attachment-file {
  margin: 0;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-hover));
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.staff-attachment-file:hover,
.staff-attachment-file:focus-within {
  border-color: rgba(var(--staff-accent), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--staff-accent), 0.1);
}

.staff-attachment-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  padding: 0.9rem 1rem;
  color: rgb(var(--staff-text));
  font-weight: 600;
  text-decoration: none;
}

.staff-attachment-link:hover,
.staff-attachment-link:focus-visible {
  color: rgb(var(--staff-primary));
}

.staff-attachment-link__icon-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--staff-radius);
  background: rgba(var(--staff-accent), 0.12);
  color: rgb(var(--staff-accent));
}

.staff-attachment-link__icon-wrap .iconify {
  color: rgb(var(--staff-accent));
}

.staff-attachment-link__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.staff-attachment-empty {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px dashed rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.9rem;
  text-align: center;
}

.staff-attachment-upload {
  margin-top: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(var(--staff-border));
}

.staff-card__body--attachment > .staff-attachment-upload:first-child,
.staff-attachment-upload--only {
  padding-top: 0;
  border-top: 0;
}

.staff-card__body--attachment:has(.staff-attachment-file) .staff-attachment-upload,
.staff-card__body--attachment:has(.staff-attachment-preview) .staff-attachment-upload {
  margin-top: 0;
}

.staff-form--attachment .staff-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.staff-form--attachment input[type="file"] {
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.staff-form--attachment input[type="file"]::file-selector-button {
  margin-right: 0.85rem;
  padding: 0.45rem 0.85rem;
  border: 0;
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-primary));
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.staff-form--attachment input[type="file"]::file-selector-button:hover {
  background: rgb(var(--staff-accent));
}

.staff-attachment-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.staff-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.staff-badge--unread {
  background: rgb(var(--staff-light-primary));
  color: rgb(var(--staff-primary));
}

.staff-badge--debit {
  background: rgba(var(--staff-error), 0.12);
  color: rgb(var(--staff-error));
}

.staff-badge--credit {
  background: rgba(var(--staff-secondary), 0.2);
  color: #0d9b94;
}

.staff-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-surface));
}

.staff-input:focus {
  outline: 2px solid rgba(var(--staff-accent), 0.35);
  border-color: rgb(var(--staff-accent));
}

.staff-form select.staff-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.02);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1D27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.staff-input[type="date"],
.staff-input[type="datetime-local"] {
  min-height: 2.5rem;
  color-scheme: light;
}

.staff-input[type="date"]::-webkit-calendar-picker-indicator,
.staff-input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
}

.staff-input[type="date"]::-webkit-calendar-picker-indicator:hover,
.staff-input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.staff-phone-field {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.staff-phone-field__prefix {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  min-width: 4.75rem;
  padding: 0 0.35rem;
  border: 1px solid rgb(var(--staff-border));
  border-right: none;
  border-radius: var(--staff-radius) 0 0 var(--staff-radius);
  background: rgba(var(--staff-border), 0.18);
}

.staff-phone-field__flag {
  font-size: 0.95rem;
  line-height: 1;
}

.staff-phone-field__dial {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(var(--staff-text));
  white-space: nowrap;
}

.staff-phone-field__country {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.staff-phone-field .staff-phone-field__number,
.staff-form .staff-phone-field__number {
  flex: 1;
  min-width: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--staff-radius);
  border-bottom-right-radius: var(--staff-radius);
}

.staff-phone-field:focus-within .staff-phone-field__prefix,
.staff-phone-field:focus-within .staff-phone-field__number {
  border-color: rgb(var(--staff-accent));
}

.staff-phone-field:focus-within .staff-phone-field__number {
  outline: 2px solid rgba(var(--staff-accent), 0.35);
}

.staff-phone-field:focus-within .staff-phone-field__prefix {
  box-shadow: inset 0 0 0 1px rgba(var(--staff-accent), 0.2);
}

/* Overlay */
.staff-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(27, 29, 39, 0.45);
}

@media (max-width: 991px) {
  .staff-body.sidebar-open .staff-overlay {
    display: block;
  }
}

/* Desktop: collapse sidebar off-screen */
@media (min-width: 992px) {
  .staff-body.staff-sidebar-collapsed .staff-sidebar {
    transform: translateX(-100%);
  }

  .staff-body.staff-sidebar-collapsed .staff-main-wrap {
    margin-left: 0;
  }

  .staff-body.staff-sidebar-collapsed .staff-main-wrap > .flash-stack {
    left: 0;
  }
}

/* Responsive */
@media (min-width: 900px) {
  .staff-profile__meta {
    display: block;
  }
}

@media (max-width: 1199px) {
  .staff-dash-top {
    grid-template-columns: 1fr 1fr;
  }

  .staff-welcome-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991px) {
  .staff-sidebar {
    transform: translateX(-100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
  }

  .staff-body.sidebar-open .staff-sidebar {
    transform: translateX(0);
  }

  .staff-main-wrap {
    margin-left: 0;
  }

  .staff-dash-top,
  .staff-dash-bottom,
  .staff-cash-stats {
    grid-template-columns: 1fr;
  }

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

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

.staff-profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
}

.staff-profile-details__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgb(var(--staff-border));
  border-radius: var(--staff-radius);
  background: rgb(var(--staff-hover));
}

.staff-profile-details__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--staff-radius);
  background: rgba(var(--staff-accent), 0.12);
  color: rgb(var(--staff-accent));
}

.staff-profile-details__content {
  min-width: 0;
}

.staff-profile-details dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--staff-text-muted));
}

.staff-profile-details dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.35;
  color: rgb(var(--staff-text));
  overflow-wrap: anywhere;
}

.staff-profile-details__badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(var(--staff-primary), 0.1);
  color: rgb(var(--staff-primary));
  font-size: 0.82rem;
  font-weight: 700;
}

.staff-detail-list {
  display: grid;
  gap: 1rem 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 1.5rem;
}

.staff-detail-list div {
  margin: 0;
}

.staff-detail-list dt {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(var(--staff-muted));
  margin-bottom: 0.25rem;
}

.staff-detail-list dd {
  margin: 0;
  font-weight: 600;
}

.staff-detail-list .full-width {
  grid-column: 1 / -1;
}

.staff-detail-list--accounting,
.staff-detail-list--hr,
.staff-detail-list--order {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.staff-detail-list--accounting .staff-detail-list__total {
  grid-column: 1;
  grid-row: 3;
}

.staff-detail-list--order .staff-detail-list__total {
  grid-column: 1;
}

.staff-detail-list__actions {
  display: flex;
  align-items: flex-start;
  align-self: start;
  gap: 0.4rem;
  justify-self: end;
}

.staff-detail-list__actions form {
  margin: 0;
  display: inline-flex;
}

.staff-document-chain {
  display: grid;
  gap: 1.25rem;
}

.staff-document-chain__group {
  display: grid;
  gap: 0.5rem;
}

.staff-document-chain__label {
  margin: 0;
  font-weight: 600;
  color: rgb(var(--staff-text));
}

.staff-document-chain__list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.55rem;
  list-style: disc;
}

.staff-document-chain__list li {
  margin: 0;
  line-height: 1.5;
}

.staff-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgb(var(--staff-border));
  border-radius: 8px;
  background: rgb(var(--staff-surface));
  color: rgb(var(--staff-text));
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.staff-icon-btn:hover {
  border-color: rgb(var(--staff-accent));
  background: rgba(var(--staff-accent), 0.08);
  color: rgb(var(--staff-accent));
}

.staff-icon-btn--edit {
  border-color: rgba(var(--staff-accent), 0.28);
  background: rgba(var(--staff-accent), 0.1);
  color: rgb(var(--staff-accent));
}

.staff-icon-btn--edit:hover {
  border-color: rgb(var(--staff-accent));
  background: rgba(var(--staff-accent), 0.18);
  color: rgb(var(--staff-accent));
}

.staff-icon-btn--print {
  border-color: rgba(var(--staff-primary), 0.22);
  background: rgba(var(--staff-primary), 0.08);
  color: rgb(var(--staff-primary));
}

.staff-icon-btn--print:hover {
  border-color: rgb(var(--staff-primary));
  background: rgba(var(--staff-primary), 0.14);
  color: rgb(var(--staff-primary));
}

.staff-icon-btn--download {
  border-color: rgba(var(--staff-success), 0.28);
  background: rgba(var(--staff-success), 0.1);
  color: rgb(var(--staff-success));
}

.staff-icon-btn--download:hover {
  border-color: rgb(var(--staff-success));
  background: rgba(var(--staff-success), 0.18);
  color: rgb(var(--staff-success));
}

.staff-icon-btn--download.is-preparing {
  opacity: 0.72;
  pointer-events: auto;
  cursor: progress;
}

.staff-icon-btn:focus-visible {
  outline: 2px solid rgb(var(--staff-accent));
  outline-offset: 2px;
}

.staff-icon-btn--danger {
  border-color: rgba(196, 30, 86, 0.28);
  background: rgba(196, 30, 86, 0.08);
  color: #c41e56;
}

.staff-icon-btn--danger:hover {
  border-color: #c41e56;
  background: rgba(196, 30, 86, 0.16);
  color: #c41e56;
}

.staff-visibility-card {
  margin-bottom: 1rem;
}

.staff-visibility-form {
  display: grid;
  gap: 0.75rem;
}

.staff-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.staff-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.staff-switch__slider {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgb(var(--staff-grey100));
  transition: background 0.2s ease;
}

.staff-switch__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.staff-switch input:checked + .staff-switch__slider {
  background: rgb(var(--staff-accent));
}

.staff-switch input:checked + .staff-switch__slider::after {
  transform: translateX(20px);
}

.staff-switch__label {
  font-weight: 700;
}

@media (max-width: 600px) {
  .staff-sidebar {
    width: min(280px, 88vw);
  }

  .staff-main-wrap {
    margin-left: 0;
  }

  .staff-main {
    padding: 1rem;
  }

  .staff-topbar {
    padding: 0 1rem;
  }
}
