:root {
    --wx-dashboard-gap: 12px;
}

.wx-dashboard-view {
   display: grid;
   grid-template-columns: repeat(12, 1fr);
   grid-auto-rows: 60px;
   gap: var(--wx-dashboard-gap);
   grid-auto-flow: dense; /* packs items into gaps instead of leaving them */
}

.wx-dashboard-bare {
   display: flex;
   flex-direction: column;
   overflow: auto;
}

.wx-dashboard-card {
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.wx-dashboard-card,
.wx-dashboard-bare {
   min-width: 0; /* allow shrinking below content's natural width */
}

.wx-dashboard-card .card-body {
    flex: 1;
    overflow: auto;
}

.wx-dashboard-edit .grid-stack-item-content {
    inset: 0 !important;
}

.wx-dashboard-preview-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    cursor: grab;
}

.wx-dashboard-preview-card:active {
    cursor: grabbing;
}

.wx-palette-item {
    cursor: default;
    border: 1px solid #e4e4e4;
}

.wx-palette-item-active {
    border-color: #47ad77;
    background: #f4fbf7;
}


.wx-mini-stat-row {
   display: flex;
   justify-content: space-around;
   align-items: center;
   height: 100%;
   text-align: center;
}

.wx-mini-stat {
   flex: 1;
}

.wx-mini-stat-value {
   font-size: 22px;
   font-weight: 700;
   line-height: 1;
}

.wx-mini-stat-label {
   font-size: 9px;
   text-transform: uppercase;
   letter-spacing: .03em;
   color: #888;
   margin-top: 4px;
}

.wx-stat-danger {
   color: #dc3545;
}
/* matches Overdue on the full dashboards */
.wx-stat-warning {
   color: #fd7e14;
}
/* matches Due within 30 days */
.wx-stat-success {
   color: #198754;
}
/* Won / positive figures */
.wx-stat-primary {
   color: #0d6efd;
}

.wx-stat-neutral {
   color: #212529;
}