.prorez-print-page {
    gap: 12px;
}

.prorez-print-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 40px;
}

.prorez-print-back {
    border: none;
    background: transparent;
    color: var(--prorez-brand-500);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.prorez-print-back:hover {
    color: var(--prorez-brand-600);
}

.prorez-print-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(320px, 480px);
    gap: 24px;
    align-items: start;
}

.prorez-print-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 480px;
}

.prorez-print-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.prorez-print-controls.is-locked {
    pointer-events: none;
    user-select: none;
}

.prorez-print-controls.is-locked::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: var(--prorez-radius-lg);
    background: rgba(255, 255, 255, 0.55);
    cursor: not-allowed;
}

.prorez-print-controls.is-locked > * {
    opacity: 0.72;
}

.prorez-print-label {
    display: block;
    font-size: 11px;
    line-height: 14px;
    color: var(--prorez-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.prorez-print-product-picker {
    border: 1px solid var(--prorez-border);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.product-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-picker__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-picker__label {
    font-size: 11px;
    line-height: 14px;
    color: var(--prorez-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-picker__field-wrap {
    position: relative;
}

.product-picker__trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid var(--prorez-border);
    border-radius: 8px;
    background: #fff;
    color: var(--prorez-text-primary);
    text-align: left;
    cursor: pointer;
}

.product-picker.is-open .product-picker__trigger {
    border-color: var(--prorez-brand-500);
    box-shadow: 0 0 0 1px var(--prorez-brand-500);
}

.product-picker__trigger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-picker__trigger-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.product-picker__trigger-title {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
}

.product-picker__trigger-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.3;
    color: var(--prorez-text-secondary);
}

.product-picker__trigger-body.is-placeholder .product-picker__trigger-title {
    font-weight: 400;
    color: var(--prorez-text-secondary);
}

.product-picker__chevron {
    flex-shrink: 0;
    margin-left: auto;
    color: var(--prorez-text-secondary);
    font-size: 18px !important;
}

.product-picker__backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
}

.product-picker__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 21;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--prorez-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 4px 0;
}

.product-picker__empty {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--prorez-text-secondary);
}

.product-picker-sep {
    display: flex;
    align-items: center;
    padding: 8px 12px 4px;
    pointer-events: none;
    user-select: none;
}

.product-picker-sep__text {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.product-picker-swatch {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.product-picker-swatch--lg {
    width: 32px;
    height: 32px;
}

.product-picker-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--prorez-text-primary);
}

.product-picker-item__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.product-picker-item:hover {
    background: #f8fafc;
}

.product-picker-item.is-selected {
    background: #eef2ff;
    color: var(--prorez-brand-600);
}

.product-picker-item.is-selected:hover {
    background: #e0e7ff;
}

.product-picker-item__title {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
}

.product-picker-item__meta {
    font-size: 12px;
    line-height: 1.3;
    color: var(--prorez-text-secondary);
}

.product-picker-item.is-selected .product-picker-item__meta {
    color: var(--prorez-brand-500);
}

.prorez-print-membrane,
.prorez-print-agent-card,
.prorez-print-settings {
    border: 1px solid var(--prorez-border);
    border-radius: 12px;
    box-shadow: none;
    padding: 4px;
}

.prorez-print-agent-card {
    border-radius: 8px;
}

.prorez-print-settings {
    border-radius: 8px;
}

.prorez-print-membrane ::deep .rz-card-body,
.prorez-print-agent-card ::deep .rz-card-body,
.prorez-print-settings ::deep .rz-card-body {
    padding: 20px;
}

.prorez-print-agent-card ::deep .rz-card-body {
    padding: 12px;
}

.prorez-print-settings ::deep .rz-card-body {
    padding: 14px;
}

.prorez-print-membrane-preview {
    width: 100%;
    height: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--prorez-border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.prorez-print-membrane-preview img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 12px;
}

.prorez-print-membrane-preview ::deep .rz-icon {
    color: var(--prorez-text-muted);
    font-size: 2.5rem;
}

.prorez-print-membrane-title {
    font-weight: 700 !important;
    color: var(--prorez-text-primary) !important;
    margin: 0 !important;
}

.prorez-print-badges {
    margin-top: 4px;
}

.prorez-print-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 15px;
}

.prorez-print-badge--primary {
    background: #eef2ff;
    color: var(--prorez-brand-500);
}

.prorez-print-badge--muted {
    background: #f1f5f9;
    color: var(--prorez-text-primary);
}

.prorez-print-agent-ready {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 15px;
}

.prorez-print-agent-ready.is-ready {
    color: #16a34a;
}

.prorez-print-agent-ready.is-warn {
    color: var(--prorez-text-secondary);
}

.prorez-print-agent-ready-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.prorez-print-agent-ready.is-ready .prorez-print-agent-ready-dot {
    background: #22c55e;
}

.prorez-print-agent-ready.is-warn .prorez-print-agent-ready-dot {
    background: #94a3b8;
}

.prorez-print-agent-option-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.prorez-print-agent-option-dot.is-online {
    background: #22c55e;
}

.prorez-print-agent-option-dot.is-offline {
    background: #94a3b8;
}

.prorez-print-start-btn ::deep .rz-button {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    background: var(--prorez-brand-500) !important;
    border: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}

.prorez-print-start-btn ::deep .rz-button:hover:not(:disabled) {
    background: var(--prorez-brand-600) !important;
}

.prorez-print-start-btn ::deep .rz-button:disabled {
    opacity: 0.55;
}

.prorez-print-selectbar ::deep .rz-button {
    text-transform: none;
    min-width: 48px;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 4px !important;
    border: 1px solid var(--prorez-border) !important;
    background: #fff !important;
    color: var(--prorez-text-primary) !important;
    box-shadow: none !important;
    font-size: 12px !important;
}

.prorez-print-selectbar ::deep .rz-button.rz-state-active {
    background: var(--prorez-brand-500) !important;
    border-color: var(--prorez-brand-500) !important;
    color: #fff !important;
}

.prorez-print-selectbar--rotation {
    max-width: 180px;
}

.prorez-print-selectbar--sizes ::deep {
    flex-wrap: wrap;
}

.prorez-print-checks ::deep .rz-chkbox-box {
    border-color: var(--prorez-border);
    width: 16px;
    height: 16px;
}

.prorez-print-job-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--prorez-border);
    border-radius: 8px;
    background: #fff;
}

.prorez-print-job-bar-label {
    font-size: 12px;
    color: var(--prorez-text-secondary);
}

.prorez-print-job-bar-status {
    font-size: 12px;
    text-align: right;
}

.prorez-print-job-bar-status.is-idle {
    color: var(--prorez-text-muted);
}

.prorez-print-job-bar-status.is-active {
    color: var(--prorez-brand-600);
}

.prorez-print-job-bar-status.is-success {
    color: #16a34a;
}

.prorez-print-job-bar-status.is-danger {
    color: #dc2626;
}

.prorez-print-empty {
    max-width: 560px;
}

.prorez-print-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--prorez-radius-lg);
    background: var(--prorez-brand-50, #eef2ff);
    color: var(--prorez-brand-600);
    flex-shrink: 0;
}

.prorez-print-empty-icon .rz-icon {
    font-size: 26px;
}

@media (max-width: 960px) {
    .prorez-print-grid {
        grid-template-columns: 1fr;
    }

    .prorez-print-sidebar {
        max-width: none;
    }
}
