/* smplfix reusable component system
   This file is intentionally loaded last. It changes presentation only. */

:root {
    --smpl-danger: #B42318;
    --smpl-danger-bg: #FFF1F0;
    --smpl-danger-line: #F2C7C3;
    --smpl-warning: #7A4E00;
    --smpl-warning-bg: #FFF8E8;
    --smpl-warning-line: #E8D29A;
    --smpl-success: #176B4A;
    --smpl-success-bg: #EEF8F3;
    --smpl-success-line: #BADCCB;
    --smpl-control-height: 44px;
}

/* Surfaces and metrics */
:where(
    .card,
    [class$="-card"],
    [class*="-card "],
    [class$="-panel"],
    [class*="-panel "],
    [class$="-container"],
    [class*="-container "],
    .modal-content,
    .state-card
) {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background-color: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.card, [class$="-card"], [class*="-card "], [class$="-panel"], [class*="-panel "]):hover {
    box-shadow: none !important;
}

:where(
    .metric-value,
    .kpi-value,
    .stat-value,
    .summary-value,
    .chart-total,
    .formula-value,
    [class*="-amount"],
    [class*="-total"]
) {
    color: var(--smpl-ink) !important;
    font-family: var(--smpl-font-ui) !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
}

:where(
    .metric-label,
    .kpi-label,
    .stat-label,
    .summary-label,
    .card-eyebrow,
    .table-muted,
    [class*="-meta"],
    [class*="-date"],
    [class*="-id"]
) {
    color: var(--smpl-text-muted) !important;
    font-family: var(--smpl-font-mono) !important;
    font-weight: 700 !important;
    letter-spacing: 0.055em !important;
}

/* Button hierarchy */
:where(
    .btn-primary,
    .btn-refresh,
    .btn-filter,
    .submit-btn,
    .submit-button,
    .login-btn,
    button[type="submit"]
):not(.btn-danger):not(.delete) {
    min-height: var(--smpl-control-height);
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

:where(
    .btn-primary,
    .btn-refresh,
    .btn-filter,
    .submit-btn,
    .submit-button,
    .login-btn,
    button[type="submit"]
):not(.btn-danger):not(.delete):hover {
    color: var(--smpl-paper) !important;
    border-color: #29292C !important;
    background: #29292C !important;
    box-shadow: none !important;
    transform: none !important;
}

:where(
    .btn-secondary,
    .btn-outline,
    .btn-reset,
    .btn-close,
    .btn-add-field,
    .avatar-upload-btn,
    .pipeline-btn-clear,
    button.secondary
) {
    min-height: var(--smpl-control-height);
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

:where(
    .btn-secondary,
    .btn-outline,
    .btn-reset,
    .btn-close,
    .btn-add-field,
    .avatar-upload-btn,
    .pipeline-btn-clear,
    button.secondary
):hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

:where(.btn-text, .btn-link, .tertiary, .closeout-text-button) {
    color: var(--smpl-ink) !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

:where(.btn-text, .btn-link, .tertiary, .closeout-text-button):hover {
    background: var(--smpl-surface) !important;
}

:where(.btn-danger, .danger, .delete, button[class*="remove-"], .btn-remove, .remove-field) {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background-color: var(--smpl-danger-bg) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.btn-danger, .danger, .delete, button[class*="remove-"], .btn-remove, .remove-field):hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-danger) !important;
    background-color: var(--smpl-danger) !important;
}

:where(button, .btn, [class*="btn-"]):disabled,
:where(button, .btn, [class*="btn-"])[aria-disabled="true"] {
    color: #6F6F73 !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-line) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.78 !important;
    transform: none !important;
}

:where(button, .btn, [class*="btn-"]):active:not(:disabled),
:where(button, .btn, [class*="btn-"])[aria-pressed="true"] {
    transform: translateY(1px) !important;
}

:where(.is-loading, .loading, [aria-busy="true"]):where(button, .btn, [class*="btn-"]) {
    cursor: progress !important;
}

/* Forms and controls */
:where(.form-group, .field-group, .filter-group) > label,
:where(label.form-label, .input-label, .filter-label) {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--smpl-ink) !important;
    font: 600 13px/1.35 var(--smpl-font-ui) !important;
}

:where(.form-group, .field-group, .filter-group) :where(small, .helper-text, .form-help, .field-help) {
    color: var(--smpl-text-muted) !important;
    font: 500 12px/1.45 var(--smpl-font-ui) !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: var(--smpl-control-height);
    padding: 9px 12px;
    color: var(--smpl-ink) !important;
    font: 500 14px/1.4 var(--smpl-font-ui) !important;
    border: 1px solid var(--smpl-soft) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background-color: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(textarea) {
    min-height: 96px;
    resize: vertical;
}

:where(select) {
    padding-right: 36px;
}

:where(input, select, textarea):hover:not(:disabled):not([readonly]) {
    border-color: #858589 !important;
}

:where(input, select, textarea):focus,
:where(input, select, textarea):focus-visible {
    border-color: var(--smpl-ink) !important;
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

:where(input, select, textarea):disabled,
:where(input, select, textarea)[readonly] {
    color: #6F6F73 !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    cursor: not-allowed;
}

:where(input, textarea)::placeholder {
    color: #717175 !important;
    opacity: 1;
}

:where(.error-text, .field-error, .validation-error, [role="alert"].error) {
    color: var(--smpl-danger) !important;
    font: 600 12px/1.4 var(--smpl-font-ui) !important;
}

:where(input, select, textarea)[aria-invalid="true"],
:where(input, select, textarea).error,
:where(input, select, textarea).invalid {
    border-color: var(--smpl-danger) !important;
}

:where(input[type="checkbox"], input[type="radio"]) {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--smpl-ink);
}

:where(.toggle, .switch, [class*="toggle-track"], [class*="switch-track"]) {
    border-color: var(--smpl-soft) !important;
    background-color: var(--smpl-line) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(input:checked + .toggle, input:checked + .switch, input:checked + [class*="toggle"], input:checked + [class*="switch"]) {
    border-color: var(--smpl-ink) !important;
    background-color: var(--smpl-ink) !important;
}

/* Tables */
:where(
    .table-container,
    [class$="-table-container"],
    [class$="-table-wrap"],
    [class$="-table-wrapper"],
    .report-table-wrap
) {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    scrollbar-color: var(--smpl-soft) var(--smpl-surface);
}

:where(table) {
    width: 100%;
    color: var(--smpl-ink) !important;
    border: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

:where(table) th {
    padding: 12px 14px !important;
    color: #4F4F53 !important;
    font: 700 10px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em !important;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

:where(table) td {
    padding: 13px 14px !important;
    color: var(--smpl-ink) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: transparent !important;
}

:where(table) tbody tr:last-child td {
    border-bottom: 0 !important;
}

:where(table) tbody tr:hover {
    background: var(--smpl-surface) !important;
    box-shadow: inset 3px 0 0 var(--smpl-ink) !important;
}

:where(table) :where(.id, [class*="-id"], time, [class*="-date"], .table-muted) {
    font-family: var(--smpl-font-mono) !important;
    font-size: 11px !important;
}

.report-table-scroll-hint {
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.4 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

/* Tabs, filters, dropdowns, and pagination */
:where(.tabs, [class$="-tabs"], [class*="-tabs "]) {
    gap: 4px;
    border-color: var(--smpl-line) !important;
    background: transparent !important;
}

:where(.tab, [class$="-tab"], [class*="-tab "]):not([class*="content"]) {
    color: var(--smpl-text-muted) !important;
    border-color: transparent !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: transparent !important;
    box-shadow: none !important;
}

:where(.tab, [class$="-tab"], [class*="-tab "]):not([class*="content"]):hover {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

:where(.tab, [class$="-tab"], [class*="-tab "]).active:not([class*="content"]),
:where(.tab, [class$="-tab"], [class*="-tab "])[aria-selected="true"] {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

:where(.filters, [class$="-filters"], [class*="-filters "], .filter-bar, [class$="-filter-bar"]) {
    border-color: var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.dropdown-menu, .profile-dropdown, .suggestions-dropdown, .select-dropdown, [class$="-dropdown"]) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: var(--smpl-shadow) !important;
}

:where(.dropdown-item, .select-option, [role="option"]):hover,
:where(.dropdown-item, .select-option, [role="option"]):focus-visible,
:where(.dropdown-item, .select-option, [role="option"])[aria-selected="true"] {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

:where(.pagination, [class$="-pagination"]) button {
    min-width: 44px;
    min-height: 44px;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

:where(.btn-icon, .icon-btn, .modal-close, .btn-close, .close-panel, [class*="modal-close"]) {
    min-width: 44px;
    min-height: 44px;
}

:where(.pagination, [class$="-pagination"]) button.active,
:where(.pagination, [class$="-pagination"]) button[aria-current="page"] {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

/* Semantic status system */
:where(
    .status-badge,
    .order-status-badge,
    .customer-status-badge,
    .vendor-status-badge,
    .employee-status-badge,
    .payment-status-badge,
    .priority-badge,
    .method-badge,
    .role-badge,
    .health-pill,
    .status-pill,
    [class$="-status"],
    [class^="status-"],
    [class*=" status-"]
) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    min-height: 24px;
    padding: 3px 8px;
    color: #555559 !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.new, .neutral, .created, .bidding, .work-order-received, .status-new):where(
    .status-badge,
    .order-status-badge,
    .customer-status-badge,
    .vendor-status-badge,
    .employee-status-badge,
    .payment-status-badge,
    .health-pill,
    .status-pill,
    [class$="-status"],
    [class^="status-"],
    [class*=" status-"]
) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-paper) !important;
}

:where(.in-progress, .active, .scheduled, .connected, .status-active):where(
    .status-badge,
    .order-status-badge,
    .customer-status-badge,
    .vendor-status-badge,
    .employee-status-badge,
    .payment-status-badge,
    .health-pill,
    .status-pill,
    [class$="-status"],
    [class^="status-"],
    [class*=" status-"]
) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-paper) !important;
}

:where(.completed, .success, .paid, .received, .approved, .available, .good):where(
    .status-badge,
    .order-status-badge,
    .customer-status-badge,
    .vendor-status-badge,
    .employee-status-badge,
    .payment-status-badge,
    .health-pill,
    .status-pill,
    [class$="-status"],
    [class^="status-"],
    [class*=" status-"]
) {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

:where(.delayed, .warning, .warn, .medium, .overdue):where(
    .status-badge,
    .order-status-badge,
    .payment-status-badge,
    .priority-badge,
    .health-pill,
    .status-pill,
    [class$="-status"],
    [class^="status-"],
    [class*=" status-"]
) {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
}

:where(.cancelled, .failed, .danger, .risk, .high, .urgent, .lost, .no-bid):where(
    .status-badge,
    .order-status-badge,
    .payment-status-badge,
    .priority-badge,
    .health-pill,
    .status-pill,
    [class$="-status"],
    [class^="status-"],
    [class*=" status-"]
) {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

:where(.pending, .muted, .inactive):where(
    .status-badge,
    .order-status-badge,
    .customer-status-badge,
    .vendor-status-badge,
    .employee-status-badge,
    .payment-status-badge,
    .health-pill,
    .status-pill,
    [class$="-status"],
    [class^="status-"],
    [class*=" status-"]
) {
    color: #68686C !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

/* Modals and drawers */
:where(.modal-overlay, .modal, [class*="-modal-overlay"]) {
    background-color: rgba(11, 11, 12, 0.55) !important;
    background-image: none !important;
    backdrop-filter: none !important;
}

:where(.modal-content, [class$="-modal"], [class*="-modal "]) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: var(--smpl-shadow) !important;
}

:where(.modal-header, .modal-footer, [class*="modal-header"], [class*="modal-footer"]) {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
}

.confirm-modal-warning {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
    background-image: none !important;
}

:where(.modal-close, [class*="modal-close"], [aria-label^="Close"]) {
    color: var(--smpl-ink) !important;
    border: 1px solid transparent !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: transparent !important;
    box-shadow: none !important;
}

:where(.modal-close, [class*="modal-close"], [aria-label^="Close"]):hover {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

:where(.drawer, [class$="-drawer"], [class*="-drawer "]) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-shadow) !important;
}

/* Feedback, empty, loading, and tooltips */
:where(.alert, [class$="-alert"], [class*="-alert "], .form-notice) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.alert-warning, .warning-alert, [class*="alert-warning"]) {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
}

:where(.alert-danger, .alert-error, [class*="alert-danger"], [class*="alert-error"]) {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

:where(.alert-success, [class*="alert-success"]) {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

:where(.toast, [class$="-toast"], [class*="-toast "]) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-left: 4px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: var(--smpl-shadow) !important;
}

:where(.toast.error, .toast-danger) {
    border-left-color: var(--smpl-danger) !important;
}

:where(.toast.success) {
    border-left-color: var(--smpl-success) !important;
}

:where(
    .empty-state,
    [class$="-empty"],
    [class*="-empty "],
    [class$="-empty-state"],
    .no-data,
    .no-results,
    .no-documents
) {
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

.workflow-empty-art {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

:where(.skeleton, [class*="skeleton"]) {
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-line) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.loading-spinner, .spinner, [class*="-spinner"]) {
    border-color: var(--smpl-line) !important;
    border-top-color: var(--smpl-ink) !important;
    box-shadow: none !important;
}

:where(.tooltip, [role="tooltip"], [class$="-tooltip"], [class*="-tooltip "]) {
    color: var(--smpl-paper) !important;
    font: 600 12px/1.4 var(--smpl-font-ui) !important;
    border: 1px solid #2A2A2D !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: var(--smpl-shadow) !important;
}

/* Upload controls */
:where(
    .upload-field,
    .upload-section,
    .upload-area,
    .upload-zone,
    .drop-zone,
    .completion-upload,
    .completion-evidence-card,
    .vendor-compliance-upload,
    .closeout-proof-upload
) {
    color: var(--smpl-ink) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(
    .upload-field,
    .upload-section,
    .upload-area,
    .upload-zone,
    .drop-zone,
    .completion-upload,
    .vendor-compliance-upload,
    .closeout-proof-upload
):hover,
:where(.dragover, .is-dragging) {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

:where(.upload-icon, [class*="upload-icon"]) {
    color: var(--smpl-ink) !important;
    background: transparent !important;
}

/* Calendar */
:where(.calendar-container, .calendar-grid, .calendar-detail-panel, .calendar-header) {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

.calendar-day-header {
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.4 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

:where(.calendar-day, [class*="calendar-cell"]) {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

:where(.calendar-day.today, [class*="calendar-cell"].today) {
    box-shadow: inset 0 0 0 2px var(--smpl-ink) !important;
}

.calendar-event {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-soft) !important;
    border-left: 3px solid var(--smpl-ink) !important;
    border-radius: 6px !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

.calendar-event.cancelled,
.calendar-event.failed {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    border-left-color: var(--smpl-danger) !important;
    background: var(--smpl-danger-bg) !important;
}

/* Pipeline / Kanban */
:where(.pipeline-board, .kanban-board, .pipeline-container) {
    gap: 16px;
    background: transparent !important;
}

:where(.pipeline-column, .kanban-column, .pipeline-stage) {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.pipeline-card, .kanban-card, .pipeline-item, .job-card) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-left: 3px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.pipeline-card, .kanban-card, .pipeline-item, .job-card):hover {
    border-color: var(--smpl-soft) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Charts and legends */
:where(.chart-container, [class$="-chart"], [class*="-chart "]) {
    color: var(--smpl-ink) !important;
}

:where(.chart-legend, .report-chart-legend, .pie-legend, [class$="-legend"]) {
    color: var(--smpl-text-muted) !important;
    font: 600 11px/1.4 var(--smpl-font-mono) !important;
}

:where(.chart-grid-line, .mini-chart-baseline, .report-zero-line) {
    stroke: var(--smpl-line) !important;
}

.chart-line {
    fill: none !important;
    stroke: var(--smpl-ink) !important;
    stroke-width: 3px !important;
}

.report-profit-line {
    stroke: var(--smpl-mute) !important;
    stroke-dasharray: 7 5;
}

.chart-point {
    fill: var(--smpl-paper) !important;
    stroke: var(--smpl-ink) !important;
}

.report-profit-point {
    stroke: var(--smpl-mute) !important;
}

.chart-bar.revenue { background: var(--smpl-ink) !important; }
.chart-bar.contractor { background: #4B4B4F !important; }
.chart-bar.operating { background: #727276 !important; }
.chart-bar.profit { background: var(--smpl-mute) !important; }
.chart-bar.cash { background: var(--smpl-soft) !important; }

.mini-chart-area {
    fill: var(--smpl-line) !important;
    opacity: 0.58;
}

.mini-chart-line,
.mini-chart-point,
.mini-chart-column,
.orders-inline-bar {
    stroke: var(--smpl-ink) !important;
    fill: var(--smpl-ink) !important;
}

.bar-track,
.mini-bar-track {
    background: var(--smpl-line) !important;
}

.bar-fill,
.mini-bar-fill {
    background-color: var(--smpl-ink) !important;
    background-image: none !important;
}

.bar-row:nth-child(2) .bar-fill,
.mini-bar-row:nth-child(2) .mini-bar-fill { opacity: 0.82; }
.bar-row:nth-child(3) .bar-fill,
.mini-bar-row:nth-child(3) .mini-bar-fill { opacity: 0.66; }
.bar-row:nth-child(4) .bar-fill,
.mini-bar-row:nth-child(4) .mini-bar-fill { opacity: 0.5; }
.bar-row:nth-child(n + 5) .bar-fill,
.mini-bar-row:nth-child(n + 5) .mini-bar-fill { opacity: 0.36; }

/* Specificity guards for older feature stylesheets loaded before this layer. */
body #dashboard.dashboard-overview .btn-refresh,
body #dashboard.dashboard-overview .vendor-categories-card .category-count {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .btn-refresh > i,
body #dashboard.dashboard-overview .btn-refresh:hover > i,
body #dashboard.dashboard-overview .btn-refresh:focus-visible > i,
body #dashboard.dashboard-overview .btn-refresh:active > i,
body #dashboard.dashboard-overview .btn-refresh[aria-busy="true"] > i,
body #dashboard.dashboard-overview .btn-refresh:disabled > i {
    display: inline-block !important;
    color: var(--smpl-paper) !important;
    opacity: 1 !important;
}

body.customer-quote-page .quote-total,
body #pipeline .stage-body.drag-over,
body .project-id,
body .calendar-day.today,
body .calendar-detail-panel {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body.customer-quote-page .quote-total span,
body.customer-quote-page .quote-total strong,
body .calendar-day.today .calendar-day-number {
    color: var(--smpl-ink) !important;
}

body .toggle-switch input:checked + .toggle-slider,
body .calendar-header .btn-secondary:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Dashboard monochrome lock: neutralize high-specificity legacy blue accents. */
body #dashboard.dashboard-overview {
    --do-accent: var(--smpl-ink) !important;
    --do-text: var(--smpl-ink) !important;
    --do-muted: var(--smpl-text-muted) !important;
    --do-border: var(--smpl-line) !important;
    --do-surface: var(--smpl-paper) !important;
    --do-shadow: none !important;
    --do-card-shadow: none !important;
}

body #dashboard.dashboard-overview .overview-hero .header-actions {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #dashboard.dashboard-overview .overview-hero .header-actions .date-range {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body #dashboard.dashboard-overview .overview-hero .header-actions .date-range > i,
body #dashboard.dashboard-overview .kpi-stat-icon,
body #dashboard.dashboard-overview .mini-chart-icon,
body #dashboard.dashboard-overview .revenue-overview-icon,
body #dashboard.dashboard-overview .overview-card-icon,
body #dashboard.dashboard-overview .activity-icon,
body #dashboard.dashboard-overview .vendor-categories-card .vc-icon,
body #dashboard.dashboard-overview .financial-icon {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .overview-hero .header-actions .date-range > i *,
body #dashboard.dashboard-overview .kpi-stat-icon *,
body #dashboard.dashboard-overview .mini-chart-icon *,
body #dashboard.dashboard-overview .revenue-overview-icon *,
body #dashboard.dashboard-overview .overview-card-icon *,
body #dashboard.dashboard-overview .activity-icon *,
body #dashboard.dashboard-overview .vendor-categories-card .vc-icon *,
body #dashboard.dashboard-overview .financial-icon * {
    color: inherit !important;
}

body #dashboard.dashboard-overview .summary-card-icon,
body #dashboard.dashboard-overview .vendor-total-icon,
body #dashboard.dashboard-overview .top-customers-title-icon,
body #dashboard.dashboard-overview .btn-filter {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .quick-action > i,
body #dashboard.dashboard-overview .more-actions-icon,
body #dashboard.dashboard-overview .rank {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .overview-card-link,
body #dashboard.dashboard-overview .summary-card-link,
body #dashboard.dashboard-overview .quick-action,
body #dashboard.dashboard-overview .quick-action * {
    color: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-desc,
    .kpi-period,
    .vc-meta,
    .vendor-total-label,
    .financial-label,
    .financial-period-footer,
    .financial-period-icon,
    .activity-time
) {
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat,
    .financial-item,
    .financial-period-footer,
    #ordersOverviewTotal,
    #serviceCategoryTotal
) {
    border-color: var(--smpl-line) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview #revenueOverviewChart {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body .admin-profile > i.fa-chevron-down {
    color: var(--smpl-mute) !important;
    border-color: transparent !important;
}

body #dashboard.dashboard-overview .kpi-period,
body #dashboard.dashboard-overview .overview-card-title p,
body #dashboard.dashboard-overview .activity-content span,
body #dashboard.dashboard-overview .activity-time,
body #dashboard.dashboard-overview .summary-card-title p,
body #dashboard.dashboard-overview .vendor-categories-card .vc-meta,
body #dashboard.dashboard-overview .vendor-total-label,
body #dashboard.dashboard-overview .top-customers-title-block p,
body #dashboard.dashboard-overview .financial-subtitle,
body #dashboard.dashboard-overview .financial-overview-card .financial-label,
body #dashboard.dashboard-overview .financial-period-footer,
body #dashboard.dashboard-overview .financial-period-icon,
body #dashboard.dashboard-overview .revenue-overview-empty,
body #dashboard.dashboard-overview .revenue-overview-empty i,
body #dashboard.dashboard-overview .more-actions summary > i,
body #dashboard.dashboard-overview .revenue-overview-filter > i {
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action > i,
body #dashboard.dashboard-overview .quick-actions-card .quick-action:nth-child(2) > i,
body #dashboard.dashboard-overview .quick-actions-card .quick-action:nth-child(3) > i,
body #dashboard.dashboard-overview .more-actions-icon {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action::after,
body #dashboard.dashboard-overview .quick-actions-card .quick-action:hover::after,
body #dashboard.dashboard-overview .leaderboard-footer,
body #dashboard.dashboard-overview .leaderboard-footer *,
body #dashboard.dashboard-overview .vendor-categories-card .summary-card-link,
body #dashboard.dashboard-overview .vendor-categories-card .summary-card-link * {
    color: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .btn-filter,
body #dashboard.dashboard-overview .financial-overview-card .btn-filter,
body #dashboard.dashboard-overview .financial-overview-card .financial-header h3 > i {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .financial-grid .financial-item .financial-icon,
body #dashboard.dashboard-overview .financial-grid .financial-item .financial-icon i {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .financial-grid .financial-item,
body #dashboard.dashboard-overview .financial-grid .financial-item:hover,
body #dashboard.dashboard-overview .financial-period-footer,
body #dashboard.dashboard-overview .financial-period-icon {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Executive command: SMPLFix operational health system. */
body #dashboard.dashboard-overview .executive-command-panel {
    margin-bottom: var(--smpl-space-4) !important;
    padding: clamp(20px, 2vw, 28px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .executive-command-head {
    align-items: center !important;
    margin-bottom: var(--smpl-space-2) !important;
    padding-bottom: var(--smpl-space-2) !important;
    border-color: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .executive-command-head .overview-eyebrow {
    margin-bottom: 8px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.08em !important;
}

body #dashboard.dashboard-overview .executive-command-head h2 {
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .executive-command-meta {
    min-height: 32px !important;
    padding: 7px 12px !important;
    color: var(--smpl-ink) !important;
    font: 700 10px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .executive-command-meta.good {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

body #dashboard.dashboard-overview .executive-command-meta.risk {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
}

body #dashboard.dashboard-overview .executive-health-grid {
    gap: 12px !important;
    margin-bottom: var(--smpl-space-2) !important;
}

body #dashboard.dashboard-overview .executive-health-card {
    min-height: 144px !important;
    gap: 10px 12px !important;
    padding: 16px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .executive-health-card:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .executive-health-icon {
    width: 40px !important;
    height: 40px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .executive-health-icon i {
    color: inherit !important;
}

body #dashboard.dashboard-overview .executive-health-copy small,
body #dashboard.dashboard-overview .revenue-control-item > span,
body #dashboard.dashboard-overview .exception-row small {
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .executive-health-copy strong {
    margin: 5px 0 4px !important;
    color: var(--smpl-ink) !important;
    font: 700 24px/1 var(--smpl-font-ui) !important;
    letter-spacing: -0.035em !important;
}

body #dashboard.dashboard-overview .executive-health-copy > span,
body #dashboard.dashboard-overview .exception-row span {
    color: var(--smpl-text-muted) !important;
    font: 500 12px/1.4 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .executive-health-card em {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.05em !important;
}

body #dashboard.dashboard-overview .executive-health-card em::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
}

body #dashboard.dashboard-overview .executive-health-card.good em {
    color: var(--smpl-success) !important;
}

body #dashboard.dashboard-overview .executive-health-card.watch em {
    color: var(--smpl-warning) !important;
}

body #dashboard.dashboard-overview .executive-health-card.risk em {
    color: var(--smpl-danger) !important;
}

body #dashboard.dashboard-overview .executive-command-split {
    gap: var(--smpl-space-2) !important;
    align-items: stretch !important;
}

body #dashboard.dashboard-overview .revenue-control-card,
body #dashboard.dashboard-overview .exception-queue-card {
    height: 100% !important;
    padding: var(--smpl-space-2) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .executive-card-head {
    margin-bottom: 12px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .executive-card-head h3 {
    color: var(--smpl-ink) !important;
    font: 700 15px/1.3 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .executive-card-head > span {
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .revenue-control-grid,
body #dashboard.dashboard-overview .exception-queue-list {
    gap: 10px !important;
}

body #dashboard.dashboard-overview .revenue-control-item,
body #dashboard.dashboard-overview .revenue-control-item.blue,
body #dashboard.dashboard-overview .revenue-control-item.green,
body #dashboard.dashboard-overview .revenue-control-item.amber,
body #dashboard.dashboard-overview .revenue-control-item.red,
body #dashboard.dashboard-overview .revenue-control-item.slate,
body #dashboard.dashboard-overview .revenue-control-item.purple {
    min-height: 96px !important;
    padding: 14px 16px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-control-item.amber {
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-control-item.red {
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-control-item strong {
    margin-top: 10px !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(20px, 1.4vw, 24px)/1.15 var(--smpl-font-ui) !important;
    letter-spacing: -0.035em !important;
}

body #dashboard.dashboard-overview .exception-row {
    min-height: 76px !important;
    padding: 12px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .exception-row.high {
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .exception-row.medium {
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .exception-row.low {
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .exception-row strong {
    margin: 4px 0 !important;
    color: var(--smpl-ink) !important;
    font: 700 16px/1.15 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

@media (max-width: 1100px) {
    body #dashboard.dashboard-overview .executive-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body #dashboard.dashboard-overview .executive-command-split {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    body #dashboard.dashboard-overview .executive-command-panel {
        padding: var(--smpl-space-2) !important;
    }

    body #dashboard.dashboard-overview .executive-command-head,
    body #dashboard.dashboard-overview .executive-health-grid,
    body #dashboard.dashboard-overview .revenue-control-grid,
    body #dashboard.dashboard-overview .exception-queue-list {
        grid-template-columns: 1fr !important;
    }

    body #dashboard.dashboard-overview .executive-command-head {
        display: grid !important;
        align-items: start !important;
    }

    body #dashboard.dashboard-overview .executive-command-meta {
        justify-self: start !important;
    }
}

/* Pipeline board UX redesign: final authoritative stage/card presentation. */
body #pipeline .pipeline-board-shell {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 10px;
    overflow: hidden;
    border: 1px solid var(--smpl-line);
    border-radius: var(--smpl-radius-lg);
    background: var(--smpl-paper);
}

body #pipeline .pipeline-board-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin-bottom: 8px;
    padding: 0 2px;
}

body #pipeline .pipeline-board-toolbar p {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--smpl-text-muted);
    font: 600 11px/1.3 var(--smpl-font-ui);
}

body #pipeline .pipeline-board-nav {
    display: flex;
    gap: 6px;
}

body #pipeline .pipeline-board-nav button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    color: var(--smpl-ink);
    border: 1px solid var(--smpl-line);
    border-radius: var(--smpl-radius-sm);
    background: var(--smpl-paper);
}

body #pipeline .pipeline-board-nav button:hover:not(:disabled) {
    border-color: var(--smpl-soft);
    background: var(--smpl-surface);
}

body #pipeline .pipeline-board-nav button:disabled {
    cursor: default;
    opacity: .35;
}

body #pipeline .pipeline-board-shell::before,
body #pipeline .pipeline-board-shell::after {
    content: '';
    position: absolute;
    z-index: 12;
    top: 54px;
    bottom: 26px;
    width: 24px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 160ms ease;
}

body #pipeline .pipeline-board-shell::before {
    left: 9px;
    border-left: 2px solid var(--smpl-soft);
    box-shadow: 8px 0 18px var(--smpl-paper);
}

body #pipeline .pipeline-board-shell::after {
    right: 9px;
    border-right: 2px solid var(--smpl-soft);
    box-shadow: -8px 0 18px var(--smpl-paper);
}

body #pipeline .pipeline-board-shell[data-can-scroll-left="true"]::before,
body #pipeline .pipeline-board-shell[data-can-scroll-right="true"]::after {
    opacity: 1;
}

body #pipeline #stagesContainer.stages-container {
    gap: 12px !important;
    min-height: 520px !important;
    padding: 2px 2px 14px !important;
    scroll-padding-inline: 2px;
    scrollbar-gutter: stable;
}

body #pipeline #stagesContainer.stages-container:focus-visible {
    outline: 2px solid var(--smpl-ink);
    outline-offset: 3px;
}

body #pipeline #stagesContainer.stages-container > .stage-column {
    position: relative;
    display: flex !important;
    flex: 0 0 320px !important;
    flex-direction: column !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    height: min(68vh, 660px) !important;
    min-height: 500px !important;
    max-height: 660px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 12px !important;
    background: var(--smpl-surface) !important;
}

body #pipeline .stage-header,
body #pipeline .stage-column:not(.no-bid-stage) .stage-header,
body #pipeline .new-orders-column-header {
    position: relative;
    z-index: 10;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: 64px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #pipeline .new-orders-column {
    border-style: solid !important;
    border-color: var(--smpl-line) !important;
}

body #pipeline .new-orders-column::before {
    content: '' !important;
    position: absolute;
    z-index: 13;
    inset: 0 auto 0 0;
    display: block !important;
    width: 3px;
    border-radius: 12px 0 0 12px;
    background: var(--smpl-success) !important;
}

body #pipeline .new-orders-column-title,
body #pipeline .new-orders-column-title i {
    color: var(--smpl-ink) !important;
}

body #pipeline .stage-column.no-bid-stage {
    border: 1px solid var(--smpl-danger-line) !important;
    background: var(--smpl-surface) !important;
}

body #pipeline .stage-column.no-bid-stage::before {
    content: '';
    position: absolute;
    z-index: 13;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 12px 0 0 12px;
    background: var(--smpl-danger);
}

body #pipeline .stage-column.no-bid-stage .stage-header,
body #pipeline .stage-column.no-bid-stage .stage-body {
    background: var(--smpl-paper) !important;
}

body #pipeline .stage-column.no-bid-stage .stage-title :where(h3, i) {
    color: var(--smpl-danger) !important;
}

body #pipeline .stage-title {
    min-width: 0;
}

body #pipeline .stage-title h3,
body #pipeline .stage-column:not(.no-bid-stage) .stage-title h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--smpl-ink) !important;
    font: 700 13px/1.3 var(--smpl-font-ui) !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body #pipeline .stage-controls,
body #pipeline .stage-actions {
    display: flex;
    align-items: center;
    gap: 5px !important;
}

body #pipeline .stage-count {
    display: flex;
    align-items: center;
}

body #pipeline .stage-column:not(.no-bid-stage) .count-badge,
body #pipeline .new-orders-column .count-badge.pipeline-new-orders-badge {
    min-width: 25px !important;
    padding: 4px 7px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #pipeline :where(.stage-actions, .record-actions) > .icon-btn,
body #pipeline .pipeline-overflow > summary.icon-btn,
body #pipeline .new-order-pickup-btn {
    display: inline-grid !important;
    place-items: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    list-style: none;
}

body #pipeline .pipeline-overflow > summary::-webkit-details-marker {
    display: none;
}

body #pipeline :where(.stage-actions, .record-actions) > .icon-btn:hover,
body #pipeline .pipeline-overflow > summary.icon-btn:hover,
body #pipeline .new-order-pickup-btn:hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #pipeline .pipeline-overflow {
    position: relative;
    z-index: 20;
}

body #pipeline .pipeline-overflow-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    width: 168px;
    padding: 6px;
    border: 1px solid var(--smpl-line);
    border-radius: 9px;
    background: var(--smpl-paper);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

body #pipeline .pipeline-overflow-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    color: var(--smpl-ink);
    border: 0;
    border-radius: 6px;
    background: transparent;
    font: 600 12px/1.3 var(--smpl-font-ui);
    text-align: left;
}

body #pipeline .pipeline-overflow-menu button:hover,
body #pipeline .pipeline-overflow-menu button:focus-visible {
    background: var(--smpl-surface);
}

body #pipeline .pipeline-overflow-menu button.danger {
    color: var(--smpl-danger);
}

body #pipeline .stage-body,
body #pipeline .stage-column:not(.no-bid-stage) .stage-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: var(--smpl-surface) !important;
}

body #pipeline :where(.record-card, .new-order-card) {
    position: relative;
    isolation: isolate;
    min-width: 0;
    margin: 0 0 9px !important;
    padding: 12px !important;
    overflow: visible;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    transition: border-color 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

body #pipeline :where(.record-card, .new-order-card):hover {
    border-color: var(--smpl-soft) !important;
    background: #fdfdfd !important;
}

body #pipeline :where(.record-card-open, .new-order-card-open) {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    cursor: grab;
    border: 0;
    border-radius: inherit;
    background: transparent;
}

body #pipeline :where(.record-card-open, .new-order-card-open):active {
    cursor: grabbing;
}

body #pipeline :where(.record-card-open, .new-order-card-open):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

body #pipeline :where(.record-card, .new-order-card) > :not(.record-card-open, .new-order-card-open) {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

body #pipeline :where(.record-actions, .record-description-toggle, .new-order-pickup-btn, .pipeline-overflow, .pipeline-overflow *) {
    z-index: 4;
    pointer-events: auto !important;
}

body #pipeline .record-header,
body #pipeline .new-order-card-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 8px !important;
    margin-bottom: 9px !important;
}

body #pipeline .record-actions {
    display: flex !important;
    gap: 3px !important;
    opacity: 1 !important;
}

body #pipeline .record-title,
body #pipeline .new-order-card-title {
    overflow: hidden !important;
    color: var(--smpl-ink) !important;
    font: 700 13px/1.35 var(--smpl-font-ui) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #pipeline .record-title.record-title--order-id {
    font: 700 11px/1.4 var(--smpl-font-mono) !important;
}

body #pipeline .record-info,
body #pipeline .new-order-card-row {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0;
    margin-bottom: 6px !important;
    color: var(--smpl-text-muted) !important;
    font: 500 11px/1.4 var(--smpl-font-ui) !important;
}

body #pipeline :where(.record-info, .new-order-card-row) > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body #pipeline .record-workflow-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 1px 0 8px 2px;
    padding: 4px 7px;
    color: var(--smpl-text-muted);
    border: 1px solid var(--smpl-line);
    border-radius: 999px;
    background: var(--smpl-surface);
    font: 650 9px/1.3 var(--smpl-font-mono);
    text-transform: capitalize;
}

body #pipeline .record-description-block {
    margin-top: 9px !important;
}

body #pipeline .record-description--clamped {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body #pipeline .record-footer,
body #pipeline .new-order-card-foot {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding-top: 9px !important;
    border-top: 1px solid var(--smpl-line) !important;
}

body #pipeline .new-order-card-foot {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

body #pipeline :where(.record-card, .new-order-card).picked-up,
body #pipeline :where(.record-card, .new-order-card).is-moving {
    border-color: var(--smpl-ink) !important;
    box-shadow: inset 0 0 0 1px var(--smpl-ink) !important;
}

body #pipeline :where(.record-card, .new-order-card).is-moving {
    opacity: .62;
    pointer-events: none;
}

body #pipeline .record-card.dragging,
body #pipeline .new-order-card.dragging {
    opacity: .35 !important;
}

body #pipeline .stage-column.can-place-picked .stage-header,
body #pipeline .stage-body.drag-over {
    background: #f3f3f3 !important;
    box-shadow: inset 0 0 0 2px var(--smpl-ink) !important;
}

body #pipeline .pipeline-stage-state,
body #pipeline .pipeline-board-state {
    display: grid;
    place-items: center;
    align-content: center;
    min-width: 0;
    min-height: 148px;
    padding: 22px 16px;
    color: var(--smpl-text-muted);
    border: 1px dashed var(--smpl-soft);
    border-radius: 9px;
    background: var(--smpl-paper);
    text-align: center;
}

body #pipeline .pipeline-stage-state-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 10px;
    color: var(--smpl-ink);
    border: 1px solid var(--smpl-line);
    border-radius: 50%;
    background: var(--smpl-surface);
}

body #pipeline .pipeline-stage-state--success .pipeline-stage-state-icon {
    color: var(--smpl-paper);
    border-color: var(--smpl-ink);
    background: var(--smpl-ink);
}

body #pipeline :where(.pipeline-stage-state, .pipeline-board-state) strong {
    margin-bottom: 5px;
    color: var(--smpl-ink);
    font: 700 13px/1.3 var(--smpl-font-ui);
}

body #pipeline :where(.pipeline-stage-state, .pipeline-board-state) p {
    max-width: 230px;
    margin: 0;
    font: 500 11px/1.5 var(--smpl-font-ui);
}

body #pipeline .pipeline-state-action {
    min-height: 36px;
    margin-top: 12px;
    padding: 8px 12px;
    color: var(--smpl-paper);
    border: 1px solid var(--smpl-ink);
    border-radius: 7px;
    background: var(--smpl-ink);
    font: 600 11px/1.3 var(--smpl-font-ui);
}

body #pipeline .pipeline-board-state {
    flex: 0 0 100%;
    width: 100%;
    min-height: 300px;
}

body #pipeline .pipeline-state-spinner {
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    border: 3px solid var(--smpl-line);
    border-top-color: var(--smpl-ink);
    border-radius: 50%;
    animation: pipeline-spin 800ms linear infinite;
}

@keyframes pipeline-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
    body #pipeline .pipeline-board-toolbar p {
        font-size: 10px;
    }

    body #pipeline .pipeline-board-nav button,
    body #pipeline :where(.stage-actions, .record-actions) > .icon-btn,
    body #pipeline .pipeline-overflow > summary.icon-btn,
    body #pipeline .new-order-pickup-btn,
    body #pipeline .pipeline-state-action {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    body #pipeline #stagesContainer.stages-container > .stage-column {
        flex-basis: calc(100cqi - 8px) !important;
        width: calc(100cqi - 8px) !important;
        min-width: calc(100cqi - 8px) !important;
        max-width: calc(100cqi - 8px) !important;
    }
}

/* Profile Settings — authoritative SMPLFix account workspace */
body #profileModal {
    z-index: 12000;
    padding: clamp(12px, 2.5vw, 32px);
    background: rgb(11 11 12 / 0.62) !important;
    backdrop-filter: blur(5px);
}

body #profileModal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

body.profile-modal-open {
    overflow: hidden !important;
}

body #profileModal .profile-settings-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(920px, calc(100vw - 48px)) !important;
    max-width: 920px !important;
    max-height: calc(100dvh - 32px);
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--smpl-line-strong);
    border-radius: 18px;
    background: var(--smpl-paper);
    box-shadow: 0 30px 80px rgb(0 0 0 / 0.24);
}

body #profileModal .profile-settings-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    min-width: 0;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--smpl-line);
    background: var(--smpl-paper);
}

body #profileModal .profile-settings-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--smpl-muted);
    font: 700 10px/1 var(--font-mono, monospace);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body #profileModal .profile-settings-header h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    color: var(--smpl-ink);
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.1;
}

body #profileModal .profile-title-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    color: var(--smpl-ink);
    background: var(--smpl-surface);
    font-size: 15px;
}

body #profileModal .profile-title-icon i {
    color: var(--smpl-ink);
}

body #profileModal .profile-settings-header p {
    margin: 8px 0 0 47px;
    color: var(--smpl-muted);
    font-size: 13px;
    line-height: 1.45;
}

body #profileModal .modal-close {
    display: inline-grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--smpl-ink);
    background: transparent;
}

body #profileModal .modal-close:hover,
body #profileModal .modal-close:focus-visible {
    border-color: var(--smpl-line-strong);
    background: var(--smpl-surface);
}

body #profileModal .profile-settings-body {
    display: grid;
    min-width: 0;
    gap: 14px;
    padding: 20px 28px 24px;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--smpl-surface);
    scrollbar-color: var(--smpl-ink) transparent;
    scrollbar-width: thin;
}

body #profileModal .profile-settings-body::-webkit-scrollbar {
    width: 8px;
}

body #profileModal .profile-settings-body::-webkit-scrollbar-track {
    background: transparent;
}

body #profileModal .profile-settings-body::-webkit-scrollbar-thumb {
    border: 2px solid var(--smpl-surface);
    border-radius: 999px;
    background: var(--smpl-ink);
}

body #profileModal .profile-identity-card,
body #profileModal .profile-settings-panel {
    min-width: 0;
    border: 1px solid var(--smpl-line);
    border-radius: 14px;
    background: var(--smpl-paper);
}

body #profileModal .profile-identity-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
}

body #profileModal .profile-avatar-section,
body #profileModal .avatar-container {
    width: 76px;
    height: 76px;
    margin: 0;
}

body #profileModal #profileAvatar {
    display: block;
    width: 76px;
    height: 76px;
    object-fit: cover;
    border: 3px solid var(--smpl-paper);
    border-radius: 50%;
    background: var(--smpl-ink);
    box-shadow: 0 0 0 1px var(--smpl-line-strong);
}

body #profileModal .profile-photo-copy {
    min-width: 0;
}

body #profileModal .profile-photo-copy h3,
body #profileModal .profile-panel-heading h3 {
    margin: 0;
    color: var(--smpl-ink);
    font-size: 15px;
    line-height: 1.3;
}

body #profileModal .profile-photo-copy p,
body #profileModal .profile-panel-heading p {
    margin: 4px 0 0;
    color: var(--smpl-muted);
    font-size: 12px;
    line-height: 1.45;
}

body #profileModal .profile-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

body #profileModal .profile-photo-actions .btn-secondary,
body #profileModal .profile-text-button {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

body #profileModal .profile-text-button {
    border: 1px solid transparent;
    color: var(--smpl-muted);
    background: transparent;
}

body #profileModal .profile-text-button:hover:not(:disabled) {
    color: var(--smpl-ink);
    border-color: var(--smpl-line);
}

body #profileModal .profile-text-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body #profileModal .profile-role-summary {
    display: grid;
    min-width: 172px;
    gap: 4px;
    padding: 13px 15px;
    border-left: 1px solid var(--smpl-line);
}

body #profileModal .profile-role-summary span,
body #profileModal .profile-role-summary small {
    color: var(--smpl-muted);
    font-size: 10px;
}

body #profileModal .profile-role-summary span {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body #profileModal .profile-role-summary strong {
    color: var(--smpl-ink);
    font-size: 14px;
}

body #profileModal .profile-settings-panel {
    padding: 18px;
}

body #profileModal .profile-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--smpl-line);
}

body #profileModal .profile-save-state {
    flex: 0 1 auto;
    max-width: 290px;
    color: var(--smpl-muted);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

body #profileModal .profile-save-state[data-tone="success"] { color: var(--smpl-success); }
body #profileModal .profile-save-state[data-tone="error"] { color: var(--smpl-danger); }

body #profileModal .profile-form,
body #profileModal .password-form,
body #profileModal .form-group {
    min-width: 0;
}

body #profileModal .profile-form,
body #profileModal .password-form {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body #profileModal .profile-form-grid,
body #profileModal .profile-password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    min-width: 0;
}

body #profileModal .profile-password-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body #profileModal .form-group {
    display: grid;
    align-content: start;
    gap: 7px;
    margin: 0;
}

body #profileModal .form-group[hidden] {
    display: none !important;
}

body #profileModal .form-group label {
    margin: 0;
    color: var(--smpl-ink);
    font: 700 11px/1.3 var(--font-sans, sans-serif);
    letter-spacing: 0;
    text-transform: none;
}

body #profileModal .form-group input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--smpl-line-strong);
    border-radius: 9px;
    color: var(--smpl-ink);
    background: var(--smpl-paper);
    font-size: 13px;
    max-width: none !important;
    box-sizing: border-box;
}

body #profileModal .form-group input:hover {
    border-color: var(--smpl-muted);
}

body #profileModal .form-group input:focus {
    border-color: var(--smpl-ink);
    outline: 3px solid rgb(11 11 12 / 0.12);
    box-shadow: none;
}

body #profileModal .form-group small {
    min-height: 15px;
    color: var(--smpl-muted);
    font-size: 10px;
    line-height: 1.4;
}

body #profileModal .profile-security-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

body #profileModal .profile-security-actions .btn-secondary {
    width: auto !important;
    min-width: 168px;
    padding-inline: 18px;
    color: var(--smpl-paper);
    border-color: var(--smpl-ink);
    background: var(--smpl-ink);
}

body #profileModal .profile-security-actions .btn-secondary:hover,
body #profileModal .profile-security-actions .btn-secondary:focus-visible {
    color: var(--smpl-paper);
    background: var(--smpl-ink-soft, #262626);
}

body #profileModal .profile-security-actions button,
body #profileModal .profile-settings-footer button {
    min-height: 40px;
    border-radius: 9px;
}

body #profileModal .profile-settings-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px;
    border-top: 1px solid var(--smpl-line);
    background: var(--smpl-paper);
}

body #profileModal [disabled] {
    cursor: wait;
}

body #profileModal[aria-busy="true"] .profile-settings-body {
    opacity: 0.65;
    pointer-events: none;
}

@media (max-width: 720px) {
    body #profileModal {
        align-items: flex-end;
        padding: 0;
    }

    body #profileModal .profile-settings-dialog {
        width: 100%;
        max-height: 94dvh;
        border-width: 1px 0 0;
        border-radius: 18px 18px 0 0;
    }

    body #profileModal.show {
        align-items: flex-end;
    }

    body #profileModal .profile-settings-header,
    body #profileModal .profile-settings-body,
    body #profileModal .profile-settings-footer {
        padding-inline: 18px;
    }

    body #profileModal .profile-settings-header p {
        margin-left: 0;
    }

    body #profileModal .profile-identity-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    body #profileModal .profile-role-summary {
        grid-column: 1 / -1;
        min-width: 0;
        padding: 12px 0 0;
        border-top: 1px solid var(--smpl-line);
        border-left: 0;
    }

    body #profileModal .profile-form-grid,
    body #profileModal .profile-password-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body #profileModal .profile-settings-footer button {
        flex: 1 1 0;
        min-height: 44px;
    }
}

@media (max-width: 430px) {
    body #profileModal .profile-identity-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    body #profileModal .profile-avatar-section,
    body #profileModal .profile-photo-actions {
        justify-self: center;
    }

    body #profileModal .profile-role-summary {
        text-align: left;
    }

    body #profileModal .profile-panel-heading {
        display: grid;
    }

    body #profileModal .profile-save-state {
        max-width: none;
        text-align: left;
    }
}

/* Workflow Center: SMPLFix brand alignment and overview hierarchy. */
body :is(#workflow-overview, .workflow-stage-section) {
    --wfr-ink: var(--smpl-ink);
    --wfr-text: var(--smpl-text-muted);
    --wfr-muted: var(--smpl-text-muted);
    --wfr-line: var(--smpl-line);
    --wfr-surface: var(--smpl-paper);
    --wfr-canvas: var(--smpl-surface);
    --wfr-radius: 12px;
    --wfr-shadow: none;
    --wf-ink: var(--smpl-ink);
    --wf-muted: var(--smpl-text-muted);
    --wf-border: var(--smpl-line);
    --wf-surface: var(--smpl-paper);
    --wf-canvas: var(--smpl-surface);
    color: var(--smpl-ink);
}

body #workflow-overview .workflow-reference-shell {
    gap: 16px;
}

body #workflow-overview .workflow-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

body #workflow-overview .workflow-kpi-card {
    min-height: 112px;
    padding: 16px;
    gap: 13px;
    overflow: hidden;
    border: 1px solid var(--smpl-line);
    border-radius: 12px;
    background: var(--smpl-paper);
    box-shadow: none;
    transform: none;
}

body #workflow-overview .workflow-kpi-card::before {
    content: none;
}

body #workflow-overview .workflow-kpi-icon,
body #workflow-overview .workflow-kpi-card[class*="tone-"] .workflow-kpi-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    color: var(--smpl-ink);
    border: 1px solid var(--smpl-line);
    border-radius: 10px;
    background: var(--smpl-surface);
    font-size: 15px;
}

body #workflow-overview .workflow-kpi-copy {
    gap: 2px;
}

body #workflow-overview .workflow-kpi-copy > span {
    color: var(--smpl-text-muted);
    font: 700 10px/1.3 var(--smpl-font-mono);
    letter-spacing: .04em;
    text-transform: uppercase;
}

body #workflow-overview .workflow-kpi-copy strong {
    color: var(--smpl-ink);
    font: 700 26px/1 var(--smpl-font-ui);
    letter-spacing: -.035em;
}

body #workflow-overview .workflow-kpi-copy small {
    min-width: 0;
    color: var(--smpl-text-muted);
    font-size: 9px;
    line-height: 1.35;
}

body #workflow-overview .workflow-kpi-copy small.is-clear {
    color: var(--smpl-success);
}

@media (hover: hover) {
    body #workflow-overview .workflow-kpi-card:hover {
        border-color: var(--smpl-ink);
        background: var(--smpl-surface);
        box-shadow: none;
        transform: none;
    }
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tabs {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    gap: 0;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--smpl-line);
    border-radius: 12px;
    background: var(--smpl-paper);
    box-shadow: none;
    scrollbar-width: thin;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-width: 145px;
    min-height: 52px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: var(--smpl-text-muted);
    border: 0;
    border-right: 1px solid var(--smpl-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab:last-child {
    border-right-color: transparent;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab > i {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: currentColor;
    border-radius: 7px;
    background: var(--smpl-surface);
    font-size: 11px;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab span,
body :is(#workflow-overview, .workflow-stage-section) .workflow-tab strong {
    min-width: 0;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab strong {
    overflow: hidden;
    margin: 0;
    color: inherit;
    font: 700 11px/1.25 var(--smpl-font-ui);
    text-overflow: ellipsis;
    white-space: nowrap;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab small {
    overflow: hidden;
    margin-top: 2px;
    color: inherit;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab-count {
    min-width: 22px;
    min-height: 22px;
    padding: 3px 6px;
    color: var(--smpl-text-muted);
    border: 1px solid var(--smpl-line);
    border-radius: 999px;
    background: var(--smpl-surface);
    font: 700 9px/1.5 var(--smpl-font-mono);
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab[aria-selected="true"] {
    color: var(--smpl-paper);
    border-color: var(--smpl-ink);
    border-radius: 9px;
    background: var(--smpl-ink);
    box-shadow: none;
}

body :is(#workflow-overview, .workflow-stage-section) .workflow-tab[aria-selected="true"] > i,
body :is(#workflow-overview, .workflow-stage-section) .workflow-tab[aria-selected="true"] .workflow-tab-count {
    color: var(--smpl-paper);
    border-color: #3b3b3e;
    background: #2a2a2c;
}

body #workflow-overview .workflow-overview-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(340px, .75fr);
    align-items: start;
    gap: 14px;
}

body #workflow-overview .workflow-overview-panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--smpl-line);
    border-radius: 12px;
    background: var(--smpl-paper);
    box-shadow: none;
}

body #workflow-overview .workflow-panel-head {
    min-height: 78px;
    padding: 16px 18px 13px;
    border-bottom: 1px solid var(--smpl-line);
}

body #workflow-overview .workflow-panel-head h2 {
    gap: 9px;
    margin: 0 0 4px;
    color: var(--smpl-ink);
    font-size: 15px;
}

body #workflow-overview .workflow-panel-head p {
    margin: 0;
    color: var(--smpl-text-muted);
    font-size: 10px;
    line-height: 1.4;
}

body #workflow-overview .workflow-panel-icon,
body #workflow-overview .workflow-panel-icon.danger,
body #workflow-overview .workflow-panel-icon.info {
    width: 28px;
    height: 28px;
    color: var(--smpl-paper);
    border-radius: 8px;
    background: var(--smpl-ink);
    font-size: 10px;
}

body #workflow-overview .workflow-attention-pill {
    min-height: 26px;
    padding: 4px 9px;
    color: var(--smpl-danger);
    border: 1px solid var(--smpl-danger-line);
    background: var(--smpl-danger-bg);
    font: 700 9px/1.2 var(--smpl-font-mono);
}

body #workflow-overview .workflow-attention-pill.is-zero {
    color: var(--smpl-success);
    border-color: var(--smpl-success-line);
    background: var(--smpl-success-bg);
}

body #workflow-overview .workflow-attention-filters {
    max-width: calc(100% - 36px);
    margin: 12px 18px;
    padding: 3px;
    gap: 2px;
    border-color: var(--smpl-line);
    border-radius: 9px;
    background: var(--smpl-surface);
}

body #workflow-overview .workflow-attention-filters button {
    min-width: 76px;
    min-height: 34px;
    padding: 6px 10px;
    color: var(--smpl-text-muted);
    border-radius: 7px;
    font-size: 9px;
}

body #workflow-overview .workflow-attention-filters button[aria-selected="true"] {
    color: var(--smpl-paper);
    border-color: var(--smpl-ink);
    background: var(--smpl-ink);
    box-shadow: none;
}

body #workflow-overview .workflow-attention-filters button[aria-selected="true"] span {
    color: var(--smpl-ink);
    background: var(--smpl-paper);
}

body #workflow-overview .workflow-attention-list,
body #workflow-overview .workflow-activity-list {
    padding-right: 18px;
    padding-left: 18px;
}

body #workflow-overview .workflow-attention-empty {
    min-height: 176px;
    margin-bottom: 16px;
    padding: 24px 16px;
    border-color: var(--smpl-soft);
    border-radius: 10px;
    background: var(--smpl-surface);
}

body #workflow-overview .workflow-attention-empty .workflow-empty-art {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    color: var(--smpl-paper);
    border-radius: 50%;
    background: var(--smpl-ink);
    box-shadow: none;
    transform: none;
    font-size: 15px;
}

body #workflow-overview .workflow-attention-empty .workflow-empty-art i {
    transform: none;
}

body #workflow-overview .workflow-attention-empty strong {
    color: var(--smpl-ink);
    font-size: 12px;
}

body #workflow-overview .workflow-attention-empty p {
    margin-top: 3px !important;
    color: var(--smpl-text-muted) !important;
    font-size: 9px !important;
}

body #workflow-overview .workflow-activity-list::before {
    background: var(--smpl-line);
}

body #workflow-overview .workflow-activity-list .workflow-recent-item {
    min-height: 56px;
    border-bottom-color: var(--smpl-line);
    background: var(--smpl-paper);
}

body #workflow-overview .workflow-activity-list .workflow-recent-item:hover {
    background: var(--smpl-surface);
}

body #workflow-overview .workflow-activity-list .workflow-recent-item > .workflow-activity-dot {
    color: var(--smpl-paper);
    background: var(--smpl-ink);
    box-shadow: 0 0 0 1px var(--smpl-line);
}

body #workflow-overview .workflow-activity-list .workflow-recent-item.tone-success > .workflow-activity-dot {
    background: var(--smpl-success);
}

body #workflow-overview .workflow-activity-list .workflow-recent-item.tone-warning > .workflow-activity-dot,
body #workflow-overview .workflow-activity-list .workflow-recent-item.tone-danger > .workflow-activity-dot {
    background: var(--smpl-danger);
}

body #workflow-overview .workflow-stage-badge {
    color: var(--smpl-text-muted);
    border: 1px solid var(--smpl-line);
    background: var(--smpl-surface);
}

body #workflow-overview .workflow-activity-list .workflow-stage-badge[class*="stage-"] {
    color: var(--smpl-text-muted);
}

body #workflow-overview :where(.workflow-kpi-card, .workflow-tab, .workflow-attention-filters button, .workflow-recent-item):focus-visible {
    outline: 2px solid var(--smpl-ink);
    outline-offset: 2px;
}

@media (max-width: 1320px) {
    body #workflow-overview .workflow-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body #workflow-overview .workflow-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    body #workflow-overview .workflow-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body :is(#workflow-overview, .workflow-stage-section) .workflow-tabs {
        grid-template-columns: repeat(7, 150px);
        scroll-snap-type: x proximity;
    }

    body :is(#workflow-overview, .workflow-stage-section) .workflow-tab {
        min-width: 150px;
        scroll-snap-align: start;
    }
}

@media (max-width: 560px) {
    body #workflow-overview .workflow-reference-shell {
        gap: 12px;
    }

    body #workflow-overview .workflow-kpi-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    body #workflow-overview .workflow-kpi-card {
        min-height: 86px;
        padding: 13px;
    }

    body #workflow-overview .workflow-panel-head {
        align-items: flex-start;
        min-height: 0;
        padding: 14px;
    }

    body #workflow-overview .workflow-attention-filters {
        max-width: calc(100% - 28px);
        margin: 10px 14px;
    }

    body #workflow-overview .workflow-attention-list,
    body #workflow-overview .workflow-activity-list {
        padding-right: 14px;
        padding-left: 14px;
    }
}

/* Workflow overview micro-polish: compact counts and reliable monochrome icons. */
body #workflow-overview .workflow-attention-filters button {
    gap: 5px;
}

body #workflow-overview .workflow-attention-filters button > span {
    display: inline-grid;
    width: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--smpl-line);
    color: var(--smpl-text-muted);
    font: 700 7px/1 var(--smpl-font-mono);
}

body #workflow-overview .workflow-attention-filters button[aria-selected="true"] > span {
    background: var(--smpl-paper) !important;
    color: var(--smpl-ink) !important;
}

body #workflow-overview .workflow-attention-empty .workflow-empty-art.success {
    display: grid !important;
    width: 40px !important;
    height: 40px !important;
    place-items: center !important;
    color: var(--smpl-paper) !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #workflow-overview .workflow-attention-empty .workflow-empty-art.success > i {
    color: var(--smpl-paper) !important;
    font-size: 14px !important;
    transform: none !important;
}

body #workflow-overview .workflow-panel-icon,
body #workflow-overview .workflow-panel-icon.info,
body #workflow-overview .workflow-panel-icon.danger {
    display: inline-grid !important;
    width: 28px !important;
    height: 28px !important;
    place-items: center !important;
    color: var(--smpl-paper) !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
}

body #workflow-overview .workflow-panel-icon > i {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    color: var(--smpl-paper) !important;
    font-size: 11px !important;
    line-height: 1 !important;
}

body #workflow-overview .workflow-activity-list::before {
    content: none !important;
}

body #workflow-overview .workflow-activity-list .workflow-recent-item {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    gap: 12px !important;
    padding: 10px 0 !important;
}

body #workflow-overview .workflow-activity-list .workflow-recent-item > .workflow-stage-badge {
    grid-column: 2 !important;
    align-self: center !important;
}

@media (max-width: 620px) {
    body #workflow-overview .workflow-activity-list .workflow-recent-item {
        grid-template-columns: minmax(0, 1fr) max-content !important;
    }

    body #workflow-overview .workflow-activity-list .workflow-stage-badge {
        grid-column: 2 !important;
    }
}

/* Workflow Center inner stages: one branded system across stages 1-6. */
body .workflow-stage-section {
    container-type: inline-size;
    padding-bottom: 48px;
}

body .workflow-stage-section > .workflow-header {
    min-height: 0 !important;
    margin: 0 0 14px !important;
    padding: 0 0 14px !important;
    overflow: visible !important;
    color: var(--smpl-ink) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

body .workflow-stage-section > .workflow-header::after {
    content: none !important;
}

body .workflow-stage-section > .workflow-header > div:first-child {
    display: block;
    min-width: 0;
}

body .workflow-stage-section > .workflow-header h1 {
    margin: 0 0 5px !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(24px, 2.2vw, 32px)/1.08 var(--smpl-font-ui) !important;
    letter-spacing: -.035em !important;
}

body .workflow-stage-section > .workflow-header p {
    max-width: 760px;
    margin: 0 !important;
    overflow: visible !important;
    color: var(--smpl-text-muted) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

body .workflow-stage-section :where(.workflow-stage-header-actions, .closeout-header-actions) {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

body .workflow-stage-section :where(.btn-primary, button[type="submit"]:not(.btn-secondary)) {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body .workflow-stage-section :where(.btn-secondary, .btn-refresh, .workflow-filter-clear) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-soft) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body .workflow-stage-section :where(.btn-primary, .btn-secondary, .btn-refresh, .workflow-filter-clear) {
    min-height: 38px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font: 700 10px/1.2 var(--smpl-font-ui) !important;
}

@media (hover: hover) {
    body .workflow-stage-section :where(.btn-primary, button[type="submit"]:not(.btn-secondary)):hover:not(:disabled) {
        color: var(--smpl-paper) !important;
        border-color: var(--smpl-ink-hover) !important;
        background: var(--smpl-ink-hover) !important;
        transform: none !important;
    }

    body .workflow-stage-section :where(.btn-secondary, .btn-refresh, .workflow-filter-clear):hover:not(:disabled) {
        color: var(--smpl-ink) !important;
        border-color: var(--smpl-ink) !important;
        background: var(--smpl-surface) !important;
        transform: none !important;
    }
}

body .workflow-stage-section .workflow-shared-chrome {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
}

body .workflow-stage-section .workflow-filterbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(130px, .55fr)) minmax(145px, .55fr) auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 10px;
    gap: 8px;
    border: 1px solid var(--smpl-line);
    border-radius: 12px;
    background: var(--smpl-paper);
    box-shadow: none;
}

body .workflow-stage-section .workflow-filterbar :where(input, select) {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 11px;
    color: var(--smpl-ink);
    border: 1px solid var(--smpl-soft);
    border-radius: 8px;
    background: var(--smpl-paper);
    font: 500 11px/1.2 var(--smpl-font-ui);
    box-shadow: none;
}

body .workflow-stage-section .workflow-search input {
    padding-left: 36px;
}

body .workflow-stage-section .workflow-search > i {
    left: 13px;
    color: var(--smpl-text-muted);
}

body .workflow-stage-section .workflow-filterbar :where(input, select):focus {
    outline: 2px solid var(--smpl-ink);
    outline-offset: 1px;
    border-color: var(--smpl-ink);
}

body .workflow-stage-section .workflow-summary {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 10px !important;
    margin: 0 0 14px !important;
}

body .workflow-stage-section .workflow-summary > div {
    display: grid !important;
    min-width: 0 !important;
    min-height: 86px !important;
    align-content: center !important;
    gap: 5px !important;
    padding: 14px 16px !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body .workflow-stage-section .workflow-summary > div::before {
    content: none !important;
}

body .workflow-stage-section .workflow-summary strong {
    color: var(--smpl-ink) !important;
    font: 700 25px/1 var(--smpl-font-ui) !important;
    letter-spacing: -.035em !important;
}

body .workflow-stage-section .workflow-summary span {
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
}

body .workflow-stage-section .incoming-start-panel,
body .workflow-stage-section .outgoing-toolbar {
    margin: 0 0 14px !important;
    padding: 12px 14px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body .workflow-stage-section .incoming-start-panel {
    display: grid !important;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, .65fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
}

body .workflow-stage-section .incoming-start-panel > div {
    min-width: 0;
}

body .workflow-stage-section .incoming-start-panel strong,
body .workflow-stage-section .incoming-start-panel span {
    display: block;
}

body .workflow-stage-section .incoming-start-panel strong {
    margin-bottom: 3px;
    font-size: 12px;
}

body .workflow-stage-section .incoming-start-panel span {
    color: var(--smpl-text-muted);
    font-size: 9px;
    line-height: 1.4;
}

body .workflow-stage-section .incoming-start-panel select {
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 1px solid var(--smpl-soft);
    border-radius: 8px;
    background: var(--smpl-paper);
}

body .workflow-stage-section :where(
    .workflow-request-list,
    .incoming-order-list,
    .outgoing-order-list,
    .approval-order-list,
    .scheduling-list,
    .closeout-order-list
) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 10px !important;
    min-width: 0 !important;
}

body .workflow-stage-section :where(
    .workflow-request-card,
    .incoming-order-card,
    .outgoing-order-card,
    .approval-card,
    .scheduling-card,
    .closeout-order-card
) {
    min-width: 0 !important;
    padding: 16px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-left-color: var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body .workflow-stage-section :where(
    .workflow-request-card,
    .incoming-order-card,
    .outgoing-order-card,
    .approval-card,
    .scheduling-card,
    .closeout-order-card
)::before {
    content: none !important;
}

@media (hover: hover) {
    body .workflow-stage-section :where(
        .workflow-request-card,
        .incoming-order-card,
        .outgoing-order-card,
        .approval-card,
        .scheduling-card,
        .closeout-order-card
    ):hover {
        border-color: var(--smpl-soft) !important;
        background: var(--smpl-surface) !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

body .workflow-stage-section :where(
    .workflow-request-card,
    .incoming-order-card,
    .outgoing-order-card,
    .approval-card,
    .scheduling-card,
    .closeout-order-card
) :where(h2, h3, h4, strong) {
    color: var(--smpl-ink);
}

body .workflow-stage-section :where(
    .workflow-card-actions,
    .incoming-primary-actions,
    .incoming-form-actions,
    .outgoing-actions,
    .approval-actions,
    .schedule-submit-bar,
    .closeout-submit-bar,
    .closeout-actions
) {
    display: flex !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

body .workflow-stage-section :where(.workflow-empty, .incoming-empty, .outgoing-empty, .approval-empty, .scheduling-empty, .closeout-empty) {
    display: grid !important;
    min-height: 180px !important;
    place-items: center !important;
    align-content: center !important;
    gap: 8px !important;
    padding: 24px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: 10px !important;
    background: var(--smpl-surface) !important;
    text-align: center !important;
}

body .workflow-stage-section :where(.workflow-empty, .incoming-empty, .outgoing-empty, .approval-empty, .scheduling-empty, .closeout-empty) > i {
    display: grid !important;
    width: 38px !important;
    height: 38px !important;
    place-items: center !important;
    color: var(--smpl-paper) !important;
    border-radius: 50% !important;
    background: var(--smpl-ink) !important;
    font-size: 14px !important;
}

body .workflow-stage-section :where(
    .incoming-workspace,
    .outgoing-workspace,
    .approval-workspace,
    .scheduling-workspace,
    .closeout-workspace,
    .workflow-unified-workspace
) {
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body .workflow-stage-section :where(
    .workflow-workspace-back,
    .outgoing-back-link,
    .scheduling-back-link,
    .closeout-back-link
) {
    display: inline-flex !important;
    position: static !important;
    width: max-content !important;
    max-width: 100% !important;
    min-height: 36px !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 0 10px !important;
    padding: 7px 10px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font: 700 10px/1.2 var(--smpl-font-ui) !important;
    text-decoration: none !important;
}

body .workflow-stage-section :where(
    .workflow-local-heading,
    .workflow-order-context,
    .incoming-workspace-head,
    .outgoing-workspace-hero,
    .approval-workspace-head,
    .scheduling-head,
    .closeout-workspace-head
) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    min-width: 0 !important;
    align-items: center !important;
    gap: 14px !important;
    margin: 0 0 12px !important;
    padding: 15px 16px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body .workflow-stage-section :where(
    .workflow-local-heading,
    .workflow-order-context,
    .incoming-workspace-head,
    .outgoing-workspace-hero,
    .approval-workspace-head,
    .scheduling-head,
    .closeout-workspace-head
) > div {
    min-width: 0;
}

body .workflow-stage-section :where(
    .outgoing-workspace-icon,
    .scheduling-workspace-icon,
    .closeout-workspace-icon
) {
    display: grid !important;
    width: 40px !important;
    height: 40px !important;
    place-items: center !important;
    color: var(--smpl-paper) !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body .workflow-stage-section :where(
    .outgoing-workspace-icon,
    .scheduling-workspace-icon,
    .closeout-workspace-icon
) > i {
    color: var(--smpl-paper) !important;
}

body .workflow-stage-section :where(
    .outgoing-workspace-stage,
    .scheduling-stage-label,
    .closeout-stage-label,
    .workflow-chip.info
) {
    display: inline-flex !important;
    min-height: 26px !important;
    align-items: center !important;
    padding: 4px 9px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: 999px !important;
    background: var(--smpl-ink) !important;
    font: 700 8px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

body .workflow-stage-section :where(
    .workflow-local-heading,
    .workflow-order-context,
    .incoming-workspace-head,
    .outgoing-workspace-hero,
    .approval-workspace-head,
    .scheduling-head,
    .closeout-workspace-head
) :where(h2, h3) {
    margin: 2px 0 4px !important;
    color: var(--smpl-ink) !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
}

body .workflow-stage-section :where(
    .workflow-local-heading,
    .workflow-order-context,
    .incoming-workspace-head,
    .outgoing-workspace-hero,
    .approval-workspace-head,
    .scheduling-head,
    .closeout-workspace-head
) :where(p, small) {
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
}

body .workflow-stage-section .workflow-journey {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(150px, 1fr)) !important;
    min-width: 0 !important;
    margin: 0 0 12px !important;
    padding: 5px !important;
    gap: 5px !important;
    overflow-x: auto !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body .workflow-stage-section .workflow-journey-step {
    min-width: 150px !important;
    min-height: 58px !important;
    padding: 10px 10px 10px 38px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
}

body .workflow-stage-section .workflow-journey-step::before {
    left: 10px !important;
    top: 50% !important;
    width: 20px !important;
    height: 20px !important;
    color: var(--smpl-text-muted) !important;
    background: var(--smpl-line) !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
}

body .workflow-stage-section .workflow-journey-step.current {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body .workflow-stage-section .workflow-journey-step.current::before {
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

body .workflow-stage-section .workflow-journey-step.completed {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

body .workflow-stage-section :where(
    .incoming-panel,
    .outgoing-panel,
    .approval-panel,
    .scheduling-panel,
    .closeout-panel,
    .workflow-panel,
    .workflow-intake-health,
    .workflow-intake-checklist
) {
    min-width: 0 !important;
    padding: 16px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-left-color: var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body .workflow-stage-section :where(
    .incoming-panel-heading,
    .outgoing-panel-head,
    .schedule-panel-heading,
    .closeout-panel-title,
    .closeout-form-heading
) {
    display: flex !important;
    min-width: 0 !important;
    align-items: flex-start !important;
    gap: 10px !important;
}

body .workflow-stage-section :where(
    .incoming-panel-heading,
    .schedule-panel-heading,
    .closeout-panel-title,
    .closeout-form-heading
) > span:first-child {
    display: grid !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    place-items: center !important;
    color: var(--smpl-paper) !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
}

body .workflow-stage-section :where(
    .incoming-panel-heading,
    .schedule-panel-heading,
    .closeout-panel-title,
    .closeout-form-heading
) > span:first-child i {
    color: var(--smpl-paper) !important;
}

body .workflow-stage-section :where(
    .incoming-panel-heading,
    .schedule-panel-heading,
    .closeout-panel-title,
    .closeout-form-heading
) > div {
    min-width: 0;
}

body .workflow-stage-section :where(.incoming-panel, .outgoing-panel, .approval-panel, .scheduling-panel, .closeout-panel) h3 {
    margin: 0 0 4px !important;
    color: var(--smpl-ink) !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
}

body .workflow-stage-section :where(.incoming-panel, .outgoing-panel, .approval-panel, .scheduling-panel, .closeout-panel) p {
    color: var(--smpl-text-muted) !important;
    line-height: 1.45 !important;
}

body .workflow-stage-section :where(
    .incoming-action-grid,
    .outgoing-draft-layout,
    .scheduling-workspace-layout,
    .closeout-grid,
    #customerApprovalDetails
) {
    min-width: 0 !important;
    gap: 12px !important;
}

body .workflow-stage-section :where(
    .incoming-form-grid,
    .incoming-invite-fields,
    .outgoing-form-grid,
    .schedule-grid,
    .closeout-form,
    .form-grid
) {
    min-width: 0 !important;
    gap: 12px !important;
}

body .workflow-stage-section :where(
    .incoming-form-grid,
    .incoming-invite-fields,
    .outgoing-form-grid,
    .schedule-grid,
    .closeout-form,
    .form-grid
) > * {
    min-width: 0 !important;
}

body .workflow-stage-section label {
    color: var(--smpl-ink) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

body .workflow-stage-section label > small {
    color: var(--smpl-text-muted) !important;
    font-size: 8px !important;
    font-weight: 500 !important;
}

body .workflow-stage-section :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    width: 100% !important;
    min-width: 0 !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font: 500 11px/1.35 var(--smpl-font-ui) !important;
}

body .workflow-stage-section :where(input:not([type="checkbox"]):not([type="radio"]), select) {
    min-height: 42px !important;
    padding: 0 11px !important;
}

body .workflow-stage-section textarea {
    min-height: 92px !important;
    padding: 10px 11px !important;
    resize: vertical !important;
}

body .workflow-stage-section :where(input, select, textarea):focus {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 1px !important;
    border-color: var(--smpl-ink) !important;
}

body .workflow-stage-section :where(
    .incoming-workspace-tabs,
    .workflow-decision-timeline
) {
    position: static !important;
    min-width: 0 !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body .workflow-stage-section .incoming-workspace-tab[aria-selected="true"] {
    color: var(--smpl-paper) !important;
    background: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body .workflow-stage-section :where(.incoming-table-wrap, .table-wrap, .table-container) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: auto !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-paper) !important;
}

body .workflow-stage-section table {
    color: var(--smpl-ink) !important;
    border-collapse: collapse !important;
    background: var(--smpl-paper) !important;
}

body .workflow-stage-section th {
    color: var(--smpl-text-muted) !important;
    background: var(--smpl-surface) !important;
    font: 700 8px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: .04em !important;
}

body .workflow-stage-section :where(th, td) {
    border-bottom: 1px solid var(--smpl-line) !important;
}

body .workflow-stage-section :where(
    .incoming-primary-actions,
    .incoming-form-actions,
    .outgoing-actions,
    .approval-actions,
    .schedule-submit-bar,
    .closeout-submit-bar,
    .workflow-sticky-actions
) {
    position: static !important;
    margin-top: 14px !important;
    padding: 11px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body .workflow-stage-section details {
    min-width: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body .workflow-stage-section details > summary {
    min-height: 48px !important;
    padding: 11px 13px !important;
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
    cursor: pointer !important;
}

body .workflow-stage-section :where(.workflow-clickable, button, a, summary):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

@media (max-width: 1180px) {
    body .workflow-stage-section .workflow-filterbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body .workflow-stage-section .workflow-search {
        grid-column: 1 / -1;
    }

    body .workflow-stage-section .incoming-start-panel {
        grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr);
    }

    body .workflow-stage-section .incoming-start-panel > div {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    body .workflow-stage-section :where(
        .incoming-action-grid,
        .outgoing-draft-layout,
        .scheduling-workspace-layout,
        .closeout-grid,
        #customerApprovalDetails
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body .workflow-stage-section :where(.scheduling-workspace-aside, .closeout-aside, .outgoing-readiness) {
        position: static !important;
    }
}

@media (max-width: 700px) {
    body .workflow-stage-section > .workflow-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 12px !important;
    }

    body .workflow-stage-section :where(.workflow-stage-header-actions, .closeout-header-actions) {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    body .workflow-stage-section .workflow-filterbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body .workflow-stage-section .workflow-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body .workflow-stage-section .incoming-start-panel {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body .workflow-stage-section .incoming-start-panel > div {
        grid-column: auto;
    }

    body .workflow-stage-section :where(
        .workflow-local-heading,
        .workflow-order-context,
        .incoming-workspace-head,
        .outgoing-workspace-hero,
        .approval-workspace-head,
        .scheduling-head,
        .closeout-workspace-head
    ) {
        grid-template-columns: auto minmax(0, 1fr) !important;
        align-items: start !important;
    }

    body .workflow-stage-section :where(
        .outgoing-workspace-stage,
        .scheduling-stage-label,
        .closeout-stage-label,
        .workflow-local-heading > button,
        .incoming-workspace-head > button,
        .approval-workspace-head > button
    ) {
        grid-column: 1 / -1 !important;
        justify-self: start !important;
    }
}

@media (max-width: 520px) {
    body .workflow-stage-section {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    body .workflow-stage-section .workflow-filterbar,
    body .workflow-stage-section .workflow-summary {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body .workflow-stage-section .workflow-search {
        grid-column: auto;
    }

    body .workflow-stage-section :where(
        .workflow-local-heading,
        .workflow-order-context,
        .incoming-workspace-head,
        .outgoing-workspace-hero,
        .approval-workspace-head,
        .scheduling-head,
        .closeout-workspace-head
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body .workflow-stage-section :where(
        .outgoing-workspace-icon,
        .scheduling-workspace-icon,
        .closeout-workspace-icon
    ) {
        width: 36px !important;
        height: 36px !important;
    }

    body .workflow-stage-section :where(
        .workflow-card-actions,
        .incoming-primary-actions,
        .incoming-form-actions,
        .outgoing-actions,
        .approval-actions,
        .schedule-submit-bar,
        .closeout-submit-bar,
        .closeout-actions,
        .workflow-sticky-actions
    ) > * {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body #pipeline *,
    body #pipeline *::before,
    body #pipeline *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Mini charts: compact SMPLFix analytics cards. */
body #dashboard.dashboard-overview .mini-charts-panel {
    margin-bottom: var(--smpl-space-4) !important;
    padding: clamp(20px, 2vw, 28px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .mini-charts-header {
    margin-bottom: var(--smpl-space-2) !important;
    padding-bottom: var(--smpl-space-2) !important;
    border-color: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .mini-charts-header h2 {
    margin-bottom: 6px !important;
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .mini-charts-header p {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .mini-charts-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    column-gap: 12px !important;
    row-gap: 12px !important;
    align-items: stretch !important;
    justify-items: stretch !important;
}

body #dashboard.dashboard-overview .mini-chart-card,
body #dashboard.dashboard-overview .mini-chart-card.customer-type {
    position: relative !important;
    isolation: isolate;
    grid-column: auto !important;
    justify-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 300px !important;
    height: 100% !important;
    padding: 16px !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .mini-chart-card::before,
body #dashboard.dashboard-overview .mini-chart-card::after {
    content: none !important;
    display: none !important;
}

body #dashboard.dashboard-overview .mini-chart-card:hover,
body #dashboard.dashboard-overview .mini-chart-card:focus-within {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .mini-chart-card-head {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 52px !important;
    margin-bottom: 12px !important;
}

body #dashboard.dashboard-overview .mini-chart-icon,
body #dashboard.dashboard-overview .orders-status .mini-chart-icon,
body #dashboard.dashboard-overview .monthly-profit .mini-chart-icon,
body #dashboard.dashboard-overview .customer-type .mini-chart-icon {
    width: 40px !important;
    height: 40px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .mini-chart-icon i {
    color: inherit !important;
}

body #dashboard.dashboard-overview .mini-chart-card h3 {
    margin-bottom: 4px !important;
    color: var(--smpl-ink) !important;
    font: 700 14px/1.25 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
}

body #dashboard.dashboard-overview .mini-chart-card-head p {
    min-height: 28px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.01em !important;
}

body #dashboard.dashboard-overview .mini-chart-body {
    min-width: 0 !important;
    min-height: 178px !important;
    grid-template-rows: auto minmax(112px, 1fr) !important;
    gap: 12px !important;
}

body #dashboard.dashboard-overview .mini-value-strip {
    gap: 6px !important;
}

body #dashboard.dashboard-overview .mini-value-item {
    min-height: 56px !important;
    gap: 4px !important;
    padding: 8px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .mini-value-item small {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
}

body #dashboard.dashboard-overview .mini-value-item strong {
    color: var(--smpl-ink) !important;
    font: 700 13px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .mini-chart-svg {
    width: 100% !important;
    max-width: 100% !important;
    height: 112px !important;
    overflow: visible !important;
}

body #dashboard.dashboard-overview .mini-chart-line {
    stroke: var(--smpl-ink) !important;
    filter: none !important;
}

body #dashboard.dashboard-overview .mini-chart-area {
    fill: var(--smpl-ink) !important;
    opacity: 0.06 !important;
}

body #dashboard.dashboard-overview .mini-chart-point {
    fill: var(--smpl-ink) !important;
    stroke: var(--smpl-paper) !important;
    filter: none !important;
}

body #dashboard.dashboard-overview .revenue-trend .mini-chart-line {
    stroke: #68686D !important;
    stroke-width: 2.5px !important;
}

body #dashboard.dashboard-overview .revenue-trend .mini-chart-area {
    fill: var(--smpl-soft) !important;
    opacity: 0.18 !important;
}

body #dashboard.dashboard-overview .revenue-trend .mini-chart-point {
    fill: var(--smpl-paper) !important;
    stroke: #68686D !important;
    stroke-width: 2px !important;
}

body #dashboard.dashboard-overview .mini-chart-column {
    filter: none !important;
}

body #dashboard.dashboard-overview .mini-chart-point-group:hover .mini-chart-point,
body #dashboard.dashboard-overview .mini-chart-column-group:hover .mini-chart-column {
    filter: none !important;
}

body #dashboard.dashboard-overview .mini-chart-baseline {
    stroke: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .mini-chart-x-label,
body #dashboard.dashboard-overview .mini-bar-label,
body #dashboard.dashboard-overview .mini-donut-legend span {
    color: var(--smpl-text-muted) !important;
    fill: var(--smpl-text-muted) !important;
    font-family: var(--smpl-font-mono) !important;
    font-weight: 700 !important;
}

body #dashboard.dashboard-overview .mini-bars {
    min-height: 112px !important;
    gap: 9px !important;
    overflow: visible !important;
}

body #dashboard.dashboard-overview .mini-bar-row {
    grid-template-columns: minmax(90px, 0.9fr) minmax(44px, 1fr) minmax(28px, auto) !important;
    gap: 8px !important;
}

body #dashboard.dashboard-overview .mini-bar-label {
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .mini-bar-track {
    height: 8px !important;
    background: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .mini-bar-fill {
    background: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .mini-bar-row:nth-child(2) .mini-bar-fill { opacity: 0.72 !important; }
body #dashboard.dashboard-overview .mini-bar-row:nth-child(3) .mini-bar-fill { opacity: 0.52 !important; }
body #dashboard.dashboard-overview .mini-bar-row:nth-child(4) .mini-bar-fill { opacity: 0.36 !important; }
body #dashboard.dashboard-overview .mini-bar-row:nth-child(n + 5) .mini-bar-fill { opacity: 0.24 !important; }

body #dashboard.dashboard-overview .mini-bar-row strong,
body #dashboard.dashboard-overview .mini-donut span,
body #dashboard.dashboard-overview .mini-donut-legend strong {
    color: var(--smpl-ink) !important;
    font-family: var(--smpl-font-ui) !important;
    font-weight: 700 !important;
}

body #dashboard.dashboard-overview .mini-donut-wrap,
body #dashboard.dashboard-overview .customer-type .mini-donut-wrap {
    grid-template-columns: 88px minmax(0, 1fr) !important;
    gap: 14px !important;
    min-height: 112px !important;
}

body #dashboard.dashboard-overview .mini-donut {
    width: 88px !important;
    height: 88px !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .mini-donut::after {
    background: var(--smpl-paper) !important;
    box-shadow: inset 0 0 0 1px var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .mini-donut-legend i {
    border-radius: 2px !important;
}

body #dashboard.dashboard-overview .mini-svg-tooltip rect,
body #dashboard.dashboard-overview .mini-bar-row::before,
body #dashboard.dashboard-overview .mini-donut-legend span::before {
    color: var(--smpl-paper) !important;
    fill: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .mini-chart-empty {
    min-height: 112px !important;
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .mini-chart-empty i {
    color: var(--smpl-ink) !important;
}

@media (max-width: 1280px) {
    body #dashboard.dashboard-overview .mini-charts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    body #dashboard.dashboard-overview .mini-charts-panel {
        padding: var(--smpl-space-2) !important;
    }

    body #dashboard.dashboard-overview .mini-charts-grid {
        grid-template-columns: 1fr !important;
    }

    body #dashboard.dashboard-overview .mini-chart-card,
    body #dashboard.dashboard-overview .mini-chart-card.customer-type {
        min-height: 286px !important;
        padding: 14px !important;
    }
}

/* Orders overview: SMPLFix operational summary. */
body #dashboard.dashboard-overview .orders-overview-panel {
    margin-bottom: var(--smpl-space-4) !important;
    padding: clamp(20px, 2vw, 28px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .orders-overview-head {
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .orders-overview-head h2 {
    margin-bottom: 6px !important;
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .orders-overview-head p {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-overview-total {
    min-height: 34px !important;
    padding: 8px 12px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    font: 700 10px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .orders-overview-grid {
    gap: 12px !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-tile {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 116px !important;
    padding: 16px 104px 16px 16px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-tile::before {
    content: none !important;
    display: none !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-tile:hover,
body #dashboard.dashboard-overview .orders-overview-metric-tile:focus-within,
body #dashboard.dashboard-overview .orders-overview-detail-card:hover,
body #dashboard.dashboard-overview .orders-overview-detail-card:focus-within {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-icon,
body #dashboard.dashboard-overview .orders-overview-metric-tile.total .orders-overview-metric-icon,
body #dashboard.dashboard-overview .orders-overview-metric-tile.active .orders-overview-metric-icon,
body #dashboard.dashboard-overview .orders-overview-metric-tile.completed .orders-overview-metric-icon,
body #dashboard.dashboard-overview .orders-overview-metric-tile.priority .orders-overview-metric-icon {
    width: 42px !important;
    height: 42px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-tile:hover .orders-overview-metric-icon {
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-copy small {
    margin-bottom: 6px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .orders-overview-metric-copy strong {
    margin-bottom: 10px !important;
    color: var(--smpl-ink) !important;
    font: 700 26px/1 var(--smpl-font-ui) !important;
    letter-spacing: -0.03em !important;
}

body #dashboard.dashboard-overview .orders-overview-delta {
    color: #4F4F54 !important;
    font: 600 10px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-overview-delta.down {
    color: var(--smpl-danger) !important;
}

body #dashboard.dashboard-overview .orders-overview-sparkline {
    opacity: 1 !important;
}

body #dashboard.dashboard-overview .orders-overview-sparkline polyline {
    stroke: #68686D !important;
    stroke-width: 2.25px !important;
    filter: none !important;
}

body #dashboard.dashboard-overview .orders-overview-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body #dashboard.dashboard-overview .orders-overview-detail-card,
body #dashboard.dashboard-overview .orders-priority-card,
body #dashboard.dashboard-overview .orders-weekly-card,
body #dashboard.dashboard-overview .orders-recent-priority-card,
body #dashboard.dashboard-overview .orders-trend-card {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 300px !important;
    padding: 16px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .orders-detail-head {
    min-height: 34px !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .orders-detail-head h3 {
    color: var(--smpl-ink) !important;
    font: 700 14px/1.25 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em !important;
}

body #dashboard.dashboard-overview .orders-detail-head h3 span {
    margin-left: 4px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .orders-detail-head button {
    min-height: 32px !important;
    padding: 6px 8px !important;
    color: var(--smpl-ink) !important;
    border-radius: 6px !important;
    background: transparent !important;
    font: 600 11px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-detail-head button:hover,
body #dashboard.dashboard-overview .orders-detail-head button:focus-visible {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
    text-decoration: none !important;
}

body #dashboard.dashboard-overview .orders-status-distribution-body {
    grid-template-columns: 132px minmax(0, 1fr) !important;
    gap: 18px !important;
}

body #dashboard.dashboard-overview .orders-status-donut {
    width: 132px !important;
    filter: grayscale(1) !important;
}

body #dashboard.dashboard-overview .orders-status-donut::before {
    inset: 21px !important;
    background: var(--smpl-paper) !important;
    box-shadow: inset 0 0 0 1px var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .orders-status-donut strong {
    color: var(--smpl-ink) !important;
    font: 700 25px/1 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-status-donut span,
body #dashboard.dashboard-overview .orders-status-legend-row {
    color: var(--smpl-text-muted) !important;
    font-family: var(--smpl-font-mono) !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .orders-status-legend-row i {
    filter: grayscale(1) !important;
}

body #dashboard.dashboard-overview .orders-status-legend-row strong {
    color: var(--smpl-ink) !important;
    font-family: var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-flow-list {
    gap: 8px !important;
}

body #dashboard.dashboard-overview .orders-flow-step {
    min-height: 46px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .orders-flow-step:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-paper) !important;
}

body #dashboard.dashboard-overview .orders-flow-step span,
body #dashboard.dashboard-overview .orders-flow-step i,
body #dashboard.dashboard-overview .orders-flow-step strong,
body #dashboard.dashboard-overview .orders-flow-arrow {
    color: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .orders-flow-step span {
    font: 600 12px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-flow-step strong {
    font: 700 18px/1 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-flow-arrow {
    opacity: 0.5 !important;
}

body #dashboard.dashboard-overview .orders-flow-footer,
body #dashboard.dashboard-overview .orders-overview-muted {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .orders-flow-footer strong {
    color: var(--smpl-ink) !important;
    font-family: var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-trend-summary {
    gap: 8px !important;
    margin-bottom: 10px !important;
}

body #dashboard.dashboard-overview .orders-trend-summary span {
    min-height: 54px !important;
    padding: 8px 10px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .orders-trend-summary small {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .orders-trend-summary strong {
    color: var(--smpl-ink) !important;
    font: 700 16px/1 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-trend-plot {
    min-height: 200px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #dashboard.dashboard-overview .orders-trend-plot::before {
    content: none !important;
    display: none !important;
}

body #dashboard.dashboard-overview .orders-inline-grid-line {
    display: block !important;
    stroke: var(--smpl-line) !important;
    stroke-dasharray: 3 6 !important;
}

body #dashboard.dashboard-overview .orders-inline-bar {
    fill: var(--smpl-ink) !important;
    filter: none !important;
}

body #dashboard.dashboard-overview .orders-inline-bar.is-empty {
    fill: var(--smpl-soft) !important;
    opacity: 0.5 !important;
}

body #dashboard.dashboard-overview .orders-inline-bar-group:hover .orders-inline-bar-hit {
    fill: rgba(11, 11, 12, 0.05) !important;
}

body #dashboard.dashboard-overview .orders-trend-axis-labels,
body #dashboard.dashboard-overview .orders-inline-trend-empty {
    color: var(--smpl-text-muted) !important;
    font-family: var(--smpl-font-mono) !important;
}

body #dashboard.dashboard-overview .orders-priority-list {
    gap: 18px !important;
}

body #dashboard.dashboard-overview .orders-priority-row {
    color: var(--smpl-ink) !important;
    font: 600 11px/1.3 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-priority-track,
body #dashboard.dashboard-overview .orders-priority-row:hover .orders-priority-track {
    height: 8px !important;
    background: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .orders-priority-row strong {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
}

body #dashboard.dashboard-overview .orders-weekly-bars {
    min-height: 184px !important;
}

body #dashboard.dashboard-overview .orders-weekly-bar span {
    border-radius: 5px 5px 2px 2px !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .orders-weekly-bar:nth-child(2n) span { opacity: 0.76 !important; }
body #dashboard.dashboard-overview .orders-weekly-bar:nth-child(3n) span { opacity: 0.56 !important; }

body #dashboard.dashboard-overview .orders-weekly-bar:hover span {
    filter: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .orders-weekly-bar strong,
body #dashboard.dashboard-overview .orders-weekly-bar small {
    color: var(--smpl-text-muted) !important;
    font-family: var(--smpl-font-mono) !important;
    font-weight: 700 !important;
}

body #dashboard.dashboard-overview .orders-recent-list {
    gap: 0 !important;
}

body #dashboard.dashboard-overview .orders-recent-row {
    min-height: 44px !important;
    padding: 8px !important;
    color: var(--smpl-text-muted) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    font: 600 11px/1.3 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .orders-recent-row:last-child {
    border-bottom: 0 !important;
}

body #dashboard.dashboard-overview .orders-recent-row:hover {
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .orders-recent-alert {
    color: var(--smpl-danger) !important;
}

body #dashboard.dashboard-overview .orders-recent-row strong {
    color: var(--smpl-ink) !important;
    font-family: var(--smpl-font-mono) !important;
}

body #dashboard.dashboard-overview .orders-recent-row small,
body #dashboard.dashboard-overview .orders-recent-empty {
    color: var(--smpl-text-muted) !important;
    font-family: var(--smpl-font-mono) !important;
}

@media (max-width: 1280px) {
    body #dashboard.dashboard-overview .orders-overview-metric-row,
    body #dashboard.dashboard-overview .orders-overview-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body #dashboard.dashboard-overview .orders-trend-card,
    body #dashboard.dashboard-overview .orders-recent-priority-card {
        grid-column: span 2 !important;
    }
}

@media (max-width: 768px) {
    body #dashboard.dashboard-overview .orders-overview-metric-row,
    body #dashboard.dashboard-overview .orders-overview-detail-grid {
        grid-template-columns: 1fr !important;
    }

    body #dashboard.dashboard-overview .orders-trend-card,
    body #dashboard.dashboard-overview .orders-recent-priority-card {
        grid-column: auto !important;
    }

    body #dashboard.dashboard-overview .orders-overview-detail-card,
    body #dashboard.dashboard-overview .orders-priority-card,
    body #dashboard.dashboard-overview .orders-weekly-card,
    body #dashboard.dashboard-overview .orders-recent-priority-card,
    body #dashboard.dashboard-overview .orders-trend-card {
        min-height: 0 !important;
    }
}

@media (max-width: 480px) {
    body #dashboard.dashboard-overview .orders-overview-panel {
        padding: 16px !important;
    }

    body #dashboard.dashboard-overview .orders-overview-metric-tile {
        padding: 14px 100px 14px 14px !important;
    }

    body #dashboard.dashboard-overview .orders-status-distribution-body {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
    }

    body #dashboard.dashboard-overview .orders-status-legend {
        width: 100% !important;
    }

    body #dashboard.dashboard-overview .orders-recent-row {
        grid-template-columns: 18px minmax(80px, 0.8fr) minmax(0, 1fr) 46px !important;
        gap: 6px !important;
    }
}

/* Category overview: monochrome SMPLFix ranking cards. */
body #dashboard.dashboard-overview .service-category-panel {
    margin-bottom: var(--smpl-space-4) !important;
    padding: clamp(20px, 2vw, 28px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .service-category-head {
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .service-category-head h2 {
    margin-bottom: 6px !important;
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .service-category-head p {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .service-category-total {
    max-width: none !important;
    min-height: 34px !important;
    padding: 8px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    font: 700 10px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.02em !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .service-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
}

body #dashboard.dashboard-overview .service-category-card {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 132px !important;
    gap: 12px !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transition: border-color 0.16s ease, background-color 0.16s ease !important;
}

body #dashboard.dashboard-overview .service-category-card:hover,
body #dashboard.dashboard-overview .service-category-card:focus-within {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .service-category-rank {
    top: 12px !important;
    right: 12px !important;
    min-width: 32px !important;
    padding: 4px 7px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-paper) !important;
    font: 700 10px/1 var(--smpl-font-mono) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .service-category-card-head {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding-right: 44px !important;
}

body #dashboard.dashboard-overview .service-category-icon {
    width: 40px !important;
    height: 40px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .service-category-card h3 {
    margin-bottom: 4px !important;
    color: var(--smpl-ink) !important;
    font: 700 13px/1.25 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em !important;
}

body #dashboard.dashboard-overview .service-category-card p {
    color: var(--smpl-text-muted) !important;
    font: 600 11px/1.25 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .service-category-values {
    gap: 8px !important;
}

body #dashboard.dashboard-overview .service-category-values span {
    min-height: 48px !important;
    gap: 4px !important;
    padding: 8px 10px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .service-category-values small {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.15 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .service-category-values strong {
    color: var(--smpl-ink) !important;
    font: 700 13px/1.15 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .service-category-empty {
    min-height: 128px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .service-category-empty i {
    color: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .service-category-toggle {
    min-height: 52px !important;
    padding: 10px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .service-category-toggle:hover,
body #dashboard.dashboard-overview .service-category-toggle:focus-visible {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .service-category-toggle span {
    color: inherit !important;
    font: 600 12px/1.25 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .service-category-toggle small {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .service-category-toggle:hover small,
body #dashboard.dashboard-overview .service-category-toggle:focus-visible small {
    color: var(--smpl-soft) !important;
}

body #dashboard.dashboard-overview .service-category-toggle i {
    color: inherit !important;
}

@media (max-width: 1024px) {
    body #dashboard.dashboard-overview .service-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    body #dashboard.dashboard-overview .service-category-panel {
        padding: 16px !important;
    }

    body #dashboard.dashboard-overview .service-category-head {
        display: grid !important;
        gap: 10px !important;
    }

    body #dashboard.dashboard-overview .service-category-total {
        justify-self: start !important;
    }

    body #dashboard.dashboard-overview .service-category-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Revenue overview: SMPLFix monochrome performance chart. */
body #dashboard.dashboard-overview .revenue-overview-card.dashboard-overview-panel {
    margin-bottom: var(--smpl-space-4) !important;
    padding: clamp(20px, 2vw, 28px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-overview-header {
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .revenue-overview-title-block {
    gap: 12px !important;
}

body #dashboard.dashboard-overview .revenue-overview-icon {
    width: 40px !important;
    height: 40px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-overview-title-copy h3 {
    margin-bottom: 4px !important;
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .revenue-overview-title-copy p {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .revenue-overview-filter select {
    min-width: 156px !important;
    height: 42px !important;
    padding: 0 38px 0 14px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 600 12px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .revenue-overview-filter select:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .revenue-overview-filter select:focus,
body #dashboard.dashboard-overview .revenue-overview-filter select:focus-visible {
    border-color: var(--smpl-ink) !important;
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-overview-filter i {
    color: var(--smpl-mute) !important;
}

body #dashboard.dashboard-overview .revenue-overview-stats {
    gap: 8px !important;
    margin-bottom: 12px !important;
}

body #dashboard.dashboard-overview .revenue-overview-stat {
    min-height: 58px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-overview-stat-label {
    margin-bottom: 5px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.15 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .revenue-overview-stat strong {
    color: var(--smpl-ink) !important;
    font: 700 17px/1.1 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em !important;
}

body #dashboard.dashboard-overview .revenue-overview-chart,
body #dashboard.dashboard-overview #revenueOverviewChart {
    min-height: 272px !important;
    padding: 8px 10px 4px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .revenue-overview-chart::before {
    content: none !important;
    display: none !important;
}

body #dashboard.dashboard-overview .revenue-overview-svg {
    height: 264px !important;
}

body #dashboard.dashboard-overview .revenue-chart-html-layer,
body #dashboard.dashboard-overview .revenue-chart-hover-layer {
    inset: 8px 10px 4px !important;
}

body #dashboard.dashboard-overview .revenue-grid-line {
    stroke: var(--smpl-line) !important;
    stroke-width: 1px !important;
    stroke-dasharray: 3 7 !important;
}

body #dashboard.dashboard-overview .revenue-area-path {
    fill: var(--smpl-soft) !important;
    opacity: 0.2 !important;
}

body #dashboard.dashboard-overview .revenue-line-path {
    stroke: #68686D !important;
    stroke-width: 2.4px !important;
    vector-effect: non-scaling-stroke !important;
    filter: none !important;
}

body #dashboard.dashboard-overview .revenue-point {
    opacity: 0 !important;
}

body #dashboard.dashboard-overview .revenue-point-group:hover .revenue-point {
    opacity: 0 !important;
}

body #dashboard.dashboard-overview .revenue-point-group:hover .revenue-point-hit {
    fill: rgba(11, 11, 12, 0.05) !important;
}

body #dashboard.dashboard-overview .revenue-html-y-label,
body #dashboard.dashboard-overview .revenue-html-x-label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1 var(--smpl-font-mono) !important;
    letter-spacing: 0.01em !important;
}

body #dashboard.dashboard-overview .revenue-html-point::before {
    inset: 10px !important;
    background: var(--smpl-paper) !important;
    opacity: 1 !important;
    box-shadow: 0 0 0 2px #68686D !important;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
}

body #dashboard.dashboard-overview .revenue-html-point:hover::before {
    background: var(--smpl-ink) !important;
    box-shadow: 0 0 0 2px var(--smpl-paper), 0 0 0 3px var(--smpl-ink) !important;
    transform: scale(1.25) !important;
}

body #dashboard.dashboard-overview .revenue-html-tooltip {
    color: var(--smpl-soft) !important;
    border: 1px solid #252527 !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-ink) !important;
    box-shadow: var(--smpl-shadow) !important;
}

body #dashboard.dashboard-overview .revenue-html-tooltip small {
    color: var(--smpl-soft) !important;
    font-family: var(--smpl-font-mono) !important;
    font-weight: 700 !important;
}

body #dashboard.dashboard-overview .revenue-html-tooltip strong {
    color: var(--smpl-paper) !important;
    font-family: var(--smpl-font-ui) !important;
    font-weight: 700 !important;
}

body #dashboard.dashboard-overview .revenue-overview-empty {
    min-height: 256px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
}

body #dashboard.dashboard-overview .revenue-overview-empty i {
    color: var(--smpl-ink) !important;
}

@media (max-width: 720px) {
    body #dashboard.dashboard-overview .revenue-overview-card.dashboard-overview-panel {
        padding: 16px !important;
    }

    body #dashboard.dashboard-overview .revenue-overview-header {
        align-items: stretch !important;
    }

    body #dashboard.dashboard-overview .revenue-overview-filter,
    body #dashboard.dashboard-overview .revenue-overview-filter select {
        width: 100% !important;
    }

    body #dashboard.dashboard-overview .revenue-overview-stats {
        grid-template-columns: 1fr !important;
    }

    body #dashboard.dashboard-overview .revenue-overview-chart,
    body #dashboard.dashboard-overview #revenueOverviewChart,
    body #dashboard.dashboard-overview .revenue-overview-svg {
        min-height: 232px !important;
        height: 232px !important;
    }
}

/* Pipeline stage and record-card refinement. */
body #pipeline .stage-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
}

body #pipeline .stage-header .stage-title {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    gap: 8px !important;
}

body #pipeline .stage-header .stage-title h3 {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #pipeline .stage-header .stage-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
}

body #pipeline .stage-header .stage-count {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
}

body #pipeline .stage-body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: var(--smpl-soft) transparent;
}

body #pipeline .stage-body::-webkit-scrollbar {
    width: 7px;
}

body #pipeline .stage-body::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--smpl-soft);
    background-clip: padding-box;
}

body #pipeline .record-card {
    isolation: isolate;
    cursor: grab !important;
}

body #pipeline .record-card:active {
    cursor: grabbing !important;
}

body #pipeline .record-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 11px !important;
    padding-left: 2px !important;
}

body #pipeline .record-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #pipeline .record-title.record-title--order-id {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-family: var(--smpl-font-mono) !important;
    font-size: 11px !important;
    letter-spacing: -0.025em !important;
}

body #pipeline .record-actions {
    width: auto !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    opacity: 0.42;
    transition: opacity 140ms ease;
}

body #pipeline .record-card:hover .record-actions,
body #pipeline .record-card:focus-within .record-actions {
    opacity: 1;
}

body #pipeline .record-actions .icon-btn {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    min-height: 25px !important;
    padding: 0 !important;
    flex: 0 0 25px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
}

body #pipeline .record-info {
    min-width: 0 !important;
    margin: 0 0 7px !important;
    padding-left: 2px !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
}

body #pipeline .record-info > i {
    display: inline-grid !important;
    place-items: center !important;
    width: 20px !important;
    height: 20px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 5px !important;
    background: var(--smpl-surface) !important;
    font-size: 9px !important;
}

body #pipeline .record-info,
body #pipeline .record-info > :not(i) {
    overflow-wrap: anywhere;
}

body #pipeline .record-description-block {
    margin: 9px 0 0 !important;
    padding: 9px 10px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-surface) !important;
}

body #pipeline .record-description {
    color: var(--smpl-text-muted) !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
}

body #pipeline .record-description-toggle {
    color: var(--smpl-ink) !important;
    font-size: 10px !important;
    text-decoration-color: var(--smpl-soft) !important;
}

body #pipeline .record-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    justify-content: initial !important;
    gap: 6px !important;
    margin-top: 11px !important;
    padding-top: 9px !important;
}

body #pipeline .record-assignee {
    min-width: 0 !important;
    overflow: hidden !important;
    color: var(--smpl-text-muted) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #pipeline .record-time {
    align-self: center !important;
    font: 600 9px/1.3 var(--smpl-font-mono) !important;
    white-space: nowrap !important;
}

body #pipeline :where(.record-card, .new-order-card) .priority-badge {
    align-self: center !important;
    padding: 3px 7px !important;
    border-radius: 999px !important;
    font: 700 8px/1.4 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em !important;
    white-space: nowrap !important;
}

body #pipeline .stage-body > div[style*="text-align:center"] {
    display: grid !important;
    place-items: center !important;
    min-height: 112px !important;
    margin: 0 !important;
    padding: 18px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: transparent !important;
    font: 600 11px/1.5 var(--smpl-font-body) !important;
}

body #pipeline .new-order-card-head {
    margin-bottom: 9px !important;
}

body #pipeline .new-order-card-title {
    padding-right: 2px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #pipeline .new-order-card-meta {
    margin-bottom: 9px !important;
}

body #pipeline .new-order-card-row {
    min-width: 0 !important;
    margin-bottom: 7px !important;
    font-size: 11px !important;
}

body #pipeline .new-order-card-row > i {
    display: inline-grid !important;
    place-items: center !important;
    width: 20px !important;
    height: 20px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 5px !important;
    background: var(--smpl-surface) !important;
    font-size: 9px !important;
}

body #pipeline .new-order-card-row > span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #pipeline .new-order-card-foot {
    gap: 8px !important;
    padding-top: 9px !important;
}

@media (hover: none), (max-width: 720px) {
    body #pipeline .record-actions {
        opacity: 1;
    }
}

/* Quick actions: restrained SMPLFix shortcuts. */
body #dashboard.dashboard-overview .quick-actions-card {
    width: 100% !important;
    min-height: 0 !important;
    padding: clamp(20px, 2vw, 28px) !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .quick-actions-card .overview-card-head {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 24px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .overview-card-icon.quick {
    width: 52px !important;
    height: 52px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 20px !important;
}

body #dashboard.dashboard-overview .quick-actions-card .overview-card-title h3 {
    margin: 0 0 5px !important;
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .quick-actions-card .overview-card-title p {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action {
    min-width: 0 !important;
    min-height: 180px !important;
    padding: 18px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: border-color 0.16s ease, background-color 0.16s ease !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action:focus-visible {
    border-color: var(--smpl-ink) !important;
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action:active {
    background: var(--smpl-line) !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action > i,
body #dashboard.dashboard-overview .quick-actions-card .quick-action:nth-child(2) > i,
body #dashboard.dashboard-overview .quick-actions-card .quick-action:nth-child(3) > i,
body #dashboard.dashboard-overview .quick-actions-card .quick-action:hover > i {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 24px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 19px !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action span {
    margin-bottom: 7px !important;
    color: var(--smpl-ink) !important;
    font: 700 14px/1.25 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action small {
    max-width: 24ch !important;
    color: var(--smpl-text-muted) !important;
    font: 500 12px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .quick-action::after,
body #dashboard.dashboard-overview .quick-actions-card .quick-action:hover::after {
    right: 18px !important;
    bottom: 18px !important;
    color: var(--smpl-ink) !important;
    opacity: 1 !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions {
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions summary {
    min-height: 72px !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    color: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions summary:hover {
    background: var(--smpl-paper) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions summary:focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: -3px !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions-icon {
    width: 46px !important;
    height: 46px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 17px !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions-text strong {
    margin-bottom: 4px !important;
    color: var(--smpl-ink) !important;
    font: 700 14px/1.25 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions-text small {
    color: var(--smpl-text-muted) !important;
    font: 500 12px/1.4 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions summary > i {
    color: var(--smpl-mute) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 16px 16px !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions-list button {
    min-height: 42px !important;
    padding: 9px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 600 11px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions-list button:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .quick-actions-card .more-actions-list button:focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

@media (max-width: 640px) {
    body #dashboard.dashboard-overview .quick-actions-card {
        padding: 16px !important;
    }

    body #dashboard.dashboard-overview .quick-actions-card .overview-card-head {
        grid-template-columns: 46px minmax(0, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 18px !important;
        padding-bottom: 16px !important;
    }

    body #dashboard.dashboard-overview .quick-actions-card .overview-card-icon.quick {
        width: 46px !important;
        height: 46px !important;
    }

    body #dashboard.dashboard-overview .quick-actions-card .quick-actions,
    body #dashboard.dashboard-overview .quick-actions-card .more-actions-list {
        grid-template-columns: 1fr !important;
    }

    body #dashboard.dashboard-overview .quick-actions-card .quick-action {
        min-height: 152px !important;
    }
}

/* Leaderboard and vendor categories: paired SMPLFix summary cards. */
body #dashboard.dashboard-overview .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
    margin-bottom: var(--smpl-space-4) !important;
}

body #dashboard.dashboard-overview .summary-card.leaderboard-card,
body #dashboard.dashboard-overview .summary-card.vendor-categories-card {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    padding: clamp(20px, 2vw, 28px) !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .summary-card.leaderboard-card:hover,
body #dashboard.dashboard-overview .summary-card.vendor-categories-card:hover {
    border-color: var(--smpl-line) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .summary-card-head {
    grid-template-columns: 52px minmax(0, 1fr) auto !important;
    gap: 14px !important;
    margin-bottom: 20px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .summary-card-icon,
body #dashboard.dashboard-overview .summary-card-icon.leaderboard,
body #dashboard.dashboard-overview .summary-card-icon.vendors {
    width: 52px !important;
    height: 52px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 19px !important;
}

body #dashboard.dashboard-overview .summary-card-icon i,
body #dashboard.dashboard-overview .summary-card-icon.leaderboard i,
body #dashboard.dashboard-overview .summary-card-icon.vendors i {
    color: inherit !important;
}

body #dashboard.dashboard-overview .summary-card-title h3 {
    margin: 0 0 5px !important;
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .summary-card-title p {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .summary-card-link {
    min-height: 40px !important;
    padding: 9px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 600 11px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .summary-card-link:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .summary-card-link:focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

body #dashboard.dashboard-overview .leaderboard-list {
    gap: 10px !important;
}

body #dashboard.dashboard-overview .leaderboard-item,
body #dashboard.dashboard-overview .leaderboard-item.rank-1,
body #dashboard.dashboard-overview .leaderboard-item.rank-2,
body #dashboard.dashboard-overview .leaderboard-item.rank-3 {
    min-height: 72px !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .leaderboard-item.rank-1 {
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .leaderboard-item:hover,
body #dashboard.dashboard-overview .leaderboard-item.rank-1:hover,
body #dashboard.dashboard-overview .leaderboard-item.rank-2:hover,
body #dashboard.dashboard-overview .leaderboard-item.rank-3:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .leaderboard-item .rank,
body #dashboard.dashboard-overview .leaderboard-item.rank-1 .rank,
body #dashboard.dashboard-overview .leaderboard-item.rank-2 .rank,
body #dashboard.dashboard-overview .leaderboard-item.rank-3 .rank {
    width: 36px !important;
    height: 36px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 700 11px/1 var(--smpl-font-mono) !important;
}

body #dashboard.dashboard-overview .leaderboard-item .employee-name,
body #dashboard.dashboard-overview .leaderboard-item.rank-1 .employee-name {
    color: var(--smpl-ink) !important;
    font: 700 14px/1.25 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .leaderboard-item.rank-1 .employee-name::before {
    content: none !important;
    display: none !important;
}

body #dashboard.dashboard-overview .leaderboard-item .order-count,
body #dashboard.dashboard-overview .leaderboard-item.rank-1 .order-count {
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.02em !important;
}

body #dashboard.dashboard-overview .top-performer {
    gap: 5px !important;
    padding: 4px 8px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-paper) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .revenue-label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .leaderboard-item .revenue-amount,
body #dashboard.dashboard-overview .leaderboard-item.rank-1 .revenue-amount,
body #dashboard.dashboard-overview .leaderboard-item.rank-3 .revenue-amount {
    color: var(--smpl-ink) !important;
    font: 700 17px/1.1 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .leaderboard-footer {
    min-height: 48px !important;
    margin-top: auto !important;
    padding: 12px 14px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #dashboard.dashboard-overview .leaderboard-footer span,
body #dashboard.dashboard-overview .leaderboard-footer span i {
    color: var(--smpl-text-muted) !important;
    font: 600 11px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .leaderboard-footer button,
body #dashboard.dashboard-overview .leaderboard-footer button:hover {
    min-height: 32px !important;
    padding: 6px 8px !important;
    color: var(--smpl-ink) !important;
    border-radius: 6px !important;
    background: transparent !important;
    font: 600 11px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .leaderboard-footer button:hover {
    background: var(--smpl-paper) !important;
}

body #dashboard.dashboard-overview .leaderboard-footer button:focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

body #dashboard.dashboard-overview .leaderboard-empty {
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .leaderboard-empty i,
body #dashboard.dashboard-overview .leaderboard-empty p {
    color: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .vendor-categories-card .vendor-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

body #dashboard.dashboard-overview .vendor-categories-card .vendor-category {
    min-width: 0 !important;
    min-height: 82px !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .vendor-categories-card .vendor-category:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .vendor-categories-card .vc-icon,
body #dashboard.dashboard-overview .vendor-categories-card .vendor-category.electrical .vc-icon,
body #dashboard.dashboard-overview .vendor-categories-card .vendor-category.plumbing .vc-icon,
body #dashboard.dashboard-overview .vendor-categories-card .vendor-category.civil .vc-icon,
body #dashboard.dashboard-overview .vendor-categories-card .vendor-category.carpentry .vc-icon {
    width: 46px !important;
    height: 46px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .vendor-categories-card .vc-label {
    color: var(--smpl-ink) !important;
    font: 700 14px/1.25 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .vendor-categories-card .vc-meta {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .vendor-categories-card .category-count {
    min-width: 38px !important;
    padding: 7px 9px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 700 13px/1 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .vendor-total-panel {
    min-height: 70px !important;
    gap: 12px !important;
    margin-top: auto !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .vendor-total-icon {
    width: 46px !important;
    height: 46px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .vendor-total-value {
    color: var(--smpl-ink) !important;
    font: 700 26px/1 var(--smpl-font-ui) !important;
    letter-spacing: -0.03em !important;
}

body #dashboard.dashboard-overview .vendor-total-label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

@media (max-width: 900px) {
    body #dashboard.dashboard-overview .summary-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    body #dashboard.dashboard-overview .summary-card.leaderboard-card,
    body #dashboard.dashboard-overview .summary-card.vendor-categories-card {
        padding: 16px !important;
    }

    body #dashboard.dashboard-overview .summary-card-head {
        grid-template-columns: 46px minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    body #dashboard.dashboard-overview .summary-card-link {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }

    body #dashboard.dashboard-overview .vendor-categories-card .vendor-categories {
        grid-template-columns: 1fr !important;
    }
}

/* Top customers: monochrome SMPLFix ranking report. */
body #dashboard.dashboard-overview .top-customers-report.dashboard-overview-panel {
    margin-bottom: var(--smpl-space-4) !important;
    padding: clamp(20px, 2vw, 28px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customers-header {
    align-items: center !important;
    gap: 16px 24px !important;
    margin-bottom: 20px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .top-customers-title-block {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 14px !important;
}

body #dashboard.dashboard-overview .top-customers-title-icon {
    width: 52px !important;
    height: 52px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 19px !important;
}

body #dashboard.dashboard-overview .top-customers-title-block h3 {
    margin-bottom: 5px !important;
    color: var(--smpl-ink) !important;
    font: 700 20px/1.2 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

body #dashboard.dashboard-overview .top-customers-title-block p {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.45 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter {
    gap: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .date-input {
    min-width: 154px !important;
    min-height: 42px !important;
    padding: 9px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font: 600 12px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .date-input:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .date-input:focus,
body #dashboard.dashboard-overview .top-customers-date-filter .date-input:focus-visible {
    border-color: var(--smpl-ink) !important;
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customers-date-sep {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .btn-filter {
    min-height: 42px !important;
    padding: 9px 14px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 600 11px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .btn-filter:hover {
    color: var(--smpl-paper) !important;
    background: #252527 !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .btn-filter:focus-visible,
body #dashboard.dashboard-overview .top-customers-date-filter .btn-reset:focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .btn-reset {
    width: 42px !important;
    height: 42px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customers-date-filter .btn-reset:hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .top-customers-grid {
    gap: 16px !important;
}

body #dashboard.dashboard-overview .top-customers-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body #dashboard.dashboard-overview .top-customers-summary-item {
    min-width: 0 !important;
    min-height: 108px !important;
    gap: 8px 12px !important;
    padding: 16px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customers-summary-item .summary-icon {
    width: 46px !important;
    height: 46px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 17px !important;
}

body #dashboard.dashboard-overview .top-customers-summary-item .summary-label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .top-customers-summary-item strong {
    color: var(--smpl-ink) !important;
    font: 700 22px/1 var(--smpl-font-ui) !important;
    letter-spacing: -0.03em !important;
}

body #dashboard.dashboard-overview .top-customers-summary-item small {
    color: var(--smpl-text-muted) !important;
    font: 500 11px/1.3 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .top-customers-list {
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customer-card {
    grid-template-columns: 42px minmax(220px, 1fr) minmax(280px, 0.78fr) 20px !important;
    gap: 18px !important;
    min-height: 100px !important;
    padding: 16px 20px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .top-customer-card:last-child {
    border-bottom: 0 !important;
}

body #dashboard.dashboard-overview .top-customer-card::before {
    content: none !important;
    display: none !important;
}

body #dashboard.dashboard-overview .top-customer-card:hover {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .top-customer-rank,
body #dashboard.dashboard-overview .top-customer-rank.rank-1,
body #dashboard.dashboard-overview .top-customer-rank.rank-2,
body #dashboard.dashboard-overview .top-customer-rank.rank-3 {
    width: 42px !important;
    height: 42px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 700 13px/1 var(--smpl-font-mono) !important;
}

body #dashboard.dashboard-overview .top-customer-card:first-child .top-customer-rank {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .top-customer-name {
    margin-bottom: 6px !important;
    color: var(--smpl-ink) !important;
    font: 700 14px/1.25 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .top-customer-email {
    color: var(--smpl-text-muted) !important;
    font: 500 11px/1.3 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .top-customer-email i {
    color: var(--smpl-mute) !important;
}

body #dashboard.dashboard-overview .top-customer-badge {
    margin-top: 8px !important;
    padding: 4px 8px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview .top-customer-stats {
    gap: 12px !important;
}

body #dashboard.dashboard-overview .top-customer-stat {
    min-height: 64px !important;
    padding: 12px 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customer-stat-label {
    margin-bottom: 6px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
}

body #dashboard.dashboard-overview .top-customer-stat-value,
body #dashboard.dashboard-overview .top-customer-stat-value.revenue {
    color: var(--smpl-ink) !important;
    font: 700 17px/1.1 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em !important;
}

body #dashboard.dashboard-overview .top-customer-stat-icon {
    width: 34px !important;
    height: 34px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .top-customer-chevron {
    color: var(--smpl-mute) !important;
}

body #dashboard.dashboard-overview .top-customers-actions {
    justify-content: center !important;
}

body #dashboard.dashboard-overview .top-customers-toggle {
    min-width: 220px !important;
    min-height: 42px !important;
    padding: 9px 14px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 600 11px/1.2 var(--smpl-font-ui) !important;
}

body #dashboard.dashboard-overview .top-customers-toggle:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview .top-customers-toggle:focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

body #dashboard.dashboard-overview .top-customers-empty {
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
}

body #dashboard.dashboard-overview .top-customers-empty i,
body #dashboard.dashboard-overview .top-customers-empty h3 {
    color: var(--smpl-ink) !important;
}

@media (max-width: 1000px) {
    body #dashboard.dashboard-overview .top-customers-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body #dashboard.dashboard-overview .top-customer-card {
        grid-template-columns: 42px minmax(0, 1fr) !important;
    }

    body #dashboard.dashboard-overview .top-customer-stats {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 720px) {
    body #dashboard.dashboard-overview .top-customers-report.dashboard-overview-panel {
        padding: 16px !important;
    }

    body #dashboard.dashboard-overview .top-customers-header {
        align-items: stretch !important;
    }

    body #dashboard.dashboard-overview .top-customers-date-filter {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    body #dashboard.dashboard-overview .top-customers-date-filter .date-input,
    body #dashboard.dashboard-overview .top-customers-date-filter .btn-filter,
    body #dashboard.dashboard-overview .top-customers-date-filter .btn-reset {
        width: 100% !important;
        max-width: none !important;
    }

    body #dashboard.dashboard-overview .top-customers-date-sep {
        text-align: center !important;
    }

    body #dashboard.dashboard-overview .top-customers-summary,
    body #dashboard.dashboard-overview .top-customer-stats {
        grid-template-columns: 1fr !important;
    }

    body #dashboard.dashboard-overview .top-customer-card {
        gap: 12px !important;
        padding: 14px !important;
    }

    body #dashboard.dashboard-overview .top-customers-toggle {
        width: 100% !important;
        min-width: 0 !important;
    }
}

body .calendar-event,
body .calendar-event.project,
body .calendar-event.order,
body .calendar-event.order.recurring {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    border-left-color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body .project-priority.high,
body .project-priority.medium,
body .project-priority.low {
    background-image: none !important;
    box-shadow: none !important;
}

body .project-priority.high { background-color: var(--smpl-danger-bg) !important; }
body .project-priority.medium { background-color: var(--smpl-warning-bg) !important; }
body .project-priority.low { background-color: var(--smpl-success-bg) !important; }

body #pipeline .new-order-card.dragging {
    box-shadow: none !important;
    transform: scale(0.98) !important;
}

/* Keep controls usable on smaller screens without suppressing data. */
@media (max-width: 768px) {
    :where(
        .table-container,
        [class$="-table-container"],
        [class$="-table-wrap"],
        [class$="-table-wrapper"],
        .report-table-wrap
    ) {
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
    }

    :where(table) {
        min-width: max-content;
    }

    :where(.modal-content, [class$="-modal"], [class*="-modal "]) {
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.skeleton, [class*="skeleton"], .loading-spinner, .spinner, [class*="-spinner"]) {
        animation: none !important;
    }
}

/* ========================================================================== */
/* Final application-wide SMPLFix completion layer                            */
/* ========================================================================== */

/* Section framing shared by all application routes. */
.content-section,
.workflow-hub-section,
.workflow-stage-section {
    min-width: 0;
    color: var(--smpl-ink) !important;
}

:where(
    .overview-section-head,
    .kpi-board-head,
    .top-performance-head,
    .business-intelligence-head,
    .financial-header,
    .section-header,
    .card-header,
    .panel-header
) {
    border-color: var(--smpl-line) !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(
    .overview-section-title,
    .kpi-board-title,
    .top-performance-head h2,
    .business-intelligence-head h2,
    .financial-title-block h3,
    .section-header h2,
    .section-header h3
) {
    color: var(--smpl-ink) !important;
    font: 700 clamp(18px, 2vw, 22px)/1.25 var(--smpl-font-ui) !important;
    letter-spacing: -0.02em !important;
}

:where(
    .overview-section-hint,
    .kpi-board-lead,
    .top-performance-head p,
    .business-intelligence-head p,
    .financial-subtitle,
    .section-header p
) {
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.5 var(--smpl-font-ui) !important;
}

/* Remaining dashboard modules. */
body #dashboard.dashboard-overview :where(
    .kpi-board,
    .top-performance-panel,
    .business-intelligence-panel,
    .financial-overview-card
) {
    margin-bottom: var(--smpl-space-3) !important;
    padding: clamp(18px, 2vw, 24px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-board-metrics,
    .top-performance-grid,
    .business-intelligence-grid,
    .financial-grid
) {
    align-items: stretch !important;
    gap: 12px !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat,
    .top-performance-card,
    .business-intelligence-card,
    .financial-item
) {
    min-width: 0 !important;
    height: 100% !important;
    border: 1px solid var(--smpl-line) !important;
    border-left-color: var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat,
    .top-performance-card,
    .business-intelligence-card,
    .financial-item
)::before,
body #dashboard.dashboard-overview :where(
    .kpi-stat,
    .top-performance-card,
    .business-intelligence-card,
    .financial-item
)::after {
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat,
    .top-performance-card,
    .business-intelligence-card,
    .financial-item
):hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat-icon,
    .top-performance-icon,
    .financial-icon,
    .activity-icon,
    .executive-card-icon
) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat-viz,
    .top-performance-card .card-accent,
    .business-intelligence-card .card-accent
) {
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
    background: transparent !important;
    background-image: none !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat-viz svg path,
    .kpi-stat-viz svg polyline,
    .kpi-stat-viz svg line
) {
    stroke: var(--smpl-text-muted) !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-stat-viz svg polygon,
    .kpi-stat-viz svg path[fill]:not([fill="none"])
) {
    fill: var(--smpl-line) !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-label,
    .kpi-period,
    .top-performance-label,
    .financial-label,
    .financial-period-text,
    .executive-card-head span
) {
    color: var(--smpl-text-muted) !important;
    font-family: var(--smpl-font-mono) !important;
    font-weight: 700 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-value,
    .top-performance-value,
    .financial-value
) {
    color: var(--smpl-ink) !important;
    font-family: var(--smpl-font-ui) !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
}

body #dashboard.dashboard-overview :where(
    .kpi-desc,
    .top-performance-copy,
    .business-intelligence-card p,
    .activity-content p
) {
    color: var(--smpl-text-muted) !important;
}

body #dashboard.dashboard-overview .kpi-trend-pill.neutral,
body #dashboard.dashboard-overview .kpi-trend-pill.up,
body #dashboard.dashboard-overview .kpi-trend-pill.down {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #dashboard.dashboard-overview .recent-activity-card {
    height: 100% !important;
    padding: clamp(18px, 2vw, 24px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .activity-list {
    border-top: 1px solid var(--smpl-line) !important;
}

body #dashboard.dashboard-overview .activity-item {
    min-height: 64px !important;
    border-color: var(--smpl-line) !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .activity-item:hover,
body #dashboard.dashboard-overview .activity-item:focus-visible {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
    outline-color: var(--smpl-ink) !important;
}

body #dashboard.dashboard-overview .financial-date-filter {
    gap: 8px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #dashboard.dashboard-overview .financial-item :where(i, svg) {
    color: currentColor !important;
}

/* Core CRUD, finance, reporting, settings, and people pages. */
:where(
    #orders,
    #order-detail,
    #customers,
    #customer-profile,
    #vendors,
    #vendor-detail,
    #vendor-reviews,
    #vendor-review-detail,
    #employees,
    #employee-detail,
    #payments,
    #accounting,
    #reports,
    #users,
    #settings
) :where(
    .stats-card,
    .stat-card,
    .summary-card,
    .detail-card,
    .info-card,
    .form-card,
    .report-card,
    .settings-card,
    .table-card,
    .chart-card,
    .filter-card,
    .exec-overview-card,
    .exec-kpi-card
) {
    border: 1px solid var(--smpl-line) !important;
    border-left-color: var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

:where(
    #orders,
    #order-detail,
    #customers,
    #customer-profile,
    #vendors,
    #vendor-detail,
    #vendor-reviews,
    #vendor-review-detail,
    #employees,
    #employee-detail,
    #payments,
    #accounting,
    #reports,
    #users,
    #settings
) :where(.icon, [class*="-icon"]):not(.status-icon):not(.alert-icon) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background-color: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.table-container, [class*="table-wrap"], [class*="table-container"]) {
    max-width: 100%;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

:where(table) {
    width: 100%;
    border-collapse: collapse;
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

:where(thead, th) {
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

:where(tbody tr, tbody td) {
    border-color: var(--smpl-line) !important;
    background-image: none !important;
}

:where(tbody tr):hover > td {
    background: var(--smpl-surface) !important;
}

/* Pipeline, calendars, and workflow center. */
#pipeline :where(
    .pipeline-column,
    .stage-column,
    .pipeline-card,
    .new-order-card,
    .pipeline-header,
    .pipeline-toolbar
),
:where(#calendar, #recurring-calendar) :where(
    .calendar-container,
    .calendar-card,
    .calendar-day,
    .calendar-header,
    .calendar-toolbar
),
:where(.workflow-hub-section, .workflow-stage-section) :where(
    .workflow-card,
    .workflow-panel,
    .workflow-tabs,
    .workflow-stage-strip,
    .workflow-row,
    .workflow-recent-item,
    .workflow-details-disclosure,
    .workflow-intake-health,
    .workflow-intake-checklist,
    .outgoing-pricing
) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

#pipeline :where(.pipeline-column, .stage-column) {
    background: var(--smpl-surface) !important;
}

#pipeline :where(.pipeline-card, .new-order-card):hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-shadow) !important;
    transform: translateY(-1px) !important;
}

#pipeline :where(.pipeline-card, .new-order-card):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

:where(.workflow-tab)[aria-selected="true"],
:where(.workflow-tab).active {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    box-shadow: none !important;
}

:where(.workflow-tab):not([aria-selected="true"]):hover,
:where(.workflow-recent-item):hover {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

:where(.workflow-stage-step).current,
:where(.workflow-stage-step).done {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

:where(.workflow-stage-step).current::before,
:where(.workflow-stage-step).done::before,
:where(.schedule-row)::before {
    background: var(--smpl-ink) !important;
    box-shadow: 0 0 0 3px var(--smpl-line) !important;
}

:where(.workflow-empty-art) {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

:where(.workflow-empty-art) i {
    transform: none !important;
}

/* Public authentication and secure customer/vendor workflows. */
:where(
    .login-container,
    .signup-container,
    .forgot-password-container,
    .reset-password-container,
    .secure-shell,
    .onboarding-shell,
    .completion-shell,
    .quote-shell,
    .schedule-shell,
    .closeout-shell
) {
    color: var(--smpl-ink) !important;
    font-family: var(--smpl-font-ui) !important;
}

:where(
    .login-card,
    .signup-card,
    .forgot-password-card,
    .reset-password-card,
    .secure-card,
    .intro-card,
    .form-card,
    .state-card,
    .completion-card,
    .quote-card,
    .schedule-card,
    .closeout-card
) {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(
    .secure-header,
    .quote-header,
    .quote-public-header,
    .onboarding-header,
    .completion-header,
    .schedule-header,
    .closeout-header
) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.brand-mark, .section-heading > span, .step-number, .wizard-step.active) {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.invite-summary, .privacy-note, .existing-documents, .check-row, .upload-field, .workflow-dialog-impact) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

:where(.upload-field) {
    border-style: dashed !important;
}

:where(.upload-field):hover,
:where(.upload-field):focus-within {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

/* Modal and overlay consistency, including dynamically injected dialogs. */
:where(.modal, .modal-overlay, .workflow-dialog, [role="dialog"]) {
    scrollbar-gutter: stable;
}

:where(.modal-overlay, .workflow-dialog-backdrop, .confirm-modal-overlay) {
    background: var(--smpl-overlay) !important;
    backdrop-filter: none !important;
}

:where(.modal-content, .workflow-dialog-panel, .confirm-modal, [role="dialog"]) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: var(--smpl-shadow) !important;
}

:where(.modal-header, .modal-footer, .workflow-dialog-actions) {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
}

/* Inline legacy color declarations are neutralized without changing handlers. */
#employeeTotalOrders,
#employeeActiveOrders,
#employeeCompletedOrders,
#employeeTotalRevenue,
#employeeTotalProfit,
#pipelineTotalRecords {
    color: var(--smpl-ink) !important;
}

/* Responsive completion. */
@media (max-width: 1024px) {
    body #dashboard.dashboard-overview :where(
        .kpi-board-metrics,
        .top-performance-grid,
        .business-intelligence-grid,
        .financial-grid
    ) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    :where(.page-header, .reports-header, .financial-header, .top-performance-head) {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .content-section {
        min-width: 0;
    }

    :where(
        .page-header,
        .reports-header,
        .overview-section-head,
        .financial-header,
        .section-header,
        .card-header,
        .panel-header
    ) {
        align-items: stretch !important;
        gap: 12px !important;
    }

    :where(.filters, .filter-row, .toolbar, .page-actions, .header-actions, .financial-date-filter) {
        max-width: 100%;
        flex-wrap: wrap !important;
    }

    :where(.modal-content, .workflow-dialog-panel, .confirm-modal, [role="dialog"]) {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
        margin: 12px !important;
        overflow: auto !important;
    }

    :where(button, .btn, [role="button"], input, select) {
        min-height: 44px;
    }
}

@media (max-width: 560px) {
    body #dashboard.dashboard-overview :where(
        .kpi-board-metrics,
        .top-performance-grid,
        .business-intelligence-grid,
        .financial-grid
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body #dashboard.dashboard-overview :where(
        .kpi-board,
        .top-performance-panel,
        .business-intelligence-panel,
        .financial-overview-card,
        .recent-activity-card
    ) {
        padding: 16px !important;
    }

    :where(.filters, .filter-row, .toolbar, .page-actions, .header-actions, .financial-date-filter) > * {
        max-width: 100%;
    }
}

/* Order detail workspace. */
body #order-detail {
    --order-detail-max: 1440px;
}

body #order-detail .order-detail-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: end !important;
    gap: 32px !important;
    width: min(100%, var(--order-detail-max));
    margin: 0 auto 24px !important;
    padding: 0 !important;
    color: var(--smpl-ink) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #order-detail .order-detail-header::before,
body #order-detail .order-detail-header::after {
    content: none !important;
    display: none !important;
}

body #order-detail .order-detail-header-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 14px !important;
    min-width: 0;
}

body #order-detail .order-detail-back-btn,
body #order-detail .order-detail-edit-btn,
body #order-detail .order-detail-delete-btn {
    min-height: 42px !important;
    padding: 9px 14px !important;
    gap: 8px !important;
    font: 600 13px/1.2 var(--smpl-font-ui) !important;
    border-radius: var(--smpl-radius-sm) !important;
    box-shadow: none !important;
}

body #order-detail .order-detail-back-btn {
    width: fit-content;
    min-height: 30px !important;
    padding: 3px 2px !important;
    color: var(--smpl-ink) !important;
    border-color: transparent !important;
    background: transparent !important;
}

body #order-detail .order-detail-back-btn:hover {
    color: var(--smpl-text-muted) !important;
    border-color: transparent !important;
    background: transparent !important;
}

body #order-detail .order-detail-edit-btn:hover {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

body #order-detail .order-detail-heading-copy {
    min-width: 0;
}

body #order-detail .order-detail-eyebrow {
    display: block !important;
    margin: 0 0 5px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.4 var(--smpl-font-mono) !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

body #order-detail .order-detail-header h1 {
    overflow: hidden;
    margin: 0 !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(30px, 3.2vw, 42px)/1.08 var(--smpl-font-ui) !important;
    letter-spacing: -0.045em !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body #order-detail .order-detail-header h1::before,
body #order-detail .order-detail-header h1::after {
    content: none !important;
    display: none !important;
}

body #order-detail .order-detail-heading-copy > p {
    max-width: 660px;
    margin: 8px 0 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 500 14px/1.5 var(--smpl-font-ui) !important;
}

body #order-detail .order-detail-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end;
    gap: 8px !important;
    padding-bottom: 4px;
}

body #order-detail .order-detail-delete-btn {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #order-detail .order-detail-delete-btn:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-danger) !important;
    background: var(--smpl-danger) !important;
}

body #order-detail .order-detail-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr) !important;
    grid-template-areas:
        "order order"
        "notes customer"
        "notes documents" !important;
    align-items: start !important;
    gap: 16px !important;
    width: min(100%, var(--order-detail-max));
    max-width: none !important;
    margin: 0 auto;
    padding: 0 !important;
}

body #order-detail .order-summary-card { grid-area: order; }
body #order-detail .order-customer-card { grid-area: customer; }
body #order-detail .order-notes-card { grid-area: notes; }
body #order-detail .order-documents-card { grid-area: documents; }

body #order-detail .detail-info-card {
    min-width: 0;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #order-detail .detail-info-card > h3 {
    display: flex !important;
    min-height: 54px !important;
    align-items: center !important;
    gap: 11px !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    color: var(--smpl-ink) !important;
    font: 700 15px/1.3 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #order-detail .detail-info-card > h3 i {
    display: inline-grid !important;
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px;
    place-items: center;
    color: var(--smpl-ink) !important;
    font-size: 12px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #order-detail .order-summary-card .info-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 4px 16px 16px !important;
}

body #order-detail .order-customer-card .info-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    padding: 4px 16px 12px !important;
}

body #order-detail .info-grid .info-item {
    display: flex !important;
    min-width: 0;
    min-height: 76px !important;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: center;
    gap: 6px !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body #order-detail .order-summary-card .info-item:not(:nth-child(4n + 1)) {
    border-left: 1px solid var(--smpl-line) !important;
}

body #order-detail .order-summary-card .info-item:last-child,
body #order-detail .order-customer-card .info-item:last-child {
    border-bottom-color: transparent !important;
}

body #order-detail .info-item .display-label {
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.095em !important;
    text-transform: uppercase !important;
}

body #order-detail .info-item > span:not(.display-label) {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--smpl-ink) !important;
    font: 600 14px/1.4 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em !important;
    text-align: left !important;
}

body #order-detail .order-summary-card :where(#detailOrderRevenue, #detailOrderCost, #detailOrderProfit) {
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
}

body #order-detail :where(.order-status-badge, .priority-badge, .order-source-badge) {
    display: inline-flex !important;
    width: fit-content;
    min-height: 25px;
    align-items: center;
    gap: 6px;
    padding: 5px 8px !important;
    color: var(--smpl-ink) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #order-detail .priority-badge.high {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #order-detail .order-intake-banner {
    margin: 14px 16px 0 !important;
    padding: 11px 13px !important;
    color: var(--smpl-warning) !important;
    font: 600 12px/1.5 var(--smpl-font-ui) !important;
    border: 1px solid var(--smpl-warning-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-warning-bg) !important;
}

body #order-detail .order-notes-card .info-item {
    display: grid !important;
    min-height: 0 !important;
    gap: 9px !important;
    padding: 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: transparent !important;
}

body #order-detail .order-notes-card .info-item:last-child {
    border-bottom: 0 !important;
}

body #order-detail .order-notes-card .description-section p {
    min-height: 96px !important;
    margin: 0 !important;
    padding: 14px !important;
    color: var(--smpl-ink) !important;
    font: 500 14px/1.65 var(--smpl-font-ui) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
}

body #order-detail #detailOrderNoteComposer {
    min-height: 112px !important;
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #order-detail #detailOrderNoteComposer:focus {
    border-color: var(--smpl-ink) !important;
    box-shadow: var(--smpl-focus) !important;
}

body #order-detail .documents-list {
    display: grid !important;
    gap: 0 !important;
    padding: 4px 16px 12px !important;
}

body #order-detail .document-item {
    min-width: 0;
    padding: 12px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #order-detail .document-item:last-child {
    border-bottom: 0 !important;
}

body #order-detail .document-item:hover {
    background: var(--smpl-surface) !important;
}

body #order-detail .document-icon,
body #order-detail .document-actions .btn-icon {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #order-detail .document-actions .btn-icon:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #order-detail .no-documents {
    min-height: 112px;
    margin: 0 !important;
    padding: 30px 16px !important;
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.5 var(--smpl-font-ui) !important;
    text-align: center;
    border: 1px dashed var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
}

@media (max-width: 1180px) {
    body #order-detail .order-summary-card .info-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body #order-detail .order-summary-card .info-item:not(:nth-child(4n + 1)) {
        border-left: 0 !important;
    }

    body #order-detail .order-summary-card .info-item:not(:nth-child(3n + 1)) {
        border-left: 1px solid var(--smpl-line) !important;
    }

}

@media (max-width: 860px) {
    body #order-detail .order-detail-header {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 18px !important;
    }

    body #order-detail .order-detail-actions {
        justify-content: flex-start;
        padding-bottom: 0;
    }

    body #order-detail .order-detail-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas:
            "order"
            "customer"
            "notes"
            "documents" !important;
    }
}

@media (max-width: 680px) {
    body #order-detail .order-detail-header-main {
        grid-template-columns: minmax(0, 1fr);
        align-items: start !important;
    }

    body #order-detail .order-detail-back-btn {
        width: fit-content;
    }

    body #order-detail .order-detail-header h1 {
        font-size: clamp(28px, 9vw, 36px) !important;
        white-space: normal;
    }

    body #order-detail .order-detail-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    body #order-detail .order-detail-actions > * {
        justify-content: center !important;
        width: 100%;
    }

    body #order-detail .order-summary-card .info-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        padding-inline: 14px !important;
    }

    body #order-detail .order-summary-card .info-item {
        min-height: 68px !important;
        padding: 12px 4px !important;
        border-left: 0 !important;
        border-bottom-color: var(--smpl-line) !important;
    }

    body #order-detail .order-summary-card .info-item:last-child {
        border-bottom-color: transparent !important;
    }
}

/* Create and edit order forms. */
body #orderModal {
    padding: 16px !important;
    background: var(--smpl-overlay) !important;
    backdrop-filter: none !important;
}

body #orderModal .order-modal {
    display: flex !important;
    width: min(1040px, calc(100vw - 32px)) !important;
    max-width: 1040px !important;
    max-height: calc(100dvh - 32px) !important;
    flex-direction: column;
    overflow: hidden !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-lg) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: var(--smpl-shadow-lg) !important;
}

body #orderModal .modal-header {
    display: flex !important;
    min-height: 104px;
    flex: 0 0 auto;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: 20px 24px !important;
    color: var(--smpl-ink) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orderModal .order-modal-heading {
    min-width: 0;
}

body #orderModal .order-modal-eyebrow {
    display: block;
    margin: 0 0 5px;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.4 var(--smpl-font-mono) !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase;
}

body #orderModal .modal-header h2 {
    margin: 0 !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(25px, 3vw, 32px)/1.12 var(--smpl-font-ui) !important;
    letter-spacing: -0.035em !important;
}

body #orderModal .order-modal-heading p {
    margin: 6px 0 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 500 13px/1.5 var(--smpl-font-ui) !important;
}

body #orderModal .modal-close {
    display: inline-grid !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    place-items: center;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #orderModal .modal-close:hover,
body #orderModal .modal-close:focus-visible {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    outline: none;
}

body #orderModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    padding: 20px 24px 28px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-color: var(--smpl-soft) transparent;
    scrollbar-width: thin;
    background: var(--smpl-paper) !important;
}

body #orderModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

body #orderModal .modal-body::-webkit-scrollbar-thumb {
    border: 2px solid var(--smpl-paper);
    border-radius: 999px;
    background: var(--smpl-soft) !important;
}

body #orderModal #orderForm {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

body #orderModal :where(
    .order-form-section-heading,
    .form-row,
    .order-form-panel,
    .order-textarea-field,
    .order-documents-field
) {
    grid-column: 1 / -1;
}

body #orderModal .order-form-section-heading {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin: 8px 0 0;
    padding: 12px 14px;
    color: var(--smpl-ink);
    border: 1px solid var(--smpl-line);
    border-radius: var(--smpl-radius-sm);
    background: var(--smpl-surface);
}

body #orderModal .order-form-section-heading:first-child {
    margin-top: 0;
}

body #orderModal .order-form-section-heading > span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--smpl-paper) !important;
    font: 700 9px/1 var(--smpl-font-mono) !important;
    border-radius: 8px;
    background: var(--smpl-ink) !important;
}

body #orderModal .order-form-section-heading h3 {
    margin: 0 !important;
    color: var(--smpl-ink) !important;
    font: 700 14px/1.3 var(--smpl-font-ui) !important;
    letter-spacing: -0.01em;
}

body #orderModal .order-form-section-heading p {
    margin: 2px 0 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 500 11px/1.45 var(--smpl-font-ui) !important;
}

body #orderModal .order-form-row,
body #orderModal .order-form-panel .form-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 0 !important;
}

body #orderModal .order-customer-select-row {
    grid-template-columns: minmax(0, 1fr) !important;
}

body #orderModal .order-date-sequence {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body #orderModal .order-form-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #orderModal .order-address-panel {
    grid-template-columns: minmax(0, 1fr) !important;
}

body #orderModal #newCustomerFields,
body #orderModal #customerAddressSelection,
body #orderModal #recurringFields {
    border-top: 1px solid var(--smpl-line) !important;
}

body #orderModal .form-group {
    display: grid !important;
    min-width: 0;
    align-content: start;
    gap: 7px !important;
    margin: 0 !important;
}

body #orderModal .form-group > label {
    margin: 0 !important;
    color: var(--smpl-ink) !important;
    font: 700 10px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.065em !important;
    text-transform: uppercase !important;
}

body #orderModal .form-group :where(input:not([type="file"]), select, textarea) {
    width: 100% !important;
    color: var(--smpl-ink) !important;
    font: 500 14px/1.4 var(--smpl-font-ui) !important;
    border: 1px solid var(--smpl-soft) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background-color: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orderModal .form-group :where(input:not([type="file"]), select) {
    min-height: 44px !important;
    padding: 9px 12px !important;
}

body #orderModal .form-group textarea {
    min-height: 96px !important;
    padding: 11px 12px !important;
    resize: vertical;
}

body #orderModal .form-group :where(input, select, textarea):focus {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-ink) !important;
    outline: none !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-focus) !important;
}

body #orderModal .form-group :where(input, select, textarea)::placeholder {
    color: var(--smpl-mute) !important;
    opacity: 1;
}

body #orderModal .form-group input[readonly],
body #orderModal .form-group input:disabled,
body #orderModal .form-group select:disabled {
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

body #orderModal #profit {
    color: var(--smpl-ink) !important;
    font-weight: 700 !important;
}

body #orderModal :where(.order-finance-row, .order-date-sequence) {
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #orderModal :where(.searchable-select, .service-suggestion-field) {
    position: relative;
}

body #orderModal .searchable-select > input {
    padding-right: 42px !important;
    cursor: pointer;
}

body #orderModal .select-arrow {
    right: 14px !important;
    color: var(--smpl-text-muted) !important;
}

body #orderModal :where(.select-dropdown, .service-suggestions) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: var(--smpl-shadow) !important;
}

body #orderModal .service-suggestions {
    padding: 6px !important;
}

body #orderModal :where(.select-option, .service-suggestion-option) {
    min-height: 40px;
    color: var(--smpl-ink) !important;
    border-radius: 6px !important;
    background: transparent !important;
}

body #orderModal :where(.select-option, .service-suggestion-option):hover,
body #orderModal :where(.select-option, .service-suggestion-option).active {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

body #orderModal .search-input-container {
    padding: 8px !important;
    border-bottom: 1px solid var(--smpl-line);
    background: var(--smpl-surface) !important;
}

body #orderModal .order-documents-field {
    padding: 16px !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
}

body #orderModal .order-documents-field > label i {
    margin-right: 5px;
    color: var(--smpl-text-muted) !important;
}

body #orderModal .order-documents-field input[type="file"] {
    min-height: 48px;
    padding: 8px !important;
    color: var(--smpl-text-muted) !important;
    font: 500 12px/1.4 var(--smpl-font-ui) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
}

body #orderModal .order-documents-field input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-right: 10px;
    padding: 6px 10px;
    color: var(--smpl-ink);
    font: 600 12px/1.2 var(--smpl-font-ui);
    border: 1px solid var(--smpl-line);
    border-radius: 6px;
    background: var(--smpl-surface);
    cursor: pointer;
}

body #orderModal :where(.order-documents-field small, #customDaysGroup small) {
    color: var(--smpl-text-muted) !important;
    font: 500 11px/1.45 var(--smpl-font-ui) !important;
}

body #orderModal .docs-preview {
    margin-top: 4px;
}

body #orderModal .modal-footer {
    display: flex !important;
    min-height: 76px;
    flex: 0 0 auto;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 14px 24px !important;
    border: 0 !important;
    border-top: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #orderModal .modal-footer :where(.btn-secondary, .btn-primary) {
    min-width: 120px;
    min-height: 44px !important;
    justify-content: center;
    padding: 10px 16px !important;
    font: 600 13px/1.2 var(--smpl-font-ui) !important;
    border-radius: var(--smpl-radius-sm) !important;
    box-shadow: none !important;
}

body #orderModal .modal-footer .btn-secondary {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #orderModal .modal-footer .btn-secondary:hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #orderModal .modal-footer .btn-primary {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

@media (max-width: 760px) {
    body #orderModal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    body #orderModal .order-modal {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 96dvh !important;
        margin: 0 !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        border-left: 0 !important;
        border-radius: var(--smpl-radius-lg) var(--smpl-radius-lg) 0 0 !important;
    }

    body #orderModal .modal-header {
        min-height: 94px;
        padding: 17px 18px !important;
    }

    body #orderModal .modal-body {
        padding: 16px 18px 24px !important;
    }

    body #orderModal #orderForm,
    body #orderModal .order-form-row,
    body #orderModal .order-date-sequence,
    body #orderModal .order-form-panel,
    body #orderModal .order-form-panel .form-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body #orderModal .order-form-section-heading {
        align-items: start;
    }

    body #orderModal .modal-footer {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 72px;
        padding: 12px 18px !important;
    }

    body #orderModal .modal-footer :where(.btn-secondary, .btn-primary) {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 440px) {
    body #orderModal .order-modal-heading p {
        display: none;
    }

    body #orderModal .modal-header h2 {
        font-size: 25px !important;
    }

    body #orderModal .order-form-section-heading p {
        font-size: 10px !important;
    }
}

/* Monochrome lock for every Create/Edit Order interaction state. */
body #orderModal :where(i, svg, a),
body #orderModal :where(.select-option, .service-suggestion-option) :where(i, svg),
body #orderModal :where(.doc-item, .file-preview, .upload-preview) :where(i, svg) {
    color: currentColor !important;
}

body #orderModal .searchable-select.open > input,
body #orderModal .searchable-select.open > input:focus {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-focus) !important;
}

body #orderModal :where(.select-option.selected, .select-option[aria-selected="true"], .service-suggestion-option.active) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #orderModal :where(.select-option.selected, .select-option[aria-selected="true"], .service-suggestion-option.active) :where(i, svg) {
    color: var(--smpl-ink) !important;
}

body #orderModal :where(.select-dropdown, .service-suggestions)::-webkit-scrollbar-thumb {
    border: 2px solid var(--smpl-paper);
    border-radius: 999px;
    background: var(--smpl-soft) !important;
}

body #orderModal :where(input[type="checkbox"], input[type="radio"]) {
    accent-color: var(--smpl-ink) !important;
}

body #orderModal select[multiple] option:checked {
    color: var(--smpl-paper) !important;
    background: var(--smpl-ink) !important;
}

body #orderModal ::selection {
    color: var(--smpl-ink);
    background: var(--smpl-line);
}

/* Orders toolbar monochrome lock. */
body #orders .orders-toolbar {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orders :where(.orders-search input, .orders-filters, .orders-date-filter) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orders .orders-search input::placeholder {
    color: var(--smpl-text-muted) !important;
}

body #orders .orders-search::before,
body #orders .orders-filter-control > span {
    color: var(--smpl-text-muted) !important;
}

body #orders .orders-search > i {
    color: var(--smpl-ink) !important;
}

body #orders .orders-filter-label {
    color: var(--smpl-ink) !important;
}

body #orders .orders-filter-label > i {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #orders .orders-toolbar :where(.filter-select, .date-input) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background-color: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orders :where(.orders-search input, .orders-toolbar .filter-select, .orders-toolbar .date-input):hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #orders :where(.orders-search input, .orders-toolbar .filter-select, .orders-toolbar .date-input):focus,
body #orders :where(.orders-search input, .orders-toolbar .filter-select, .orders-toolbar .date-input):focus-visible {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-ink) !important;
    outline: none !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-focus) !important;
}

body #orders .orders-toolbar select option:checked {
    color: var(--smpl-paper) !important;
    background: var(--smpl-ink) !important;
}

body #orders :where(.order-amount, .order-cost, .order-profit) {
    color: var(--smpl-ink) !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Pipeline workspace: final SMPLFix visual layer. */
body #pipeline {
    --pipe-accent: var(--smpl-ink) !important;
    --pipe-accent-soft: var(--smpl-surface) !important;
    --pipe-accent-ring: rgba(0, 0, 0, 0.12) !important;
    --pipe-surface: var(--smpl-paper) !important;
    --pipe-muted: var(--smpl-surface) !important;
    --pipe-border: var(--smpl-line) !important;
    --pipe-text: var(--smpl-ink) !important;
    --pipe-text-secondary: var(--smpl-text-muted) !important;
    --pipe-radius-lg: 12px !important;
    --pipe-radius: 8px !important;
    --pipe-shadow: none !important;
}

body #pipeline .pipeline-page {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

body #pipeline .pipeline-header-bar {
    align-items: flex-end !important;
    gap: 24px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

body #pipeline .pipeline-header-bar::before,
body #pipeline .pipeline-header-bar h1::before,
body #pipeline .new-orders-column::before {
    content: none !important;
    display: none !important;
}

body #pipeline .pipeline-title-block {
    min-width: 240px !important;
}

body #pipeline .pipeline-subtitle {
    max-width: 42rem !important;
    margin-top: 6px !important;
    color: var(--smpl-text-muted) !important;
}

body #pipeline .pipeline-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

body #pipeline .pipeline-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(84px, 1fr)) !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
}

body #pipeline .pipeline-stats .stat-item {
    min-width: 84px !important;
    padding: 9px 14px !important;
    gap: 3px !important;
    border: 0 !important;
    border-left: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body #pipeline .pipeline-stats .stat-item:first-child {
    border-left: 0 !important;
}

body #pipeline .pipeline-stats .stat-value {
    color: var(--smpl-ink) !important;
    font-size: 18px !important;
    font-weight: 750 !important;
    font-variant-numeric: tabular-nums;
}

body #pipeline .pipeline-stats .stat-label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.055em !important;
}

body #pipeline .pipeline-toolbar-buttons {
    align-items: stretch !important;
    gap: 8px !important;
}

body #pipeline :where(.pipeline-btn-clear, .btn-add-stage) {
    min-height: 44px !important;
    padding: 0 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #pipeline .pipeline-btn-clear {
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #pipeline .pipeline-btn-clear:hover {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #pipeline .btn-add-stage {
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #pipeline .btn-add-stage:hover {
    color: var(--smpl-paper) !important;
    background: #242426 !important;
}

body #pipeline .pipeline-filter-bar {
    display: grid !important;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 300px) !important;
    gap: 12px !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body #pipeline :where(.pipeline-search-bar, .pipeline-employee-filter) {
    min-height: 58px !important;
    margin: 0 !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

body #pipeline .pipeline-search-bar {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 10px 7px 12px !important;
}

body #pipeline .pipeline-search-icon {
    display: grid;
    width: 36px;
    height: 36px;
    color: var(--smpl-ink);
    border: 1px solid var(--smpl-line);
    border-radius: 8px;
    background: var(--smpl-surface);
    font-size: 13px;
    place-items: center;
}

body #pipeline .pipeline-search-field {
    display: grid;
    min-width: 0;
    gap: 1px;
    cursor: text;
}

body #pipeline .pipeline-search-field > span,
body #pipeline .pipeline-employee-filter > span {
    color: var(--smpl-text-muted) !important;
    font: 700 8px/1.25 var(--smpl-font-mono) !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
}

body #pipeline .pipeline-search-bar input[type="search"] {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 26px !important;
    padding: 0 !important;
    color: var(--smpl-ink) !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font: 600 13px/1.25 var(--smpl-font-ui) !important;
}

body #pipeline .pipeline-search-bar input[type="search"]::placeholder {
    color: var(--smpl-text-muted) !important;
    opacity: 1;
}

body #pipeline .pipeline-employee-filter {
    padding: 7px 12px !important;
}

body #pipeline .pipeline-employee-filter span {
    color: var(--smpl-text-muted) !important;
    font: 700 8px/1.25 var(--smpl-font-mono) !important;
    letter-spacing: 0.08em !important;
}

body #pipeline .pipeline-employee-filter select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 26px !important;
    padding: 0 24px 0 0 !important;
    color: var(--smpl-ink) !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font: 650 13px/1.25 var(--smpl-font-ui) !important;
}

body #pipeline :where(.pipeline-search-bar, .pipeline-employee-filter):focus-within {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-focus) !important;
}

body #pipeline :where(.pipeline-search-bar, .pipeline-employee-filter):hover:not(:focus-within) {
    border-color: var(--smpl-soft) !important;
}

body #pipeline :where(.pipeline-search-bar i, .pipeline-employee-filter i) {
    color: var(--smpl-ink) !important;
}

body #pipeline .btn-clear-search {
    display: grid;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    place-items: center;
}

body #pipeline .btn-clear-search:hover,
body #pipeline .btn-clear-search:focus-visible {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    outline: none !important;
    background: var(--smpl-paper) !important;
}

body #pipeline #stagesContainer.stages-container {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 500px !important;
    padding: 2px 2px 18px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scrollbar-color: var(--smpl-soft) transparent;
}

body #pipeline #stagesContainer.stages-container > .stage-column {
    flex: 0 0 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    max-height: min(68vh, 660px) !important;
    scroll-snap-align: start;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 12px !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #pipeline #stagesContainer.stages-container > .stage-column:hover {
    border-color: var(--smpl-soft) !important;
    box-shadow: none !important;
}

body #pipeline .stage-column:not(.no-bid-stage) .stage-header {
    min-height: 58px !important;
    padding: 12px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
}

body #pipeline .stage-column:not(.new-orders-column):not(.no-bid-stage) .stage-title {
    align-items: center !important;
    margin: 0 !important;
}

body #pipeline .stage-column:not(.no-bid-stage) .stage-title h3 {
    color: var(--smpl-ink) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    letter-spacing: -0.01em !important;
}

body #pipeline .stage-actions {
    gap: 3px !important;
}

body #pipeline .stage-column:not(.no-bid-stage) .stage-actions .icon-btn,
body #pipeline .record-actions .icon-btn {
    color: var(--smpl-text-muted) !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #pipeline .stage-column:not(.no-bid-stage) .stage-actions .icon-btn:hover,
body #pipeline .record-actions .icon-btn:hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #pipeline :where(.stage-actions, .record-actions) .icon-btn.delete:hover {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #pipeline .stage-column:not(.no-bid-stage) .count-badge {
    min-width: 24px !important;
    padding: 3px 8px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    font: 700 10px/1.4 var(--smpl-font-mono) !important;
}

body #pipeline .stage-column:not(.no-bid-stage) .stage-body {
    flex: 1 !important;
    min-height: 140px !important;
    padding: 10px !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #pipeline :where(.record-card, .new-order-card) {
    margin-bottom: 8px !important;
    padding: 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #pipeline .new-order-card {
    padding-right: 36px !important;
}

body #pipeline :where(.record-card, .new-order-card):hover {
    border-color: var(--smpl-soft) !important;
    background: #fdfdfd !important;
    box-shadow: none !important;
    transform: none !important;
}

body #pipeline :where(.record-title, .new-order-card-title) {
    color: var(--smpl-ink) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
}

body #pipeline :where(.record-info, .new-order-card-meta, .record-time, .new-order-card-time) {
    color: var(--smpl-text-muted) !important;
}

body #pipeline :where(.record-info i, .record-assignee, .new-order-card-row i, .new-order-card-grip) {
    color: var(--smpl-text-muted) !important;
}

body #pipeline .new-order-card-id {
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 4px !important;
    background: var(--smpl-surface) !important;
    font: 650 10px/1.4 var(--smpl-font-mono) !important;
}

body #pipeline :where(.record-footer, .new-order-card-foot) {
    border-color: var(--smpl-line) !important;
}

body #pipeline .new-order-card-amount {
    color: var(--smpl-ink) !important;
    font-variant-numeric: tabular-nums;
}

body #pipeline .new-orders-column {
    border-style: dashed !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #pipeline .new-orders-column-header {
    color: var(--smpl-paper) !important;
    border-bottom-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
}

body #pipeline .new-orders-column-title,
body #pipeline .new-orders-column-title i {
    color: var(--smpl-paper) !important;
}

body #pipeline .new-orders-column .count-badge.pipeline-new-orders-badge {
    color: var(--smpl-paper) !important;
    border-color: #4b4b4f !important;
    background: #2d2d30 !important;
}

body #pipeline .pipeline-new-orders-empty > i {
    color: var(--smpl-success) !important;
}

body #pipeline :where(.pipeline-expand-new-orders, .pipeline-collapse-new-orders, .place-picked-btn) {
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #pipeline :where(.pipeline-expand-new-orders, .pipeline-collapse-new-orders, .place-picked-btn):hover:not(:disabled) {
    color: var(--smpl-paper) !important;
    background: #242426 !important;
    box-shadow: none !important;
    transform: none !important;
}

body #pipeline .new-order-card-hint {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #pipeline :where(.stage-body.drag-over, .stage-column.can-place-picked) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-ink) !important;
    background: #f3f3f3 !important;
    background-image: none !important;
    box-shadow: inset 0 0 0 1px var(--smpl-ink) !important;
}

body #pipeline .record-card.picked-up {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: inset 0 0 0 1px var(--smpl-ink) !important;
}

body #pipeline .record-card.picked-up::after {
    color: var(--smpl-paper) !important;
    background: var(--smpl-ink) !important;
}

body #pipeline :where(button, input, select):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

@media (max-width: 1100px) {
    body #pipeline .pipeline-header-bar {
        align-items: flex-start !important;
    }

    body #pipeline .pipeline-actions {
        width: 100% !important;
        justify-content: space-between !important;
    }
}

@media (max-width: 720px) {
    body #pipeline .pipeline-actions {
        flex-direction: column !important;
    }

    body #pipeline .pipeline-stats,
    body #pipeline .pipeline-toolbar-buttons {
        width: 100% !important;
    }

    body #pipeline .pipeline-toolbar-buttons > button {
        flex: 1 1 0 !important;
    }

    body #pipeline .pipeline-filter-bar {
        grid-template-columns: 1fr !important;
    }

    body #pipeline #stagesContainer.stages-container {
        flex-direction: row !important;
        overflow-x: auto !important;
    }

    body #pipeline #stagesContainer.stages-container > .stage-column {
        flex-basis: min(84vw, 300px) !important;
        min-width: min(84vw, 300px) !important;
        max-width: min(84vw, 300px) !important;
    }
}

/* Pipeline order-details dialog. */
body #orderDetailModal {
    padding: 20px !important;
    background: rgba(11, 11, 12, 0.58) !important;
    backdrop-filter: blur(2px);
}

body #orderDetailModal .pipeline-order-detail-modal {
    display: flex !important;
    flex-direction: column !important;
    width: min(960px, calc(100vw - 40px)) !important;
    max-width: 960px !important;
    max-height: min(90dvh, 900px) !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 14px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2) !important;
}

body #orderDetailModal .pipeline-order-detail-header {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 20px !important;
    padding: 24px 28px 20px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
}

body #orderDetailModal .pipeline-order-detail-heading {
    min-width: 0 !important;
}

body #orderDetailModal .pipeline-order-detail-eyebrow {
    display: block !important;
    margin-bottom: 6px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 10px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.075em !important;
    text-transform: uppercase !important;
}

body #orderDetailModal .pipeline-order-detail-header h2 {
    margin: 0 !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(24px, 3vw, 32px)/1.15 var(--smpl-font-display) !important;
    letter-spacing: -0.035em !important;
}

body #orderDetailModal .pipeline-order-detail-header p {
    max-width: 620px !important;
    margin: 7px 0 0 !important;
    color: var(--smpl-text-muted) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body #orderDetailModal .pipeline-order-detail-close {
    display: inline-grid !important;
    flex: 0 0 auto !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #orderDetailModal .pipeline-order-detail-close:hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #orderDetailModal .pipeline-order-detail-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 18px 20px 22px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: var(--smpl-surface) !important;
    scrollbar-width: thin;
    scrollbar-color: var(--smpl-soft) transparent;
}

body #orderDetailModal .pipeline-order-detail-body::-webkit-scrollbar {
    width: 9px;
}

body #orderDetailModal .pipeline-order-detail-body::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: var(--smpl-soft);
    background-clip: padding-box;
}

body #orderDetailModal .modal-order-detail-layout {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    max-width: none !important;
    padding: 0 !important;
}

body #orderDetailModal .detail-info-card {
    min-width: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 11px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orderDetailModal .modal-order-summary-card,
body #orderDetailModal .modal-order-notes-card {
    grid-column: 1 / -1 !important;
}

body #orderDetailModal .detail-info-card > h3 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 11px 14px !important;
    color: var(--smpl-ink) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    font-size: 14px !important;
    font-weight: 750 !important;
}

body #orderDetailModal .detail-info-card > h3 i {
    display: inline-grid !important;
    place-items: center !important;
    width: 28px !important;
    height: 28px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-surface) !important;
    font-size: 11px !important;
}

body #orderDetailModal .modal-order-summary-card .info-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
}

body #orderDetailModal .modal-order-summary-card .info-item {
    display: flex !important;
    min-width: 0 !important;
    min-height: 76px !important;
    padding: 13px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 7px !important;
    border: 0 !important;
    border-right: 1px solid var(--smpl-line) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body #orderDetailModal .modal-order-summary-card .info-item:nth-child(3n) {
    border-right: 0 !important;
}

body #orderDetailModal .modal-order-summary-card .info-item:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
}

body #orderDetailModal .info-item .display-label {
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.065em !important;
    text-transform: uppercase !important;
}

body #orderDetailModal .info-item span:not(.display-label) {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    color: var(--smpl-ink) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

body #orderDetailModal :where(#modalDetailOrderRevenue, #modalDetailOrderCost, #modalDetailOrderProfit) {
    font-size: 15px !important;
    font-variant-numeric: tabular-nums;
}

body #orderDetailModal .modal-order-customer-card .info-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding: 0 14px !important;
}

body #orderDetailModal .modal-order-customer-card .info-item {
    grid-template-columns: minmax(82px, 0.34fr) minmax(0, 1fr) !important;
    min-height: 49px !important;
    padding: 10px 0 !important;
    border-color: var(--smpl-line) !important;
}

body #orderDetailModal .modal-order-customer-card .info-item span:not(.display-label) {
    text-align: right !important;
}

body #orderDetailModal .modal-order-notes-card .info-item {
    gap: 9px !important;
    padding: 16px !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #orderDetailModal .modal-order-notes-card .description-section p {
    min-height: 58px !important;
    padding: 11px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-surface) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

body #orderDetailModal #modalDetailOrderNoteComposer {
    min-height: 92px !important;
    padding: 11px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #orderDetailModal #modalDetailOrderNoteComposer:focus {
    outline: none !important;
    border-color: var(--smpl-ink) !important;
    box-shadow: var(--smpl-focus) !important;
}

body #orderDetailModal :where(.btn-add-note, .document-actions .btn-icon) {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orderDetailModal :where(.note-entry, .document-item) {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orderDetailModal .note-entry-meta {
    border-color: var(--smpl-line) !important;
}

body #orderDetailModal .documents-list {
    min-height: 190px !important;
    padding: 0 14px !important;
}

body #orderDetailModal .document-icon {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #orderDetailModal .no-documents {
    display: grid !important;
    place-items: center !important;
    min-height: 138px !important;
    margin: 14px 0 !important;
    padding: 20px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
}

body #orderDetailModal :where(.order-status-badge, .priority-badge) {
    max-width: 100% !important;
    white-space: normal !important;
}

body #orderDetailModal .order-status-badge {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #orderDetailModal .pipeline-order-detail-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    min-height: 68px !important;
    padding: 12px 20px !important;
    border-top: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #orderDetailModal .pipeline-order-detail-footer p {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font-size: 11px !important;
}

body #orderDetailModal .pipeline-order-detail-footer .btn-secondary {
    min-width: 86px !important;
    min-height: 40px !important;
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #orderDetailModal :where(button, textarea):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

@media (max-width: 760px) {
    body #orderDetailModal {
        padding: 10px !important;
    }

    body #orderDetailModal .pipeline-order-detail-modal {
        width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
    }

    body #orderDetailModal .pipeline-order-detail-header {
        padding: 18px !important;
    }

    body #orderDetailModal .pipeline-order-detail-body {
        padding: 12px !important;
    }

    body #orderDetailModal .modal-order-detail-layout,
    body #orderDetailModal .modal-order-summary-card .info-grid {
        grid-template-columns: 1fr !important;
    }

    body #orderDetailModal .modal-order-summary-card .info-item {
        min-height: 64px !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--smpl-line) !important;
    }

    body #orderDetailModal .modal-order-summary-card .info-item:last-child {
        border-bottom: 0 !important;
    }

    body #orderDetailModal .modal-order-customer-card,
    body #orderDetailModal .modal-order-documents-card {
        grid-column: 1 / -1 !important;
    }

    body #orderDetailModal .modal-order-customer-card .info-item {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
    }

    body #orderDetailModal .modal-order-customer-card .info-item span:not(.display-label) {
        text-align: left !important;
    }
}

/* Expanded pipeline stage details. */
body #expandedStageModal {
    padding: 20px !important;
    background: rgba(11, 11, 12, 0.58) !important;
    backdrop-filter: blur(2px);
}

body #expandedStageModal .expanded-stage-modal {
    display: flex !important;
    flex-direction: column !important;
    width: min(1320px, calc(100vw - 40px)) !important;
    max-width: 1320px !important;
    max-height: min(90dvh, 920px) !important;
    overflow: hidden !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 14px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2) !important;
}

body #expandedStageModal .expanded-stage-header {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: 24px 28px 20px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
}

body #expandedStageModal .expanded-stage-heading {
    min-width: 0 !important;
}

body #expandedStageModal .expanded-stage-eyebrow,
body #expandedStageModal .expanded-stage-record-eyebrow {
    display: block !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
}

body #expandedStageModal .expanded-stage-eyebrow {
    margin-bottom: 6px !important;
}

body #expandedStageModal .expanded-stage-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

body #expandedStageModal .expanded-stage-title-row h2 {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(24px, 3vw, 32px)/1.15 var(--smpl-font-display) !important;
    letter-spacing: -0.035em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #expandedStageModal .expanded-stage-count {
    display: inline-grid !important;
    flex: 0 0 auto !important;
    place-items: center !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    color: var(--smpl-paper) !important;
    border-radius: 999px !important;
    background: var(--smpl-ink) !important;
    font: 700 11px/1 var(--smpl-font-mono) !important;
}

body #expandedStageModal .expanded-stage-heading > p {
    margin: 7px 0 0 !important;
    color: var(--smpl-text-muted) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body #expandedStageModal .expanded-stage-close {
    display: inline-grid !important;
    flex: 0 0 auto !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #expandedStageModal .expanded-stage-close:hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #expandedStageModal .expanded-stage-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 18px 20px 22px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: var(--smpl-surface) !important;
    scrollbar-width: thin;
    scrollbar-color: var(--smpl-soft) transparent;
}

body #expandedStageModal .expanded-stage-body::-webkit-scrollbar {
    width: 9px;
}

body #expandedStageModal .expanded-stage-body::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: var(--smpl-soft);
    background-clip: padding-box;
}

body #expandedStageModal .expanded-stage-record-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 14px !important;
}

body #expandedStageModal .expanded-stage-record {
    min-width: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 11px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #expandedStageModal .expanded-stage-record-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: 76px !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #expandedStageModal .expanded-stage-record-heading {
    min-width: 0 !important;
}

body #expandedStageModal .expanded-stage-record-eyebrow {
    margin-bottom: 5px !important;
}

body #expandedStageModal .expanded-stage-record-heading h3 {
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--smpl-ink) !important;
    font-size: 17px !important;
    font-weight: 750 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #expandedStageModal .priority-badge {
    flex: 0 0 auto !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    font: 700 8px/1.4 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
}

body #expandedStageModal .expanded-stage-record-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #expandedStageModal .expanded-stage-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

body #expandedStageModal .expanded-stage-action.primary {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #expandedStageModal .expanded-stage-action:not(.primary):hover {
    border-color: var(--smpl-soft) !important;
    background: #f4f4f4 !important;
}

body #expandedStageModal .expanded-stage-action.primary:hover {
    background: #242426 !important;
}

body #expandedStageModal .expanded-stage-record-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 4px 14px !important;
}

body #expandedStageModal .expanded-stage-meta-item {
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 9px !important;
    min-width: 0 !important;
    min-height: 58px !important;
    padding: 9px 10px 9px 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #expandedStageModal .expanded-stage-meta-item:nth-child(odd) {
    margin-right: 10px !important;
    border-right: 1px solid var(--smpl-line) !important;
}

body #expandedStageModal .expanded-stage-meta-wide {
    grid-column: 1 / -1 !important;
    margin-right: 0 !important;
    border-right: 0 !important;
}

body #expandedStageModal .expanded-stage-meta-icon {
    display: inline-grid !important;
    place-items: center !important;
    width: 26px !important;
    height: 26px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 6px !important;
    background: var(--smpl-surface) !important;
    font-size: 10px !important;
}

body #expandedStageModal .expanded-stage-meta-item > div {
    min-width: 0 !important;
}

body #expandedStageModal .expanded-stage-meta-item > div > span {
    display: block !important;
    margin-bottom: 2px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 8px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

body #expandedStageModal .expanded-stage-meta-item strong {
    display: block !important;
    min-width: 0 !important;
    overflow-wrap: anywhere;
    color: var(--smpl-ink) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
}

body #expandedStageModal .expanded-stage-copy-block {
    margin: 0 14px 14px !important;
    padding: 11px 12px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-surface) !important;
}

body #expandedStageModal .expanded-stage-copy-block h4 {
    margin: 0 0 6px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

body #expandedStageModal .expanded-stage-copy-block p {
    margin: 0 !important;
    overflow-wrap: anywhere;
    color: var(--smpl-ink) !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
    white-space: pre-wrap !important;
}

body #expandedStageModal .expanded-stage-note-block {
    border-style: dashed !important;
    background: var(--smpl-paper) !important;
}

body #expandedStageModal .expanded-stage-empty {
    display: grid !important;
    place-items: center !important;
    min-height: 340px !important;
    padding: 40px 20px !important;
    text-align: center !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: 11px !important;
    background: var(--smpl-paper) !important;
}

body #expandedStageModal .expanded-stage-empty > span {
    display: inline-grid !important;
    place-items: center !important;
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-surface) !important;
}

body #expandedStageModal .expanded-stage-empty h3 {
    margin: 0 0 6px !important;
    color: var(--smpl-ink) !important;
    font-size: 16px !important;
}

body #expandedStageModal .expanded-stage-empty p {
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font-size: 12px !important;
}

body #expandedStageModal .expanded-stage-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    min-height: 68px !important;
    padding: 12px 20px !important;
    border-top: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #expandedStageModal .expanded-stage-footer p {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--smpl-text-muted) !important;
    font-size: 11px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #expandedStageModal .expanded-stage-footer .btn-secondary {
    min-width: 86px !important;
    min-height: 40px !important;
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #expandedStageModal :where(button):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

@media (max-width: 900px) {
    body #expandedStageModal .expanded-stage-record-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    body #expandedStageModal {
        padding: 10px !important;
    }

    body #expandedStageModal .expanded-stage-modal {
        width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
    }

    body #expandedStageModal .expanded-stage-header {
        padding: 18px !important;
    }

    body #expandedStageModal .expanded-stage-body {
        padding: 12px !important;
    }

    body #expandedStageModal .expanded-stage-record-meta,
    body #expandedStageModal .expanded-stage-record-actions {
        grid-template-columns: 1fr !important;
    }

    body #expandedStageModal .expanded-stage-meta-item,
    body #expandedStageModal .expanded-stage-meta-item:nth-child(odd),
    body #expandedStageModal .expanded-stage-meta-wide {
        grid-column: auto !important;
        margin-right: 0 !important;
        border-right: 0 !important;
    }

    body #expandedStageModal .expanded-stage-footer p {
        display: none !important;
    }

    body #expandedStageModal .expanded-stage-footer .btn-secondary {
        width: 100% !important;
    }
}

/* Customer profile workspace. */
body #customer-profile .customer-profile-header,
body #customer-profile .profile-container {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

body #customer-profile .customer-profile-header {
    display: grid !important;
    grid-template-columns: auto 52px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #customer-profile .customer-profile-back {
    min-height: 42px !important;
    padding: 0 14px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

body #customer-profile .customer-profile-back:hover {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

body #customer-profile .customer-profile-identity {
    display: grid !important;
    place-items: center !important;
    width: 52px !important;
    height: 52px !important;
    color: var(--smpl-paper) !important;
    border-radius: 12px !important;
    background: var(--smpl-ink) !important;
    font: 700 15px/1 var(--smpl-font-mono) !important;
    letter-spacing: 0.035em !important;
}

body #customer-profile .customer-profile-heading {
    min-width: 0 !important;
}

body #customer-profile .customer-profile-heading .page-eyebrow {
    margin-bottom: 4px !important;
}

body #customer-profile .customer-profile-heading h1 {
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(28px, 3vw, 38px)/1.12 var(--smpl-font-display) !important;
    letter-spacing: -0.04em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #customer-profile .customer-profile-heading > p:last-child {
    margin: 6px 0 0 !important;
    color: var(--smpl-text-muted) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    text-transform: capitalize;
}

body #customer-profile .profile-container {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr) !important;
    align-items: start !important;
    gap: 14px !important;
    padding: 0 !important;
}

body #customer-profile :where(
    .profile-info-card,
    .profile-notes-card,
    .profile-orders-card,
    .profile-documents-card
) {
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 11px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #customer-profile :where(.profile-orders-card, .profile-documents-card, .profile-stats-grid) {
    grid-column: 1 / -1 !important;
}

body #customer-profile :where(
    .profile-info-card,
    .profile-notes-card,
    .profile-orders-card,
    .profile-documents-card
) > h3 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 11px 14px !important;
    color: var(--smpl-ink) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    font-size: 14px !important;
    font-weight: 750 !important;
}

body #customer-profile :where(
    .profile-info-card,
    .profile-notes-card,
    .profile-orders-card,
    .profile-documents-card
) > h3 i {
    display: inline-grid !important;
    place-items: center !important;
    width: 28px !important;
    height: 28px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-surface) !important;
    font-size: 11px !important;
}

body #customer-profile .profile-info-card > .info-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
}

body #customer-profile .profile-info-card > .info-grid > .info-item {
    display: flex !important;
    min-width: 0 !important;
    min-height: 78px !important;
    padding: 13px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 7px !important;
    border: 0 !important;
    border-right: 1px solid var(--smpl-line) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: var(--smpl-paper) !important;
}

body #customer-profile .profile-info-card > .info-grid:first-of-type > .info-item:nth-child(2n) {
    border-right: 0 !important;
}

body #customer-profile .profile-info-card > .info-grid:first-of-type > .info-item:nth-child(3) {
    grid-column: 1 / -1 !important;
    border-right: 0 !important;
}

body #customer-profile .profile-info-card > .info-grid:first-of-type > .info-item:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
}

body #customer-profile .info-item .display-label,
body #customer-profile .profile-custom-fields .display-label {
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.065em !important;
    text-transform: uppercase !important;
}

body #customer-profile .info-item span:not(.display-label) {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    color: var(--smpl-ink) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    text-align: left !important;
}

body #customer-profile .customer-profile-value-line {
    display: flex !important;
    align-items: baseline !important;
    gap: 7px !important;
    width: 100% !important;
}

body #customer-profile .customer-profile-value-line + .customer-profile-value-line {
    margin-top: 5px !important;
}

body #customer-profile .customer-profile-value-line strong {
    flex: 0 0 auto !important;
    color: var(--smpl-text-muted) !important;
    font: 650 9px/1.4 var(--smpl-font-mono) !important;
    text-transform: uppercase !important;
}

body #customer-profile :where(#profileType, #profileStatus) {
    display: inline-flex !important;
    width: fit-content !important;
    padding: 4px 9px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    font: 700 10px/1.35 var(--smpl-font-mono) !important;
    text-transform: capitalize !important;
}

body #customer-profile .profile-custom-fields {
    grid-column: 1 / -1 !important;
    border-top: 1px solid var(--smpl-line) !important;
}

body #customer-profile .profile-custom-fields[hidden] {
    display: none !important;
}

body #customer-profile .profile-notes-card .notes-section {
    display: block !important;
    min-height: 0 !important;
    padding: 16px !important;
    border: 0 !important;
    background: var(--smpl-paper) !important;
}

body #customer-profile .profile-notes-card .notes-section > .display-label {
    display: block !important;
    margin-bottom: 8px !important;
}

body #customer-profile #profileCustomerNoteComposer {
    width: 100% !important;
    min-height: 104px !important;
    padding: 11px 12px !important;
    resize: vertical !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body #customer-profile #profileCustomerNoteComposer:focus {
    outline: none !important;
    border-color: var(--smpl-ink) !important;
    box-shadow: var(--smpl-focus) !important;
}

body #customer-profile .profile-notes-card .notes-compose-row {
    margin-top: 8px !important;
    padding: 0 !important;
}

body #customer-profile .profile-notes-card .btn-add-note {
    min-height: 38px !important;
    padding: 0 13px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: 7px !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #customer-profile .profile-notes-card :where(.notes-empty, .note-entry) {
    margin-top: 10px !important;
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #customer-profile .profile-notes-card .note-entry-meta {
    border-color: var(--smpl-line) !important;
}

body #customer-profile .profile-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

body #customer-profile .profile-stats-grid .stat-card {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 1px 11px !important;
    min-width: 0 !important;
    min-height: 88px !important;
    padding: 14px !important;
    text-align: left !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #customer-profile .profile-stats-grid .stat-card > i {
    display: inline-grid !important;
    grid-row: 1 / 3 !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
    font-size: 13px !important;
}

body #customer-profile .profile-stats-grid .stat-card > h3 {
    align-self: end !important;
    margin: 0 !important;
    color: var(--smpl-ink) !important;
    font-size: 20px !important;
    font-weight: 750 !important;
    font-variant-numeric: tabular-nums;
    line-height: 1.15 !important;
}

body #customer-profile .profile-stats-grid .stat-card > p {
    align-self: start !important;
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
}

body #customer-profile .profile-orders-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: thin;
    scrollbar-color: var(--smpl-soft) transparent;
}

body #customer-profile .profile-orders-table {
    width: 100% !important;
    min-width: 760px !important;
    margin: 0 !important;
    border-collapse: collapse !important;
}

body #customer-profile .profile-orders-table :where(th, td) {
    padding: 12px 14px !important;
    border-color: var(--smpl-line) !important;
    vertical-align: middle !important;
}

body #customer-profile .profile-orders-table th {
    color: var(--smpl-text-muted) !important;
    background: var(--smpl-surface) !important;
    font: 700 9px/1.4 var(--smpl-font-mono) !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
}

body #customer-profile .profile-orders-table td {
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
    font-size: 12px !important;
}

body #customer-profile .profile-orders-table tbody tr:hover td {
    background: var(--smpl-surface) !important;
}

body #customer-profile .profile-orders-table .order-status-badge {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #customer-profile .profile-orders-empty td {
    height: 116px !important;
    color: var(--smpl-text-muted) !important;
    text-align: center !important;
}

body #customer-profile .profile-documents-card .documents-list {
    min-height: 150px !important;
    padding: 14px !important;
}

body #customer-profile .profile-documents-card .document-item {
    padding: 11px 12px !important;
    border-color: var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #customer-profile .profile-documents-card .document-item:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #customer-profile .profile-documents-card .document-icon {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #customer-profile .profile-documents-card .document-actions .btn-icon {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #customer-profile .profile-documents-card .no-documents {
    display: grid !important;
    place-items: center !important;
    min-height: 120px !important;
    margin: 0 !important;
    padding: 20px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
}

body #customer-profile :where(button, textarea):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

@media (max-width: 1050px) {
    body #customer-profile .profile-container {
        grid-template-columns: 1fr !important;
    }

    body #customer-profile :where(
        .profile-info-card,
        .profile-notes-card,
        .profile-orders-card,
        .profile-documents-card,
        .profile-stats-grid
    ) {
        grid-column: 1 !important;
    }
}

@media (max-width: 720px) {
    body #customer-profile .customer-profile-header {
        grid-template-columns: 44px minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    body #customer-profile .customer-profile-back {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        justify-content: center !important;
    }

    body #customer-profile .customer-profile-identity {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
    }

    body #customer-profile .customer-profile-heading {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    body #customer-profile .profile-info-card > .info-grid,
    body #customer-profile .profile-stats-grid {
        grid-template-columns: 1fr !important;
    }

    body #customer-profile .profile-info-card > .info-grid > .info-item,
    body #customer-profile .profile-info-card > .info-grid:first-of-type > .info-item:nth-child(3) {
        grid-column: 1 !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--smpl-line) !important;
    }

    body #customer-profile .profile-info-card > .info-grid:first-of-type > .info-item:last-child {
        border-bottom: 0 !important;
    }
}

/* Unified entity detail-page system. */
body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) {
    color: var(--smpl-ink) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header,
body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-layout,
body #vendor-detail .vendor-review-banner {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header,
body #customer-profile .customer-profile-header.record-detail-header {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 24px !important;
    margin-bottom: 24px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main,
body #customer-profile .customer-detail-header-main {
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    gap: 16px !important;
    min-width: 0 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-heading-copy {
    min-width: 0 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-heading-copy .page-eyebrow {
    display: block !important;
    margin: 0 0 4px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.075em !important;
    text-transform: uppercase !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-heading-copy h1 {
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--smpl-ink) !important;
    font: 700 clamp(28px, 3vw, 38px)/1.12 var(--smpl-font-display) !important;
    letter-spacing: -0.04em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-heading-copy > p:last-child {
    max-width: 640px !important;
    margin: 6px 0 0 !important;
    color: var(--smpl-text-muted) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    text-transform: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary {
    flex: 0 0 auto !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary:hover {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

body :is(#order-detail, #vendor-detail) :where(.order-detail-actions, .vendor-detail-actions) {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 8px !important;
}

body :is(#order-detail, #vendor-detail) :where(.order-detail-actions, .vendor-detail-actions) > button {
    min-height: 40px !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

body :is(#order-detail, #vendor-detail) :where(.order-detail-actions, .vendor-detail-actions) .btn-secondary {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-paper) !important;
}

body :is(#order-detail, #vendor-detail) :where(.order-detail-actions, .vendor-detail-actions) .btn-danger {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-layout,
body #customer-profile .profile-container.record-detail-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: start !important;
    gap: 14px !important;
    padding: 0 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-layout > * {
    grid-column: 1 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-card,
body #order-detail .detail-info-card {
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 11px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > h3 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 11px 14px !important;
    color: var(--smpl-ink) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    font-size: 14px !important;
    font-weight: 750 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > h3 i {
    display: inline-grid !important;
    place-items: center !important;
    width: 28px !important;
    height: 28px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-surface) !important;
    font-size: 11px !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid {
    display: block !important;
    padding: 0 16px !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid > .info-item,
body #customer-profile .profile-info-card > .info-grid > .info-item {
    display: grid !important;
    grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 16px !important;
    min-height: 49px !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid > .info-item:last-child,
body #customer-profile .profile-info-card > .info-grid > .info-item:last-child {
    border-bottom: 0 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .info-item .display-label {
    margin: 0 !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.065em !important;
    text-transform: uppercase !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .info-item > span:not(.display-label) {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    color: var(--smpl-ink) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    text-align: right !important;
}

body :is(#customer-profile, #vendor-detail) :where(.customer-profile-value-line, .record-detail-value-line) {
    display: flex !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    width: 100% !important;
}

body :is(#customer-profile, #vendor-detail) :where(.customer-profile-value-line, .record-detail-value-line) + :where(.customer-profile-value-line, .record-detail-value-line) {
    margin-top: 5px !important;
}

body :is(#customer-profile, #vendor-detail) :where(.customer-profile-value-line, .record-detail-value-line) strong {
    color: var(--smpl-text-muted) !important;
    font: 650 9px/1.4 var(--smpl-font-mono) !important;
    text-transform: uppercase !important;
}

body :is(#customer-profile, #vendor-detail) :where(#profileType, #profileStatus, #detailVendorStatus .record-status-badge),
body #employee-detail .employee-status-badge {
    display: inline-flex !important;
    width: fit-content !important;
    padding: 4px 9px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    font: 700 10px/1.35 var(--smpl-font-mono) !important;
    text-transform: capitalize !important;
}

body #vendor-detail .record-detail-custom-fields {
    margin-top: 0 !important;
    border-top: 1px solid var(--smpl-line) !important;
}

body #vendor-detail .record-detail-custom-fields[hidden] {
    display: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail) :where(.order-notes-card, .profile-notes-card, .vendor-notes-card) > .info-item {
    display: block !important;
    min-height: 0 !important;
    padding: 16px !important;
    border: 0 !important;
    background: var(--smpl-paper) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail) :where(#detailOrderNoteComposer, #profileCustomerNoteComposer, #vendorDetailNoteComposer) {
    width: 100% !important;
    min-height: 104px !important;
    padding: 11px 12px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail) :where(#detailOrderNoteComposer, #profileCustomerNoteComposer, #vendorDetailNoteComposer):focus {
    outline: none !important;
    border-color: var(--smpl-ink) !important;
    box-shadow: var(--smpl-focus) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail) :where(.btn-add-note) {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    border-radius: 7px !important;
    background: var(--smpl-ink) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail) :where(.note-entry, .notes-empty) {
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body :is(#customer-profile, #vendor-detail, #employee-detail) :where(.profile-stats-grid, .vendor-financial-summary) {
    display: grid !important;
    gap: 10px !important;
}

body #customer-profile .profile-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body #vendor-detail .vendor-financial-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin: 14px !important;
}

body #vendor-detail .vendor-financial-summary .summary-item {
    min-width: 0 !important;
    padding: 13px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
}

body #vendor-detail .vendor-financial-summary .summary-label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.35 var(--smpl-font-mono) !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
}

body #vendor-detail .vendor-financial-summary .summary-value {
    color: var(--smpl-ink) !important;
    font-size: 18px !important;
    font-weight: 750 !important;
    font-variant-numeric: tabular-nums;
}

body #vendor-detail .orders-list {
    gap: 8px !important;
    padding: 0 14px 14px !important;
}

body #vendor-detail .order-item {
    padding: 12px !important;
    border-color: var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #vendor-detail .order-item :where(i, .order-status-badge) {
    color: var(--smpl-ink) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.documents-list) {
    min-height: 150px !important;
    padding: 14px !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.document-item) {
    padding: 11px 12px !important;
    border-color: var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.document-icon) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.document-actions .btn-icon) {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.no-documents, .no-orders) {
    display: grid !important;
    place-items: center !important;
    min-height: 120px !important;
    margin: 0 !important;
    padding: 20px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px dashed var(--smpl-soft) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
}

/* Keep vendor application review details in the same neutral card language. */
body #vendor-review-detail .vendor-review-detail-header,
body #vendor-review-detail .vendor-review-detail-content {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

body #vendor-review-detail .vendor-review-detail-header {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #vendor-review-detail :where(.vendor-review-overview, .vendor-review-card) {
    border-color: var(--smpl-line) !important;
    border-radius: 11px !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #vendor-review-detail :where(.vendor-review-field, .vendor-review-list li, .vendor-review-history article) {
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
}

@media (max-width: 900px) {
    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header,
    body #customer-profile .customer-profile-header.record-detail-header {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    body :is(#order-detail, #vendor-detail) :where(.order-detail-actions, .vendor-detail-actions) {
        width: 100% !important;
    }

    body :is(#order-detail, #vendor-detail) :where(.order-detail-actions, .vendor-detail-actions) > button {
        flex: 1 1 0 !important;
    }
}

@media (max-width: 720px) {
    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main,
    body #customer-profile .customer-detail-header-main {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary {
        width: 100% !important;
        justify-content: center !important;
    }

    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid > .info-item,
    body #customer-profile .profile-info-card > .info-grid > .info-item {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        align-items: start !important;
    }

    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .info-item > span:not(.display-label) {
        text-align: left !important;
    }

    body :is(#customer-profile, #vendor-detail) :where(.customer-profile-value-line, .record-detail-value-line) {
        justify-content: flex-start !important;
    }

    body #customer-profile .profile-stats-grid,
    body #vendor-detail .vendor-financial-summary {
        grid-template-columns: 1fr !important;
    }
}

/* Detail system refinement: compact, balanced record workspaces. */
body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header,
body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-layout,
body #vendor-detail .vendor-review-banner {
    max-width: none !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header {
    align-items: center !important;
    min-height: 88px !important;
    margin-bottom: 18px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main {
    align-items: center !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-heading-copy h1 {
    font-size: clamp(26px, 2.8vw, 36px) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-layout {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

/* Order details: primary facts, customer/documents, then notes. */
body #order-detail .order-summary-card {
    grid-column: 1 / -1 !important;
}

body #order-detail .order-customer-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
}

body #order-detail .order-documents-card {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

body #order-detail .order-notes-card {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
}

/* Customer details: facts and metrics first, then notes/documents and history. */
body #customer-profile .profile-info-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
}

body #customer-profile .profile-stats-grid {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
}

body #customer-profile .profile-notes-card {
    grid-column: 1 !important;
    grid-row: 3 !important;
}

body #customer-profile .profile-documents-card {
    grid-column: 2 !important;
    grid-row: 3 !important;
}

body #customer-profile .profile-orders-card {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
}

/* Vendor details: facts and compliance, then notes/documents and orders. */
body #vendor-detail .record-detail-layout > .detail-info-card:not(.vendor-notes-card) {
    grid-column: 1 / -1 !important;
}

body #vendor-detail .vendor-notes-card {
    grid-column: 1 !important;
    grid-row: 3 !important;
}

body #vendor-detail .detail-documents-card {
    grid-column: 2 !important;
    grid-row: 3 !important;
}

body #vendor-detail .detail-orders-card {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
}

/* Employee details remain deliberately simple and scan-friendly. */
body #employee-detail .record-detail-card {
    grid-column: 1 / -1 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > h3 {
    min-height: 50px !important;
    padding: 10px 14px !important;
    background: var(--smpl-paper) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid,
body #customer-profile .profile-info-card > .info-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 12px !important;
    background: var(--smpl-paper) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid > .info-item,
body #customer-profile .profile-info-card > .info-grid > .info-item {
    display: flex !important;
    min-width: 0 !important;
    min-height: 76px !important;
    padding: 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 7px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-surface) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid > .info-item.full-width,
body #customer-profile .profile-info-card > .info-grid > .info-item.full-width {
    grid-column: 1 / -1 !important;
}

body #customer-profile .profile-info-card > .info-grid:first-of-type > .info-item:nth-child(3) {
    grid-column: 1 / -1 !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .info-item > span:not(.display-label) {
    width: 100% !important;
    text-align: left !important;
}

body :is(#customer-profile, #vendor-detail) :where(.customer-profile-value-line, .record-detail-value-line) {
    justify-content: flex-start !important;
}

body :is(#customer-profile, #vendor-detail) :where(#profileType, #profileStatus, #detailVendorStatus .record-status-badge),
body #employee-detail .employee-status-badge {
    width: fit-content !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail) :where(.order-notes-card, .profile-notes-card, .vendor-notes-card),
body :is(#order-detail, #customer-profile, #vendor-detail) :where(.order-documents-card, .profile-documents-card, .detail-documents-card) {
    min-height: 280px !important;
}

body :is(#customer-profile, #vendor-detail) :where(.profile-notes-card, .vendor-notes-card) .notes-section {
    min-height: 226px !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.documents-list) {
    min-height: 226px !important;
}

body #customer-profile .profile-stats-grid {
    gap: 8px !important;
}

body #customer-profile .profile-stats-grid .stat-card {
    min-height: 78px !important;
    padding: 12px !important;
}

body #vendor-detail .vendor-financial-summary {
    margin: 12px !important;
}

body #employee-detail :where(#employeeTotalOrders, #employeeActiveOrders, #employeeCompletedOrders, #employeeTotalRevenue, #employeeTotalProfit),
body #order-detail :where(#detailOrderRevenue, #detailOrderCost, #detailOrderProfit),
body #vendor-detail :where(#vendorTotalValue, #vendorTotalCost, #vendorTotalProfit) {
    font-size: 15px !important;
    font-weight: 750 !important;
    font-variant-numeric: tabular-nums;
}

body #vendor-review-detail .vendor-review-detail-content {
    gap: 14px !important;
}

body #vendor-review-detail .vendor-review-card {
    padding: 0 !important;
    overflow: hidden !important;
}

body #vendor-review-detail .vendor-review-card > h2 {
    min-height: 50px !important;
    margin: 0 !important;
    padding: 14px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    font-size: 14px !important;
}

body #vendor-review-detail .vendor-review-card > :not(h2) {
    margin-right: 14px !important;
    margin-left: 14px !important;
}

body #vendor-review-detail .vendor-review-card > :last-child {
    margin-bottom: 14px !important;
}

@media (max-width: 1000px) {
    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-layout {
        grid-template-columns: 1fr !important;
    }

    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-layout > * {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid,
    body #customer-profile .profile-info-card > .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header {
        min-height: 0 !important;
        padding-bottom: 14px !important;
    }

    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid,
    body #customer-profile .profile-info-card > .info-grid {
        grid-template-columns: 1fr !important;
    }

    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) :where(.record-detail-card, .detail-info-card) > .info-grid > .info-item,
    body #customer-profile .profile-info-card > .info-grid > .info-item,
    body #customer-profile .profile-info-card > .info-grid:first-of-type > .info-item:nth-child(3) {
        grid-column: 1 !important;
    }

    body #customer-profile .profile-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Detail-page back navigation: quiet, aligned, and secondary to the record. */
body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header {
    align-items: flex-end !important;
    min-height: 0 !important;
    padding-bottom: 18px !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main,
body #customer-profile .customer-detail-header-main {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 11px !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary,
body #vendor-review-detail .vendor-review-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: fit-content !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--smpl-text-muted) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transition: color 140ms ease !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary i,
body #vendor-review-detail .vendor-review-back i {
    display: inline-grid !important;
    place-items: center !important;
    width: 28px !important;
    height: 28px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    font-size: 10px !important;
    transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, transform 140ms ease !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary:hover,
body #vendor-review-detail .vendor-review-back:hover {
    color: var(--smpl-ink) !important;
    border: 0 !important;
    background: transparent !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary:hover i,
body #vendor-review-detail .vendor-review-back:hover i {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
    transform: translateX(-2px) !important;
}

body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary:focus-visible,
body #vendor-review-detail .vendor-review-back:focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 4px !important;
}

body #vendor-review-detail .vendor-review-detail-heading {
    display: flex !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 11px !important;
}

@media (max-width: 900px) {
    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header {
        align-items: stretch !important;
    }
}

@media (max-width: 720px) {
    body :is(#order-detail, #customer-profile, #vendor-detail, #employee-detail) .record-detail-header-main > .btn-secondary,
    body #vendor-review-detail .vendor-review-back {
        width: fit-content !important;
        justify-content: flex-start !important;
    }
}

/* Customer details: one clean content rail with balanced supporting cards. */
body #customer-profile .profile-container.record-detail-layout {
    grid-template-columns: minmax(0, 1fr) !important;
}

body #customer-profile .profile-container.record-detail-layout > * {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    min-width: 0 !important;
}

body #customer-profile .customer-detail-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}

body #customer-profile .customer-detail-actions > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    box-shadow: none !important;
}

body #customer-profile .customer-detail-actions .btn-secondary {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #customer-profile .customer-detail-actions .btn-secondary:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #customer-profile .customer-detail-actions .btn-danger {
    color: var(--smpl-danger) !important;
    border: 1px solid var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #customer-profile .customer-detail-actions .btn-danger:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-danger) !important;
    background: var(--smpl-danger) !important;
}

body #customer-profile .customer-profile-support-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 14px !important;
}

body #customer-profile .customer-profile-support-grid > * {
    min-width: 0 !important;
    height: 100% !important;
}

body #customer-profile .customer-profile-support-grid :where(.profile-notes-card, .profile-documents-card) {
    min-height: 280px !important;
}

body #customer-profile .profile-orders-card {
    grid-column: 1 !important;
    grid-row: auto !important;
}

@media (max-width: 900px) {
    body #customer-profile .record-detail-header {
        align-items: flex-start !important;
    }

    body #customer-profile .customer-detail-actions {
        justify-content: flex-start !important;
    }

    body #customer-profile .customer-profile-support-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 520px) {
    body #customer-profile .customer-detail-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
    }
}

/* ========================================================================== */
/* Responsive application frame                                               */
/* Keep page-level geometry fluid; wide datasets own their scrolling surface. */
/* ========================================================================== */

body :where(
    .content-section,
    .content-section.active,
    .dashboard-overview,
    .pipeline-page,
    .workflow-hub-section,
    .workflow-stage-section,
    .page-header,
    .reports-header,
    .smpl-section-header,
    .smpl-section-header-copy,
    .smpl-section-header-actions,
    .header-content,
    .header-text,
    .header-actions,
    .page-actions,
    .toolbar,
    .filters,
    .filter-row,
    .form-grid,
    .card-grid,
    .stats-grid,
    .summary-grid,
    .financial-grid,
    .workflow-overview-grid,
    .scheduling-workspace,
    .closeout-workspace
) {
    min-width: 0;
}

body :where(
    .main-content,
    .content-section,
    .content-section.active,
    .pipeline-page,
    .workflow-hub-section,
    .workflow-stage-section
) {
    width: 100%;
    max-width: 100%;
}

body :where(
    .page-header,
    .reports-header,
    .header-content,
    .header-actions,
    .page-actions,
    .toolbar,
    .filters,
    .filter-row,
    .section-header,
    .panel-header,
    .card-header
) > * {
    min-width: 0;
    max-width: 100%;
}

body :where(
    .table-container,
    .table-wrapper,
    .table-wrap,
    .responsive-table,
    .orders-table-container,
    .customers-table-container,
    .vendors-table-container,
    .employees-table-container,
    .users-table-container,
    .payments-table-container,
    .accounting-table-container,
    .reports-table-container,
    .vendor-review-table-wrap
) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

body :where(.modal-content, .workflow-dialog-panel, .confirm-modal) {
    width: min(calc(100% - 24px), var(--modal-width, 720px));
    max-width: calc(100vw - 24px);
}

/* Dashboard cards keep their desktop density, then wrap before they compress. */
@media (max-width: 1280px) {
    body #dashboard.dashboard-overview :where(
        .kpi-board-metrics,
        .executive-health-grid,
        .mini-charts-grid,
        .top-performance-grid,
        .business-intelligence-grid
    ) {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body #dashboard.dashboard-overview .kpi-stat.kpi-card:not(:last-child) {
        border-right: 0 !important;
        border-bottom: 1px solid var(--smpl-line) !important;
    }
}

@media (max-width: 900px) {
    body #dashboard.dashboard-overview :where(
        .kpi-board-metrics,
        .executive-health-grid,
        .mini-charts-grid,
        .top-performance-grid,
        .business-intelligence-grid,
        .revenue-control-grid,
        .financial-grid
    ) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body #dashboard.dashboard-overview :where(
        .executive-command-split,
        .orders-overview-grid,
        .overview-lower-grid,
        .workflow-overview-grid
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 640px) {
    body #dashboard.dashboard-overview :where(
        .kpi-board-metrics,
        .executive-health-grid,
        .mini-charts-grid,
        .top-performance-grid,
        .business-intelligence-grid,
        .revenue-control-grid,
        .financial-grid
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body :where(
        .page-header,
        .reports-header,
        .header-content,
        .header-actions,
        .page-actions,
        .toolbar,
        .filters,
        .filter-row,
        .section-header,
        .panel-header,
        .card-header
    ) {
        flex-wrap: wrap;
    }
}

/* Pipeline: the board is the sole horizontal scrolling owner. */
body #pipeline,
body #pipeline .pipeline-page,
body #pipeline .pipeline-header-bar,
body #pipeline .pipeline-actions,
body #pipeline .pipeline-filter-bar,
body #pipeline .pipeline-search-bar,
body #pipeline .pipeline-employee-filter {
    min-width: 0 !important;
    max-width: 100% !important;
}

body #pipeline .pipeline-page {
    overflow: visible !important;
}

body #pipeline #stagesContainer.stages-container {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
}

@media (max-width: 1180px) {
    body #pipeline .pipeline-header-bar.smpl-section-header {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
    }

    body #pipeline .pipeline-title-block {
        min-width: 0 !important;
    }

    body #pipeline .pipeline-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}

@media (max-width: 760px) {
    body #pipeline .pipeline-filter-bar {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body #pipeline .pipeline-actions,
    body #pipeline .pipeline-toolbar-buttons {
        width: 100% !important;
    }
}

@media (max-width: 420px) {
    body #pipeline .pipeline-stats .stat-item {
        min-width: 0 !important;
        padding-inline: 8px !important;
    }

    body #pipeline #stagesContainer.stages-container > .stage-column {
        flex-basis: calc(100vw - 56px) !important;
        min-width: calc(100vw - 56px) !important;
        max-width: calc(100vw - 56px) !important;
    }
}

/* Vendors header: clean type hierarchy without the legacy handshake tile. */
body #vendors .smpl-section-header {
    align-items: center !important;
}

body #vendors .smpl-section-header-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
}

body #vendors .smpl-section-header-copy h1::before,
body #vendors .smpl-section-header-copy h1::after {
    content: none !important;
    display: none !important;
}

body #vendors .smpl-section-header-copy h1 {
    display: block !important;
    min-width: 0 !important;
}

body #vendors .smpl-section-header-actions {
    align-self: center !important;
}

@media (max-width: 900px) {
    body #vendors .smpl-section-header {
        align-items: start !important;
    }

    body #vendors .smpl-section-header-actions {
        align-self: start !important;
    }
}

/* Payments: finance workspace aligned to the SMPLFix monochrome system. */
body #payments {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body #payments .smpl-section-header {
    margin-bottom: 24px !important;
}

body #payments .payments-title-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
}

body #payments .payments-title-block h1 {
    color: var(--smpl-ink) !important;
    font: 700 clamp(30px, 3vw, 40px)/1.12 var(--smpl-font-ui) !important;
    letter-spacing: -0.035em !important;
}

body #payments .payments-toolbar {
    margin: 0 0 14px !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #payments .payments-search-filter {
    display: grid !important;
    grid-template-columns: minmax(280px, 1fr) auto !important;
    align-items: end !important;
    gap: 12px !important;
}

body #payments :where(.payments-search, .payments-filter-control) {
    display: flex !important;
    min-width: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
}

body #payments .payments-control-label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

body #payments .payments-search-control {
    position: relative !important;
    display: block !important;
}

body #payments .payments-search-control > i {
    position: absolute !important;
    top: 50% !important;
    left: 14px !important;
    z-index: 1 !important;
    color: var(--smpl-text-muted) !important;
    transform: translateY(-50%) !important;
}

body #payments :where(.payments-search input, .filter-select) {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 600 13px/1.3 var(--smpl-font-ui) !important;
}

body #payments .payments-search input {
    padding: 0 14px 0 40px !important;
}

body #payments :where(.payments-search input, .filter-select):focus {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 1px !important;
    border-color: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body #payments .payments-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(132px, 1fr)) auto !important;
    align-items: end !important;
    gap: 8px !important;
}

body #payments .payments-refresh-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: auto !important;
    height: 42px !important;
    padding: 0 13px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font: 700 11px/1 var(--smpl-font-ui) !important;
}

body #payments .payments-refresh-btn:hover,
body #payments .payments-refresh-btn:focus-visible {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    outline: none !important;
    background: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body #payments .payments-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
}

body #payments .payments-stats .stat-item {
    display: flex !important;
    min-width: 0 !important;
    min-height: 88px !important;
    padding: 15px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
    gap: 12px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #payments .payments-stats .stat-item::after {
    content: none !important;
    display: none !important;
}

body #payments .payment-stat-icon {
    display: inline-grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    font-size: 14px !important;
}

body #payments .stat-item.completed .payment-stat-icon {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

body #payments .stat-item.pending .payment-stat-icon {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
}

body #payments .stat-item.failed .payment-stat-icon {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #payments .payments-stats .stat-value,
body #payments .payments-stats :where(.completed, .pending, .failed) .stat-value {
    color: var(--smpl-ink) !important;
    font: 750 24px/1 var(--smpl-font-ui) !important;
    font-variant-numeric: tabular-nums !important;
}

body #payments .payments-stats .stat-label {
    margin-top: 7px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
}

body #payments .payments-table-container {
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #payments .payments-table {
    min-width: 1040px !important;
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

body #payments .payments-table thead {
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #payments .payments-table th {
    padding: 13px 14px !important;
    color: var(--smpl-text-muted) !important;
    background: var(--smpl-surface) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
}

body #payments .payments-table td {
    height: 58px !important;
    padding: 11px 14px !important;
    color: var(--smpl-ink) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    font-size: 12px !important;
}

body #payments .payments-table tbody tr:hover td {
    background: var(--smpl-surface) !important;
}

body #payments :where(.payment-order-id, .payment-amount, .payment-customer-name) {
    color: var(--smpl-ink) !important;
}

body #payments .payment-invoice-link {
    color: var(--smpl-text-muted) !important;
}

body #payments .method-badge {
    min-height: 24px !important;
    padding: 3px 8px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

body #payments .payment-status-select {
    width: 122px !important;
    height: 32px !important;
    padding: 0 28px 0 11px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 700 10px/1 var(--smpl-font-mono) !important;
    letter-spacing: 0.035em !important;
    text-transform: uppercase !important;
}

body #payments .payment-status-select.status-bidding {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #payments .payment-status-select.status-pending {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
}

body #payments :where(.payment-status-select.status-received, .payment-status-select.status-completed) {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

body #payments .payment-status-select.status-failed {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #payments :where(.payment-status-select.status-refunded, .payment-status-select.status-cancelled) {
    color: var(--smpl-text-muted) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #payments .payment-status-select:focus {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 1px !important;
    box-shadow: none !important;
}

body #payments .payments-table td:last-child {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

body #payments .payments-table .btn-action {
    display: inline-grid !important;
    place-items: center !important;
    width: 32px !important;
    height: 32px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #payments .payments-table .btn-action:not(.delete):hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #payments .payments-table .btn-action.delete {
    color: var(--smpl-danger) !important;
    border-color: var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #payments .payments-table .btn-action.delete:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-danger) !important;
    background: var(--smpl-danger) !important;
}

@media (max-width: 1180px) {
    body #payments .payments-search-filter {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body #payments .payments-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto !important;
    }
}

@media (max-width: 820px) {
    body #payments .payments-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    body #payments .payments-filters,
    body #payments .payments-stats {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body #payments .payments-refresh-btn {
        width: 100% !important;
    }
}

/* Payments table: fixed column rhythm and dependable cell alignment. */
body #payments .payments-table-container {
    width: 100% !important;
    margin: 0 !important;
}

body #payments .payments-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

body #payments .payments-col-payment { width: 14% !important; }
body #payments .payments-col-invoice { width: 11% !important; }
body #payments .payments-col-customer { width: 17% !important; }
body #payments .payments-col-amount { width: 10% !important; }
body #payments .payments-col-method { width: 11% !important; }
body #payments .payments-col-status { width: 14% !important; }
body #payments .payments-col-date { width: 14% !important; }
body #payments .payments-col-actions { width: 9% !important; }

body #payments .payments-table :where(th, td) {
    box-sizing: border-box !important;
    vertical-align: middle !important;
    text-align: left !important;
}

body #payments .payments-table th:first-child {
    border-top-left-radius: calc(var(--smpl-radius) - 1px) !important;
}

body #payments .payments-table th:last-child {
    border-top-right-radius: calc(var(--smpl-radius) - 1px) !important;
}

body #payments .payments-table :where(th, td):nth-child(4) {
    text-align: right !important;
}

body #payments .payments-table :where(th, td):nth-child(8) {
    text-align: center !important;
}

body #payments .payments-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

body #payments .payments-table td:last-child {
    display: table-cell !important;
    padding-right: 10px !important;
    padding-left: 10px !important;
}

body #payments .payment-row-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
}

body #payments :where(.payment-order-id, .payment-invoice-link, .payment-customer-name) {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #payments .payment-amount {
    display: block !important;
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
}

body #payments .method-badge {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body #payments .payments-table td:nth-child(7) {
    color: var(--smpl-text-muted) !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
}

html body #payments select.payment-status-select {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
}

html body #payments select.payment-status-select.status-neutral-payment {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background-color: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: inset 3px 0 0 var(--smpl-ink) !important;
}

@media (max-width: 1180px) {
    body #payments .payments-table {
        min-width: 980px !important;
    }
}

/* Reports and analytics: restrained, data-first SMPLFix workspace. */
body #reports.reports-workspace {
    --report-bg: transparent;
    --report-panel: var(--smpl-paper);
    --report-panel-soft: var(--smpl-surface);
    --report-border: var(--smpl-line);
    --report-border-strong: var(--smpl-soft);
    --report-text: var(--smpl-ink);
    --report-muted: var(--smpl-text-muted);
    --report-soft-text: #555559;
    --report-blue: var(--smpl-ink);
    --report-blue-dark: var(--smpl-ink);
    --report-blue-soft: var(--smpl-surface);
    --report-green: var(--smpl-success);
    --report-amber: var(--smpl-warning);
    --report-red: var(--smpl-danger);
    --report-shadow: none;
    --report-shadow-hover: none;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--smpl-ink) !important;
    background: transparent !important;
    background-image: none !important;
}

body #reports .reports-header {
    margin-bottom: 22px !important;
}

body #reports .reports-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    max-width: min(760px, 62vw) !important;
}

body #reports .report-update-meta {
    display: grid !important;
    min-width: 150px !important;
    min-height: 40px !important;
    padding: 7px 10px !important;
    align-content: center !important;
    gap: 2px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    font: 700 9px/1.25 var(--smpl-font-mono) !important;
    letter-spacing: 0.035em !important;
    text-align: left !important;
    text-transform: uppercase !important;
}

body #reports .report-updated-at {
    color: var(--smpl-text-muted) !important;
    font: inherit !important;
}

body #reports .reports-header-actions :where(button, .btn-secondary) {
    min-height: 40px !important;
    border-radius: var(--smpl-radius-sm) !important;
    box-shadow: none !important;
}

body #reports #reportExportButton {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #reports #reportExportButton:hover {
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

body #reports .report-export-options {
    width: 260px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-shadow) !important;
}

body #reports .report-export-options button {
    color: var(--smpl-ink) !important;
    border-bottom-color: var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #reports .report-export-options button:hover {
    background: var(--smpl-surface) !important;
}

body #reports .report-export-options i {
    color: var(--smpl-ink) !important;
}

body #reports .reports-filter-bar {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin: 0 0 16px !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body #reports .report-filter-topline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
}

body #reports .report-date-presets {
    display: flex !important;
    gap: 6px !important;
    padding: 0 !important;
    overflow-x: auto !important;
}

body #reports :where(.report-date-presets, .reports-tabs) button {
    min-height: 34px !important;
    padding: 7px 11px !important;
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    font: 700 10px/1.2 var(--smpl-font-ui) !important;
}

body #reports :where(.report-date-presets, .reports-tabs) button:hover {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
}

body #reports :where(.report-date-presets, .reports-tabs) button.active,
body #reports :where(.report-date-presets, .reports-tabs) button[aria-selected="true"] {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #reports .report-more-filters {
    min-height: 34px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #reports .report-more-filters[aria-expanded="true"] {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #reports :where(.report-more-filters span, #reportDirtyCount) {
    color: var(--smpl-paper) !important;
    background: var(--smpl-ink) !important;
}

body #reports .report-filter-grid {
    gap: 8px !important;
}

body #reports .report-primary-filters {
    grid-template-columns: repeat(5, minmax(130px, 1fr)) !important;
}

body #reports .report-advanced-filters {
    grid-template-columns: repeat(4, minmax(130px, 1fr)) !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--smpl-line) !important;
}

body #reports .report-filter-grid label {
    gap: 6px !important;
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
}

body #reports .report-filter-grid :where(input, select) {
    min-height: 42px !important;
    padding: 0 11px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 600 12px/1.3 var(--smpl-font-ui) !important;
    text-transform: none !important;
}

body #reports .report-filter-grid :where(input, select):focus {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 1px !important;
    border-color: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body #reports .report-active-filters button {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #reports .report-filter-actions {
    min-height: 44px !important;
    padding-top: 12px !important;
    justify-content: flex-end !important;
    border-top: 1px solid var(--smpl-line) !important;
}

body #reports .report-filter-actions .btn-primary {
    min-width: 122px !important;
    height: 40px !important;
    border-radius: var(--smpl-radius-sm) !important;
    box-shadow: none !important;
}

body #reports .report-filter-dirty {
    color: var(--smpl-warning) !important;
}

body #reports .reports-tabs {
    display: flex !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 6px !important;
    overflow-x: auto !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #reports .reports-tabs button {
    border-color: transparent !important;
    background: transparent !important;
}

body #reports .reports-tabs button.active,
body #reports .reports-tabs button[aria-selected="true"] {
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #reports :where(.report-definitions-panel, .reports-status, .reports-empty-inline, .report-tab-summary) {
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
}

body #reports .report-definition-grid article,
body #reports .report-date-basis {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
}

body #reports :where(.reports-status > i, .reports-empty-inline > i, .report-kpi-icon, .report-card-icon) {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
}

body #reports .report-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

body #reports .report-kpi-card {
    min-height: 88px !important;
    padding: 14px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #reports .report-kpi-card:hover {
    border-color: var(--smpl-soft) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #reports .report-kpi-card > span:not(.report-kpi-icon) {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.25 var(--smpl-font-mono) !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
}

body #reports .report-kpi-card strong {
    color: var(--smpl-ink) !important;
    font-size: 22px !important;
    font-variant-numeric: tabular-nums !important;
}

body #reports .report-kpi-card small,
body #reports .report-tab-summary strong,
body #reports .reports-section-heading span {
    color: var(--smpl-text-muted) !important;
}

body #reports .report-metric-strip {
    gap: 10px !important;
}

body #reports .report-metric-strip > div,
body #reports .analytics-card {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}

body #reports .report-metric-strip > div::before,
body #reports .analytics-card::before {
    content: none !important;
    display: none !important;
}

body #reports .analytics-card:hover {
    border-color: var(--smpl-soft) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #reports .report-metric-strip i {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-surface) !important;
}

body #reports .report-metric-strip strong,
body #reports .single-report-number {
    color: var(--smpl-ink) !important;
    font-variant-numeric: tabular-nums !important;
}

body #reports .single-report-number {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
}

body #reports .chart-grid-line {
    stroke: var(--smpl-line) !important;
}

body #reports .chart-line {
    stroke: var(--smpl-ink) !important;
}

body #reports .chart-area {
    fill: rgba(11, 11, 12, 0.08) !important;
}

body #reports .chart-point {
    fill: var(--smpl-paper) !important;
    stroke: var(--smpl-ink) !important;
}

body #reports :where(.report-profit-line, .report-profit-point) {
    stroke: var(--smpl-text-muted) !important;
}

body #reports .bar-track {
    background: var(--smpl-line) !important;
}

body #reports .report-table-wrap {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #reports .report-table :where(th, td) {
    padding: 11px 12px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--smpl-line) !important;
}

body #reports .report-table th {
    color: var(--smpl-text-muted) !important;
    background: var(--smpl-surface) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.055em !important;
}

body #reports .report-table td {
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
    font-size: 12px !important;
}

body #reports .report-table tbody tr:hover td {
    background: var(--smpl-surface) !important;
}

body #reports :where(.reports-tabs button, .report-date-presets button, .report-kpi-card, .report-bar-button, .report-more-filters, .report-export-options button):focus-visible {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
}

body #reports .reports-skeleton .skeleton-block {
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    animation: none !important;
}

@media (max-width: 1280px) {
    body #reports .reports-header {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
    }

    body #reports .reports-header-actions {
        justify-content: flex-start !important;
        max-width: none !important;
    }

    body #reports .report-primary-filters,
    body #reports .report-advanced-filters {
        grid-template-columns: repeat(3, minmax(140px, 1fr)) !important;
    }
}

@media (max-width: 820px) {
    body #reports .report-filter-topline {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body #reports .report-more-filters {
        width: fit-content !important;
    }

    body #reports .report-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    body #reports .reports-header-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }

    body #reports .report-update-meta,
    body #reports .reports-header-actions :where(button, .report-export-menu, .report-export-menu > button) {
        width: 100% !important;
        max-width: none !important;
    }

    body #reports .report-primary-filters,
    body #reports .report-advanced-filters,
    body #reports .report-kpi-grid,
    body #reports .report-metric-strip {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Employees: clean list header and detail-owned record actions. */
body #employees .smpl-section-header {
    align-items: center !important;
}

body #employees .smpl-section-header-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
}

body #employees .smpl-section-header-copy h1 {
    display: block !important;
    min-width: 0 !important;
}

body #employees .smpl-section-header-copy h1::before,
body #employees .smpl-section-header-copy h1::after {
    content: none !important;
    display: none !important;
}

body #employees .smpl-section-header-actions {
    align-self: center !important;
}

body #employees .employees-table {
    table-layout: fixed !important;
}

body #employees .employees-table :where(th, td) {
    vertical-align: middle !important;
}

body #employee-detail .employee-detail-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}

body #employee-detail .employee-detail-actions > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    box-shadow: none !important;
}

body #employee-detail .employee-detail-actions .btn-secondary {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #employee-detail .employee-detail-actions .btn-secondary:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #employee-detail .employee-detail-actions .btn-danger {
    color: var(--smpl-danger) !important;
    border: 1px solid var(--smpl-danger-line) !important;
    background: var(--smpl-danger-bg) !important;
}

body #employee-detail .employee-detail-actions .btn-danger:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-danger) !important;
    background: var(--smpl-danger) !important;
}

@media (max-width: 900px) {
    body #employees .smpl-section-header {
        align-items: start !important;
    }

    body #employees .smpl-section-header-actions {
        align-self: start !important;
    }

    body #employee-detail .record-detail-header {
        align-items: flex-start !important;
    }

    body #employee-detail .employee-detail-actions {
        justify-content: flex-start !important;
    }
}

@media (max-width: 520px) {
    body #employee-detail .employee-detail-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
    }
}

/* Users: clear access-management hierarchy in the SMPLFix brand. */
body #users .smpl-section-header {
    align-items: center !important;
    margin-bottom: 20px !important;
}

body #users .smpl-section-header-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
}

body #users .users-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

body #users .header-stats {
    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
}

body #users .header-stats .stat-badge {
    display: inline-flex !important;
    min-height: 42px !important;
    padding: 7px 11px !important;
    align-items: center !important;
    gap: 7px !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    font: 700 10px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.035em !important;
    text-transform: uppercase !important;
}

body #users .header-stats .stat-badge.pending {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
}

body #users .header-stats .stat-badge.active {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

body #users .header-stats .stat-badge span {
    color: currentColor !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums !important;
}

body #users .users-table-container {
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
    scrollbar-gutter: auto !important;
}

body #users .users-table {
    width: 100% !important;
    min-width: 1080px !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

body #users .users-col-user { width: 17% !important; }
body #users .users-col-email { width: 20% !important; }
body #users .users-col-role { width: 13% !important; }
body #users .users-col-signed-up { width: 11% !important; }
body #users .users-col-status { width: 11% !important; }
body #users .users-col-actions { width: 28% !important; }

body #users .users-table thead {
    position: static !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #users .users-table :where(th, td) {
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 12px 14px !important;
    vertical-align: middle !important;
    text-align: left !important;
}

body #users .users-table th {
    color: var(--smpl-text-muted) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.065em !important;
    text-transform: uppercase !important;
}

body #users .users-table th:first-child {
    border-top-left-radius: calc(var(--smpl-radius) - 1px) !important;
}

body #users .users-table th:last-child {
    border-top-right-radius: calc(var(--smpl-radius) - 1px) !important;
}

body #users .users-table td {
    min-height: 62px !important;
    color: var(--smpl-ink) !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    font-size: 12px !important;
}

body #users .users-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

body #users .users-table tbody tr:hover {
    background: transparent !important;
    box-shadow: none !important;
}

body #users .users-table tbody tr:hover td {
    background: var(--smpl-surface) !important;
}

body #users :where(.user-name, .user-email) {
    color: var(--smpl-ink) !important;
    font-weight: 650 !important;
}

body #users :where(.user-id, .user-date-cell, .requested-role) {
    color: var(--smpl-text-muted) !important;
    font-size: 10px !important;
}

body #users :where(.role-badge, .status-badge) {
    min-height: 24px !important;
    padding: 3px 8px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 999px !important;
    background: var(--smpl-surface) !important;
    background-image: none !important;
    box-shadow: none !important;
    font: 700 9px/1.2 var(--smpl-font-mono) !important;
    letter-spacing: 0.035em !important;
    text-transform: uppercase !important;
}

body #users .role-badge.pending,
body #users .status-badge.pending {
    color: var(--smpl-warning) !important;
    border-color: var(--smpl-warning-line) !important;
    background: var(--smpl-warning-bg) !important;
}

body #users .status-badge.active {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

body #users .user-actions {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
}

body #users .user-actions.is-pending {
    flex-wrap: wrap !important;
}

body #users .role-select {
    width: 132px !important;
    max-width: 132px !important;
    min-height: 34px !important;
    padding: 0 28px 0 9px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 7px !important;
    background-color: var(--smpl-paper) !important;
    box-shadow: none !important;
    font: 650 11px/1.2 var(--smpl-font-ui) !important;
}

body #users .role-select:focus {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 1px !important;
    border-color: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body #users .btn-assign-role {
    display: inline-flex !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    color: var(--smpl-paper) !important;
    border: 1px solid var(--smpl-ink) !important;
    border-radius: 7px !important;
    background: var(--smpl-ink) !important;
    box-shadow: none !important;
    font: 700 10px/1 var(--smpl-font-ui) !important;
}

body #users .btn-assign-role:hover {
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

body #users .btn-assign-role.approve {
    color: var(--smpl-success) !important;
    border-color: var(--smpl-success-line) !important;
    background: var(--smpl-success-bg) !important;
}

body #users .btn-assign-role.approve:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-success) !important;
    background: var(--smpl-success) !important;
}

body #users .users-table .action-btn.delete {
    display: inline-grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    color: var(--smpl-danger) !important;
    border: 1px solid var(--smpl-danger-line) !important;
    border-radius: 7px !important;
    background: var(--smpl-danger-bg) !important;
    box-shadow: none !important;
}

body #users .users-table .action-btn.delete:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-danger) !important;
    background: var(--smpl-danger) !important;
}

body #users .users-empty-state {
    color: var(--smpl-text-muted) !important;
    background: var(--smpl-paper) !important;
}

body #users .users-empty-state i {
    color: var(--smpl-soft) !important;
}

/* Add User dialog */
body #addUserModal {
    padding: 20px !important;
    background: rgba(11, 11, 12, 0.55) !important;
    backdrop-filter: none !important;
}

body #addUserModal .user-create-modal {
    width: min(94vw, 680px) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 14px !important;
    background: var(--smpl-paper) !important;
    box-shadow: var(--smpl-shadow) !important;
}

body #addUserModal .user-create-header {
    padding: 22px 24px 18px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
    background-image: none !important;
}

body #addUserModal .user-create-heading-icon {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-surface) !important;
    box-shadow: none !important;
    font-size: 15px !important;
}

body #addUserModal .user-create-eyebrow {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.08em !important;
}

body #addUserModal .user-create-header h2 {
    color: var(--smpl-ink) !important;
    font-size: 23px !important;
}

body #addUserModal .user-create-header p {
    color: var(--smpl-text-muted) !important;
}

body #addUserModal .user-create-close {
    color: var(--smpl-text-muted) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 8px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #addUserModal .user-create-close:hover {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #addUserModal .user-create-body {
    padding: 22px 24px !important;
    background: var(--smpl-paper) !important;
}

body #addUserModal .user-create-field label {
    color: var(--smpl-text-muted) !important;
    font: 700 9px/1.3 var(--smpl-font-mono) !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
}

body #addUserModal .user-create-input > i,
body #addUserModal .user-create-field small i,
body #addUserModal .user-create-footer > p i {
    color: var(--smpl-text-muted) !important;
}

body #addUserModal .user-create-input :where(input, select) {
    height: 44px !important;
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius-sm) !important;
    background-color: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #addUserModal .user-create-input :where(input, select):focus {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 1px !important;
    border-color: var(--smpl-ink) !important;
    box-shadow: none !important;
}

body #addUserModal .user-create-input:focus-within > i {
    color: var(--smpl-ink) !important;
}

body #addUserModal .user-create-password-toggle {
    color: var(--smpl-text-muted) !important;
}

body #addUserModal .user-create-password-toggle:hover,
body #addUserModal .user-create-password-toggle:focus-visible {
    color: var(--smpl-ink) !important;
    background: var(--smpl-surface) !important;
}

body #addUserModal .user-create-email-card {
    border: 1px solid var(--smpl-line) !important;
    border-radius: var(--smpl-radius) !important;
    background: var(--smpl-surface) !important;
}

body #addUserModal .user-create-email-icon {
    color: var(--smpl-ink) !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 9px !important;
    background: var(--smpl-paper) !important;
    box-shadow: none !important;
}

body #addUserModal .user-create-email-option strong {
    color: var(--smpl-ink) !important;
}

body #addUserModal .user-create-email-option span,
body #addUserModal .user-create-field small,
body #addUserModal .user-create-footer > p {
    color: var(--smpl-text-muted) !important;
}

body #addUserModal .user-create-switch > span {
    background: var(--smpl-soft) !important;
}

body #addUserModal .user-create-switch input:checked + span {
    background: var(--smpl-ink) !important;
}

body #addUserModal .user-create-switch input:focus-visible + span {
    outline: 2px solid var(--smpl-ink) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

body #addUserModal .user-create-footer {
    padding: 16px 24px !important;
    border-top: 1px solid var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #addUserModal .user-create-actions button {
    min-height: 40px !important;
    border-radius: var(--smpl-radius-sm) !important;
    box-shadow: none !important;
    transform: none !important;
}

body #addUserModal .user-create-actions .btn-primary {
    color: var(--smpl-paper) !important;
    border-color: var(--smpl-ink) !important;
    background: var(--smpl-ink) !important;
}

body #addUserModal .user-create-actions .btn-primary:hover {
    color: var(--smpl-ink) !important;
    background: var(--smpl-paper) !important;
}

@media (max-width: 980px) {
    body #users .smpl-section-header {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
    }

    body #users .users-header-actions {
        justify-content: flex-start !important;
    }
}

@media (max-width: 640px) {
    body #users .users-header-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }

    body #users .header-stats {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body #users .users-header-actions > .btn-primary {
        width: 100% !important;
    }

    body #users .users-table-container {
        margin: 0 !important;
        border-right: 1px solid var(--smpl-line) !important;
        border-left: 1px solid var(--smpl-line) !important;
        border-radius: var(--smpl-radius) !important;
    }
}

/* Pipeline board cascade lock (must remain after legacy feature refinements). */
body #pipelineLiveStatus {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body #pipeline .stage-column.no-bid-stage {
    border: 1px solid var(--smpl-danger-line) !important;
    background: var(--smpl-surface) !important;
}

body #pipeline .stage-column.no-bid-stage::before {
    content: '';
    position: absolute;
    z-index: 13;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 12px 0 0 12px;
    background: var(--smpl-danger) !important;
}

body #pipeline .stage-column.no-bid-stage .stage-header,
body #pipeline .stage-column.no-bid-stage .stage-body {
    background: var(--smpl-paper) !important;
}

body #pipeline .stage-column.no-bid-stage .stage-title :where(h3, i) {
    color: var(--smpl-danger) !important;
}

body #pipeline .stage-header,
body #pipeline .stage-column:not(.no-bid-stage) .stage-header,
body #pipeline .new-orders-column-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: 64px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--smpl-line) !important;
    background: var(--smpl-paper) !important;
}

body #pipeline .new-orders-column {
    border-style: solid !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

body #pipeline .new-orders-column-title,
body #pipeline .new-orders-column-title i {
    color: var(--smpl-ink) !important;
}

body #pipeline .stage-column:not(.no-bid-stage) .stage-body {
    min-height: 0 !important;
    padding: 10px !important;
    background: var(--smpl-surface) !important;
}

body #pipeline :where(.record-card, .new-order-card) {
    margin-bottom: 9px !important;
    padding: 12px !important;
    overflow: visible !important;
    border: 1px solid var(--smpl-line) !important;
    border-radius: 10px !important;
    background: var(--smpl-paper) !important;
}

body #pipeline :where(.stage-actions, .record-actions) > .icon-btn,
body #pipeline .pipeline-overflow > summary.icon-btn,
body #pipeline .new-order-pickup-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 8px !important;
}

body #pipeline .record-actions {
    gap: 3px !important;
    opacity: 1 !important;
}

body #pipeline .new-orders-column .count-badge.pipeline-new-orders-badge {
    color: var(--smpl-ink) !important;
    border-color: var(--smpl-line) !important;
    background: var(--smpl-surface) !important;
}

@media (max-width: 720px) {
    body #pipeline :where(.stage-actions, .record-actions) > .icon-btn,
    body #pipeline .pipeline-overflow > summary.icon-btn,
    body #pipeline .new-order-pickup-btn {
        min-width: 44px !important;
        min-height: 44px !important;
    }
}
