/* =============================================================================
   Messe-Prototyp – Tec Faktura Look & Feel
   ========================================================================== */

:root {
    --tf-bg:        #f5f5f7;
    --tf-text:      #505050;
    --tf-text-dark: #202020;
    --tf-muted:     #888888;
    --tf-border:    #e5e5e8;
    --tf-card-bg:   #ffffff;

    --tf-primary:       #30307f;       /* navy-purple from rgb(48,48,127) */
    --tf-primary-hover: #262665;
    --tf-link:          #6070f6;
    --tf-success:       #2ecc71;
    --tf-danger:        #e74c3c;
    --tf-warning:       #f5a623;

    --tf-top-bar-bg:    #0e1b30;       /* very dark navy */
    --tf-top-bar-text:  #c9d3e0;
    --tf-sub-bar-bg:    #ffffff;
    --tf-sub-bar-active:#0e1b30;

    --tf-radius: 4px;
    --tf-shadow: 0 1px 2px rgba(0,0,0,.04);
    --tf-shadow-md: 0 2px 6px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--tf-bg);
    color: var(--tf-text);
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

a { color: var(--tf-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- TYRE24 top utility bar ----- */
.tyre24-bar {
    background: var(--tf-top-bar-bg);
    color: var(--tf-top-bar-text);
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    font-size: 11px;
    gap: 18px;
}
.tyre24-bar .logo {
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
}
.tyre24-bar .logo small { font-weight: 400; opacity: .7; font-size: 9px; }
.tyre24-bar .links {
    display: flex;
    gap: 14px;
    flex: 1;
    justify-content: center;
}
.tyre24-bar .links a { color: var(--tf-top-bar-text); }
.tyre24-bar .links a.active { color: #fff; font-weight: 600; }
.tyre24-bar .links a.has-new::after {
    content: " NEW";
    background: #ff3b30;
    color: #fff;
    border-radius: 2px;
    font-size: 9px;
    padding: 1px 4px;
    margin-left: 3px;
}
.tyre24-bar .right {
    display: flex;
    gap: 18px;
}
.tyre24-bar .right a { color: var(--tf-top-bar-text); }
.tyre24-bar .right select {
    background: transparent;
    color: var(--tf-top-bar-text);
    border: 0;
    font-size: 11px;
}

/* ----- Section nav (eBusiness, Kassensystem etc.) ----- */
.section-nav {
    background: #fff;
    border-bottom: 1px solid var(--tf-border);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.section-nav a {
    color: #5a6677;
    padding: 0 22px;
    line-height: 36px;
    font-size: 12px;
    border-bottom: 2px solid transparent;
}
.section-nav a.active {
    color: var(--tf-text-dark);
    font-weight: 700;
}

/* ----- Main brand + nav bar (TEC FAKTURA + Dashboard, Kunden,…) ----- */
.brand-nav {
    background: #fff;
    border-bottom: 1px solid var(--tf-border);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand-nav .brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-nav .brand-logo {
    font-weight: 800;
    font-size: 17px;
    color: var(--tf-primary);
    letter-spacing: .3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.brand-nav .brand-logo .erp {
    color: var(--tf-text);
    font-weight: 500;
    font-size: 13px;
    border-left: 1px solid var(--tf-border);
    padding-left: 8px;
}
.brand-nav .mandant {
    font-size: 11px;
    color: var(--tf-muted);
    line-height: 1.2;
}
.brand-nav .mandant strong { color: var(--tf-text-dark); font-size: 13px; font-weight: 600; }

.brand-nav .main-menu {
    display: flex;
    gap: 0;
    margin-left: auto;
    margin-right: 22px;
}
.brand-nav .main-menu a {
    color: var(--tf-text);
    padding: 0 16px;
    line-height: 64px;
    font-size: 13px;
    position: relative;
}
.brand-nav .main-menu a.active {
    color: var(--tf-primary);
    font-weight: 600;
}
.brand-nav .main-menu a.active::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px;
    bottom: 0;
    height: 3px;
    background: var(--tf-primary);
    border-radius: 2px 2px 0 0;
}

.brand-nav .icons {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-nav .icons .icon-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tf-text);
    background: transparent;
    border: 1px solid var(--tf-border);
}
.brand-nav .icons .icon-btn:hover { background: #f0f0f3; }

/* ----- Page layout ----- */
.page {
    padding: 18px 22px 60px;
}
.row-flex {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.col-sidebar {
    width: 220px;
    flex-shrink: 0;
}
.col-warengruppen {
    width: 240px;
    flex-shrink: 0;
}
.col-main {
    flex: 1;
    min-width: 0;
}

/* ----- Cards ----- */
.card {
    background: var(--tf-card-bg);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow);
}
.card-body { padding: 16px; }
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--tf-text-dark);
    margin: 0 0 12px;
}

/* ----- Sidebar menu ----- */
.sidebar-menu .group-title {
    font-size: 11px;
    color: var(--tf-muted);
    text-transform: none;
    padding: 12px 16px 6px;
    border-top: 1px solid var(--tf-border);
}
.sidebar-menu .group-title:first-child { border-top: 0; padding-top: 0; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    color: var(--tf-text);
    font-size: 13px;
    border-left: 3px solid transparent;
}
.sidebar-menu a:hover { background: #f7f7fa; text-decoration: none; }
.sidebar-menu a.active {
    background: var(--tf-primary);
    color: #fff;
    border-left-color: var(--tf-primary-hover);
    font-weight: 500;
}
.sidebar-menu a.disabled { color: #c0c0c5; pointer-events: none; }
.sidebar-menu i { width: 16px; text-align: center; }

/* ----- Warengruppen tree ----- */
.warengruppen .wg-title {
    padding: 14px 16px 8px;
    font-size: 15px;
    color: var(--tf-text-dark);
    font-weight: 600;
}
.warengruppen .wg-root {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--tf-text-dark);
    border-top: 1px solid var(--tf-border);
}
.warengruppen .wg-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    color: var(--tf-text);
    border-top: 1px solid var(--tf-border);
    cursor: pointer;
}
.warengruppen .wg-item:hover { background: #f7f7fa; }
.warengruppen .wg-item .toggle {
    color: var(--tf-muted);
    width: 14px;
    text-align: center;
}

/* ----- Search bar ----- */
.search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}
.search-bar .search-input {
    flex: 1;
    height: 38px;
    border: 1px solid var(--tf-border);
    background: #fff;
    border-radius: var(--tf-radius);
    padding: 0 14px;
    font-size: 13px;
    color: var(--tf-text-dark);
    box-shadow: var(--tf-shadow);
}
.search-bar .search-input:focus {
    outline: 0;
    border-color: var(--tf-primary);
}
.search-bar .btn-icon {
    width: 38px; height: 38px;
    border: 1px solid var(--tf-border);
    background: #fff;
    border-radius: var(--tf-radius);
    color: var(--tf-text);
    box-shadow: var(--tf-shadow);
    position: relative;
}
.search-bar .btn-icon .badge-dot {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--tf-primary);
    color: #fff;
    border-radius: 10px;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    padding: 0 4px;
}
.search-bar .btn-vehicle {
    height: 38px;
    border: 1px solid var(--tf-border);
    background: #fff;
    border-radius: var(--tf-radius);
    color: var(--tf-text-dark);
    padding: 0 14px;
    box-shadow: var(--tf-shadow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}
.search-bar .btn-vehicle:hover {
    background: var(--tf-primary);
    color: #fff;
    border-color: var(--tf-primary);
}
.search-bar .btn-vehicle .soon {
    font-style: italic;
    color: var(--tf-muted);
    font-size: 11px;
}
.search-bar .btn-vehicle:hover .soon { color: rgba(255,255,255,.7); }

/* ----- Buttons ----- */
.btn-tf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 14px;
    border-radius: var(--tf-radius);
    border: 1px solid transparent;
    background: transparent;
    font-size: 12px;
    color: var(--tf-text);
    cursor: pointer;
    gap: 6px;
    transition: background .12s ease, color .12s ease;
}
.btn-tf-primary {
    background: var(--tf-primary);
    color: #fff;
    border-color: var(--tf-primary);
}
.btn-tf-primary:hover { background: var(--tf-primary-hover); color: #fff; }
.btn-tf-outline {
    border: 1px solid var(--tf-border);
    background: #fff;
    color: var(--tf-text-dark);
}
.btn-tf-outline:hover { background: #f7f7fa; }
.btn-tf-danger { background: var(--tf-danger); color: #fff; border-color: var(--tf-danger); }
.btn-tf-sm { height: 26px; padding: 0 10px; font-size: 11px; }
.btn-tf-lg { height: 38px; padding: 0 18px; font-size: 13px; }
.btn-tf-block { width: 100%; }

/* ----- Article list table ----- */
.results-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.results-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tf-text-dark);
    margin: 0;
}
.results-header .count {
    font-size: 12px;
    color: var(--tf-muted);
}
.filter-chips {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.filter-chip {
    background: #f0f0f3;
    border: 1px solid var(--tf-border);
    border-radius: 16px;
    padding: 4px 8px 4px 12px;
    font-size: 12px;
    color: var(--tf-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-chip .remove {
    background: var(--tf-muted);
    color: #fff;
    border-radius: 50%;
    width: 16px; height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 11px;
    cursor: pointer;
}

.tbl-articles {
    width: 100%;
    border-collapse: collapse;
}
.tbl-articles th {
    text-align: left;
    font-weight: 500;
    color: var(--tf-text);
    font-size: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--tf-border);
}
.tbl-articles th .sort { color: var(--tf-link); cursor: pointer; }
.tbl-articles td {
    padding: 14px 8px;
    border-bottom: 1px solid var(--tf-border);
    font-size: 12px;
    vertical-align: top;
}
.tbl-articles tr:hover td { background: #fafafd; }
.tbl-articles .col-img img,
.tbl-articles .col-img .ph-img {
    width: 48px; height: 48px;
    background: #ebebf0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tf-primary);
    font-size: 18px;
}
.tbl-articles .price { font-weight: 500; color: var(--tf-text-dark); }
.tbl-articles .price small { color: var(--tf-muted); font-weight: 400; }
.tbl-articles .stock-no {
    background: var(--tf-danger);
    color: #fff;
    border-radius: 50%;
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
.tbl-articles .stock-yes { color: var(--tf-text-dark); font-weight: 600; }
.tbl-articles .stock-source {
    background: #fff3d6;
    color: #8a6d11;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 10px;
    display: inline-block;
    margin-top: 2px;
}
.tbl-articles .action-btn {
    color: var(--tf-link);
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* Imported rows (from vehicle search) */
.tbl-articles tr.imported-header-row td {
    background: linear-gradient(to right, #e8f8ed, #f5fbf7);
    border-top: 2px solid var(--tf-success);
    border-bottom: 1px solid var(--tf-success);
    color: var(--tf-success);
    font-weight: 600;
    font-size: 12px;
    padding: 8px 10px;
}
.tbl-articles tr.imported-header-row td i {
    margin-right: 6px;
}
.tbl-articles tr.imported-row td {
    background: #f8fdf9;
    border-bottom: 1px solid #e0f0e4;
}
.tbl-articles tr.imported-row:hover td {
    background: #f0f9f3;
}
.imported-badge {
    display: inline-block;
    background: var(--tf-success);
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

/* ----- "How does it work" search hints ----- */
.search-hints { margin-top: 22px; }
.search-hints h3 {
    font-size: 17px;
    color: var(--tf-text-dark);
    margin: 0 0 6px;
    font-weight: 600;
}
.search-hints .lead {
    margin: 0 0 18px;
    color: var(--tf-text);
}
.search-hints .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.search-hints .col h4 {
    color: var(--tf-primary);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
}
.search-hints .col strong {
    color: var(--tf-text-dark);
    display: block;
    margin-top: 8px;
}
.search-hints .col .ex {
    color: var(--tf-text);
    font-size: 12px;
}
.search-hints .col .coming-soon {
    color: var(--tf-danger);
    font-weight: 600;
    font-style: italic;
}

/* ----- Article detail ----- */
.article-head {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.article-head .article-img {
    width: 140px; height: 140px;
    background: #ebebf0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tf-primary);
    font-size: 48px;
    flex-shrink: 0;
}
.article-head .article-img img { max-width: 100%; max-height: 100%; }
.article-head .article-info { flex: 1; }
.article-head h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--tf-text-dark);
    margin: 0 0 4px;
}
.article-head .desc { color: var(--tf-text); margin-bottom: 8px; }
.article-head .meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
    font-size: 12px;
}
.article-head .meta dt { color: var(--tf-text); font-weight: 400; }
.article-head .meta dd { color: var(--tf-text-dark); margin: 0; font-weight: 500; }
.article-head .img-delete {
    background: var(--tf-danger);
    color: #fff;
    border: 0;
    padding: 5px 12px;
    border-radius: 2px;
    font-size: 11px;
    margin-top: 8px;
    cursor: pointer;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--tf-text-dark);
    margin: 22px 0 14px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
.form-row .col { display: flex; flex-direction: column; }
.form-row label, .form-label {
    font-size: 11px;
    color: var(--tf-text);
    margin-bottom: 4px;
}
.form-control {
    height: 32px;
    border: 1px solid var(--tf-border);
    background: #fff;
    border-radius: var(--tf-radius);
    padding: 0 10px;
    font-size: 12px;
    color: var(--tf-text-dark);
}
select.form-control { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6' fill='%23888'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; }
textarea.form-control { min-height: 86px; padding: 8px 10px; }
.form-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tf-text-dark); margin-right: 18px; }

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.detail-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 11px;
    color: var(--tf-muted);
}

/* ----- Footer ----- */
.app-footer {
    background: #fff;
    border-top: 1px solid var(--tf-border);
    padding: 10px 22px;
    font-size: 11px;
    color: var(--tf-muted);
    display: flex;
    justify-content: space-between;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 5;
}
.page { padding-bottom: 60px; }

/* =============================================================================
   Vehicle Search Modal
   ========================================================================== */

.tf-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 27, 48, 0.55);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 20px;
    overflow-y: auto;
}
.tf-modal-backdrop.show { display: flex; }

.tf-modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    width: 100%;
    max-width: 1120px;
    overflow: hidden;
}
/* Im BOM-Schritt darf die Modalbox bis zur Bildbreite + Tabellenbreite wachsen,
   aber nie größer als der Viewport. Andere Schritte bleiben kompakt. */
.tf-modal:has(#vin-step-bom[style*="block"]) {
    max-width: min(1280px, calc(100vw - 30px));
}
.tf-modal-header {
    background: var(--tf-primary);
    color: #fff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tf-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex; align-items: center; gap: 10px;
}
.tf-modal-header .close-btn {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.tf-modal-body { padding: 0; }
.tf-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--tf-border);
    background: #fafafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.tf-modal-footer .selected-info { color: var(--tf-text); font-size: 12px; }
.tf-modal-footer .selected-info strong { color: var(--tf-primary); }

/* --- Modal stepper --- */
.tf-stepper {
    display: flex;
    background: #fafafc;
    border-bottom: 1px solid var(--tf-border);
    padding: 0 22px;
}
.tf-stepper .step {
    padding: 14px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tf-muted);
    font-size: 13px;
    border-bottom: 3px solid transparent;
    margin-right: 28px;
}
.tf-stepper .step .num {
    width: 22px; height: 22px;
    background: #e5e5e8;
    color: var(--tf-text);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}
.tf-stepper .step.active {
    color: var(--tf-primary);
    border-bottom-color: var(--tf-primary);
    font-weight: 600;
}
.tf-stepper .step.active .num {
    background: var(--tf-primary);
    color: #fff;
}
.tf-stepper .step.done .num {
    background: var(--tf-success);
    color: #fff;
}
.tf-stepper .step.done { color: var(--tf-text-dark); }

/* --- Modal panels --- */
.tf-panel { padding: 22px; min-height: 460px; }
.tf-panel.hidden { display: none; }

/* Tabs (VIN / HSN-TSN / Manuell) */
.tf-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--tf-border);
}
.tf-tabs .tab {
    padding: 10px 16px;
    cursor: pointer;
    color: var(--tf-text);
    font-size: 13px;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tf-tabs .tab.active {
    color: var(--tf-primary);
    border-bottom-color: var(--tf-primary);
    font-weight: 600;
}
.tf-tabs .tab .placeholder-flag {
    background: var(--tf-warning);
    color: #fff;
    border-radius: 8px;
    font-size: 9px;
    padding: 1px 5px;
    margin-left: 4px;
}

.tf-tab-content { display: none; }
.tf-tab-content.active { display: block; }

.input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.input-row .form-control { flex: 1; height: 38px; font-size: 14px; }
.input-row .btn-tf { height: 38px; padding: 0 22px; font-size: 13px; }

.hint-text {
    color: var(--tf-muted);
    font-size: 11px;
    margin-bottom: 6px;
}
.example-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.example-pill {
    background: #f0f0f3;
    border: 1px solid var(--tf-border);
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    color: var(--tf-text);
}
.example-pill:hover { background: var(--tf-primary); color: #fff; border-color: var(--tf-primary); }

/* Manual selection (Marke -> Modell -> Typ) */
.manual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}
.manual-col h5 {
    font-size: 12px;
    margin: 0 0 8px;
    color: var(--tf-text);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.manual-list {
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    background: #fff;
    height: 320px;
    overflow-y: auto;
}
.manual-list .item {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f3;
    cursor: pointer;
    font-size: 12px;
    color: var(--tf-text-dark);
}
.manual-list .item:hover { background: #f7f7fa; }
.manual-list .item.active {
    background: var(--tf-primary);
    color: #fff;
}
.manual-list .item small { display: block; color: var(--tf-muted); font-size: 10px; }
.manual-list .item.active small { color: rgba(255,255,255,.8); }
.manual-list .empty { padding: 22px 12px; text-align: center; color: var(--tf-muted); font-size: 12px; }

/* Vehicle found banner */
.vehicle-banner {
    background: #f0f0fd;
    border: 1px solid var(--tf-primary);
    border-left: 4px solid var(--tf-primary);
    padding: 14px 18px;
    border-radius: var(--tf-radius);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.vehicle-banner .info strong { color: var(--tf-primary); }
.vehicle-banner .meta { font-size: 11px; color: var(--tf-muted); }

/* Category tree (step 2) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}
.cat-card {
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    background: #fff;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all .12s ease;
}
.cat-card:hover {
    border-color: var(--tf-primary);
    box-shadow: 0 2px 8px rgba(48,48,127,.12);
}
.cat-card .cat-icon {
    width: 42px; height: 42px;
    background: #f0f0fd;
    color: var(--tf-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.cat-card .cat-name {
    font-weight: 500;
    color: var(--tf-text-dark);
    font-size: 13px;
}
.cat-card .cat-sub {
    font-size: 11px;
    color: var(--tf-muted);
}
.cat-card.active {
    border-color: var(--tf-primary);
    background: #f5f5fb;
}

.breadcrumb-cat {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--tf-muted);
}
.breadcrumb-cat a { color: var(--tf-link); cursor: pointer; }
.breadcrumb-cat .sep { color: var(--tf-muted); }

/* Products step */
.products-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.products-bar .left { display: flex; align-items: center; gap: 14px; }
.products-bar h4 { margin: 0; font-size: 14px; }
.products-bar .count { color: var(--tf-muted); font-size: 12px; }
.products-bar .right { display: flex; align-items: center; gap: 10px; }
.products-bar .right .form-control { height: 30px; font-size: 12px; }

.product-list {
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    background: #fff;
    max-height: 540px;
    overflow-y: auto;
}
.product-row {
    border-bottom: 1px solid #f0f0f3;
}
.product-row:hover .product-row-main { background: #fafafd; }
.product-row.selected .product-row-main { background: #f5f5fb; }
.product-row-main {
    display: grid;
    grid-template-columns: 28px 70px 2.4fr 1.1fr 1.2fr 1fr 30px;
    gap: 14px;
    padding: 12px 14px;
    align-items: center;
    cursor: pointer;
}
.product-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--tf-primary);
}
.product-row .p-img {
    width: 64px; height: 64px;
    background: #ebebf0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tf-primary);
    overflow: hidden;
}
.product-row .p-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-row .p-main { min-width: 0; }
.product-row .p-title { font-size: 13px; color: var(--tf-text-dark); font-weight: 500; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.product-row .p-meta { font-size: 11px; color: var(--tf-muted); margin-top: 4px; }
.product-row .p-meta strong { color: var(--tf-text); font-weight: 600; }
.product-row .p-brand { font-weight: 600; color: var(--tf-text-dark); font-size: 12px; }
.product-row .p-brand small { display: block; color: var(--tf-muted); font-weight: 400; }
.product-row .p-brand .delivery-dots { margin-top: 4px; display: flex; gap: 4px; }
.product-row .p-brand .delivery-dots span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 4px;
    background: #f0f0f3;
    color: var(--tf-text);
    font-size: 10px;
}
.product-row .p-brand .dot-truck   { background: #e1f0ff; color: #0a5db6; }
.product-row .p-brand .dot-package { background: #fff3d6; color: #8a6d11; }
.product-row .p-brand .dot-pickup  { background: #e8f8ed; color: #1a7d3a; }
.product-row .p-price { text-align: right; }
.product-row .p-price .v { font-weight: 600; color: var(--tf-text-dark); font-size: 13px; }
.product-row .p-price small { display: block; color: var(--tf-muted); font-size: 10px; }
.product-row .p-price .strike-on-hover { text-decoration: line-through; }
.product-row .p-stock { text-align: center; }
.product-row .p-stock small { display: block; color: var(--tf-muted); font-size: 10px; margin-top: 4px; }
.product-row .stock-pill {
    background: var(--tf-success);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    white-space: nowrap;
}
.product-row .stock-pill.low { background: var(--tf-warning); }
.product-row .stock-pill.no { background: var(--tf-danger); }
.product-row .p-expand-btn {
    width: 28px; height: 28px;
    border: 1px solid var(--tf-border);
    background: #fff;
    border-radius: 4px;
    color: var(--tf-text);
    cursor: pointer;
    font-size: 11px;
}
.product-row .p-expand-btn:hover { background: var(--tf-primary); color: #fff; border-color: var(--tf-primary); }
.product-row .p-expand-btn i { transition: transform .2s ease; }

/* Product flags */
.prod-flag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.prod-flag.flag-reman { background: #e1f0ff; color: #0a5db6; }
.prod-flag.flag-cert  { background: #fff3d6; color: #8a6d11; }
.prod-flag.flag-rec   { background: #e8f8ed; color: #1a7d3a; }
.prod-flag.flag-promo { background: #fde2d7; color: #b6450a; }

/* Expanded details panel */
.product-row-details {
    background: #fafafd;
    border-top: 1px solid var(--tf-border);
    padding: 16px 22px 18px;
}
.detail-gallery {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.detail-gallery img {
    width: 90px; height: 90px;
    object-fit: contain;
    border: 1px solid var(--tf-border);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
}
.detail-section {
    margin-bottom: 16px;
}
.detail-section h5 {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--tf-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 24px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 4px;
    font-size: 12px;
}
.detail-meta strong { color: var(--tf-text); margin-right: 4px; }
.attr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 14px;
}
.attr-cell {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 4px;
    font-size: 12px;
}
.attr-cell .k { color: var(--tf-muted); }
.attr-cell .v { color: var(--tf-text-dark); font-weight: 500; text-align: right; }
.oe-group {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.8;
}
.oe-group strong {
    color: var(--tf-text-dark);
    margin-right: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.oe-chip {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 3px;
    padding: 2px 7px;
    font-size: 11px;
    color: var(--tf-text-dark);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    margin-right: 4px;
}
.detail-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 4px;
    overflow: hidden;
}
.detail-table th {
    background: #f0f0f3;
    text-align: left;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--tf-text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.detail-table td {
    padding: 6px 10px;
    font-size: 12px;
    color: var(--tf-text-dark);
    border-top: 1px solid #f0f0f3;
}
.detail-table tr:hover td { background: #fafafd; }

/* Loading + empty states */
.tf-loading {
    text-align: center;
    color: var(--tf-muted);
    padding: 40px 0;
    font-size: 13px;
}
.tf-loading .spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--tf-border);
    border-top-color: var(--tf-primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tf-empty {
    text-align: center;
    padding: 40px 22px;
    color: var(--tf-muted);
}
.tf-empty i { font-size: 36px; color: var(--tf-border); margin-bottom: 12px; }
.tf-error {
    background: #fdecea;
    border-left: 4px solid var(--tf-danger);
    color: #6a1b13;
    padding: 12px 14px;
    border-radius: var(--tf-radius);
    margin-bottom: 14px;
    font-size: 12px;
}

/* =============================================================================
   VIN / YQ-Katalog Flow
   ========================================================================== */

#vin-step-vehicle, #vin-step-subcategory, #vin-step-bom { animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.yq-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.yq-result-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--tf-text-dark);
    font-weight: 600;
}

.yq-vehicle-card {
    background: #f5f7ff;
    border: 1px solid #c8d2f0;
    border-radius: 6px;
    padding: 0;
    margin-bottom: 14px;
    overflow: hidden;
}
/* Collapsible card — head is a clickable button strip,
   body slides open/closed via max-height. */
.yq-vehicle-card.collapsible .yq-vehicle-head {
    width: 100%;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    color: inherit;
    text-align: left;
    transition: background .15s;
}
.yq-vehicle-card.collapsible .yq-vehicle-head:hover { background: #eaf0ff; }
.yq-vehicle-headline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.yq-vehicle-head-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.yq-vin-inline {
    font-size: 11px;
    color: var(--tf-muted);
    margin-left: 4px;
}
.yq-vin-inline .vin-mono {
    color: var(--tf-text-dark);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 600;
}
.yq-chev {
    transition: transform .25s;
    color: var(--tf-muted);
    font-size: 14px;
}
.yq-vehicle-card.collapsed .yq-chev { transform: rotate(-90deg); }
.yq-vehicle-body {
    padding: 0 14px 14px 14px;
    max-height: 600px;
    transition: max-height .3s ease, padding .25s ease, opacity .2s ease;
    overflow: hidden;
    opacity: 1;
}
.yq-vehicle-card.collapsed .yq-vehicle-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.yq-vehicle-head .yq-badge {
    background: #3478f6;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
}
.yq-vehicle-head .yq-title {
    color: var(--tf-text-dark);
    font-size: 15px;
    font-weight: 700;
}
.yq-vehicle-head .yq-status {
    background: #3478f6;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.yq-field-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.yq-field {
    background: #fff;
    border: 1px solid #e0e7f5;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 44px;
}
.yq-field .k {
    font-size: 11px;
    color: var(--tf-muted);
    font-weight: 600;
}
.yq-field .v {
    font-size: 12px;
    color: var(--tf-text-dark);
    word-break: break-word;
}
.yq-system-props {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #c8d2f0;
}
.yq-section-label {
    font-size: 13px;
    color: #3478f6;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}
.yq-prop {
    font-size: 12px;
    margin-bottom: 4px;
}
.yq-prop .k { color: var(--tf-muted); font-weight: 600; margin-right: 6px; }
.yq-prop .v { color: var(--tf-text-dark); }

/* Catalog navigation box */
.yq-catalog {
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 6px;
    overflow: hidden;
}
/* Catalog-Header (blauer Streifen) — Höhe ~30% reduziert. */
.yq-catalog-header {
    background: #3478f6;
    color: #fff;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}
.yq-catalog-header .btn-tf { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }
.yq-catalog-header .btn-tf:hover { background: rgba(255,255,255,.25); }
.yq-catalog-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.yq-catalog-body { padding: 18px; }
/* Im BOM-Schritt knapper, damit das Bild näher am Breadcrumb sitzt. */
.yq-catalog-body-bom { padding: 10px 14px 14px; }
.yq-catalog-body-bom .yq-breadcrumb { margin-bottom: 6px; }

.yq-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.yq-toggle-btn {
    border: 1px solid var(--tf-border);
    background: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--tf-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.yq-toggle-btn.active {
    background: #3478f6;
    color: #fff;
    border-color: #3478f6;
}

.yq-breadcrumb {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--tf-text);
}
.yq-breadcrumb a { color: var(--tf-link); cursor: pointer; }
.yq-breadcrumb a:hover { text-decoration: underline; }
.yq-breadcrumb .sep { color: var(--tf-muted); }
.yq-breadcrumb strong { color: var(--tf-text-dark); }

.yq-grid {
    display: grid;
    gap: 10px;
}
.yq-grid-6 { grid-template-columns: repeat(6, 1fr); }

.yq-cat-card {
    background: #f5f7ff;
    border: 1px solid #d6e0f3;
    border-radius: 5px;
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tf-text-dark);
    text-align: left;
    min-height: 56px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
    position: relative;
}
.yq-cat-card:not(.yq-disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(52, 120, 246, .12);
    border-color: #3478f6;
}
.yq-cat-card.yq-disabled {
    color: #b0b8c8;
    background: #fafafd;
    border-style: dashed;
    cursor: not-allowed;
}

/* BOM layout — Zeichnung kompakt (~50% der "großen" Variante) */
.yq-bom-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 18px;
    align-items: start;
}
.yq-explosion {
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 6px;
    padding: 8px;
    min-height: 420px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Bild bleibt stehen, während die BOM-Liste rechts daneben scrollt */
    position: sticky;
    top: 0;
    align-self: start;
}
.yq-explosion svg { width: 100%; height: auto; max-height: 460px; }
/* Wrapper for the image + interactive SVG hotspot overlay */
.yq-explosion-wrap {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
    cursor: zoom-in;
}
.yq-explosion-wrap > img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    user-select: none;
}
.yq-explosion-wrap > svg.yq-hotspots {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;     /* svg itself doesn't intercept */
    overflow: visible;
}
.yq-explosion-wrap > svg.yq-hotspots rect.hot {
    fill: rgba(48, 48, 127, 0.04);
    stroke: rgba(48, 48, 127, 0.25);
    stroke-width: 1.5;
    rx: 3;
    pointer-events: all;       /* rects do react to hover/click */
    cursor: pointer;
    transition: fill .15s ease, stroke .15s ease, stroke-width .15s ease, filter .15s ease;
}
.yq-explosion-wrap > svg.yq-hotspots rect.hot:hover,
.yq-explosion-wrap > svg.yq-hotspots rect.hot.active {
    fill: rgba(48, 48, 127, 0.18);
    stroke: var(--tf-primary);
    stroke-width: 2.4;
    filter: drop-shadow(0 0 8px rgba(48, 48, 127, 0.55));
}
.yq-explosion-wrap > svg.yq-hotspots rect.hot.demo {
    stroke: #00a651;
    stroke-width: 2.4;
    fill: rgba(0, 166, 81, 0.10);
    animation: yqHotPulse 1.6s ease-in-out infinite;
}
.yq-explosion-wrap > svg.yq-hotspots rect.hot.demo.active,
.yq-explosion-wrap > svg.yq-hotspots rect.hot.demo:hover {
    fill: rgba(0, 166, 81, 0.28);
    filter: drop-shadow(0 0 10px rgba(0, 166, 81, 0.75));
}
@keyframes yqHotPulse {
    0%, 100% { stroke-opacity: .9; fill-opacity: .55; }
    50%      { stroke-opacity: 1;  fill-opacity: 1;   }
}
.yq-explosion-wrap > svg.yq-hotspots text.lbl {
    fill: var(--tf-primary);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 3;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity .15s ease;
}
.yq-explosion-wrap > svg.yq-hotspots rect.hot.active + text.lbl,
.yq-explosion-wrap > svg.yq-hotspots rect.hot.demo + text.lbl {
    opacity: 1;
}
/* Floating zoom button on the drawing */
.yq-zoom-btn {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(255,255,255,.95);
    border: 1px solid var(--tf-border);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tf-text-dark);
    cursor: pointer;
    z-index: 4;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.yq-zoom-btn:hover { background: var(--tf-primary); color: #fff; border-color: var(--tf-primary); }
.yq-zoom-hint {
    position: absolute;
    bottom: 14px; left: 14px;
    background: rgba(48,48,127,.92);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .25s ease;
}
.yq-explosion-wrap:hover .yq-zoom-hint { opacity: 1; transform: translateY(0); }

/* Tooltip that follows the mouse */
.yq-tooltip {
    position: fixed;
    z-index: 11000;
    background: rgba(20, 22, 40, 0.97);
    color: #fff;
    border-radius: 6px;
    padding: 10px 12px;
    min-width: 220px;
    max-width: 320px;
    font-size: 12px;
    line-height: 1.45;
    box-shadow: 0 8px 22px rgba(0,0,0,.28);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
}
.yq-tooltip.show { opacity: 1; transform: translateY(0); }
.yq-tooltip .tt-pos {
    display: inline-block;
    background: #00a651;
    color: #fff;
    padding: 1px 7px;
    border-radius: 3px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 700;
    font-size: 11px;
    margin-right: 6px;
}
.yq-tooltip .tt-oe {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 700;
    color: #ffd866;
}
.yq-tooltip .tt-name {
    margin-top: 4px;
    font-weight: 600;
    color: #fff;
}
.yq-tooltip .tt-row {
    margin-top: 4px;
    color: #b9c0d8;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.yq-tooltip .tt-row b { color: #fff; font-weight: 600; }
.yq-tooltip .tt-hint {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: 10.5px;
    color: #8e96b0;
}

/* Lightbox / zoom-overlay for the explosion drawing */
.yq-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 24, 0.92);
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    animation: yqLbFade .18s ease;
}
.yq-lightbox.show { display: flex; }
@keyframes yqLbFade { from {opacity:0;} to {opacity:1;} }
.yq-lightbox-inner {
    position: relative;
    width: min(95vw, 1500px);
    height: 92vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.yq-lightbox-head {
    padding: 10px 14px;
    border-bottom: 1px solid var(--tf-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f7f8fb;
    flex-shrink: 0;
}
.yq-lightbox-head h4 {
    margin: 0;
    font-size: 14px;
    color: var(--tf-text-dark);
}
.yq-lightbox-head .yq-lb-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}
.yq-lightbox-head .yq-lb-tools button {
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--tf-text-dark);
}
.yq-lightbox-head .yq-lb-tools button:hover { background: var(--tf-primary); color: #fff; border-color: var(--tf-primary); }

/* Schalter "Preise ausblenden" — kleiner iOS-Stil Toggle im Lightbox-Header */
.yq-lb-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 4px;
    user-select: none;
    font-size: 12px;
    color: var(--tf-text-dark);
    cursor: pointer;
}
.yq-lb-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.yq-lb-toggle-slider {
    position: relative;
    width: 34px;
    height: 18px;
    background: #d1d6e2;
    border-radius: 999px;
    transition: background .2s ease;
    flex-shrink: 0;
}
.yq-lb-toggle-slider::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .2s ease;
}
.yq-lb-toggle input:checked + .yq-lb-toggle-slider { background: var(--tf-primary); }
.yq-lb-toggle input:checked + .yq-lb-toggle-slider::after { transform: translateX(16px); }
.yq-lb-toggle-lbl { white-space: nowrap; }

/* Wenn der Schalter aktiv ist: alle Preis-Chips ausblenden,
   einzelne werden aber beim Hovern über den Hotspot eingeblendet. */
.yq-lightbox.prices-hidden .yq-lb-price {
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;
}
.yq-lightbox.prices-hidden svg.yq-hotspots rect.hot:hover + g.yq-lb-price,
.yq-lightbox.prices-hidden svg.yq-hotspots rect.hot.active + g.yq-lb-price {
    opacity: 1;
}
.yq-lightbox-stage {
    flex: 1;
    overflow: auto;
    background:
        linear-gradient(45deg, #f0f1f5 25%, transparent 25%) 0 0/22px 22px,
        linear-gradient(-45deg, #f0f1f5 25%, transparent 25%) 0 0/22px 22px,
        linear-gradient(45deg, transparent 75%, #f0f1f5 75%) 11px 11px/22px 22px,
        linear-gradient(-45deg, transparent 75%, #f0f1f5 75%) 11px 11px/22px 22px,
        #fff;
    cursor: grab;
    /* Mittige Darstellung der Zeichnung */
    display: grid;
    place-items: center;
    padding: 24px;
}
.yq-lightbox-stage.grabbing { cursor: grabbing; }
.yq-lightbox-canvas {
    position: relative;
    line-height: 0;
    transition: transform .15s ease;
    transform-origin: center center;
    margin: auto;
}
.yq-lightbox-canvas img {
    display: block;
    max-width: none;
    width: auto;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}
.yq-lightbox-canvas svg.yq-hotspots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}
.yq-lightbox-canvas svg.yq-hotspots rect.hot {
    fill: rgba(48, 48, 127, 0.05);
    stroke: rgba(48, 48, 127, 0.35);
    stroke-width: 1.8;
    rx: 4;
    pointer-events: all;
    cursor: pointer;
    transition: fill .15s ease, stroke .15s ease, filter .15s ease;
}
.yq-lightbox-canvas svg.yq-hotspots rect.hot:hover,
.yq-lightbox-canvas svg.yq-hotspots rect.hot.active {
    fill: rgba(48, 48, 127, 0.22);
    stroke: var(--tf-primary);
    stroke-width: 3;
    filter: drop-shadow(0 0 10px rgba(48, 48, 127, 0.7));
}
.yq-lightbox-canvas svg.yq-hotspots rect.hot.demo {
    stroke: #00a651;
    stroke-width: 3;
    fill: rgba(0, 166, 81, 0.12);
}

/* Price tag + "weiter"-arrow per hotspot inside the lightbox.
   Both elements live in their own <g> per area so they can be hidden
   together when no Wearparts hit exists for that part. */
.yq-lb-price {
    pointer-events: none;
    user-select: none;
}
/* Chips with .interactive bekommen Click + Hover Events */
.yq-lb-price.interactive { pointer-events: all; }
.yq-lb-price.interactive rect { transition: filter .15s ease, fill .15s ease; }
.yq-lb-price.interactive:hover rect {
    fill: #fff;
    filter: drop-shadow(0 4px 10px rgba(48, 48, 127, 0.45));
}
.yq-lb-price.interactive.demo:hover rect {
    filter: drop-shadow(0 4px 10px rgba(0, 166, 81, 0.6));
}

/* Hover-Box mit den 3 günstigsten Wearparts-Angeboten */
.yq-offers-box {
    position: fixed;
    z-index: 12500;
    width: 320px;
    max-width: calc(100vw - 16px);
    background: #fff;
    color: var(--tf-text-dark);
    border: 1px solid var(--tf-border);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
    font-size: 12px;
}
.yq-offers-box.show { opacity: 1; transform: translateY(0); }
.yq-offers-box .ob-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #f7f8fb, #f0f2f9);
    border-bottom: 1px solid var(--tf-border);
    border-radius: 8px 8px 0 0;
}
.yq-offers-box .ob-pos {
    background: var(--tf-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}
.yq-offers-box .ob-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.yq-offers-box .ob-oe {
    padding: 6px 12px 0;
    font-size: 11px;
    color: var(--tf-muted);
}
.yq-offers-box .ob-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0 0 4px;
}
.yq-offers-box .ob-item {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #f0f2f8;
}
.yq-offers-box .ob-item:first-child { border-top: none; }
.yq-offers-box .ob-rank {
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: var(--tf-primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 11px;
}
.yq-offers-box .ob-item:first-child .ob-rank { background: #00a651; }
.yq-offers-box .ob-body { min-width: 0; }
.yq-offers-box .ob-brand {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--tf-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.yq-offers-box .ob-src {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .3px;
}
.yq-offers-box .ob-src-oe { background: #00a651; color: #fff; }
.yq-offers-box .ob-src-am { background: var(--tf-primary); color: #fff; }
.yq-offers-box .ob-src-gebraucht { background: #f0b400; color: #2c2200; }
.yq-offers-box .ob-pname {
    font-weight: 600;
    color: var(--tf-text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}
.yq-offers-box .ob-price {
    font-weight: 700;
    color: var(--tf-primary);
    font-size: 13px;
    white-space: nowrap;
}
.yq-offers-box .ob-foot {
    padding: 8px 12px;
    font-size: 11px;
    color: var(--tf-muted);
    background: #fafbfd;
    border-top: 1px solid #f0f2f8;
    border-radius: 0 0 8px 8px;
}
.yq-offers-box .ob-empty {
    padding: 14px;
    color: var(--tf-muted);
    text-align: center;
    font-style: italic;
}
.yq-lb-price rect {
    fill: rgba(255, 255, 255, 0.96);
    stroke: var(--tf-primary);
    stroke-width: 1.5;
    rx: 6;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}
.yq-lb-price rect.demo { stroke: #00a651; }
.yq-lb-price text {
    fill: var(--tf-primary);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-anchor: middle;
    dominant-baseline: middle;
}
.yq-lb-price text.demo { fill: #00a651; }

/* Round "weiter" button overlay – sits in a corner of each hotspot. */
.yq-lb-next {
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}
.yq-lb-next circle {
    fill: var(--tf-primary);
    stroke: #fff;
    stroke-width: 2;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}
.yq-lb-next.demo circle { fill: #00a651; }
.yq-lb-next text {
    fill: #fff;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-weight: 800;
    font-size: 18px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}
.yq-lb-next:hover { transform-box: fill-box; transform-origin: center; transform: scale(1.18); }

/* Row that was just picked from the lightbox – stays coloured until next reload */
.yq-bom-row.yq-selected td {
    background: linear-gradient(90deg, #fff3cd, #fff9e6) !important;
    box-shadow: inset 4px 0 0 #f0b400;
    animation: yqSelFlash 1.1s ease;
}
.yq-bom-row.yq-selected.demo-pulse td {
    background: linear-gradient(90deg, #d6f0dd, #ecfaf0) !important;
    box-shadow: inset 4px 0 0 #00a651;
}
@keyframes yqSelFlash {
    0%   { background: #ffe48a !important; }
    100% { /* end state set by base rule */ }
}

.yq-bom-table { background: #fff; min-width: 0; }
.yq-bom-table .detail-table { font-size: 12.5px; width: 100%; }
.yq-bom-table .detail-table th { font-size: 11px; }

/* Toolbar oberhalb der Tabelle: BOM-Parts-Label + EK/VK-Toggle */
.yq-bom-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 12px;
}
.yq-bom-toolbar .yq-section-label {
    margin-bottom: 0;
}

/* EK/VK Segmented-Control Switch */
.yq-pricemode {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.yq-pricemode input { position: absolute; opacity: 0; pointer-events: none; }
.yq-pricemode-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #eef0f6;
    border: 1px solid var(--tf-border);
    border-radius: 999px;
    padding: 2px;
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
}
.yq-pricemode-opt {
    position: relative;
    z-index: 1;
    padding: 4px 12px;
    color: var(--tf-muted);
    transition: color .15s;
    white-space: nowrap;
}
.yq-pricemode-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    height: calc(100% - 4px);
    width: calc(50% - 2px);
    background: var(--tf-primary);
    border-radius: 999px;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.yq-pricemode input:checked ~ .yq-pricemode-track .yq-pricemode-thumb {
    transform: translateX(100%);
}
.yq-pricemode input:not(:checked) ~ .yq-pricemode-track .opt-ek { color: #fff; }
.yq-pricemode input:checked         ~ .yq-pricemode-track .opt-vk { color: #fff; }

/* Auswahl-Checkbox je Quelle (hinter dem Preis) */
.wp-pick {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    cursor: pointer;
    vertical-align: middle;
}
.wp-pick input {
    width: 15px;
    height: 15px;
    accent-color: var(--tf-primary);
    cursor: pointer;
    margin: 0;
}
.wp-hit-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    white-space: nowrap;
}
.wp-hit-mini .wp-price { white-space: nowrap; }
/* Mini-Cell darf nicht in zwei Zeilen brechen, breiter geben */
.detail-table td.wp-avail { white-space: nowrap; }

/* Summen-Footer */
.yq-bom-summary {
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid var(--tf-border);
    border-radius: 6px;
    background: #fafbfd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: background .2s, border-color .2s;
}
.yq-bom-summary.has-selection {
    background: #f0f7ff;
    border-color: var(--tf-primary);
}
.yq-bom-sum-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--tf-text-dark);
    font-weight: 600;
}
.yq-bom-sum-left i { color: var(--tf-muted); font-size: 14px; }
.yq-bom-summary.has-selection .yq-bom-sum-left i { color: var(--tf-primary); }
.yq-bom-sum-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.yq-bom-sum-mode {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--tf-muted);
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    background: #eef0f6;
}
.yq-bom-sum-mode.mode-vk {
    background: #00a651;
    color: #fff;
}
.yq-bom-sum-mode.mode-ek {
    background: var(--tf-primary);
    color: #fff;
}
.yq-bom-sum-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--tf-text-dark);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.yq-bom-summary.has-selection .yq-bom-sum-total {
    color: var(--tf-primary);
}
/* Scroll-Wrapper für die BOM-Tabelle — Bild bleibt sticky, Liste scrollt */
.yq-bom-scroll {
    max-height: 460px;
    overflow-y: auto;
    border: 1px solid var(--tf-border);
    border-radius: 4px;
    background: #fff;
}
.yq-bom-scroll .detail-table thead th {
    position: sticky;
    top: 0;
    background: #f7f8fb;
    z-index: 2;
    border-bottom: 1px solid var(--tf-border);
}
/* "Sammelnummer"-Badge in der BOM-Tabelle (komplette Baugruppe) */
.yq-sammel-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: #6c3fb1;
    color: #fff;
    border-radius: 3px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .35px;
    text-transform: uppercase;
    vertical-align: middle;
}
.yq-bom-row-sammel td {
    background: #faf7ff;
}
.yq-bom-row-sammel:hover td { background: #f0e7ff; }
.yq-bom-row-sammel.demo-pulse td { background: #d6f0dd; }

/* Sammelnummer-Tag im YQ-Tooltip */
.yq-tooltip .tt-sammel {
    background: #6c3fb1;
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .35px;
    margin-left: 6px;
}

/* Sammelnummer-Hotspots in der Explosionszeichnung — lila */
.yq-explosion-wrap > svg.yq-hotspots rect.hot.sammel {
    stroke: #6c3fb1;
    stroke-width: 2.4;
    fill: rgba(108, 63, 177, 0.10);
}
.yq-explosion-wrap > svg.yq-hotspots rect.hot.sammel.active,
.yq-explosion-wrap > svg.yq-hotspots rect.hot.sammel:hover {
    fill: rgba(108, 63, 177, 0.28);
    filter: drop-shadow(0 0 10px rgba(108, 63, 177, 0.75));
}
/* …auch in der Lightbox-Variante */
.yq-lightbox-canvas svg.yq-hotspots rect.hot.sammel {
    stroke: #6c3fb1;
    stroke-width: 3;
    fill: rgba(108, 63, 177, 0.14);
}
.yq-lightbox-canvas svg.yq-hotspots rect.hot.sammel.active,
.yq-lightbox-canvas svg.yq-hotspots rect.hot.sammel:hover {
    fill: rgba(108, 63, 177, 0.28);
}
/* Preis-Chip eines Sammelnummer-Hotspots — lila Rahmen */
.yq-lb-price.sammel rect { stroke: #6c3fb1; }
.yq-lb-price.sammel text { fill: #6c3fb1; }

/* Mengenangabe inline nach der Bezeichnung (statt eigener Spalte) */
.yq-qty-inline {
    color: var(--tf-muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 2px;
}
.yq-pos {
    display: inline-block;
    background: #e1f0ff;
    color: var(--tf-link);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11px;
    font-weight: 600;
}
.yq-bom-row { cursor: pointer; transition: background .15s, box-shadow .15s; }
.yq-bom-row:hover td { background: #f0f9f3; }
.yq-bom-row.demo-pulse:hover td { background: #d6f0dd; }
/* row highlighted because matching hotspot is being hovered */
.yq-bom-row.yq-hot td {
    background: linear-gradient(90deg, rgba(48,48,127,.10), rgba(48,48,127,.04)) !important;
    box-shadow: inset 3px 0 0 var(--tf-primary);
}
.yq-bom-row.yq-hot.demo-pulse td {
    background: linear-gradient(90deg, rgba(0,166,81,.18), rgba(0,166,81,.05)) !important;
    box-shadow: inset 3px 0 0 #00a651;
}

/* Wearparts-availability badge per BOM row */
.wp-avail { font-size: 11px; line-height: 1.35; }
.wp-checking { color: var(--tf-muted); display: inline-flex; align-items: center; gap: 4px; }
.spinner-tiny {
    display: inline-block;
    width: 10px; height: 10px;
    border: 1.5px solid var(--tf-border);
    border-top-color: var(--tf-primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.wp-hit {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    font-size: 11px;
}
.wp-hit strong { color: var(--tf-success); font-weight: 600; }
.wp-hit .wp-price { color: var(--tf-text-dark); font-weight: 600; }
.wp-hit .wp-stock { color: var(--tf-muted); font-size: 10px; }
/* Mini-Variante: nur Preis (Aftermarkt + OE) */
.wp-hit-mini .wp-price {
    color: var(--tf-success);
    font-weight: 700;
    font-size: 12px;
}
.wp-none { color: var(--tf-muted); font-style: italic; font-size: 11px; }
.wp-err   { color: var(--tf-danger); }

/* =============================================================================
   Demo pulse + arrow (highlight next clickable step at the trade-show)
   ========================================================================== */

.demo-pulse {
    position: relative !important;
    z-index: 1;
    animation: demo-pulse-glow 1.8s ease-in-out infinite;
}
@keyframes demo-pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 120, 246, .55); }
    50%      { box-shadow: 0 0 0 10px rgba(52, 120, 246, 0); }
}
.demo-pulse::after {
    content: '\f054'; /* fa-chevron-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    color: #3478f6;
    font-size: 22px;
    animation: demo-arrow 1.4s ease-in-out infinite;
    pointer-events: none;
}
/* Position the arrow for cards (above-right corner) */
.demo-pulse-card::after {
    top: -10px; right: -10px;
    background: #fff;
    border: 2px solid #3478f6;
    border-radius: 50%;
    width: 26px; height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
/* Position the arrow for BOM rows (left of row) */
.demo-pulse-row::after {
    content: '\f0a4'; /* fa-hand-point-right */
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #3478f6;
    border-radius: 50%;
    width: 26px; height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
}
/* Position the arrow for buttons (after the button) */
#vin-search-btn.demo-pulse::after {
    content: '\f0a4';
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
}
@keyframes demo-arrow {
    0%, 100% { opacity: .7; }
    50%      { opacity: 1; }
}

/* Toast */
.tf-toast {
    position: fixed;
    bottom: 80px;
    right: 22px;
    background: var(--tf-text-dark);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--tf-radius);
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
    z-index: 1100;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tf-toast.show { opacity: 1; transform: translateY(0); }
.tf-toast i { color: var(--tf-success); }
