@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --day-schedule-width-adder: 310px;
    --order-scheduler-right-container-adder: 300px;
    --toolbar-header-height: 52px;
    --toolbar-header-background-color: #F5F5F5;
    --scheduler-column-height: 0px;
    /* Order page theme vars (also defined in component CSS, added here for global availability) */
    --order-card-radius: 12px;
    --order-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --order-card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --order-primary-gradient: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    --order-success-gradient: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
    --order-warning-gradient: linear-gradient(135deg, #fb8c00 0%, #f57c00 100%);
    --order-info-gradient: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
    --order-section-bg: #f8fafc;
    --order-border-color: #e2e8f0;
    --order-text-primary: #1e293b;
    --order-text-secondary: #64748b;
    --order-accent-blue: #3b82f6;
    --order-accent-green: #22c55e;
    --order-accent-orange: #f97316;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.navmenu-left {
    overflow-x: hidden;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.pb-captcha-error {
    color: var(--mud-palette-error, #dc3545);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}


.toolbar-container {
    width: 100vw;
    min-height: 100vh;
}

.pb-main-fullscreen {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.toolbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--toolbar-header-height);
    padding-left: 20px;
    padding-right: 20px;
    gap: 20px;
}

.toolbar-lheader {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 36px;
    flex-shrink: 0;
}

.toolbar-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
}

.toolbar-rheader {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.toolbar-chat {
    display: flex;
    align-items: center;
}

.toolbar-chat .mud-badge-root .mud-badge {
    transform: translateY(6px);
}

.toolbar-notifications-group {
    padding-left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    width: 30px;
    height: var(--toolbar-header-height);
    cursor: pointer;
}

    .toolbar-notifications-group:hover {
        /*background-color: rgb(153, 172, 213, 0.2);*/
    }

.toolbar-notification-badge {
    position: absolute;
    top: 0;
    right: 0;
}

.toolbar-notifications-missed {
    position: absolute;
    background-color: #FF0000;
    color: #FFFFFF;
    width: 14px;
    height: 14px;
    font-size: 12px;
    border-radius: 7px;
    text-align: center;
    padding-bottom: 1px;
    right: 0;
    top: 0;
}

.toolbar-areas-switcher {
    /*padding-left: 50px;*/
}

.toolbar-areas-activator {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 15px;
    min-width: 150px;
    height: var(--toolbar-header-height);
}

.toolbar-areas-activator-text {
    border-radius: 8px;
    padding: 6px 6px 6px 12px;
    background-color: rgb(33, 150, 243);
    color: #FFFFFF;
    font-size: 16px;
}

    .toolbar-areas-activator-text:hover, .toolbar-areas-activator-text:active {
        background-color: rgba(33, 150, 243, 0.8);
    }

.toolbar-areas-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 300px;
    overflow-y: auto;
    min-width: 150px;
}


.toolbar-name {
    font-size: 18px;
    font-weight: 600;
}

.toolbar-bell {
    color: #979797;
}

    .toolbar-bell svg {
        font-size: 29px;
    }

.toolbar-dropdown-activator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 10px;
    padding-right: 10px;
}

    .toolbar-dropdown-activator:hover {
        background-color: rgb(153, 172, 213, 0.2);
        cursor: pointer;
    }

.toolbar-dropdown-profile {
    color: var(--mud-palette-text-primary) !important;
}

.toolbar-name-and-role {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.toolbar-role {
    font-size: 14px;
    color: var(--mud-palette-text-secondary);
    text-align: end;
}

.toolbar-breadcrumbs {
    display: flex;
    font-size: 20px;
    font-weight: 700;
    min-width: 150px;
    color: rgba(0,0,0,0.65);
    background-color: #99ACD5;
    height: var(--toolbar-header-height);
    align-items: center;
    justify-content: center;
    padding: 0 15px 0 15px;
    transform: skew(-15deg);
}

.toolbar-page-name {
    transform: skew(15deg);
    /*color: #FFFFFF;*/
}

.mud-main-content {
    padding-top: 0;
}

.mud-container {
    height: calc(100vh - var(--toolbar-header-height));
    overflow-y: auto;
    padding-top: 0;
    padding-left: 0.4rem;
    padding-right: 0;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/*add this to avoid flickering*/
.plk-dd-inprogess > * {
    pointer-events: none;
}

/*dropzone style style*/
.plk-dd-dropzone {
    min-height: 50px;
}

/*drag drop styles*/

.plk-dd-spacing {
    height: 10px;
}

.plk-dd-spacing-dragged-over {
    padding: 25px;
}

.plk-dd-dragged-over {
    background-color: lightgray;
    opacity: 0.6;
    animation: blinker 1s linear infinite;
}

    .plk-dd-dragged-over > div {
        background-color: lightgray;
        opacity: 0.6;
        animation: blinker 1s linear infinite;
    }

.plk-dd-dragged-over-denied {
    background-color: red;
    opacity: 0.6;
    animation: blinker 1s linear infinite;
}

.plk-dd-in-transit {
    opacity: 0;
}

    .plk-dd-in-transit > div {
        opacity: 0;
    }

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.blink_me {
    animation: blinker 1s linear infinite;
}

/*for flex demo*/

.plk-flex .plk-dd-spacing {
    width: 20px;
    height: auto;
}

.plk-flex .plk-dd-dragged-over {
    background-color: lightgray;
    opacity: 0.6;
    animation: blinker 1s linear infinite;
}

    .plk-flex .plk-dd-dragged-over > div {
        background-color: lightgray;
        opacity: 0.9;
        animation: blinker 1s linear infinite;
    }

.plk-flex .plk-dd-in-transit {
    background-color: orangered;
}

    .plk-flex .plk-dd-in-transit > div {
        background-color: orangered;
    }

.plk-dd-noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

.pb-dropdown-50 {
    width: 50px;
}

.pb-dropdown-75 {
    width: 75px;
}

.pb-dropdown-100 {
    width: 100px;
}


.pb-dropdown-150 {
    width: 150px;
}

.pb-dropdown-225 {
    width: 225px;
}

.pb-dropdown-300 {
    width: 300px;
}

.pb-input-75 {
    width: 75px;
}

.pb-input-100 {
    width: 100px;
}

.pb-input-150 {
    width: 150px;
}

.pb-input-225 {
    width: 225px;
}

.pb-button-150 {
    width: 150px;
}

.pb-button-225 {
    width: 225px;
}

.pb-wrapper {
    word-break: break-all;
}

.pb-time-records-column {
    width: 3% !important;
    font-weight: bold !important;
}

.pb-time-records-first-column {
    position: sticky;
    width: 200px;
    left: 0;
    z-index: 1;
    background-color: white;
}


.pb-print-highlight {
    background-color: #C0D9F8;
    width: 100%;
}

.vertical-align-top th {
    vertical-align: top !important;
}

.vertical-align-top-column {
    vertical-align: top !important;
}

.pb-print-highlight-header {
    background-color: #C0D9F8;
    font-weight: bold !important;
}


.quote-container {
    font-size: 12px !important;
    line-height: 1.2;
}


@media print {
    body {
        width: 100%;
        height: 100%; 
        /*font-size: 12px;*/
    }

    .print-quote-inner-container {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .quote-table {
        font-size: 12px !important;
    }

    .quote-table td {
        font-style: italic !important;
    }

    table {
        table-layout: fixed;
        page-break-inside: auto !important;
        overflow-y: visible;
        width: 100%;
    }

    thead {
        display: table-header-group;
    }

}

.chat-navmenu {
    width: 100% !important;
}

.pb-html-editor-container {
    resize: both;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #dadfe2;
    max-width: 1920px;
    max-height: 1080px;
    min-width: 350px;
    min-height: 350px;
    height: 250px;
    padding-bottom: 1em;
}

.rz-html-editor {
    border-bottom: none !important;
}



/*SCHEDULER */

/* ORDERS */

.order-items-table-description * {
    max-width: 100% !important; /* This targets all child elements */
    width: 100% !important; /* This targets all child elements */
    box-sizing: border-box; /* Ensures padding and border are included in the element's total width */
}


.order-grid-address-container {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    gap: 2px;
}

.order-grid-address-td {
    padding: 6px 14px 6px 6px !important;
}

.order-grid-date-total-balance {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .order-grid-date-total-balance div {
        text-align: right;
    }

.home-time-records-container {
    display: flex;
    flex: 1;
    flex-direction: row;
    gap: 50px;
    padding-top: 50px;
    padding-left: 30px;
    padding-right: 30px;
}

.home-time-records-account-container {
    width: 300px;
}

.home-time-records-schedules-container {
    width: 100%;
    align-items: center;
}

.home-time-records-schedules-container,
.home-time-records-account-container {
    display: flex;
    gap: 10px;
    flex-direction: column;
    justify-content: space-between;
}

.home-time-records-dropdown {
}

.home-time-records-button-container {
    max-width: 300px;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    align-items: center;
}

.home-time-records {
    margin-bottom: 60px;
}

.account-grid-account {
    max-width: 100px;
}


.order-scheduler-right {
    width: calc(100vw - var(--day-schedule-width-adder) - 15px - 300px);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-scheduler-estimated-hours {
    padding-top: 20px;
}

.pb-order-detail-scheduler {
}

.pb-day-view-items-new.pb-day-view-items-new-override-scheduler {
    width: calc(100vw - var(--day-schedule-width-adder) - 15px - var( --order-scheduler-right-container-adder ));
}

.toolbar-page-title {
    font-size: 16px;
    font-weight: 700;
    padding: 10px 20px 10px 5px;
    color: #FFFFFF;
}

.pb-shipment-detail-other-container {
    padding-top: 30px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.pb-shipment-detail-other-schedule {
    border-radius: 4px;
    height: 100%;
    padding: 0.125rem 0.25rem;
    width: 30%;
}

.pb-shipment-detail-other-time-record {
    border-radius: 4px;
    border: dot-dot-dash #0a53be;
    height: 100%;
    padding: 0.125rem 0.25rem;
    width: 50%;
}

.pb-shipment-detail-other-checklist {
    min-width: 200px;
    border-radius: 4px;
    height: 100%;
    padding: 0.125rem 0.25rem;
    width: 20%;
}

.pb-accounts-button {
    font-size: 12px;
}

.pb-order-grid-id-header {
    min-width: 50px;
}

.pb-order-grid-id-footer {
    min-width: 50px;
    max-width: 50px;
}


.pb-order-grid-invoice-header {
    min-width: 50px;
}

.pb-order-grid-invoice-footer {
    min-width: 50px;
    max-width: 50px;
}


.pb-order-grid-status-header {
    min-width: 50px;
}

.pb-order-grid-status-footer {
    min-width: 50px;
    max-width: 50px;
}

.pb-order-grid-desc-header {
    max-width: 50px;
}

.pb-order-grid-desc-footer {
    max-width: 50px;
}

.pb-order-grid-favorite-header {
    min-width: 20px;
}

.pb-order-grid-favorite-footer {
    min-width: 20px;
    max-width: 20px;
}


.formatted-amount {
    text-align: right;
    padding-right: 50px;
}


.print-invoice-items-col1 {
    width: 20%;
}

.print-invoice-items-col2 {
    width: 45%;
}

.print-invoice-items-col3 {
    width: 10%;
}

.print-invoice-items-col4 {
    width: 15%;
}

.print-invoice-items-col5 {
    width: 10%;
}


.print-invoice-summary-col1 {
    width: 70%;
}

.print-invoice-summary-col2 {
    width: 15%;
}

.print-invoice-summary-col3 {
    width: 15%;
}

.fixed-bottom-div {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1030; /* Adjust as needed to ensure it's above other elements */
}

.outlined-item {
    border: 1px solid #ddd; /* Customize the border as needed */
    border-radius: 4px; /* Optional: Adds rounded corners */
    padding: 8px; /* Optional: Adds some padding */
}

.pb-links {
    display: flex; 
    align-items: center; 
    gap: 5px; 
}

.pb-links a {
    display: inline-block; 
    cursor: pointer; 
    text-decoration: none;
    color: blue; 
    position: relative;
    z-index: 1; 
}

.pb-links span {
    margin: 0; 
}

/* Global Search Responsive Styles */

/* Screens below 1500px - start reducing search width */
@media (max-width: 1500px) {
    .toolbar-center {
        flex-grow: 0.8;
    }
}

/* iPad Pro and large tablets */
@media (max-width: 1366px) {
    .toolbar-center {
        flex-grow: 0.7;
    }
    
    .toolbar-page-name {
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .toolbar-header {
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .toolbar-lheader {
        gap: 25px;
    }
    
    .toolbar-rheader {
        gap: 12px;
    }
    
    /* Reduce help button size on iPads */
    .toolbar-center .mud-icon-button {
        padding: 6px;
    }
}

/* Screens below 1200px - further reduction */
@media (max-width: 1200px) {
    .toolbar-center {
        flex-grow: 0.6;
    }
    
    .toolbar-page-name {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Tablet landscape - optimize space */
@media (max-width: 1024px) {
    .toolbar-center {
        flex-grow: 0.5;
    }
    
    .toolbar-header {
        gap: 10px;
    }
    
    .toolbar-lheader {
        gap: 20px;
    }
    
    .toolbar-rheader {
        gap: 10px;
    }
}

/* Tablet portrait and below - show search icon instead */
@media (max-width: 960px) {
    .toolbar-center {
        min-width: auto;
        flex-grow: 0;
    }
    
    .toolbar-breadcrumbs {
        flex-grow: 1;
    }
    
    .toolbar-page-name {
        max-width: none;
    }
}

/* Background utility classes */
.pb-background-grey {
    background-color: var(--mud-palette-background-grey);
}

/* Mobile phones */
@media (max-width: 600px) {
    .toolbar-lheader {
        gap: 10px;
    }
    
    .toolbar-rheader {
        gap: 5px;
    }
    
    .toolbar-breadcrumbs {
        display: none;
    }
    
    .toolbar-areas-activator {
        min-width: 100px;
    }
    
    .toolbar-areas-activator-text {
        font-size: 14px;
        padding: 4px 4px 4px 8px;
    }
    
    .toolbar-name {
        font-size: 16px;
    }
    
    .toolbar-role {
        display: none;
    }
}

/* Dashboard tab styling */
.pb-dashboard-tabs .mud-tabs-tabbar.pb-dashboard-tabs__header {
    background-color: transparent;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    border-radius: 0;
    padding: 0;
    gap: 0;
}

/* Style the tab buttons */
.pb-dashboard-tabs .mud-tabs-tabbar .mud-tab {
    min-height: 44px;
    padding: 10px 20px;
    text-transform: none;
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.2px;
    color: var(--mud-palette-text-secondary);
    opacity: 1;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.pb-dashboard-tabs .mud-tabs-tabbar .mud-tab:hover:not(.mud-tab-active) {
    background-color: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
}

/* Active tab styling */
.pb-dashboard-tabs .mud-tabs-tabbar .mud-tab.mud-tab-active {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

/* Make the slider thicker and more visible */
.pb-dashboard-tabs .mud-tab-slider {
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.pb-dashboard-tabs--compact .mud-tabs-tabbar .mud-tab {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.875rem;
}

/* Fix Performance & Achievements tabs hover area - make entire tab header clickable */
.performance-tabs .mud-tab {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.performance-tabs .mud-tab-slider-wrapper {
    height: 100% !important;
}

.performance-tabs .mud-tab-slider-wrapper .mud-tab-slider-content {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.performance-tabs .mud-tab-slider-wrapper .mud-tab-slider-content > button {
    flex: 1 !important;
    height: 100% !important;
    padding: 12px 24px !important;
    justify-content: center !important;
}

.performance-tabs .mud-tab-slider-wrapper .mud-tab-slider-content > button:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    cursor: pointer !important;
}

.performance-tabs .mud-tab-slider-wrapper .mud-tab-slider-content > button .mud-tab-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.truck-tracking-map {
    width: 100%;
    min-height: 300px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.05);
}

.pdf-viewer-section {
    background-color: var(--mud-palette-background, #fafafa);
    border-radius: 12px;
}

.pdf-viewer-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px;
    background-color: var(--mud-palette-surface, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.pdf-viewer-toolbar .mud-icon-button {
    border-radius: 50%;
}

.pdf-viewer-canvas-container {
    width: 100%;
    overflow-x: auto;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    padding: 12px;
}

.pdf-viewer-page {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

.pdf-viewer-page:last-child {
    margin-bottom: 0;
}

.pdf-viewer-fallback {
    position: relative;
    width: 100%;
    min-height: 500px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

.pdf-viewer-fallback iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pb-quickview-drawer {
    position: fixed;
    top: var(--toolbar-header-height);
    right: 0;
    width: min(420px, 94vw);
    height: calc(100vh - var(--toolbar-header-height));
    background-color: var(--mud-palette-surface, #ffffff);
    border-left: 1px solid var(--mud-palette-divider, #e0e0e0);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 1250;
    display: flex;
    flex-direction: column;
}

.pb-quickview-drawer.is-open {
    transform: translateX(0);
}

.pb-quickview-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--mud-palette-divider, #e0e0e0);
}

.pb-quickview-drawer-body {
    overflow-y: auto;
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pb-quickview-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1240;
}

.pb-quickview-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pb-quickview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pb-quickview-panel {
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pb-quickview-panel-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pb-quickview-list-item {
    cursor: pointer;
}

.pb-activity-drawer {
    position: fixed;
    top: var(--toolbar-header-height);
    right: 0;
    width: min(520px, 96vw);
    height: calc(100vh - var(--toolbar-header-height));
    background-color: var(--mud-palette-surface, #ffffff);
    border-left: 1px solid var(--mud-palette-divider, #e0e0e0);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 1260;
    display: flex;
    flex-direction: column;
}

.pb-activity-drawer.is-open {
    transform: translateX(0);
}

.pb-activity-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--mud-palette-divider, #e0e0e0);
}

.pb-activity-drawer-filters {
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-divider, #e0e0e0);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pb-activity-filter-select {
    min-width: 180px;
}

.pb-order-activity-shift {
    transform: translateX( -120px );
}

.pb-activity-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pb-activity-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1255;
}

/* Task Board Column Styles */
.pb-tasks-board-layout {
    align-items: stretch;
}

.pb-tasks-column-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pb-tasks-column-title {
    font-weight: 600;
}

.pb-tasks-count-badge {
    display: flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.08);
}

.pb-tasks-count-badge.triage {
    background-color: rgba(144, 164, 174, 0.2);
}

.pb-tasks-count-badge.postponed {
    background-color: rgba(255, 183, 77, 0.2);
}

.pb-tasks-count-badge.done {
    background-color: rgba(76, 175, 80, 0.2);
}

.pb-tasks-count-badge.over-limit {
    background-color: rgba(255, 152, 0, 0.3);
    color: #e65100;
}

.pb-tasks-empty-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    opacity: 0.6;
}

.pb-tasks-quick-add-form {
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin-bottom: 8px;
}

.pb-tasks-wip-progress-container {
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.pb-tasks-wip-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.pb-tasks-wip-progress-bar.wip-healthy {
    background-color: #4caf50;
}

.pb-tasks-wip-progress-bar.wip-warning {
    background-color: #ff9800;
}

.pb-tasks-wip-progress-bar.wip-exceeded {
    background-color: #f44336;
}

.pb-tasks-wip-limit-input {
    width: 80px;
}

/* Collapsed Column Pill Styles */
.pb-tasks-collapsed-dropzone {
    flex-shrink: 0;
}

.pb-tasks-collapsed-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px 8px;
    border-radius: 30px;
    height: 100%;
    min-height: 400px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pb-tasks-collapsed-pill:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pb-tasks-collapsed-count {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.7);
}

.pb-tasks-collapsed-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

/* Zoom/Focus Column Overlay */
.pb-tasks-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pb-tasks-zoom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pb-tasks-zoom-back {
    display: flex;
    align-items: center;
    flex: 1;
}

.pb-tasks-zoom-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.pb-tasks-zoom-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pb-tasks-zoom-spacer {
    flex: 1;
}

.pb-tasks-zoom-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.pb-tasks-zoom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    max-width: 1800px;
    margin: 0 auto;
}

.pb-tasks-zoom-card-wrapper {
    min-width: 0;
}

.pb-tasks-zoom-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 64px;
    text-align: center;
}

/* ========================================
   UI/UX Micro-Interactions (Global)
   ======================================== */

/* --- Button Hover/Press ---
   Scoped to avoid jitter in dense toolbars/inline grids.
   Only shadow elevation on hover, subtle press scale on active. */
.mud-button-root.mud-button-filled:not(.mud-button-disabled) {
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.mud-button-root.mud-button-filled:not(.mud-button-disabled):hover {
    box-shadow: 0 2px 8px color-mix(in srgb, var(--mud-palette-primary) 20%, transparent);
}

.mud-button-root.mud-button-filled:not(.mud-button-disabled):active {
    transform: scale(0.98);
}

.mud-button-root.mud-button-outlined:not(.mud-button-disabled) {
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.mud-button-root.mud-button-outlined:not(.mud-button-disabled):hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mud-button-root.mud-button-outlined:not(.mud-button-disabled):active {
    transform: scale(0.98);
}

/* --- Table/Grid Row Hover ---
   Low-specificity to not override selected/striped/error rows.
   Excludes rows that already carry explicit background (e.g. tw-payroll-row-*). */
.mud-table-body .mud-table-row:not(.mud-table-row-group-header):not(.mud-selected-item):not([class*="tw-payroll-row"]):hover > td {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent);
    transition: background-color 0.15s ease;
}

.mud-table-body .mud-table-row:not(.mud-table-row-group-header):not(.mud-selected-item):not([class*="tw-payroll-row"]):hover {
    box-shadow: inset 3px 0 0 var(--mud-palette-primary);
}

.mud-data-grid .mud-table-body .mud-table-row:not(.mud-selected-item):hover > td {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent);
    transition: background-color 0.15s ease;
}

.mud-data-grid .mud-table-body .mud-table-row:not(.mud-selected-item):hover {
    box-shadow: inset 3px 0 0 var(--mud-palette-primary);
}

/* --- Global Search Popover: Keyboard-selected item ---
   Must be global because MudBlazor renders popovers outside
   the component DOM tree, so scoped CSS cannot reach them.
   MudBlazor v9 applies mud-selected-item + mud-primary-hover (≈4% opacity)
   which is barely visible; override with solid primary background. */
.global-search-popover .mud-list-item.mud-selected-item {
    background-color: var(--mud-palette-primary) !important;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.global-search-popover .mud-list-item.mud-selected-item,
.global-search-popover .mud-list-item.mud-selected-item .mud-typography,
.global-search-popover .mud-list-item.mud-selected-item .mud-text-secondary,
.global-search-popover .mud-list-item.mud-selected-item .mud-typography-caption {
    color: white !important;
}

.global-search-popover .mud-list-item.mud-selected-item .mud-chip {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
}

.global-search-popover .mud-list-item.mud-selected-item .mud-icon-root {
    color: white !important;
}

.global-search-popover .mud-list-item.mud-selected-item .mud-icon-button {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* --- Frosted Glass Toolbar ---
   Solid fallback for browsers without backdrop-filter support. */
.toolbar-header {
    background-color: var(--toolbar-header-background-color);
    border-bottom: 1px solid #d6d5d5;
}

@supports (backdrop-filter: blur(1px)) {
    .toolbar-header {
        background: color-mix(in srgb, var(--toolbar-header-background-color) 85%, transparent);
        backdrop-filter: blur(12px) saturate(1.4);
        -webkit-backdrop-filter: blur(12px) saturate(1.4);
        border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-lines-default, #d6d5d5) 60%, transparent);
    }
}

/* Improved disabled button visual states for accessibility */
.mud-button-root.mud-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto;
}

.mud-button-root.mud-button-disabled:hover {
    cursor: not-allowed;
}

.mud-icon-button.mud-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Visual distinction for disabled form fields */
.mud-input-root.mud-disabled .mud-input-slot {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Disabled chip styling */
.mud-chip.mud-chip-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
