.ops-workspace {
    display: grid;
    gap: 20px;
    --ops-accent-rgb: 37, 99, 235;
    --ops-highlight-rgb: 245, 158, 11;
    --ops-ink: #173150;
}

.ops-workspace > * {
    min-width: 0;
}

.ops-workspace > .tw-transition-all {
    width: 100%;
}

.ops-workspace--sales {
    --ops-accent-rgb: 37, 99, 235;
    --ops-highlight-rgb: 245, 158, 11;
    --ops-ink: #173150;
}

.ops-workspace--purchase {
    --ops-accent-rgb: 5, 150, 105;
    --ops-highlight-rgb: 14, 165, 233;
    --ops-ink: #134e4a;
}

.ops-workspace--returns {
    --ops-accent-rgb: 15, 23, 42;
    --ops-highlight-rgb: 249, 115, 22;
    --ops-ink: #1f2937;
}

.ops-workspace__hero {
    position: relative;
    overflow: hidden;
    padding: 24px 26px;
    border: 1px solid rgba(var(--ops-accent-rgb), 0.12);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(var(--ops-highlight-rgb), 0.2), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(var(--ops-accent-rgb), 0.92) 100%);
    color: #fff;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
}

.ops-workspace__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.84);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ops-workspace__hero h1 {
    margin: 12px 0 6px;
    color: #fff;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.ops-workspace__hero p {
    max-width: 840px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.7;
}

.ops-workspace__range {
    display: inline-flex;
    margin-top: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ops-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ops-summary--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ops-summary__card {
    position: relative;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.95));
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.ops-summary__label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ops-summary__value {
    color: #0f172a;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.ops-summary__value--compact {
    min-height: 38px;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0;
}

.ops-summary__value--compact .label,
.ops-summary__value--compact .badge,
.ops-summary__value--compact small.label {
    margin: 0 6px 6px 0;
}

.ops-summary__note {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.ops-workspace .box.box-primary,
.ops-workspace .box.box-solid {
    border-top: 1px solid var(--app-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.ops-workspace .box-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.ops-workspace .box-header.with-border {
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

.ops-workspace .box-title {
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ops-workspace .box-body {
    padding: 20px 22px 22px;
}

.ops-workspace .panel-collapse .box-body {
    padding-top: 16px;
    padding-bottom: 8px;
}

.ops-table-wrap {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
}

.ops-table {
    margin-bottom: 0;
}

.ops-table thead th,
.ops-table-shell .dataTables_wrapper .dataTables_scrollHead table thead th {
    background: linear-gradient(180deg, rgba(var(--ops-accent-rgb), 0.08), rgba(var(--ops-highlight-rgb), 0.08));
    color: var(--ops-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.ops-table td,
.ops-table-shell .dataTables_wrapper .dataTables_scrollBody td {
    vertical-align: middle !important;
}

.ops-table-shell .dataTables_wrapper .dataTables_scroll {
    border-radius: 22px;
    overflow: visible; /* Changed from hidden to allow dropdowns to pop out */
    border: 1px solid rgba(148, 163, 184, 0.16);
    position: relative;
}

.ops-table-shell .dataTables_wrapper .dataTables_scrollBody {
    background: rgba(255, 255, 255, 0.96);
    overflow: visible !important; /* Allow vertical overflow for dropdowns */
}

/* Ensure the wrapper handles the main scrolling if body is visible */
.ops-table-shell .dataTables_wrapper {
    position: relative;
}

.ops-table .btn-link {
    padding: 0;
    font-weight: 700;
    color: rgb(var(--ops-accent-rgb));
}

.ops-table .btn-link:hover,
.ops-table .btn-link:focus {
    color: var(--ops-ink);
    text-decoration: none;
}

.ops-table .footer-total,
.ops-table-shell .dataTables_wrapper tfoot .footer-total {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.94), rgba(226, 232, 240, 0.92)) !important;
    color: #0f172a;
}

.ops-workspace .form-control,
.ops-workspace .select2-container--default .select2-selection--single,
.ops-workspace .select2-container--default .select2-selection--multiple {
    border-radius: 14px;
}

.ops-workspace .box-tools .tw-dw-btn {
    box-shadow: 0 12px 24px rgba(var(--ops-accent-rgb), 0.22);
}

@media (max-width: 1199px) {
    .ops-summary,
    .ops-summary--five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ops-workspace__hero {
        padding: 20px;
        border-radius: 20px;
    }

    .ops-summary,
    .ops-summary--five {
        grid-template-columns: 1fr;
    }

    .ops-workspace .box-body,
    .ops-workspace .box-header {
        padding-left: 16px;
        padding-right: 16px;
    }
}