/* Staff V4 semantic layer. The dark palette is neutral charcoal, never forest. */
body.staff-v4 {--canvas:var(--neom-bg);--surface:var(--neom-surface);--ink:var(--neom-text);--muted:var(--neom-muted);--line:var(--neom-border);--green:var(--neom-brand);--green-wash:var(--neom-brand-wash);--forest:var(--neom-action);--shadow:var(--neom-shadow);background:var(--neom-bg);color:var(--neom-text)}
body.staff-v4 .app-layout {gap:12px;padding:12px}
body.staff-v4 .sidebar {background:var(--neom-bg);border-color:var(--neom-border)}
body.staff-v4 .app-layout>.workspace {background:var(--neom-surface);border-color:var(--neom-border);box-shadow:var(--neom-shadow);border-radius:15px}
body.staff-v4 :is(.topbar,.page-heading,.inbox,.detail-shell,.conversation-detail,.composer-wrap,.composer,.panel,.node-list,.node-detail,.advanced-editor,.preview-panel,.macro-detail,.macro-library,.macro-editor-scroll,.settings-navigation,.activity-panel,.quick-replies-panel,.command-palette,.staff-dialog,.prepared-files-dialog) {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-v4 :is(.brand,.brand-button,.brand-button strong,.profile .person,.breadcrumbs strong,.page-heading h1,.detail-title h2,.contact-identity h3,.macro-detail-header h2,.section-intro h2,.settings-section-heading h2,.team-member strong,.macro-preview-heading h3,.workflow-card h3,.article-item strong,.article-editor h2,.staff-dialog-header h2,.prepared-files-header h2,.prepared-files-empty h3) {color:var(--neom-text)}
body.staff-v4 :is(.page-heading p,.breadcrumbs,.profile small,.nav-heading,.sidebar-demo,.workspace-environment,.sidebar-search,.tenant-block label,.list-summary,.row-time,.row-preview,.language-label,.assignee-label,.draft-status,.composer-hint,.composer-visibility,.message-author,.message-author time,.message-meta,.thread-tools,.contact-panel label,.contact-panel .section-label,.contact-identity p,.key-value span,.field-help,.node-reference,.node-type,.node-type-label,.workflow-card p,.workflow-locales,.article-item small,.article-item-main>span,.macro-editor-intro,.macro-body-meta,.macro-row>span,.macro-row-bottom,.macro-preview-card .field-help,.settings-section-heading p,.member-identity>span,.member-role,.team-guidance p,.readonly-note,.version-section p,.activity-reference,.activity-row time,.login-foot,.prepared-files-header p,.prepared-files-count,.prepared-files-footer p,.prepared-file-info small,.prepared-files-empty p) {color:var(--neom-muted)}
body.staff-v4 :is(.conversation-pane,.inbox-list-header,.contact-panel,.tenant-block,.sidebar-search,.list-toolbar,.composer-heading,.macro-preview-card,.operations-form,.team-guidance,.installation-preview,.home-preview,.node-symbol,.flow-symbol,.article-symbol,.macro-variables button,.prepared-file-symbol) {background:var(--neom-raised);border-color:var(--neom-border);color:var(--neom-text)}
body.staff-v4 :is(input,textarea,select) {background:var(--neom-surface);border-color:var(--neom-border);color:var(--neom-text);accent-color:var(--neom-brand)}
body.staff-v4 input::placeholder,body.staff-v4 textarea::placeholder {color:var(--neom-muted);opacity:.9}
body.staff-v4 :is(input,textarea,select):hover {border-color:var(--neom-subtle)}
body.staff-v4 :is(input,textarea,select):focus {border-color:var(--neom-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--neom-focus) 14%,transparent)}
body.staff-v4 :focus-visible {outline:3px solid var(--neom-focus);outline-offset:3px}
body.staff-v4 button {background:var(--neom-surface);border-color:var(--neom-border);color:var(--neom-text);min-height:44px}
body.staff-v4 button:hover {background:var(--neom-hover);border-color:var(--neom-subtle)}
body.staff-v4 button.ghost {background:transparent;border-color:transparent;color:var(--neom-muted)}
body.staff-v4 :is(button.primary,.auth-submit) {background:var(--neom-action)!important;border-color:var(--neom-action)!important;color:var(--neom-on-action)!important}
body.staff-v4 :is(button.primary,.auth-submit):hover {filter:brightness(.92)}
body.staff-v4 .nav-items>button {color:var(--neom-muted);background:transparent}
body.staff-v4 .nav-items>button:hover {background:var(--neom-hover)}
body.staff-v4 .nav-items>button.active {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-border);box-shadow:none}
body.staff-v4 .nav-items>button.active::before {background:var(--neom-brand)}
body.staff-v4 .inbox-views {border-color:var(--neom-border)}
body.staff-v4 .nav-items .inbox-view {background:transparent;color:var(--neom-muted)}
body.staff-v4 .nav-items .inbox-view.active {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border);box-shadow:none}
body.staff-v4 :is(.count,.badge,.language-label,.local-pill) {background:var(--neom-raised);color:var(--neom-muted);border-color:var(--neom-border)}
body.staff-v4 .nav-items>button.active .count {background:var(--neom-inset);color:var(--neom-text)}
body.staff-v4 .conversation-row {background:transparent;border-color:transparent}
body.staff-v4 .conversation-row:hover {background:var(--neom-hover);border-color:var(--neom-border)}
body.staff-v4 .conversation-row.active {background:var(--neom-surface);border-color:var(--neom-subtle);box-shadow:none}
body.staff-v4 .row-line strong,body.staff-v4 .row-subject {color:var(--neom-text)}
body.staff-v4 :is(.avatar,.conversation-row .avatar,.contact-identity .avatar,.detail-avatar) {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-v4 :is(.filter-tabs,.detail-header,.thread-tools,.composer-heading,.composer-footer,.contact-section,.contact-panel-header,.sidebar-bottom,.profile,.section-intro,.node-heading,.editor-tabs,.version-section,.article-editor-heading,.staff-dialog-header,.staff-dialog-actions,.team-member,.macro-detail-header,.macro-save-actions,.macro-publish-row,.operations-actions,.activity-row,.prepared-files-header,.prepared-files-footer,.prepared-file-row) {border-color:var(--neom-border)}
body.staff-v4 .thread {background:var(--neom-surface)}
body.staff-v4 :is(.message-bubble,.thread-message.agent .message-bubble,.preview-bubble,.preview-bubble.user) {background:var(--neom-raised);border-color:var(--neom-border);color:var(--neom-text)}
body.staff-v4 .message-author strong {color:var(--neom-text)}
body.staff-v4 .thread-message.internal .message-bubble,body.staff-v4 .composer-note {background:var(--neom-warning-bg);border-color:color-mix(in srgb,var(--neom-warning) 35%,transparent);color:var(--neom-text)}
body.staff-v4 .composer-note .composer-heading {background:transparent;border-color:color-mix(in srgb,var(--neom-warning) 25%,transparent)}
body.staff-v4 .thread-message.internal .message-author>span {background:var(--neom-warning-bg);color:var(--neom-warning)}
body.staff-v4 :is(.composer textarea,.tenant-block select,.command-input-wrap #command-search) {background:transparent}
body.staff-v4 .composer textarea:focus {box-shadow:none}
body.staff-v4 :is(.send-actions select,.quick-reply-item,.article-item,.macro-row,.branch-card,.branch-preview,.node-list button,.help-collections button,.workflow-card,.message-file,.staff-file-chip,.member-row,.hours-row,.prepared-files-trigger) {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-v4 :is(.quick-reply-item:hover,.article-item:hover,.macro-row:hover,.node-list button:hover,.workflow-card:hover,.help-collections button:hover) {background:var(--neom-hover)}
body.staff-v4 :is(.macro-row.active,.node-list button.active,.help-collections button.active,.editor-tabs button.active) {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-subtle)}
body.staff-v4 .quick-reply-item small,body.staff-v4 .insert-label {color:var(--neom-muted)}
body.staff-v4 :is(.bot-summary,.composer-info,.handoff-explanation,.workflow-assurance,.preview-outcome,.tenant-seal,.member-active-row,.switch-row) {background:var(--neom-raised);border-color:var(--neom-border);color:var(--neom-muted)}
body.staff-v4 :is(.bot-summary strong,.bot-summary small,.macro-language-heading h3,.macro-variables>span,.switch-row strong,.switch-row small,.operations-message-heading h3,.operations-hours-heading h3,.preview-header h2,.next-node-row button,.article-link-card strong,.article-link-card small,.message-file strong,.message-file small,.file-description strong,.file-description small,.team-checks legend,.hours-empty) {color:var(--neom-text)}
body.staff-v4 .draft-badge {background:var(--neom-warning-bg);color:var(--neom-warning)}
body.staff-v4 .composer-tabs button.active,body.staff-v4 .filter-tabs button.active {color:var(--neom-text);border-bottom-color:var(--neom-text)}
body.staff-v4 :is(.priority-label.urgent,.response-indicator.overdue) {color:var(--neom-danger)}
body.staff-v4 :is(.form-error,.composer-error,.prepared-quota-help,.macro-conflict,.prepared-files-error,.file-error) {background:var(--neom-danger-bg);border-color:color-mix(in srgb,var(--neom-danger) 40%,transparent);color:var(--neom-danger)}
body.staff-v4 .prepared-quota-help {background:var(--neom-warning-bg);color:var(--neom-warning)}
body.staff-v4 :is(.prepared-files-header h2,.prepared-file-info strong,.prepared-files-empty h3) {color:var(--neom-text)}
body.staff-v4 :is(.prepared-files-dialog button,.prepared-files-trigger) {background:var(--neom-raised);border-color:var(--neom-border);color:var(--neom-text)}
body.staff-v4 .prepared-files-footer button {background:var(--neom-action);color:var(--neom-on-action)}
body.staff-v4 :is(.macro-preview-body,.macro-comparison section,.macro-comparison pre,.node-actions>div,.field-properties span,.article-link-card,.builder-toolbox,.builder-data-settings,.builder-node-controls details) {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-v4 .auth-page {background:var(--neom-surface)}
body.staff-v4 .auth-page .login-story {background:#25272b;color:#f4f5f6}
body.staff-v4 .auth-page .login-story::before,body.staff-v4 .auth-page .login-story::after {display:none}
body.staff-v4 .auth-page .login-story :is(h1,h1 em,.brand) {color:#f4f5f6}
body.staff-v4 .auth-page .login-story :is(p,.eyebrow,.auth-feature-line,.auth-story-foot,.auth-story-foot>span) {color:#c5c9cf}
body.staff-v4 .auth-page .login-form {background:var(--neom-surface)}
body.staff-v4 .auth-page .login-form :is(h2,label,.auth-mobile-brand) {color:var(--neom-text)}
body.staff-v4 .auth-page .login-form :is(p,.eyebrow,summary,.profile-card small) {color:var(--neom-muted)}
body.staff-v4 .dev-profile-section .profile-card {background:var(--neom-raised);border-color:var(--neom-border)}
body.staff-v4 .dev-profile-section .profile-card strong {color:var(--neom-text)}
body.staff-v4 .dev-profile-section {border-color:var(--neom-border)}
body.staff-v4 kbd {background:var(--neom-inset);color:var(--neom-muted);border-color:var(--neom-border)}
body.staff-app.staff-v4 .sidebar-search kbd {background:var(--neom-inset);color:var(--neom-muted);border-color:var(--neom-border)}
body.staff-app.staff-v4 .nav-items .count {background:var(--neom-raised);color:var(--neom-muted)}
body.staff-app.staff-v4 .connection-state {color:var(--neom-muted)}
body.staff-app.staff-v4 .priority-label.high {color:var(--neom-warning)}
body.staff-v4 .thread-tools {background:var(--neom-surface)}
body.staff-app.staff-v4 .thread-tools button {color:var(--neom-muted)}
body.staff-app.staff-v4 .workflow-library .section-intro {background:var(--neom-surface)}
body.staff-v4 #macro-body {background:var(--neom-surface);color:var(--neom-text)}
body.staff-app.staff-v4 .macro-editor-intro>span,body.staff-app.staff-v4 .macro-language-heading>span {color:var(--neom-muted)}
body.staff-app.staff-v4 .settings-navigation button {color:var(--neom-muted);background:transparent}
body.staff-app.staff-v4 .settings-navigation button.active {color:var(--neom-text);border-bottom-color:var(--neom-text)}
body.staff-v4 .key-value strong,body.staff-v4 .installation-preview a {color:var(--neom-text)}
body.staff-v4 pre {background:var(--neom-inset);color:var(--neom-text);border-color:var(--neom-border)}
:root[data-theme="dark"] body.staff-v4 :is(h1,h2,h3,h4,strong,b) {color:var(--neom-text)}
:root[data-theme="dark"] body.staff-v4 :is(p,small,label,legend,time) {color:var(--neom-muted)}
body.staff-v4 .topbar {gap:12px;padding-inline:20px}
body.staff-v4 .top-actions {gap:9px}
.v4-appearance-label {font-size:11px;color:var(--neom-muted)}
.login-appearance {display:flex;justify-content:flex-end;margin-bottom:24px}
.v4-content {padding:22px 28px 30px;overflow:auto;min-height:0;flex:1}
.v4-panel {border:1px solid var(--neom-border);border-radius:13px;background:var(--neom-surface);padding:22px;color:var(--neom-text)}
.v4-section-heading {display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}
.v4-section-heading h2 {font-size:19px;margin:0 0 5px;letter-spacing:-.45px}
.v4-section-heading p {font-size:12px;color:var(--neom-muted);margin:0;line-height:1.7}
.v4-filter-bar {display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:22px;padding:17px;background:var(--neom-raised);border:1px solid var(--neom-border);border-radius:12px}
.v4-filter-bar label {font-size:11px;margin:0;display:flex;flex-direction:column;gap:6px;min-width:130px}
.v4-filter-bar input,.v4-filter-bar select {min-height:44px;font-size:13px}
.v4-filter-bar .v4-range-note {margin-left:auto;font-size:11px;color:var(--neom-muted);max-width:270px;line-height:1.6}
.v4-metric-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
.v4-metric {padding:20px;border:1px solid var(--neom-border);border-radius:12px;background:var(--neom-surface);min-width:0}
.v4-metric>span {display:block;font-size:11px;line-height:1.6;color:var(--neom-muted);margin-bottom:10px}
.v4-metric strong {display:block;font-size:28px;line-height:1.2;font-weight:600;letter-spacing:-.9px}
.v4-metric small {display:block;font-size:11px;line-height:1.65;color:var(--neom-muted);margin-top:8px}
.v4-metric.is-unknown strong {font-size:20px;letter-spacing:-.4px;color:var(--neom-muted)}
.v4-two-columns {display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:18px;margin-bottom:20px}
.v4-table-wrap {overflow:auto;border:1px solid var(--neom-border);border-radius:12px;background:var(--neom-surface)}
.v4-table {width:100%;border-collapse:collapse;font-size:12px;text-align:left}
.v4-table th {padding:13px 15px;background:var(--neom-raised);color:var(--neom-muted);font-weight:550;white-space:nowrap}
.v4-table td {padding:15px;border-top:1px solid var(--neom-border);vertical-align:top;line-height:1.7}
.v4-table td.numeric,.v4-table th.numeric {text-align:right;font-variant-numeric:tabular-nums}
.v4-table td small {display:block;font-size:11px;color:var(--neom-muted)}
.v4-empty {padding:38px 20px;text-align:center;border:1px dashed var(--neom-border);border-radius:12px;color:var(--neom-muted)}
.v4-empty h2 {font-size:18px;color:var(--neom-text);margin:10px 0}
.v4-empty p {font-size:13px;line-height:1.8;margin:0 auto;max-width:550px}
.v4-error {padding:18px;border:1px solid color-mix(in srgb,var(--neom-danger) 45%,transparent);background:var(--neom-danger-bg);border-radius:12px;color:var(--neom-danger);font-size:13px;line-height:1.8}
.v4-error p {margin:0 0 12px}
.v4-source-note {padding:14px 16px;border-radius:10px;border:1px solid var(--neom-border);background:var(--neom-raised);font-size:12px;line-height:1.8;color:var(--neom-muted);margin:15px 0}
.v4-pagination {display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 0;font-size:12px;color:var(--neom-muted)}
.v4-badge {display:inline-flex;align-items:center;gap:5px;font-size:10px;line-height:1.6;border:1px solid var(--neom-border);background:var(--neom-raised);padding:3px 7px;border-radius:6px;color:var(--neom-muted);white-space:nowrap}
.v4-badge.is-danger {background:var(--neom-danger-bg);color:var(--neom-danger);border-color:color-mix(in srgb,var(--neom-danger) 35%,transparent)}
.v4-badge.is-warning {background:var(--neom-warning-bg);color:var(--neom-warning);border-color:color-mix(in srgb,var(--neom-warning) 35%,transparent)}
.v4-badge.is-success {background:var(--neom-success-bg);color:var(--neom-success);border-color:color-mix(in srgb,var(--neom-success) 35%,transparent)}
.v4-inline-actions {display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.v4-loading {padding:45px 20px;text-align:center;color:var(--neom-muted);font-size:13px}
.v4-loading .loading-dot {background:var(--neom-muted)}
.v4-presence-picker {font-size:12px;min-width:120px;max-width:160px}
.v4-presence-status {display:flex;gap:6px;align-items:center;font-size:11px;color:var(--neom-muted)}
.v4-presence-status::before {content:'';width:6px;height:6px;border-radius:50%;background:var(--neom-muted)}
.v4-presence-status.is-available::before {background:var(--neom-brand)}
.v4-error-inline {font-size:12px;line-height:1.7;color:var(--neom-danger);padding:9px 0}
.v4-attention-tabs {display:flex;gap:7px;overflow:auto;scrollbar-width:thin;padding:9px 12px;border-bottom:1px solid var(--neom-border);flex-shrink:0}
.v4-attention-tabs button {min-height:44px;flex-shrink:0;padding:8px 10px;font-size:11px;gap:6px}
.v4-attention-tabs button.active {background:var(--neom-action);color:var(--neom-on-action);border-color:var(--neom-action)}
.v4-attention-tabs button span {font-size:10px;opacity:.8}
.v4-attention-row {display:flex;align-items:center;justify-content:space-between;gap:9px;padding:10px 20px;border-bottom:1px solid var(--neom-border);background:var(--neom-raised)}
.v4-attention-row>div {display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.v4-attention-row button {font-size:11px;padding:7px 9px;min-height:36px}
.v4-case-age {font-size:10px;color:var(--neom-muted)}
.v4-case-age.is-danger {color:var(--neom-danger);font-weight:600}
.v4-row-attention {display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:7px}
body.staff-v4 .list-toolbar {flex-wrap:wrap}
body.staff-v4 #attention-severity {width:100%;max-width:none;flex-basis:100%}
.v4-alert-row {display:flex;align-items:flex-start;gap:16px;padding:19px;border:1px solid var(--neom-border);border-radius:12px;background:var(--neom-surface);margin-bottom:12px}
.v4-alert-row.is-critical {border-color:color-mix(in srgb,var(--neom-danger) 55%,var(--neom-border));background:var(--neom-danger-bg)}
.v4-alert-row>div {flex:1;min-width:0}
.v4-alert-row h3 {font-size:14px;margin:0 0 7px}
.v4-alert-row p {font-size:12px;color:var(--neom-muted);line-height:1.8;margin:0 0 9px}
.v4-alert-row .v4-inline-actions {margin-top:11px}
.v4-dialog-form label {margin-top:15px}
.v4-dialog-form textarea {min-height:90px}
.v4-chart {min-height:180px;display:flex;gap:4px;align-items:stretch;overflow-x:auto;padding:10px 0}
.v4-chart-column {min-width:25px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px}
.v4-chart-bar {width:75%;min-width:8px;max-width:40px;border-radius:4px 4px 0 0;background:var(--neom-action)}
.v4-chart-column span {font-size:9px;white-space:nowrap;color:var(--neom-muted);writing-mode:vertical-rl;transform:rotate(180deg);max-height:47px}
.v4-chart-column small {font-size:10px;color:var(--neom-muted)}
.v4-audit-payload {max-width:650px;white-space:pre-wrap;overflow-wrap:anywhere;padding:13px;border:1px solid var(--neom-border);border-radius:8px;background:var(--neom-inset);color:var(--neom-muted);font-size:11px;line-height:1.7}
.v4-audit-row details>summary {cursor:pointer;font-size:11px;color:var(--neom-muted);padding:10px 0}
.v4-schedule-week {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-top:17px}
.v4-schedule-day {border:1px solid var(--neom-border);border-radius:9px;padding:12px;min-width:0;background:var(--neom-surface)}
.v4-schedule-day>strong {font-size:11px;color:var(--neom-muted)}
.v4-schedule-day p {font-size:11px;line-height:1.7;margin:10px 0 0;overflow-wrap:anywhere}
.v4-schedule-day span {display:block}
.v4-shift-row {display:grid;grid-template-columns:1fr 1fr 1fr 44px;gap:8px;align-items:center;margin-bottom:10px}
.v4-shift-row input,.v4-shift-row select {min-width:0}
.v4-week-grid {display:grid;gap:15px}
.v4-team-person {display:flex;align-items:center;justify-content:space-between;gap:15px;padding:17px;border-bottom:1px solid var(--neom-border)}
.v4-team-person>div {min-width:0}
.v4-team-person strong {font-size:13px}
.v4-team-person small {display:block;font-size:11px;color:var(--neom-muted);margin-top:5px}
.v4-message-translation {margin-top:8px;max-width:100%}
body.staff-v4 .v4-translate-message {font-size:10px;min-height:36px;padding:5px 7px;gap:5px}
.v4-translate-message .icon {width:13px;height:13px}
.v4-translation-output {margin-top:8px;padding:12px;border:1px solid var(--neom-border);border-radius:10px;background:var(--neom-raised);color:var(--neom-text)}
.v4-translation-output>span {display:block;font-size:10px;font-weight:550;color:var(--neom-muted);line-height:1.7;margin-bottom:7px}
.v4-translation-output>p {white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8;margin:0}
.v4-translation-output>small {display:block;margin-top:9px;font-size:10px;color:var(--neom-muted)}
.v4-translation-dialog {width:min(700px,calc(100vw - 24px))}
.v4-translation-dialog textarea {min-height:110px}
.v4-translation-dialog label {margin-top:15px}
@media(max-width:620px){body.staff-v4 .v4-translate-message{min-height:44px;font-size:11px}.v4-translation-output>p{font-size:14px}}
@media(max-width:1100px){.v4-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v4-two-columns{grid-template-columns:1fr}.v4-schedule-week{grid-template-columns:repeat(4,minmax(0,1fr))}.v4-content{padding:20px}.v4-appearance-label{display:none}.appearance-control select{max-width:112px}.v4-presence-picker{max-width:125px}}
@media(max-width:820px){body.staff-v4 .app-layout{padding:0;gap:0}body.staff-v4 .app-layout>.workspace{border-radius:0}.v4-content{padding:18px}.v4-filter-bar{padding:14px}.v4-schedule-week{grid-template-columns:repeat(3,minmax(0,1fr))}body.staff-v4 .topbar{padding-inline:10px}.v4-presence-picker{display:none}.appearance-control select{max-width:105px;font-size:12px;min-width:88px}.v4-appearance-icon{display:none}}
@media(max-width:620px){body.staff-v4 input,body.staff-v4 textarea,body.staff-v4 select{font-size:16px!important}.v4-content{padding:16px}.v4-panel{padding:17px}.v4-metric-grid{gap:9px}.v4-metric{padding:15px}.v4-metric strong{font-size:24px}.v4-metric>span{font-size:11px}.v4-metric small{font-size:10px}.v4-filter-bar{gap:10px}.v4-filter-bar label{min-width:0;flex:1 0 40%}.v4-filter-bar button{width:100%}.v4-filter-bar .v4-range-note{max-width:none;margin-left:0;font-size:11px}.v4-attention-tabs{padding:7px 10px}.v4-attention-tabs button{font-size:11px;min-height:44px}.v4-attention-row{padding:8px 11px;align-items:flex-start;flex-wrap:wrap}.v4-attention-row>div{gap:5px}.v4-attention-row .v4-attention-actions{margin-left:auto}.v4-attention-row button{min-height:44px;font-size:11px}.v4-alert-row{padding:16px;gap:11px}.v4-alert-row .v4-inline-actions button{flex:1;font-size:11px}.v4-section-heading{align-items:flex-start;gap:12px}.v4-section-heading h2{font-size:18px}.v4-schedule-week{grid-template-columns:repeat(2,minmax(0,1fr))}.v4-schedule-day{padding:10px}.v4-shift-row{grid-template-columns:1fr 1fr 44px}.v4-shift-row select{grid-column:1/-1}.v4-table th,.v4-table td{padding:12px;font-size:12px}.v4-team-person{align-items:flex-start;flex-wrap:wrap;padding:15px}.v4-team-person>.v4-inline-actions{width:100%}.appearance-control select{font-size:14px!important;min-height:44px;max-width:95px;min-width:85px;padding-right:17px}.v4-chart-column{min-width:29px}.v4-audit-payload{font-size:11px}.v4-dialog-form input,.v4-dialog-form select,.v4-dialog-form textarea{font-size:16px}.v4-source-note{font-size:11px}}
@media(max-height:480px){.v4-attention-row{padding-block:4px}.v4-attention-row button{min-height:32px;padding-block:4px}.v4-attention-row .v4-attention-actions .v4-attention-text{display:none}.v4-attention-row .v4-attention-actions button{min-width:36px}.v4-content{padding-top:14px}.v4-attention-tabs{padding-block:4px}.v4-attention-tabs button{min-height:38px}.appearance-control select{min-height:40px}.v4-presence-picker{display:none}}
@media(max-height:480px){body.staff-v4 .composer-wrap{max-height:calc(100dvh - 210px)}body.staff-v4 .composer{max-height:calc(100dvh - 225px)}body.staff-v4 .composer-tools .v4-translate-draft{font-size:0!important;min-width:44px;min-height:44px;padding:8px}body.staff-v4 .composer-tools .v4-translate-draft>span{display:none}.v4-attention-row button{min-height:44px!important}.v4-attention-row .v4-attention-actions button{min-width:44px}}
@media(max-width:620px){body.staff-v4 .appearance-control select,body.staff-app.staff-v4 .send-actions select{font-size:16px!important}}
@media(prefers-reduced-motion:reduce){body.staff-v4 *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Empty inbox and search must also use semantic surfaces: legacy gradients
   and input selectors otherwise survive the dark theme and obscure text. */
body.staff-v4 .empty.inbox-empty {background:var(--neom-surface);background-image:none;color:var(--neom-muted)}
body.staff-v4 .empty.inbox-empty h2 {color:var(--neom-text)}
body.staff-v4 .empty-illustration {background:var(--neom-raised);border-color:var(--neom-border);color:var(--neom-muted);box-shadow:none}
body.staff-v4 .search-field input {background:var(--neom-surface);border-color:var(--neom-border);color:var(--neom-text)}

/* Cross-engine controls and complete surfaces. Native macOS select rendering
   ignores minimum height; keep the real select with an explicit appearance. */
body.staff-v4 {--staff-select-chevron: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='%235f6671' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
:root[data-theme="dark"] body.staff-v4 {--staff-select-chevron: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='%23b2b7c0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
body.staff-app.staff-v4 button {appearance:none;-webkit-appearance:none;line-height:1.4;min-height:44px;min-width:44px}
body.staff-v4 label:has(>input[type="checkbox"]) {min-height:44px;align-items:center}
body.staff-app.staff-v4 .sidebar .nav-items .inbox-view,
body.staff-app.staff-v4 #macro-form .locale-tabs button,
body.staff-app.staff-v4 .contact-panel-header button {min-height:44px;min-width:44px}
body.staff-app.staff-v4 .filter-tabs button {background:transparent}
body.staff-app.staff-v4 :is(.macro-row-bottom kbd,.shortcut-input) {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-app.staff-v4 #macro-form .locale-tabs button.active {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-subtle)}
body.staff-app.staff-v4 #workflow-json {background:var(--neom-inset);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-app.staff-v4 :is(.staff-dialog-header,.staff-dialog-actions) {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-app.staff-v4 .escalate-trigger {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-v4 .message-author>span {background:var(--neom-raised);color:var(--neom-muted)}
body.staff-app.staff-v4 #quick-replies-panel {position:fixed;inset:auto;top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);margin:0;width:min(620px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);padding:20px;overflow:hidden;background:var(--neom-surface);color:var(--neom-text);border:1px solid var(--neom-border);border-radius:16px;box-shadow:0 20px 80px #00000038}
body.staff-v4 #quick-replies-panel[open] {display:flex;flex-direction:column;gap:14px}
body.staff-v4 #quick-replies-panel::backdrop {background:#00000066;backdrop-filter:blur(2px)}
body.staff-v4 #quick-replies-panel .quick-replies-heading {margin:0;padding:0;gap:12px;flex-shrink:0}
body.staff-v4 #quick-replies-panel .quick-replies-heading>div {min-width:0}
body.staff-v4 #quick-replies-panel .quick-reply-list {overflow:auto;min-height:0;flex:1}
body.staff-v4 #quick-replies-panel .search-field {flex-shrink:0}
body.staff-v4 #quick-replies-panel .search-field input {margin:0}
body.staff-v4 #quick-replies-panel .quick-library-footer {margin:0;flex-shrink:0;flex-wrap:wrap}
body.staff-app.staff-v4 :is(.quick-group-label,.quick-loading,.quick-error,.quick-library-footer,.insert-label,.insert-label>span) {color:var(--neom-muted)}
body.staff-app.staff-v4 .quick-item-title kbd {background:var(--neom-raised);border-color:var(--neom-border);color:var(--neom-muted)}
body.staff-app.staff-v4 .quick-replies-heading strong,body.staff-app.staff-v4 .quick-reply-item strong {color:var(--neom-text)}
body.staff-v4 #command-palette :is(kbd,.command-input-wrap kbd) {background:var(--neom-inset);border-color:var(--neom-border);color:var(--neom-muted)}
body.staff-v4 #command-palette {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-v4 #command-palette [data-command] {background:var(--neom-surface);color:var(--neom-text)}
body.staff-v4 #command-palette [data-command]:is(.selected,:hover,:focus-visible) {background:var(--neom-raised);color:var(--neom-text)}
body.staff-v4 #command-palette :is(.command-help,.command-help span,.command-item small,.command-item>span) {color:var(--neom-muted)}
body.staff-app.staff-v4 .composer-heading .composer-tabs button {min-height:44px}
body.staff-app.staff-v4 .composer .composer-footer {background:var(--neom-surface)}
body.staff-v4 .validation {background:var(--neom-success-bg);color:var(--neom-success);border-color:var(--neom-border)}
body.staff-v4 .validation.error {background:var(--neom-danger-bg);color:var(--neom-danger)}
body.staff-app.staff-v4 :is(.shortcut-input>span,.number-suffix>span) {color:var(--neom-muted)}
body.staff-app.staff-v4 .locale-tabs button {background:var(--neom-surface);color:var(--neom-muted);border-color:var(--neom-border)}
body.staff-app.staff-v4 .locale-tabs button.active {background:var(--neom-raised);color:var(--neom-text);border-color:var(--neom-subtle)}
body.staff-app.staff-v4 .validation :is(span,strong) {color:var(--neom-success)}
body.staff-app.staff-v4 .validation.error :is(span,strong) {color:var(--neom-danger)}
body.staff-v4 :is(.preview-log,.preview-turn) {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-app.staff-v4 .operations-actions>span {color:var(--neom-muted)}
body.staff-app.staff-v4 .detail-actions [data-own-conversation] {min-width:44px}
body.staff-v4 :is(.team-list,.team-member) {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border)}
.staff-v4 .routing-settings {margin:0 0 20px;padding:18px;border:1px solid var(--neom-border);border-radius:14px;background:var(--neom-surface);color:var(--neom-text)}
.staff-v4 .routing-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.staff-v4 .routing-heading h3,.staff-v4 .routing-capacity-heading h4 {margin:3px 0 5px;font-size:15px}
.staff-v4 .routing-heading p,.staff-v4 .routing-capacity-heading p {margin:0;color:var(--neom-muted);font-size:12px;line-height:1.5}
.staff-v4 .routing-team-select {display:flex;flex-direction:column;gap:5px;min-width:190px;font-size:12px;color:var(--neom-muted)}
.staff-v4 .routing-team-select select,.staff-v4 .routing-capacity-row input {min-height:40px;border:1px solid var(--neom-border);border-radius:8px;background:var(--neom-raised);color:var(--neom-text);padding:7px 9px}
.staff-v4 .routing-switches {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.staff-v4 .routing-switches label {display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid var(--neom-border);border-radius:9px}
.staff-v4 .routing-switches input {margin:3px 0 0;flex:none}
.staff-v4 .routing-switches span,.staff-v4 .routing-capacity-row span {display:flex;flex-direction:column;gap:3px}
.staff-v4 .routing-switches strong,.staff-v4 .routing-capacity-row strong {font-size:13px}
.staff-v4 .routing-switches small,.staff-v4 .routing-capacity-row small {color:var(--neom-muted);font-size:12px;line-height:1.4}
.staff-v4 .routing-capacity-heading {margin-bottom:8px}
.staff-v4 .routing-capacities {max-height:260px;overflow:auto;border:1px solid var(--neom-border);border-radius:9px}
.staff-v4 .routing-capacity-row {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border-bottom:1px solid var(--neom-border)}
.staff-v4 .routing-capacity-row:last-child {border-bottom:0}
.staff-v4 .routing-capacity-row input {width:150px;flex:none;font-size:14px}
.staff-v4 .routing-actions {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;color:var(--neom-muted);font-size:12px}
.staff-v4 .routing-actions button {min-height:40px;padding:8px 13px}
.staff-v4 .routing-warning {margin-top:10px;color:var(--neom-danger,#a43140);font-size:12px}
@media(max-width:620px){.staff-v4 .routing-settings{padding:14px}.staff-v4 .routing-heading{flex-direction:column;gap:10px}.staff-v4 .routing-team-select{min-width:0;width:100%}.staff-v4 .routing-switches{grid-template-columns:1fr;gap:8px}.staff-v4 .routing-capacity-row input{width:120px;font-size:16px}.staff-v4 .routing-actions{align-items:flex-start;flex-wrap:wrap}}
body.staff-v4 .member-team-tags>span {background:var(--neom-raised);color:var(--neom-muted);border-color:var(--neom-border)}
body.staff-app.staff-v4 select {
 appearance:none;-webkit-appearance:none;box-sizing:border-box;min-height:44px;height:auto;
 padding:10px 36px 10px 12px;line-height:1.4;font-family:inherit;font-size:13px;
 background-color:var(--neom-surface);background-image:var(--staff-select-chevron);
 background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px;
 color:var(--neom-text);border:1px solid var(--neom-border);border-radius:10px;
 text-overflow:ellipsis;cursor:pointer;
}
body.staff-v4 select:disabled {cursor:default;opacity:.55}
body.staff-v4 select option {background:var(--neom-surface);color:var(--neom-text)}
body.staff-app.staff-v4 input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
body.staff-app.staff-v4 textarea {appearance:none;-webkit-appearance:none;box-sizing:border-box;line-height:1.5}
body.staff-app.staff-v4 :is(input[type="date"],input[type="time"],input[type="datetime-local"]) {min-width:0;min-height:44px;text-align:left}
body.staff-v4 input::-webkit-date-and-time-value {text-align:left;min-height:1.5em}
body.staff-v4 :is(#main,.full-content,.workflow-library,.workflow-detail,.settings-content,.help-layout,.macro-workspace) {background:var(--neom-surface);color:var(--neom-text)}
body.staff-v4 :is(.full-content,.v4-content) {scrollbar-color:var(--neom-subtle) transparent}
body.staff-v4 :is(.node-actions,.node-actions>div,.branch-editor,.field-properties,.knowledge-create-translations fieldset,.hours-row,.team-checks) {border-color:var(--neom-border)}
body.staff-v4 :is(.next-node-row,.preview-controls,.node-heading,.content-toolbar,.article-editor,.article-save-row,.quick-library-footer,.macro-preview-heading) {background:var(--neom-surface);color:var(--neom-text);border-color:var(--neom-border)}
body.staff-v4 :is(.command-result,.command-group-title,.preview-message-meta,.response-due,.member-activated) {color:var(--neom-muted)}
body.staff-v4 :is(.editor-note,.readonly-note,.member-active-row,.builder-undo) {background:var(--neom-raised);border-color:var(--neom-border);color:var(--neom-muted)}
body.staff-v4 .attachment-picker {color:var(--neom-muted)}
body.staff-v4 .attachment-picker:hover {background:var(--neom-hover)}

/* Appearance lives in the sidebar; the header is reserved for work context. */
.appearance-controls {display:flex;align-items:center;gap:12px}
.appearance-options {display:inline-flex;gap:4px;padding:3px;border:1px solid var(--neom-border);border-radius:12px;background:var(--neom-raised)}
body.staff-app.staff-v4 .appearance-option {display:inline-flex;align-items:center;justify-content:center;gap:8px;width:44px;min-width:44px;height:44px;padding:10px;background:transparent;border:1px solid transparent;border-radius:9px;color:var(--neom-muted)}
body.staff-app.staff-v4 .appearance-option:hover {background:var(--neom-hover);color:var(--neom-text)}
body.staff-app.staff-v4 .appearance-option.active {background:var(--neom-surface);border-color:var(--neom-border);color:var(--neom-text);box-shadow:0 1px 3px #0000000a}
.appearance-option .icon {width:19px;height:19px;flex-shrink:0}
.appearance-caption {color:var(--neom-muted);font-size:12px}
.appearance-sidebar {flex-direction:column;align-items:flex-start;gap:8px;padding-inline:4px}
.appearance-sidebar .appearance-options {width:100%}
body.staff-v4 .appearance-sidebar .appearance-option {flex:1}
.appearance-settings .appearance-options {flex-wrap:wrap}
body.staff-v4 .appearance-settings .appearance-option {width:auto;min-width:100px;padding-inline:13px}
body.staff-v4 .sidebar {overflow:hidden;gap:16px}
body.staff-v4 .sidebar>nav {flex:1;min-height:0;overflow:auto;scrollbar-width:thin;margin-inline:-4px;padding:3px 4px}
body.staff-v4 .sidebar>nav .nav-items {padding-bottom:8px}
body.staff-v4 .sidebar-bottom {margin-top:0;flex-shrink:0;gap:12px;padding-top:12px}
body.staff-v4 .sidebar .brand-button,body.staff-v4 .sidebar .tenant-block,body.staff-v4 .sidebar .sidebar-search {flex-shrink:0}
body.staff-v4 .tenant-block select {padding-left:4px;border:0;background-color:transparent;box-shadow:none;min-width:0}
body.staff-v4 .topbar {min-height:62px;height:62px;gap:16px}
body.staff-v4 .breadcrumbs {min-width:0;flex:1;gap:10px}
body.staff-v4 .breadcrumbs strong {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.staff-v4 .top-actions {flex-shrink:0;gap:8px}
body.staff-v4 .top-actions :is(.notification-toggle,.shortcut-button) {width:44px;min-width:44px;height:44px;padding:10px}
body.staff-v4 .top-actions .v4-presence-picker {width:160px;min-width:145px;max-width:160px}
body.staff-v4 .page-heading {align-items:flex-start;gap:16px}
body.staff-v4 .page-heading>div:first-child {min-width:0}
body.staff-v4 .heading-actions {display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center}
body.staff-v4 .heading-actions button {white-space:normal}

/* The complete attention menu is revealed together; no cropped tab strip. */
.v4-attention-picker {border-bottom:1px solid var(--neom-border);background:var(--neom-raised)}
.v4-attention-picker>summary {list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;min-height:68px;padding:12px 16px;line-height:1.4;color:var(--neom-text)}
.v4-attention-picker>summary::-webkit-details-marker {display:none}
.v4-attention-picker>summary>span:first-child {min-width:0;display:flex;flex-direction:column;gap:4px}
.v4-attention-picker summary small {font-size:11px;color:var(--neom-muted)}
.v4-attention-picker summary strong {font-size:13px;font-weight:550;overflow-wrap:anywhere}
.v4-attention-picker-meta {display:flex;align-items:center;gap:10px;flex-shrink:0}
.v4-attention-picker-meta .icon {width:16px;height:16px}
.v4-attention-picker[open] .v4-attention-picker-meta .icon {transform:rotate(180deg)}
.v4-attention-picker .v4-attention-tabs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible;padding:0 12px 12px;border:0}
body.staff-v4 .v4-attention-tabs button {min-height:44px;min-width:0;padding:10px;font-size:11px;white-space:normal;justify-content:space-between;text-align:left;line-height:1.5}
body.staff-v4 .inbox-list-header {overflow-y:auto;max-height:72%;scrollbar-width:thin}
body.staff-v4 .list-controls {padding-top:12px}
body.staff-v4 .list-toolbar {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding-block:12px}
body.staff-app.staff-v4 .list-toolbar select {width:100%;max-width:none;min-width:0;font-size:12px}
body.staff-v4 #attention-severity {grid-column:1/-1;flex-basis:auto}
body.staff-v4 .list-filter-field {display:flex;flex-direction:column;gap:6px;font-size:11px;line-height:1.4;margin:0;color:var(--neom-muted);min-width:0}
body.staff-v4 .list-filter-field #attention-severity {grid-column:auto}
body.staff-v4 .detail-actions {flex-wrap:wrap;justify-content:flex-end}
body.staff-v4 .list-toolbar button {font-size:12px;min-height:44px}
body.staff-v4 .list-summary {font-size:11px;letter-spacing:0}
.queue-filter {padding:14px 16px 12px;background:var(--neom-raised);border-bottom:1px solid var(--neom-border)}
.queue-filter label {font-size:11px;margin:0 0 6px;line-height:1.4;color:var(--neom-muted)}
body.staff-app.staff-v4 .queue-filter select {width:100%;max-width:none;min-height:44px}
.conversation-pagination {flex-shrink:0;padding:10px 14px 12px;border-top:1px solid var(--neom-border);background:var(--neom-raised)}
.pagination-summary {display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--neom-muted);font-size:11px;line-height:1.5}
body.staff-v4 .pagination-summary button {font-size:11px;padding:7px;gap:5px}
body.staff-v4 [data-conversations-more] {width:100%;margin-top:8px;font-size:12px}
.pagination-note {font-size:11px;line-height:1.6;color:var(--neom-muted);margin:8px 0 0}
.pagination-error {font-size:12px;line-height:1.7;color:var(--neom-danger);margin:8px 0}
@media(max-height:480px){.conversation-pagination{padding:4px 10px}.pagination-note{display:none}}
@media(max-height:480px){
 body.staff-v4 .inbox-heading {display:none}
 body.staff-app.staff-v4 .detail-header {min-height:52px;padding:4px 12px}
 body.staff-v4 .thread-tools {display:none}
 body.staff-v4 .thread {min-height:44px;padding-top:10px;padding-bottom:8px}
 body.staff-app.staff-v4 .composer {overflow-y:auto;overscroll-behavior:contain}
 body.staff-app.staff-v4 .composer textarea {height:48px;min-height:44px;max-height:72px;padding-block:8px}
 body.staff-app.staff-v4 .composer .composer-footer {position:sticky;bottom:0;z-index:2}
}
@media(pointer:coarse){body.staff-app.staff-v4 :is(input,textarea,select){font-size:16px!important}}
body.staff-v4 .workflow-toolbar {flex-wrap:wrap;gap:14px}
body.staff-v4 .workflow-publish-actions {flex-wrap:wrap;gap:8px}
body.staff-v4 .workflow-draft-state {flex-wrap:wrap}
body.staff-v4 .version-actions {flex-wrap:wrap;gap:10px}
body.staff-v4 .version-actions select {min-width:0;max-width:100%}
body.staff-v4 .v4-attention-row {flex-wrap:wrap;gap:10px}
body.staff-v4 .v4-attention-actions {margin-left:auto}
body.staff-v4 .v4-attention-row button {min-height:44px}
body.staff-v4 .detail-actions button {min-height:44px}
body.staff-v4 .detail-actions .icon-button {min-width:44px}
body.staff-v4 .v4-shift-row>* {min-width:0}

@media(max-width:1100px){
 body.staff-v4 .page-heading {padding-inline:22px}
 body.staff-v4 .workflow-toolbar {align-items:flex-start}
 body.staff-v4 .workflow-publish-actions {justify-content:flex-start}
 body.staff-v4 .workflow-publish-actions button {font-size:12px}
}
@media(max-width:820px){
 body.staff-v4 .sidebar {padding:18px 16px max(16px,env(safe-area-inset-bottom))}
 body.staff-v4 .topbar {min-height:56px;height:56px;gap:8px;padding-inline:10px}
 body.staff-v4 .top-actions {gap:4px}
 body.staff-v4 .breadcrumbs {gap:6px;font-size:12px}
 body.staff-v4 .breadcrumbs>span {display:none}
 body.staff-v4 .page-heading {flex-wrap:wrap;padding:20px}
 body.staff-v4 .heading-actions {justify-content:flex-start}
 body.staff-v4 .nav-scrim {background:#00000066!important}
}
@media(max-width:620px){
 body.staff-app.staff-v4 select {font-size:16px!important;min-height:44px;padding:10px 34px 10px 11px;background-position:right 10px center}
 body.staff-v4 .page-heading {padding:18px 16px;gap:12px}
 body.staff-v4 .page-heading p {max-width:none}
 body.staff-v4 .heading-actions {width:100%}
 body.staff-v4 .heading-actions button {flex:1}
 body.staff-v4 .inbox-heading {min-height:90px}
 body.staff-v4 .inbox-heading .heading-actions {width:auto;margin-left:auto}
 body.staff-v4 .v4-attention-picker>summary {min-height:64px;padding-inline:17px}
 body.staff-v4 .detail-title h2,body.staff-v4 .detail-title p {max-width:none}
 body.staff-v4 .detail-actions {gap:4px}
 body.staff-v4 .detail-actions button[data-own-conversation] {display:none}
 body.staff-v4 .detail-actions button[data-close-conversation] {min-width:86px}
 body.staff-v4 .workflow-publish-actions {width:100%;display:grid;grid-template-columns:1fr 1fr}
 body.staff-v4 .workflow-publish-actions button {white-space:normal;min-width:0;line-height:1.5}
 body.staff-v4 .workflow-publish-actions [data-workflow-entry] {grid-column:1/-1}
 body.staff-v4 .version-actions {width:100%;align-items:stretch}
 body.staff-v4 .version-actions select {width:100%;flex:1 1 100%;max-width:none}
 body.staff-v4 .version-actions button {width:100%}
 body.staff-v4 .content-toolbar {flex-wrap:wrap;gap:10px}
 body.staff-v4 .content-toolbar .search-field {width:100%}
 body.staff-v4 .hours-row {grid-template-columns:1fr 20px 1fr 44px}
 body.staff-v4 .hours-row select {grid-column:1/-1}
 body.staff-v4 .hours-row button {min-width:44px;min-height:44px}
}
@media(max-height:600px){
 body.staff-v4 .sidebar {overflow-y:auto}
 body.staff-v4 .sidebar>nav {flex:none;overflow:visible}
 body.staff-v4 .sidebar-bottom {margin-top:auto}
}
@media(max-height:480px){
 body.staff-v4 .topbar {height:48px;min-height:48px}
 body.staff-v4 .inbox-list-header {max-height:65%}
 body.staff-v4 .v4-attention-row {padding-block:4px;gap:6px}
 body.staff-v4 .v4-attention-row>div {gap:5px}
 body.staff-v4 .v4-attention-actions {flex-shrink:0}
 body.staff-v4 .composer-wrap {max-height:calc(100dvh - 205px)}
 body.staff-v4 .composer {max-height:calc(100dvh - 220px)}
 body.staff-v4 .v4-attention-picker>summary {min-height:56px;padding-block:8px}
}

/* Personal access uses the existing staff surfaces in both themes. */
.password-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.password-fields>div{display:grid;gap:8px}
.password-settings input{width:100%;min-width:0;min-height:44px}
.password-settings .field-help{margin:12px 0 18px}
.password-settings .form-error{margin:12px 0}
.password-changed-notice{padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font-size:14px;line-height:1.5}
@media(max-width:760px){.password-fields{grid-template-columns:1fr}}

/* Conversation-first density: secondary controls never consume the list. */
body.staff-app.staff-v4 .app-layout {position:fixed;inset:0;overflow:clip;grid-template-rows:minmax(0,1fr)}
body.staff-app.staff-v4 .app-layout>.workspace>main.workspace {flex:1 1 0;min-height:0}
body.staff-app.staff-v4 .sidebar {height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;gap:10px;padding:12px 10px;scrollbar-width:thin;overscroll-behavior:contain}
body.staff-app.staff-v4 .sidebar>nav {flex:1 0 auto;min-height:auto;overflow:visible;margin:0;padding:0}
body.staff-app.staff-v4 .sidebar>* {flex-shrink:0}
body.staff-app.staff-v4 .sidebar .nav-items {gap:3px;padding:0}
body.staff-app.staff-v4 .sidebar .nav-items button {flex-shrink:0;min-height:44px;height:auto;font-size:13px;line-height:1.4;padding:10px 11px;white-space:normal;overflow:visible}
body.staff-app.staff-v4 .sidebar .nav-items button .icon {flex-shrink:0}
body.staff-app.staff-v4 .sidebar .nav-items .inbox-view {min-height:44px;font-size:12px}
body.staff-app.staff-v4 .sidebar .tenant-block {padding:8px 10px}
body.staff-app.staff-v4 .sidebar .tenant-block label {margin-bottom:2px;line-height:1.4}
body.staff-app.staff-v4 .sidebar .sidebar-search {min-height:44px;margin:0;padding:9px 11px;font-size:12px}
body.staff-app.staff-v4 .sidebar .brand-button {min-height:44px;margin:0;padding:4px 7px}
body.staff-app.staff-v4 .sidebar-bottom {margin-top:auto;padding-top:10px;gap:10px}
body.staff-v4 .inbox-heading {min-height:56px;padding:6px 18px;align-items:center;flex-wrap:nowrap}
body.staff-v4 .inbox-heading h1 {font-size:18px;margin-bottom:2px;letter-spacing:-.35px}
body.staff-v4 .inbox-heading p {font-size:11px;line-height:1.4}
body.staff-v4 .inbox-heading .heading-actions {width:auto;flex-wrap:nowrap;flex-shrink:0;margin:0}
body.staff-v4 .inbox-heading [data-shortcuts] {min-width:44px;width:44px;padding:10px;font-size:0}
body.staff-v4 .inbox-heading [data-shortcuts] .icon {width:18px;height:18px}
body.staff-v4 .inbox-list-header {position:relative;max-height:none;overflow:visible;flex-shrink:0}
body.staff-v4 .list-controls {display:flex;align-items:center;gap:6px;padding:8px 10px;position:relative}
body.staff-v4 .list-controls .search-field {flex:1;min-width:0}
body.staff-v4 .list-controls input {min-height:44px;height:44px;margin:0;font-size:13px;padding-right:8px}
body.staff-v4 .filter-tabs {display:flex;justify-content:space-between;gap:6px;padding:0 12px}
body.staff-v4 .filter-tabs button {min-height:44px;padding:9px 0;font-size:12px;flex-shrink:0}
body.staff-v4 .list-summary {padding:5px 12px 7px;line-height:1.4;min-height:27px}
body.staff-v4 .conv-list {padding:2px 7px 8px}
body.staff-v4 .conversation-row {min-height:104px;padding:11px 10px;gap:9px}
body.staff-v4 .v4-row-attention {gap:5px;margin-top:4px;line-height:1.5}
.inbox-secondary-filters {flex:0 0 44px}
.inbox-secondary-filters>summary {display:flex;align-items:center;justify-content:center;position:relative;list-style:none;width:44px;height:44px;border:1px solid var(--neom-border);border-radius:9px;cursor:pointer;background:var(--neom-surface);color:var(--neom-text)}
.inbox-secondary-filters>summary::-webkit-details-marker {display:none}
.inbox-secondary-filters>summary:hover,.inbox-secondary-filters[open]>summary {background:var(--neom-hover);border-color:var(--neom-subtle)}
.filter-active-count {position:absolute;top:-4px;right:-3px;border-radius:7px;min-width:17px;padding:1px 4px;background:var(--neom-action);color:var(--neom-on-action);font-size:10px;line-height:1.5;text-align:center}
.inbox-filter-popover {position:absolute;top:calc(100% + 3px);left:8px;right:8px;z-index:90;max-height:min(520px,calc(100dvh - 220px));overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--neom-border);border-radius:12px;background:var(--neom-surface);box-shadow:var(--neom-shadow)}
.inbox-filter-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px;position:sticky;top:0;z-index:1;background:var(--neom-surface);border-bottom:1px solid var(--neom-border);font-size:12px}
body.staff-v4 .inbox-filter-heading button {width:44px;height:44px;padding:10px}
body.staff-v4 .inbox-filter-popover .queue-filter {padding:10px 12px}
body.staff-v4 .inbox-filter-popover .v4-attention-picker>summary {min-height:52px;padding:8px 12px}
body.staff-v4 .inbox-filter-popover .list-toolbar {padding:10px 12px;gap:10px}
body.staff-v4 .inbox-filter-popover .list-filter-field {gap:5px}
body.staff-v4 .conversation-pagination {padding:4px 10px 6px}
body.staff-v4 .conversation-pagination .pagination-summary {font-size:11px}
body.staff-v4 .pagination-summary button {min-height:44px;padding:5px;font-size:11px}
body.staff-app.staff-v4 .conversation-detail {min-height:0}
body.staff-app.staff-v4 .detail-header {min-height:60px;padding:7px 14px;gap:8px;flex-wrap:nowrap}
body.staff-v4 .detail-title {flex:1;min-width:0}
body.staff-v4 .detail-title :is(h2,p) {white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:none}
body.staff-v4 .detail-actions {flex-shrink:0;flex-wrap:nowrap;gap:4px;margin-left:0}
body.staff-v4 .detail-actions [data-own-conversation] {width:44px;padding:10px}
body.staff-v4 .detail-actions [data-own-conversation]>span {display:none}
body.staff-v4 .thread-tools {min-height:44px;padding:0 14px}
body.staff-v4 .thread-tools button {min-height:44px;padding:6px 8px;font-size:11px}
body.staff-v4 .v4-attention-row {min-height:52px;padding:4px 14px;gap:8px;flex-wrap:nowrap}
body.staff-v4 .v4-attention-row>div:first-child {min-width:0;flex:1;gap:5px}
body.staff-v4 .v4-attention-actions {flex-shrink:0;gap:5px}
body.staff-v4 .v4-attention-actions button {min-width:44px;min-height:44px;padding:10px}
body.staff-v4 .v4-attention-text {display:none}
body.staff-v4 .thread {min-height:0;padding:16px;flex:1 1 0}
body.staff-app.staff-v4 .composer-wrap {padding:6px 12px 8px;max-height:40%;overflow-y:auto;flex:0 0 auto;overscroll-behavior:contain}
body.staff-app.staff-v4 .composer {max-height:none;overflow:visible;border-radius:12px}
body.staff-app.staff-v4 .composer-heading {min-height:44px;padding:0 11px;border-radius:12px 12px 0 0}
body.staff-app.staff-v4 .composer-heading .composer-tabs button {min-height:44px;padding:7px 0}
body.staff-app.staff-v4 .composer textarea {display:block;height:56px;min-height:56px;max-height:96px;resize:none;padding:8px 12px;font-size:14px;line-height:1.5}
body.staff-app.staff-v4 .composer .composer-footer {min-height:52px;padding:4px 7px;gap:7px;flex-wrap:nowrap;position:sticky;bottom:0;z-index:2}
body.staff-app.staff-v4 .composer-tools {flex:0 0 auto;flex-wrap:nowrap;gap:2px}
body.staff-app.staff-v4 .composer-tools button,body.staff-app.staff-v4 .composer-tools .attachment-picker {min-width:44px;width:44px;min-height:44px;height:44px;padding:10px;font-size:0;gap:0;position:relative}
body.staff-app.staff-v4 .composer-tools button .icon,body.staff-app.staff-v4 .composer-tools .attachment-picker svg {width:18px;height:18px}
body.staff-v4 .composer-tools :is(.attachment-picker>span,.composer-prepared-trigger>span,.v4-translate-draft>span) {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body.staff-v4 .draft-status,body.staff-v4 .composer-hint {display:none}
body.staff-app.staff-v4 .send-actions {min-width:0;width:auto;flex:1;justify-content:flex-end;margin-left:auto;gap:6px}
body.staff-app.staff-v4 .send-actions select {min-width:0;max-width:175px;min-height:44px;font-size:12px;flex:1;padding-right:30px}
body.staff-app.staff-v4 .send-actions button {min-width:142px;min-height:44px;padding:8px 12px;white-space:nowrap;font-size:12px}
@media(max-width:1450px){
 body.staff-app.staff-v4 .detail-shell {grid-template-columns:minmax(0,1fr);position:relative}
 body.staff-app.staff-v4 .detail-shell.context-open .contact-panel {display:block;position:absolute;inset:0 0 0 auto;width:min(330px,94%);z-index:100;padding:0 18px 20px;background:var(--neom-surface);box-shadow:-15px 0 40px #00000033,0 0 0 100vmax #00000044}
 body.staff-app.staff-v4 .detail-shell.context-closed .contact-panel {display:none}
}
@media(max-width:820px){
 body.staff-app.staff-v4 .sidebar {width:270px;padding:14px 12px;transform:translateX(-110%)}
 body.staff-app.staff-v4 .app-layout.menu-open .sidebar {transform:translateX(0)}
 body.staff-v4 .inbox-heading [data-shortcuts] {display:none}
}
@media(max-width:620px){
 body.staff-v4 .inbox-heading {min-height:62px;padding:7px 14px}
 body.staff-v4 .inbox-heading .connection-state {font-size:11px;max-width:none}
 body.staff-v4 .inbox-heading .heading-actions {flex:0 0 auto}
 body.staff-v4 .inbox.has-detail .conversation-pane {display:none}
 body.staff-app.staff-v4 .composer-wrap {padding:6px 8px max(8px,env(safe-area-inset-bottom));max-height:40%}
 body.staff-app.staff-v4 .composer textarea {font-size:16px}
 body.staff-app.staff-v4 .composer .composer-footer {flex-wrap:wrap;gap:3px;padding:4px 7px}
 body.staff-app.staff-v4 .composer-tools {width:100%;flex-basis:100%}
 body.staff-app.staff-v4 .send-actions {width:100%;flex-basis:100%;justify-content:space-between}
 body.staff-app.staff-v4 .send-actions select {max-width:175px;font-size:16px}
}
@media(max-height:480px){
 body.staff-v4 .inbox-heading {display:none}
 body.staff-v4 .inbox-filter-popover {max-height:calc(100dvh - 130px)}
 body.staff-app.staff-v4 .detail-header {min-height:52px;padding:4px 10px}
 body.staff-v4 .thread-tools {display:none}
 body.staff-v4 .v4-attention-row {min-height:44px;padding:0 10px}
 body.staff-v4 .v4-attention-row>div:first-child {flex-wrap:nowrap;overflow:auto;scrollbar-width:thin}
 body.staff-v4 .v4-attention-row .v4-badge {flex-shrink:0}
 body.staff-v4 .v4-case-age {white-space:nowrap}
 body.staff-app.staff-v4 .composer-wrap {padding:3px 8px 4px;max-height:36%;overflow-y:auto}
 body.staff-app.staff-v4 .composer {display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"input mode" "files files" "error error" "footer footer";overflow:visible}
 body.staff-app.staff-v4 .composer-heading {grid-area:mode;padding:0 8px;border:0;border-left:1px solid var(--neom-border);border-radius:0 12px 0 0}
 body.staff-v4 .composer-visibility {display:none}
 body.staff-v4 .composer-tabs {gap:8px}
 body.staff-app.staff-v4 .composer-tabs button {font-size:11px;gap:5px}
 body.staff-app.staff-v4 .composer textarea {grid-area:input;height:44px;min-height:44px;max-height:44px;padding:9px 10px;font-size:16px}
 body.staff-v4 #staff-file-queue {grid-area:files;max-height:60px;overflow-y:auto}
 body.staff-v4 .composer-error {grid-area:error}
 body.staff-app.staff-v4 .composer .composer-footer {grid-area:footer;min-height:48px;padding:2px 5px}
 body.staff-app.staff-v4 .send-actions select {max-width:150px;font-size:12px}
 body.staff-v4 .conversation-row {min-height:104px}
 body.staff-v4 .list-summary {padding-block:3px;min-height:23px}
}

/* Inbox reading pass: quiet navigation, tighter messages, clear composer tabs. */
body.staff-app.staff-v4 .sidebar .nav-items>button {background:transparent;border-color:transparent;border-radius:7px}
body.staff-app.staff-v4 .sidebar .nav-items>button:hover {background:var(--neom-hover)}
body.staff-app.staff-v4 .sidebar .nav-items>button.active {background:var(--neom-raised);border-color:var(--neom-border)}
body.staff-app.staff-v4 .conversation-row {min-height:80px;padding:9px 12px;border-radius:8px;gap:8px}
body.staff-v4 .row-subject,body.staff-v4 .row-preview {line-height:1.4;margin-top:2px}
body.staff-v4 .row-meta {margin-top:3px}
body.staff-app.staff-v4 .inbox-heading {display:none}
body.staff-app.staff-v4 .topbar {height:48px;min-height:48px}
body.staff-app.staff-v4 .thread-tools {min-height:30px;height:30px;padding-block:0}
body.staff-app.staff-v4 .thread-tools button {min-height:28px;padding-block:2px}
body.staff-app.staff-v4 .v4-attention-row {min-height:44px;padding-block:0}
body.staff-app.staff-v4 .thread {padding:12px 18px}
body.staff-app.staff-v4 .thread-message {margin-bottom:12px;gap:8px;max-width:88%;align-items:flex-start}
body.staff-app.staff-v4 .message-author {margin-bottom:4px;gap:6px}
body.staff-app.staff-v4 .message-bubble {padding:9px 12px;line-height:1.5;font-size:14px}
body.staff-app.staff-v4 .message-files:empty {display:none}
body.staff-app.staff-v4 .v4-message-translation {margin-top:2px}
body.staff-app.staff-v4 .bot-summary {margin-bottom:12px;padding:8px 12px}
body.staff-app.staff-v4 .composer-heading,body.staff-app.staff-v4 .composer-tabs,body.staff-app.staff-v4 .composer-tabs button {background:transparent;box-shadow:none}
body.staff-app.staff-v4 .composer-tabs button {border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--neom-muted)}
body.staff-app.staff-v4 .composer-tabs button.active {background:transparent;border-bottom-color:var(--neom-brand);color:var(--neom-text)}
body.staff-app.staff-v4 .composer-heading {min-height:36px}
body.staff-app.staff-v4 .composer-heading .composer-tabs button {min-height:36px;padding:5px 0}
body.staff-app.staff-v4 .composer textarea {height:44px;min-height:44px}
@media(pointer:coarse){
 body.staff-app.staff-v4 .composer-heading,body.staff-app.staff-v4 .composer-heading .composer-tabs button {min-height:44px}
 body.staff-app.staff-v4 .thread-tools,body.staff-app.staff-v4 .thread-tools button {height:auto;min-height:44px}
}
body.staff-app.staff-v4 .sidebar {overflow-y:hidden}
body.staff-app.staff-v4 .sidebar>nav {flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
body.staff-app.staff-v4 .conversation-row .row-subject {display:none}
@media(max-height:540px){body.staff-app.staff-v4 .sidebar{overflow-y:auto}body.staff-app.staff-v4 .sidebar>nav{flex:none;overflow:visible}}

/* One focus boundary for the note editor; fields never protrude from it. */
body.staff-app.staff-v4 .composer {isolation:isolate}
body.staff-app.staff-v4 .composer textarea:is(:focus,:focus-visible){outline:none!important;outline-offset:0;box-shadow:none!important;border:0;border-radius:0;background:transparent}
body.staff-app.staff-v4 .composer-tabs button:focus-visible{outline-offset:-3px}
body.staff-app.staff-v4 .composer-note{background:var(--neom-warning-bg);border-color:color-mix(in srgb,var(--neom-warning) 45%,var(--neom-border))}
body.staff-app.staff-v4 .composer-note:focus-within{border-color:var(--neom-warning);box-shadow:0 0 0 2px color-mix(in srgb,var(--neom-warning) 20%,transparent)}
body.staff-app.staff-v4 .composer-note :is(.composer-heading,.composer-footer){background:transparent}
