/* ================================================================
   PRINT EDITOR STYLES
   Professional PDF/Image Editor for Print Products
   ================================================================ */

/* ---- Editor Overlay ---- */
.print-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1a1a2e;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.print-editor-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* ---- Editor Header ---- */
.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #16213e;
    border-bottom: 1px solid #2c3e6d;
    color: #e0e0e0;
    min-height: 48px;
    flex-shrink: 0;
}

.editor-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-header-left i {
    font-size: 20px;
    color: #5dade2;
}

.editor-header-left h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.editor-format-badge {
    background: #2c5aa0;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
}

.editor-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.editor-close-btn {
    background: none;
    border: 1px solid #444;
    color: #ccc;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.editor-close-btn:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

/* ---- File Info Bar ---- */
.file-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #bbb;
}

.file-info-row i {
    color: #e74c3c;
}

.file-info-name {
    font-weight: 500;
    color: #eee;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info-size,
.file-info-pages {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.file-change-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.file-change-btn:hover {
    background: #2c5aa0;
    border-color: #2c5aa0;
    color: #fff;
}

/* ---- Toolbar ---- */
.editor-toolbar {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    background: #1f2b47;
    border-bottom: 1px solid #2c3e6d;
    gap: 4px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    gap: 2px;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: #2c3e6d;
    margin: 0 8px;
}

.tool-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #b0b8c8;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tool-btn:hover {
    background: rgba(92, 173, 226, 0.15);
    border-color: rgba(92, 173, 226, 0.3);
    color: #5dade2;
}

.tool-btn.active {
    background: #2c5aa0;
    color: #fff;
    border-color: #2c5aa0;
}

.tool-btn.danger:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.tool-label {
    font-size: 11px;
    font-weight: 500;
}

/* ---- PDF Price Update Banner ---- */
.pdf-price-banner {
    display: none;
    background: linear-gradient(135deg, #1a3a5c, #1e4976);
    border-bottom: 2px solid #e8a838;
    padding: 10px 20px;
    flex-shrink: 0;
    z-index: 10;
}

.pdf-price-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
}

.pdf-price-banner-icon {
    font-size: 20px;
    color: #e8a838;
    flex-shrink: 0;
}

.pdf-price-banner-text {
    flex: 1;
    min-width: 0;
}

.pdf-price-banner-message {
    color: #dce6f0;
    font-size: 13px;
    line-height: 1.4;
}

.pdf-price-banner-message strong {
    color: #fff;
}

.pdf-price-banner-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pdf-price-original {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: line-through;
    opacity: 0.6;
}

.pdf-price-new {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pdf-price-label {
    font-size: 10px;
    color: #8fa8c8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pdf-price-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.pdf-price-new .pdf-price-value {
    color: #4ecb71;
    font-size: 18px;
}

.pdf-price-arrow {
    color: #e8a838;
    font-size: 14px;
}

.pdf-price-banner-close {
    background: none;
    border: none;
    color: #8fa8c8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.pdf-price-banner-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ---- Editor Body ---- */
.editor-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* ---- Drop Zone ---- */
.editor-drop-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 40px;
}

.editor-drop-zone.drag-active .drop-zone-content {
    border-color: #5dade2;
    background: rgba(93, 173, 226, 0.1);
    transform: scale(1.01);
}

.drop-zone-content {
    text-align: center;
    padding: 60px 40px;
    border: 3px dashed #2c3e6d;
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    transition: all 0.3s;
}

.drop-zone-content:hover {
    border-color: #5dade2;
    background: rgba(93, 173, 226, 0.05);
}

.drop-zone-icon {
    margin-bottom: 20px;
}

.drop-zone-icon i {
    font-size: 64px;
    color: #5dade2;
    opacity: 0.7;
}

.drop-zone-content h3 {
    color: #e0e0e0;
    font-size: 22px;
    margin: 0 0 8px;
    font-weight: 600;
}

.drop-zone-content p {
    color: #8899aa;
    margin: 0 0 20px;
    font-size: 14px;
}

.drop-zone-formats {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.format-tag {
    background: rgba(44, 90, 160, 0.3);
    color: #5dade2;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.drop-zone-hint {
    color: #667788 !important;
    font-size: 12px !important;
    margin: 0 !important;
}

/* ---- Editor Workspace ---- */
.editor-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* ---- Left Panel (Thumbnails) ---- */
.editor-panel-left {
    width: 120px;
    background: #16213e;
    border-right: 1px solid #2c3e6d;
    overflow-y: auto;
    padding: 12px 8px;
    flex-shrink: 0;
}

.editor-panel-left h4 {
    color: #8899aa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px 4px;
}

.page-thumbnails-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.thumb-wrapper {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumb-wrapper:hover {
    border-color: #5dade2;
}

.page-thumb {
    width: 100%;
    display: block;
    border-radius: 2px;
}

.page-thumb.active {
    /* handled by wrapper */
}

.thumb-wrapper:has(.page-thumb.active) {
    border-color: #2c5aa0;
}

.thumb-num {
    position: absolute;
    bottom: 2px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
}

/* ---- Center Panel ---- */
.editor-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    padding: 16px;
    background: #e8ecf0;
    min-width: 0;
}

.page-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.page-nav-btn {
    background: #ffffff;
    border: 1px solid #c0c8d4;
    color: #3a4a5c;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-nav-btn:hover:not(:disabled) {
    background: #2c5aa0;
    color: #fff;
}

.page-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    color: #3a4a5c;
    font-size: 13px;
}

/* ---- Placement Area ---- */
.placement-area {
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
}

.placement-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.placement-header i {
    color: #2c5aa0;
    font-size: 18px;
}

.placement-header h4 {
    color: #1a2744;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.placement-hint {
    font-size: 12px;
    color: #7a8a9c;
    margin-left: auto;
}

.placement-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

/* Individual placement slot */
.placement-slot {
    background: #ffffff;
    border: 2px dashed #c0c8d4;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.25s;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placement-slot.drag-over {
    border-color: #2c5aa0;
    background: rgba(44, 90, 160, 0.06);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.15);
}

.placement-slot.filled {
    border-style: solid;
    border-color: #2c5aa0;
    background: #fff;
    padding: 8px;
}

.placement-slot.active {
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.3);
}

.slot-label {
    font-size: 14px;
    font-weight: 600;
    color: #2c5aa0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.slot-empty-icon {
    font-size: 36px;
    color: #c0c8d4;
    margin-bottom: 8px;
}

.slot-empty-text {
    font-size: 12px;
    color: #8a9aac;
}

.slot-preview {
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.slot-preview:hover {
    transform: scale(1.02);
}

.slot-page-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
    padding: 4px 8px;
    background: #eef2f7;
    border-radius: 6px;
}

.slot-page-num {
    font-size: 13px;
    font-weight: 600;
    color: #2c5aa0;
}

.slot-remove-btn {
    background: none;
    border: none;
    color: #cc4444;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.slot-remove-btn:hover {
    background: rgba(204, 68, 68, 0.1);
}

/* Draggable thumbnail in left panel */
.thumb-wrapper {
    cursor: grab;
}

.thumb-wrapper:active {
    cursor: grabbing;
}

.thumb-wrapper.dragging {
    opacity: 0.4;
}

.thumb-wrapper.placed {
    opacity: 0.5;
    position: relative;
}

.thumb-wrapper.placed::after {
    content: '✓';
    position: absolute;
    top: 2px;
    left: 4px;
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.preview-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 200px;
}

.preview-container canvas {
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    border-radius: 2px;
}

/* ---- Brochure Placement Info ---- */
.placement-brochure-info {
    background: linear-gradient(135deg, #eef4fb, #e3edf8);
    border: 2px solid #b8d0e8;
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.brochure-info-icon {
    font-size: 28px;
    color: #2c5aa0;
    flex-shrink: 0;
}

.brochure-info-text {
    flex: 1;
    font-size: 15px;
    color: #1a2744;
    min-width: 180px;
}

.brochure-info-text strong {
    color: #2c5aa0;
}

.brochure-blank-info {
    color: #e67e22;
    font-weight: 500;
    margin-left: 6px;
    font-size: 13px;
}

.brochure-info-hint {
    font-size: 12px;
    color: #6a7a8c;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-basis: 100%;
    margin-top: 4px;
}

.brochure-info-hint i {
    color: #2c5aa0;
    animation: bounceDown 1.5s ease infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ---- Sheet Layout / Bogenaufteilung ---- */
.sheet-layout-section {
    width: 100%;
    max-width: 900px;
    margin-top: 24px;
    border-top: 2px solid #c8d0da;
    padding-top: 20px;
}

.sheet-layout-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.sheet-layout-header i {
    color: #2c5aa0;
    font-size: 18px;
}

.sheet-layout-header h4 {
    color: #1a2744;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.sheet-layout-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sheet-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.sheet-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #2c5aa0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.sheet-card-title i {
    font-size: 13px;
}

.sheet-sides {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #dce3ec;
}

.sheet-side-block {
    background: #fff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sheet-side-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sheet-side-canvas {
    border: 1px solid #dce3ec;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sheet-side-pages {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #556;
}

.sheet-side-pages .page-num {
    background: #eef2f7;
    color: #2c5aa0;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.sheet-side-pages .page-num.blank {
    background: #f5f5f5;
    color: #bbb;
    font-style: italic;
}

/* ============================================================
   INTERACTIVE SHEET PAGE SLOTS (Booklet drag & drop)
   ============================================================ */

.sheet-page-slots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: stretch;
    min-height: 120px;
}

.sheet-page-slots.spread {
    gap: 0;
}

.sheet-page-slot {
    position: relative;
    width: 110px;
    min-height: 140px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: default;
    overflow: hidden;
}

.sheet-page-slot.filled {
    background: #ffffff;
    border: 2px solid #2c5aa0;
    box-shadow: 0 1px 6px rgba(44, 90, 160, 0.15);
}

.sheet-page-slot.blank {
    background: #e9ecef;
    border: 2px dashed #c0c8d4;
}

.sheet-page-slot.drag-over {
    border-color: #28a745 !important;
    background: #e6f9ec !important;
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.3);
    transform: scale(1.04);
}

.sheet-slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 6px;
}

.sheet-slot-content.blank-content {
    opacity: 0.5;
}

.sheet-slot-thumb {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 3px;
}

.sheet-slot-thumb canvas {
    border-radius: 2px;
    max-width: 100%;
    max-height: 100%;
}

.sheet-slot-page-num {
    font-size: 11px;
    font-weight: 700;
    color: #2c5aa0;
    margin-top: 4px;
    background: #eef2f7;
    padding: 2px 10px;
    border-radius: 3px;
}

.sheet-slot-label {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.sheet-slot-fallback {
    font-size: 20px;
    font-weight: 700;
    color: #2c5aa0;
}

/* Remove button on filled slots */
.sheet-slot-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
    z-index: 5;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-page-slot:hover .sheet-slot-remove {
    opacity: 1;
}

.sheet-slot-remove:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.15);
}

/* Hover feedback on filled slots */
.sheet-page-slot.filled:hover {
    box-shadow: 0 2px 12px rgba(44, 90, 160, 0.25);
    transform: translateY(-1px);
}

/* ================================================================
   PAGE PREVIEW POPUP
   ================================================================ */

.page-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(4px);
}

.page-preview-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.page-preview-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pagePreviewSlideIn 0.3s ease;
}

@keyframes pagePreviewSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.page-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #2c5aa0;
    color: #fff;
}

.page-preview-title {
    font-size: 16px;
    font-weight: 600;
}

.page-preview-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.page-preview-close:hover {
    opacity: 1;
}

.page-preview-body {
    padding: 20px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(90vh - 60px);
    background: #f5f5f5;
}

.page-preview-body canvas {
    max-width: 100%;
    max-height: calc(85vh - 80px);
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Fold line between spreads */
.sheet-fold-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        #e74c3c 0px,
        #e74c3c 5px,
        transparent 5px,
        transparent 10px
    );
    position: relative;
}

.sheet-fold-line span {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #e74c3c;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================================
   CUT STACK GRID
   ============================================================ */

.cut-stack-grid {
    display: grid;
    gap: 2px;
    background: #dce3ec;
    border: 1px solid #c0c8d4;
    border-radius: 6px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.cut-stack-cell {
    background: #e8f4fd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    border: 1px solid #b8d4f0;
    position: relative;
}

.cut-stack-cell span {
    color: #2c5aa0;
    font-weight: 600;
    font-size: 13px;
}

.cut-stack-info {
    text-align: center;
    font-size: 12px;
    color: #556;
    margin-top: 10px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .sheet-sides {
        grid-template-columns: 1fr;
    }
    .sheet-page-slot {
        width: 90px;
        min-height: 110px;
    }
}

.preview-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    color: #3a4a5c;
    gap: 6px;
    color: #8899aa;
    font-size: 11px;
}

.legend-color {
    width: 16px;
    height: 3px;
    border-radius: 1px;
}

.legend-color.bleed {
    background: rgba(255, 200, 200, 0.8);
}

.legend-color.safe {
    background: rgba(0, 150, 255, 0.6);
    border: 1px dashed rgba(0, 150, 255, 0.6);
}

.legend-color.trim {
    background: #000;
}

/* ---- Right Panel ---- */
.editor-panel-right {
    width: 280px;
    background: #16213e;
    border-left: 1px solid #2c3e6d;
    overflow-y: auto;
    flex-shrink: 0;
}

.panel-section {
    border-bottom: 1px solid #2c3e6d;
    padding: 14px;
}

.panel-section h4 {
    color: #8899aa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-section h4 i {
    color: #5dade2;
}

/* Property Panel */
.property-empty {
    text-align: center;
    padding: 20px 10px;
    color: #556677;
}

.property-empty i {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.property-empty p {
    margin: 0;
    font-size: 12px;
}

.property-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prop-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prop-row label {
    color: #8899aa;
    font-size: 11px;
    min-width: 75px;
    flex-shrink: 0;
}

.prop-row input[type="number"],
.prop-row input[type="text"],
.prop-row select {
    flex: 1;
    background: #12192d;
    border: 1px solid #2c3e6d;
    color: #e0e0e0;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.prop-row input[type="color"] {
    width: 36px;
    height: 28px;
    border: 1px solid #2c3e6d;
    border-radius: 3px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}

.prop-row input[type="range"] {
    flex: 1;
    accent-color: #2c5aa0;
}

.style-buttons {
    display: flex;
    gap: 4px;
}

.style-buttons button {
    background: #12192d;
    border: 1px solid #2c3e6d;
    color: #b0b8c8;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.style-buttons button.active {
    background: #2c5aa0;
    border-color: #2c5aa0;
    color: #fff;
}

.style-buttons button:hover {
    border-color: #5dade2;
}

/* ---- Color Separation Panel ---- */
.sep-section {
    margin-bottom: 16px;
}

.sep-section h4 {
    color: #8899aa !important;
    font-size: 12px !important;
    margin: 0 0 10px !important;
}

.ink-coverage-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ink-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ink-bar label {
    color: #b0b8c8;
    font-weight: 700;
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: #12192d;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-fill.cyan { background: #00bcd4; }
.bar-fill.magenta { background: #e91e63; }
.bar-fill.yellow { background: #ffeb3b; }
.bar-fill.black { background: #424242; }
.bar-fill.total-ink { background: #4caf50; }
.bar-fill.total-ink.warning { background: #f44336; }

.ink-bar span {
    color: #8899aa;
    font-size: 11px;
    min-width: 35px;
    text-align: right;
}

.ink-bar.total {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #2c3e6d;
}

.ink-warning {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ef5350;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 8px;
}

.ink-warning i {
    margin-right: 4px;
}

/* Color Swatches */
.color-swatches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.color-swatch-item {
    display: flex;
    gap: 6px;
    align-items: center;
    background: rgba(255,255,255,0.03);
    padding: 4px 6px;
    border-radius: 4px;
}

.swatch-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.swatch-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.swatch-hex {
    color: #ddd;
    font-family: monospace;
    font-size: 10px;
}

.swatch-cmyk {
    color: #778;
    font-size: 9px;
}

.swatch-pantone {
    color: #5dade2;
    font-size: 9px;
    font-weight: 600;
}

.swatch-percent {
    color: #667;
    font-size: 9px;
}

/* Separation Buttons */
.separation-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.sep-btn {
    background: #12192d;
    border: 1px solid #2c3e6d;
    color: #b0b8c8;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.sep-btn:hover {
    border-color: #5dade2;
    color: #fff;
}

.sep-btn.active {
    background: #2c5aa0;
    border-color: #2c5aa0;
    color: #fff;
}

.sep-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.sep-dot.composite {
    background: linear-gradient(135deg, #00bcd4, #e91e63, #ffeb3b, #424242);
}

.sep-dot.cyan { background: #00bcd4; }
.sep-dot.magenta { background: #e91e63; }
.sep-dot.yellow { background: #ffeb3b; }
.sep-dot.black { background: #424242; }

/* ---- Imposition Panel ---- */
.imposition-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.imposition-header i {
    color: #5dade2;
}

.imposition-header h4 {
    color: #e0e0e0 !important;
    margin: 0 !important;
    font-size: 13px !important;
}

.imposition-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.imp-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.imp-row label {
    color: #8899aa;
    font-size: 12px;
}

.imp-row span {
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 500;
}

.imp-row.warning span {
    color: #f39c12;
}

.imposition-sheets h5 {
    color: #8899aa;
    font-size: 11px;
    text-transform: uppercase;
    margin: 10px 0 6px;
}

.sheet-diagram {
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 6px;
}

.sheet-label {
    color: #5dade2;
    font-size: 11px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.sheet-pages {
    display: flex;
    gap: 8px;
}

.sheet-side {
    flex: 1;
}

.side-label {
    color: #667;
    font-size: 10px;
    display: block;
    margin-bottom: 4px;
}

.page-slots {
    display: flex;
    gap: 4px;
}

.page-slot {
    flex: 1;
    background: #2c5aa0;
    color: #fff;
    text-align: center;
    padding: 6px 4px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.page-slot.blank {
    background: #2c3e6d;
    color: #556;
}

/* ---- Editor Footer ---- */
.editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #16213e;
    border-top: 1px solid #2c3e6d;
    flex-shrink: 0;
}

.editor-footer-left,
.editor-footer-right {
    display: flex;
    gap: 10px;
}

.btn-editor-secondary {
    background: transparent;
    border: 1px solid #2c3e6d;
    color: #b0b8c8;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-editor-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: #5dade2;
    color: #fff;
}

.btn-editor-primary {
    background: linear-gradient(135deg, #2c5aa0, #1e3d6f);
    border: none;
    color: #fff;
    padding: 10px 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-editor-primary:hover {
    background: linear-gradient(135deg, #3471c9, #2c5aa0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.4);
}

/* ---- Add to Cart button on modal ---- */
.btn-add-to-cart-direct {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-add-to-cart-direct:hover {
    background: #219a52;
}

/* ---- Loading Overlay ---- */
#printEditorLoadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.loading-spinner-large {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #5dade2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* ---- Notifications ---- */
.print-editor-notification {
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: opacity 0.3s;
    min-width: 280px;
}

.print-editor-notification.success {
    background: #1b5e20;
    color: #c8e6c9;
    border-left: 4px solid #4caf50;
}

.print-editor-notification.error {
    background: #b71c1c;
    color: #ffcdd2;
    border-left: 4px solid #f44336;
}

.print-editor-notification.info {
    background: #0d47a1;
    color: #bbdefb;
    border-left: 4px solid #2196f3;
}

.print-editor-notification.warning {
    background: #e65100;
    color: #ffe0b2;
    border-left: 4px solid #ff9800;
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
    .editor-panel-left {
        width: 80px;
    }
    
    .editor-panel-right {
        width: 220px;
    }
    
    .color-swatches {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .editor-workspace {
        flex-direction: column;
    }
    
    .editor-panel-left {
        width: 100%;
        height: 80px;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #2c3e6d;
    }
    
    .page-thumbnails-list {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .editor-panel-right {
        width: 100%;
        max-height: 250px;
        border-left: none;
        border-top: 1px solid #2c3e6d;
    }
    
    .editor-toolbar {
        padding: 4px 8px;
    }
    
    .tool-label {
        display: none;
    }
    
    .toolbar-divider {
        height: 20px;
        margin: 0 4px;
    }
    
    .editor-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-editor-primary,
    .btn-editor-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .preview-legend {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .drop-zone-content {
        padding: 30px 20px;
    }
    
    .drop-zone-icon i {
        font-size: 40px;
    }
    
    .drop-zone-content h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .editor-panel-left {
        display: none;
    }
    
    .editor-panel-right {
        max-height: 200px;
    }
    
    .editor-header-left h2 {
        display: none;
    }
    
    .separation-buttons {
        flex-direction: column;
    }
}

/* ================================================================
   CONFIG LOCKED OVERLAY (after file upload)
   ================================================================ */

.config-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.config-locked-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 30px 24px;
}

.config-locked-message i.fa-lock {
    font-size: 32px;
    color: #2c5aa0;
    opacity: 0.7;
}

.config-locked-message span {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    line-height: 1.4;
}

.config-unlock-btn {
    background: #2c5aa0;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.config-unlock-btn:hover {
    background: #1e4080;
    transform: translateY(-1px);
}

/* Disabled state for locked selectors */
#printConfigForm .print-select:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

#printConfigForm .quantity-input:disabled,
#printConfigForm .quantity-input[readonly] {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}
