/* =========================================================
   BASIS-TOKENS – an globale index.css-Tokens angekoppelt
   ========================================================= */
:root {
    --ws-bg: var(--primary-bg-color);
    --ws-surface: var(--secondary-bg-color);
    --ws-surface-2: color-mix(in srgb, var(--secondary-bg-color) 85%, #000 15%);
    --ws-border: rgba(255, 255, 255, 0.16);
    --ws-text: var(--text-color);
    --ws-text-muted: var(--text-muted-color);
    --ws-accent: var(--accent-color);
    --ws-selected-bg: color-mix(in oklab, var(--ws-accent) 8%, var(--ws-surface-2));
    --ws-selected-border: color-mix(in oklab, var(--ws-accent) 45%, var(--ws-border));
}

body.light-mode {
    --ws-border: rgba(0, 0, 0, 0.18);
}

/* html/body bleiben im globalen Look */
html,
body {
    background: var(--primary-bg-color);
    color: var(--text-color);
}

.muted {
    color: var(--ws-text-muted);
}

/* =========================================================
   GENERISCHE PANELS & BUTTONS
   ========================================================= */

.panel {
    border: 1px solid var(--ws-border);
    border-radius: 14px;
    background: var(--ws-surface);
    margin: 12px 0;
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--ws-surface-2);
    border-bottom: 1px solid var(--ws-border);
}

.panel-body {
    padding: 10px 12px;
}

.btn {
    background: var(--accent-color);
    color: #111;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: .55rem .85rem;
    cursor: pointer;
}

.btn.secondary {
    background: transparent;
    color: var(--ws-text);
    border: 1px solid var(--ws-border);
}

.btn.danger {
    background: #ff6262;
    color: #111;
}

.btn.small {
    padding: .4rem .6rem;
    border-radius: 10px;
}

/* =========================================================
   GENERISCHE KACHELN (Produkte / Filamente / Nozzles)
   ========================================================= */

.pm-grid {
    --card-min: 150px;
    --card-max: 1fr;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min), var(--card-max)));
    gap: 10px;
}

.fa-card,
.pm-card,
.sp-card {
    position: relative;
    display: block;
    background: var(--ws-surface-2);
    border: 1px solid var(--ws-border);
    border-radius: 12px;
    padding: 8px;
    text-align: left;
    cursor: pointer;
    transition:
        transform .12s ease,
        border-color .12s ease,
        box-shadow .12s ease,
        background-color .12s ease;
}

.fa-card:hover,
.pm-card:hover,
.sp-card:hover {
    transform: translateY(-1px);
}

.fa-card .pic,
.pm-card .pm-pic,
.fa-card picture,
.pm-card picture {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    display: block;
}

.fa-card img,
.pm-card img,
.fa-card picture>img,
.pm-card picture>img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
}

.fa-card .title,
.pm-card .pm-title {
    font-weight: 700;
    line-height: 1.2;
    margin-top: 4px;
}

.fa-card .meta,
.pm-card .pm-meta {
    color: var(--ws-text-muted);
    font-size: .85rem;
}

.fa-card .price,
.pm-card .pm-price {
    font-weight: 800;
    margin-top: 2px;
}

.fa-card.selected,
.pm-card.is-selected {
    background: var(--ws-selected-bg);
    border-color: var(--ws-selected-border);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
}

.sp-card:focus-visible,
.fa-card:focus-visible,
.pm-card:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--ws-accent) 55%, #000);
    outline-offset: 2px;
}

/* =========================================================
   MINI-PREVIEW-KARTEN (Auswahl-Chips)
   ========================================================= */

.pr-selection-slot {
    margin: 8px 12px;
}

.pr-selection-card {
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--ws-selected-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--ws-selected-border, var(--ws-border));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    font-size: .85rem;
    text-align: left;
}

.pr-selection-card-image {
    flex: 0 0 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
}

.pr-selection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pr-selection-card-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pr-selection-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pr-selection-meta {
    font-size: 0.8rem;
    color: var(--ws-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* roter Entfernen-Button */
.pr-selection-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: #ff4d4d;
    color: #111;
    font-size: .85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pr-selection-remove:hover {
    background: #ff6b6b;
}

/* Filamente immer untereinander */
.pr-selection-multi {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.pr-selection-multi--filament {
    grid-template-columns: 1fr;
}

/* =========================================================
   PRINT-REQUEST: SEITEN-LOOK
   ========================================================= */

.page--print-request {
    --pr-surface: var(--ws-surface);
    --pr-border: var(--ws-border);
    --pr-hover: rgba(255, 255, 255, .04);
    --pr-selected: rgba(255, 255, 255, .07);
}

/* Karten & Panels */
.page--print-request .sp-card,
.page--print-request .fa-card,
.page--print-request .pm-card,
.page--print-request .pr-selection-card,
.page--print-request .pr-source-card {
    background: var(--ws-surface) !important;
    border: 1px solid var(--ws-border) !important;
}

.page--print-request .sp-card:hover,
.page--print-request .fa-card:hover,
.page--print-request .pm-card:hover,
.page--print-request .pr-source-card:hover {
    background: color-mix(in oklab, var(--ws-surface) 92%, #ffffff 8%);
    box-shadow: 0 0 0 9999px var(--pr-hover) inset;
    transform: translateY(-1px);
}

.page--print-request .sp-card.is-active,
.page--print-request .fa-card.selected,
.page--print-request .pm-card.is-selected,
.page--print-request .pr-source-card.is-active {
    background: color-mix(in oklab, var(--ws-surface) 88%, #ffffff 12%);
    box-shadow:
        0 0 0 9999px var(--pr-selected) inset,
        0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
    border-color: var(--ws-accent) !important;
}

/* Step-/Panel-Flächen und Summary an Secondary-BG koppeln */
.page--print-request .pr-step,
.page--print-request .pr-panel,
.page--print-request .pr-summary,
.page--print-request .pr-product-card,
.page--print-request .pr-selection-card,
.page--print-request .pr-source-card {
    background: var(--secondary-bg-color) !important;
    border-color: var(--ws-border) !important;
}

/* Light-Mode: helle Karten */
body.light-mode .page--print-request .pr-step,
body.light-mode .page--print-request .pr-panel,
body.light-mode .page--print-request .pr-summary,
body.light-mode .page--print-request .pr-product-card,
body.light-mode .page--print-request .pr-selection-card,
body.light-mode .page--print-request .pr-source-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
}

/* Inputs/Search */
input[type="search"] {
    background: #2c2f33;
    color: var(--ws-text);
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 15px;
    height: 38px;
    width: 100%;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

input[type="search"]::placeholder {
    color: var(--ws-text-muted);
}

input[type="search"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent-color) 30%, transparent);
    outline: none;
}

/* =========================================================
   WIZARD-GRUNDLAYOUT (.pr-*)
   ========================================================= */

.pr-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pr-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.pr-wizard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Step-Zeitstrahl mittig */
.pr-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0 auto;
    list-style: none;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    justify-content: center;
}

.pr-step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    opacity: 0.5;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
}

.pr-step-indicator.is-active {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.pr-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
}

.pr-step-label {
    font-weight: 500;
}

.pr-wizard-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pr-step {
    display: none;
    flex-direction: column;
    padding: 1rem;
    border-radius: 1rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
}

.pr-step.is-active,
.pr-step.active {
    display: flex;
}

.pr-step-header {
    margin-bottom: 0.75rem;
}

.pr-step-header h2 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
    text-align: center;
}

.pr-step-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    text-align: center;
}

.pr-step-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.pr-step-footer {
    flex: 0 0 auto;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Step 1: nur Weiter → rechts */
.pr-step[data-step="1"] .pr-step-footer {
    justify-content: flex-end;
}

/* Buttons */
.pr-btn {
    border-radius: 999px;
    padding: 0.55rem 1.3rem;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    z-index: 1;
}

/* Primary ohne Verlauf, schwarze Schrift */
.pr-btn.primary {
    background: var(--accent-color);
    color: #111;
}

.pr-btn.primary:hover {
    filter: brightness(1.05);
}

.pr-btn.ghost {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pr-btn.is-disabled,
.pr-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Felder */
.pr-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.pr-field-wide {
    margin-top: 0.5rem;
}

.pr-label {
    font-weight: 500;
    font-size: 0.85rem;
}

.pr-field input,
.pr-field select,
.pr-field textarea {
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.45rem 0.65rem;
    color: inherit;
    font: inherit;
}

.pr-field textarea {
    resize: vertical;
}

.pr-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .pr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Footer-Layout nicht sticky */
body.print_request-page .pr-step-footer,
#print-request-root .pr-step-footer {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;

    width: 100%;
    display: flex;
    align-items: center;

    margin-top: 24px;
    padding-top: 8px;
}

/* =========================================================
   STEP 1 – QUELLE
   ========================================================= */

.pr-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pr-source-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 0.9rem;
    background: var(--ws-surface-2);
    border: 1px solid var(--ws-border);
    cursor: pointer;
    transition:
        transform .12s ease,
        border-color .12s ease,
        box-shadow .12s ease,
        background-color .12s ease;
}

.pr-source-card input[type="radio"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.pr-source-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
}

.pr-source-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.pr-source-text {
    flex: 1 1 auto;
    min-width: 0;
}

.pr-source-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.pr-source-subtitle {
    font-size: 0.8rem;
    color: var(--ws-text-muted);
}

.pr-source-card:hover {
    transform: translateY(-1px);
}

.pr-source-card.is-active {
    background: var(--ws-selected-bg);
    border-color: var(--ws-selected-border);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
}

.pr-source-card input[type="radio"]:checked+.pr-source-card-inner {
    background: var(--ws-selected-bg);
    border-radius: 0.9rem;
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
}

.pr-source-panel {
    margin-top: 1rem;
}

.pr-source-panel[hidden] {
    display: none;
}

/* Produkt-Select */
#pr-product {
    width: 100%;
    height: 38px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #40444b;
    color: var(--ws-text);
    padding: 6px 32px 6px 10px;
    font-size: 0.95rem;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='%23e9a624' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

#pr-product:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

#pr-product option {
    background: #1b1e24;
    color: var(--ws-text);
}

/* Produkt-Preview */
#pr-product-preview {
    margin-top: 0.75rem;
}

.pr-product-card {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
}

.pr-product-image {
    width: 100%;
    max-height: 220px;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
}

.pr-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.pr-product-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.pr-product-meta {
    font-size: 0.85rem;
    color: var(--ws-text-muted);
}

@media (max-width: 640px) {
    .pr-product-card {
        grid-template-columns: 1fr;
    }

    .pr-product-image {
        max-height: 200px;
        aspect-ratio: 3 / 2;
    }
}

/* =========================================================
   STEP 2 – FILAMENTE
   ========================================================= */

.pr-panel {
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
    display: flex;
    flex-direction: column;
}

/* Panel-Header jetzt vertikal & mittig */
.pr-panel-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.pr-panel-title {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Filament-Button unter der Auswahl mittig */
.pr-panel--filament .pr-filament-button {
    align-self: center;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Hinweis unter der Filament-Auswahl */
#pr-filament-hint {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
}

#pr-filament-hint.pr-hint--muted {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ws-text-muted);
    font-weight: 400;
}

#pr-filament-hint.pr-hint--warning {
    background: rgba(246, 177, 0, 0.08);
    border: 1px solid var(--accent-color);
    color: #ffd27f;
    font-weight: 600;
}

/* =========================================================
   STEP 3 – DRUCK-EINSTELLUNGEN
   ========================================================= */

#print-request-root #pr-quality,
#print-request-root #pr-layer-height {
    background-color: #40444b;
    border: 1px solid #555;
    color: var(--text-color);
    border-radius: 6px;
    height: 38px;
    padding: 6px 32px 6px 10px;
    font-size: var(--input-font-size, 16px);

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg fill='%23e9a624' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

#print-request-root #pr-infill {
    background-color: #40444b;
    border: 1px solid #555;
    color: var(--text-color);
    border-radius: 6px;
    height: 38px;
    padding: 6px 10px;
    font-size: var(--input-font-size, 16px);
    text-align: left;
    background-image: none;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

#print-request-root #pr-infill::-webkit-outer-spin-button,
#print-request-root #pr-infill::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#print-request-root #pr-quality:focus,
#print-request-root #pr-layer-height:focus,
#print-request-root #pr-infill:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(233, 166, 36, .25);
    outline: none;
}

/* „Optionale Einstellungen“-Button zentrieren */
.pr-advanced {
    margin-top: 1rem;
    text-align: center;
}

#pr-advanced-toggle {
    display: block;
    margin: 0 auto;
}

/* =========================================================
   OVERLAY-PANELS (Filament / Plate / Nozzle)
   ========================================================= */

.pr-panel-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    /* liegt sicher über allen Buttons/Wizard-Elementen */
}

.pr-panel-overlay.is-open {
    display: flex;
}

.pr-panel-dialog {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    min-height: 90vh;
    border-radius: 1rem 1rem 0 0;
    background: rgba(18, 18, 18, 0.98);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 720px) {
    .pr-panel-overlay {
        align-items: center;
    }

    .pr-panel-dialog {
        border-radius: 1rem;
    }
}

.pr-panel-dialog-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pr-panel-dialog-body {
    flex: 1 1 auto;
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    z-index: 420666;
}

.pr-panel-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.pr-panel-toolbar input[type="search"] {
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    font: inherit;
    color: inherit;
}

.pr-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
}

/* Chips im Filterbereich (Material: PLA, PETG, ...) */
.pr-chip-row button,
.pr-chip-row .pr-chip {
    border-radius: 999px;
    border: 1px solid var(--ws-border);
    padding: 0.25rem 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    color: inherit;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease;
}

.pr-chip-row button:hover,
.pr-chip-row .pr-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.pr-chip-row button.is-active,
.pr-chip-row .pr-chip.is-active {
    background: var(--ws-accent);
    color: #111;
    border-color: var(--ws-accent);
}

/* Light-Mode-Anpassung für Chips */
body.light-mode .pr-chip-row button,
body.light-mode .pr-chip-row .pr-chip {
    background: #ffffff;
    border-color: #dfe3ea;
    color: #1c2433;
}

body.light-mode .pr-chip-row button.is-active,
body.light-mode .pr-chip-row .pr-chip.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #111;
}

.pr-card-grid,
#pr-fil-grid,
#pr-plate-grid,
#pr-nozzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
    z-index: 420666;
}

.pr-icon-button {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
}

#pr-fil-grid .pr-card,
#pr-plate-grid .pr-card,
#pr-nozzle-grid .pr-card {
    position: relative;
    display: block;
    background: var(--ws-surface-2);
    border: 1px solid var(--ws-border);
    border-radius: 12px;
    padding: 8px;
    text-align: left;
    cursor: pointer;
    transition:
        transform .12s ease,
        border-color .12s ease,
        box-shadow .12s ease,
        background-color .12s ease;
}

#pr-fil-grid .pr-card:hover,
#pr-plate-grid .pr-card:hover,
#pr-nozzle-grid .pr-card:hover {
    transform: translateY(-1px);
}

#pr-fil-grid .pr-card-image,
#pr-plate-grid .pr-card-image,
#pr-nozzle-grid .pr-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    margin-bottom: 6px;
}

#pr-fil-grid .pr-card-image img,
#pr-plate-grid .pr-card-image img,
#pr-nozzle-grid .pr-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

#pr-fil-grid .pr-card-title,
#pr-plate-grid .pr-card-title,
#pr-nozzle-grid .pr-card-title {
    font-weight: 700;
    line-height: 1.2;
    font-size: .9rem;
}

#pr-fil-grid .pr-card-meta,
#pr-plate-grid .pr-card-meta,
#pr-nozzle-grid .pr-card-meta {
    color: var(--ws-text-muted);
    font-size: .8rem;
    margin-top: 2px;
}

#pr-fil-grid .pr-card.is-selected,
#pr-plate-grid .pr-card.is-selected,
#pr-nozzle-grid .pr-card.is-selected {
    background: color-mix(in oklab, var(--ws-accent) 10%, var(--ws-surface-2));
    border-color: color-mix(in oklab, var(--ws-accent) 50%, var(--ws-border));
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 45%, transparent);
}

#pr-fil-grid .pr-card.is-selected::after,
#pr-plate-grid .pr-card.is-selected::after,
#pr-nozzle-grid .pr-card.is-selected::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--ws-accent);
    color: #111;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   SUMMARY & ERRORS
   ========================================================= */

.pr-summary {
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
    font-size: 0.9rem;
}

.pr-summary-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.pr-step-error {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #ff7676;
    min-height: 1em;
}

/* =========================================================
   LIGHT-MODE VERFEINERUNG
   ========================================================= */

body.light-mode .page--print-request h1,
body.light-mode .page--print-request h2,
body.light-mode .page--print-request h3,
body.light-mode .page--print-request label,
body.light-mode .page--print-request .fa-card .title,
body.light-mode .page--print-request .pm-card .pm-title,
body.light-mode .page--print-request .pr-selection-title,
body.light-mode .page--print-request .pr-source-title {
    color: #1c2433 !important;
}

body.light-mode .page--print-request .muted,
body.light-mode .page--print-request .fa-card .meta,
body.light-mode .page--print-request .pm-card .pm-meta,
body.light-mode .page--print-request .pr-selection-meta,
body.light-mode .page--print-request small.muted,
body.light-mode .page--print-request .pr-source-subtitle {
    color: #5a6475 !important;
}

body.light-mode .page--print-request input[type="search"],
body.light-mode .page--print-request input[type="text"],
body.light-mode .page--print-request input[type="number"],
body.light-mode .page--print-request textarea,
body.light-mode .page--print-request input[type="url"] {
    background: #ffffff !important;
    color: #1c2433 !important;
    border: 1px solid #dfe3ea !important;
}

body.light-mode .page--print-request #pr-layer-height,
body.light-mode .page--print-request #pr-quality,
body.light-mode #pr-product {
    background: #ffffff url("data:image/svg+xml,%3Csvg fill='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E") no-repeat right 10px center / 14px 14px !important;
    color: #1c2433 !important;
    border: 1px solid #dfe3ea !important;
}

body.light-mode #pr-product option {
    background: #ffffff;
    color: #1c2433;
}

body.light-mode #pr-filament-hint.pr-hint--warning {
    background: rgba(246, 177, 0, 0.1);
    border-color: rgba(246, 177, 0, 0.9);
    color: #1c2433;
}

/* =========================================================
   HARD LIGHT-MODE OVERRIDES NUR FÜR PRINT-REQUEST
   ========================================================= */

/* Light-Mode: Root-Container nur als Wrapper, kein eigener Kasten */
body.light-mode #print-request-root {
    background: transparent !important;
    /* kein zweiter Kasten */
    color: #111827 !important;
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 1.5rem 1rem 3rem !important;
    box-shadow: none !important;
    border: none !important;
}

/* Überschrift */
body.light-mode #print-request-root .pr-title {
    color: #111827 !important;
}

/* Wizard-Karten / Panels */
body.light-mode #print-request-root .pr-step,
body.light-mode #print-request-root .pr-panel,
body.light-mode #print-request-root .pr-summary,
body.light-mode #print-request-root .pr-product-card,
body.light-mode #print-request-root .pr-selection-card,
body.light-mode #print-request-root .pr-source-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08) !important;
}

/* Step-Leiste */
body.light-mode #print-request-root .pr-steps {
    background: #ffffff !important;
    border-radius: 0.75rem !important;
    border: 1px solid #dfe3ea !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

body.light-mode #print-request-root .pr-step-indicator {
    opacity: 0.65 !important;
    border-color: transparent !important;
    background: transparent !important;
    color: #111827 !important;
}

body.light-mode #print-request-root .pr-step-indicator.is-active {
    opacity: 1 !important;
    border-color: rgba(233, 166, 36, 0.7) !important;
    background: rgba(233, 166, 36, 0.12) !important;
}

body.light-mode #print-request-root .pr-step-number {
    background: rgba(233, 166, 36, 0.18) !important;
    color: #111827 !important;
}

/* Karten (Produkt/Filament/Quelle) */
body.light-mode #print-request-root .sp-card,
body.light-mode #print-request-root .fa-card,
body.light-mode #print-request-root .pm-card,
body.light-mode #print-request-root .pr-source-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05) !important;
}

body.light-mode #print-request-root .sp-card:hover,
body.light-mode #print-request-root .fa-card:hover,
body.light-mode #print-request-root .pm-card:hover,
body.light-mode #print-request-root .pr-source-card:hover {
    background: #f8fafc !important;
    transform: translateY(-1px);
}

body.light-mode #print-request-root .sp-card.is-active,
body.light-mode #print-request-root .fa-card.selected,
body.light-mode #print-request-root .pm-card.is-selected,
body.light-mode #print-request-root .pr-source-card.is-active {
    background: #fff9eb !important;
    border-color: var(--accent-color) !important;
    box-shadow:
        0 0 0 2px rgba(233, 166, 36, 0.7),
        0 10px 30px rgba(15, 23, 42, 0.12) !important;
}

/* Texte */
body.light-mode #print-request-root h1,
body.light-mode #print-request-root h2,
body.light-mode #print-request-root h3,
body.light-mode #print-request-root label,
body.light-mode #print-request-root .pr-selection-title,
body.light-mode #print-request-root .pr-source-title {
    color: #111827 !important;
}

body.light-mode #print-request-root .muted,
body.light-mode #print-request-root .pr-selection-meta,
body.light-mode #print-request-root .pr-source-subtitle,
body.light-mode #print-request-root small.muted {
    color: #6b7280 !important;
}

/* Form-Felder (Anzahl, URL, Notes, etc.) */
body.light-mode #print-request-root .pr-field input,
body.light-mode #print-request-root .pr-field select,
body.light-mode #print-request-root .pr-field textarea,
body.light-mode #print-request-root input[type="number"],
body.light-mode #print-request-root input[type="url"],
body.light-mode #print-request-root input[type="text"] {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #dfe3ea !important;
}

/* Anzahl speziell, falls global überschrieben wird */
body.light-mode #print-request-root #pr-qty {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    color: #111827 !important;
}

/* Selects (Quality, Layer, Produkt) mit dunklem Pfeil */
body.light-mode #print-request-root #pr-quality,
body.light-mode #print-request-root #pr-layer-height,
body.light-mode #print-request-root #pr-product {
    background: #ffffff url("data:image/svg+xml,%3Csvg fill='%23111827' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E") no-repeat right 10px center / 14px 14px !important;
    color: #111827 !important;
    border: 1px solid #dfe3ea !important;
}

body.light-mode #print-request-root #pr-product option,
body.light-mode #print-request-root #pr-quality option,
body.light-mode #print-request-root #pr-layer-height option {
    background: #ffffff !important;
    color: #111827 !important;
}

/* Infill */
body.light-mode #print-request-root #pr-infill {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    color: #111827 !important;
}

/* Warn-Hinweis bei Filament */
body.light-mode #print-request-root #pr-filament-hint.pr-hint--warning {
    background: rgba(246, 177, 0, 0.1) !important;
    border-color: rgba(246, 177, 0, 0.9) !important;
    color: #1f2937 !important;
}

/* Fehlermeldungen */
body.light-mode #print-request-root .pr-step-error {
    color: #b91c1c !important;
}

/* =========================================================
   LIGHT-MODE: UPLOAD-BEREICH / DROPZONE
   ========================================================= */

body.light-mode #print-request-root .pr-upload-wrapper {
    color: #111827 !important;
}

body.light-mode #print-request-root .pr-dropzone {
    position: relative;
    border-radius: 0.75rem !important;
    border: 2px dashed #cbd5e1 !important;
    background: #f9fafb !important;
    padding: 0.9rem 1rem !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body.light-mode #print-request-root .pr-dropzone:hover {
    background: #eef2ff !important;
    border-color: #a5b4fc !important;
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35) inset !important;
}

body.light-mode #print-request-root .pr-drop-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.light-mode #print-request-root .pr-drop-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-mode #print-request-root .pr-drop-text span {
    display: block;
}

body.light-mode #print-request-root .pr-drop-text [data-translate="pr_drop_title"] {
    font-weight: 600;
    color: #111827;
}

body.light-mode #print-request-root .pr-drop-sub {
    font-size: 0.85rem;
    color: #6b7280;
}

/* natives file-Input unsichtbar, aber klickbar über der Dropzone */
body.light-mode #print-request-root .pr-file-input,
#print-request-root .pr-file-input {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

/* Infozeile "Ausgewählte Datei: ..." */
body.light-mode #print-request-root .pr-file-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
}

body.light-mode #print-request-root .pr-file-name {
    font-weight: 500;
    color: #111827;
}

/* =========================================================
   LIGHT-MODE: PANEL-DIALOGE (Filament / Plate / Nozzle)
   ========================================================= */

body.light-mode #print-request-root .pr-panel-dialog {
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25) !important;
}

body.light-mode #print-request-root .pr-panel-dialog-header {
    border-bottom: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}

body.light-mode #print-request-root .pr-panel-dialog-body {
    background: #ffffff !important;
}

body.light-mode #print-request-root .pr-panel-dialog-body input[type="search"] {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    color: #111827 !important;
}

/* =========================================================
   DARK-MODE / DEFAULT: PRINT-REQUEST-FLÄCHEN
   ========================================================= */

/* nur wenn KEIN light-mode aktiv ist */
body:not(.light-mode) #print-request-root .pr-step,
body:not(.light-mode) #print-request-root .pr-panel,
body:not(.light-mode) #print-request-root .pr-summary,
body:not(.light-mode) #print-request-root .pr-product-card,
body:not(.light-mode) #print-request-root .pr-selection-card,
body:not(.light-mode) #print-request-root .pr-source-card {
    background: var(--secondary-bg-color) !important;
    border-color: var(--ws-border) !important;
}

/* Karten im Darkmode */
body:not(.light-mode) #print-request-root .sp-card,
body:not(.light-mode) #print-request-root .fa-card,
body:not(.light-mode) #print-request-root .pm-card,
body:not(.light-mode) #print-request-root .pr-source-card {
    background: var(--ws-surface-2) !important;
    border-color: var(--ws-border) !important;
}

body:not(.light-mode) #print-request-root .sp-card.is-active,
body:not(.light-mode) #print-request-root .fa-card.selected,
body:not(.light-mode) #print-request-root .pm-card.is-selected,
body:not(.light-mode) #print-request-root .pr-source-card.is-active {
    background: var(--ws-selected-bg) !important;
    border-color: var(--ws-selected-border) !important;
}

/* Wizard-Step-Leiste im Darkmode */
body:not(.light-mode) #print-request-root .pr-steps {
    background: rgba(255, 255, 255, 0.02) !important;
}

body:not(.light-mode) #print-request-root .pr-step-indicator.is-active {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

/* =========================================================
   DARK-MODE: FELDER / SELECTS / TEXTAREAS
   ========================================================= */

/* generische Inputs im Wizard */
body:not(.light-mode) #print-request-root .pr-field input,
body:not(.light-mode) #print-request-root .pr-field select,
body:not(.light-mode) #print-request-root .pr-field textarea {
    background: color-mix(in srgb, var(--ws-surface) 80%, #000 20%) !important;
    border: 1px solid var(--ws-border) !important;
    color: var(--ws-text) !important;
}

/* Schichthöhe, Qualität, Infill & Produkt-Select – alte harten Farben überschreiben */
body:not(.light-mode) #print-request-root #pr-quality,
body:not(.light-mode) #print-request-root #pr-layer-height,
body:not(.light-mode) #print-request-root #pr-infill,
body:not(.light-mode) #print-request-root #pr-product {
    background-color: color-mix(in srgb, var(--ws-surface) 80%, #000 20%) !important;
    border: 1px solid var(--ws-border) !important;
    color: var(--ws-text) !important;
}

/* Infill-Number-Input (ohne Pfeile etc.) */
body:not(.light-mode) #print-request-root #pr-infill {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Textarea "Hinweise zum Druck" – gleiche Graustufe wie Inputs */
body:not(.light-mode) #print-request-root #pr-notes {
    background-color: color-mix(in srgb, var(--ws-surface) 80%, #000 20%) !important;
    border: 1px solid var(--ws-border) !important;
    color: var(--ws-text) !important;
}

/* Step-3-Panel-Hintergrund etwas heller als Seite, aber dunkler als Inputs */
body:not(.light-mode) #print-request-root .pr-step[data-step="3"] {
    background: var(--ws-surface) !important;
    border-color: var(--ws-border) !important;
}

/* =========================================================
   GLEICHE, ETWAS SCHMALERE BREITE FÜR ALLE STEPS
   ========================================================= */

/* Root bleibt zentriert im Content-Bereich */
#print-request-root {
    max-width: 1100px;
    margin: 0 auto 3rem;
}

/* Jede große Step-Kachel (section.pr-step) gleich breit
   und etwas schmaler als der Root-Container */
#print-request-root .pr-step {
    width: 100%;
    max-width: 880px;
    /* hier kannst du nach Geschmack z.B. 820–920px nehmen */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

#print-request-root .pr-step[data-step] {
    width: 100%;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Light-Mode: aktive Quelle-Karte (innerer Bereich) in hell / gelb */
body.light-mode #print-request-root .pr-source-card input[type="radio"]:checked+.pr-source-card-inner {
    background: #fff9eb !important;
    box-shadow:
        0 0 0 2px rgba(233, 166, 36, 0.7),
        0 10px 30px rgba(15, 23, 42, 0.12) !important;
    border-radius: 0.9rem !important;
}

/* Light-Mode: Formular selbst ohne extra Kasten, nur die Steps sind Karten */
body.light-mode #print-request-root .pr-wizard-body {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* =========================================================
   LIGHT-MODE FIXES NUR FÜR POPUP (Filament / Plate / Nozzle)
   ========================================================= */

/* 1) X-Button oben rechts im Dialog */
body.light-mode .pr-panel-dialog .pr-icon-button {
    width: 32px !important;
    height: 32px !important;
    border-radius: 999px !important;
    border: none !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #e5e7eb !important;
    /* helles Grau */
    color: #111827 !important;
    /* dunkles Grau/Schwarz */
    font-size: 1.1rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

body.light-mode .pr-panel-dialog .pr-icon-button:hover {
    background: #d1d5db !important;
}

/* 2) Filter-Chips (PLA / PETG / …) im Light-Mode */

body.light-mode .pr-panel-dialog .pr-chip-row button,
body.light-mode .pr-panel-dialog .pr-chip-row .pr-chip {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    color: #1c2433 !important;
}

/* aktiver Chip */
body.light-mode .pr-panel-dialog .pr-chip-row button.is-active,
body.light-mode .pr-panel-dialog .pr-chip-row .pr-chip.is-active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #111111 !important;
}

/* =========================================================
   LIGHT-MODE: KARTEN IM POPUP (Filament / Plate / Nozzle)
   ========================================================= */

/* Grundkarten hell wie im übrigen Light-Theme */
body.light-mode #print-request-root #pr-fil-grid .pr-card,
body.light-mode #print-request-root #pr-plate-grid .pr-card,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

/* Bild-Container etwas heller */
body.light-mode #print-request-root #pr-fil-grid .pr-card-image,
body.light-mode #print-request-root #pr-plate-grid .pr-card-image,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card-image {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

/* Titel & Meta-Texte dunkel */
body.light-mode #print-request-root #pr-fil-grid .pr-card-title,
body.light-mode #print-request-root #pr-plate-grid .pr-card-title,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card-title {
    color: #111827 !important;
}

body.light-mode #print-request-root #pr-fil-grid .pr-card-meta,
body.light-mode #print-request-root #pr-plate-grid .pr-card-meta,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card-meta {
    color: #6b7280 !important;
}

/* Hover-State hell */
body.light-mode #print-request-root #pr-fil-grid .pr-card:hover,
body.light-mode #print-request-root #pr-plate-grid .pr-card:hover,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card:hover {
    background: #f8fafc !important;
    transform: translateY(-1px);
}

/* Ausgewählte Karte im Light-Mode (Highlight wie bei Quelle-Karten) */
body.light-mode #print-request-root #pr-fil-grid .pr-card.is-selected,
body.light-mode #print-request-root #pr-plate-grid .pr-card.is-selected,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card.is-selected {
    background: #fff9eb !important;
    border-color: var(--accent-color) !important;
    box-shadow:
        0 0 0 2px rgba(233, 166, 36, 0.7),
        0 10px 30px rgba(15, 23, 42, 0.12) !important;
}

/* aktiver Chip im Light-Mode: gelb mit weißer Schrift */
body.light-mode .pr-panel-dialog .pr-chip-row button.is-active,
body.light-mode .pr-panel-dialog .pr-chip-row .pr-chip.is-active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #ffffff !important;
}

/* =========================================================
   DARK-MODE: UPLOAD-BEREICH / DROPZONE
   ========================================================= */
body:not(.light-mode) #print-request-root .pr-upload-wrapper {
    color: var(--ws-text) !important;
}

body:not(.light-mode) #print-request-root .pr-dropzone {
    position: relative;
    border-radius: 0.75rem !important;
    border: 2px dashed rgba(255, 255, 255, 0.25) !important;
    background: color-mix(in srgb, var(--secondary-bg-color) 90%, #000 10%) !important;
    padding: 0.9rem 1rem !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body:not(.light-mode) #print-request-root .pr-dropzone:hover {
    background: color-mix(in srgb, var(--secondary-bg-color) 75%, #000 25%) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent-color) 50%, #0000) inset !important;
}

body:not(.light-mode) #print-request-root .pr-drop-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body:not(.light-mode) #print-request-root .pr-drop-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

body:not(.light-mode) #print-request-root .pr-drop-text span {
    display: block;
}

body:not(.light-mode) #print-request-root .pr-drop-text [data-translate="pr_drop_title"] {
    font-weight: 600;
    color: var(--ws-text) !important;
}

body:not(.light-mode) #print-request-root .pr-drop-sub {
    font-size: 0.85rem;
    color: var(--ws-text-muted) !important;
}

/* Datei-Name unter der Dropzone */
body:not(.light-mode) #print-request-root .pr-file-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--ws-text-muted) !important;
}

body:not(.light-mode) #print-request-root .pr-file-name {
    font-weight: 500;
    color: var(--ws-text) !important;
}

/* Unsichtbares File-Input */
body:not(.light-mode) #print-request-root .pr-file-input {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

/* =========================================================
   LIGHT-MODE: Ghost-Buttons (z. B. "Filament auswählen")
   ========================================================= */

body.light-mode #print-request-root .pr-btn.ghost {
    border: 1px solid #d1d5db !important;
    /* hellgrauer Rahmen */
    background: #ffffff !important;
    /* weißer Hintergrund */
    color: #1c2433 !important;
    /* dunkler Text */
    border-radius: 999px !important;
    padding: 0.45rem 1.1rem !important;
    font-weight: 500 !important;
    transition: background .15s ease, border-color .15s ease;
}

body.light-mode #print-request-root .pr-btn.ghost:hover {
    background: #f3f4f6 !important;
    /* leichtes Hover-Grau */
    border-color: #c4c9d3 !important;
    /* etwas dunklerer Rahmen */
}

/* kleine Status-Badge hinter dem Dateinamen */
.pr-file-status {
    margin-left: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.pr-file-status::before {
    content: "✓";
    font-weight: 700;
}

/* Light-Mode etwas dunklere Schrift / Rahmen */
body.light-mode #print-request-root .pr-file-status {
    border-color: rgba(34, 197, 94, 0.7);
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.pr-file-status-error {
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

body.light-mode #print-request-root .pr-file-status-error {
    color: #b91c1c;
}

/* Quelle-Karten fixen – gleiche Höhe egal bei welcher Sprache */
.pr-source-card {
    display: flex;
}

.pr-source-card-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: auto;
    /* Wichtig */
    min-height: 90px;
    /* Optional, sorgt für Einheitlichkeit */
    box-sizing: border-box;
    /* verhindert Rahmen-Überlauf */
}

/* Textblock korrekt ausrichten */
.pr-source-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Falls der Icon-Kreis höher ist als der Text */
.pr-source-icon {
    flex-shrink: 0;
}

/* Standard: ausgeblendet (macht JS ohnehin auch) */
#pr-filament-hint {
    display: none;
}

/* Wenn JS data-active setzt -> sichtbare, gelbe Box */
#pr-filament-hint[data-active="1"] {
    display: block;
    /* oder inline-block, wie du magst */
    /* hier dein altes Highlight-Design hin */
    background: #f3b742;
    color: #000;
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, .2);
}

/* ==== Sticky-Suche / Chips in den Auswahl-Panels ==== */

/* Panels scollen selbst */
#filament-panel,
#plate-panel,
#nozzle-panel {
    overflow-y: auto;
}

/* Filament: Suchfeld oben fest */
#pr-fil-q {
    position: sticky;
    top: 0;
    z-index: 20;
    background: inherit;
    /* übernimmt Panel-Hintergrund */
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Filament: Material-Chips direkt unter der Suche fest */
#pr-fil-chips {
    position: sticky;
    top: 56px;
    /* Abstand passend zur Höhe des Suchfelds */
    z-index: 19;
    background: inherit;
    padding-bottom: 8px;
}

/* Plates / Nozzles: nur Suchfeld sticky */
#pr-plate-q,
#pr-nozzle-q {
    position: sticky;
    top: 0;
    z-index: 20;
    background: inherit;
    padding-top: 8px;
    padding-bottom: 8px;
}

.pr-panel-dialog {
    transition: transform 0.22s ease-out, opacity 0.22s ease-out;
    will-change: transform;
}

/* Toolbar im Filament-Panel klebt oben */
.pr-panel-dialog-body--filament .pr-filament-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 8px 16px 10px;
    margin: 0 -16px 8px;
    background: #18191d;
    /* oder deine Panel-Farbe */
}

/* Suchzeile */
.pr-filament-search-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Chips-Zeile */
.pr-filament-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* optional: kleiner Trenner unter der Toolbar */
.pr-panel-dialog-body--filament .pr-filament-toolbar::after {
    content: "";
    display: block;
    margin-top: 8px;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

/* Chip-Container */
#filament-panel .pr-filament-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Einzelne Filter-Chips */
#filament-panel .pr-filament-chips-row .pr-chip {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #22242a;
    color: #e6e6e6;

    padding: 6px 12px;
    border-radius: 999px;

    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

#filament-panel .pr-filament-chips-row .pr-chip:hover {
    background: #2a2d35;
    border-color: rgba(255, 255, 255, 0.22);
}

#filament-panel .pr-filament-chips-row .pr-chip.is-active {
    background: linear-gradient(180deg, #ffcc4d, #ffb300);
    color: #1a1a1a;
    border-color: transparent;
    font-weight: 600;
}

#filament-panel .pr-filament-chips-row .pr-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 204, 77, 0.35);
}

/* Header ohne Abstand nach unten */
#filament-panel .pr-panel-dialog-header {
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Toolbar sauber direkt unter Header */
#filament-panel .pr-panel-toolbar {
    padding: 12px 16px 8px;
    background: #1c1f25;
}

/* Filament-Panel: keinen Abstand zwischen Header und Suchzeile */
#filament-panel .pr-panel-dialog-body--filament {
    padding-top: 0;
    /* war 0.75rem über die generische Regel */
}

/* =========================================================
   BASIS-TOKENS – an globale index.css-Tokens angekoppelt
   ========================================================= */
:root {
    --ws-bg: var(--primary-bg-color);
    --ws-surface: var(--secondary-bg-color);
    --ws-surface-2: color-mix(in srgb, var(--secondary-bg-color) 85%, #000 15%);
    --ws-border: rgba(255, 255, 255, 0.16);
    --ws-text: var(--text-color);
    --ws-text-muted: var(--text-muted-color);
    --ws-accent: var(--accent-color);
    --ws-selected-bg: color-mix(in oklab, var(--ws-accent) 8%, var(--ws-surface-2));
    --ws-selected-border: color-mix(in oklab, var(--ws-accent) 45%, var(--ws-border));
}

body.light-mode {
    --ws-border: rgba(0, 0, 0, 0.18);
}

/* html/body bleiben im globalen Look */
html,
body {
    background: var(--primary-bg-color);
    color: var(--text-color);
}

.muted {
    color: var(--ws-text-muted);
}

/* =========================================================
   GENERISCHE PANELS & BUTTONS
   ========================================================= */

.panel {
    border: 1px solid var(--ws-border);
    border-radius: 14px;
    background: var(--ws-surface);
    margin: 12px 0;
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--ws-surface-2);
    border-bottom: 1px solid var(--ws-border);
}

.panel-body {
    padding: 10px 12px;
}

.btn {
    background: var(--accent-color);
    color: #111;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: .55rem .85rem;
    cursor: pointer;
}

.btn.secondary {
    background: transparent;
    color: var(--ws-text);
    border: 1px solid var(--ws-border);
}

.btn.danger {
    background: #ff6262;
    color: #111;
}

.btn.small {
    padding: .4rem .6rem;
    border-radius: 10px;
}

/* =========================================================
   GENERISCHE KACHELN (Produkte / Filamente / Nozzles)
   ========================================================= */

.pm-grid {
    --card-min: 150px;
    --card-max: 1fr;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min), var(--card-max)));
    gap: 10px;
}

.fa-card,
.pm-card,
.sp-card {
    position: relative;
    display: block;
    background: var(--ws-surface-2);
    border: 1px solid var(--ws-border);
    border-radius: 12px;
    padding: 8px;
    text-align: left;
    cursor: pointer;
    transition:
        transform .12s ease,
        border-color .12s ease,
        box-shadow .12s ease,
        background-color .12s ease;
}

.fa-card:hover,
.pm-card:hover,
.sp-card:hover {
    transform: translateY(-1px);
}

.fa-card .pic,
.pm-card .pm-pic,
.fa-card picture,
.pm-card picture {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    display: block;
}

.fa-card img,
.pm-card img,
.fa-card picture>img,
.pm-card picture>img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
}

.fa-card .title,
.pm-card .pm-title {
    font-weight: 700;
    line-height: 1.2;
    margin-top: 4px;
}

.fa-card .meta,
.pm-card .pm-meta {
    color: var(--ws-text-muted);
    font-size: .85rem;
}

.fa-card .price,
.pm-card .pm-price {
    font-weight: 800;
    margin-top: 2px;
}

.fa-card.selected,
.pm-card.is-selected {
    background: var(--ws-selected-bg);
    border-color: var(--ws-selected-border);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
}

.sp-card:focus-visible,
.fa-card:focus-visible,
.pm-card:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--ws-accent) 55%, #000);
    outline-offset: 2px;
}

/* =========================================================
   MINI-PREVIEW-KARTEN (Auswahl-Chips)
   ========================================================= */

.pr-selection-slot {
    margin: 8px 12px;
}

.pr-selection-card {
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--ws-selected-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--ws-selected-border, var(--ws-border));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    font-size: .85rem;
    text-align: left;
}

.pr-selection-card-image {
    flex: 0 0 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
}

.pr-selection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pr-selection-card-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pr-selection-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pr-selection-meta {
    font-size: 0.8rem;
    color: var(--ws-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* roter Entfernen-Button */
.pr-selection-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: #ff4d4d;
    color: #111;
    font-size: .85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pr-selection-remove:hover {
    background: #ff6b6b;
}

/* Filamente immer untereinander */
.pr-selection-multi {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.pr-selection-multi--filament {
    grid-template-columns: 1fr;
}

/* =========================================================
   PRINT-REQUEST: SEITEN-LOOK
   ========================================================= */

.page--print-request {
    --pr-surface: var(--ws-surface);
    --pr-border: var(--ws-border);
    --pr-hover: rgba(255, 255, 255, .04);
    --pr-selected: rgba(255, 255, 255, .07);
}

/* Karten & Panels */
.page--print-request .sp-card,
.page--print-request .fa-card,
.page--print-request .pm-card,
.page--print-request .pr-selection-card,
.page--print-request .pr-source-card {
    background: var(--ws-surface) !important;
    border: 1px solid var(--ws-border) !important;
}

.page--print-request .sp-card:hover,
.page--print-request .fa-card:hover,
.page--print-request .pm-card:hover,
.page--print-request .pr-source-card:hover {
    background: color-mix(in oklab, var(--ws-surface) 92%, #ffffff 8%);
    box-shadow: 0 0 0 9999px var(--pr-hover) inset;
    transform: translateY(-1px);
}

.page--print-request .sp-card.is-active,
.page--print-request .fa-card.selected,
.page--print-request .pm-card.is-selected,
.page--print-request .pr-source-card.is-active {
    background: color-mix(in oklab, var(--ws-surface) 88%, #ffffff 12%);
    box-shadow:
        0 0 0 9999px var(--pr-selected) inset,
        0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
    border-color: var(--ws-accent) !important;
}

/* Step-/Panel-Flächen und Summary an Secondary-BG koppeln */
.page--print-request .pr-step,
.page--print-request .pr-panel,
.page--print-request .pr-summary,
.page--print-request .pr-product-card,
.page--print-request .pr-selection-card,
.page--print-request .pr-source-card {
    background: var(--secondary-bg-color) !important;
    border-color: var(--ws-border) !important;
}

/* Light-Mode: helle Karten */
body.light-mode .page--print-request .pr-step,
body.light-mode .page--print-request .pr-panel,
body.light-mode .page--print-request .pr-summary,
body.light-mode .page--print-request .pr-product-card,
body.light-mode .page--print-request .pr-selection-card,
body.light-mode .page--print-request .pr-source-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
}

/* Inputs/Search */
input[type="search"] {
    background: #2c2f33;
    color: var(--ws-text);
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 15px;
    height: 38px;
    width: 100%;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

input[type="search"]::placeholder {
    color: var(--ws-text-muted);
}

input[type="search"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent-color) 30%, transparent);
    outline: none;
}

/* =========================================================
   WIZARD-GRUNDLAYOUT (.pr-*)
   ========================================================= */

.pr-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pr-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.pr-wizard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Step-Zeitstrahl mittig */
.pr-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0 auto;
    list-style: none;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    justify-content: center;
}

.pr-step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    opacity: 0.5;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
}

.pr-step-indicator.is-active {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.pr-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
}

.pr-step-label {
    font-weight: 500;
}

.pr-wizard-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pr-step {
    display: none;
    flex-direction: column;
    padding: 1rem;
    border-radius: 1rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
}

.pr-step.is-active,
.pr-step.active {
    display: flex;
}

.pr-step-header {
    margin-bottom: 0.75rem;
}

.pr-step-header h2 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
    text-align: center;
}

.pr-step-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    text-align: center;
}

.pr-step-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.pr-step-footer {
    flex: 0 0 auto;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Step 1: nur Weiter → rechts */
.pr-step[data-step="1"] .pr-step-footer {
    justify-content: flex-end;
}

/* Buttons */
.pr-btn {
    border-radius: 999px;
    padding: 0.55rem 1.3rem;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    z-index: 1;
}

/* Primary ohne Verlauf, schwarze Schrift */
.pr-btn.primary {
    background: var(--accent-color);
    color: #111;
}

.pr-btn.primary:hover {
    filter: brightness(1.05);
}

.pr-btn.ghost {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pr-btn.is-disabled,
.pr-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Felder */
.pr-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.pr-field-wide {
    margin-top: 0.5rem;
}

.pr-label {
    font-weight: 500;
    font-size: 0.85rem;
}

.pr-field input,
.pr-field select,
.pr-field textarea {
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.45rem 0.65rem;
    color: inherit;
    font: inherit;
}

.pr-field textarea {
    resize: vertical;
}

.pr-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .pr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Footer-Layout nicht sticky */
body.print_request-page .pr-step-footer,
#print-request-root .pr-step-footer {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;

    width: 100%;
    display: flex;
    align-items: center;

    margin-top: 24px;
    padding-top: 8px;
}

/* =========================================================
   STEP 1 – QUELLE
   ========================================================= */

.pr-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pr-source-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 0.9rem;
    background: var(--ws-surface-2);
    border: 1px solid var(--ws-border);
    cursor: pointer;
    transition:
        transform .12s ease,
        border-color .12s ease,
        box-shadow .12s ease,
        background-color .12s ease;
}

.pr-source-card input[type="radio"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.pr-source-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
}

.pr-source-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.pr-source-text {
    flex: 1 1 auto;
    min-width: 0;
}

.pr-source-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.pr-source-subtitle {
    font-size: 0.8rem;
    color: var(--ws-text-muted);
}

.pr-source-card:hover {
    transform: translateY(-1px);
}

.pr-source-card.is-active {
    background: var(--ws-selected-bg);
    border-color: var(--ws-selected-border);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
}

.pr-source-card input[type="radio"]:checked+.pr-source-card-inner {
    background: var(--ws-selected-bg);
    border-radius: 0.9rem;
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 40%, transparent);
}

.pr-source-panel {
    margin-top: 1rem;
}

.pr-source-panel[hidden] {
    display: none;
}

/* Produkt-Select */
#pr-product {
    width: 100%;
    height: 38px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #40444b;
    color: var(--ws-text);
    padding: 6px 32px 6px 10px;
    font-size: 0.95rem;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='%23e9a624' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

#pr-product:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

#pr-product option {
    background: #1b1e24;
    color: var(--ws-text);
}

/* Produkt-Preview */
#pr-product-preview {
    margin-top: 0.75rem;
}

.pr-product-card {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
}

.pr-product-image {
    width: 100%;
    max-height: 220px;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
}

.pr-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.pr-product-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.pr-product-meta {
    font-size: 0.85rem;
    color: var(--ws-text-muted);
}

@media (max-width: 640px) {
    .pr-product-card {
        grid-template-columns: 1fr;
    }

    .pr-product-image {
        max-height: 200px;
        aspect-ratio: 3 / 2;
    }
}

/* =========================================================
   STEP 2 – FILAMENTE
   ========================================================= */

.pr-panel {
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
    display: flex;
    flex-direction: column;
}

/* Panel-Header jetzt vertikal & mittig */
.pr-panel-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.pr-panel-title {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Filament-Button unter der Auswahl mittig */
.pr-panel--filament .pr-filament-button {
    align-self: center;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Hinweis unter der Filament-Auswahl */
#pr-filament-hint {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
}

#pr-filament-hint.pr-hint--muted {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ws-text-muted);
    font-weight: 400;
}

#pr-filament-hint.pr-hint--warning {
    background: rgba(246, 177, 0, 0.08);
    border: 1px solid var(--accent-color);
    color: #ffd27f;
    font-weight: 600;
}

/* =========================================================
   STEP 3 – DRUCK-EINSTELLUNGEN
   ========================================================= */

#print-request-root #pr-quality,
#print-request-root #pr-layer-height {
    background-color: #40444b;
    border: 1px solid #555;
    color: var(--text-color);
    border-radius: 6px;
    height: 38px;
    padding: 6px 32px 6px 10px;
    font-size: var(--input-font-size, 16px);

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg fill='%23e9a624' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

#print-request-root #pr-infill {
    background-color: #40444b;
    border: 1px solid #555;
    color: var(--text-color);
    border-radius: 6px;
    height: 38px;
    padding: 6px 10px;
    font-size: var(--input-font-size, 16px);
    text-align: left;
    background-image: none;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

#print-request-root #pr-infill::-webkit-outer-spin-button,
#print-request-root #pr-infill::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#print-request-root #pr-quality:focus,
#print-request-root #pr-layer-height:focus,
#print-request-root #pr-infill:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(233, 166, 36, .25);
    outline: none;
}

/* „Optionale Einstellungen“-Button zentrieren */
.pr-advanced {
    margin-top: 1rem;
    text-align: center;
}

#pr-advanced-toggle {
    display: block;
    margin: 0 auto;
}

/* =========================================================
   OVERLAY-PANELS (Filament / Plate / Nozzle)
   ========================================================= */

.pr-panel-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    /* liegt sicher über allen Buttons/Wizard-Elementen */
}

.pr-panel-overlay.is-open {
    display: flex;
}

.pr-panel-dialog {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    min-height: 90vh;
    border-radius: 1rem 1rem 0 0;
    background: rgba(18, 18, 18, 0.98);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 720px) {
    .pr-panel-overlay {
        align-items: center;
    }

    .pr-panel-dialog {
        border-radius: 1rem;
    }
}

.pr-panel-dialog-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pr-panel-dialog-body {
    flex: 1 1 auto;
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    z-index: 420666;
}

.pr-panel-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.pr-panel-toolbar input[type="search"] {
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    font: inherit;
    color: inherit;
}

.pr-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
}

/* Chips im Filterbereich (Material: PLA, PETG, ...) */
.pr-chip-row button,
.pr-chip-row .pr-chip {
    border-radius: 999px;
    border: 1px solid var(--ws-border);
    padding: 0.25rem 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    color: inherit;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease;
}

.pr-chip-row button:hover,
.pr-chip-row .pr-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.pr-chip-row button.is-active,
.pr-chip-row .pr-chip.is-active {
    background: var(--ws-accent);
    color: #111;
    border-color: var(--ws-accent);
}

/* Light-Mode-Anpassung für Chips */
body.light-mode .pr-chip-row button,
body.light-mode .pr-chip-row .pr-chip {
    background: #ffffff;
    border-color: #dfe3ea;
    color: #1c2433;
}

body.light-mode .pr-chip-row button.is-active,
body.light-mode .pr-chip-row .pr-chip.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #111;
}

.pr-card-grid,
#pr-fil-grid,
#pr-plate-grid,
#pr-nozzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
    z-index: 420666;
}

.pr-icon-button {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
}

#pr-fil-grid .pr-card,
#pr-plate-grid .pr-card,
#pr-nozzle-grid .pr-card {
    position: relative;
    display: block;
    background: var(--ws-surface-2);
    border: 1px solid var(--ws-border);
    border-radius: 12px;
    padding: 8px;
    text-align: left;
    cursor: pointer;
    transition:
        transform .12s ease,
        border-color .12s ease,
        box-shadow .12s ease,
        background-color .12s ease;
}

#pr-fil-grid .pr-card:hover,
#pr-plate-grid .pr-card:hover,
#pr-nozzle-grid .pr-card:hover {
    transform: translateY(-1px);
}

#pr-fil-grid .pr-card-image,
#pr-plate-grid .pr-card-image,
#pr-nozzle-grid .pr-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    margin-bottom: 6px;
}

#pr-fil-grid .pr-card-image img,
#pr-plate-grid .pr-card-image img,
#pr-nozzle-grid .pr-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

#pr-fil-grid .pr-card-title,
#pr-plate-grid .pr-card-title,
#pr-nozzle-grid .pr-card-title {
    font-weight: 700;
    line-height: 1.2;
    font-size: .9rem;
}

#pr-fil-grid .pr-card-meta,
#pr-plate-grid .pr-card-meta,
#pr-nozzle-grid .pr-card-meta {
    color: var(--ws-text-muted);
    font-size: .8rem;
    margin-top: 2px;
}

#pr-fil-grid .pr-card.is-selected,
#pr-plate-grid .pr-card.is-selected,
#pr-nozzle-grid .pr-card.is-selected {
    background: color-mix(in oklab, var(--ws-accent) 10%, var(--ws-surface-2));
    border-color: color-mix(in oklab, var(--ws-accent) 50%, var(--ws-border));
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ws-accent) 45%, transparent);
}

#pr-fil-grid .pr-card.is-selected::after,
#pr-plate-grid .pr-card.is-selected::after,
#pr-nozzle-grid .pr-card.is-selected::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--ws-accent);
    color: #111;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   SUMMARY & ERRORS
   ========================================================= */

.pr-summary {
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: var(--secondary-bg-color);
    border: 1px solid var(--ws-border);
    font-size: 0.9rem;
}

.pr-summary-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.pr-step-error {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #ff7676;
    min-height: 1em;
}

/* =========================================================
   LIGHT-MODE VERFEINERUNG
   ========================================================= */

body.light-mode .page--print-request h1,
body.light-mode .page--print-request h2,
body.light-mode .page--print-request h3,
body.light-mode .page--print-request label,
body.light-mode .page--print-request .fa-card .title,
body.light-mode .page--print-request .pm-card .pm-title,
body.light-mode .page--print-request .pr-selection-title,
body.light-mode .page--print-request .pr-source-title {
    color: #1c2433 !important;
}

body.light-mode .page--print-request .muted,
body.light-mode .page--print-request .fa-card .meta,
body.light-mode .page--print-request .pm-card .pm-meta,
body.light-mode .page--print-request .pr-selection-meta,
body.light-mode .page--print-request small.muted,
body.light-mode .page--print-request .pr-source-subtitle {
    color: #5a6475 !important;
}

body.light-mode .page--print-request input[type="search"],
body.light-mode .page--print-request input[type="text"],
body.light-mode .page--print-request input[type="number"],
body.light-mode .page--print-request textarea,
body.light-mode .page--print-request input[type="url"] {
    background: #ffffff !important;
    color: #1c2433 !important;
    border: 1px solid #dfe3ea !important;
}

body.light-mode .page--print-request #pr-layer-height,
body.light-mode .page--print-request #pr-quality,
body.light-mode #pr-product {
    background: #ffffff url("data:image/svg+xml,%3Csvg fill='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E") no-repeat right 10px center / 14px 14px !important;
    color: #1c2433 !important;
    border: 1px solid #dfe3ea !important;
}

body.light-mode #pr-product option {
    background: #ffffff;
    color: #1c2433;
}

body.light-mode #pr-filament-hint.pr-hint--warning {
    background: rgba(246, 177, 0, 0.1);
    border-color: rgba(246, 177, 0, 0.9);
    color: #1c2433;
}

/* =========================================================
   HARD LIGHT-MODE OVERRIDES NUR FÜR PRINT-REQUEST
   ========================================================= */

/* Light-Mode: Root-Container nur als Wrapper, kein eigener Kasten */
body.light-mode #print-request-root {
    background: transparent !important;
    /* kein zweiter Kasten */
    color: #111827 !important;
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 1.5rem 1rem 3rem !important;
    box-shadow: none !important;
    border: none !important;
}

/* Überschrift */
body.light-mode #print-request-root .pr-title {
    color: #111827 !important;
}

/* Wizard-Karten / Panels */
body.light-mode #print-request-root .pr-step,
body.light-mode #print-request-root .pr-panel,
body.light-mode #print-request-root .pr-summary,
body.light-mode #print-request-root .pr-product-card,
body.light-mode #print-request-root .pr-selection-card,
body.light-mode #print-request-root .pr-source-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08) !important;
}

/* Step-Leiste */
body.light-mode #print-request-root .pr-steps {
    background: #ffffff !important;
    border-radius: 0.75rem !important;
    border: 1px solid #dfe3ea !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

body.light-mode #print-request-root .pr-step-indicator {
    opacity: 0.65 !important;
    border-color: transparent !important;
    background: transparent !important;
    color: #111827 !important;
}

body.light-mode #print-request-root .pr-step-indicator.is-active {
    opacity: 1 !important;
    border-color: rgba(233, 166, 36, 0.7) !important;
    background: rgba(233, 166, 36, 0.12) !important;
}

body.light-mode #print-request-root .pr-step-number {
    background: rgba(233, 166, 36, 0.18) !important;
    color: #111827 !important;
}

/* Karten (Produkt/Filament/Quelle) */
body.light-mode #print-request-root .sp-card,
body.light-mode #print-request-root .fa-card,
body.light-mode #print-request-root .pm-card,
body.light-mode #print-request-root .pr-source-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05) !important;
}

body.light-mode #print-request-root .sp-card:hover,
body.light-mode #print-request-root .fa-card:hover,
body.light-mode #print-request-root .pm-card:hover,
body.light-mode #print-request-root .pr-source-card:hover {
    background: #f8fafc !important;
    transform: translateY(-1px);
}

body.light-mode #print-request-root .sp-card.is-active,
body.light-mode #print-request-root .fa-card.selected,
body.light-mode #print-request-root .pm-card.is-selected,
body.light-mode #print-request-root .pr-source-card.is-active {
    background: #fff9eb !important;
    border-color: var(--accent-color) !important;
    box-shadow:
        0 0 0 2px rgba(233, 166, 36, 0.7),
        0 10px 30px rgba(15, 23, 42, 0.12) !important;
}

/* Texte */
body.light-mode #print-request-root h1,
body.light-mode #print-request-root h2,
body.light-mode #print-request-root h3,
body.light-mode #print-request-root label,
body.light-mode #print-request-root .pr-selection-title,
body.light-mode #print-request-root .pr-source-title {
    color: #111827 !important;
}

body.light-mode #print-request-root .muted,
body.light-mode #print-request-root .pr-selection-meta,
body.light-mode #print-request-root .pr-source-subtitle,
body.light-mode #print-request-root small.muted {
    color: #6b7280 !important;
}

/* Form-Felder (Anzahl, URL, Notes, etc.) */
body.light-mode #print-request-root .pr-field input,
body.light-mode #print-request-root .pr-field select,
body.light-mode #print-request-root .pr-field textarea,
body.light-mode #print-request-root input[type="number"],
body.light-mode #print-request-root input[type="url"],
body.light-mode #print-request-root input[type="text"] {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #dfe3ea !important;
}

/* Anzahl speziell, falls global überschrieben wird */
body.light-mode #print-request-root #pr-qty {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    color: #111827 !important;
}

/* Selects (Quality, Layer, Produkt) mit dunklem Pfeil */
body.light-mode #print-request-root #pr-quality,
body.light-mode #print-request-root #pr-layer-height,
body.light-mode #print-request-root #pr-product {
    background: #ffffff url("data:image/svg+xml,%3Csvg fill='%23111827' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E") no-repeat right 10px center / 14px 14px !important;
    color: #111827 !important;
    border: 1px solid #dfe3ea !important;
}

body.light-mode #print-request-root #pr-product option,
body.light-mode #print-request-root #pr-quality option,
body.light-mode #print-request-root #pr-layer-height option {
    background: #ffffff !important;
    color: #111827 !important;
}

/* Infill */
body.light-mode #print-request-root #pr-infill {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    color: #111827 !important;
}

/* Warn-Hinweis bei Filament */
body.light-mode #print-request-root #pr-filament-hint.pr-hint--warning {
    background: rgba(246, 177, 0, 0.1) !important;
    border-color: rgba(246, 177, 0, 0.9) !important;
    color: #1f2937 !important;
}

/* Fehlermeldungen */
body.light-mode #print-request-root .pr-step-error {
    color: #b91c1c !important;
}

/* =========================================================
   LIGHT-MODE: UPLOAD-BEREICH / DROPZONE
   ========================================================= */

body.light-mode #print-request-root .pr-upload-wrapper {
    color: #111827 !important;
}

body.light-mode #print-request-root .pr-dropzone {
    position: relative;
    border-radius: 0.75rem !important;
    border: 2px dashed #cbd5e1 !important;
    background: #f9fafb !important;
    padding: 0.9rem 1rem !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body.light-mode #print-request-root .pr-dropzone:hover {
    background: #eef2ff !important;
    border-color: #a5b4fc !important;
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35) inset !important;
}

body.light-mode #print-request-root .pr-drop-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.light-mode #print-request-root .pr-drop-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-mode #print-request-root .pr-drop-text span {
    display: block;
}

body.light-mode #print-request-root .pr-drop-text [data-translate="pr_drop_title"] {
    font-weight: 600;
    color: #111827;
}

body.light-mode #print-request-root .pr-drop-sub {
    font-size: 0.85rem;
    color: #6b7280;
}

/* natives file-Input unsichtbar, aber klickbar über der Dropzone */
body.light-mode #print-request-root .pr-file-input,
#print-request-root .pr-file-input {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

/* Infozeile "Ausgewählte Datei: ..." */
body.light-mode #print-request-root .pr-file-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
}

body.light-mode #print-request-root .pr-file-name {
    font-weight: 500;
    color: #111827;
}

/* =========================================================
   LIGHT-MODE: PANEL-DIALOGE (Filament / Plate / Nozzle)
   ========================================================= */

body.light-mode #print-request-root .pr-panel-dialog {
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25) !important;
}

body.light-mode #print-request-root .pr-panel-dialog-header {
    border-bottom: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}

body.light-mode #print-request-root .pr-panel-dialog-body {
    background: #ffffff !important;
}

body.light-mode #print-request-root .pr-panel-dialog-body input[type="search"] {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    color: #111827 !important;
}

/* =========================================================
   DARK-MODE / DEFAULT: PRINT-REQUEST-FLÄCHEN
   ========================================================= */

/* nur wenn KEIN light-mode aktiv ist */
body:not(.light-mode) #print-request-root .pr-step,
body:not(.light-mode) #print-request-root .pr-panel,
body:not(.light-mode) #print-request-root .pr-summary,
body:not(.light-mode) #print-request-root .pr-product-card,
body:not(.light-mode) #print-request-root .pr-selection-card,
body:not(.light-mode) #print-request-root .pr-source-card {
    background: var(--secondary-bg-color) !important;
    border-color: var(--ws-border) !important;
}

/* Karten im Darkmode */
body:not(.light-mode) #print-request-root .sp-card,
body:not(.light-mode) #print-request-root .fa-card,
body:not(.light-mode) #print-request-root .pm-card,
body:not(.light-mode) #print-request-root .pr-source-card {
    background: var(--ws-surface-2) !important;
    border-color: var(--ws-border) !important;
}

body:not(.light-mode) #print-request-root .sp-card.is-active,
body:not(.light-mode) #print-request-root .fa-card.selected,
body:not(.light-mode) #print-request-root .pm-card.is-selected,
body:not(.light-mode) #print-request-root .pr-source-card.is-active {
    background: var(--ws-selected-bg) !important;
    border-color: var(--ws-selected-border) !important;
}

/* Wizard-Step-Leiste im Darkmode */
body:not(.light-mode) #print-request-root .pr-steps {
    background: rgba(255, 255, 255, 0.02) !important;
}

body:not(.light-mode) #print-request-root .pr-step-indicator.is-active {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

/* =========================================================
   DARK-MODE: FELDER / SELECTS / TEXTAREAS
   ========================================================= */

/* generische Inputs im Wizard */
body:not(.light-mode) #print-request-root .pr-field input,
body:not(.light-mode) #print-request-root .pr-field select,
body:not(.light-mode) #print-request-root .pr-field textarea {
    background: color-mix(in srgb, var(--ws-surface) 80%, #000 20%) !important;
    border: 1px solid var(--ws-border) !important;
    color: var(--ws-text) !important;
}

/* Schichthöhe, Qualität, Infill & Produkt-Select – alte harten Farben überschreiben */
body:not(.light-mode) #print-request-root #pr-quality,
body:not(.light-mode) #print-request-root #pr-layer-height,
body:not(.light-mode) #print-request-root #pr-infill,
body:not(.light-mode) #print-request-root #pr-product {
    background-color: color-mix(in srgb, var(--ws-surface) 80%, #000 20%) !important;
    border: 1px solid var(--ws-border) !important;
    color: var(--ws-text) !important;
}

/* Infill-Number-Input (ohne Pfeile etc.) */
body:not(.light-mode) #print-request-root #pr-infill {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Textarea "Hinweise zum Druck" – gleiche Graustufe wie Inputs */
body:not(.light-mode) #print-request-root #pr-notes {
    background-color: color-mix(in srgb, var(--ws-surface) 80%, #000 20%) !important;
    border: 1px solid var(--ws-border) !important;
    color: var(--ws-text) !important;
}

/* Step-3-Panel-Hintergrund etwas heller als Seite, aber dunkler als Inputs */
body:not(.light-mode) #print-request-root .pr-step[data-step="3"] {
    background: var(--ws-surface) !important;
    border-color: var(--ws-border) !important;
}

/* =========================================================
   GLEICHE, ETWAS SCHMALERE BREITE FÜR ALLE STEPS
   ========================================================= */

/* Root bleibt zentriert im Content-Bereich */
#print-request-root {
    max-width: 1100px;
    margin: 0 auto 3rem;
}

/* Jede große Step-Kachel (section.pr-step) gleich breit
   und etwas schmaler als der Root-Container */
#print-request-root .pr-step {
    width: 100%;
    max-width: 880px;
    /* hier kannst du nach Geschmack z.B. 820–920px nehmen */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

#print-request-root .pr-step[data-step] {
    width: 100%;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Light-Mode: aktive Quelle-Karte (innerer Bereich) in hell / gelb */
body.light-mode #print-request-root .pr-source-card input[type="radio"]:checked+.pr-source-card-inner {
    background: #fff9eb !important;
    box-shadow:
        0 0 0 2px rgba(233, 166, 36, 0.7),
        0 10px 30px rgba(15, 23, 42, 0.12) !important;
    border-radius: 0.9rem !important;
}

/* Light-Mode: Formular selbst ohne extra Kasten, nur die Steps sind Karten */
body.light-mode #print-request-root .pr-wizard-body {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* =========================================================
   LIGHT-MODE FIXES NUR FÜR POPUP (Filament / Plate / Nozzle)
   ========================================================= */

/* 1) X-Button oben rechts im Dialog */
body.light-mode .pr-panel-dialog .pr-icon-button {
    width: 32px !important;
    height: 32px !important;
    border-radius: 999px !important;
    border: none !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #e5e7eb !important;
    /* helles Grau */
    color: #111827 !important;
    /* dunkles Grau/Schwarz */
    font-size: 1.1rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

body.light-mode .pr-panel-dialog .pr-icon-button:hover {
    background: #d1d5db !important;
}

/* 2) Filter-Chips (PLA / PETG / …) im Light-Mode */

body.light-mode .pr-panel-dialog .pr-chip-row button,
body.light-mode .pr-panel-dialog .pr-chip-row .pr-chip {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    color: #1c2433 !important;
}

/* aktiver Chip */
body.light-mode .pr-panel-dialog .pr-chip-row button.is-active,
body.light-mode .pr-panel-dialog .pr-chip-row .pr-chip.is-active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #111111 !important;
}

/* =========================================================
   LIGHT-MODE: KARTEN IM POPUP (Filament / Plate / Nozzle)
   ========================================================= */

/* Grundkarten hell wie im übrigen Light-Theme */
body.light-mode #print-request-root #pr-fil-grid .pr-card,
body.light-mode #print-request-root #pr-plate-grid .pr-card,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

/* Bild-Container etwas heller */
body.light-mode #print-request-root #pr-fil-grid .pr-card-image,
body.light-mode #print-request-root #pr-plate-grid .pr-card-image,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card-image {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

/* Titel & Meta-Texte dunkel */
body.light-mode #print-request-root #pr-fil-grid .pr-card-title,
body.light-mode #print-request-root #pr-plate-grid .pr-card-title,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card-title {
    color: #111827 !important;
}

body.light-mode #print-request-root #pr-fil-grid .pr-card-meta,
body.light-mode #print-request-root #pr-plate-grid .pr-card-meta,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card-meta {
    color: #6b7280 !important;
}

/* Hover-State hell */
body.light-mode #print-request-root #pr-fil-grid .pr-card:hover,
body.light-mode #print-request-root #pr-plate-grid .pr-card:hover,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card:hover {
    background: #f8fafc !important;
    transform: translateY(-1px);
}

/* Ausgewählte Karte im Light-Mode (Highlight wie bei Quelle-Karten) */
body.light-mode #print-request-root #pr-fil-grid .pr-card.is-selected,
body.light-mode #print-request-root #pr-plate-grid .pr-card.is-selected,
body.light-mode #print-request-root #pr-nozzle-grid .pr-card.is-selected {
    background: #fff9eb !important;
    border-color: var(--accent-color) !important;
    box-shadow:
        0 0 0 2px rgba(233, 166, 36, 0.7),
        0 10px 30px rgba(15, 23, 42, 0.12) !important;
}

/* aktiver Chip im Light-Mode: gelb mit weißer Schrift */
body.light-mode .pr-panel-dialog .pr-chip-row button.is-active,
body.light-mode .pr-panel-dialog .pr-chip-row .pr-chip.is-active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #ffffff !important;
}

/* =========================================================
   DARK-MODE: UPLOAD-BEREICH / DROPZONE
   ========================================================= */
body:not(.light-mode) #print-request-root .pr-upload-wrapper {
    color: var(--ws-text) !important;
}

body:not(.light-mode) #print-request-root .pr-dropzone {
    position: relative;
    border-radius: 0.75rem !important;
    border: 2px dashed rgba(255, 255, 255, 0.25) !important;
    background: color-mix(in srgb, var(--secondary-bg-color) 90%, #000 10%) !important;
    padding: 0.9rem 1rem !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body:not(.light-mode) #print-request-root .pr-dropzone:hover {
    background: color-mix(in srgb, var(--secondary-bg-color) 75%, #000 25%) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent-color) 50%, #0000) inset !important;
}

body:not(.light-mode) #print-request-root .pr-drop-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body:not(.light-mode) #print-request-root .pr-drop-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

body:not(.light-mode) #print-request-root .pr-drop-text span {
    display: block;
}

body:not(.light-mode) #print-request-root .pr-drop-text [data-translate="pr_drop_title"] {
    font-weight: 600;
    color: var(--ws-text) !important;
}

body:not(.light-mode) #print-request-root .pr-drop-sub {
    font-size: 0.85rem;
    color: var(--ws-text-muted) !important;
}

/* Datei-Name unter der Dropzone */
body:not(.light-mode) #print-request-root .pr-file-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--ws-text-muted) !important;
}

body:not(.light-mode) #print-request-root .pr-file-name {
    font-weight: 500;
    color: var(--ws-text) !important;
}

/* Unsichtbares File-Input */
body:not(.light-mode) #print-request-root .pr-file-input {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

/* =========================================================
   LIGHT-MODE: Ghost-Buttons (z. B. "Filament auswählen")
   ========================================================= */

body.light-mode #print-request-root .pr-btn.ghost {
    border: 1px solid #d1d5db !important;
    /* hellgrauer Rahmen */
    background: #ffffff !important;
    /* weißer Hintergrund */
    color: #1c2433 !important;
    /* dunkler Text */
    border-radius: 999px !important;
    padding: 0.45rem 1.1rem !important;
    font-weight: 500 !important;
    transition: background .15s ease, border-color .15s ease;
}

body.light-mode #print-request-root .pr-btn.ghost:hover {
    background: #f3f4f6 !important;
    /* leichtes Hover-Grau */
    border-color: #c4c9d3 !important;
    /* etwas dunklerer Rahmen */
}

/* kleine Status-Badge hinter dem Dateinamen */
.pr-file-status {
    margin-left: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.pr-file-status::before {
    content: "✓";
    font-weight: 700;
}

/* Light-Mode etwas dunklere Schrift / Rahmen */
body.light-mode #print-request-root .pr-file-status {
    border-color: rgba(34, 197, 94, 0.7);
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.pr-file-status-error {
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

body.light-mode #print-request-root .pr-file-status-error {
    color: #b91c1c;
}

/* Quelle-Karten fixen – gleiche Höhe egal bei welcher Sprache */
.pr-source-card {
    display: flex;
}

.pr-source-card-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: auto;
    /* Wichtig */
    min-height: 90px;
    /* Optional, sorgt für Einheitlichkeit */
    box-sizing: border-box;
    /* verhindert Rahmen-Überlauf */
}

/* Textblock korrekt ausrichten */
.pr-source-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Falls der Icon-Kreis höher ist als der Text */
.pr-source-icon {
    flex-shrink: 0;
}

/* Standard: ausgeblendet (macht JS ohnehin auch) */
#pr-filament-hint {
    display: none;
}

/* Wenn JS data-active setzt -> sichtbare, gelbe Box */
#pr-filament-hint[data-active="1"] {
    display: block;
    /* oder inline-block, wie du magst */
    /* hier dein altes Highlight-Design hin */
    background: #f3b742;
    color: #000;
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, .2);
}

/* ==== Sticky-Suche / Chips in den Auswahl-Panels ==== */

/* Panels scollen selbst */
#filament-panel,
#plate-panel,
#nozzle-panel {
    overflow-y: auto;
}

/* Filament: Suchfeld oben fest */
#pr-fil-q {
    position: sticky;
    top: 0;
    z-index: 20;
    background: inherit;
    /* übernimmt Panel-Hintergrund */
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Filament: Material-Chips direkt unter der Suche fest */
#pr-fil-chips {
    position: sticky;
    top: 56px;
    /* Abstand passend zur Höhe des Suchfelds */
    z-index: 19;
    background: inherit;
    padding-bottom: 8px;
}

/* Plates / Nozzles: nur Suchfeld sticky */
#pr-plate-q,
#pr-nozzle-q {
    position: sticky;
    top: 0;
    z-index: 20;
    background: inherit;
    padding-top: 8px;
    padding-bottom: 8px;
}

.pr-panel-dialog {
    transition: transform 0.22s ease-out, opacity 0.22s ease-out;
    will-change: transform;
}

/* Toolbar im Filament-Panel klebt oben */
.pr-panel-dialog-body--filament .pr-filament-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 8px 16px 10px;
    margin: 0 -16px 8px;
    background: #18191d;
    /* oder deine Panel-Farbe */
}

/* Suchzeile */
.pr-filament-search-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Chips-Zeile */
.pr-filament-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* optional: kleiner Trenner unter der Toolbar */
.pr-panel-dialog-body--filament .pr-filament-toolbar::after {
    content: "";
    display: block;
    margin-top: 8px;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

/* Chip-Container */
#filament-panel .pr-filament-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Einzelne Filter-Chips */
#filament-panel .pr-filament-chips-row .pr-chip {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #22242a;
    color: #e6e6e6;

    padding: 6px 12px;
    border-radius: 999px;

    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

#filament-panel .pr-filament-chips-row .pr-chip:hover {
    background: #2a2d35;
    border-color: rgba(255, 255, 255, 0.22);
}

#filament-panel .pr-filament-chips-row .pr-chip.is-active {
    background: linear-gradient(180deg, #ffcc4d, #ffb300);
    color: #1a1a1a;
    border-color: transparent;
    font-weight: 600;
}

#filament-panel .pr-filament-chips-row .pr-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 204, 77, 0.35);
}

/* Header ohne Abstand nach unten */
#filament-panel .pr-panel-dialog-header {
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Toolbar sauber direkt unter Header */
#filament-panel .pr-panel-toolbar {
    padding: 12px 16px 8px;
    background: #1c1f25;
}

/* Filament-Panel: keinen Abstand zwischen Header und Suchzeile */
#filament-panel .pr-panel-dialog-body--filament {
    padding-top: 0;
    /* war 0.75rem über die generische Regel */
}

/* =========================================================
   LIGHT MODE – FILAMENT PANEL (Popup)
   ========================================================= */

body.light-mode #filament-panel .pr-panel-dialog {
    background: #ffffff !important;
    color: #111827 !important;
}

/* Header */
body.light-mode #filament-panel .pr-panel-dialog-header {
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* ===== Toolbar (Suche + Chips) ===== */
body.light-mode #filament-panel .pr-filament-toolbar {
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* Suchfeld */
body.light-mode #filament-panel #pr-fil-q {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #dfe3ea !important;
}

body.light-mode #filament-panel #pr-fil-q::placeholder {
    color: #6b7280 !important;
}

/* ===== Chips ===== */
body.light-mode #filament-panel .pr-filament-chips-row .pr-chip {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    color: #1c2433 !important;
}

body.light-mode #filament-panel .pr-filament-chips-row .pr-chip:hover {
    background: #f3f4f6 !important;
    border-color: #cbd5e1 !important;
}

/* aktiver Chip */
body.light-mode #filament-panel .pr-filament-chips-row .pr-chip.is-active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #111111 !important;
    font-weight: 600;
}

/* ===== Karten ===== */
body.light-mode #filament-panel #pr-fil-grid .pr-card {
    background: #ffffff !important;
    border-color: #dfe3ea !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

body.light-mode #filament-panel #pr-fil-grid .pr-card:hover {
    background: #f8fafc !important;
}

/* ausgewählte Karte */
body.light-mode #filament-panel #pr-fil-grid .pr-card.is-selected {
    background: #fff9eb !important;
    border-color: var(--accent-color) !important;
    box-shadow:
        0 0 0 2px rgba(233, 166, 36, 0.7),
        0 10px 30px rgba(15, 23, 42, 0.12) !important;
}

/* Bild-Container */
body.light-mode #filament-panel .pr-card-image {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

/* Texte */
body.light-mode #filament-panel .pr-card-title {
    color: #111827 !important;
}

body.light-mode #filament-panel .pr-card-meta {
    color: #6b7280 !important;
}

/* =========================================================
   FILTER-CHIPS – AKTIVER STATUS (LIGHT + DARK MODE)
   ========================================================= */

/* === LIGHT MODE: aktiver Chip → weiße Schrift === */
body.light-mode #filament-panel .pr-filament-chips-row .pr-chip.is-active {
    color: #ffffff !important;
    font-weight: 600;
}

/* === DARK MODE: aktiver Chip → dunkle Schrift === */
body:not(.light-mode) #filament-panel .pr-filament-chips-row .pr-chip.is-active {
    background: linear-gradient(180deg, #ffcc4d, #ffb300) !important;
    border-color: transparent !important;
    color: #1a1a1a !important;
    font-weight: 600;
}

/* optional: Fokus-Ring für Keyboard-Navigation */
#filament-panel .pr-filament-chips-row .pr-chip.is-active:focus-visible {
    outline: none;
}

/* =========================================================
   DARK MODE FIX – Filament-Panel Toolbar (Search + Chips)
   ========================================================= */

/* Gemeinsamer Hintergrund wie Dialog */
body:not(.light-mode) #filament-panel .pr-panel-dialog {
    background: #1c1f25 !important;
}

/* Toolbar (Suchfeld + Chips) */
body:not(.light-mode) #filament-panel .pr-filament-toolbar {
    background: #1c1f25 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Suchfeld */
body:not(.light-mode) #filament-panel input[type="search"] {
    background: #22252c !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e6e6e6 !important;
}

body:not(.light-mode) #filament-panel input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* Chips – inaktiv */
body:not(.light-mode) #filament-panel .pr-filament-chips-row .pr-chip {
    background: #22252c !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e6e6e6 !important;
}

/* Chips – Hover */
body:not(.light-mode) #filament-panel .pr-filament-chips-row .pr-chip:hover {
    background: #2a2e36 !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

/* Chips – aktiv (behält dein Gelb) */
body:not(.light-mode) #filament-panel .pr-filament-chips-row .pr-chip.is-active {
    background: linear-gradient(180deg, #ffcc4d, #ffb300) !important;
    border-color: transparent !important;
    color: #1a1a1a !important;
    font-weight: 600;
}

/* optional: dezenter Trenner unter Toolbar */
body:not(.light-mode) #filament-panel .pr-filament-toolbar::after {
    background: rgba(255, 255, 255, 0.06) !important;
}