/* PB Standard Blue: #00A0DD */

:root {
  --pb-blue: #00a0dd;
  --pb-blue-dark: #0088bc;
  --pb-blue-soft: rgba(0, 160, 221, 0.12);
  --text: #0f172a;
  --text-muted: #475569;
  --surface: #ffffff;
  --surface-elevated: #f8fafc;
  --border: #e2e8f0;
  /* Deeper hairline matching PBXchange/PBXpeople — plain --border disappears
     against this product's cooler page wash. */
  --border-strong: #d8dfe6;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --field-control-height: 2.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--pb-blue-soft), transparent),
    linear-gradient(180deg, #f1f5f9 0%, #e8eef4 100%);
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--pb-blue);
  color: #fff;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 3px solid var(--pb-blue);
  box-shadow: var(--shadow);
  transition: box-shadow 0.22s ease, border-bottom-width 0.22s ease;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: padding 0.22s ease;
}

.site-header .brand__logo {
  transition: width 0.22s ease, height 0.22s ease;
}

.site-header .brand__wordmark--header {
  transition: font-size 0.22s ease;
}

.site-header--compact {
  border-bottom-width: 2px;
}

.site-header--compact .site-header__inner {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.site-header--compact .brand__logo {
  width: 36px;
  height: 36px;
}

.site-header--compact .brand__wordmark--header {
  font-size: 1.05rem;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__inner,
  .site-header .brand__logo,
  .site-header .brand__wordmark--header {
    transition: none;
  }
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 1;
  min-width: 0;
}

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

.header-session[hidden] {
  display: none;
}

.header-session__user {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted, #475569);
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-session__sign-out {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.brand--link {
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  transition: opacity 0.15s ease;
}

.brand--link:hover {
  opacity: 0.82;
}

.brand--link:focus-visible {
  outline: 2px solid var(--pb-blue);
  outline-offset: 3px;
}

.brand__logo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.12));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-weight: 700;
  font-size: 1.125rem;
}

.brand__tag {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.brand__event {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.brand__tag[hidden],
.brand__event[hidden],
#header-project-switch[hidden] {
  display: none;
}

#header-project-title {
  max-width: min(28rem, 55vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Project picker — CANONICAL (copy into PBXchange with token swap)
   ============================================================ */
.main--picker {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.panel--picker {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.panel--picker .panel__header {
  margin-bottom: 1rem;
}

.panel--picker .panel__header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.panel--picker .panel__hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.panel--picker .panel-status {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.panel--picker .panel-status--error {
  color: #b91c1c;
}

.project-picker {
  display: grid;
  gap: 0.85rem;
}

.project-picker__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--pb-blue) 18%, transparent);
  border-radius: 12px;
  background: var(--surface-elevated, #f8fafc);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.project-picker__card:hover {
  border-color: var(--pb-blue);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.project-picker__card:focus-visible {
  outline: 2px solid var(--pb-blue);
  outline-offset: 2px;
}

.project-picker__card--selected {
  border-color: var(--pb-blue);
  box-shadow: inset 0 0 0 1px var(--pb-blue);
}

.project-picker__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.project-picker__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted, #475569);
}

.project-picker__meta {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.02em;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.pill--muted {
  background: var(--surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.page-wide {
  --max-width: min(1480px, calc(100vw - 4rem));
}

.hero {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pb-blue-dark);
}

.hero__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.hero__title-row h1 {
  margin: 0;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero__title-row + .hero__lead {
  margin-top: 0;
}

.hero__lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel--subtle {
  background: var(--surface-elevated);
  box-shadow: none;
}

.panel__head {
  margin-bottom: 1.25rem;
}

.panel__head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel__head--row .panel__hint {
  margin-top: 0.25rem;
}

.panel__head--row .btn {
  margin-top: 0;
  flex-shrink: 0;
}

.panel-status {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.panel-status--error {
  color: #b91c1c;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--surface-elevated);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--pb-blue-soft);
}

.data-table__add-col {
  width: 4.5rem;
  text-align: center;
  white-space: nowrap;
}

.data-table th.data-table__add-col,
.data-table td.data-table__add-col {
  text-align: center;
}

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--pb-blue-dark);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
}

.btn-add-cart:hover:not(:disabled) {
  border-color: var(--pb-blue);
  background: var(--pb-blue-soft);
  color: var(--pb-blue);
  box-shadow: 0 0 0 3px var(--pb-blue-soft);
  transform: scale(1.05);
}

.btn-add-cart:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-add-cart--added {
  border-color: #86efac;
  background: #ecfdf5;
  color: #15803d;
}

.btn-add-cart--added:hover:not(:disabled) {
  border-color: #4ade80;
  background: #d1fae5;
  color: #166534;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  transform: scale(1.05);
}

.btn-add-cart:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-add-cart__icon {
  display: block;
}

.bookings-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pb-blue-dark);
  flex-shrink: 0;
}

.panel__head-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.panel__head-actions .btn {
  margin-top: 0;
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.status-pill--pending {
  background: #fef3c7;
  color: #92400e;
}

.status-pill--approved {
  background: #dcfce7;
  color: #166534;
}

.status-pill--confirmed {
  background: #dbeafe;
  color: #1e40af;
}

.status-pill--denied,
.status-pill--rejected,
.status-pill--declined {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill--processing,
.status-pill--failed {
  background: #ffedd5;
  color: #9a3412;
}

.status-pill--cancelled {
  background: #f1f5f9;
  color: #475569;
}

.panel__head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.panel__hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn__icon {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--pb-blue);
  border-color: var(--pb-blue);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--pb-blue-dark);
  border-color: var(--pb-blue-dark);
}

.btn--secondary {
  background: var(--surface);
  color: var(--pb-blue-dark);
  border-color: var(--border);
}

.btn--secondary:hover:not(:disabled) {
  border-color: var(--pb-blue);
  background: var(--pb-blue-soft);
}

.btn--danger {
  background: #fff;
  color: #b91c1c;
  border-color: #fecaca;
}

.btn--danger:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}

.btn--success {
  background: #fff;
  color: #15803d;
  border-color: #bbf7d0;
}

.btn--success:hover:not(:disabled) {
  background: #f0fdf4;
  border-color: #4ade80;
  color: #166534;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

a.btn {
  text-decoration: none;
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.empty-state p {
  margin: 0;
}

/* Matches PBXchange / PBXpeople exactly — including line-height, which the
   1.55 body default would otherwise make a shade taller here. */
.site-footer {
  margin-top: auto;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
  border-top: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.68);
}

.site-footer p {
  margin: 0;
}

/* Header / register BEM (not the auth-card family shell) */
.brand__logo--large {
  width: 72px;
  height: 72px;
}

.brand__wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.brand__wordmark-primary {
  color: var(--text);
}

.brand__wordmark-product {
  color: var(--pb-blue);
}

.brand__wordmark--header {
  font-size: 1.25rem;
}

.page-sign-in .sign-in__card.panel {
  width: 100%;
  max-width: 430px;
  margin: 0;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 16px 42px rgba(15, 23, 42, 0.1);
}

.page-sign-in .sign-in__brand {
  margin-bottom: 28px;
}

.page-sign-in .brand--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.page-sign-in .brand__text {
  line-height: 1;
}

.sign-in {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  width: 100%;
  max-width: none;
  margin: 0;
}

.sign-in__links {
  margin: 1rem 0 0;
  text-align: center;
}

.sign-in__link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--pb-blue, #00a0dd);
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
}

a.sign-in__link {
  display: inline-block;
}

/* Register */

.page-sign-in .sign-in__card.panel.register-card,
.register-card {
  max-width: 560px;
}

.register-lead {
  margin: 0 0 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.register-form {
  gap: 1.25rem;
}

.register-section {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.register-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.register-section__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.register-section__lead {
  margin: -0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

@media (max-width: 520px) {
  .register-grid {
    grid-template-columns: 1fr;
  }
}

.register-role {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.register-role__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-elevated);
  font-size: 0.875rem;
  cursor: pointer;
}

.register-role__option:has(input:checked) {
  border-color: var(--pb-blue);
  background: var(--pb-blue-soft);
}

.field__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field__optional {
  font-weight: 400;
  color: var(--text-muted);
}

.field__textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.register-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.register-success[hidden] {
  display: none;
}

.register-success .sign-in__heading {
  margin: 0;
  text-align: center;
  width: 100%;
}

.register-success .register-lead {
  margin: 0;
  text-align: center;
  max-width: 28rem;
}

.register-success__note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.register-success__reference {
  margin: 0;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  background: var(--pb-blue-soft);
  color: var(--pb-blue-dark);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.register-success .btn {
  text-align: center;
  text-decoration: none;
}

.sign-in__error {
  margin: 0;
  color: #c0392b;
  font-size: 0.875rem;
}

.sign-in__error--info {
  color: #1d6f42;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* `.field { display: flex }` would otherwise override the HTML `hidden` attribute */
.field[hidden] {
  display: none;
}

.field__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.field__input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--text);
  background-color: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Single-line controls share one height (not textareas). */
input.field__input:not([type="checkbox"]):not([type="radio"]),
select.field__input {
  height: var(--field-control-height);
  min-height: var(--field-control-height);
  padding-top: 0;
  padding-bottom: 0;
}

select.field__input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
  background-color: var(--surface);
}

.field__input::placeholder {
  color: #94a3b8;
}

.field__input:focus {
  outline: none;
  border-color: var(--pb-blue);
  box-shadow: 0 0 0 3px var(--pb-blue-soft);
}

/* Affixed category number + editable suffix (e.g. grey "1." + "2") */
.field__combo {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: var(--field-control-height);
  min-height: var(--field-control-height);
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__combo:focus-within {
  border-color: var(--pb-blue);
  box-shadow: 0 0 0 3px var(--pb-blue-soft);
}

.field__combo-prefix {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
  pointer-events: none;
}

.field__combo-input.field__input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}

.field__combo-input.field__input:focus {
  border: none;
  box-shadow: none;
  outline: none;
}

.field__combo--no-prefix .field__combo-prefix {
  display: none;
}

.btn--block {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 8.5rem;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-elevated);
  color: var(--text);
  font: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease,
    color 0.15s ease;
}

.nav-tile:hover {
  border-color: var(--pb-blue);
  background: var(--pb-blue-soft);
  box-shadow: 0 0 0 1px var(--pb-blue-soft);
  transform: translateY(-2px);
}

.nav-tile:active {
  transform: translateY(0);
}

.nav-tile--static {
  cursor: default;
}

.nav-tile--static:hover {
  border-color: var(--border);
  background: var(--surface-elevated);
  box-shadow: none;
  transform: none;
}

.nav-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--pb-blue-dark);
  border: 1px solid var(--border);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-tile:hover .nav-tile__icon {
  background: var(--pb-blue);
  color: #fff;
  border-color: var(--pb-blue);
}

.nav-tile--static .nav-tile__icon {
  color: var(--text-muted);
}

.nav-tile--static:hover .nav-tile__icon {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border);
}

.nav-tile__label {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.nav-tile:disabled,
.nav-tile[aria-disabled="true"] {
  opacity: 0.85;
}

.company-profile__head {
  margin-bottom: 1.5rem;
}

.company-profile__name {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.company-profile__code {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.company-profile__group {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.company-profile__group-title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.company-profile__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.company-profile__people {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.company-profile__person {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.company-profile__person-name {
  font-weight: 600;
}

.company-profile__person-email {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

@media (max-width: 720px) {
  .nav-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .main {
    padding-top: 1.5rem;
  }

  .panel {
    padding: 1.125rem;
  }

  .page-sign-in .sign-in__card.panel {
    padding: 24px;
  }
}

/* Cart (new booking) */

.cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--pb-blue-dark);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.cart-toggle:hover {
  border-color: var(--pb-blue);
  background: var(--pb-blue-soft);
  color: var(--pb-blue);
  box-shadow: 0 0 0 3px var(--pb-blue-soft);
}

.cart-toggle__icon {
  display: block;
}

.cart-toggle__badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--pb-blue);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 210;
  display: flex;
  flex-direction: column;
  width: min(24rem, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.cart-panel--open {
  transform: translateX(0);
}

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cart-panel__title {
  margin: 0;
  font-size: 1.125rem;
}

.cart-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cart-panel__close:hover {
  background: var(--surface-elevated);
  color: var(--text);
}

.cart-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.cart-panel__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.cart-panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-line:last-child {
  border-bottom: none;
}

.cart-line__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cart-line__name {
  font-weight: 600;
  line-height: 1.35;
}

.cart-line__number {
  font-variant-numeric: tabular-nums;
  color: var(--pb-blue-dark);
  font-weight: 700;
  margin-right: 0.15rem;
}

.cart-line__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.cart-line__note {
  font-size: 0.8125rem;
  color: var(--text);
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.cart-line__note--empty {
  color: var(--text-muted);
  font-style: italic;
}

.cart-line__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cart-line__qty {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pb-blue-dark);
}

.cart-line__remove {
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: underline;
  cursor: pointer;
}

.cart-line__remove:hover {
  color: #b91c1c;
}

.cart-panel__footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-elevated);
}

.cart-panel__message {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cart-panel__message--error {
  color: #b91c1c;
}

.field__textarea {
  resize: vertical;
  min-height: 4.5rem;
  font-family: inherit;
}

body.cart-open {
  overflow: hidden;
}

/* Booking detail modal (dashboard) */

.data-table__row--clickable {
  cursor: pointer;
}

.data-table__row--clickable:focus-visible {
  outline: 2px solid var(--pb-blue);
  outline-offset: -2px;
}

.booking-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.booking-detail-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.booking-detail {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.booking-detail--open {
  opacity: 1;
  pointer-events: auto;
}

.booking-detail__panel {
  width: min(42rem, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 24px 48px rgba(15, 23, 42, 0.16);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}

.booking-detail--open .booking-detail__panel {
  transform: translateY(0) scale(1);
}

.booking-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.booking-detail__title {
  margin: 0;
  font-size: 1.375rem;
}

.booking-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin: 0.5rem 0 0;
}

.booking-detail__meta-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.booking-detail__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.booking-detail__close:hover {
  background: var(--surface-elevated);
  color: var(--text);
}

.booking-detail__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem 1.25rem;
}

.booking-detail__section-title {
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.booking-detail__notes {
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.booking-detail__notes p {
  margin: 0;
  white-space: pre-wrap;
}

.booking-detail__line-note {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.booking-detail__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.booking-detail__table-wrap {
  margin-top: 0.25rem;
}

.booking-detail__table tbody tr:last-child td {
  border-bottom: none;
}

.booking-detail__qty {
  font-weight: 600;
  color: var(--pb-blue-dark);
  white-space: nowrap;
}

.booking-detail__footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.875rem 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-elevated);
  border-radius: 0 0 var(--radius) var(--radius);
}

body.booking-detail-open {
  overflow: hidden;
}


/* ============================================================
   AUTH SHELL — literal PBXchange copy (token bridge only).
   Wins over earlier host .btn / .field rules because it is last.
   ============================================================ */

.page-sign-in {
  /* Same page scale + font stack as PBXchange / PBXpeople */
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  /* Same spacing / radius tokens as PBXchange */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --radius: 8px;
  /* Map family colour names → host palette */
  --pbx-action: var(--pb-blue);
  --pbx-ink: var(--text);
  --pbx-muted: var(--text-muted);
  --pbx-card: var(--surface);
  --pbx-border: var(--border);
}

.page-sign-in [hidden] {
  display: none !important;
}

/* Kill UA / host heading margins. Bottom gap under Welcome comes only from
   .auth-card .auth-heading (0.25rem) — same as PBXchange. Never use
   .page-sign-in .auth-card h1 { margin: 0 0 sp-2 } — that beats .auth-heading
   and adds ~12px, making the card taller. */
.page-sign-in h1,
.page-sign-in h2,
.page-sign-in h3 {
  margin: 0;
  line-height: 1.25;
}

.auth-card .btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 10px var(--sp-2);
  /* Host global `.btn { font: inherit }` leaves line-height: 1.5 (22.5px),
     which makes this button ~5.5px taller than PBXchange/PBXpeople (`normal`). */
  font: 600 15px/normal -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  background: var(--pbx-action);
  color: #fff;
}

.auth-card .btn:hover {
  filter: brightness(1.08);
}

.auth-card .btn.secondary {
  background: transparent;
  color: var(--pbx-action);
  border: 1px solid var(--pbx-action);
}

.auth-card .field {
  display: block;
  margin-bottom: var(--sp-2);
}

.auth-card .field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--pbx-muted);
}

.auth-card .field input,
.auth-card .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pbx-border);
  border-radius: var(--radius);
  font-size: 15px;
  background: #fff;
}

.auth-card .field input:focus {
  outline: 2px solid var(--pbx-action);
  outline-offset: 0;
  border-color: var(--pbx-action);
}

/* ---- Brand logo ---- */

.brand-logo {
  display: block;
  border-radius: 7px;
}


.auth-card .brand-logo--large {
  margin: 0 auto var(--sp-2);
}

/* ---- Sign-in ---- */

.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3);
}

.auth-card {
  background: var(--pbx-card);
  border: 1px solid var(--pbx-border);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(23, 50, 77, 0.08), 0 16px 42px rgba(23, 50, 77, 0.1);
  padding: var(--sp-4);
  width: 100%;
  max-width: 430px;
}

/* Spacing mirrors PBXhost's sign-in brand block: tight to the logo
   (line-height 1) with a clear gap before the heading. */
.auth-card .product-name {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1.75rem;
  text-align: center;
}

.auth-card .product-name span {
  color: var(--pbx-action);
}

.auth-card .tagline {
  color: var(--pbx-muted);
  font-size: 14px;
  margin: 0.25rem 0 1.25rem;
  text-align: center;
}

.auth-card .auth-heading {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 0.25rem;
  text-align: center;
}

.auth-card .auth-error {
  background: #fde8e8;
  color: #8a1f1f;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: var(--sp-2);
}

.auth-card .auth-links {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  font-size: 13px;
}

.auth-card .auth-links a {
  color: var(--pbx-action);
}

.auth-card #sign-in-submit {
  width: 100%;
}


.auth-card .mock-note {
  margin-top: var(--sp-2);
  font-size: 12px;
  color: var(--pbx-muted);
  text-align: center;
}

.auth-choice {
  display: grid;
  gap: 0.875rem;
}

.auth-choice__card {
  width: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--pbx-border);
  border-radius: 14px;
  background: var(--pbx-card);
  color: var(--pbx-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.auth-choice__card:hover,
.auth-choice__card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--pbx-action);
  background: color-mix(in srgb, var(--pbx-action) 8%, white);
  outline: none;
}

/* Keeps the family hover so the styling reads as live, but the cursor stays
   honest about there being nothing to click yet. */
.auth-choice__card--inactive {
  cursor: default;
}

.auth-choice__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--pbx-action);
  background: color-mix(in srgb, var(--pbx-action) 10%, white);
}

.auth-choice__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.auth-choice__content strong {
  font-size: 1rem;
  line-height: 1.3;
}

.auth-choice__content span {
  color: var(--pbx-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.auth-choice__arrow {
  color: var(--pbx-action);
  font-size: 1.35rem;
}

/* ---- Sign-in intro (wordmark reveal, then options stagger in) ----
   Plays once per tab session (js/signInIntro.js sets `no-intro`). */

.auth-card .product-name--intro {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card .product-name .product-name__primary {
  color: inherit;
}

/* Zero-width clipped column: "change" slides out from behind the right edge
   of "PBX" as the column opens, pushing "PBX" left of centre. */
.product-name__reveal {
  display: grid;
  grid-template-columns: 1fr;
}

.product-name__reveal > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
}

.brand-logo--intro {
  opacity: 0;
  animation: intro-logo-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.product-name--intro .product-name__primary {
  opacity: 0;
  animation: intro-pbx-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.product-name--intro .product-name__reveal {
  grid-template-columns: 0fr;
  animation: intro-reveal 0.8s cubic-bezier(0.77, 0, 0.18, 1) 0.95s forwards;
}

.intro-enter {
  opacity: 0;
  animation: intro-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-enter--d1 {
  animation-delay: 1.7s;
}

.intro-enter--d2 {
  animation-delay: 1.82s;
}

.intro-enter--d3 {
  animation-delay: 1.96s;
}

.intro-enter--d4 {
  animation-delay: 2.1s;
}

.intro-enter--d5 {
  animation-delay: 2.24s;
}

@keyframes intro-logo-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes intro-pbx-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes intro-reveal {
  from {
    grid-template-columns: 0fr;
  }
  to {
    grid-template-columns: 1fr;
  }
}

@keyframes intro-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.no-intro .brand-logo--intro,
.no-intro .product-name--intro .product-name__primary,
.no-intro .intro-enter {
  animation: none;
  opacity: 1;
}

.no-intro .product-name--intro .product-name__reveal {
  animation: none;
  grid-template-columns: 1fr;
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo--intro,
  .product-name--intro .product-name__primary,
  .intro-enter {
    animation: none;
    opacity: 1;
  }

  .product-name--intro .product-name__reveal {
    animation: none;
    grid-template-columns: 1fr;
  }
}

.auth-back {
  margin-top: var(--sp-2);
  text-align: center;
}

.auth-back button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--pbx-action);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}


.auth-card .auth-error.sign-in__error--info {
  background: #e8f6ee;
  color: #1d6f42;
}

.auth-choice__card {
  text-decoration: none;
}

@media (max-width: 480px) {
  .auth-card {
    padding: var(--sp-3);
  }
}


.site-header__actions {
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.header-project-title {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  max-width: min(22rem, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  line-height: 1.25;
}

.header-project-title[hidden] {
  display: none !important;
}

/* ---- Site menu (hamburger → panel) ---- */

.site-menu-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.site-menu-toggle:hover {
  border-color: var(--pb-blue);
  background: color-mix(in srgb, var(--pb-blue) 8%, white);
}

.site-menu-toggle:focus-visible {
  outline: 2px solid var(--pb-blue);
  outline-offset: 2px;
}

.site-menu-toggle__bars,
.site-menu-toggle__bars::before,
.site-menu-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-menu-toggle__bars { position: relative; }

.site-menu-toggle__bars::before,
.site-menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-menu-toggle__bars::before { top: -6px; }
.site-menu-toggle__bars::after { top: 6px; }

body.site-menu-open .site-menu-toggle__bars { background: transparent; }
body.site-menu-open .site-menu-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}
body.site-menu-open .site-menu-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.site-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.site-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(20.5rem, 92vw);
  background: var(--surface);
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  padding: 28px 16px 24px;
  transform: translateX(104%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.site-menu.is-open .site-menu__backdrop { opacity: 1; }
.site-menu.is-open .site-menu__panel { transform: translateX(0); }

.site-menu.is-open .site-menu__user,
.site-menu.is-open .site-menu__link,
.site-menu.is-open .site-menu__sign-out {
  opacity: 1;
  transform: translateX(0);
}

.site-menu.is-open .site-menu__link--disabled,
.site-menu.is-open .site-menu__link--future {
  opacity: 0.42;
}

.site-menu__user,
.site-menu__link,
.site-menu__sign-out {
  opacity: 0;
  transform: translateX(14px);
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.12s ease,
    color 0.12s ease,
    padding-left 0.12s ease,
    border-color 0.12s ease;
}

.site-menu.is-open .site-menu__user { transition-delay: 0.06s; }
.site-menu.is-open .site-menu__link:nth-child(1) { transition-delay: 0.08s; }
.site-menu.is-open .site-menu__link:nth-child(2) { transition-delay: 0.1s; }
.site-menu.is-open .site-menu__link:nth-child(3) { transition-delay: 0.12s; }
.site-menu.is-open .site-menu__link:nth-child(4) { transition-delay: 0.14s; }
.site-menu.is-open .site-menu__link:nth-child(5) { transition-delay: 0.16s; }
.site-menu.is-open .site-menu__link:nth-child(6) { transition-delay: 0.18s; }
.site-menu.is-open .site-menu__link:nth-child(7) { transition-delay: 0.2s; }
.site-menu.is-open .site-menu__link:nth-child(8) { transition-delay: 0.22s; }
.site-menu.is-open .site-menu__link:nth-child(9) { transition-delay: 0.24s; }
.site-menu.is-open .site-menu__link:nth-child(10) { transition-delay: 0.26s; }
.site-menu.is-open .site-menu__sign-out { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .site-menu__backdrop,
  .site-menu__panel,
  .site-menu__user,
  .site-menu__link,
  .site-menu__sign-out {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

.site-menu__head {
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.site-menu__user {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.site-menu__user-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pb-blue) 12%, white);
  color: var(--pb-blue);
  box-sizing: border-box;
}

.site-menu__user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-menu__user:hover,
.site-menu__user:focus-visible {
  background: color-mix(in srgb, var(--pb-blue) 10%, white);
  color: var(--pb-blue);
  outline: none;
}

.site-menu__user:hover .site-menu__user-icon,
.site-menu__user:focus-visible .site-menu__user-icon {
  background: color-mix(in srgb, var(--pb-blue) 18%, white);
}

.site-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow: auto;
  padding: 0 8px;
}

.site-menu__group {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 12px 6px;
}

.site-menu__group--disabled { opacity: 0.45; }

.site-menu__link {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 12px;
  border-radius: 8px;
}

.site-menu__link:hover {
  background: var(--surface-elevated);
  color: var(--pb-blue);
  padding-left: 16px;
}

.site-menu__link--active {
  background: color-mix(in srgb, var(--pb-blue) 12%, white);
  color: var(--pb-blue);
}

.site-menu__link--disabled,
.site-menu__link--future {
  color: var(--text-muted);
  cursor: not-allowed;
  font-weight: 600;
}

.site-menu__link--disabled:hover,
.site-menu__link--future:hover {
  background: transparent;
  color: var(--text-muted);
  padding-left: 12px;
}

.site-menu__foot {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--border);
}

.site-menu__sign-out {
  appearance: none;
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}

.site-menu__sign-out:hover {
  border-color: #b91c1c;
  color: #b91c1c;
  background: color-mix(in srgb, #b91c1c 8%, white);
}

body.site-menu-open { overflow: hidden; }

/* ---- Staff / Manage Event (PBXpeople Admin Console pattern) ---- */

.site-header__context {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex-shrink: 1;
}

.site-header__context .header-project-title,
.site-header__context #header-project-title {
  max-width: min(22rem, 42vw);
}

.staff-badge {
  background: #d97706;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 4px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.site-header--compact .staff-badge {
  font-size: 10px;
  padding: 1px 6px;
}

.site-header--compact .site-header__context {
  gap: 2px;
}

.review-nudge {
  background: color-mix(in srgb, #d97706 12%, white);
  border-left: 4px solid #d97706;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.9375rem;
  color: var(--text);
}

.main--staff {
  /* Width comes from `.main` + `body.page-wide` (same as dashboard). */
  padding-top: 1.75rem;
}

.main--staff h1 {
  margin: 0 0 1.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tile {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
  box-shadow: var(--shadow);
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--pb-blue);
}

.tile__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.tile__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--pb-blue);
  background: var(--pb-blue-soft);
  margin-bottom: 0.75rem;
}

.tile strong {
  display: block;
  font-size: 15px;
}

.tile span {
  color: var(--text-muted);
  font-size: 13px;
}

.tile--coming {
  opacity: 0.55;
  cursor: default;
}

.tile--coming:hover {
  transform: none;
  border-color: var(--border-strong);
}

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

/* ---- Staff rate card CRUD ---- */

.staff-crumb {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.staff-crumb a {
  color: var(--pb-blue);
  text-decoration: none;
  font-weight: 600;
}

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

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

.staff-bk-head h1 {
  margin: 0;
}

.staff-bk-head .filter-row,
.staff-bk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  justify-content: flex-end;
}

/* Match PBXchange library filter chips */
.chip {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--pb-blue);
  color: var(--pb-blue-dark);
}

.chip--active {
  background: var(--pb-blue);
  border-color: var(--pb-blue);
  color: #fff;
}

.chip--active:hover {
  background: var(--pb-blue-dark);
  border-color: var(--pb-blue-dark);
  color: #fff;
}

.staff-bk-search {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.65rem;
}

.staff-bk-search input {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}

.staff-bk-search input::placeholder {
  color: var(--text-muted);
}

.staff-bk-search input:focus {
  outline: 2px solid color-mix(in srgb, var(--pb-blue) 45%, transparent);
  outline-offset: 1px;
  border-color: var(--pb-blue);
}

.staff-bk-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.staff-bk-toolbar .panel-status {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.staff-bk-toolbar .panel-status:not([hidden]) {
  margin-right: auto;
}

.staff-bk-toolbar .btn {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  padding: 9px 16px;
  font-size: 15px;
  margin-left: auto;
}

.staff-bk-notes-cell {
  max-width: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-bk-table tbody tr.staff-bk-row {
  cursor: default;
}

.staff-bk-table tbody tr.staff-bk-row:hover td {
  background: color-mix(in srgb, var(--pb-blue) 8%, white);
}

.staff-bk-table tbody tr.staff-bk-row--clickable {
  cursor: pointer;
}

.staff-bk-detail-overlay.ack-overlay {
  z-index: 320;
}

.ack-card.staff-edit-card.staff-bk-detail-card {
  width: min(1120px, calc(100vw - 2rem));
  max-width: min(1120px, calc(100vw - 2rem));
  max-height: min(92vh, 960px);
  overflow: auto;
}

.staff-bk-detail__table-wrap {
  overflow-x: auto;
}

.staff-bk-detail__table th,
.staff-bk-detail__table td {
  vertical-align: top;
}

.staff-bk-detail__number {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.staff-bk-detail__description {
  max-width: 18rem;
}

.staff-bk-detail__note {
  max-width: 14rem;
  white-space: pre-wrap;
}

.staff-bk-detail__price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.staff-bk-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin: 0 0 1rem;
}

.staff-bk-detail-header__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.staff-bk-detail-card .staff-bk-detail-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.staff-bk-detail-status {
  display: flex;
  align-items: center;
}

.staff-bk-detail-header__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  margin-left: auto;
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.staff-bk-detail-body {
  margin-bottom: 0.5rem;
}

.staff-bk-detail-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}

.staff-admin-lead {
  margin: 0 0 1.25rem;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.staff-su-allocate {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
  width: 100%;
}

.staff-su-allocate .field__label {
  margin: 0;
}

.staff-su-allocate .field__input {
  width: 100%;
  max-width: none;
}

.staff-bk-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.staff-su-detail-card {
  max-width: min(920px, calc(100vw - 2rem));
}

.staff-su-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.staff-su-detail__lead {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.staff-su-detail__dl {
  margin: 0;
}

.staff-su-detail__dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.2rem 0;
  font-size: 0.875rem;
}

.staff-su-detail__dl dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.staff-su-detail__dl dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.staff-bk-status-change {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.staff-bk-status-change .field__label {
  margin: 0;
  min-width: 6.5rem;
}

.staff-bk-status-change .field__input {
  flex: 1;
  min-width: 10rem;
}

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

.staff-rc-head h1 {
  margin: 0;
}

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

/* Match PBXpeople / PBXchange staff head buttons (shorter, 15px, icon+label). */
.staff-rc-head__actions .btn {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 8px;
  gap: 8px;
}

.staff-rc-head__actions .btn--primary {
  background: var(--pb-blue);
  border-color: var(--pb-blue);
  color: #fff;
}

.staff-rc-head__actions .btn--primary:hover:not(:disabled) {
  filter: brightness(1.08);
  background: var(--pb-blue);
  border-color: var(--pb-blue);
}

.staff-rc-head__actions .btn--secondary {
  background: transparent;
  border-color: var(--pb-blue);
  color: var(--pb-blue);
}

.staff-rc-head__actions .btn--secondary:hover:not(:disabled) {
  background: var(--pb-blue-soft);
  border-color: var(--pb-blue);
}

.staff-rc-form {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
}

.staff-rc-form h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

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

.staff-rc-form__grid .field--full {
  grid-column: 1 / -1;
}

.staff-rc-form__grid .field--check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.staff-rc-form__grid .field--check .field__label,
.staff-rc-form__grid .field--check > span {
  margin: 0;
  font-weight: 500;
}

.staff-rc-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.staff-rc-actions {
  width: 2.75rem;
  white-space: nowrap;
  text-align: right;
  position: relative;
}

.staff-rc-row-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.staff-rc-row-menu__trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.staff-rc-row-menu__trigger:hover,
.staff-rc-row-menu.is-open .staff-rc-row-menu__trigger {
  color: var(--pb-blue-dark);
  background: color-mix(in srgb, var(--pb-blue) 10%, white);
  border-color: color-mix(in srgb, var(--pb-blue) 18%, white);
}

.staff-rc-row-menu__panel {
  position: fixed;
  z-index: 80;
  min-width: 8.5rem;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.staff-rc-row-menu__item {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.staff-rc-row-menu__item:hover {
  background: color-mix(in srgb, var(--pb-blue) 10%, white);
}

.staff-rc-row-menu__item--danger {
  color: #b91c1c;
}

.staff-rc-row-menu__item--danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

.staff-rc-empty {
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}

.staff-rc-empty-state {
  margin: 2.5rem 0 3rem;
  padding: 2rem 1rem;
  text-align: center;
}

.staff-rc-empty-state__icon {
  display: block;
  margin: 0 auto 1rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.staff-rc-empty-state__title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.staff-rc-empty-state__body {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.staff-rc-category-row-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.staff-rc-category-row-controls .field__input {
  flex: 1 1 14rem;
  min-width: 0;
}

.staff-rc-category-row-controls .btn {
  height: var(--field-control-height);
  min-height: var(--field-control-height);
  padding-top: 0;
  padding-bottom: 0;
}

/* ---- Skeletons (PBXchange-style) ---- */

.skeleton-line,
.skeleton-thumb {
  display: block;
  background: color-mix(in srgb, var(--border-strong) 55%, var(--surface-elevated));
  border-radius: 4px;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.skeleton-line--title {
  height: 14px;
  width: 72%;
}

.skeleton-line--sub {
  height: 12px;
  width: 54%;
  margin-top: 8px;
}

.skeleton-line--meta {
  height: 10px;
  width: 38%;
  margin-top: 8px;
}

.skeleton-line--rc-label {
  height: 12px;
  width: 5.5rem;
}

.skeleton-line--rc-num {
  height: 12px;
  width: 2.25rem;
}

.skeleton-line--rc-spacer {
  height: 12px;
  width: 5.5rem;
  opacity: 0;
}

.skeleton-line--rc-price {
  height: 12px;
  width: 4rem;
  margin-left: auto;
}

.skeleton-card {
  pointer-events: none;
  user-select: none;
}

.skeleton-card--picker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #f8fafc;
}

.skeleton-card--staff-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 0.5rem;
}

.skeleton-card--staff-row .skeleton-card__body {
  flex: 1;
  min-width: 0;
}

.skeleton-rc-table {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.75rem 0 1.5rem;
  min-height: 16rem;
}

.skeleton-card--rc-cat,
.skeleton-card--rc-row {
  display: grid;
  grid-template-columns: 5.5rem 2.5rem minmax(8rem, 1.4fr) minmax(6rem, 1fr) 4.5rem;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
}

.skeleton-card--rc-cat {
  background: color-mix(in srgb, var(--pb-blue) 8%, white);
}

.skeleton-card--rc-row {
  background: var(--surface);
  border: 1px solid var(--border);
}

.staff-rc-skeleton[aria-busy="true"] {
  margin: 0.5rem 0 1rem;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line,
  .skeleton-thumb {
    animation: none;
  }
}

@media (max-width: 720px) {
  .skeleton-card--rc-cat,
  .skeleton-card--rc-row {
    grid-template-columns: 4.5rem 2rem 1fr;
  }

  .skeleton-card--rc-cat .skeleton-line--meta,
  .skeleton-card--rc-row .skeleton-line--meta,
  .skeleton-card--rc-row .skeleton-line--rc-price {
    display: none;
  }
}

/* Modals — match PBXpeople / PBXchange ack-overlay pattern */
.ack-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 50, 77, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 40;
}

.ack-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.ack-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.ack-card .panel-status {
  margin: 0 0 0.75rem;
}

.add-note-modal__hint {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ack-card.staff-edit-card {
  max-width: 720px;
  max-height: min(92vh, 880px);
  overflow: auto;
}

.ack-card .staff-rc-form__grid {
  margin-bottom: 0.25rem;
}

.ack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.staff-rc-section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.staff-rc-category-row td {
  background: color-mix(in srgb, var(--pb-blue) 8%, white);
  color: var(--pb-blue-dark);
  font-weight: 700;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.staff-rc-category-row .staff-rc-category-cell {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.staff-rc-category-row .staff-rc-number-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.staff-rc-category-row .staff-rc-category-name-cell {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.8125rem;
}

.staff-rc-category-row {
  cursor: default;
}

.staff-rc-category-row:hover td,
.staff-rc-category-row.is-selected td {
  background: color-mix(in srgb, var(--pb-blue) 16%, white);
}

.staff-rc-table tbody tr.is-selected:not(.staff-rc-category-row) td {
  background: color-mix(in srgb, var(--pb-blue) 6%, white);
}

@keyframes staff-rc-required-parent-flash {
  0%,
  20% {
    background-color: color-mix(in srgb, #dc2626 14%, white);
  }
  100% {
    background-color: #fff;
  }
}

.staff-rc-table tbody tr.staff-rc-row--required-parent td {
  animation: staff-rc-required-parent-flash 2s ease-out forwards;
}

@keyframes rate-card-toast-flash {
  0%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -0.35rem);
  }
}

.rate-card-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 80;
  width: min(36rem, calc(100vw - 2rem));
  transform: translate(-50%, -0.35rem);
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid color-mix(in srgb, #dc2626 35%, var(--border));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  color: #991b1b;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.rate-card-toast--show {
  animation: rate-card-toast-flash 6s ease-out forwards;
}

/* Match PBXpeople people-table: bordered white card, darker header, white body. */
.staff-rc-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

.staff-rc-table {
  min-width: 960px;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: #fff;
}

.staff-rc-table th,
.staff-rc-table td {
  text-align: left;
  padding: 0.65rem 0.875rem;
  border-bottom: 1px solid var(--border-strong);
  vertical-align: middle;
}

.staff-rc-table th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  /* Darker than body — same mix pattern as people (surface into white). */
  background: color-mix(in srgb, #e8eef4 70%, white);
  white-space: nowrap;
  padding: 0;
}

/* Booker (and any header without a sort button) needs real cell padding. */
.staff-rc-table th:not(:has(.staff-rc-sort)) {
  padding: 0.75rem 0.875rem;
  white-space: normal;
  line-height: 1.25;
  vertical-align: middle;
}

.staff-rc-table tbody td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.staff-rc-table th.staff-rc-col-number,
.staff-rc-table th.staff-rc-col-price,
.staff-rc-table th.staff-rc-col-requires {
  white-space: normal;
}

.staff-rc-table th.staff-rc-col-number {
  width: 4.75rem;
  max-width: 4.75rem;
}

.staff-rc-table th.staff-rc-col-item,
.staff-rc-table td.staff-rc-item-cell,
.staff-rc-table td.staff-rc-category-name-cell {
  max-width: 16rem;
}

.staff-rc-table th.staff-rc-col-description,
.staff-rc-table td.staff-rc-description-cell {
  min-width: 16rem;
  width: 22%;
}

.staff-rc-table th.staff-rc-col-price,
.staff-rc-table tbody td:nth-child(6) {
  width: 8.75rem;
  max-width: 9.25rem;
  white-space: nowrap;
}

.staff-rc-table th.staff-rc-col-price {
  white-space: normal;
}

.staff-rc-table th.staff-rc-col-price .staff-rc-sort {
  white-space: normal;
}

.staff-rc-table th.staff-rc-col-notes,
.staff-rc-table td.staff-rc-notes-cell {
  width: 10rem;
  max-width: 11rem;
}

.staff-rc-table th.staff-rc-col-requires {
  width: 4.5rem;
  max-width: 5rem;
}

.staff-rc-table td.staff-rc-number-cell,
.staff-rc-table tbody td:nth-child(2) {
  white-space: nowrap;
  width: 4.75rem;
  max-width: 4.75rem;
}

.staff-rc-table td.staff-rc-requires-cell {
  white-space: nowrap;
  width: 4.5rem;
  max-width: 5rem;
}

.staff-rc-col-number .staff-rc-sort,
.staff-rc-col-price .staff-rc-sort,
.staff-rc-col-requires .staff-rc-sort {
  align-items: flex-start;
  white-space: normal;
  line-height: 1.25;
}

.staff-rc-table tbody tr:last-child td {
  border-bottom: none;
}

.staff-rc-table td {
  background: #fff;
  color: var(--text);
}

.staff-rc-table tbody tr:hover {
  background: transparent;
}

.staff-rc-table tbody tr:hover td {
  background: color-mix(in srgb, var(--pb-blue) 8%, white);
}

.staff-rc-sort {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.875rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.staff-rc-sort:hover {
  color: var(--pb-blue-dark);
  background: color-mix(in srgb, var(--pb-blue) 6%, white);
}

.staff-rc-sort::after {
  content: "";
  font-size: 0.7em;
  font-weight: 600;
  min-width: 0.75em;
}

.staff-rc-table th.is-sorted .staff-rc-sort {
  color: var(--pb-blue-dark);
}

.staff-rc-table th.is-sorted .staff-rc-sort::after {
  content: "↑";
  opacity: 0.9;
}

.staff-rc-table th.is-sorted-desc .staff-rc-sort::after {
  content: "↓";
}

.staff-rc-notes-cell {
  max-width: 11rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.staff-rc-row--inactive td {
  opacity: 0.55;
}

@media (max-width: 720px) {
  .staff-rc-form__grid {
    grid-template-columns: 1fr;
  }
}

.phone-input {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(160px, 1.1fr);
  gap: 8px;
}

.phone-input__country,
.phone-input__number {
  width: 100%;
  min-width: 0;
}

.phone-input__preview {
  margin: 6px 0 0;
  min-height: 1.25em;
}

.phone-input__preview--error {
  color: var(--error, #b42318);
}

@media (max-width: 620px) {
  .phone-input {
    grid-template-columns: 1fr;
  }
}
