.batch-dashboard {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 24px;
    padding: 24px;
    margin-top: 24px;
    color: #f8fafc;
}

.batch-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1e293b;
}

.batch-cards-scroll-container {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 6px;
}

.batch-cards-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.batch-cards-scroll-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
}

.batch-cards-scroll-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.batch-cards-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ec4899;
}

.batch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .batch-cards-scroll-container {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    .batch-grid {
        grid-template-columns: 1fr;
    }
}

.batch-card {
    position: relative;
    background: #182131;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batch-card:hover {
    border-color: #475569;
}

.batch-card.active-card {
    border-color: #ec4899 !important;
    background: #201a2c;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.batch-card-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 35;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ef4444;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.batch-card-delete-btn:hover {
    background: #dc2626;
    transform: scale(1.12);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.7);
}

/* Multi-Split Card Previews */
.batch-card-preview {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    background: #0b0f19;
    display: grid;
    gap: 4px;
    padding: 4px;
}

.card-preview-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card-preview-close-btn:hover {
    background: #ec4899;
    border-color: #ec4899;
    color: #fff;
    transform: scale(1.1);
}

.remove-ratio-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    z-index: 15;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.remove-ratio-btn:hover {
    background: #ef4444;
    opacity: 1;
    transform: scale(1.15);
}

.batch-card-preview.split-1 {
    grid-template-columns: 1fr;
}

.batch-card-preview.split-2 {
    grid-template-columns: 1fr 1fr;
}

.batch-card-preview.split-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.batch-card-preview.split-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.preview-split-item {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111827;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.preview-split-item:hover {
    border-color: #ec4899;
    transform: scale(1.02);
}

.preview-split-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-split-tag {
    position: absolute;
    bottom: 3px;
    left: 3px;
    background: rgba(15, 23, 42, 0.85);
    color: #f1f5f9;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* Interactive Crop Overlay on Active Card */
.interactive-crop-viewport {
    position: relative;
    width: 100%;
    height: 180px;
    background: #0b0f19;
    border-radius: 12px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    border: 2px solid #ec4899;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.2);
}

.interactive-crop-viewport:active {
    cursor: grabbing;
}

.interactive-crop-img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    pointer-events: none;
}

.crop-overlay-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #ec4899;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
    pointer-events: auto;
    cursor: move;
    box-sizing: border-box;
    border-radius: 4px;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #ec4899;
    pointer-events: auto;
    border-radius: 2px;
}

.crop-handle.tl { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle.tr { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle.bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle.br { bottom: -6px; right: -6px; cursor: nwse-resize; }
.crop-handle.top { top: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; width: 24px; height: 6px; border-radius: 3px; }
.crop-handle.bottom { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; width: 24px; height: 6px; border-radius: 3px; }
.crop-handle.left { top: 50%; left: -6px; transform: translateY(-50%); cursor: ew-resize; width: 6px; height: 24px; border-radius: 3px; }
.crop-handle.right { top: 50%; right: -6px; transform: translateY(-50%); cursor: ew-resize; width: 6px; height: 24px; border-radius: 3px; }

.crop-grid-lines {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    pointer-events: none;
}

.crop-grid-line {
    border: 1px dashed rgba(255, 255, 255, 0.25);
}
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    white-space: nowrap;
}

.batch-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.batch-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-btn {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.batch-btn:hover {
    background: #334155;
    color: #fff;
    border-color: #475569;
}

.batch-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.batch-btn-primary:hover {
    background: #1d4ed8;
}

/* Ultra-slim compact styles for Batch Resizer Control Panel */
#batchResizerContainer .crop-component {
    padding: 10px;
}

#batchResizerContainer .crop-top-bar {
    margin-bottom: 6px;
    padding-bottom: 6px;
}

#batchResizerContainer .crop-info {
    font-size: 10px;
    padding: 2px 6px;
}

#batchResizerContainer .crop-icon-btn,
#batchResizerContainer .crop-apply-btn {
    width: 26px;
    height: 26px;
    font-size: 11px;
}

#batchResizerContainer .crop-tabs-header {
    margin-bottom: 6px;
    padding-bottom: 6px;
    gap: 4px;
}

#batchResizerContainer .crop-tab-btn {
    padding: 4px;
    font-size: 9px;
    border-radius: 6px;
    gap: 2px;
}

#batchResizerContainer .crop-tab-btn i {
    font-size: 13px;
}

#batchResizerContainer .manual-size-wrap {
    padding: 4px 8px;
    margin-bottom: 6px;
    gap: 6px;
    border-radius: 8px;
}

#batchResizerContainer .manual-input-group label {
    font-size: 8px;
    margin-bottom: 1px;
}

#batchResizerContainer .manual-input-group input {
    padding: 3px 6px;
    font-size: 11px;
    height: 26px;
    border-radius: 6px;
}

#batchResizerContainer .preset-search-wrap {
    margin-bottom: 6px;
}

#batchResizerContainer .preset-search-wrap input {
    padding: 4px 8px 4px 28px;
    font-size: 11px;
    height: 28px;
    border-radius: 8px;
}

#batchResizerContainer .preset-search-wrap i {
    font-size: 11px;
    left: 8px;
}

#batchResizerContainer .presets-scroll-section {
    min-height: 200px;
    max-height: 320px;
    overflow-y: auto !important;
}

#batchResizerContainer .ratio-item {
    padding: 8px 4px;
    min-height: 76px;
    gap: 3px;
    border-radius: 8px;
}

#batchResizerContainer .ratio-item .ratio-icon-wrap {
    width: 28px;
    height: 28px;
    font-size: 14px;
    margin-bottom: 0;
    border-radius: 6px;
}

#batchResizerContainer .ratio-item strong {
    font-size: 10px;
}

#batchResizerContainer .ratio-item small {
    font-size: 8px;
}
