.property-select {
    width: 100%;
}

.dashboard-v2 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.dashboard-v2-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
}

.dashboard-v2-row-cells {
    display: grid;
    min-width: 0;
    min-height: 80px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
    border-radius: 8px;
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

.dashboard-v2-cell-shell {
    position: relative;
    min-width: 0;
    grid-column: span var(--dashboard-cell-span, 12);
    border-radius: 8px;
    transition: box-shadow 120ms ease, opacity 120ms ease;
}

.dashboard-v2-cell-shell > .ant-card {
    width: 100%;
    min-width: 0;
}

.dashboard-v2-cell-content {
    min-width: 0;
    min-height: 160px;
    overflow: auto;
}

.dashboard-v2-drag-handle,
.dashboard-v2-resize-handle {
    position: absolute;
    z-index: 5;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgb(0 0 0 / 45%);
    opacity: .38;
    transition: opacity 120ms ease, background-color 120ms ease;
}

.dashboard-v2-cell-shell:hover > .dashboard-v2-drag-handle,
.dashboard-v2-cell-shell:hover > .dashboard-v2-resize-handle,
.dashboard-v2-cell-shell:focus-within > .dashboard-v2-drag-handle,
.dashboard-v2-cell-shell:focus-within > .dashboard-v2-resize-handle,
.dashboard-v2-drag-handle:focus-visible,
.dashboard-v2-resize-handle:focus-visible {
    opacity: 1;
}

.dashboard-v2-drag-handle:focus-visible,
.dashboard-v2-resize-handle:focus-visible {
    outline: 2px solid #69b1ff;
    outline-offset: 1px;
}

.dashboard-v2-drag-handle {
    top: -6px;
    left: 50%;
    width: 28px;
    height: 12px;
    transform: translateX(-50%);
    border-radius: 6px;
    cursor: grab;
    touch-action: none;
}

.dashboard-v2-drag-handle:hover {
    background-color: rgb(0 0 0 / 4%);
}

.dashboard-v2-drag-handle:active {
    cursor: grabbing;
}

.dashboard-v2-drag-handle span {
    position: absolute;
    top: 4px;
    left: 9px;
    width: 10px;
    height: 1px;
    border-radius: 1px;
    background: currentColor;
    box-shadow: 0 3px currentColor;
}

.dashboard-v2-resize-handle {
    right: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    touch-action: none;
}

.dashboard-v2-resize-handle::before,
.dashboard-v2-resize-handle::after {
    position: absolute;
    right: 3px;
    bottom: 6px;
    width: 8px;
    height: 1px;
    border-radius: 1px;
    background: currentColor;
    content: "";
    transform: rotate(-45deg);
    transform-origin: right center;
}

.dashboard-v2-resize-handle::after {
    bottom: 3px;
    width: 4px;
}

.dashboard-v2-dragging {
    opacity: .35;
}

.dashboard-v2-drag-ghost {
    position: fixed;
    z-index: 10000;
    max-width: 280px;
    padding: 6px 10px;
    overflow: hidden;
    border: 1px solid #69b1ff;
    border-radius: 6px;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
    color: rgb(0 0 0 / 88%);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    pointer-events: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-resizing {
    z-index: 6;
    box-shadow: 0 0 0 2px #1677ff, 0 8px 24px rgb(0 0 0 / 16%);
}

.dashboard-v2-drop-row {
    background: #e6f4ff;
    box-shadow: inset 0 0 0 2px #69b1ff;
}

.dashboard-v2-drop-before::before,
.dashboard-v2-drop-after::after {
    position: absolute;
    z-index: 8;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 2px;
    background: #1677ff;
    content: "";
}

.dashboard-v2-drop-before::before {
    left: -6px;
}

.dashboard-v2-drop-after::after {
    right: -6px;
}

body.dashboard-v2-resize-active {
    cursor: nwse-resize;
    user-select: none;
}

body.dashboard-v2-drag-active {
    cursor: grabbing;
    user-select: none;
}

@media (max-width: 768px) {
    .dashboard-v2-cell-shell {
        grid-column: 1 / -1;
    }
}
