/* =========================================================
   Enterprise Dashboard — Inspinia-inspired, IFFYS branded
   ========================================================= */

.enterprise-dashboard {
    --ed-navy: #002245;
    --ed-navy-deep: #001f3f;
    --ed-orange: #ff6600;
    --ed-muted: #64748b;
    --ed-border: #e8edf3;
    --ed-card: #ffffff;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
}

.enterprise-dashboard > .ed-page-head,
.enterprise-dashboard > .row:not(.ed-bottom-row) {
    flex: 0 0 auto;
}

.enterprise-dashboard .ed-title {
    color: var(--ed-navy);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.enterprise-dashboard .ed-page-head {
    position: relative;
    z-index: 5;
    gap: 0.75rem;
}

.enterprise-dashboard .ed-page-head > div:first-child {
    flex: 0 1 auto;
    min-width: 0;
    position: relative;
    z-index: 0;
}

.enterprise-dashboard .ed-subtitle {
    font-size: 0.8rem;
}

.enterprise-dashboard .ed-refresh-btn {
    background: var(--ed-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.enterprise-dashboard .ed-refresh-btn:hover {
    background: var(--ed-orange);
    color: #fff;
}

.enterprise-dashboard .ed-refresh-btn:disabled {
    opacity: 0.7;
}

.enterprise-dashboard .ed-spin {
    animation: ed-spin 0.8s linear infinite;
}

@keyframes ed-spin {
    to { transform: rotate(360deg); }
}

.enterprise-dashboard .ed-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 4rem 1rem;
    color: var(--ed-muted);
}

.enterprise-dashboard .ed-kpi-card,
.enterprise-dashboard .ed-panel,
.enterprise-dashboard .ed-queue-card {
    border: 1px solid var(--ed-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 31, 63, 0.04);
    background: var(--ed-card);
}

.enterprise-dashboard .ed-kpi-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.enterprise-dashboard .ed-kpi-card .card-body {
    padding: 0.75rem 0.9rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.enterprise-dashboard .ed-kpi-card--missed {
    border-color: #fecaca;
}

.enterprise-dashboard .ed-kpi-card--online {
    border-color: #bfdbfe;
}

.enterprise-dashboard .ed-kpi-card--online .ed-kpi-label {
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0;
    display: block;
    text-align: center;
    width: 100%;
}

.enterprise-dashboard .ed-kpi-card--online .ed-sales-amount {
    color: #1d4ed8;
}

.enterprise-dashboard .ed-kpi-card--missed .ed-kpi-label {
    color: #b91c1c;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0;
    display: block;
    text-align: center;
    width: 100%;
}

.enterprise-dashboard .ed-kpi-card--missed .ed-sales-amount {
    color: #b91c1c;
}

.enterprise-dashboard .ed-kpi-card--empty {
    background: transparent;
    border-style: dashed;
    border-color: #dbe3ee;
    box-shadow: none;
    pointer-events: none;
}

.enterprise-dashboard .ed-kpi-card[role="button"]:hover,
.enterprise-dashboard .ed-queue-card[role="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 31, 63, 0.1);
    cursor: pointer;
}

.enterprise-dashboard .ed-kpi-label,
.enterprise-dashboard .ed-queue-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ed-muted);
}

.enterprise-dashboard .ed-kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ed-navy);
    line-height: 1.15;
    margin-top: 0.15rem;
}

.enterprise-dashboard .ed-kpi-foot {
    margin-top: auto;
    padding-top: 0.45rem;
    font-size: 0.78rem;
}

.enterprise-dashboard .ed-invoice-count {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ed-navy);
    letter-spacing: -0.01em;
}

.enterprise-dashboard .ed-week-range {
    font-size: 0.72rem;
    font-weight: 700;
}

.enterprise-dashboard .ed-prior-amt {
    margin-left: 0.15rem;
    font-size: 0.75rem;
}

.enterprise-dashboard .ed-sales-day-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 0.35rem;
    min-width: 0;
}

.enterprise-dashboard .ed-sales-day-title {
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ed-navy);
}

.enterprise-dashboard .ed-day-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 1px solid var(--ed-border);
    border-radius: 6px;
    background: #fff;
    color: var(--ed-navy);
    line-height: 1;
    flex-shrink: 0;
    cursor: pointer;
}

.enterprise-dashboard .ed-day-nav-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #c5d0de;
}

.enterprise-dashboard .ed-day-nav-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.enterprise-dashboard .ed-day-nav-spacer {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
}

.enterprise-dashboard .ed-kpi-card--sales .ed-sales-amount-block,
.enterprise-dashboard .ed-kpi-card--missed .ed-sales-amount-block,
.enterprise-dashboard .ed-kpi-card--online .ed-sales-amount-block {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 3.5rem;
}

.enterprise-dashboard .ed-kpi-card--sales .ed-sales-amount-block--clickable,
.enterprise-dashboard .ed-kpi-card--missed .ed-sales-amount-block--clickable,
.enterprise-dashboard .ed-kpi-card--online .ed-sales-amount-block--clickable {
    cursor: pointer;
    border-radius: 0.45rem;
    padding: 0.25rem 0.35rem;
    transition: background-color 0.15s ease;
}

.enterprise-dashboard .ed-kpi-card--sales .ed-sales-amount-block--clickable:hover {
    background: rgba(0, 34, 69, 0.06);
}

.enterprise-dashboard .ed-kpi-card--missed .ed-sales-amount-block--clickable:hover {
    background: rgba(185, 28, 28, 0.08);
}

.enterprise-dashboard .ed-kpi-card--online .ed-sales-amount-block--clickable:hover {
    background: rgba(29, 78, 216, 0.08);
}

.enterprise-dashboard .ed-kpi-card--sales .ed-sales-amount-block--clickable:focus-visible,
.enterprise-dashboard .ed-kpi-card--missed .ed-sales-amount-block--clickable:focus-visible,
.enterprise-dashboard .ed-kpi-card--online .ed-sales-amount-block--clickable:focus-visible {
    outline: 2px solid #002245;
    outline-offset: 2px;
}

.enterprise-dashboard .ed-kpi-card--sales .ed-sales-amount {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 0;
    letter-spacing: -0.02em;
}

.enterprise-dashboard .ed-kpi-card--missed .ed-sales-amount {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 0;
    letter-spacing: -0.02em;
    color: #b91c1c;
}

.enterprise-dashboard .ed-kpi-card--online .ed-sales-amount {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 0;
    letter-spacing: -0.02em;
    color: #1d4ed8;
}

.enterprise-dashboard .ed-kpi-card--sales .ed-invoice-count,
.enterprise-dashboard .ed-kpi-card--missed .ed-invoice-count,
.enterprise-dashboard .ed-kpi-card--online .ed-invoice-count {
    text-align: center;
    margin-top: 0.25rem;
}

.enterprise-dashboard .ed-kpi-card--sales .ed-sales-foot,
.enterprise-dashboard .ed-kpi-card--missed .ed-sales-foot,
.enterprise-dashboard .ed-kpi-card--online .ed-sales-foot {
    text-align: center;
    width: 100%;
}

.enterprise-dashboard .ed-skel {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 52px;
    justify-content: center;
}

.enterprise-dashboard .ed-skel-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
    background-size: 200% 100%;
    animation: ed-shimmer 1.2s ease-in-out infinite;
}

.enterprise-dashboard .ed-skel-line.w-30 { width: 30%; }
.enterprise-dashboard .ed-skel-line.w-40 { width: 40%; }
.enterprise-dashboard .ed-skel-line.w-50 { width: 50%; }
.enterprise-dashboard .ed-skel-line.w-55 { width: 55%; }
.enterprise-dashboard .ed-skel-line.w-70 { width: 70%; }

.enterprise-dashboard .ed-skel-chart {
    min-height: 180px;
    border-radius: 10px;
    background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
    background-size: 200% 100%;
    animation: ed-shimmer 1.2s ease-in-out infinite;
}

@keyframes ed-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.enterprise-dashboard .ed-ar-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
    min-width: 0;
    flex-wrap: nowrap;
    height: 1.35rem;
}

.enterprise-dashboard .ed-ar-header .ed-ar-title,
.enterprise-dashboard .ed-ar-header .ed-year-select {
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ed-muted);
}

.enterprise-dashboard .ed-ar-title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.enterprise-dashboard .ed-page-actions {
    position: relative;
    z-index: 5;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.enterprise-dashboard .ed-account-filters {
    position: relative;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    pointer-events: auto;
}

.enterprise-dashboard .ed-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--ed-border, #d8dee6);
    border-radius: 0.375rem;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ed-muted);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    line-height: 1.2;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.enterprise-dashboard .ed-filter-toggle:hover {
    border-color: #93c5fd;
    color: var(--ed-navy, #002245);
}

.enterprise-dashboard .ed-filter-toggle.is-on {
    background: #e8f1ff;
    border-color: #93c5fd;
    color: var(--ed-navy, #002245);
}

.enterprise-dashboard .ed-filter-toggle-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.9rem;
    height: 0.9rem;
    border: 1px solid currentColor;
    border-radius: 0.2rem;
    font-size: 0.65rem;
    line-height: 1;
    flex: 0 0 auto;
}

.enterprise-dashboard .ed-filter-toggle.is-on .ed-filter-toggle-mark {
    background: var(--ed-accent, #0d6efd);
    border-color: var(--ed-accent, #0d6efd);
    color: #fff;
}

.enterprise-dashboard .ed-user-select-wrap {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 16.5rem;
    min-width: 16.5rem;
    max-width: 16.5rem;
    overflow: hidden;
}

.enterprise-dashboard .ed-user-select-wrap .e-ddl.ed-user-select,
.enterprise-dashboard .ed-user-select-wrap .e-input-group.ed-user-select {
    width: 100% !important;
    min-height: 2.15rem;
    max-width: 100%;
}

.enterprise-dashboard .ed-user-select-wrap .e-input-group {
    border-radius: 0.375rem;
    border-color: var(--ed-border, #d8dee6);
    background: #fff;
}

.enterprise-dashboard .ed-user-select-wrap .e-input-group .e-input,
.enterprise-dashboard .ed-user-select-wrap .e-input-group input.e-input {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ed-navy);
    min-height: 2.15rem;
    padding: 0.3rem 0.55rem;
}

.enterprise-dashboard .ed-ar-header .ed-year-select {
    flex: 0 0 auto;
    width: 3.6rem;
    min-width: 3.6rem;
    max-width: 3.6rem;
    height: 1.25rem;
    margin: 0;
    padding: 0 1.1rem 0 0.25rem;
    border: 1px solid var(--ed-border);
    border-radius: 4px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.2rem center;
    background-size: 0.65rem;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.enterprise-dashboard .ed-kpi-card--ar .card-body {
    min-height: 0;
}

.enterprise-dashboard .ed-ar-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-top: 0.1rem;
    flex: 1;
    align-content: stretch;
}

.enterprise-dashboard .ed-ar-block {
    background: #f1f5f9;
    border: 1px solid var(--ed-border);
    border-radius: 8px;
    padding: 0.5rem 0.35rem;
    text-align: center;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    height: 100%;
}

.enterprise-dashboard .ed-ar-block:last-child {
    background: linear-gradient(180deg, #e8eef5 0%, #f1f5f9 100%);
    border-color: #c5d0de;
}

.enterprise-dashboard .ed-ar-block--clickable {
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.enterprise-dashboard .ed-ar-block--clickable:hover,
.enterprise-dashboard .ed-ar-block--clickable:focus-visible {
    border-color: var(--ed-navy, #002245);
    box-shadow: 0 2px 8px rgba(0, 34, 69, 0.18);
    transform: translateY(-1px);
}

.enterprise-dashboard .ed-ar-block--clickable:focus-visible {
    outline: 2px solid var(--ed-navy, #002245);
    outline-offset: 1px;
}

.enterprise-dashboard .ed-ar-block--clickable:active {
    transform: translateY(0);
    box-shadow: none;
}

.enterprise-dashboard .ed-ar-block-year {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ed-navy);
    letter-spacing: 0.02em;
}

.enterprise-dashboard .ed-ar-block-amt {
    font-size: 1.15rem;
    font-weight: 800;
    color: #dc2626;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.enterprise-dashboard .ed-ar-block-pct {
    font-size: 1rem;
    font-weight: 800;
    color: #dc2626;
    margin-left: 0;
}

.enterprise-dashboard .ed-kpi-card--online .ed-ar-block-amt,
.enterprise-dashboard .ed-kpi-card--online .ed-ar-block-pct {
    color: #166534;
}

.enterprise-dashboard .ed-year-breakdown {
    border-top: 1px solid var(--ed-border);
    padding-top: 0.5rem;
}

.enterprise-dashboard .ed-year-row {
    border-bottom: 1px solid #f1f5f9;
}

.enterprise-dashboard .ed-year-row:last-child {
    border-bottom: none;
}

.enterprise-dashboard .ed-bottom-row {
    flex: 1 1 0;
    min-height: 280px;
    max-height: none;
    align-items: stretch;
    align-content: stretch;
    margin-bottom: 0 !important;
    overflow: hidden;
    height: auto;
}

.enterprise-dashboard .ed-bottom-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    align-self: stretch;
    height: 100%;
}

.enterprise-dashboard .ed-bottom-row .ed-panel {
    flex: 1 1 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.enterprise-dashboard .ed-bottom-card-body {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.enterprise-dashboard .ed-attention-col .na-panel {
    min-height: 280px;
    height: 100%;
}

.enterprise-dashboard .ed-invoices-header {
    flex-wrap: wrap;
}

.enterprise-dashboard .ed-invoices-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.enterprise-dashboard .ed-invoices-check {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ed-navy);
    white-space: nowrap;
    cursor: pointer;
}

.enterprise-dashboard .ed-invoices-check input {
    width: 0.85rem;
    height: 0.85rem;
    margin: 0;
    accent-color: var(--ed-navy);
}

.enterprise-dashboard .ed-invoices-days {
    width: 3.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
}

.enterprise-dashboard .ed-invoices-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 10rem;
    max-width: 16rem;
    flex: 1 1 10rem;
}

.enterprise-dashboard .ed-invoices-search > .bi-search {
    position: absolute;
    left: 0.55rem;
    color: var(--ed-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

.enterprise-dashboard .ed-invoices-search input {
    width: 100%;
    padding-left: 1.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ed-navy);
    border-color: #d7e0ea;
}

.enterprise-dashboard .ed-panel--invoices {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.enterprise-dashboard .ed-panel--invoices > .ed-invoices-header,
.enterprise-dashboard .ed-panel--invoices > .card-header {
    flex: 0 0 auto;
}

.enterprise-dashboard .ed-invoices-body {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    padding: 0 !important;
    overflow: hidden;
    position: relative;
}

.enterprise-dashboard .ed-invoices-body .e-grid {
    border: none;
    font-size: 12px;
    height: 100% !important;
    max-height: 100%;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-gridcontent {
    overflow-y: auto !important;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-headercell,
.enterprise-dashboard .ed-invoices-body .e-grid .e-rowcell,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaption,
.enterprise-dashboard .ed-invoices-body .e-grid .e-recordplusexpand,
.enterprise-dashboard .ed-invoices-body .e-grid .e-recordpluscollapse {
    font-size: 12px;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-headercell {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    vertical-align: bottom;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-headercell .e-headercelldiv,
.enterprise-dashboard .ed-invoices-body .e-grid .e-headercell .e-headertext {
    font-size: 12px;
    font-weight: 700;
    white-space: normal !important;
    word-break: break-word;
    line-height: 1.15;
    text-overflow: clip !important;
    overflow: visible !important;
    height: auto !important;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-rowcell {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
    vertical-align: middle;
    height: auto !important;
    text-overflow: clip !important;
    overflow: visible !important;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-rowcell .e-ellipsistooltip,
.enterprise-dashboard .ed-invoices-body .e-grid .e-rowcell > .e-ellipsistooltip {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: clip !important;
    overflow: visible !important;
    display: block;
    line-height: 1.25;
}

/* Group captions — dark navy text (visible on Syncfusion grey group rows) */
.enterprise-dashboard .ed-invoices-body .e-grid tr.e-groupcaptionrow > td,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-groupcaption,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordplusexpand,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordpluscollapse,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-indentcell,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-templatecell {
    color: #002245 !important;
    vertical-align: middle !important;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-groupcaption,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-templatecell {
    padding: 0.35rem 0.5rem !important;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordplusexpand,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordpluscollapse {
    padding-left: 0.55rem !important;
}

.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordplusexpand .e-icons,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordpluscollapse .e-icons,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordplusexpand .e-icon-gdownarrow,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-recordpluscollapse .e-icon-grightarrow,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-groupcaption,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-groupcaption *,
.enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaptionrow .e-groupcaptiontext {
    color: #002245 !important;
    fill: #002245 !important;
}

.enterprise-dashboard .ed-inv-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.9rem;
    padding: 0.2rem 0.25rem;
    color: #002245 !important;
}

.enterprise-dashboard .ed-inv-group--type {
    border-left: 3px solid #ff6600;
    padding-left: 0.55rem;
}

.enterprise-dashboard .ed-inv-group--mode {
    border-left: 3px solid #1d4ed8;
    padding-left: 0.55rem;
}

.enterprise-dashboard .ed-inv-group-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #002245 !important;
}

.enterprise-dashboard .ed-inv-group-value {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #002245 !important;
}

.enterprise-dashboard .ed-inv-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.3rem;
    padding: 0 0.4rem;
    margin-left: 0.15rem;
    border-radius: 999px;
    background: #e8eef5;
    border: 1px solid #c5d0de;
    font-size: 0.8rem;
    font-weight: 800;
    color: #002245 !important;
}

.enterprise-dashboard .ed-inv-number-link {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #0b5ed7;
    font-family: inherit;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.enterprise-dashboard .ed-inv-rating-badge {
    appearance: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    margin: 0 auto;
    padding: 0;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.enterprise-dashboard .ed-inv-rating-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.enterprise-dashboard .ed-inv-rating-badge--5 {
    background: #166534;
    color: #fff;
}

.enterprise-dashboard .ed-inv-rating-badge--4 {
    background: #15803d;
    color: #fff;
}

.enterprise-dashboard .ed-inv-rating-badge--3 {
    background: #ca8a04;
    color: #fff;
}

.enterprise-dashboard .ed-inv-rating-badge--2 {
    background: #ea580c;
    color: #fff;
}

.enterprise-dashboard .ed-inv-rating-badge--1 {
    background: #dc2626;
    color: #fff;
}

.enterprise-dashboard .ed-inv-rating-badge--0 {
    background: #e2e8f0;
    color: #64748b;
}

.enterprise-dashboard .ed-inv-number-link:hover {
    color: #084298;
}

.enterprise-dashboard .ed-inv-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

@media (min-width: 1920px) {
    .enterprise-dashboard .ed-inv-number-link {
        font-size: 15px !important;
    }
}

@media (max-width: 1919.98px) {
    .enterprise-dashboard .ed-invoices-body .e-grid {
        font-size: 10px;
    }

    .enterprise-dashboard .ed-invoices-body .e-grid .e-headercell,
    .enterprise-dashboard .ed-invoices-body .e-grid .e-rowcell,
    .enterprise-dashboard .ed-invoices-body .e-grid .e-groupcaption,
    .enterprise-dashboard .ed-invoices-body .e-grid .e-recordplusexpand,
    .enterprise-dashboard .ed-invoices-body .e-grid .e-recordpluscollapse,
    .enterprise-dashboard .ed-invoices-body .e-grid .e-headercell .e-headercelldiv,
    .enterprise-dashboard .ed-invoices-body .e-grid .e-headercell .e-headertext {
        font-size: 10px;
    }

    .enterprise-dashboard .ed-inv-number-link {
        font-size: 10px !important;
    }

    .enterprise-dashboard .ed-inv-group-label {
        font-size: 0.78rem;
    }

    .enterprise-dashboard .ed-inv-group-value {
        font-size: 0.92rem;
    }

    .enterprise-dashboard .ed-inv-group-count {
        font-size: 0.75rem;
        height: 1.2rem;
    }

    /* Row 2 — reduce card HEIGHT only; keep full column widths */
    .enterprise-dashboard .ed-trend-order-row .ed-panel-header {
        padding: 0.4rem 0.7rem;
    }

    .enterprise-dashboard .ed-trend-order-row .ed-panel-header .card-title {
        font-size: 0.9rem;
    }

    .enterprise-dashboard .ed-trend-order-row .ed-sales-day-title {
        font-size: 0.72rem;
    }

    .enterprise-dashboard .ed-trend-body,
    .enterprise-dashboard .ed-orderdesk-body,
    .enterprise-dashboard .ed-dispatches-body {
        min-height: 148px;
        height: 148px;
        max-height: 148px;
    }

    .enterprise-dashboard .ed-trend-body {
        padding: 0.2rem 0.5rem !important;
    }

    .enterprise-dashboard .ed-orderdesk-body {
        overflow: auto;
        padding: 0.35rem 0.5rem !important;
    }

    .enterprise-dashboard .ed-skel-chart {
        min-height: 110px;
    }

    .enterprise-dashboard .ed-trend-body .e-chart,
    .enterprise-dashboard .ed-trend-body .e-control.e-chart,
    .enterprise-dashboard .ed-trend-body > div,
    .enterprise-dashboard .ed-trend-body .e-chart svg {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        min-height: 0 !important;
    }

    /* Sales Trend chart fonts — readable on HD, still compact */
    .enterprise-dashboard .ed-trend-body .e-chart text,
    .enterprise-dashboard .ed-trend-body svg text {
        font-size: 9px !important;
    }

    .enterprise-dashboard .ed-trend-body .e-chart .e-datalabel text,
    .enterprise-dashboard .ed-trend-body svg .e-datalabel text {
        font-size: 8px !important;
    }
}

.enterprise-dashboard .ed-bottom-card-body > .e-accumulationchart {
    flex: 1 1 auto;
    min-height: 0;
    height: 100% !important;
}

.enterprise-dashboard .ed-invoices-body > .e-grid,
.enterprise-dashboard .ed-invoices-body > div {
    flex: 1 1 0;
    min-height: 0;
    height: 100% !important;
    max-height: 100%;
}

.enterprise-dashboard .ed-kpi-card--delivery .card-body {
    min-height: 0;
}

.enterprise-dashboard .ed-delivery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
}

.enterprise-dashboard .ed-delivery-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.enterprise-dashboard .ed-delivery-analytics-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
    padding: 0;
}

.enterprise-dashboard .ed-delivery-analytics-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.enterprise-dashboard .ed-delivery-analytics-btn i {
    font-size: 1rem;
}

.enterprise-dashboard .ed-delivery-actions .ed-kpi-icon--dispatch {
    cursor: pointer;
}

.enterprise-dashboard .ed-delivery-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
}

.enterprise-dashboard .ed-delivery-sep {
    color: #94a3b8;
    font-weight: 600;
}

.enterprise-dashboard .ed-delivery-stat {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ed-navy);
    white-space: nowrap;
}

.enterprise-dashboard .ed-delivery-chart {
    flex: 1;
    min-height: 90px;
}

.enterprise-dashboard .ed-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    flex-shrink: 0;
}

.enterprise-dashboard .ed-kpi-icon--sales { background: linear-gradient(135deg, #002245, #0f4c75); }
.enterprise-dashboard .ed-kpi-icon--trend { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.enterprise-dashboard .ed-kpi-icon--ar { background: linear-gradient(135deg, #ff6600, #ff8533); }
.enterprise-dashboard .ed-kpi-icon--dispatch { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }

.enterprise-dashboard .ed-queue-card .card-body {
    padding: 0.9rem 1rem;
}

.enterprise-dashboard .ed-queue-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--ed-navy);
    flex-shrink: 0;
}

.enterprise-dashboard .ed-queue-icon--lg {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 1.25rem;
}

.enterprise-dashboard .ed-queue-card--warning .ed-queue-icon { background: #fff7ed; color: #c2410c; }
.enterprise-dashboard .ed-queue-card--info .ed-queue-icon { background: #eff6ff; color: #1d4ed8; }
.enterprise-dashboard .ed-queue-card--danger .ed-queue-icon { background: #fef2f2; color: #b91c1c; }
.enterprise-dashboard .ed-queue-card--primary .ed-queue-icon { background: #eef2ff; color: #3730a3; }
.enterprise-dashboard .ed-queue-card--success .ed-queue-icon { background: #ecfdf5; color: #047857; }

.enterprise-dashboard .ed-queue-count {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ed-navy);
    line-height: 1.1;
}

.enterprise-dashboard .ed-queue-count--lg {
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    margin-top: 0;
}

.enterprise-dashboard .ed-queue-card--split .card-body {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.enterprise-dashboard .ed-queue-split {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.enterprise-dashboard .ed-queue-mid {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}

.enterprise-dashboard .ed-queue-mid .ed-queue-label {
    margin-top: 0.1rem;
}

.enterprise-dashboard .ed-queue-pct {
    flex: 0 0 auto;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.enterprise-dashboard .ed-queue-pct--danger { color: #b91c1c; }
.enterprise-dashboard .ed-queue-pct--warn { color: #c2410c; }
.enterprise-dashboard .ed-queue-pct--ok { color: #047857; }
.enterprise-dashboard .ed-queue-pct--spacer {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.enterprise-dashboard .ed-queue-card--loading {
    opacity: 0.55;
    pointer-events: none;
}

.enterprise-dashboard .ed-panel-header {
    background: transparent;
    border-bottom: 1px solid var(--ed-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.15rem;
}

.enterprise-dashboard .ed-panel-header--dispatches {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.enterprise-dashboard .ed-dispatch-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 12rem;
    min-width: 10rem;
    max-width: 19rem;
    margin-left: auto;
}

.enterprise-dashboard .ed-dispatch-browse-btn {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ed-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    color: #002245;
    cursor: pointer;
    padding: 0;
}

.enterprise-dashboard .ed-dispatch-browse-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.enterprise-dashboard .ed-dispatch-browse-btn i {
    font-size: 0.85rem;
}

.enterprise-dashboard .ed-dispatch-header-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.enterprise-dashboard .ed-dispatch-header-search > .bi-search {
    position: absolute;
    left: 0.55rem;
    font-size: 0.75rem;
    color: #94a3b8;
    pointer-events: none;
}

.enterprise-dashboard .ed-dispatch-search-input {
    width: 100%;
    border: 1px solid var(--ed-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: 0.35rem 1.75rem 0.35rem 1.65rem;
    font-size: 0.78rem;
    color: #0f172a;
    outline: none;
}

.enterprise-dashboard .ed-dispatch-search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.enterprise-dashboard .ed-dispatch-search-clear {
    position: absolute;
    right: 0.25rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
}

.enterprise-dashboard .ed-dispatch-search-clear:hover {
    color: #475569;
    background: #f1f5f9;
}

.enterprise-dashboard .ed-dispatch-status {
    display: inline-block;
    margin-top: 0.2rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.3;
}

.enterprise-dashboard .ed-dispatch-status--on {
    background: #dbeafe;
    color: #1d4ed8;
}

.enterprise-dashboard .ed-dispatch-status--delivered {
    background: #dcfce7;
    color: #15803d;
}

.enterprise-dashboard .ed-trend-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    min-width: 0;
}

.enterprise-dashboard .ed-trend-nav {
    max-width: 11rem;
    margin-left: 0;
}

.enterprise-dashboard .ed-orderdesk-nav {
    max-width: 13rem;
    margin-left: auto;
}

.enterprise-dashboard .ed-trend-body,
.enterprise-dashboard .ed-orderdesk-body {
    min-height: 210px;
}

.enterprise-dashboard .ed-trend-body {
    height: 210px;
    max-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    overflow: hidden;
    padding: 0.35rem 0.5rem !important;
}

.enterprise-dashboard .ed-trend-body > .e-chart,
.enterprise-dashboard .ed-trend-body > .e-control.e-chart,
.enterprise-dashboard .ed-trend-body > div {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100% !important;
}

.enterprise-dashboard .ed-orderdesk-body {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0.5rem !important;
}

.enterprise-dashboard .ed-dispatches-body {
    min-height: 210px;
    max-height: 280px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.enterprise-dashboard .ed-dispatch-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.enterprise-dashboard .ed-dispatch-cards {
    display: none;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.65rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.enterprise-dashboard .ed-dispatch-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    text-align: left;
    border: 1px solid var(--ed-border);
    border-radius: 10px;
    background: #fff;
    padding: 0.7rem 0.8rem;
    color: inherit;
    cursor: pointer;
}

.enterprise-dashboard .ed-dispatch-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.enterprise-dashboard .ed-dispatch-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.enterprise-dashboard .ed-dispatch-card-driver {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex-wrap: wrap;
}

.enterprise-dashboard .ed-dispatch-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.78rem;
    color: #475569;
}

/* App tablet shell: 1024–1399 — Active Dispatches full width (col-12), table view */
@media (min-width: 1024px) and (max-width: 1399.98px) {
    .enterprise-dashboard .ed-panel--dispatches .ed-dispatches-body {
        min-height: 260px;
        max-height: 360px;
    }
}

/* App mobile shell: <1024 — card list instead of table */
@media (max-width: 1023.98px) {
    .enterprise-dashboard .ed-dispatch-table-wrap--desktop {
        display: none !important;
    }

    .enterprise-dashboard .ed-dispatch-cards {
        display: flex;
    }

    .enterprise-dashboard .ed-panel--dispatches .ed-dispatches-body {
        min-height: 220px;
        max-height: none;
    }

    .enterprise-dashboard .ed-dispatch-header-search {
        max-width: none;
        flex: 1 1 auto;
    }
}

/* Hide invoices on tablet + mobile; keep Needs Attention visible */
@media (max-width: 1399.98px) {
    .enterprise-dashboard .ed-invoices-col {
        display: none !important;
    }

    .enterprise-dashboard .ed-bottom-row {
        display: flex !important;
        flex: 0 0 auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        height: auto;
    }

    .enterprise-dashboard .ed-attention-col {
        display: flex !important;
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        min-height: 260px;
        height: auto;
    }

    .enterprise-dashboard .ed-attention-col .na-panel {
        min-height: 260px;
        height: auto;
        max-height: min(52vh, 420px);
    }
}

.enterprise-dashboard .ed-dispatch-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.enterprise-dashboard .ed-dispatch-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--ed-navy);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 0.75rem;
    border: none;
    white-space: nowrap;
}

.enterprise-dashboard .ed-dispatch-table thead th.ed-dispatch-sortable {
    cursor: pointer;
    user-select: none;
}

.enterprise-dashboard .ed-dispatch-table thead th.ed-dispatch-sortable:hover {
    background: #003366;
}

.enterprise-dashboard .ed-dispatch-table thead th.ed-dispatch-sorted {
    color: #ffd28a;
}

.enterprise-dashboard .ed-dispatch-sort-icon {
    display: inline-block;
    margin-left: 0.2rem;
    font-size: 0.72rem;
    opacity: 0.85;
    font-weight: 700;
}

.enterprise-dashboard .ed-dispatch-table tbody td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--ed-border);
    background: #fff;
}

.enterprise-dashboard .ed-dispatch-row {
    transition: background-color 0.12s ease;
}

.enterprise-dashboard .ed-dispatch-row:hover td {
    background: #f5f8fc;
}

.enterprise-dashboard .ed-dispatch-row:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--ed-orange);
}

.enterprise-dashboard .ed-dispatch-row:last-child td {
    border-bottom: none;
}

.enterprise-dashboard .ed-dispatch-id-btn {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
}

.enterprise-dashboard .ed-dispatch-id-btn:hover .ed-dispatch-id {
    color: var(--ed-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.enterprise-dashboard .ed-dispatch-id {
    font-weight: 800;
    color: var(--ed-navy);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.enterprise-dashboard .ed-dispatch-date {
    margin-top: 0.1rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ed-navy);
    letter-spacing: 0.01em;
}

.enterprise-dashboard .ed-dispatch-table th.ed-dispatch-col-driver,
.enterprise-dashboard .ed-dispatch-table td.ed-dispatch-col-driver {
    width: 6.5rem;
    max-width: 6.5rem;
}

.enterprise-dashboard .ed-dispatch-driver {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
    max-width: 6.25rem;
}

.enterprise-dashboard .ed-dispatch-avatar {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #001f3f, #1d4ed8);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-top: 0.1rem;
}

.enterprise-dashboard .ed-dispatch-driver-name {
    font-weight: 600;
    font-size: 0.80rem;
    line-height: 1.25;
    color: #1e293b;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.enterprise-dashboard .ed-dispatch-zone {
    display: inline-block;
    max-width: 7.5rem;
    color: var(--ed-navy);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.enterprise-dashboard .ed-dispatch-inv {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.6rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: #eef3f9;
    color: var(--ed-navy);
    font-size: 0.8125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border: 1px solid #d7e2ef;
    white-space: nowrap;
}

.enterprise-dashboard .ed-dispatch-inv--on {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.enterprise-dashboard .ed-dispatch-inv--delivered {
    background: #ecfdf5;
    color: #0f766e;
    border-color: #99f6e4;
}

.enterprise-dashboard .ed-dispatch-inv--closed {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.enterprise-dashboard .ed-dispatch-pct {
    font-size: 0.8125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--ed-navy);
}

.enterprise-dashboard .ed-dispatch-completed {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    line-height: 1.15;
}

.enterprise-dashboard .ed-dispatch-ratio {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.enterprise-dashboard .ed-dispatch-pct--danger {
    color: #dc2626;
}

.enterprise-dashboard .ed-dispatch-pct--warn {
    color: #ea580c;
}

.enterprise-dashboard .ed-dispatch-pct--ok {
    color: #16a34a;
}

.enterprise-dashboard .ed-leaderboard {
    display: grid;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.65rem;
    align-content: start;
}

.enterprise-dashboard .ed-leaderboard-item {
    min-width: 0;
    padding: 0.5rem 0.55rem;
    border: 1px solid var(--ed-border);
    border-radius: 8px;
    background: #fff;
}

.enterprise-dashboard .ed-leaderboard-item .ed-money {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ed-navy);
    white-space: nowrap;
}

.enterprise-dashboard .ed-leaderboard-item .ed-od-pct {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--ed-navy);
    margin-left: 0.15rem;
}

.enterprise-dashboard .ed-leaderboard-item .ed-truncate {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ed-navy);
}

.enterprise-dashboard .ed-leaderboard-item .small {
    font-size: 0.78rem;
    font-weight: 600;
}

.enterprise-dashboard .ed-panel--empty {
    background: transparent;
    border-style: dashed;
    border-color: #dbe3ee;
    box-shadow: none;
    pointer-events: none;
    min-height: 1px;
}

.enterprise-dashboard .ed-panel-header .card-title {
    color: var(--ed-navy);
    font-weight: 700;
    font-size: 0.98rem;
}

.enterprise-dashboard .ed-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ed-orange);
    text-decoration: none;
}

.enterprise-dashboard .ed-link:hover {
    text-decoration: underline;
}

.enterprise-dashboard .ed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 140px;
    color: var(--ed-muted);
    text-align: center;
}

.enterprise-dashboard .ed-progress {
    height: 6px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.enterprise-dashboard .ed-progress .progress-bar {
    background: linear-gradient(90deg, var(--ed-navy), var(--ed-orange));
}

.enterprise-dashboard .ed-money {
    font-weight: 700;
    color: var(--ed-navy);
    font-size: 0.9rem;
}

.enterprise-dashboard .ed-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.enterprise-dashboard .ed-table th {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--ed-muted);
}

.enterprise-dashboard .ed-row-click {
    cursor: pointer;
}

.enterprise-dashboard .ed-row-click:hover {
    background: #f8fafc;
}

.enterprise-dashboard .ed-attention-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.enterprise-dashboard .ed-attention-day {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.15rem;
}

.enterprise-dashboard .ed-attention-count {
    flex-shrink: 0;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.enterprise-dashboard .ed-attention-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.enterprise-dashboard .ed-attention-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid var(--ed-border, #e2e8f0);
    text-align: left;
}

.enterprise-dashboard .ed-attention-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.enterprise-dashboard .ed-attention-row {
    cursor: pointer;
}

.enterprise-dashboard .ed-attention-row:hover {
    background: #f8fafc;
}

.enterprise-dashboard .ed-attention-row--danger td {
    color: #b91c1c;
}

.enterprise-dashboard .ed-attention-row--danger .ed-attention-inv-client {
    color: #b91c1c;
}

.enterprise-dashboard .ed-attention-inv-num {
    font-weight: 650;
    line-height: 1.2;
    font-size: 0.78rem;
    color: #64748b;
}

.enterprise-dashboard .ed-attention-inv-client {
    font-size: 0.95rem;
    font-weight: 750;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 14rem;
    margin-top: 0.12rem;
}

.enterprise-dashboard .ed-attention-elapsed {
    text-align: right;
    white-space: nowrap;
}

.enterprise-dashboard .ed-attention-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.enterprise-dashboard .ed-elapsed-pill {
    display: inline-block;
    min-width: 3.2rem;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.75rem;
    text-align: center;
}

.enterprise-dashboard .ed-elapsed-pill--danger {
    background: #fee2e2;
    color: #991b1b;
}

.enterprise-dashboard .ed-elapsed-pill--warning {
    background: #fef3c7;
    color: #92400e;
}

.enterprise-dashboard .ed-attention {
    border-color: var(--ed-border);
}

.enterprise-dashboard .ed-severity {
    width: 8px;
    border-radius: 999px;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 36px;
}

.enterprise-dashboard .ed-severity--info { background: #3b82f6; }
.enterprise-dashboard .ed-severity--warning { background: #f59e0b; }
.enterprise-dashboard .ed-severity--danger { background: #ef4444; }

.enterprise-dashboard .ed-cat {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
}

.enterprise-dashboard .ed-aging-overdue {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #334155;
    background: #fff7ed;
    border: 1px solid #ffedd5;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}

.enterprise-dashboard .ed-po-meter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.enterprise-dashboard .ed-card--locked {
    opacity: 0.72;
    cursor: not-allowed;
}

.enterprise-dashboard .ed-card--locked .ed-queue-split,
.enterprise-dashboard .ed-card--locked .card-body {
    pointer-events: none;
}

.enterprise-dashboard .ed-locked-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 4.5rem;
    color: var(--ed-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.enterprise-dashboard .ed-locked-state .bi-lock-fill {
    font-size: 1.15rem;
    color: #94a3b8;
}

.enterprise-dashboard .ed-card-lock {
    color: #94a3b8;
    font-size: 0.95rem;
}

.enterprise-dashboard .ed-queue-count .bi-lock-fill {
    font-size: 1rem;
    color: #94a3b8;
}

/* Keep mobile home charts unaffected when dashboard is hidden */
@media (max-width: 1399.98px) {
    .enterprise-dashboard .ed-kpi-value {
        font-size: 1.4rem;
    }
}

/* Tablet / mid desktop — wrap cards and keep readable heights */
@media (max-width: 1199.98px) {
    .enterprise-dashboard {
        min-height: 0;
        height: auto;
        overflow: visible;
        padding-bottom: 1.25rem;
    }

    .enterprise-dashboard .ed-bottom-row {
        flex: 0 0 auto;
        overflow: visible;
    }

    .enterprise-dashboard .ed-bottom-row > [class*="col-"],
    .enterprise-dashboard .ed-bottom-row .ed-panel {
        min-height: 280px;
        height: auto;
    }

    .enterprise-dashboard .ed-bottom-card-body {
        min-height: 240px;
        height: 320px;
    }

    .enterprise-dashboard .ed-trend-body,
    .enterprise-dashboard .ed-orderdesk-body,
    .enterprise-dashboard .ed-dispatches-body {
        min-height: 180px;
    }
}

@media (min-width: 1200px) {
    .enterprise-dashboard .ed-kpi-card {
        min-height: 100%;
    }
}
/* ── Shared Needs Attention panel (Home + Dispatch Board) ── */
.na-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.na-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: transparent;
}

.na-header__title-block {
    display: flex;
    align-items: center;
    min-width: 0;
}

.na-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: #002245;
}

.na-header__actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 12rem;
    min-width: 10rem;
    max-width: 22rem;
    margin-left: auto;
}

.na-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.na-search > .bi-search {
    position: absolute;
    left: 0.55rem;
    color: #94a3b8;
    font-size: 0.75rem;
    pointer-events: none;
}

.na-search-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 0.35rem 1.75rem 0.35rem 1.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
}

.na-search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.na-search-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.na-search-clear {
    position: absolute;
    right: 0.25rem;
    appearance: none;
    border: none;
    background: transparent;
    color: #94a3b8;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

.na-search-clear:hover {
    color: #334155;
    background: #f1f5f9;
}

.na-count {
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.na-day-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.na-day-btn {
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.na-day-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.na-day-btn:not(:disabled):hover {
    background: #f1f5f9;
}

.na-day-label {
    min-width: 5.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 750;
    color: #334155;
    white-space: nowrap;
}

.na-tabs {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.na-tab {
    appearance: none;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    margin-bottom: -1px;
    border-radius: 8px 8px 0 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.na-tab:hover {
    color: #002245;
    background: #eef2f7;
}

.na-tab--active {
    color: #002245;
    background: #fff;
    border-color: #e2e8f0;
    border-bottom-color: #fff;
    box-shadow: 0 -1px 0 #fff;
}

.na-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.na-tab--active .na-tab-count {
    background: #002245;
    color: #fff;
}

.na-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.na-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.na-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #002245;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 0.75rem;
    border: none;
    white-space: nowrap;
    text-align: left;
}

.na-table thead th.na-sortable {
    cursor: pointer;
    user-select: none;
}

.na-table thead th.na-sortable:hover {
    background: #003366;
    color: #fff;
}

.na-table thead th.na-sorted {
    color: #ffd28a;
}

.na-sort-icon {
    display: inline-block;
    margin-left: 0.2rem;
    font-size: 0.72rem;
    opacity: 0.85;
    font-weight: 700;
}

.na-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    background: #fff;
}

.na-row--selectable {
    cursor: pointer;
}

.na-row--selectable:hover {
    background: #f8fafc;
}

.na-row--selected {
    background: #e8f1fb;
}

.na-row--selected:hover {
    background: #dceaf8;
}

.na-row--danger td {
    color: #b91c1c;
}

.na-inv-client {
    font-size: 0.9rem;
    font-weight: 750;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 12rem;
}

.na-row--danger .na-inv-client {
    color: #b91c1c;
}

.na-inv-num {
    font-size: 0.72rem;
    font-weight: 650;
    color: #64748b;
    margin-top: 0.08rem;
}

.na-inv-link {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 750;
    color: #002245;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    line-height: inherit;
}

.na-inv-link:hover {
    color: #003366;
}

.na-rank {
    width: 2.4rem;
    text-align: center;
    vertical-align: middle;
}

.na-rating-badge {
    appearance: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    margin: 0 auto;
    padding: 0;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.na-rating-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.na-rating-badge--5 {
    background: #166534;
    color: #fff;
}

.na-rating-badge--4 {
    background: #15803d;
    color: #fff;
}

.na-rating-badge--3 {
    background: #ca8a04;
    color: #fff;
}

.na-rating-badge--2 {
    background: #ea580c;
    color: #fff;
}

.na-rating-badge--1 {
    background: #dc2626;
    color: #fff;
}

.na-rating-badge--0 {
    background: #e2e8f0;
    color: #64748b;
}

.na-mode-cell {
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.na-num,
.na-elapsed {
    text-align: right;
    white-space: nowrap;
}

.na-num {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.na-elapsed-pill {
    display: inline-block;
    min-width: 3rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.72rem;
    text-align: center;
}

.na-elapsed-pill--danger {
    background: #fee2e2;
    color: #991b1b;
}

.na-elapsed-pill--warning {
    background: #fef3c7;
    color: #92400e;
}

.na-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.82rem;
    text-align: center;
    min-height: 8rem;
}

.na-error {
    color: #b91c1c;
    font-size: 0.82rem;
}
