.report-filter-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 17px;
    border: 1px solid #cfe2e0;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: #f7fbfa;
    box-shadow: 0 5px 16px rgba(4, 59, 67, .06)
}

.report-filter-bar strong {
    display: block;
    color: #163a40;
    font-size: .86rem
}

.report-filter-bar span {
    display: block;
    color: #62757a;
    font-size: .72rem
}

.report-filter-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border: 1px solid #9ebfbc;
    border-radius: 5px;
    color: #006c70;
    background: #fff;
    font: inherit;
    font-size: .75rem;
    font-weight: 800;
    cursor: pointer
}

.report-filter-toggle:hover,
.report-filter-toggle:focus {
    outline: 0;
    border-color: #006c70;
    background: #e9f6f4
}

.report-filter-toggle i {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s
}

.report-filter-toggle[aria-expanded="true"] i {
    transform: translateY(2px) rotate(225deg)
}

.report-filters {
    padding: 17px;
    background: var(--mist);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end
}

.report-filters[hidden] { display: none }

.report-filter-bar:has(+ .report-filters[hidden]) {
    border-bottom: 1px solid #cfe2e0;
    border-radius: 7px
}

.report-filters > .field { min-width: 0 }

.report-actions {
    display: flex;
    gap: 10px;
    grid-column: span 2;
    align-items: end
}

.report-actions .btn { min-height: 44px }

.report-date-input {
    position: relative
}

.report-date-input input,
.report-date-input input.form-control {
    width: 100%;
    min-height: 45px;
    padding-right: 42px;
    color: #102d34;
    background: #fff;
    cursor: pointer
}

.report-date-input > svg {
    position: absolute;
    z-index: 2;
    right: 13px;
    top: 50%;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #006c70;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: translateY(-50%);
    pointer-events: none
}

.flatpickr-calendar {
    border: 1px solid #c6dbd9;
    border-radius: 9px;
    box-shadow: 0 16px 40px rgba(4, 59, 67, .2);
    font-family: 'DM Sans', Arial, sans-serif
}

.flatpickr-months {
    padding: 7px 4px 3px;
    border-radius: 9px 9px 0 0;
    background: #043b43
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #fff;
    fill: #fff
}

.flatpickr-current-month .flatpickr-monthDropdown-months option { color: #102d34 }
.flatpickr-weekdays { padding-top: 5px; background: #eef7f6 }
.flatpickr-weekday { color: #426267; font-weight: 800 }

.flatpickr-day {
    border-radius: 6px;
    color: #163a40
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    border-color: #dcefed;
    background: #e6f4f2
}

.flatpickr-day.today {
    border-color: #dc1c1b;
    color: #b41717;
    font-weight: 800
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    border-color: #006c70;
    color: #fff;
    background: #006c70
}

.report-status {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    margin-top: 12px;
    border: 1px solid #cfe0df;
    border-radius: 6px;
    color: #526b70;
    background: #f7fbfa;
    text-align: left;
    font-size: .75rem;
    font-weight: 600
}

.report-status::before {
    content: "i";
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #66858a;
    font-size: .68rem;
    font-weight: 900
}

.report-status[data-state="success"] {
    border-color: #b9dfd2;
    color: #176f54;
    background: #edf8f3
}

.report-status[data-state="success"]::before {
    content: "✓";
    background: #26815f
}

.report-status[data-state="error"] {
    border-color: #edc8c5;
    color: #9b3732;
    background: #fff2f1
}

.report-status[data-state="error"]::before {
    content: "!";
    background: #c34b43
}

.report-table-toolbar {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap
}

.report-toolbar-field { min-width: 220px }
.report-search-field { flex: 1 1 280px }

.report-search-field input,
.report-toolbar-field select {
    width: 100%;
    font: inherit;
    border: 1px solid #c7d7d5;
    padding: 10px 12px;
    border-radius: 3px;
    background: #fff
}

.report-search-field input:focus,
.report-toolbar-field select:focus {
    outline: 2px solid #a7dcd7;
    border-color: #006c70
}

.column-picker { position: relative }

.column-picker-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 240px;
    max-height: 280px;
    overflow: auto;
    background: #fff;
    border: 1px solid #bcd2d0;
    box-shadow: 0 12px 26px rgba(4, 59, 67, .14);
    padding: 10px;
    z-index: 25
}

.column-picker.open .column-picker-menu { display: block }

.column-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    color: #102d34
}

.column-picker-item input { margin: 0 }
.report-table-wrap {
    position: relative;
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
    margin-top: 16px;
    border: 1px solid var(--line);
    background: #fff
}
.report-table-wrap .data-table {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    table-layout: auto;
    font-size: clamp(.74rem, .72vw, .75rem)
}

.report-table-wrap .data-table[data-format="standard"] {
    min-width: 1060px
}

.report-table-wrap .data-table[data-format="details"] {
    min-width: 1380px
}

.report-horizontal-tools {
    position: sticky;
    top: 0;
    z-index: 8;
    margin-top: 14px;
    padding: 7px 10px 5px;
    border: 1px solid #bfd8d5;
    border-radius: 6px;
    background: rgba(238, 247, 246, .97);
    box-shadow: 0 5px 15px rgba(4, 59, 67, .09)
}

.report-horizontal-tools>span {
    display: block;
    margin-bottom: 3px;
    color: #285e63;
    font-size: .67rem;
    font-weight: 700;
    text-align: center
}

.report-top-scroll {
    width: 100%;
    height: 14px;
    overflow-x: auto;
    overflow-y: hidden
}

.report-top-scroll>div {
    height: 1px
}

.report-table-wrap.is-scrollable {
    box-shadow: inset -10px 0 12px -14px rgba(4, 59, 67, .8)
}
.report-table-wrap .data-table th,
.report-table-wrap .data-table td {
    padding: 10px 8px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.35;
    vertical-align: middle
}
.report-table-wrap .data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap
}

.report-table-wrap .sort-btn {
    white-space: nowrap;
    text-align: left;
    line-height: 1.25
}

.report-table-wrap [data-column="pcs"],
.report-table-wrap [data-column="weight"],
.report-table-wrap [data-column="estDays"],
.report-table-wrap [data-column="leadTime"] {
    width: 58px;
    min-width: 58px;
    white-space: nowrap
}

.report-table-wrap [data-column="noteNo"] {
    width: 112px;
    min-width: 112px;
    white-space: nowrap
}

.report-table-wrap [data-column="pickDateTime"],
.report-table-wrap [data-column="receiveDateTime"] {
    width: 116px;
    min-width: 116px;
    white-space: nowrap
}

.report-table-wrap [data-column="consigneeName"] {
    min-width: 170px
}

.report-table-wrap [data-column="originName"],
.report-table-wrap [data-column="destinationName"] {
    min-width: 120px
}

.report-table-wrap [data-column="receiverName"] {
    min-width: 135px
}

.report-table-wrap [data-column="remarks"] {
    min-width: 90px
}

.report-table-wrap [data-column="descript"],
.report-table-wrap [data-column="dog"] {
    min-width: 210px
}

.report-table-wrap .data-table tbody tr td {
    transition: background-color .16s ease, color .16s ease
}

.report-table-wrap .data-table tbody tr {
    cursor: pointer
}

.report-table-wrap .data-table tbody tr.delivered-row td {
    background: #f0f2f3
}

.report-table-wrap .data-table tbody tr:hover td {
    color: #073f45;
    background: #cbe6e3
}

.report-table-wrap .data-table tbody tr.selected-row td {
    color: #073f45;
    background: #cbe6e3
}

.report-table-wrap .data-table tbody tr.selected-row td:first-child {
    box-shadow: inset 4px 0 0 var(--teal)
}

.report-table-wrap .data-table tbody tr.selected-row:hover td {
    background: #bfdeda
}

.report-loader {
    margin-top: 18px;
    padding: 14px 16px;
    background: #eef7f6;
    border: 1px solid #c8dfdc;
    color: #0f555b
}

.report-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    flex-wrap: wrap
}

.report-summary { color: var(--muted); font-size: .92rem }

.sort-btn {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    white-space: nowrap
}

.sort-btn:hover,
.sort-btn:focus {
    color: #e9f6f4;
    outline: 0;
    text-decoration: underline
}

/* Searchable dropdowns */
.search-select {
    position: relative;
    width: 100%;
    min-width: 0
}
.search-select > select { display: none }

.search-select-trigger {
    position: relative;
    width: 100%;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 40px 10px 12px;
    border: 1px solid #c7d7d5;
    border-radius: 5px;
    color: #102d34;
    background: #fff;
    font: inherit;
    font-size: .86rem;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s
}

.search-select-trigger:hover { border-color: #84aaa7 }

.search-select-trigger:focus,
.search-select.open .search-select-trigger {
    outline: 0;
    border-color: #006c70;
    box-shadow: 0 0 0 3px rgba(0, 108, 112, .12)
}

.search-select-value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.search-select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #527276;
    border-bottom: 2px solid #527276;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s
}

.search-select.open .search-select-arrow { transform: translateY(-20%) rotate(225deg) }

.search-select-menu {
    display: none;
    position: absolute;
    z-index: 35;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    overflow: hidden;
    border: 1px solid #bcd2d0;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 16px 35px rgba(4, 59, 67, .18)
}

.search-select.open .search-select-menu { display: block }

.search-select-search {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #dce9e8;
    background: #f7fbfa
}

.search-select-search::before {
    content: "⌕";
    position: absolute;
    left: 21px;
    top: 50%;
    color: #668084;
    font-size: 1rem;
    transform: translateY(-50%);
    pointer-events: none
}

.search-select-search input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px 8px 33px;
    border: 1px solid #bfd3d1;
    border-radius: 5px;
    color: #102d34;
    background: #fff;
    font: inherit;
    font-size: .82rem
}

.search-select-search input:focus {
    outline: 0;
    border-color: #006c70;
    box-shadow: 0 0 0 2px rgba(0, 108, 112, .1)
}

.search-options {
    max-height: 220px;
    overflow-y: auto;
    padding: 5px
}

.search-option {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 4px;
    background: #fff;
    text-align: left;
    padding: 9px 10px;
    color: #102d34;
    font: inherit;
    font-size: .82rem;
    cursor: pointer
}

.search-option:hover,
.search-option:focus {
    background: #e9f6f4;
    color: #006c70;
    outline: 0
}

.search-option[aria-selected="true"] {
    color: #005f63;
    background: #dff1ef;
    font-weight: 700
}

.search-empty {
    padding: 18px 11px;
    color: #62757a;
    font-size: .8rem;
    text-align: center
}

.search-select.disabled .search-select-trigger,
.search-select-trigger:disabled {
    color: #91a1a4;
    background: #edf2f1;
    border-color: #d6e0df;
    cursor: not-allowed;
    box-shadow: none
}

.search-select.loading .search-select-trigger {
    cursor: wait
}

.search-select.loading .search-select-arrow {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 108, 112, .25);
    border-top-color: #006c70;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: button-spin .7s linear infinite
}

.inline-loading {
    display: flex;
    align-items: center;
    gap: 10px
}

.inline-loading > span {
    width: 17px;
    height: 17px;
    border: 2px solid #c5dcda;
    border-top-color: #006c70;
    border-radius: 50%;
    animation: button-spin .7s linear infinite
}

.dashboard-user-actions { display: flex; align-items: center; gap: 12px }

.print-report-title { display: none }

@media print {
    @page {
        size: landscape;
        margin: 8mm
    }

    body {
        color: #102d34;
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact
    }

    body>header,
    .dash-nav,
    .dashboard>.container.section>.eyebrow,
    .dashboard>.container.section>h2,
    .dashboard>.container.section>p,
    .report-filter-bar,
    .report-filters,
    .report-status,
    .report-loader,
    .report-table-toolbar,
    .report-horizontal-tools,
    .modal {
        display: none !important
    }

    .dashboard,
    .dashboard.show {
        display: block !important
    }

    .dashboard>.container.section {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0
    }

    .print-report-title {
        display: block;
        margin-bottom: 10px;
        padding-bottom: 7px;
        border-bottom: 2px solid #043b43;
        text-align: center
    }

    .print-report-title h1 {
        margin: 0 0 3px;
        font-size: 14pt
    }

    .print-report-title p {
        margin: 0;
        color: #445d62;
        font-size: 7.5pt
    }

    .report-table-wrap {
        overflow: visible !important;
        margin-top: 0;
        border-color: #9eb2b4
    }

    .report-table-wrap .data-table,
    .report-table-wrap .data-table[data-format="standard"],
    .report-table-wrap .data-table[data-format="details"] {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
        font-size: 6.5pt
    }

    .report-table-wrap .data-table th,
    .report-table-wrap .data-table td,
    .report-table-wrap [data-column] {
        position: static;
        width: auto;
        min-width: 0;
        padding: 4px 3px;
        white-space: normal;
        overflow-wrap: break-word
    }

    .report-table-wrap .sort-btn {
        white-space: normal;
        font-size: inherit
    }

    .report-table-wrap .data-table tbody tr {
        cursor: default;
        break-inside: avoid
    }

    .report-table-footer {
        margin-top: 8px
    }
}

@media(max-width: 900px) {
    .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)) }
    .report-actions { grid-column: auto }
}

@media(max-width: 540px) {
    .report-filter-bar { align-items: flex-start }
    .report-filter-bar > div span { display: none }
    .report-filters { grid-template-columns: 1fr; padding: 18px }
    .report-actions { display: grid; grid-template-columns: 1fr }
    .report-actions .btn { width: 100% }
    .report-table-toolbar { align-items: stretch }
    .report-toolbar-field { width: 100%; min-width: 0 }
    .report-search-field { flex-basis: auto }
    .column-picker { width: 100% }
    .column-picker .btn { width: 100% }
    .column-picker-menu { left: 0; right: auto; min-width: 100% }
    .report-table-footer { align-items: flex-start }
    .report-table-wrap { height: auto }
    .dashboard-user-actions { flex-direction: column; align-items: flex-end }
}
