.staff-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.staff-role-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.staff-role-preview[hidden] { display: none !important; }

.staff-role-preview select,
.staff-timesheet-filters select {
  border: 1px solid #cbd8e6;
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  font: inherit;
}

.staff-timesheet-filters {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.staff-timesheet-filters label {
  display: grid;
  gap: 7px;
  min-width: 210px;
  font-weight: 700;
}

.staff-timesheet-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.staff-timesheet-row {
  display: grid;
  grid-template-columns: 1.15fr 1.4fr 1fr .65fr .8fr;
  gap: 14px;
  align-items: center;
  min-width: 760px;
  padding: 14px 12px;
  border: 1px solid #dbe6ef;
  border-radius: 12px;
}

.staff-timesheet-row span { display: grid; }
.staff-timesheet-row small { color: #65758b; }
.staff-timesheet-head { background: #f3f8fc; font-weight: 800; }
.staff-timesheet-row.staff-time-long { border-color: #f0a500; background: #fffaf0; }
.staff-timesheet-row .staff-time-flag { display: inline-block; margin-top: 4px; color: #8a5a00; font-size: .78rem; font-weight: 800; }
.staff-timesheet-row .staff-time-note { color: #52677c; font-size: .8rem; overflow-wrap: anywhere; }
.staff-timesheet-row .staff-time-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.staff-time-dialog { width: min(560px, 100%); }
.staff-time-form { max-width: none; margin-top: 0; }
.staff-time-was { margin: 0; padding: 12px 14px; border-radius: 10px; background: #f3f8fc; color: #3a4d63; }
.staff-time-total { margin: 0; font-weight: 800; }

.staff-invite-form { display: grid; gap: 16px; max-width: 620px; margin-top: 22px; }
.staff-invite-form label { display: grid; gap: 7px; font-weight: 800; }
.staff-invite-form input,.staff-invite-form select,.staff-invite-form textarea { width: 100%; border: 1px solid #cbd8e6; border-radius: 12px; padding: 12px 14px; background: #fff; font: inherit; }
.staff-invite-form textarea { resize: vertical; min-height: 180px; line-height: 1.5; }
.staff-frequency-custom { display:grid; grid-template-columns:minmax(110px,.8fr) minmax(160px,1.2fr); gap:12px; align-items:end; }
.staff-frequency-custom[hidden] { display:none; }
@media (max-width:560px) { .staff-frequency-custom { grid-template-columns:1fr 1fr; } }
.staff-property-fields { grid-column:1/-1; border:1px solid #d8e4ef; border-radius:16px; padding:16px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.staff-property-fields legend { padding:0 8px; font-weight:800; }
.staff-scope-button { grid-column:1/-1; justify-self:start; }
.staff-scope-required { border:2px solid #f0a500!important; background:#fff4c7!important; color:#3f2b00!important; box-shadow:0 10px 24px rgba(240,165,0,.18); }
.staff-scope-required strong { margin-left:8px; padding:3px 8px; border-radius:999px; background:#f0a500; color:#fff; font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; }
.staff-scope-modal { position:fixed; inset:0; z-index:1200; display:grid; place-items:center; padding:24px; background:rgba(4,22,42,.68); }
.staff-scope-modal[hidden] { display:none; }
.staff-scope-dialog { width:min(920px,100%); max-height:min(86vh,860px); background:#fff; border-radius:24px; box-shadow:0 28px 80px rgba(0,0,0,.3); display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; }
.staff-scope-header,.staff-scope-footer { flex:none; background:#fff; padding:20px 24px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.staff-scope-header { border-bottom:1px solid #dce6ef; }
.staff-scope-header h2 { margin:4px 0 0; }
.staff-scope-footer { border-top:1px solid #dce6ef; justify-content:flex-end; }
.staff-scope-close { width:44px; height:44px; border:0; border-radius:50%; background:#eef6fb; color:#071a33; font-size:1.3rem; cursor:pointer; }
.staff-scope-scroll { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:22px 24px 28px; }
.staff-property-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:24px; }
.staff-property-summary div { border:1px solid #cfe0ec; background:#f4fbff; border-radius:14px; padding:14px; }
.staff-property-summary strong,.staff-property-summary span { display:block; }
.staff-property-summary span { color:#607086; font-size:.82rem; margin-top:2px; }
.staff-clean-standard { display:grid; gap:7px; margin:0 0 22px; padding:16px; border:1px solid #bfe1f2; border-radius:15px; background:#f3fbff; font-weight:800; }
.staff-clean-standard select { width:100%; border:1px solid #b9cedd; border-radius:12px; padding:12px 14px; background:#fff; font:inherit; }
.staff-clean-standard small { color:#52677c; font-weight:600; line-height:1.45; }
.staff-scope-section-heading h3 { margin:0 0 4px; }
.staff-scope-section-heading p { margin:0; color:#607086; }
.staff-checklist-tabs { display:flex; gap:8px; overflow-x:auto; padding:18px 0 12px; }
.staff-checklist-tabs button { white-space:nowrap; border:1px solid #c9d9e7; border-radius:999px; padding:9px 13px; background:#fff; font:inherit; font-weight:700; cursor:pointer; }
.staff-checklist-tabs button.active { color:#fff; background:#071a33; border-color:#071a33; }
.staff-scope-checklist { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.staff-scope-checklist label { display:flex; align-items:flex-start; gap:10px; border:1px solid #deE7ef; border-radius:12px; padding:11px 12px; font-weight:600; }
.staff-scope-checklist input { width:auto; margin-top:3px; }
.staff-scope-note { margin:18px 0 0; padding:14px; border-radius:12px; background:#fff8e5; color:#59420a; }
body.staff-scope-open { overflow:hidden; }
@media (max-width:700px) { .staff-property-fields,.staff-property-summary,.staff-scope-checklist { grid-template-columns:1fr 1fr; } .staff-scope-modal{padding:12px}.staff-scope-header,.staff-scope-footer,.staff-scope-scroll{padding-left:16px;padding-right:16px} }
.staff-role-list { display: grid; gap: 10px; margin-top: 20px; }
.staff-lead-filters { display:flex; gap:14px; flex-wrap:wrap; margin:20px 0; }
.staff-pipeline-summary { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.staff-pipeline-heading { margin:22px 0 0; font-size:1rem; }
.staff-pipeline-heading small { margin-left:8px; color:#52677c; font-weight:500; }
.staff-pipeline-actions { margin-top:10px; }
.staff-pipeline-actions button { background:#fff9eb; border-color:#eadcae; }
.staff-pipeline-summary button { display:grid; gap:2px; min-width:115px; padding:12px 16px; border:1px solid #cbd8e6; border-radius:12px; background:#f4fbff; color:#0b253c; cursor:pointer; text-align:left; font:inherit; }
.staff-pipeline-summary button strong { font-size:1.3rem; }
.staff-pipeline-summary button.active { border-color:#009fca; box-shadow:0 0 0 2px #bceefa; }
.staff-invite-form > label:first-child { grid-column:1/-1; }
.staff-invite-form label small { font-weight:400; color:#52677c; }
#inviteLeadContext { grid-column:1/-1; margin:0; padding:12px 14px; border-radius:10px; background:#eaf8ff; color:#083954; }
.staff-lead-filters label { display:grid; gap:6px; min-width:220px; font-weight:700; }
.staff-lead-filters input,.staff-lead-filters select,.staff-quote-row input,.staff-quote-row select,.staff-quote-row textarea { border:1px solid #cbd8e6; border-radius:9px; padding:9px; background:#fff; font:inherit; }
.staff-quote-history { display:grid; gap:10px; margin-top:20px; overflow-x:auto; }
.staff-quote-row { display:grid; grid-template-columns:minmax(150px,1.2fr) minmax(160px,1.1fr) minmax(145px,.8fr) minmax(155px,.8fr) minmax(180px,1.2fr) minmax(68px,auto); gap:10px; align-items:center; min-width:0; padding:12px; border:1px solid #dbe6ef; border-radius:12px; }
.staff-quote-row > * { min-width:0; }
.staff-quote-row select,.staff-quote-row input,.staff-quote-row textarea { width:100%; box-sizing:border-box; }
.staff-quote-row small,.staff-quote-row a { overflow-wrap:anywhere; }
.staff-quote-row[hidden] { display:none !important; }
.staff-pipeline-help { margin:10px 0 0; color:#52677c; }
.staff-quote-head { background:#f3f8fc; font-weight:800; }
.staff-quote-row span,.staff-quote-row small { display:block; }
.staff-quote-row small { color:#65758b; }
.staff-quote-row textarea { min-height:64px; resize:vertical; }
.staff-role-row { display: grid; grid-template-columns: minmax(180px,1.4fr) minmax(130px,.8fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid #dbe6ef; border-radius: 12px; }
.staff-role-row strong,.staff-role-row small { display: block; }
.staff-role-row small { color: #65758b; }
.staff-role-row select { border: 1px solid #cbd8e6; border-radius: 10px; padding: 9px 12px; background: #fff; font: inherit; }
@media(max-width:680px){.staff-role-row,.staff-quote-row{grid-template-columns:1fr}.staff-role-row .portal-btn{width:100%}}
