.process-search-syncfusion .process-search-box {
    padding: 0;
    min-width: 0;
    overflow: hidden;
}

.process-search-syncfusion .process-search-box > .process-page-header-card,
.process-search-syncfusion .process-search-box > .process-search-filters,
.process-search-syncfusion .process-search-box > .process-grid-card {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
}

.process-search-syncfusion .process-search-box > .process-page-header-card,
.process-search-syncfusion .process-search-box > .process-search-filters {
    border-bottom: 1px solid var(--app-border-soft);
}

.process-search-syncfusion .process-search-box #ProcessSearchGrid.e-grid {
    border: 0;
}

.process-search-syncfusion .process-search-empty-state {
    display: grid;
    min-height: var(--grid-fit-card-height, 360px);
    padding: 2rem;
    place-items: center;
    color: var(--app-text-muted);
    text-align: center;
}

.process-search-syncfusion .process-search-filters {
    padding: 0.45rem 0.65rem;
}

.process-search-syncfusion .process-search-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.4rem 0.55rem;
    align-items: end;
}

.process-search-syncfusion .process-search-filter-grid .app-filter-field {
    min-width: 0;
    gap: 0.15rem;
}

.process-search-syncfusion .process-search-filter-grid .app-filter-field > span {
    font-size: 0.72rem;
    line-height: 1.2;
}

.process-search-syncfusion .process-search-filter-actions {
    gap: 0.4rem;
    align-self: end;
    flex-wrap: nowrap;
}

.process-search-syncfusion .process-search-filter-actions .app-toolbar-button {
    min-width: 0;
    padding: 0.35rem 0.4rem;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.process-search-syncfusion .process-page-header-card .app-page-title {
    font-size: 1rem;
}

/* Compact by default. The toolbar measures whether all labels leave room to search. */
.process-search-syncfusion .process-page-header-card :is(.process-search-action-button, .process-page-secondary-actions .app-toolbar-button, .app-page-header-copy .app-toolbar-button) {
    width: 40px;
    min-width: 40px;
    flex-shrink: 0;
    gap: 0;
    padding-inline: 0;
    justify-content: center;
    transition: none;
}

.process-search-syncfusion .process-page-header-card :is(.process-search-action-button, .process-page-secondary-actions .app-toolbar-button, .app-page-header-copy .app-toolbar-button) > span {
    display: none;
    white-space: nowrap;
}

.process-search-syncfusion .process-page-header-card.process-toolbar--expanded :is(.process-search-action-button, .process-page-secondary-actions .process-toolbar-labeled, .app-page-header-copy .app-toolbar-button) {
    width: auto;
    gap: 0.25rem;
    padding-inline: 0.35rem;
}

.process-search-syncfusion .process-page-header-card.process-toolbar--expanded :is(.process-search-action-button, .process-page-secondary-actions .process-toolbar-labeled, .app-page-header-copy .app-toolbar-button) > span {
    display: inline;
}

@media (max-width: 400px) {
    .process-search-syncfusion .process-search-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.process-search-syncfusion .process-search-filters .app-filter-field .e-input-group,
.process-search-syncfusion .process-search-filters .app-filter-field .e-control-wrapper {
    width: 100%;
    min-width: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-size: 0.875rem;
}

.process-search-syncfusion .shipment-search-option-filter .e-input-value {
    display: flex;
    align-items: center;
    min-height: 30px;
    padding: 0 0.65rem;
    box-sizing: border-box;
}

.process-search-syncfusion .process-page-search-input.e-input-group {
    flex: 1 1 auto;
    min-width: 180px;
    width: auto;
}

.process-search-syncfusion .process-grid-card.app-card--loading {
    position: relative;
    height: var(--grid-fit-card-height, 520px);
    min-height: 320px;
}

.process-search-syncfusion .process-grid-card:not(.app-card--loading) {
    display: flex;
    flex-direction: column;
    height: var(--grid-fit-card-height, 520px);
    min-height: 320px;
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.process-search-syncfusion .process-grid-host {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid).e-grid {
    margin: 0;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--app-text-primary);
    border-color: var(--app-border-soft);
}

/* Syncfusion can set position: relative inline when opening the chooser.
   Keep the popup out of the grid's flow and inside its visible bounds. */
:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-ccdlg.e-dialog {
    position: absolute !important;
    top: 8px !important;
    right: 8px;
    left: auto !important;
    max-height: calc(100% - 16px) !important;
    max-width: calc(100% - 16px);
    min-width: 0;
}

.shipment-list-surface .shipment-documents-table__header,
:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-headercell {
    height: 32px;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--app-accent-200) 48%, var(--app-surface-2)) 0%,
        color-mix(in srgb, var(--app-accent-200) 88%, var(--app-surface-2)) 100%);
    border-color: var(--app-border-strong);
    color: var(--app-text-primary);
}

:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-headertext {
    color: inherit;
    font-weight: 600;
}

:is(html.theme-dark, body.theme-dark) .shipment-list-surface .shipment-documents-table__header,
html.theme-dark :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-headercell,
body.theme-dark :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-headercell {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--app-accent-600) 34%, var(--app-surface-2)) 0%,
        color-mix(in srgb, var(--app-accent-600) 16%, var(--app-surface-2)) 100%);
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid),
:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) :is(.e-gridheader, .e-gridcontent, .e-content, .e-table, .e-rowcell, .e-emptyrow td, .e-gridpager) {
    background: var(--app-surface-2);
    color: var(--app-text-primary);
    border-color: var(--app-border-strong);
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-headercell {
    border-color: var(--app-border-strong);
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) :is(.e-headercell .e-icons, .e-sortnumber) {
    color: var(--app-text-muted);
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-row:hover .e-rowcell {
    background: #1e293b;
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-rowcell:is(.e-selectionbackground, .e-active) {
    background: #243d60;
    color: var(--app-text-primary);
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-rowcell a {
    color: #93c5fd;
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-pager :is(.e-pagercontainer, .e-numericitem, .e-first, .e-prev, .e-next, .e-last, .e-pp, .e-np) {
    background: var(--app-surface-2);
    color: var(--app-text-muted);
    border-color: var(--app-border-strong);
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-pager .e-currentitem {
    background: #2563eb;
    color: #fff;
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-pager :is(.e-numericitem, .e-first, .e-prev, .e-next, .e-last):hover {
    background: #243d60;
}

:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-pager .e-disable {
    opacity: 0.45;
}

:is(html.theme-dark, body.theme-dark) .process-search-syncfusion .process-search-box :is(.e-input-group, .e-control-wrapper, input.e-input, .e-input-group-icon) {
    background: var(--app-surface-2);
    color: var(--app-text-primary);
    border-color: var(--app-border-strong);
}

:is(html.theme-dark, body.theme-dark) .process-search-syncfusion .process-search-box input.e-input::placeholder {
    color: var(--app-text-secondary);
    opacity: 1;
}

:is(html.theme-dark, body.theme-dark) .process-search-syncfusion .process-year-filter__button.is-active {
    background: #243d60;
    color: #93c5fd;
}

:is(html.theme-dark, body.theme-dark) .process-search-syncfusion .process-search-box .app-toolbar-button .app-action-icon--image,
:is(html.theme-dark, body.theme-dark) :is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .app-inline-meta__icon {
    filter: brightness(1.6);
}

:is(html.theme-dark, body.theme-dark) .process-values-dialog :is(.e-dlg-header-content, .e-dlg-content, .e-footer-content, .e-input-group, input.e-input) {
    background: var(--app-surface-2);
    color: var(--app-text-primary);
    border-color: var(--app-border-strong);
}

:is(html.theme-dark, body.theme-dark) .process-values-dialog :is(.e-dlg-header, .e-icons) {
    color: var(--app-text-primary);
}

:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .process-grid-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    width: max-content;
    min-height: 14px;
    line-height: 14px;
    color: var(--app-text-primary);
    vertical-align: middle;
}

:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .process-grid-meta__text {
    display: inline-block;
    flex: 0 0 auto;
    width: auto;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 14px;
    overflow: visible;
}

:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-rowcell {
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}

:is(.process-search-syncfusion #ProcessSearchGrid, .shipment-process-data-grid) .e-gridpager {
    background: var(--app-surface-1);
    color: var(--app-text-secondary);
}

.process-values-dialog.e-dialog {
    min-width: 280px;
    min-height: 260px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 8px;
}

.process-values-dialog .e-dlg-header-content {
    padding: 16px;
}

.process-values-dialog .e-dlg-header {
    font-size: 1rem;
    font-weight: 600;
}

.process-values-dialog .e-dlg-content {
    overflow: hidden;
    padding: 0 16px;
    min-height: 0;
}

.process-values-dialog__body {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    gap: 8px;
}

.process-values-dialog__search {
    width: 100%;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid var(--app-border-soft);
    border-radius: 4px;
    background: var(--app-surface-1);
    color: var(--app-text-primary);
}

.process-values-dialog__all,
.process-values-dialog__option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    font-size: .82rem;
    cursor: pointer;
}

.process-values-dialog__all {
    border-bottom: 1px solid var(--app-border-soft);
    flex: 0 0 auto;
}

.process-values-dialog input[type="checkbox"] { flex: 0 0 auto; }
.process-values-dialog__option span { overflow-wrap: anywhere; }
.process-values-dialog__list { flex: 1 1 auto; min-height: 0; overflow: auto; }
.process-values-dialog .e-footer-content { padding: 14px 16px; }
.process-values-dialog__footer { display: flex; gap: 8px; }
.process-values-dialog__footer button { flex: 1; justify-content: center; }
.process-values-dialog__loading { height: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.process-values-dialog__spinner { position: relative; width: 36px; height: 36px; }


.process-search-syncfusion .process-search-audit-hover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    width: 100%;
}

.process-search-audit-hover:focus-visible {
    outline: 2px solid var(--app-accent-600);
    outline-offset: 1px;
    border-radius: 4px;
}

/* The tooltip is attached to body so the grid cannot clip the card. */
.e-tooltip-wrap.process-search-audit-tooltip {
    max-width: calc(100vw - 24px);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--app-border-strong);
    border-radius: 8px;
    background: var(--app-surface-2);
    color: var(--app-text-primary);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

.process-search-audit-tooltip .e-tip-content {
    padding: 0;
    color: inherit;
    font-family: inherit;
    white-space: normal;
}

.process-audit-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--app-border-soft);
    background: color-mix(in srgb, var(--app-accent-200) 24%, transparent);
    font-size: 12px;
    color: var(--app-text-secondary);
}

.process-audit-card__header strong {
    color: var(--app-text-primary);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.process-audit-card__details {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    text-align: left;
}

.process-audit-card__row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.process-audit-card__row svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    fill: none;
    stroke: var(--app-accent-600);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.process-audit-card__row > div { min-width: 0; }
.process-audit-card__row dt { color: var(--app-text-secondary); font-size: 11px; font-weight: 400; line-height: 1.5; }
.process-audit-card__row dd { margin: 1px 0 0; color: var(--app-text-primary); font-size: 12px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.process-audit-card__row .process-audit-card__author { font-size: 11px; font-weight: 400; }
.process-audit-card__author span { color: var(--app-text-secondary); }

.process-search-syncfusion .process-search-completeness {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    width: 80px;
    max-width: 100%;
    color: var(--process-completeness-color, var(--app-accent-600));
    font-size: 12px;
    font-weight: 600;
    line-height: 14px;
}

.process-search-syncfusion .process-search-completeness span {
    flex: 0 0 30px;
    text-align: right;
}

.process-search-syncfusion .process-search-completeness progress {
    appearance: none;
    flex: 1;
    min-width: 0;
    width: 44px;
    height: 4px;
    border: 0;
    border-radius: 3px;
    overflow: hidden;
    background: var(--app-border-soft);
    accent-color: var(--process-completeness-color, var(--app-accent-600));
}

.process-search-syncfusion .process-search-completeness progress::-webkit-progress-bar {
    background: var(--app-border-soft);
}

.process-search-syncfusion .process-search-completeness progress::-webkit-progress-value {
    background: var(--process-completeness-color, var(--app-accent-600));
    border-radius: 3px;
}

.process-search-syncfusion .process-search-completeness progress::-moz-progress-bar {
    background: var(--process-completeness-color, var(--app-accent-600));
    border-radius: 3px;
}

.process-search-syncfusion .process-search-completeness--low { --process-completeness-color: #dc2626; }
.process-search-syncfusion .process-search-completeness--medium { --process-completeness-color: #f59e0b; }
.process-search-syncfusion .process-search-completeness--high { --process-completeness-color: #2563eb; }

html.theme-dark .process-search-completeness--low { --process-completeness-color: #f87171; }
html.theme-dark .process-search-completeness--medium { --process-completeness-color: #fbbf24; }
html.theme-dark .process-search-completeness--high { --process-completeness-color: #60a5fa; }
