.staff-page { background: #f5f3e9; color: #213629; }
.staff-header { display:flex; align-items:center; gap:12px; padding:12px max(16px, calc((100% - 1040px)/2)); background:#233629; color:#fffdf2; }
.staff-header img { border-radius:50%; }
.staff-header a { margin-left:auto; color:inherit; white-space:nowrap; }
.staff-shell { max-width:1040px; margin:auto; padding:38px 16px 65px; }
.workspace .staff-shell { max-width:none; margin:0; padding:0; }
.staff-shell h1 { font-size:clamp(2.4rem, 7vw, 4.25rem); line-height:1.02; margin:.2em 0; }
.staff-shell h2 { font-size:clamp(1.25rem, 4vw, 1.6rem); margin:0 0 .55em; }
.staff-shell h1, .staff-shell h2 { text-wrap:balance; }
.staff-shell p { text-wrap:pretty; }
.staff-intro { margin:0; }
#staff-status { min-height:1.45em; color:#345640; }
#staff-status.error { color:#8b2a1f; }
.staff-panel { background:#fffdf5; border:1px solid #ddd8c7; border-radius:12px; padding:clamp(14px, 3vw, 24px); margin-bottom:16px; min-width:0; }
.staff-signin { max-width:430px; }
.staff-tools, .staff-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.staff-tools { justify-content:space-between; margin-bottom:15px; }
.staff-shell button, .staff-button { min-height:44px; display:inline-flex; align-items:center; justify-content:center; padding:8px 13px; border:1px solid #c9ccbd; border-radius:8px; background:#fbfaf1; color:#213629; font:inherit; font-weight:700; text-decoration:none; cursor:pointer; }
.staff-shell .primary { background:#263c2d; color:#fffdf5; border-color:#263c2d; }
.staff-shell button:disabled, .staff-shell button[aria-disabled=true] { opacity:.55; cursor:wait; }
.staff-shell [hidden] { display:none !important; }
.staff-shell button:disabled { cursor:default; }
.staff-shell :focus-visible { outline:3px solid #657b40; outline-offset:2px; }
.staff-shell label:not(.staff-button) { display:grid; gap:4px; font-weight:700; min-width:0; }
.staff-shell input:not([type=file]), .staff-shell select, .staff-shell textarea { width:100%; min-width:0; min-height:44px; border:1px solid #c9ccbd; border-radius:7px; padding:8px; background:#fff; color:inherit; font:inherit; font-size:max(1rem, 16px); font-weight:400; }
.staff-shell textarea { min-height:85px; resize:vertical; }
.staff-grid { display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(0, 1fr); gap:16px; align-items:start; }
.staff-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.staff-form { display:grid; gap:13px; }
.staff-shell fieldset { border:0; margin:0; min-width:0; padding:0; }
.staff-field { min-width:0; }
.staff-field-flag { display:grid; gap:5px; margin-top:5px; padding:7px; border-radius:6px; background:#fae7e4; color:#8b241c; font-size:.88rem; text-wrap:pretty; }
.staff-shell :is(input, select)[aria-invalid=true] { border-color:#a12a21; outline:2px solid #a12a21; outline-offset:0; }
.staff-shell :is(input, select)[aria-invalid=true]:focus-visible { outline-offset:2px; }
.staff-field-flag[data-ignored-reason] { background:#efeee7; color:#4f5349; }
.staff-field-flag[data-ignored-reason] :is([data-action=confirm-field], [data-action=ignore-field]),
.staff-field-flag:not([data-ignored-reason]) :is([data-action=restore-field], .staff-ignore-note) { display:none; }
.staff-ignore-editor { display:grid; gap:6px; }
.staff-field-flag .staff-actions button, .staff-ignore-editor button { min-height:36px; padding:4px 9px; }
.staff-print { grid-column:1/-1; color:#525b4b; text-wrap:pretty; }
.staff-shell input[type=hidden] { display:none; }
.staff-units { color:#345640; font-weight:700; align-self:center; }
.staff-issues { margin:0; padding:12px 12px 12px 31px; border-radius:8px; background:#fae7e4; color:#8b241c; text-wrap:pretty; }
.staff-review-summary { display:grid; grid-template-columns:1fr 1.25fr; gap:18px; }
.staff-review-summary h3, .staff-review-body h3, .staff-source h3 { margin:0 0 12px; }
.staff-review-summary button { margin-top:10px; }
.staff-review-body .staff-panel { margin:0; }
.staff-line-table { width:100%; table-layout:fixed; margin:0 0 14px; }
.staff-line-table :is(th, td) { padding:9px 6px; vertical-align:top; white-space:normal; }
.staff-line-table :is(th, td):first-child { width:33px; }
.staff-line-table :is(th, td):nth-child(3) { width:82px; }
.staff-line-table :is(th, td):last-child { width:77px; text-align:right; }
.staff-line-table th[scope=row] { text-align:left; overflow-wrap:anywhere; }
.staff-line-table small { display:block; font-weight:400; color:#525b4b; }
.staff-line-table .staff-flag { display:inline-block; margin-top:4px; }
.staff-line-table button { padding-inline:8px; }
#invoice-line-dialog { width:min(760px, calc(100% - 24px)); }
#invoice-line-dialog .dialog-head { align-items:center; }
.staff-line-source img { display:block; max-height:430px; width:100%; object-fit:contain; background:#ebe8dc; margin:6px 0; }
.staff-line-message { margin:0; color:#345640; }
.staff-line-message.error { color:#8b241c; }
.staff-pilot-settings { margin-top:16px; }
.staff-movement-log { padding:0; list-style:none; }
.staff-movement-log li { padding:9px 0; border-bottom:1px solid #e4e0d2; }
.staff-movement-log small { display:block; color:#525b4b; text-wrap:pretty; }
.staff-required-note { display:block; margin-top:5px; color:#8b241c; text-wrap:pretty; }
.staff-count { display:inline-block; padding:1px 8px; border-radius:20px; background:#ecebd9; font:700 .85rem/1.6 system-ui; vertical-align:middle; }
.staff-history-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr)); gap:12px; align-items:end; margin-bottom:14px; }
.staff-history-table { min-width:660px; }
.staff-history-table :is(td, th), .staff-history-table thead th:not(:first-child) { text-align:left; }
.staff-history-table td small { color:#525b4b; }
.staff-history-table .staff-button { white-space:nowrap; margin-top:4px; }
.staff-import-mode { max-width:420px; margin:0 0 14px; }
.staff-stock { width:100%; }
.staff-stock tbody th { text-align:left; }
.staff-stock td, .staff-stock thead th:not(:first-child) { text-align:right; }
.staff-stock small { display:block; }
.staff-rows { display:grid; gap:8px; margin:0 0 10px; }
.staff-row { width:100%; text-align:left; display:grid !important; gap:4px; justify-content:stretch !important; }
.staff-row-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px; }
.staff-row small, .staff-muted { color:#525b4b; font-weight:400; overflow-wrap:anywhere; }
.staff-flag { font-size:.78rem; padding:2px 8px; background:#ecebd9; border-radius:20px; }
.staff-flag.needs_followup { background:#fae7e4; color:#8b241c; }
.staff-flag.reviewed, .staff-flag.approved { background:#e3ecdb; color:#284c2a; }
.staff-flag.archived { background:#e9e5f0; color:#523b71; }
.staff-photos { display:grid; gap:12px; }
.staff-photos figure { margin:0; }
.staff-photos img { width:100%; max-height:430px; object-fit:contain; display:block; background:#ebe8dc; border-radius:8px; }
.staff-photos figcaption { margin:4px 0 0; overflow-wrap:anywhere; }
.staff-history ol { margin:0; padding:0; list-style:none; }
.staff-history li { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; padding:9px 0; border-bottom:1px solid #e4e0d2; }
.staff-history small { display:block; text-wrap:pretty; }
.staff-history h3 { margin-top:18px; }
.staff-snapshot { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:10px; }
.staff-snapshot dd { margin:0; overflow-wrap:anywhere; }
.staff-shell details > summary { cursor:pointer; font-weight:700; }
.staff-shell details[open] > summary { margin-bottom:12px; }
.staff-shell input[type=file] { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.staff-shell input[type=file]:focus-visible + label { outline:3px solid #657b40; outline-offset:2px; }
@media (max-width:720px) {
  .staff-grid { grid-template-columns:1fr; }
  .staff-review-summary { grid-template-columns:1fr; }
  .staff-grid > section:nth-child(2) { grid-row:1; }
  .staff-shell { padding-top:24px; }
}
@media (max-width:475px) {
  .staff-line-table :is(th, td) { padding-inline:4px; }
  .staff-line-table :is(th, td):first-child { width:24px; }
  .staff-line-table :is(th, td):nth-child(3) { width:60px; }
  .staff-line-table :is(th, td):last-child { width:64px; }
  .staff-stock td, .staff-stock th { padding-inline:6px; }
}
