.img-grid-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 16px;
            margin-top: 20px;
        }

        .img-card {
            background: var(--color-bg-elevated, #ffffff);
            border: 1.5px solid var(--color-border, #e2e8f0);
            border-radius: 10px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
            transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
            cursor: grab;
            user-select: none;
        }

        .img-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
            border-color: var(--color-primary, #137bec);
        }

        .img-card.dragging {
            opacity: 0.4;
            border: 2px dashed var(--color-primary, #137bec);
        }

        .img-card.is-drag-source {
            display: none !important;
        }

        .img-card-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(19, 123, 236, 0.9);
            color: #ffffff;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 12px;
            z-index: 3;
        }

        .img-stage {
            width: 100%;
            height: 190px;
            background: #eef2f6;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 10px;
            position: relative;
            overflow: hidden;
            padding: 6px;
            box-sizing: border-box;
        }

        .img-page-sheet {
            background: #ffffff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
            border: 1px solid #cbd5e1;
            border-radius: 3px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), height 0.28s cubic-bezier(0.4, 0, 0.2, 1), padding 0.2s ease, box-shadow 0.2s ease;
            box-sizing: border-box;
            overflow: hidden;
            position: relative;
        }

        /* Portrait paper: A4 ratio */
        .img-page-sheet.sheet-portrait {
            width: 120px;
            height: 170px;
        }

        /* Landscape paper: A4 ratio */
        .img-page-sheet.sheet-landscape {
            width: 170px;
            height: 120px;
        }

        /* Fit to image */
        .img-page-sheet.sheet-fit {
            max-width: 100%;
            max-height: 100%;
        }

        /* Margins */
        .img-page-sheet.margin-none {
            padding: 0px;
        }

        .img-page-sheet.margin-small {
            padding: 8px;
        }

        .img-page-sheet.margin-big {
            padding: 16px;
        }

        .img-page-sheet img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
            display: block;
            transition: transform 0.2s ease;
        }

        .img-thumb-wrap {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .img-card-info {
            width: 100%;
            margin-bottom: 8px;
            text-align: center;
        }

        .img-card-name {
            font-size: 12px;
            font-weight: 600;
            color: var(--color-text-main, #1e293b);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
        }

        .img-card-size {
            font-size: 11px;
            color: var(--color-text-muted, #64748b);
        }

        .img-card-actions {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            border-top: 1px solid var(--color-border, #f1f5f9);
            padding-top: 8px;
        }

        .btn-img-action {
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 5px 8px;
            font-size: 11px;
            font-weight: 600;
            color: #334155;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.15s ease;
        }

        .btn-img-action:hover {
            background: #e2e8f0;
            color: #0f172a;
        }

        .btn-img-action.btn-del:hover {
            background: #fee2e2;
            color: #dc2626;
            border-color: #fca5a5;
        }

        .img-options-bar {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 16px;
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 20px;
        }

        .img-option-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 6px;
        }

        .img-option-select {
            width: 100%;
            padding: 9px 12px;
            border: 1.5px solid #cbd5e1;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            color: #0f172a;
            background-color: #ffffff;
            outline: none;
            transition: border-color 0.15s;
        }

        .img-option-select:focus {
            border-color: #137bec;
        }

        .img-top-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .btn-add-more {
            background: #f0f7ff;
            color: #137bec;
            border: 1.5px dashed #137bec;
            border-radius: 8px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.15s ease;
        }

        .btn-add-more:hover {
            background: #e0effe;
        }

        .btn-clear-all {
            background: transparent;
            color: #dc2626;
            border: none;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 6px;
        }

        .btn-clear-all:hover {
            background: #fee2e2;
        }

        .img-grid-container .page-card-add-tile {
            min-height: 250px;
            background-color: #f8fafc;
            border: 2px dashed #cbd5e1;
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
            color: #64748b;
            padding: 16px;
            user-select: none;
        }

        .img-grid-container .page-card-add-tile:hover {
            border-color: var(--color-primary, #137bec);
            background-color: #eff6ff;
            color: var(--color-primary, #137bec);
            transform: translateY(-2px);
            box-shadow: 0 6px 14px rgba(19, 123, 236, 0.08);
        }

        .img-grid-container .page-card-add-tile.is-dragover {
            border-color: #137bec;
            background-color: #dbeafe;
            transform: scale(1.02);
            color: #1d4ed8;
        }
