/* VisionPortal: Accounts, People, Accounting, Inventory and the order flows, over their VisionPb area sheets. Every rule under the VisionPortal scope. */

/* Table heads: quiet hairline under the head row instead of the strong rule (accounts, account tabs, reports, payments, products). !important only where the area sheet uses it. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .accounts-grid .mud-table-head .mud-table-cell {
    box-shadow: inset 0 -1px 0 var(--color-rule);
}

.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .account-tabs .mud-table-head .mud-table-cell,
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .product-tabs .mud-table-head .mud-table-cell,
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .report-table-frame .mud-table-head .mud-table-cell,
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .filter-panel ~ .mud-data-grid .mud-table-head .mud-table-cell,
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .payment-view .mud-table-root .mud-table-head .mud-table-cell {
    border-block-end-color: var(--color-rule);
    border-bottom-color: var(--color-rule);
}

/* The PO page's head rule is set with !important in inventory.css, so this one has to match it. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .po-root .mud-table thead th {
    border-bottom: 1px solid var(--color-rule) !important;
}

/* Row hovers: the cool soft grey, not the deeper paper tone. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .po-root .mud-table tbody tr:hover {
    background-color: var(--color-surface-2) !important;
}

/* Disabled filled buttons: flat soft grey, no cast shadow. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .mud-main-content .mud-button-filled:disabled,
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .mud-main-content .mud-button-filled.mud-disabled {
    box-shadow: none;
}

/* Create New Order: the account picker sits in a card-in-card; drop the second frame so the field is the only outline. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .mud-card.mud-paper-outlined:has(> .mud-autocomplete) {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding-inline: 0;
}

/* Quick Order: the account well is a very light blue tint. !important beats the area sheet's !important. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .quick-order-primary > div[style*="border: 2px solid"] {
    background: color-mix(in srgb, var(--vpb-accent-soft) 55%, var(--color-surface)) !important;
}

/* Drill-down amounts in reports: the underline is a quiet hint, not an ink-coloured rule. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .report-amount-drill {
    text-decoration-color: var(--color-ink-3);
    text-underline-offset: 3px;
}

/* One filled blue primary: the dark-board Secondary fill (account page New Sales Order, PO actions) becomes the accent. */
.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .mud-main-content .mud-button-filled.mud-button-filled-secondary:not(:disabled) {
    background-color: var(--color-accent);
    color: var(--color-accent-ink);
}

.vision-theme-scope[data-vision-theme="visionpb"][data-vision-variant="portal"] .mud-main-content .mud-button-filled.mud-button-filled-secondary:hover:not(:disabled) {
    background-color: var(--vpb-accent-2);
}
