        :root {
            --primary-color: #15803d;
            /* Section-tab bar palette. Kept separate from --primary-color,
               which the rest of the app still uses for its green accents. */
            --tabbar-bg: rgba(28, 28, 28, 1);
            --tabbar-accent: #e5342b;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            color: #000;
            overflow-x: hidden;
        }

        /* CONTENT */
        .container {
            padding: 0 88px 0 33px;
        }

        .section-title {
            margin-top: 55px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #aaa;
            padding-bottom: 15px;
        }

        .section-title h2 {
            margin: 0;
            font-size: 24px;
            font-weight: 600;
            text-transform: capitalize;
            letter-spacing: 0.4px;
        }

        .toggle {
            color: var(--tabbar-bg);
            font-size: 14px;
            display: flex;
            gap: 20px;
            align-items: center;
            cursor: pointer;
            user-select: none;
            font-weight: 500;
        }

        /* arrow */
        .arrow {
            width: 10px;
            height: 10px;
            border-left: 2px solid var(--tabbar-bg);
            border-top: 2px solid var(--tabbar-bg);
            transform: rotate(45deg) translateY(6px);
            transition: transform 0.25s ease;
        }

        .arrow.down {
            transform: rotate(225deg);
        }

        /* TABLE */
        .table-area {
            margin-top: 10px;
            overflow-x: auto;
            transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
            max-height: 2000px;
            opacity: 1;
        }

        .table-area.collapsed {
            max-height: 0;
            opacity: 0;
            margin-top: 0;
            overflow: hidden;
        }

        table {
            border-collapse: separate;
            border-spacing: 7px 5px;
            font-size: 14px;
            color: #5c666f;
        }

        th {
            font-weight: 600;
            text-align: left;
            color: #47525b;
            font-size: 12.5px;
            letter-spacing: 0.015em;
            vertical-align: bottom;
            padding-bottom: 3px;
        }

        /* Every control in the list shares one look — white field, soft
           border, green focus ring — so the grid reads as a single form
           rather than a mix of bordered inputs and borderless grey boxes.
           Checkboxes are excluded: a fixed height/padding/border turns the
           Grain match tickbox into a stray empty rectangle. */
        td input:not([type="checkbox"]):not([type="radio"]),
        td select {
            height: 36px;
            border: 1px solid #d3d9df;
            border-radius: 6px;
            background: #fff;
            color: #1c1c1c;
            font-size: 13px;
            padding: 0 9px;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        td input::placeholder {
            color: #a7b0b8;
        }

        td input:not([type="checkbox"]):hover:not(:disabled),
        td select:hover:not(:disabled) {
            border-color: #b4bec6;
        }

        td input:not([type="checkbox"]):focus,
        td select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(93, 163, 68, 0.15);
        }

        /* Most fields in an empty row are disabled, so they stay quiet: a
           flat tint rather than the old solid grey + opacity, which turned
           each row into a wall of heavy blocks and blurred the text.
           opacity is reset because the global input:disabled sets 0.7. */
        td input:not([type="checkbox"]):disabled,
        td select:disabled {
            background: #f6f7f9;
            border-color: #e4e8ec;
            color: #98a1a9;
            opacity: 1;
            cursor: not-allowed;
        }

        .decor>input,
        .decor .decor-real-input {
            display: none;
            width: 242px;
        }

        .decor.has-decor .decor-placeholder {
            display: none;
        }

        .decor-placeholder {
            width: 242px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 7px 10px;
            border: 1px solid #5da3442b;
            border-radius: 8px;
            background: #fff;
            cursor: pointer;
            text-align: left;
        }

        .decor-placeholder .decor-card-body {
            display: flex;
            flex-direction: column;
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
        }

        .decor-placeholder-icon,
        .decor-chevron {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
        }

        .decor-placeholder-icon {
            color: #6b7178;
        }

        /* Both states are the same control, so both carry the chevron. It
           picks up the green call-to-action colour on the placeholder and
           stays neutral on the card, where the collection line is already
           using green right beside it. */
        .decor-chevron {
            margin-left: auto;
            color: #98a1a9;
        }

        .decor-placeholder .decor-chevron {
            color: var(--primary-color);
        }

        .decor-placeholder .decor-placeholder-hint,
        .decor-placeholder .decor-placeholder-input,
        .decor-placeholder-input {
            border: 0 !important;
            border-style: none !important;
            outline: none !important;
            background: transparent !important;
            background-color: transparent !important;
            font-size: 12px !important;
            color: #333 !important;
            width: 100% !important;
            max-width: 100% !important;
            height: auto !important;
            min-height: 0 !important;
            max-height: none !important;
            padding: 0 0 5px 0 !important;
            margin: 0 !important;
            font-family: inherit !important;
            font-weight: 400 !important;
            line-height: 1.2 !important;
            box-shadow: none !important;
            -webkit-box-shadow: none !important;
            display: block !important;
            border-radius: 0 !important;
            -webkit-appearance: none !important;
            appearance: none !important;
        }

        .decor-placeholder .decor-placeholder-input::placeholder,
        .decor-placeholder-input::placeholder {
            color: #333 !important;
            font-size: 12px !important;
            opacity: 1 !important;
            font-family: inherit !important;
        }

        .decor-placeholder .decor-placeholder-input:focus,
        .decor-placeholder-input:focus {
            outline: none !important;
            box-shadow: none !important;
            -webkit-box-shadow: none !important;
            background: transparent !important;
            border: 0 !important;
        }

        .decor-placeholder .decor-placeholder-action {
            font-size: 13px;
            font-weight: 600;
            color: var(--primary-color);
            padding-top: 5px;
            border-top: 1px solid #e4e8ec;
            display: block;
        }

        .decor-card {
            width: 242px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 9px;
            border: 1px solid #dfe3e8;
            border-radius: 8px;
            background: #fff;
            cursor: pointer;
            text-align: left;
        }

        .decor-card:hover {
            border-color: #c6ccd3;
        }

        .decor-card-swatch {
            flex: 0 0 auto;
            width: 34px;
            height: 34px;
            border-radius: 5px;
            border: 1px solid #e2e6ea;
            background-color: #eceff2;
            background-size: cover;
            background-position: center;
        }

        .decor-card-body {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        /* All three lines clip rather than wrap — the cell is a fixed
           width and a long decor name would otherwise change the row
           height and break alignment with the columns beside it. */
        .decor-card-body>span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            line-height: 1.35;
        }

        .decor-card-title {
            font-size: 13px;
            font-weight: 600;
            color: #1c1c1c;
        }

        .decor-card-name {
            font-size: 12px;
            color: #333;
            font-weight: 500;
        }

        .decor-card-collection {
            font-size: 12px;
            color: var(--primary-color);
            font-weight: 600;
        }

        .small select {
            width: 60px;
        }

        select:disabled {
            background: #e9e9e9;
            cursor: not-allowed;
        }

        .small input {
            width: 64px;
        }

        .qty input {
            width: 54px;
        }

        .desc input {
            width: 130px;
        }

        /* Groups the four edge columns without the old flat grey slab —
           tinted so it reads as a header band, not a hole. */
        .edging {
            background: #f5f8f9;
            text-align: center;
        }

        .edging-group {
            border-radius: 8px 8px 0 0;
            padding: 8px 8px;
            vertical-align: middle;
            color: var(--primary-color);
        }

        /* Each sits directly above its own column's input, so it centres on
           that input rather than on an even quarter of the group's width. */
        .edging-col {
            text-align: center;
            border-radius: 0 0 8px 8px;
            padding: 4px 0 6px;
        }

        /* The input is narrower than its cell, so without this it sits left
           while the label above centres — leaving them off by a couple of
           px even though both are in the same column. */
        .edging-input {
            text-align: center;
        }

        /* Destructive, so it stays muted until you actually reach for it. */
        .delete {
            color: #c7ccd1;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            text-align: center;
            transition: color 0.15s ease;
        }

        .delete:hover {
            color: #e5342b;
        }

        .btn-area {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin: 22px 0 20px 12px;
        }

        .btn-area button {
            width: fit-content !important;
            height: 36px;
            font-size: 12.5px;
            font-weight: 600;
            border-radius: 8px;
            padding: 0 18px;
            margin-right: 0;
            cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }

        .btn-area button:not(:disabled):hover {
            background: rgba(93, 163, 68, 0.08);
        }

        .btn-area button:disabled {
            border-color: #e0e4e8;
            color: #a8b0b7;
            background: #fff;
            cursor: not-allowed;
        }

        button {
            height: 38px;
            background: #f6f7f9;
            border: 1px solid var(--tabbar-bg);
            color: var(--tabbar-bg);
            font-size: 14px;
            /* width: 242px; */
            margin-right: 7px;
        }

        /* LOWER SECTIONS */
        .closed .section-title {
            margin-top: 55px;
            margin-bottom: 15px;
        }

        /* SECTION HEADER ACTION BUTTONS */
        .section-hdr-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: auto;
            margin-right: 32px;
        }

        .section-hdr-actions button {
            height: 32px;
            width: auto;
            padding: 0 14px;
            font-size: 12px;
            cursor: pointer;
        }

        .section-hdr-actions button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        /* FULL SHEETS TABLE */
        #fsTable {
            width: 100%;
            border-collapse: collapse;
        }

        #fsTable .header-row th {
            background: #f5f5f5;
            border-bottom: 2px solid #ddd;
            padding: 8px 10px;
            font-size: 12px;
            color: #555;
            font-weight: 600;
            white-space: nowrap;
        }

        #fsTable .header-row th:first-child {
            width: 36px;
        }

        #fsTable tr.fs-row td {
            padding: 10px;
            border-bottom: 1px solid #eee;
            vertical-align: middle;
        }

        #fsTable tr.fs-row.unlocked {
            background: #fffbe6;
        }

        #fsTable .fs-brand {
            font-size: 13px;
            color: #444;
            white-space: nowrap;
            min-width: 90px;
        }

        #fsTable .actions-inner {
            justify-content: flex-end;
        }

        /* size column in decor popup */
        .product-row .prod-size {
            color: #888;
            font-size: 12px;
            min-width: 90px;
        }

        /* UPDATE BASKET SHOWBOX */
        .update-basket-showbox {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 64px 20px 80px;
            background: transparent;
        }

        .update-basket-inner {
            text-align: center;
        }

        .update-basket-inner h2 {
            font-size: 40px;
            font-weight: 400;
            color: #b8bfc6;
            margin: 0 0 8px;
        }

        .update-basket-inner p {
            font-size: 17px;
            color: #b8bfc6;
            margin: 0 0 32px;
        }

        #updateBasketBtn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 52px;
            width: 320px;
            background: var(--primary-color);
            color: #fff;
            border: none;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            letter-spacing: 0.02em;
            transition: background 0.15s, opacity 0.15s;
            gap: 10px;
        }

        #updateBasketBtn:not(:disabled):hover {
            background: #155da3;
        }

        #updateBasketBtn:disabled {
            opacity: 0.42;
            cursor: not-allowed;
        }

        /* EDGING TAPE TABLE */
        #etTable {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
        }

        #etTable col.col-index {
            width: 44px;
        }

        #etTable col.col-tape {
            width: 190px;
        }

        #etTable col.col-name {
            width: auto;
        }

        #etTable col.col-size {
            width: 130px;
        }

        #etTable col.col-space-1 {
            width: 12px;
        }

        #etTable col.col-qty-wide {
            width: 110px;
        }

        #etTable col.col-space-2 {
            width: 12px;
        }

        #etTable col.col-actions {
            width: 64px;
        }

        /* Matches the cutting list header — same weight, colour and size,
           so the three tables on the page read as one system. */
        #etTable thead th {
            padding: 8px 10px;
            font-size: 12.5px;
            font-weight: 600;
            letter-spacing: 0.015em;
            color: #47525b;
            border-bottom: 1px solid #e3e8ec;
            text-align: left;
            vertical-align: bottom;
        }

        #etTable thead th.th-index {
            text-align: center;
        }

        #etTable thead th.th-actions {
            text-align: right;
        }

        #etTable tbody td {
            padding: 7px 8px;
            border-bottom: 1px solid #eef1f4;
            vertical-align: middle;
        }

        #etTable .td-index {
            text-align: center;
            color: #8b98a0;
            font-size: 14px;
        }

        #etTable tr.editable.active {
            background: #fff;
        }

        /* Select2 widget */
        .Select2 {
            position: relative;
            width: 100%;
            user-select: none;
        }

        /* Same field treatment as the cutting list's inputs: soft border,
           6px radius, and a green ring when open instead of the old
           darkening border. */
        .Select2__input-wrapper {
            display: flex;
            align-items: center;
            border: 1px solid #d3d9df;
            border-radius: 6px;
            background: #fff;
            min-height: 36px;
            padding: 0 9px;
            cursor: pointer;
            gap: 6px;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .Select2__input-wrapper:hover {
            border-color: #b4bec6;
        }

        .Select2.is-open .Select2__input-wrapper {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(93, 163, 68, 0.15);
            border-radius: 6px 6px 0 0;
        }

        .Select2__input {
            flex: 1;
            overflow: hidden;
            font-size: 13px;
            line-height: 1.2;
            padding: 6px 0;
        }

        .Select2.isEmpty .Select2__input {
            display: none;
        }

        .Select2__placeholder {
            color: #aaa;
            font-size: 13px;
            flex: 1;
            display: none;
            line-height: 1;
        }

        .Select2.isEmpty .Select2__placeholder {
            display: block;
        }

        .Select2__clear {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #e2e8f0;
            color: #64748b;
            font-size: 13px;
            font-weight: bold;
            cursor: pointer;
            margin-right: 2px;
            transition: background 0.15s ease, color 0.15s ease;
        }

        .Select2__clear:hover {
            background: #d32f2f;
            color: #fff;
        }

        .Select2__arrow {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .Select2__arrow svg {
            display: block;
        }

        .Select2__dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: #fff;
            border: 1px solid #d3d9df;
            border-top: none;
            border-radius: 0 0 6px 6px;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
            z-index: 2000;
            max-height: 270px;
            overflow-y: auto;
        }

        .Select2.is-open .Select2__dropdown {
            display: block;
        }

        .Select2__option {
            padding: 9px 12px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
        }

        .Select2__option:hover {
            background: #f0f5ff;
        }

        .Select2__option.Select-option--selected {
            background: #e8f0fe;
        }

        .Select2__option.Select2__option--empty {
            cursor: default;
            color: #888;
        }

        .Select2__option.Select2__option--empty:hover {
            background: none;
        }

        /* edgebanding-option layout (inside both trigger and dropdown) */
        .edgebanding-option {
            display: flex;
            align-items: center;
            gap: 14px;
            font-size: 13px;
        }

        .edgebanding-option .code {
            font-weight: 600;
            color: #333;
            min-width: 140px;
            flex-shrink: 0;
        }

        .edgebanding-option .name {
            color: #555;
            flex: 1;
        }

        .edgebanding-option .size {
            color: #888;
            min-width: 80px;
            flex-shrink: 0;
            text-align: right;
        }

        /* qty input */
        .et-qty-input {
            width: 84px;
            height: 36px;
            border: 1px solid #d3d9df;
            border-radius: 6px;
            text-align: center;
            padding: 0 6px;
            font-size: 13px;
            color: #1c1c1c;
            background: #fff;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .et-qty-input::placeholder {
            color: #a7b0b8;
        }

        .et-qty-input:hover:not(:disabled) {
            border-color: #b4bec6;
        }

        .et-qty-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(93, 163, 68, 0.15);
        }

        /* Quiet tint rather than a solid grey block, matching the disabled
           fields in the cutting list. */
        .et-qty-input:disabled {
            background: #f6f7f9;
            border-color: #e4e8ec;
            color: #98a1a9;
            opacity: 1;
            cursor: not-allowed;
        }

        /* "Add a row" under the Full Sheets / Edging Tape tables — same pill
           treatment as the cutting list's .btn-area buttons. */
        .table-bottom-buttons button {
            height: 36px;
            font-size: 12.5px;
            font-weight: 600;
            border-radius: 8px;
            padding: 0 18px;
            cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }

        .table-bottom-buttons button:not(:disabled):hover {
            background: rgba(93, 163, 68, 0.08);
        }

        .table-bottom-buttons button:disabled {
            border-color: #e0e4e8;
            color: #a8b0b7;
            background: #fff;
            cursor: not-allowed;
        }

        /* The edging tape rows now use the same span.delete × as the cutting
           list, so they inherit the shared .delete styling (muted grey,
           red on hover) — no separate SVG-button rules needed. */
        #etTable .delete {
            display: inline-block;
        }

        /* PANEL MODAL (More info) */
        .panel-modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.55);
            z-index: 10000;
            overflow-y: auto;
            padding: 40px 20px;
        }

        .panel-modal-overlay.is-open {
            display: flex;
            align-items: flex-start;
            justify-content: center;
        }

        .panel-reveal {
            background: #fff;
            width: 100%;
            max-width: 1020px;
            position: relative;
            padding: 0;
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
        }

        .panel-close {
            position: absolute;
            top: 14px;
            right: 14px;
            background: none;
            border: none;
            width: auto;
            height: auto;
            padding: 6px;
            cursor: pointer;
            z-index: 5;
            color: #555;
        }

        .panel-close:hover {
            color: #000;
        }

        .panel-close svg {
            width: 22px;
            height: 22px;
            display: block;
        }

        .panel-modal-inner {
            display: flex;
            align-items: flex-start;
        }

        #summarySection {
            display: none;
            margin-top: 60px;
        }

        .summary-card {
            border: 1px solid #ddd;
            margin-bottom: 25px;
        }

        .summary-header {
            background: #edf3fb;
            padding: 18px;
            display: flex;
            justify-content: space-between;
            font-size: 22px;
        }

        .summary-body {
            padding: 25px;
        }

        .summary-total {
            text-align: right;
            margin-top: 40px;
            font-size: 28px;
        }


        /* ==========================================================
        PANEL SUMMARY (NEW UI)
    ========================================================== */

        .panel-summary-modal {
            width: min(1380px, 96vw);
            height: min(820px, 92vh);
            background: #f5f6f8;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
            display: flex;
            flex-direction: column;
        }

        .panel-summary-context-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 16px;
            background: #fdf3d7;
            border-bottom: 1px solid #ddd;
            font-size: 12px;
            color: #333;
        }

        .panel-summary-context-bar .ps-ctx-field {

            background: #fff;
            border: 1px solid #c8c8c8;
            height: 28px;
            min-width: 50px;
            display: flex;
            align-items: center;
            padding: 0 8px;
            color: #333;
            font-size: 12px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ps-ctx-rownum {
            border: none !important;
            background: none !important;
            min-width: auto !important;
            padding: 0 !important;
        }

        .ps-ctx-decor {
            width: 220px;
        }

        .ps-ctx-desc {
            width: 100px;
        }

        .ps-ctx-edge {
            width: 54px;
            justify-content: center;
        }

        .panel-summary-context-title {
            margin-left: auto;
            color: var(--primary-color);
            font-weight: bold;
            font-size: 13px;
            white-space: nowrap;
        }

        .panel-summary-context-close {
            background: none;
            border: none;
            color: var(--primary-color);
            font-size: 18px;
            cursor: pointer;
            margin-left: 14px;
            line-height: 1;
            padding: 0;
        }

        .panel-summary-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }

        .summary-section {
            max-width: 1140px;
            margin: 40px auto;
            color: #1f2937;
        }

        .summary-section .summary-title {
            font-size: 26px;
            font-weight: 700;
            color: #111827;
            margin: 0 0 24px 0;
            display: flex;
            align-items: center;
            gap: 14px;
            letter-spacing: -0.01em;
        }

        .summary-section .summary-title-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background-color: #f0fdf4;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            flex-shrink: 0;
        }

        .summary-section .summary-card {
            background: #ffffff;
            border: 1px solid #e5e7eb;
            border-radius: 16px;
            margin-bottom: 20px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
            overflow: hidden;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .summary-section .summary-card:hover {
            border-color: #d1d5db;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .summary-section .summary-header {
            background: #ffffff;
            padding: 20px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            user-select: none;
            border-bottom: 1px solid transparent;
            transition: border-color 0.2s ease, background-color 0.2s ease;
        }

        .summary-section .summary-card.open .summary-header,
        .summary-section .summary-card:has(.summary-body.is-open) .summary-header {
            border-bottom-color: #f3f4f6;
            background-color: #ffffff;
        }

        .summary-section .summary-header-left {
            display: flex;
            align-items: center;
            gap: 14px;
            font-size: 18px;
            font-weight: 700;
            color: #111827;
        }

        .summary-section .summary-header-left span {
            font-size: 18px;
            font-weight: 700;
            color: #111827;
        }

        .summary-section .summary-header-left strong {
            background: #f0fdf4;
            color: var(--primary-color);
            font-size: 16px;
            font-weight: 700;
            padding: 6px 16px;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            margin-left: 6px;
        }

        .summary-section .summary-card-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .summary-section .summary-card-icon--sheet {
            background-color: #f0fdf4;
        }

        .summary-section .summary-card-icon--tape {
            background-color: #f4eefc;
        }

        .summary-section .summary-card-icon--services {
            background-color: #fff7ed;
        }

        .summary-section .summary-header-right {
            display: flex;
            align-items: center;
            gap: 16px;
            font-size: 14px;
            color: #6b7280;
            font-weight: 500;
        }

        .summary-section .summary-body {
            padding: 0 28px;
            background: #ffffff;
        }

        .summary-section .summary-body.is-open,
        .summary-section .summary-card.open .summary-body {
            padding: 24px 28px;
        }

        .summary-section .summary-body table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 12px;
            margin-bottom: 20px;
            font-size: 14px;
        }

        .summary-section .summary-body th {
            text-align: left;
            padding: 12px 14px;
            font-size: 12px;
            font-weight: 600;
            color: #6b7280;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            border-bottom: 1px solid #e5e7eb;
            background: #fafafa;
        }

        .summary-section .summary-body td {
            padding: 16px 14px;
            font-size: 14px;
            color: #1f2937;
            border-bottom: 1px solid #f3f4f6;
            vertical-align: middle;
        }

        .summary-section .summary-body tr:last-child td {
            border-bottom: none;
        }

        .summary-section .summary-body th:nth-last-child(2),
        .summary-section .summary-body th:last-child,
        .summary-section .summary-body td:nth-last-child(2),
        .summary-section .summary-body td:last-child {
            text-align: right;
        }

        .summary-section .summary-body td:nth-child(2) {
            font-weight: 600;
            color: var(--primary-color);
        }

        .summary-section .summary-body td:last-child {
            font-weight: 600;
            color: #111827;
        }

        .plans {
            display: flex;
            gap: 30px;
            margin-top: 20px
        }

        .plan {
            width: 320px
        }

        .plans .plan p {
            font-size: 16px;
            font-weight: 600;
        }

        .box {
            position: relative;
            width: 100%;
            border: 1px solid #d9d9d9;
            background: repeating-linear-gradient(45deg, #d9e7f7, #d9e7f7 6px, #fff 6px, #fff 12px);
            overflow: hidden;
            cursor: pointer
        }

        .panel {
            position: absolute;
            border: 1px solid #2f78bd;
            background: #fff;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .panel-hover-chip {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #ffffff;
            color: #111827;
            padding: 6px 12px;
            border-radius: 4px;
            border: 1px solid #e5e7eb;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.15s ease, visibility 0.15s ease;
            pointer-events: none;
            z-index: 10;
        }

        .panel:hover .panel-hover-chip {
            opacity: 1;
            visibility: visible;
        }

        .offcut {
            position: absolute;
            box-sizing: border-box;
            background: repeating-linear-gradient(45deg, #d9e7f7, #d9f7dca7 6px, #fff 6px, #fff 12px);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #5da34445;
            font-size: 12px;
            text-align: center;
            line-height: 1.4
        }

        .cut-line {
            display: none !important;
        }

        .cut-line-v {
            top: 0;
            bottom: 0;
            width: 2px;
            margin-left: -1px;
        }

        .cut-line-h {
            left: 0;
            right: 0;
            height: 2px;
            margin-top: -1px;
        }

        .plan-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            opacity: 0;
            visibility: hidden;
            transition: opacity .15s;
            z-index: 2;
            cursor: pointer;
        }

        .box:hover .plan-overlay {
            opacity: 1;
            visibility: visible;
        }

        .plan-overlay-top {
            flex: 1;
            background: rgba(255, 255, 255, .97);
            padding: 16px;
            box-sizing: border-box;
            overflow: hidden;
        }

        .plan-overlay-title {
            font-size: 15px;
            font-weight: 700;
            color: #1a1a1a;
            margin-bottom: 10px;
        }

        .plan-overlay-desc {
            font-size: 12.5px;
            color: #333;
            line-height: 1.9;
        }

        .plan-overlay-desc .param-name {
            font-weight: 600;
            color: #1a1a1a;
        }

        .plan-overlay-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 12px 16px;
            background: rgba(200, 226, 251, .88);
        }

        .plan-overlay-footer-desc {
            font-size: 12px;
            color: #2f78bd;
            line-height: 1.4;
        }

        .plan-overlay-footer-icon {
            flex: none;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 1.5px solid #2f78bd;
            color: #2f78bd;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .plan-overlay-footer-icon svg {
            width: 16px;
            height: 16px;
        }

        /* CUTTING PLAN DETAIL MODAL */
        .cutplan-modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(20, 24, 30, .6);
            z-index: 10050;
            align-items: center;
            justify-content: center;
            padding: 30px;
            box-sizing: border-box;
        }

        .cutplan-modal-overlay.open {
            display: flex;
        }

        .cutplan-modal {
            position: relative;
            width: min(1100px, 100%);
            max-height: 92vh;
            background: #fff;
            border-radius: 6px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .cutplan-close {
            position: absolute;
            top: 12px;
            right: 14px;
            background: none;
            border: none;
            font-size: 26px;
            line-height: 1;
            color: #666;
            cursor: pointer;
            z-index: 2;
            padding: 4px 8px;
        }

        .cutplan-close:hover {
            color: #000;
        }

        .cutplan-modal-inner {
            display: flex;
            flex: 1;
            min-height: 0;
        }

        .cutplan-sidebar {
            width: 300px;
            flex: none;
            background: #f4f5f6;
            padding: 30px 24px;
            overflow-y: auto;
            box-sizing: border-box;
        }

        .cutplan-sidebar-eyebrow {
            font-size: 12px;
            color: #888;
            text-transform: uppercase;
            letter-spacing: .04em;
            margin-bottom: 12px;
        }

        .cutplan-decor {
            font-size: 19px;
            font-weight: 600;
            margin: 0 0 8px;
            color: #1a1a1a;
        }

        .cutplan-size,
        .cutplan-sheets {
            font-size: 13px;
            color: #444;
            margin-bottom: 4px;
        }

        .cutplan-sidebar h3 {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: .03em;
            color: #777;
            margin: 24px 0 10px;
            font-weight: 600;
        }

        .cutplan-panel-list-row {
            font-size: 13px;
            color: #333;
            padding: 7px 0;
            border-bottom: 1px solid #e4e4e4;
        }

        .cutplan-panel-list-desc {
            color: #2f78bd;
        }

        .cutplan-empty-note {
            font-size: 13px;
            color: #999;
        }

        .cutplan-diagram-pane {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            padding: 30px 30px 0;
            box-sizing: border-box;
            overflow: auto;
            position: relative;
        }

        .cutplan-diagram-wrap {
            width: 100%;
            max-width: 560px;
            margin: auto 0;
            padding: 20px 0;
            box-sizing: border-box;
        }

        .cutplan-box {
            position: relative;
            width: 100%;
            border: 1px solid #d9d9d9;
            background: repeating-linear-gradient(45deg, #d9e7f7, #d9e7f7 6px, #fff 6px, #fff 12px);
            overflow: visible;
        }

        .cutplan-panel {
            position: absolute;
            box-sizing: border-box;
            border: 1px solid #2f78bd;
            background: #fff;
        }

        .cutplan-panel-tooltip {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #ffffff;
            color: #111827;
            padding: 6px 12px;
            border-radius: 4px;
            border: 1px solid #e5e7eb;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.15s ease, visibility 0.15s ease;
            pointer-events: none;
            z-index: 10;
        }

        .cutplan-panel:hover .cutplan-panel-tooltip {
            opacity: 1;
            visibility: visible;
        }

        .cutplan-tip-size {
            font-size: 13px;
            font-weight: 500;
            color: #111827;
        }

        .cutplan-tip-desc {
            color: #cfe0f7;
            margin-top: 2px;
        }

        .cutplan-offcut {
            position: absolute;
            box-sizing: border-box;
            background: repeating-linear-gradient(45deg, #dbeafe, #dbeafe 6px, #f0f9ff 6px, #f0f9ff 12px);
            border: 1px dashed #3b82f6;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            padding: 3px 6px;
            color: #1e40af;
            font-size: 11px;
            text-align: center;
            line-height: 1.2;
            overflow: hidden;
            transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .cutplan-offcut:hover {
            background: repeating-linear-gradient(45deg, #bfdbfe, #bfdbfe 6px, #eff6ff 6px, #eff6ff 12px);
            border-color: #2563eb;
            z-index: 15;
        }

        .cutplan-panel:hover {
            z-index: 15;
        }

        .cutplan-scrap:hover {
            z-index: 15;
        }

        .cutplan-offcut-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-bottom: 8px;
            background: #1a1a1a;
            color: #fff;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 11px;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity .12s;
            pointer-events: none;
            z-index: 100;
        }

        .cutplan-offcut:hover .cutplan-offcut-tooltip,
        .cutplan-scrap:hover .cutplan-offcut-tooltip {
            opacity: 1;
            visibility: visible;
        }

        .cutplan-offcut.selected {
            background: #bfe3c8;
            border-color: #2e9d4f;
            color: #1c6d34;
        }

        .cutplan-offcut-label {
            pointer-events: none;
            font-size: 11px;
            font-weight: 600;
            color: #1e3a8a;
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(2px);
            padding: 2px 7px;
            border-radius: 4px;
            border: 1px solid rgba(191, 219, 254, 0.7);
            white-space: nowrap;
            max-width: 95%;
            overflow: hidden;
            text-overflow: ellipsis;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        }

        /* OFF-CUT SPLIT CONTROLS & SUB-OFFCUTS */
        .cutplan-offcut.splittable {
            border-style: dashed;
            border-color: #2563eb;
        }

        .cutplan-split-trigger {
            position: relative;
            bottom: auto;
            right: auto;
            background: #ffffff;
            color: #2563eb;
            border: 1px solid #93c5fd;
            padding: 3px 9px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 600;
            cursor: pointer;
            z-index: 5;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
            white-space: nowrap;
            transition: all 0.15s ease;
            margin-top: 1px;
        }

        .cutplan-split-trigger:hover {
            background: #2563eb;
            color: #ffffff;
            border-color: #2563eb;
            box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
            transform: translateY(-1px);
        }

        .cutplan-sub-offcut {
            z-index: 2;
        }

        .cutplan-split-line {
            position: absolute;
            z-index: 50;
            pointer-events: auto;
        }

        .cutplan-split-line-h {
            border-top: 2px dashed #ef4444;
            transform: translateY(-1px);
            cursor: row-resize;
        }

        .cutplan-split-line-v {
            border-left: 2px dashed #ef4444;
            transform: translateX(-1px);
            cursor: col-resize;
        }

        .cutplan-split-handle-wrap {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            align-items: center;
            gap: 6px;
            z-index: 60;
            pointer-events: auto;
        }

        .cutplan-split-reset-btn {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: #ef4444;
            color: #ffffff;
            border: 2px solid #ffffff;
            box-shadow: 0 3px 8px rgba(239, 68, 68, 0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: bold;
            line-height: 1;
            cursor: pointer;
            transition: transform 0.15s ease, background 0.15s ease;
            padding: 0;
            margin: 0;
        }

        .cutplan-split-reset-btn:hover {
            background: #dc2626;
            transform: scale(1.1);
        }

        .cutplan-split-axis-btn {
            height: 22px;
            padding: 0 8px;
            border-radius: 11px;
            background: #ffffff;
            color: #1e293b;
            border: 1px solid #cbd5e1;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
            font-size: 11px;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.15s ease, border-color 0.15s ease;
        }

        .cutplan-split-axis-btn:hover {
            background: #f8fafc;
            border-color: #94a3b8;
        }



        .scrap,
        .cutplan-scrap {
            position: absolute;
            box-sizing: border-box;
            background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 6px, #e5e7eb 6px, #e5e7eb 12px);
            border: 1px dashed #9ca3af;
            cursor: not-allowed;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6b7280;
            font-size: 11px;
            font-weight: 500;
            text-align: center;
            line-height: 1.3;
        }

        .scrap:hover .panel-hover-chip {
            opacity: 1;
            visibility: visible;
        }

        .cutplan-offcut-tooltip::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 5px solid transparent;
            border-top-color: #1a1a1a;
        }

        .cutplan-offcut:hover .cutplan-offcut-tooltip {
            opacity: 1;
            visibility: visible;
        }

        .cutplan-scrap {
            position: absolute;
            box-sizing: border-box;
            background: repeating-linear-gradient(45deg, #d9e7f7, #d9e7f7 6px, #fff 6px, #fff 12px);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #9aa7b5;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: .04em;
        }

        .cutplan-nav {
            display: flex;
            justify-content: center;
            gap: 40px;
            padding: 16px;
            border-top: 1px solid #e6e6e6;
            background: #fafafa;
            flex: none;
            width: 100%;
            box-sizing: border-box;
        }

        .cutplan-nav button {
            background: none;
            border: none;
            color: var(--primary-color);
            font-size: 14px;
            cursor: pointer;
            padding: 6px 10px;
        }

        .cutplan-nav button:disabled {
            color: #bbb;
            cursor: default;
        }

        .panel-dim-chip {
            background: #fafafa;
            border: 1px solid #eee;
            padding: 4px 10px;
            font-size: 12px;
            color: #333;
            box-shadow: 0 1px 2px rgba(0, 0, 0, .08)
        }

        .sheet {
            text-align: right;
            font-size: 18px;
            font-weight: 700;
        }

        .sheet span {
            display: block;
            font-size: 12px;
            font-weight: 400;
        }

        .sheet strong {
            font-weight: 600;
        }

        table {
            width: 100%;
            border-collapse: collapse
        }

        th {
            font-size: 13px;
            color: #333;
            text-align: left;
            border-bottom: 1px solid #ddd;
            padding: 10px;
            font-weight: 600;
        }

        td {
            padding: 15px 5px;
            border-bottom: 1px solid #eee;
            font-size: 14px
        }

        .summary-section .summary-body .total {
            text-align: right;
            margin-top: 24px;
            padding-top: 18px;
            border-top: 1px solid #f3f4f6;
        }

        .summary-section .summary-body .total strong {
            font-size: 18px;
            font-weight: 700;
            color: var(--primary-color);
            display: block;
        }

        .summary-section .summary-body .total div {
            font-size: 13.5px;
            color: #6b7280;
            margin-top: 2px;
        }

        .summary-section .grand {
            background: #f3f6f3;
            border: 1px solid #e1ebe2;
            border-radius: 16px;
            padding: 24px 32px;
            margin-top: 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 20px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
        }

        .summary-section .grand-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .summary-section .grand-icon {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: #ffffff;
            border: 1px solid #e1ebe2;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        }

        .summary-section .grand-title {
            font-size: 19px;
            font-weight: 700;
            color: #111827;
            margin: 0;
            line-height: 1.2;
        }

        .summary-section .grand-subtitle {
            font-size: 13.5px;
            font-weight: 400;
            color: #6b7280;
            margin-top: 3px;
        }

        .summary-section .grand-right {
            text-align: right;
        }

        .summary-section .grand .price {
            font-size: 34px;
            font-weight: 700;
            color: var(--primary-color);
            margin: 0;
            letter-spacing: -0.02em;
            line-height: 1.1;
        }

        .summary-section .grand .vat {
            font-size: 14px;
            color: #4b5563;
            font-weight: 500;
            margin-top: 4px;
            text-align: right;
        }

        /* ==========================================
   SUMMARY TOGGLE
========================================== */

        .summary-toggle {
            display: inline-flex;
            width: fit-content;
            align-items: center;
            gap: 8px;

            background: none;
            border: none;

            padding: 0;

            cursor: pointer;

            font: inherit;
            color: var(--primary-color);
            font-weight: 600;
        }

        .summary-toggle:hover {
            color: var(--primary-color);
        }

        .summary-arrow {
            display: inline-block;
            transition: transform .25s ease;
        }

        .summary-body {
            overflow: hidden;
            transition: max-height .35s ease,
                padding .35s ease,
                opacity .25s ease;

            max-height: 0;
            opacity: 0;

            padding-top: 0;
            padding-bottom: 0;
        }

        .summary-body.is-open {

            max-height: 1500px;

            opacity: 1;

            padding: 28px;
        }

        .summary-card.open .summary-arrow {

            transform: rotate(180deg);

        }

        /* ===========================
   LEFT
=========================== */

        .panel-summary-left {

            width: 70%;
            background: #f6fff1;
            position: relative;
            overflow: hidden;
            border-right: 1px solid #d8d8d8;

        }

        .panel-summary-svg-wrap {

            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px;

        }

        .panel-summary-drawing {

            width: 100%;
            height: 100%;
            max-width: 100%;
            max-height: 100%;
            display: block;

            transition: transform .25s ease;

            transform-origin: center center;

        }

        /* ===========================
   RIGHT
=========================== */

        .panel-summary-right {

            width: 30%;
            background: #fff;
            padding: 14px;
            overflow: auto;
            display: flex;
            flex-direction: column;
            font-family: Arial, sans-serif;

        }

        .panel-summary-size {
            font-size: 13px;
            font-weight: 700;
            color: #222;
            margin-bottom: 8px;
        }

        .panel-summary-swatch {
            width: 72px;
            height: 72px;
            border-radius: 0;
            border: 1px solid #999;
            background-size: cover;
            background-position: center;
            margin-bottom: 8px;
        }

        .panel-summary-brand {
            font-size: 11px;
            font-weight: 600;
            color: #222;
        }

        .panel-summary-decor-name {
            font-size: 10px;
            color: #666;
            margin-bottom: 6px;
        }

        .panel-summary-qty {
            font-size: 15px;
            font-weight: 700;
            color: #1c1c1c;
            margin-bottom: 10px;
        }

        .panel-summary-section {
            border-top: 1px solid #ececec;
            padding-top: 8px;
            margin-bottom: 8px;
        }

        .panel-summary-section h4 {
            margin: 0 0 3px;
            font-size: 11px;
            font-weight: 600;
            color: #222;
        }

        .panel-summary-section p {
            margin: 0;
            font-size: 10px;
            color: #555;
            line-height: 1.45;
        }

        /* Sized to match .panel-summary-section p explicitly, rather than
           inheriting it: buildPanelSummaryMachiningText() renders these as
           <div>s, and a <div> inside the <p> it's interpolated into forces
           the browser to close that <p> early, so it ends up a sibling of
           the <p> (not a descendant) and won't pick up its font-size. */
        .panel-summary-machining-item {
            margin-bottom: 5px;
            font-size: 10px;
            color: #555;
            line-height: 1.45;
        }

        .panel-summary-machining-item:last-child {
            margin-bottom: 0;
        }

        .panel-summary-nav {
            margin-top: auto;
            padding-top: 8px;
            border-top: 1px solid #ececec;
            display: flex;
            justify-content: space-between;
            gap: 8px;
        }

        .panel-summary-nav-btn {
            background: none;
            border: none;
            color: var(--primary-color);
            font-size: 10px;
            font-weight: 600;
            cursor: pointer;
            padding: 4px 0;
        }

        .panel-summary-nav-btn:disabled {
            color: #bbb;
            cursor: not-allowed;
        }

        /* ===========================
   GRAIN
=========================== */

        .panel-summary-grain {

            position: absolute;
            top: 16px;
            right: 16px;

        }

        .panel-summary-grain-label {

            color: #333;
            font-size: 11px;
            margin-bottom: 4px;
            text-align: center;

        }

        .panel-summary-grain-box {

            width: 64px;
            height: 64px;
            background: #fff;
            border: 1px solid #333;
            display: flex;
            align-items: center;
            justify-content: center;

        }

        /* ===========================
   PANEL SHOWS
=========================== */

        .panel-summary-shows {

            position: absolute;
            right: 16px;
            bottom: 16px;
            text-align: center;

        }

        .panel-summary-shows-label {

            color: #333;
            font-size: 11px;
            margin-bottom: 4px;

        }

        .panel-summary-face-box {

            width: 64px;
            height: 64px;
            border: 1px solid #333;
            background: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-weight: bold;
            color: #999;
            text-transform: uppercase;
            font-size: 11px;
            line-height: 1.3;
            margin: 0 auto;

        }

        .panel-summary-rotate-btn {

            display: block;
            width: 64px;
            margin: 6px auto 0;
            height: 26px;
            background: #fff;
            border: 1px solid #c8c8c8;
            color: #333;
            font-size: 11px;
            cursor: pointer;

        }

        /* ===========================
   ZOOM
=========================== */

        .panel-summary-zoom {

            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 6px;

        }

        .panel-summary-zoom .zoom-btn {

            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1px solid #d6d6d6;
            background: #fff;
            font-size: 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;

        }

        .panel-summary-zoom .zoom-btn:hover {

            background: #f2f6fb;

        }

        /* ===========================
   SVG
=========================== */

        .panel-summary-drawing text {
            font-size: 11px;
            fill: #444;
            font-family: Arial, sans-serif;
        }

        .panel-summary-drawing .panel-board {
            fill: #fff;
            stroke: #222;
            stroke-width: 2;
        }

        .panel-edge-badge {
            fill: #dceafd;
            stroke: #999;
            stroke-width: 1;
        }

        .panel-edge-badge.active {
            fill: #fff;
            stroke-width: 2;
        }

        .panel-edge-badge-label {
            font-size: 10px;
            fill: #666;
        }

        /* LEFT COLUMN */
        .column-gallery {
            width: 400px;
            flex-shrink: 0;
            padding: 32px 24px 32px 32px;
            border-right: 1px solid #eee;
        }

        .panel-product-code {
            font-size: 12px;
            color: #888;
            margin-bottom: 14px;
        }

        /* Gallery */
        .pm-gallery {
            position: relative;
            margin-bottom: 12px;
        }

        .pm-gallery-slides {
            position: relative;
            overflow: hidden;
        }

        .pm-gallery-slide {
            display: none;
        }

        .pm-gallery-slide.active {
            display: block;
        }

        .pm-gallery-img {
            width: 100%;
            height: 280px;
            background: #e8e8e8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            color: #999;
            position: relative;
            overflow: hidden;
        }

        .pm-gallery-label {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0, 0, 0, 0.35);
            color: #fff;
            font-size: 11px;
            text-align: center;
            padding: 5px 0;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .pm-gallery-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.85);
            border: 1px solid #ddd;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 18px;
            color: #444;
            z-index: 2;
            user-select: none;
        }

        .pm-gallery-nav:hover {
            background: #fff;
        }

        .pm-gallery-nav-prev {
            left: 6px;
        }

        .pm-gallery-nav-next {
            right: 6px;
        }

        .pm-gallery-thumbs {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .pm-gallery-thumb {
            width: 62px;
            height: 62px;
            border: 2px solid #ddd;
            cursor: pointer;
            overflow: hidden;
            flex-shrink: 0;
        }

        .pm-gallery-thumb.active {
            border-color: #333;
        }

        .pm-gallery-thumb-img {
            width: 100%;
            height: 100%;
            background: #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: #aaa;
        }

        .panel-title {
            font-size: 20px;
            font-weight: 600;
            color: #222;
            margin: 0 0 2px;
        }

        .panel-name {
            font-size: 15px;
            color: #555;
            margin-bottom: 18px;
        }

        .panel-modal__label {
            font-size: 13px;
            font-weight: 700;
            color: #222;
            text-transform: none;
            letter-spacing: normal;
            margin: 14px 0 6px;
        }

        .panel-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            margin-bottom: 0;
            border-spacing: 0;
        }

        .panel-table td {
            padding: 5px 0;
            border-bottom: 1px solid #f0f0f0;
            color: #444;
        }

        .panel-table td.left {
            color: #888;
            width: 55%;
        }

        .panel-table td.right {
            font-weight: 500;
            text-align: right;
        }

        /* RIGHT COLUMN */
        .column-description {
            flex: 1;
            padding: 32px 32px 32px 28px;
            overflow-y: auto;
            max-height: 82vh;
        }

        .SimpleTabs__tabs {
            display: flex;
            gap: 8px;
            margin-top: 22px;
            margin-bottom: 16px;
        }

        .SimpleTabs__tab-btn {
            height: 34px;
            padding: 0 24px;
            font-size: 13px;
            font-weight: 500;
            background: #fff;
            border: 1px solid var(--primary-color);
            color: var(--primary-color);
            cursor: pointer;
            width: auto;
            transition: background 0.12s, color 0.12s;
        }

        .SimpleTabs__tab-btn.active {
            background: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
        }

        .SimpleTabs__tab-content>div {
            display: none;
        }

        .SimpleTabs__tab-content>div.active {
            display: block;
        }

        .panel-modal__product-description {
            font-size: 13px;
            color: #555;
            line-height: 1.7;
            margin-bottom: 12px;
        }

        .panel-modal__product-description p {
            margin: 0 0 10px 0;
        }

        .panel-modal__product-description p:last-child {
            margin-bottom: 0;
        }

        .pm-thickness-label {
            font-size: 13px;
            color: #555;
            margin: 18px 0 8px;
        }

        .pm-thickness-options {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }

        .pm-thickness-option input[type="radio"] {
            display: none;
        }

        .pm-thickness-option label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid #c8c8c8;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            color: #888;
            transition: background 0.12s, border-color 0.12s, color 0.12s;
        }

        .pm-thickness-option input[type="radio"]:checked+label {
            background: var(--primary-color);
            border-color: var(--primary-color);
            color: #fff;
            font-weight: 600;
        }

        .pm-thickness-option label:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }

        .pricing-levels__table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            margin-top: 12px;
            border-spacing: 0;
        }

        .pricing-levels__table td {
            padding: 9px 10px;
            border: 1px solid #eee;
            color: #555;
        }

        .pricing-levels__table td.pricing-levels__label {
            background: #f9f9f9;
        }

        .pricing-levels__table td.price-val {
            text-align: right;
            color: #222;
            font-weight: 500;
        }

        .pm-downloads {
            display: flex;
            gap: 24px;
            margin: 14px 0 18px;
            flex-wrap: wrap;
        }

        .pm-download-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: var(--primary-color);
            text-decoration: none;
            cursor: pointer;
        }

        .pm-download-link:hover {
            text-decoration: underline;
        }

        .pm-download-link svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .pm-downloads-title {
            font-size: 13px;
            color: #555;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .pm-downloads a {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: var(--primary-color);
            text-decoration: none;
            padding: 4px 0;
        }

        .pm-downloads a:hover {
            text-decoration: underline;
        }

        .pm-mfr-link {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            color: var(--primary-color);
            text-decoration: none;
            margin-top: 14px;
        }

        .pm-mfr-link:hover {
            text-decoration: underline;
        }

        /* ADDITIONAL PANEL INFORMATION POPUP — opened from a row's edit
           (pencil) icon; see .icon.edit's click handler in cutlist-main.js,
           which only toggles the .open class below. Position is CSS only,
           no JS measuring/clamping: anchored to .actions-inner (position:
           relative, set above) with right: 0, which pins it to the Actions
           column's own right edge — since Actions is the last column, that
           edge is also the table's own right edge, so the popup can never
           run past it. It opens leftward over the row instead. */
        .panel-info-popup {
            display: none;
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 6px;
            width: 260px;
            box-sizing: border-box;
            background: #fff;
            border: 1px solid #2b78c8;
            border-radius: 8px;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
            padding: 14px;
            z-index: 200;
            font-family: inherit;
            text-align: left;
        }

        .panel-info-popup.open {
            display: block;
        }

        .panel-info-title {
            font-size: 14px;
            font-weight: 700;
            color: #1c1c1c;
            margin-bottom: 10px;
        }

        .panel-info-textarea {
            display: block;
            width: 100%;
            box-sizing: border-box;
            height: 64px;
            resize: vertical;
            border: 1px solid #d6dbe1;
            border-radius: 4px;
            padding: 8px 10px;
            font-family: inherit;
            font-size: 13px;
            color: #333;
        }

        .panel-info-textarea:focus {
            outline: none;
            border-color: #2b78c8;
        }

        .panel-info-textarea::placeholder {
            color: #a8b0b7;
        }

        .panel-info-counter {
            margin-top: 6px;
            text-align: right;
            font-size: 11px;
            color: #9aa2a9;
        }

        /* DECOR SELECTION POPUP */
        .decor-popup {
            display: none;
            position: absolute;
            width: 925px;
            background: #fff;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 12px 14px;
            z-index: 9999;
        }

        .decor-popup-search-wrap {
            position: relative;
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            background: #f8fafc;
            border: 1.5px solid #e2e8f0;
            border-radius: 8px;
            padding: 0 12px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }

        .decor-popup-search-wrap:focus-within {
            border-color: var(--primary-color, #0f766e);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
        }

        .decor-popup-search-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #94a3b8;
            margin-right: 8px;
            flex-shrink: 0;
        }

        .decor-popup-search-input {
            flex: 1;
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
            outline: none !important;
            padding: 8px 0 !important;
            font-size: 13.5px !important;
            font-family: inherit !important;
            color: #1e293b !important;
            line-height: 1.4 !important;
            height: auto !important;
        }

        .decor-popup-search-input::placeholder {
            color: #94a3b8;
            font-size: 13px;
        }

        .decor-popup-search-clear {
            display: none;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border: none;
            background: #e2e8f0;
            color: #64748b;
            border-radius: 50%;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
            padding: 0;
            margin-left: 6px;
            flex-shrink: 0;
            transition: background 0.15s ease, color 0.15s ease;
        }

        .decor-popup-search-clear:hover {
            background: #cbd5e1;
            color: #0f172a;
        }

        .supplier-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 12px;
        }

        .supplier-tab {
            border: 1px solid var(--primary-color);
            color: var(--primary-color);
            background: #fff;
            padding: 8px 18px;
            cursor: pointer;
            font-size: 14px;
            border-radius: 20px;
        }

        .supplier-tab.active {
            background: var(--primary-color);
            color: #fff;
        }

        .product-list {
            display: none;
            max-height: 115px;
            overflow-y: scroll;
            padding-right: 6px;
        }

        .product-list::-webkit-scrollbar {
            width: 6px;
        }

        .product-list::-webkit-scrollbar-track {
            background: #f1f5f9;
            border-radius: 4px;
        }

        .product-list::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }

        .product-list::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

        .decor-search-results {
            max-height: 115px;
            overflow-y: scroll;
        }

        .product-list.active {
            display: block;
        }

        .decor-popup-loading,
        .decor-popup-scroll-loader {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 24px 10px;
            color: #64748b;
            font-size: 14px;
            font-weight: 500;
        }

        .decor-popup-scroll-loader {
            padding: 12px 10px;
        }

        .decor-popup-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 2.5px solid #e2e8f0;
            border-top-color: var(--primary-color, #16a34a);
            border-radius: 50%;
            animation: decorPopupSpin 0.7s linear infinite;
        }

        @keyframes decorPopupSpin {
            to {
                transform: rotate(360deg);
            }
        }

        .decor-popup-empty,
        .decor-popup-error {
            text-align: center;
            padding: 28px 12px;
            color: #64748b;
            font-size: 14px;
        }

        .decor-popup-error {
            color: #dc2626;
        }

        .product-row {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr;
            padding: 8px 6px;
            color: #333;
            font-size: 14px;
            cursor: pointer;
            border-radius: 4px;
            transition: background 0.15s ease;
        }

        .product-row:hover {
            background: #f3f3f3;
        }

        .more {
            color: var(--primary-color);
            font-weight: 500;
        }

        input:disabled {
            background: #e9e9e9;
            cursor: not-allowed;
            opacity: 0.7;
        }

        td input.invalid {
            border-color: #e02020;
        }

        /* Grain match checkbox is only offered for grain-matching decors (H1228-TM12) */
        .table-area .grain input[type="checkbox"] {
            visibility: hidden;
        }

        .table-area tr.grain-allowed .grain input[type="checkbox"] {
            visibility: visible;
        }

        /* GRAIN MATCHING DETAILS */
        .grain-details {
            margin: 30px 0 10px;
            border: 1px solid #eee;
            padding: 24px 28px 32px;
        }

        .grain-details h2 {
            margin: 0 0 18px;
            font-size: 22px;
            font-weight: 700;
            color: #1a1a1a;
        }

        .grain-notice {
            background: #fbe3cd;
            color: #e0713d;
            font-size: 14px;
            line-height: 1.8;
            padding: 16px 20px;
            margin-bottom: 28px;
        }

        .grain-cols {
            display: flex;
            gap: 28px;
            align-items: stretch;
        }

        .grain-col {
            flex: 1;
            min-width: 0;
        }

        .grain-col h3 {
            margin: 0 0 14px;
            font-size: 17px;
            font-weight: 400;
            color: #1a1a1a;
        }

        .grain-dropzone {
            border: 1px solid #9db8d2;
            padding: 20px 22px;
            font-size: 13px;
            line-height: 1.7;
            color: #333;
            height: 200px;
        }

        .grain-dropzone.dragover {
            border-color: var(--primary-color);
            background: #f4faf1;
        }

        .grain-dropzone a {
            color: #2b78c8;
            text-decoration: none;
            cursor: pointer;
            display: inline-block;
            margin-top: 12px;
        }

        .grain-dropzone a:hover {
            text-decoration: underline;
        }

        .grain-file-list {
            margin-top: 10px;
            font-size: 12px;
            color: #444;
        }

        .grain-info-textarea {
            width: 100%;
            height: 200px;
            border: 1px solid #ccc;
            padding: 12px 14px;
            font-family: inherit;
            font-size: 13px;
            color: #333;
            resize: vertical;
        }

        .grain-info-textarea::placeholder {
            color: #aaa;
        }

        .grain-help-box {
            border: 1px solid #9db8d2;
            padding: 22px;
            height: 200px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .grain-direction {
            font-size: 13px;
            color: #555;
            width: 80%;
            text-align: center;
            margin-bottom: 4px;
        }

        .grain-arrow-line {
            position: relative;
            width: 80%;
            height: 1px;
            background: #555;
            margin-bottom: 12px;
        }

        .grain-arrow-line::before,
        .grain-arrow-line::after {
            content: "";
            position: absolute;
            top: 50%;
            width: 7px;
            height: 7px;
            border-top: 1px solid #555;
            border-right: 1px solid #555;
        }

        .grain-arrow-line::before {
            left: 0;
            transform: translateY(-50%) rotate(-135deg);
        }

        .grain-arrow-line::after {
            right: 0;
            transform: translateY(-50%) rotate(45deg);
        }

        .grain-diagram {
            display: flex;
            width: 80%;
            height: 90px;
            border: 1px solid #999;
        }

        .grain-cell {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
            background: repeating-linear-gradient(90deg, #fafafa 0, #fafafa 6px, #f0f0f0 6px, #f0f0f0 8px);
            border-right: 1px solid #999;
        }

        .grain-cell:last-child {
            border-right: none;
        }

        .grain-cell.big {
            flex: 1.4;
            font-size: 34px;
        }

        .grain-mid {
            flex: 1;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #999;
        }

        .grain-mid .grain-cell {
            flex: 1;
            font-size: 16px;
            border-right: none;
            border-bottom: 1px solid #999;
        }

        .grain-mid .grain-cell:last-child {
            border-bottom: none;
        }

        .grain-labels {
            display: flex;
            width: 80%;
            margin-top: 6px;
        }

        .grain-label {
            flex: 1;
            text-align: center;
            font-size: 11px;
            letter-spacing: 0.04em;
            color: #999;
        }

        .grain-label.big {
            flex: 1.4;
        }

        td.grain,
        .grain {
            text-align: center;
            vertical-align: middle;
            white-space: nowrap;
        }

        .grain input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            vertical-align: middle;
            margin: 0;
        }

        .grain input[type="checkbox"]:disabled {
            cursor: not-allowed;
        }

        .grain-letter {
            display: none;
            min-width: 18px;
            height: 18px;
            padding: 0 3px;
            border: 1px solid #999;
            border-radius: 3px;
            font-size: 11px;
            font-weight: 700;
            color: #555;
            text-align: center;
            line-height: 16px;
            vertical-align: middle;
            margin-left: 6px;
            box-sizing: border-box;
        }

        .grain-letter.visible {
            display: inline-block;
        }

        /* Right-aligned, not centred: the icons are visibility:hidden until
           a row is unlocked, and hidden elements still take up space — so
           centring put the × in a different place on a data row (3 icons)
           than on a section row (1 icon). Anchoring to the end keeps the ×
           in the same column on every row regardless of icon count. */
        .actions-inner {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
        }

        .actions .icon {
            visibility: hidden;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-color);
            font-size: 17px;
            cursor: pointer;
            user-select: none;
        }

        tr.unlocked .actions .icon {
            visibility: visible;
        }

        .actions .icon svg {
            display: block;
        }

        .actions .icon.move {
            color: #b7c400;
            cursor: grab;
        }

        /* Row currently being dragged via the move handle — see the
           dragstart/dragend handlers in cutlist-main.js. Faded rather than
           hidden so its place in the list stays visible while it's being
           repositioned. */
        tr.row-dragging {
            opacity: 0.4;
        }

        .actions .icon.edit {
            color: var(--primary-color);
        }

        .actions .icon.view {
            color: #3f8fd1;
        }

        /* Muted until hovered — a permanent row of red crosses pulls the
           eye to the one destructive control on every row. */
        .actions .delete {
            color: #c7ccd1;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            transition: color 0.15s ease;
        }

        .actions .delete:hover {
            color: #e5342b;
        }

        /* Row hover highlight */
        /* A neutral tint rather than the old yellow — row hover is a
           pointer cue, not a warning, and yellow competes with the
           genuinely coloured states (invalid fields, grain notices). */
        .table-area table tr:not(.header-row):not(.section-row):hover {
            background-color: #f5f8fa69;
        }

        /* Section row */
        .section-row {
            background: #fff;
        }

        .section-row td {
            padding: 0;
            vertical-align: middle;
            border-top: 1px solid #eee;
            border-bottom: 1px solid #eee;
        }

        .section-row td.sr-input-cell {
            padding: 5px 8px;
        }

        /* `.section-row td { padding: 0 }` above lets the name input span
           its cell edge to edge, but it also strips the 5px right padding
           every other td gets from the global `td` rule — which pushed this
           row's × 5px further right than the one on every data row. */
        .section-row td.actions {
            padding-right: 5px;
        }

        .section-name-input {
            display: block;
            width: 100%;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 2px;
            background: #fff;
            font-size: 13px;
            color: #333;
            padding: 5px 10px;
            outline: none;
        }

        .section-name-input:focus {
            border-color: #e04040;
            outline: none;
        }

        .section-name-input::placeholder {
            color: #bbb;
            font-style: italic;
        }

        .section-row .icon.move {
            /* .actions .icon is hidden until its row gets .unlocked (a
               decor picked), which a section row never does — without
               this override its own move handle would stay invisible and
               undraggable forever. */
            visibility: visible;
            color: var(--primary-color);
            cursor: grab;
        }

        .section-row .actions-inner {
            gap: 8px;
            justify-content: flex-end;
        }

        /* Row-insert overlay */
        #clInsertOverlay {
            display: none;
            position: fixed;
            z-index: 300;
            pointer-events: none;
        }

        .cl-insert-strip {
            position: absolute;
            left: 0;
            right: 0;
            height: 22px;
            display: flex;
            align-items: center;
            cursor: pointer;
            pointer-events: all;
            background: transparent;
        }

        .cl-insert-strip.top {
            top: 0;
            transform: translateY(-50%);
        }

        .cl-insert-strip.bottom {
            bottom: 0;
            transform: translateY(50%);
        }

        .cl-insert-plus {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
            margin-right: 5px;
            border: 1.5px solid var(--primary-color);
            background: #fff;
            color: var(--primary-color);
            font-size: 14px;
            font-weight: 700;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cl-insert-label {
            font-size: 8px;
            color: #a79696;
            white-space: nowrap;
            flex-shrink: 0;
            padding-right: 6px;
            background: #fff;
        }

        .cl-insert-rule {
            height: 1px;
            background: #ccc;
            width: 10px;
        }

        .cl-insert-strip:hover .cl-insert-label {
            color: var(--primary-color);
        }

        .cl-insert-strip:hover .cl-insert-rule {
            background: var(--primary-color);
        }

        .cl-insert-strip:hover .cl-insert-plus {
            background: var(--primary-color);
            color: #fff;
        }

        button:disabled {
            color: #bbb;
            border-color: #ddd;
            cursor: not-allowed;
        }

        /* SPRAY FINISHING OVERLAY SIDEBAR */
        #spraySelectWrap::before {
            content: "Select spray finishing option";
        }

        .spray-sidebar {
            width: 380px;
            border-right: 1px solid #e5e7eb;
            padding: 22px 18px;
            overflow-y: auto;
            font-size: 13px;
            background: #ffffff;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
        }

        .spray-pill-row {
            display: flex;
            gap: 8px;
            margin-bottom: 14px;
        }

        .spray-pill {
            flex: 1;
            background: var(--primary-color);
            color: #fff;
            font-size: 14px;
            font-weight: 700;
            padding: 0 14px;
            display: flex;
            align-items: center;
            height: 42px;
            border-radius: 8px 0 0 8px;
        }

        .spray-label {
            font-weight: 700;
            font-size: 13px;
            color: #111827;
            margin: 16px 0 8px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .spray-sides {
            display: flex;
            gap: 10px;
            align-items: flex-start;
        }

        .spray-side {
            flex: 1;
        }

        .spray-side-btn {
            display: block;
            width: 100%;
            height: auto;
            margin: 0;
            border: 1.5px solid var(--primary-color);
            border-radius: 8px;
            background: #fff;
            color: var(--primary-color);
            cursor: pointer;
            padding: 10px 6px;
            text-align: center;
            font-size: 13px;
            font-weight: 700;
            font-family: inherit;
            transition: all 0.15s ease;
        }

        .spray-side-btn small {
            display: block;
            font-size: 11px;
            font-weight: 500;
            margin-top: 2px;
        }

        .spray-side-btn.selected {
            background: var(--primary-color);
            color: #fff;
        }

        .spray-side-btn:disabled {
            cursor: not-allowed;
            opacity: 0.9;
        }

        .spray-b-type-wrap {
            margin-top: 6px;
        }

        .spray-b-type-select {
            width: 100%;
            height: 34px;
            border: 1.5px solid var(--primary-color);
            border-radius: 6px;
            background: #ffffff;
            color: #1f2937;
            padding: 0 24px 0 8px;
            font-size: 11px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            box-sizing: border-box;
            outline: none;
            appearance: auto;
            -webkit-appearance: auto;
        }

        .spray-b-type-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.2);
        }

        .spray-return-edges-wrap {
            margin-top: 6px;
            padding: 8px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
        }

        .spray-return-edges-title {
            font-size: 11px;
            font-weight: 600;
            color: #475569;
            margin-bottom: 6px;
        }

        .spray-return-edges-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 4px;
        }

        .spray-return-edge-item {
            display: flex;
            align-items: center;
            gap: 3px;
            font-size: 11px;
            font-weight: 600;
            color: #1e293b;
            cursor: pointer;
        }

        .spray-return-edge-cb {
            accent-color: var(--primary-color);
            cursor: pointer;
            margin: 0;
        }

        .spray-side-note {
            background: #edf7ed;
            color: #2e7d32;
            font-size: 11px;
            font-weight: 500;
            text-align: center;
            padding: 4px 6px;
            border-radius: 6px;
            margin-top: 4px;
        }

        .spray-finish-cards {
            display: flex;
            gap: 10px;
        }

        .spray-finish-card {
            flex: 1;
            height: auto;
            width: auto;
            margin: 0;
            border: 1.5px solid var(--primary-color);
            border-radius: 8px;
            background: #fff;
            color: var(--primary-color);
            text-align: center;
            padding: 14px 8px;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.15s ease;
        }

        .spray-finish-card.selected {
            background: var(--primary-color);
            color: #fff;
        }

        .spray-finish-title {
            font-size: 14px;
            font-weight: 700;
        }

        .spray-finish-sub {
            font-size: 11px;
            margin-top: 3px;
            line-height: 1.4;
        }

        .spray-finish-price {
            font-size: 18px;
            font-weight: 700;
            margin-top: 8px;
        }

        .spray-finish-unit {
            font-size: 11px;
        }

        .spray-fields {
            display: flex;
            gap: 10px;
            margin-top: 16px;
        }

        .spray-field {
            flex: 1;
            min-width: 0;
        }

        .spray-field label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #111827;
            margin-bottom: 6px;
        }

        .spray-field select,
        .spray-field input {
            width: 100%;
            height: 40px;
            border: 1px solid #d0d5dd;
            border-radius: 8px;
            padding: 0 10px;
            font-size: 13px;
            background: #fff;
            box-sizing: border-box;
        }

        .spray-field select:focus,
        .spray-field input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
        }

        .spray-boption {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-top: 16px;
            padding: 12px;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            font-size: 12px;
            color: #374151;
            line-height: 1.4;
        }

        .spray-boption input[type="checkbox"] {
            width: 18px;
            height: 18px;
            flex: 0 0 auto;
            accent-color: var(--primary-color);
            cursor: pointer;
        }

        .spray-total-row {
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid #e5e7eb;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            font-weight: 600;
            color: #111827;
        }

        .spray-total-row strong {
            font-size: 20px;
            color: var(--primary-color);
        }

        .spray-area-box {
            width: 92px;
            background: #fff;
            border: 1px solid #d0d5dd;
            border-radius: 8px;
            text-align: center;
            padding: 10px 6px;
            font-size: 12px;
            color: #6b7280;
            font-weight: 500;
        }

        .spray-area-value {
            font-size: 24px;
            font-weight: 700;
            color: #111827;
        }

        .spray-rotate-btn {
            margin: 10px 0 0;
            width: 90px;
            height: 34px;
            background: #fff;
            border: 1.5px solid var(--primary-color);
            border-radius: 8px;
            color: var(--primary-color);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            padding: 0;
            transition: all 0.15s ease;
        }

        .spray-rotate-btn:hover {
            background: var(--primary-color);
            color: #fff;
        }

        .spray-save-btn {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 160px;
            height: 44px;
            margin: 0;
            background: var(--primary-color);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: background 0.15s ease;
        }

        .spray-save-btn:hover {
            background: #146c43;
        }

        #sprayOverlay .machining-zoom {
            bottom: 90px;
        }

        td.machining,
        td.spray,
        .machining,
        .spray,
        .text-center {
            text-align: center;
        }

        .machining .add-btn,
        .spray .add-btn {
            display: none;
            height: auto;
            width: auto;
            padding: 2px;
            margin: 0 auto;
            background: transparent;
            border: none;
            vertical-align: middle;
            cursor: pointer;
            line-height: 1;
        }

        .machining .add-btn.visible,
        .spray .add-btn.visible {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .machining .add-btn svg,
        .spray .add-btn svg {
            width: 24px;
            height: 24px;
            display: block;
            margin: 0 auto;
        }

        .text-right {
            text-align: right;
        }

        /* EDGE FINISH POPUP */
        /* This popup is blue-themed rather than using the app's green
           --primary-color: it sits over the edgebanding columns, which are
           blue throughout (tabs, highlights, diagram callouts). */
        .edge-popup {
            --edge-accent: #1a9d5c;
            --edge-accent-tint: #eaf7ef;
            display: none;
            position: absolute;
            width: 400px;
            max-height: calc(100vh - 50px);
            overflow-y: auto;
            background: #fff;
            border: 1px solid #e2e6ea;
            border-radius: 10px;
            box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.16);
            z-index: 9999;
            font-size: 14px;
            color: #333;
        }

        .edge-popup-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 16px 10px 16px;
            border-bottom: 1px solid #eee;
        }

        .edge-popup-title {
            font-size: 15px;
            font-weight: 700;
            color: #222;
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }

        .edge-popup-close {
            color: #8a8f94;
            cursor: pointer;
            font-size: 20px;
            font-weight: bold;
            line-height: 1;
        }

        .edge-popup-subtitle {
            padding: 4px 16px 0;
            font-size: 13px;
        }

        .edge-popup-subtitle-edge {
            color: var(--edge-accent);
            font-weight: 700;
        }

        .edge-popup-subtitle-type {
            color: var(--edge-accent);
            margin-left: 2px;
        }

        /* One of the four edge labels around the diagram. Only the edge
           currently being edited takes the accent. */
        .edge-face-label.active {
            color: var(--edge-accent);
            font-weight: bold;
        }

        /* Tinted panel behind the diagram — the labels (W1/W2/L1/L2 and the
           dimensions) sit on the tint, and only the drawn panel itself is a
           plain white card. */
        .edge-diagram {
            margin: 10px 16px 0;
            padding: 10px 6px 12px;
            background: var(--edge-accent-tint);
            border-radius: 8px;
            text-align: center;
        }

        .edge-top-label {
            color: #6b9c80;
            font-size: 13px;
            padding: 2px 0 8px;
        }

        .edge-diagram-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .edge-side-label {
            color: #6b9c80;
            font-size: 13px;
            flex-shrink: 0;
        }

        /* Width and height are set per row from the entered dimensions (see
           renderEdgePopup), so the drawing is the shape of the real panel.
           A max-height clamp here used to squash every tall panel back into
           a square, and `flex: 1` let wide ones grow past the popup — both
           are now handled by sizing the box in JS instead. */
        .edge-diagram-card {
            position: relative;
            flex: 0 0 auto;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            background: #fff;
            border: 1px solid #d3ded8;
            padding: 10px 12px 12px;
            width: 196px;
            height: 130px;
        }

        .edge-dim-top {
            color: #999;
            font-size: 13px;
        }

        /* Three columns with equal 1fr gutters: the dimension sits in the
           first, the arrow in the middle. Equal gutters keep the arrow
           centred on the card, while still reserving space so it can't run
           into the dimension text on a narrow (tall-panel) card — which is
           what absolute positioning allowed. */
        .edge-card-body {
            position: relative;
            flex: 1;
            display: grid;
            grid-template-columns: 1fr minmax(0, auto) 1fr;
            align-items: center;
            padding: 6px 0;
        }

        .edge-highlight {
            position: absolute;
            background: transparent;
            z-index: 2;
            pointer-events: none;
            transition: background 0.15s ease;
        }

        .edge-highlight.top {
            top: -2px;
            left: 0;
            right: 0;
            height: 3px;
        }

        .edge-highlight.bottom {
            bottom: -2px;
            left: 0;
            right: 0;
            height: 3px;
        }

        .edge-highlight.left {
            top: 0;
            bottom: 0;
            left: -2px;
            width: 3px;
        }

        .edge-highlight.right {
            top: 0;
            bottom: 0;
            right: -2px;
            width: 3px;
        }

        .edge-highlight.active {
            background: #5da344;
        }

        .edge-dim-side {
            justify-self: start;
            color: #999;
            font-size: 13px;
            white-space: nowrap;
        }

        /* Two-shaft arrow, drawn rather than the "↔" glyph so the weight
           and length match the reference at any font size. It scales down
           on a narrow card instead of overflowing. */
        .edge-grain-arrow {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
        }

        .edge-grain-arrow svg {
            display: block;
            width: 100%;
            max-width: 74px;
            height: auto;
        }

        .edge-grain-caption {
            color: #999;
            font-size: 12px;
        }

        .edge-bottom-label {
            text-align: center;
            color: #6b9c80;
            font-size: 13px;
            padding: 6px 0 0;
        }

        .edge-tabs {
            display: flex;
            gap: 8px;
            margin: 14px 16px 0;
        }

        .edge-tab {
            flex: 1;
            text-align: center;
            padding: 8px 0;
            background: #fff;
            color: #666;
            cursor: pointer;
            font-size: 13px;
            border: 1px solid #e2e6ea;
            border-radius: 8px;
        }

        .edge-tab:hover:not(.active) {
            border-color: #c8d0d6;
        }

        .edge-tab.active {
            background: var(--edge-accent-tint);
            color: var(--edge-accent);
            font-weight: bold;
            border-color: var(--edge-accent);
        }

        .edge-tab-value {
            font-size: 11px;
            margin-top: 2px;
            color: #8a8f94;
        }

        .edge-tab.active .edge-tab-value {
            color: var(--edge-accent);
        }

        .edge-section-label {
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 16px 16px 8px;
            font-size: 13px;
            color: #333;
        }

        .edge-section-info {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 15px;
            height: 15px;
            border-radius: 50%;
            border: 1px solid #b0b6bb;
            color: #8a8f94;
            font-size: 10px;
            font-style: italic;
            cursor: help;
        }

        .edge-tape-selector-wrap {
            position: relative;
            margin: 0 16px;
            width: calc(100% - 32px);
        }

        .edge-summary {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            height: auto;
            margin: 0;
            text-align: left;
            padding: 10px 12px;
            background: #fff;
            border: 1px solid #e2e6ea;
            border-radius: 8px;
            cursor: pointer;
            font: inherit;
            box-sizing: border-box;
            transition: border-color 0.15s, background 0.15s;
        }

        .edge-summary:hover:not(:disabled) {
            border-color: #c8d0d6;
        }

        /* No edging tape is matched to this row's decor, so there's nothing
           to apply — see edgeTapeForRow(). */
        .edge-summary:disabled {
            cursor: not-allowed;
            color: #a8b0b7;
        }

        .edge-summary:disabled .edge-summary-desc {
            color: #b4bcc3;
        }

        /* Tinted once the tape is applied to the edge being edited. */
        .edge-summary.selected {
            border-color: var(--edge-accent);
            background: var(--edge-accent-tint);
        }

        .edge-summary-radio {
            flex: 0 0 auto;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid #c8d0d6;
            box-sizing: border-box;
            transition: all 0.15s;
        }

        .edge-summary.selected .edge-summary-radio {
            border-color: var(--edge-accent);
            border-width: 5px;
        }

        .edge-summary-image {
            flex: 0 0 auto;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            border: 1px solid #e2e8f0;
        }

        .edge-summary-text {
            display: flex;
            flex-direction: column;
            min-width: 0;
            flex: 1;
        }

        .edge-summary-code {
            font-weight: bold;
            font-size: 13.5px;
            color: #1e293b;
        }

        .edge-summary-desc {
            color: #64748b;
            font-size: 12.5px;
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .edge-summary-chevron {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            padding: 4px;
            border-radius: 4px;
            transition: transform 0.2s ease, color 0.15s ease;
        }

        .edge-summary-chevron:hover {
            color: #1e293b;
            background: rgba(0, 0, 0, 0.05);
        }

        .edge-tape-selector-wrap.is-open .edge-summary-chevron svg {
            transform: rotate(180deg);
        }

        /* Edge Tape Dropdown */
        .edge-tape-dropdown {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            z-index: 1000;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
            max-height: 270px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-sizing: border-box;
        }

        .edge-tape-dropdown-search {
            padding: 8px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
        }

        .edge-tape-dropdown-search input {
            width: 100%;
            padding: 6px 10px;
            font-size: 12.5px;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            outline: none;
            box-sizing: border-box;
            background: #fff;
            color: #1e293b;
        }

        .edge-tape-dropdown-search input:focus {
            border-color: var(--edge-accent, #1a9d5c);
            box-shadow: 0 0 0 2px rgba(26, 157, 92, 0.15);
        }

        .edge-tape-dropdown-list {
            overflow-y: auto;
            max-height: 210px;
            padding: 4px 0;
        }

        .edge-tape-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            cursor: pointer;
            transition: background 0.12s;
            text-align: left;
            border-left: 3px solid transparent;
        }

        .edge-tape-option:hover {
            background: #f1f5f9;
        }

        .edge-tape-option.is-selected {
            background: var(--edge-accent-tint, #eaf7ef);
            border-left-color: var(--edge-accent, #1a9d5c);
        }

        .edge-tape-option-img {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            object-fit: cover;
            flex: 0 0 auto;
            border: 1px solid #e2e8f0;
            background: #e2e8f0;
        }

        .edge-tape-option-info {
            flex: 1;
            min-width: 0;
        }

        .edge-tape-option-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
        }

        .edge-tape-option-code {
            font-size: 12.5px;
            font-weight: 700;
            color: #0f172a;
        }

        .edge-tape-default-badge {
            font-size: 9.5px;
            font-weight: 700;
            padding: 1px 5px;
            border-radius: 4px;
            background: #dbeafe;
            color: #1d4ed8;
            letter-spacing: 0.3px;
        }

        .edge-tape-stock-badge {
            font-size: 9.5px;
            font-weight: 700;
            padding: 1px 5px;
            border-radius: 4px;
            letter-spacing: 0.3px;
            margin-left: 4px;
        }

        .edge-tape-stock-badge.out-of-stock {
            background: #fee2e2;
            color: #b91c1c;
        }

        .edge-tape-stock-badge.low-stock {
            background: #fef3c7;
            color: #b45309;
        }

        .edge-summary-oos-tag {
            display: inline-block;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 700;
            background: #fee2e2;
            color: #b91c1c;
            margin-left: 4px;
            vertical-align: middle;
        }

        .edge-summary-lowstock-tag {
            display: inline-block;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 700;
            background: #fef3c7;
            color: #b45309;
            margin-left: 4px;
            vertical-align: middle;
        }

        .edge-tape-option-desc {
            font-size: 11.5px;
            color: #64748b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 1px;
        }

        .edge-tape-option-size {
            font-size: 11px;
            color: #94a3b8;
            margin-top: 1px;
        }

        .edge-finish-options {
            display: flex;
            gap: 10px;
            margin: 0 16px;
        }

        .edge-finish-option {
            flex: 1;
            text-align: center;
            color: #666;
            font-size: 12px;
            line-height: 1.35;
            cursor: pointer;
            padding: 14px 6px 12px;
            background: #fff;
            border: 1px solid #e2e6ea;
            border-radius: 8px;
        }

        .edge-finish-option.selected {
            background: var(--edge-accent-tint);
            border-color: var(--edge-accent);
            color: #222;
        }

        /* Finish this tape isn't available in (Edge Tape CPT toggles).
           Greyed rather than hidden, so it reads as "not for this tape"
           instead of the option having vanished. */
        .edge-finish-option.disabled {
            color: #a8b0b7;
            cursor: not-allowed;
            background: #f6f7f9;
        }

        .edge-finish-option.disabled .edge-finish-icon {
            border-color: #d8dde2;
            background: #fbfcfd;
        }

        .edge-finish-option.disabled path {
            stroke: #00000087;
        }

        .edge-finish-icon {
            width: 44px;
            height: 44px;
            margin: 0 auto 6px;
            border: 1px solid #999;
            background: #fff;
        }

        .edge-finish-icon.radius {
            border-radius: 10px 0 0 0;
        }

        .edge-finishing-link {
            display: block;
            text-align: center;
            color: var(--edge-accent);
            font-size: 13px;
            text-decoration: none;
            padding: 14px 10px;
        }

        .edge-finishing-link:hover {
            text-decoration: underline;
        }

        .edge-mode-toggle {
            display: flex;
            margin: 0 16px 16px;
            border-radius: 20px;
            overflow: hidden;
            border: 1px solid var(--edge-accent);
            display: none;
        }

        .edge-mode-toggle .mode-btn {
            flex: 1;
            border: none;
            background: #fff;
            color: var(--edge-accent);
            height: 34px;
            width: auto;
            font-size: 13px;
            margin: 0;
            cursor: pointer;
        }

        .edge-mode-toggle .mode-btn.active {
            background: var(--edge-accent);
            color: #fff;
        }

        /* MACHINING DETAILS OVERLAY */
        .machining-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }

        .machining-overlay.open {
            display: flex;
        }

        .machining-modal {
            width: 92%;
            max-width: 1400px;
            height: 90vh;
            max-height: 900px;
            background: #fff;
            display: flex;
            flex-direction: column;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
            border-radius: 8px;
            overflow: hidden;
        }

        .machining-context-bar {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 20px;
            background: #fdf3d7;
            border-bottom: 1px solid #ddd;
            font-size: 14px;
            color: #333;
        }

        .machining-context-bar .ctx-field {
            background: #fff;
            border: 1px solid #c8c8c8;
            height: 39px;
            min-width: 63px;
            display: flex;
            align-items: center;
            padding: 0 10px;
            color: #333;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ctx-rownum {
            border: none !important;
            background: none !important;
            min-width: auto !important;
            padding: 0 !important;
        }

        .ctx-decor {
            width: 220px;
        }

        .ctx-desc {
            width: 100px;
        }

        .ctx-edge {
            width: 54px;
            justify-content: center;
        }

        .machining-context-title {
            margin-left: auto;
            color: var(--primary-color);
            font-weight: bold;
            font-size: 16px;
        }

        .machining-context-close {
            color: var(--primary-color);
            font-size: 22px;
            cursor: pointer;
            margin-left: 20px;
            line-height: 1;
        }

        .machining-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }

        .machining-sidebar {
            width: 380px;
            border-right: 1px solid #e5e7eb;
            padding: 22px 18px;
            overflow-y: scroll;
            scrollbar-gutter: stable;
            font-size: 13px;
            background: #ffffff;
            box-sizing: border-box;
        }

        .machining-sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .machining-sidebar::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }

        .machining-sidebar::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 3px;
        }

        .machining-sidebar::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

        .machining-select-wrap {
            position: relative;
            margin-bottom: 18px;
        }

        .machining-select-wrap::before {
            content: "Select machining option";
            display: block;
            font-size: 13px;
            font-weight: 700;
            color: #111827;
            margin-bottom: 8px;
        }

        .machining-select-trigger,
        .machining-selected-value {
            width: 100%;
            min-height: 52px;
            box-sizing: border-box;
            border: 1.5px solid var(--primary-color);
            border-radius: 10px;
            padding: 8px 14px;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .machining-select-trigger:hover,
        .machining-selected-value:hover {
            border-color: #146c43;
            box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
        }

        .machining-selected-row {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
        }

        .machining-selected-content {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
        }

        .machining-selected-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #4b5563;
        }

        .machining-selected-text {
            display: flex;
            flex-direction: column;
        }

        .machining-selected-group {
            font-size: 11px;
            color: #6b7280;
            font-weight: 500;
            line-height: 1.2;
        }

        .machining-selected-title {
            font-size: 14px;
            font-weight: 700;
            color: #111827;
            line-height: 1.3;
        }

        .machining-selected-chevron {
            color: #6b7280;
            display: flex;
            align-items: center;
        }

        .machining-add-btn {
            height: 52px;
            padding: 0 18px;
            border: 1px solid var(--primary-color);
            border-radius: 10px;
            background: var(--primary-color);
            color: #ffffff;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            width: auto;
        }

        .machining-add-btn:hover {
            background: #146c43;
        }

        .machining-option-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            background: #fff;
            border: 1px solid #d6d6d6;
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
            padding: 6px 14px;
            z-index: 20;
            max-height: 320px;
            overflow-y: auto;
        }

        .machining-select-wrap.open .machining-option-dropdown {
            display: block;
        }

        .machining-option-group {
            margin-bottom: 6px;
        }

        .machining-option-header {
            font-weight: bold;
            color: #333;
            padding: 8px 0;
        }

        .machining-option-item {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #444;
            padding: 8px 10px;
            cursor: pointer;
            border-radius: 6px;
            transition: background 0.15s ease;
        }

        .machining-option-item-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .machining-option-item:hover {
            color: var(--primary-color);
        }

        .machining-option-item.selected {
            color: var(--primary-color);
            font-weight: bold;
        }

        .machining-option-item.disabled {
            color: #bbb;
            cursor: not-allowed;
        }

        /* APPLIED MACHINING OPTIONS (chip + detail panel, e.g. Angled cut) */

        .machining-applied-list {
            margin-top: 4px;
        }

        .machining-applied-item {
            margin-bottom: 16px;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            overflow: hidden;
            background: #ffffff;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
        }

        .machining-applied-chip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--primary-color);
            color: #ffffff;
            padding: 12px 16px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
        }

        .machining-applied-chip-title-wrap {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .machining-applied-collapse-btn {
            font-size: 18px;
            font-weight: 400;
            color: #ffffff;
            cursor: pointer;
            line-height: 1;
        }

        /* Hinge holes chip is blue rather than the app's green — matches
           the edge popup's accent (--edge-accent, #2b78c8, scoped to
           .edge-popup so not reusable as a variable here) since hinge
           drilling is an edge-boring operation like edgebanding, not a
           panel-shaping one. Angled cut / groove chips are unaffected. */
        .machining-applied-item--hinge .machining-applied-chip {
            background: var(--primary-color);
        }

        .machining-applied-remove {
            background: #fff;
            border: 1px solid #d9342b;
            color: #d9342b;
            width: 24px;
            height: 24px;
            line-height: 1;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            flex-shrink: 0;
            margin-left: 8px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

        .machining-applied-remove:hover {
            background: #d9342b;
            color: #fff;
        }

        .machining-applied-detail {
            padding: 18px 16px;
            font-size: 13px;
        }

        .machining-applied-item.collapsed .machining-applied-detail {
            display: none;
        }

        .machining-detail-label {
            font-weight: 600;
            color: #333;
            margin: 10px 0 6px;
        }

        .machining-detail-label:first-child {
            margin-top: 0;
        }

        .machining-groove-note {
            font-size: 12px;
            color: #888;
            margin: 10px 0;
        }

        /* HINGE HOLES panel — label on the left, control on the right, so
           the three settings line up as a small form rather than stacking
           the way the angled-cut panel does. */
        .machining-hinge-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 14px;
        }

        .machining-hinge-row .machining-detail-label {
            margin: 0;
            flex-shrink: 0;
        }

        .machining-hinge-edges {
            display: flex;
            gap: 14px;
        }

        /* Label above its radio, matching the reference where L1/L2/W1/W2
           sit as a row of headed buttons. */
        .machining-hinge-edge {
            display: flex;
            flex-direction: column-reverse;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            cursor: pointer;
        }

        .machining-hinge-count {
            width: 132px;
            flex-shrink: 0;
        }

        /* "Holes drilled on" specifically: the label sits at its natural
           width and the A/B toggle fills whatever's left, instead of both
           being squeezed by the row's justify-content:space-between the
           way the label+control rows above are — that squeeze was cutting
           the B side button off entirely. */
        .machining-hinge-view-row .machining-detail-label {
            flex-shrink: 0;
        }

        .machining-hinge-view-row .machining-toggle-row {
            flex: 1;
            min-width: 0;
        }



        /* Shown instead of the count when the panel is too small to take
           hinges — explains why rather than leaving an empty control. */
        .machining-hinge-note {
            font-size: 12px;
            line-height: 1.4;
            color: #a8600d;
            background: #fdf3e3;
            border: 1px solid #f0dcc0;
            border-radius: 6px;
            padding: 7px 9px;
            flex: 1;
        }

        /* SHELF HOLES panel — same label-left/control-right form as the
           hinge panel, but the controls are paired input fields rather
           than single ones, so the label keeps its natural width and the
           field pair takes the rest instead of both being pushed apart. */
        .machining-shelf-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 14px;
        }

        .machining-shelf-row .machining-detail-label {
            margin: 0;
            flex: 0 0 auto;
            min-width: 118px;
        }

        .machining-shelf-row .machining-offset-row {
            flex: 1;
            min-width: 0;
        }

        .machining-shelf-row .machining-select {
            flex: 0 0 auto;
            width: 132px;
            margin-left: auto;
        }

        .machining-shelf-edges {
            display: flex;
            gap: 22px;
            margin-left: auto;
        }

        /* Label above its radio, matching the edge pair shown as a headed
           pair of buttons in the reference. */
        .machining-shelf-edge {
            display: flex;
            flex-direction: column-reverse;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            cursor: pointer;
        }

        .machining-shelf-view-label {
            text-align: center;
        }

        /* Shelf drilling is a face operation like edgebanding rather than a
           panel-shaping one, so this panel carries the blue accent from the
           reference instead of the app's green. Scoped so the angled-cut,
           groove and hinge panels keep theirs. */
        .machining-applied-item--shelf .machining-applied-chip,
        .machining-applied-item--jhandle .machining-applied-chip {
            background: var(--primary-color);
        }

        .machining-applied-item--shelf .machining-toggle-btn,
        .machining-applied-item--jhandle .machining-toggle-btn {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }

        .machining-applied-item--shelf .machining-toggle-btn.selected,
        .machining-applied-item--jhandle .machining-toggle-btn.selected {
            background: var(--primary-color);
            color: #fff;
        }

        /* The disabled face keeps the greyed treatment, not the blue one
           above — it has to read as unavailable, not merely unselected. */
        .machining-applied-item--jhandle .machining-toggle-btn:disabled {
            border-color: #e0e4e8;
            color: #a8b0b7;
        }

        /* Holds the second column open so a lone control (Handle width,
           Handle ends) lines up under the second End points field instead
           of stretching across the row. */
        .machining-offset-field--spacer {
            visibility: hidden;
        }

        .machining-jhandle-edges {
            gap: 14px;
        }

        .machining-corner-picker {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
        }

        .machining-corner-option {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            color: #444;
            cursor: pointer;
        }

        .machining-corner-option.disabled {
            opacity: 0.45;
            cursor: not-allowed;
            pointer-events: none;
        }

        .machining-corner-option.disabled input {
            cursor: not-allowed;
        }

        .machining-corner-radio-row {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .machining-corner-radio-row input[type="radio"] {
            margin: 3px;
        }

        .machining-offset-row {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .machining-offset-field {
            flex: 1;
        }

        .machining-offset-field label {
            display: block;
            font-size: 12px;
            color: #666;
            margin-bottom: 4px;
        }

        .machining-offset-input {
            width: 100%;
            box-sizing: border-box;
            height: 32px;
            border: 1px solid #c8c8c8;
            padding: 0 8px;
            font-size: 13px;
        }

        .machining-toggle-row {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .machining-toggle-btn {
            flex: 1;
            border: 1px solid var(--primary-color);
            background: #fff;
            color: var(--primary-color);
            padding: 7px 4px;
            font-size: 12px;
            font-family: inherit;
            cursor: pointer;
            text-align: center;
            height: auto;
        }

        /* Edge finish the selected tape isn't available in — see the
           Radius/Square toggles on the Edge Tape CPT. Greyed rather than
           hidden so it's clear the option exists but not for this tape. */
        .machining-toggle-btn:disabled {
            border-color: #e0e4e8;
            background: #f6f7f9;
            color: #a8b0b7;
            cursor: not-allowed;
        }

        .machining-toggle-btn small {
            display: block;
            font-size: 10px;
            font-weight: 400;
            margin-top: 2px;
        }

        .machining-toggle-btn.selected {
            background: var(--primary-color);
            color: #fff;
        }

        .machining-preview-box {
            margin-top: 14px;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            background: #ffffff;
            padding: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 120px;
            overflow: hidden;
        }

        .machining-preview-img {
            max-width: 100%;
            max-height: 130px;
            object-fit: contain;
            display: block;
            margin: 0 auto;
            border-radius: 6px;
        }

        .machining-preview-svg text {
            font-size: 8px;
            fill: #555;
            font-family: Arial, sans-serif;
        }

        .machining-preview-svg .preview-panel {
            fill: #f2f2f2;
            stroke: #888;
            stroke-width: 1;
        }

        .machining-preview-svg .preview-label {
            font-size: 9px;
            font-weight: 700;
            fill: #333;
        }

        .machining-save-btn {
            width: 100%;
            margin-top: 12px;
            height: 36px;
            background: var(--primary-color);
            color: #fff;
            border: none;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
        }

        .machining-canvas {
            flex: 1;
            position: relative;
            background: #f6fff1;
            padding: 30px;
            overflow: auto;
        }

        .machining-grain {
            position: absolute;
            top: 30px;
            left: 30px;
            /* The panel diagram is centered in the canvas and grows with
               panel size/zoom — without this it can paint over this box
               and hide the spray-area readout on shorter viewports. */
            z-index: 2;
        }

        .machining-grain-label {
            color: #333;
            font-size: 13px;
            margin-bottom: 6px;
        }

        .machining-grain-box {
            width: 90px;
            height: 90px;
            background: #fff;
            border: 1px solid #333;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .machining-diagram {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: grid;
            grid-template-columns: 50px 220px 50px 90px;
            grid-template-rows: 50px 220px 50px 50px;
            align-items: center;
            justify-items: center;
            transition: transform 0.15s;
        }

        /* Machining's diagram is a single <canvas> now (see
           drawTechnicalDiagram() in cutlist-main.js) — override the shared
           grid layout above just for this instance; #sprayDiagram still
           uses the div/grid version untouched. */
        #machiningDiagram,
        #sprayDiagram,
        #panelSummaryDiagram {
            display: block !important;
        }

        #machiningDiagram canvas,
        #sprayDiagram canvas,
        #panelSummaryDiagram canvas {
            display: block !important;
        }

        .machining-edge-label {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 1px solid #999;
            background: #e4f2dc;
            color: #666;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .machining-edge-label.edge-top {
            grid-column: 2;
            grid-row: 1;
        }

        .machining-edge-label.edge-left {
            grid-column: 1;
            grid-row: 2;
        }

        .machining-edge-label.edge-right {
            grid-column: 3;
            grid-row: 2;
        }

        .machining-edge-label.edge-bottom {
            grid-column: 2;
            grid-row: 3;
        }

        .machining-panel {
            grid-column: 2;
            grid-row: 2;
            width: 100%;
            height: 100%;
            background: #fff;
            border: 1px solid #000;
            position: relative;
        }

        .machining-dim-line {
            color: #333;
            font-size: 12px;
        }

        .machining-dim-line.vertical {
            grid-column: 4;
            grid-row: 2;
            position: relative;
            width: 20px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .machining-dim-line.vertical::before {
            content: "";
            position: absolute;
            top: 6px;
            bottom: 6px;
            left: 50%;
            width: 1px;
            background: #333;
        }

        .machining-dim-line.horizontal {
            grid-column: 2;
            grid-row: 4;
            position: relative;
            width: 100%;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .machining-dim-line.horizontal::before {
            content: "";
            position: absolute;
            left: 6px;
            right: 6px;
            top: 50%;
            height: 1px;
            background: #333;
        }

        .machining-dim-value {
            background: #e4f2dc;
            padding: 2px 6px;
            z-index: 1;
        }

        .machining-panel-shows {
            position: absolute;
            bottom: 30px;
            left: 30px;
            z-index: 2;
        }

        .machining-face-box {
            width: 90px;
            height: 90px;
            border: 1px solid #333;
            background: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-weight: bold;
            color: #999;
            text-transform: uppercase;
            font-size: 15px;
            line-height: 1.3;
        }

        /* Machining overlay and Panel Summary overlay face boxes show a real 3D flip between FRONT and BACK */
        #machiningFaceBox,
        #panelSummaryFaceBox {
            perspective: 400px;
            user-select: none;
        }

        #machiningFaceBox .machining-face-inner,
        #panelSummaryFaceBox .machining-face-inner {
            position: relative;
            width: 90px;
            height: 90px;
            transition: transform 0.6s;
            transform-style: preserve-3d;
        }

        #machiningFaceBox.flipped .machining-face-inner,
        #panelSummaryFaceBox.flipped .machining-face-inner {
            transform: rotateX(180deg);
        }

        #machiningFaceBox .machining-face-side,
        #panelSummaryFaceBox .machining-face-side {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            backface-visibility: hidden;
        }

        #machiningFaceBox .machining-face-side.back,
        #panelSummaryFaceBox .machining-face-side.back {
            transform: rotateX(180deg);
        }

        .machining-zoom {
            position: absolute;
            bottom: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .machining-zoom button {
            width: 34px;
            height: 34px;
            margin: 0;
        }

        /* CNC MACHINING TAB */
        .cnc-body {
            display: flex;
            gap: 40px;
            margin-top: 25px;
            align-items: flex-start;
        }

        .cnc-col {
            flex: 1;
        }

        .cnc-col h3 {
            font-size: 18px;
            font-weight: 400;
            margin: 0 0 15px;
            color: #000;
        }

        .cnc-dropzone {
            border: 1px solid #c8c8c8;
            padding: 20px;
            min-height: 150px;
            font-size: 14px;
            color: #333;
        }

        .cnc-dropzone.dragover {
            border-color: var(--primary-color);
            background: #f4faf1;
        }

        .cnc-dropzone p {
            margin: 0 0 15px;
            line-height: 1.6;
            color: #333;
        }

        .cnc-add-files {
            color: var(--primary-color);
            text-decoration: none;
            font-size: 14px;
            cursor: pointer;
        }

        .cnc-file-list {
            margin-top: 12px;
            font-size: 13px;
            color: #444;
        }

        .cnc-file-list div {
            padding: 2px 0;
        }

        .cnc-textarea {
            width: 100%;
            min-height: 150px;
            border: 1px solid #c8c8c8;
            padding: 12px;
            font-family: inherit;
            font-size: 14px;
            resize: vertical;
            color: #333;
        }

        .cnc-char-count {
            text-align: right;
            color: #666;
            font-size: 13px;
            margin-top: 8px;
        }

        .cnc-submit-wrap {
            text-align: center;
            margin-top: 40px;
        }

        .cnc-submit {
            width: 260px;
        }

        .tab-placeholder {
            color: #999;
            font-size: 14px;
        }

        /* HINGED DOORS - DOOR STYLE GRID */
        .door-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-top: 20px;
        }

        .door-card-boxed {
            border: 1px solid #ddd;
        }

        .door-image {
            height: 300px;
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            background: #fff;
        }

        .door-panel {
            flex: 1;
            border: 1px solid #ccc;
            background: linear-gradient(180deg, #fff, #f0f0f0);
        }

        .door-info {
            background: #f0f0f0;
            padding: 12px 15px;
            border-top: 1px solid #ddd;
        }

        .door-title {
            font-weight: bold;
            color: #222;
        }

        .door-subtitle {
            color: #333;
            font-size: 14px;
        }

        .door-desc {
            font-size: 13px;
            color: #666;
            padding: 10px 2px 0;
        }

        .door-price {
            font-size: 15px;
            color: #000;
            padding: 15px 2px 0;
        }

        .door-card {
            display: flex;
            flex-direction: column;
        }

        .door-buy-btn {
            width: 100%;
            margin: 15px 0 0;
        }

        .door-image {
            position: relative;
        }

        .door-quickview-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: #fff;
            border: 1px solid #ccc;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1;
        }

        .door-quickview-btn:hover {
            border-color: var(--primary-color);
        }

        /* DOOR QUICK VIEW POPUP */
        .door-quickview-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }

        .door-quickview-overlay.open {
            display: flex;
        }

        .door-quickview-modal {
            width: 420px;
            background: #fff;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            padding: 20px;
            position: relative;
        }

        .door-quickview-close {
            position: absolute;
            top: 12px;
            right: 16px;
            color: var(--primary-color);
            font-size: 22px;
            cursor: pointer;
            line-height: 1;
        }

        .door-quickview-image {
            height: 380px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            border: 1px solid #ddd;
            background: #fff;
        }

        .door-quickview-title {
            font-weight: bold;
            font-size: 16px;
            color: #222;
            margin-top: 15px;
        }

        .door-quickview-subtitle {
            color: #333;
            font-size: 14px;
        }

        /* DOOR CONFIGURATION PAGE */
        .door-config-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }

        .door-config-overlay.open {
            display: flex;
        }

        .door-config-modal {
            width: 80%;
            height: 80%;
            background: #fff;
            position: relative;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .door-config-close {
            position: absolute;
            top: 16px;
            right: 20px;
            color: var(--primary-color);
            font-size: 24px;
            cursor: pointer;
            line-height: 1;
            z-index: 2;
        }

        .door-config-layout {
            display: flex;
            height: 100%;
        }

        .door-config-gallery {
            width: 400px;
            flex-shrink: 0;
            background: #f4f4f4;
            padding: 30px;
            overflow-y: auto;
        }

        .door-config-main-image {
            width: 100%;
            height: 240px;
            background: #ddd;
            border: 1px solid #ccc;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: #fff;
            font-size: 14px;
            font-weight: bold;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
        }

        .door-config-thumbs {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .door-config-thumb {
            width: 60px;
            height: 55px;
            background: #ccc center/cover no-repeat;
            border: 1px solid transparent;
            cursor: pointer;
        }

        .door-config-thumb.active {
            border-color: var(--primary-color);
        }

        .door-config-product-title {
            font-weight: bold;
            font-size: 16px;
            color: #222;
            margin-top: 20px;
        }

        .door-config-product-subtitle {
            color: var(--primary-color);
            font-size: 14px;
            margin-top: 2px;
        }

        .door-config-desc-heading {
            font-weight: bold;
            color: #222;
            margin-top: 20px;
        }

        .door-config-desc-text {
            color: #444;
            font-size: 14px;
            margin-top: 6px;
            line-height: 1.5;
        }

        .door-config-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .door-config-top-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding: 20px 60px 15px 0;
            border-bottom: 1px solid #ddd;
        }

        .door-config-tabs {
            display: flex;
        }

        .door-config-tab {
            position: relative;
            padding: 12px 22px 12px 28px;
            background: #e4e4e4;
            color: #999;
            font-size: 14px;
            cursor: pointer;
            clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
            margin-left: -14px;
        }

        .door-config-tab:first-child {
            clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
            margin-left: 0;
            padding-left: 20px;
        }

        .door-config-tab:not(.disabled):not(.active):hover {
            background: #d5d5d5;
        }

        .door-config-tab.active {
            background: var(--primary-color);
            color: #fff;
            z-index: 2;
        }

        .door-config-tab.disabled {
            color: #ccc;
            cursor: not-allowed;
        }

        .door-config-purchase {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 8px;
            min-width: 160px;
        }

        .door-config-qty {
            display: flex;
            width: 100%;
        }

        .door-config-qty input {
            flex: 1;
            width: 0;
            height: 38px;
            border: 1px solid #c8c8c8;
            border-left: none;
            border-right: none;
            text-align: center;
            font-size: 14px;
            order: 2;
        }

        .door-config-qty button {
            width: 38px;
            height: 38px;
            margin: 0;
            border: 1px solid var(--primary-color);
            background: #fff;
            color: var(--primary-color);
            font-size: 16px;
        }

        #doorConfigQtyMinus {
            order: 1;
        }

        #doorConfigQtyPlus {
            order: 3;
        }

        .door-config-add-basket {
            width: 100%;
            height: 38px;
            margin: 0;
            border: none;
            background: #bcd8f2;
            color: #1a4a7a;
            font-size: 14px;
            cursor: pointer;
        }

        .door-config-add-basket:hover {
            background: #a7cbee;
        }

        .door-config-total {
            text-align: right;
            font-size: 20px;
            font-weight: bold;
            color: #000;
            margin-top: 4px;
        }

        .door-config-total-vat {
            font-size: 12px;
            font-weight: normal;
            color: #888;
        }

        .door-config-body {
            flex: 1;
            overflow: auto;
            padding: 25px 60px 25px 0;
        }

        .door-config-body h3 {
            font-size: 18px;
            font-weight: 400;
            margin: 0 0 12px;
            color: #000;
        }

        .door-config-specs {
            font-size: 14px;
            color: #333;
            line-height: 1.8;
        }

        .door-config-note {
            font-size: 14px;
            color: #333;
            margin-top: 15px;
        }

        .door-config-available-heading {
            font-size: 14px;
            color: #333;
            margin-top: 30px;
            margin-bottom: 10px;
        }

        .door-config-available-box {
            display: flex;
            border: 1px solid #ddd;
            background: #f0f0f0;
        }

        .door-config-radio-option {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 22px 10px;
            cursor: pointer;
            font-size: 14px;
            color: #333;
        }

        .door-config-radio-option input[type="radio"] {
            width: 16px;
            height: 16px;
            accent-color: #000;
            cursor: pointer;
            margin: 0;
        }

        /* DOOR CONFIG - SIZE TAB FIELDS */
        .door-config-field-row {
            margin-bottom: 18px;
        }

        .door-config-field-row label {
            display: block;
            font-size: 13px;
            color: #333;
            margin-bottom: 6px;
        }

        .door-config-field-row input[type="text"],
        .door-config-field-row select {
            width: 320px;
            max-width: 100%;
            height: 38px;
            border: 1px solid #c8c8c8;
            padding: 0 10px;
            font-size: 14px;
            color: #333;
        }

        .door-config-field-hint {
            text-align: right;
            font-size: 12px;
            color: #999;
            margin-top: 4px;
            width: 320px;
            max-width: 100%;
        }

        .door-config-size-heading {
            font-size: 13px;
            color: #333;
            margin-bottom: 14px;
        }

        .door-config-size-inputs {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .door-config-size-inputs input {
            width: 140px;
            height: 38px;
            border: 1px solid #c8c8c8;
            padding: 0 10px;
            font-size: 14px;
            text-align: center;
        }

        .door-config-size-x {
            color: #999;
        }

        /* DOOR CONFIG - DRILLING TAB FIELDS */
        .door-config-drilling-question {
            font-size: 14px;
            color: #333;
            margin: 0 0 10px;
        }

        .door-config-yesno {
            display: flex;
            gap: 2px;
            width: 320px;
            max-width: 100%;
            margin-bottom: 20px;
        }

        .door-config-yesno-btn {
            flex: 1;
            height: 38px;
            margin: 0;
            border: 1px solid #c8c8c8;
            background: #fff;
            color: #333;
            font-size: 14px;
            cursor: pointer;
        }

        .door-config-yesno-btn.active {
            background: #2b78c8;
            border-color: #2b78c8;
            color: #fff;
        }

        .door-config-edge-radios {
            display: flex;
            gap: 30px;
        }

        .door-config-edge-radio {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            color: #333;
            cursor: pointer;
        }

        .door-config-edge-radio input {
            width: 16px;
            height: 16px;
            accent-color: #2b78c8;
            cursor: pointer;
            margin: 0;
        }

        .door-config-field-row--inline {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .door-config-field-row--inline label {
            margin-bottom: 0;
            white-space: nowrap;
        }

        .door-config-field-row--inline select {
            width: 100px;
        }

        .door-hole-marker {
            position: absolute;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #2b78c8;
            transform: translate(-50%, -50%);
        }

        /* DOOR CONFIG - FINISH TAB FIELDS */
        .door-config-finish-buttons {
            display: flex;
            gap: 2px;
            width: 420px;
            max-width: 100%;
            margin-bottom: 16px;
        }

        .door-config-yesno-btn.disabled {
            background: #f5f5f5;
            color: #ccc;
            cursor: not-allowed;
            border-color: #e5e5e5;
        }

        .door-config-paint-cards {
            display: flex;
            gap: 15px;
            margin: 15px 0 25px;
            max-width: 500px;
        }

        .door-config-paint-card {
            flex: 1;
            border: 2px solid #bcd8f2;
            background: #eaf3fc;
            padding: 16px;
            text-align: center;
            cursor: pointer;
            color: #333;
            margin: 0;
            height: auto;
            width: auto;
        }

        .door-config-paint-card.selected {
            border-color: #2b78c8;
            background: #d7e9fb;
        }

        .door-config-paint-large {
            font-size: 16px;
            font-weight: bold;
            color: #222;
        }

        .door-config-paint-small {
            font-size: 12px;
            color: #666;
            margin-top: 2px;
        }

        .door-config-paint-price {
            font-size: 22px;
            font-weight: bold;
            color: #000;
            margin-top: 10px;
        }

        .door-config-paint-fields {
            display: flex;
            gap: 30px;
            max-width: 500px;
        }

        .door-config-paint-fields .door-config-field-row {
            flex: 1;
        }

        .door-config-paint-fields select,
        .door-config-paint-fields input {
            width: 100%;
        }

        /* DOOR CONFIG - BLUEPRINT CANVAS PANEL */
        .door-config-canvas-panel {
            width: 400px;
            flex-shrink: 0;
            position: relative;
            background: #dceafd;
        }

        .door-config-canvas-diagram {
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            grid-template-columns: auto 90px;
            grid-template-rows: auto 50px;
            align-items: center;
            justify-items: center;
        }

        .door-config-canvas-diagram.visible {
            display: grid;
        }

        .door-config-canvas-box {
            grid-column: 1;
            grid-row: 1;
            position: relative;
            background: #fff;
            border: 2px solid #333;
        }

        .door-config-canvas-dim-v,
        .door-config-canvas-dim-h {
            color: #333;
            font-size: 12px;
            position: relative;
        }

        .door-config-canvas-dim-v {
            grid-column: 2;
            grid-row: 1;
            width: 20px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .door-config-canvas-dim-v::before {
            content: "";
            position: absolute;
            top: 6px;
            bottom: 6px;
            left: 50%;
            width: 1px;
            background: #333;
        }

        .door-config-canvas-dim-h {
            grid-column: 1;
            grid-row: 2;
            width: 100%;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .door-config-canvas-dim-h::before {
            content: "";
            position: absolute;
            left: 6px;
            right: 6px;
            top: 50%;
            height: 1px;
            background: #333;
        }

        .door-config-canvas-dim-v span,
        .door-config-canvas-dim-h span {
            background: #dceafd;
            padding: 2px 6px;
            z-index: 1;
        }

        .door-config-showing {
            position: absolute;
            bottom: 30px;
            left: 30px;
        }

        .door-config-showing-label {
            font-size: 13px;
            color: #333;
            margin-bottom: 6px;
        }

        .door-config-face-box {
            width: 90px;
            height: 70px;
            border: 1px solid #333;
            background: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #999;
            text-transform: uppercase;
            font-size: 15px;
            line-height: 1.3;
            cursor: pointer;
        }

        .door-config-rotate-btn {
            display: block;
            width: 90px;
            height: 32px;
            margin: 8px 0 0;
            border: 1px solid #2b78c8;
            background: #fff;
            color: #2b78c8;
            font-size: 13px;
        }

        .door-config-notes {
            position: absolute;
            bottom: 30px;
            left: 150px;
            font-size: 12px;
            color: #666;
            max-width: 210px;
        }

        .door-config-notes-heading {
            color: #333;
            margin-bottom: 4px;
        }

        .door-config-canvas-zoom {
            position: absolute;
            bottom: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .door-config-canvas-zoom button {
            width: 34px;
            height: 34px;
            margin: 0;
        }

        .door-config-body {
            flex: 1;
            overflow: auto;
            padding: 25px;
        }

        /* FURNITURE FITTINGS TAB */
        .ff-search-bar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 28px 0 30px;
        }

        .ff-search-input {
            width: 320px;
            height: 39px;
            border: none;
            border-bottom: 1px solid #aaa;
            background: transparent;
            font-size: 14px;
            color: #333;
            padding: 0 6px;
            outline: none;
        }

        .ff-search-input::placeholder {
            color: #aaa;
        }

        .ff-search-btn,
        .ff-clear-btn {
            height: 38px;
            width: auto;
            padding: 0 22px;
            background: #fff;
            border: 1px solid #aaa;
            color: #777;
            font-size: 14px;
            cursor: pointer;
            margin: 0;
        }

        .ff-search-btn:hover,
        .ff-clear-btn:hover {
            border-color: #555;
            color: #333;
        }

        .ff-section {
            margin-bottom: 48px;
        }

        .ff-product-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-top: 22px;
        }

        /* Redesigned product card */
        .ff-product-card {
            border: 1px solid #c5d8ed;
            background: #eaf3fc;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        .ff-card-image {
            position: relative;
            height: 220px;
            background: #3a3d42;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .ff-card-label {
            padding: 14px 12px 0;
            text-align: center;
            color: #fff;
        }

        .ff-card-label-brand {
            font-size: 14px;
            font-weight: 600;
        }

        .ff-card-label-name {
            font-size: 12px;
            margin-top: 5px;
            color: rgba(255, 255, 255, 0.85);
            line-height: 1.35;
        }

        .ff-card-image-inner {
            flex: 1;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #666;
            font-size: 12px;
        }

        .ff-quickview-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            background: none;
            border: none;
            width: auto;
            height: auto;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            color: #2b78c8;
            font-size: 11px;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.18s;
            z-index: 2;
        }

        .ff-product-card:hover .ff-quickview-btn {
            opacity: 1;
        }

        .ff-quickview-icon {
            width: 30px;
            height: 30px;
            border: 2px solid #2b78c8;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.92);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ff-buy-btn {
            position: absolute;
            bottom: 12px;
            left: 50%;
            transform: translateX(-50%);
            background: #fff;
            border: 1px solid #ccc;
            color: #2b78c8;
            font-size: 13px;
            height: 36px;
            padding: 0 24px;
            white-space: nowrap;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.18s;
            z-index: 2;
            margin: 0;
            width: auto;
        }

        .ff-product-card:hover .ff-buy-btn {
            opacity: 1;
        }

        .ff-card-meta {
            padding: 10px 12px 14px;
        }

        .ff-product-code {
            font-size: 12px;
            color: #888;
            margin-bottom: 5px;
        }

        .ff-product-desc {
            font-size: 13px;
            color: #444;
            line-height: 1.45;
        }

        .ff-product-price {
            font-size: 18px;
            color: #000;
            font-weight: 400;
            margin-top: 12px;
        }

        /* QUICK VIEW OVERLAY */
        .ff-qv-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.88);
            z-index: 10001;
            align-items: center;
            justify-content: center;
            flex-direction: column;
        }

        .ff-qv-overlay.open {
            display: flex;
        }

        .ff-qv-close {
            position: fixed;
            top: 18px;
            right: 24px;
            color: #fff;
            font-size: 34px;
            cursor: pointer;
            line-height: 1;
        }

        .ff-qv-main {
            background: #fff;
            width: 660px;
            max-width: 88vw;
            height: 400px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ff-qv-main-img {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #aaa;
            background: #f5f5f5;
        }

        .ff-qv-thumbs {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .ff-qv-thumb {
            width: 72px;
            height: 56px;
            background: #555;
            border: 2px solid rgba(255, 255, 255, 0.3);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: #ccc;
        }

        .ff-qv-thumb.active {
            border-color: #fff;
        }

        .ff-qv-arrow {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.12);
            border: none;
            color: #fff;
            font-size: 32px;
            width: 52px;
            height: 70px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
        }

        .ff-qv-arrow:hover {
            background: rgba(255, 255, 255, 0.22);
        }

        .ff-qv-arrow-prev {
            left: 0;
        }

        .ff-qv-arrow-next {
            right: 0;
        }

        /* MORE INFO OVERLAY */
        .ff-mi-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 10001;
            align-items: flex-start;
            justify-content: center;
            overflow-y: auto;
            padding: 40px 20px;
        }

        .ff-mi-overlay.open {
            display: flex;
        }

        .ff-mi-modal {
            background: #fff;
            width: 920px;
            max-width: 100%;
            position: relative;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
            display: flex;
            min-height: 580px;
        }

        .ff-mi-close {
            position: absolute;
            top: 12px;
            right: 16px;
            color: #2b78c8;
            font-size: 24px;
            cursor: pointer;
            line-height: 1;
            z-index: 2;
        }

        .ff-mi-left {
            width: 290px;
            flex-shrink: 0;
            padding: 18px;
            border-right: 1px solid #eee;
        }

        .ff-mi-product-code {
            font-size: 13px;
            color: #666;
            margin-bottom: 10px;
        }

        .ff-mi-main-img {
            border: 1px solid #ddd;
            height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f5f5f5;
            color: #bbb;
            font-size: 13px;
            text-align: center;
            padding: 10px;
        }

        .ff-mi-thumbs {
            display: flex;
            gap: 6px;
            margin-top: 8px;
        }

        .ff-mi-thumb {
            width: 60px;
            height: 50px;
            background: #e5e5e5;
            border: 2px solid transparent;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 9px;
            color: #aaa;
        }

        .ff-mi-thumb.active {
            border-color: #2b78c8;
        }

        .ff-mi-product-title {
            font-weight: bold;
            font-size: 15px;
            color: #222;
            margin-top: 16px;
        }

        .ff-mi-desc-heading {
            font-weight: bold;
            color: #222;
            font-size: 13px;
            margin-top: 12px;
            margin-bottom: 5px;
        }

        .ff-mi-desc-text {
            color: #444;
            font-size: 13px;
            line-height: 1.5;
        }

        .ff-mi-right {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .ff-mi-top-bar {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 8px;
            padding: 14px 50px 14px 20px;
            border-bottom: 1px solid #eee;
        }

        .ff-mi-qty {
            display: flex;
        }

        .ff-mi-qty input {
            width: 48px;
            height: 36px;
            border: 1px solid #c8c8c8;
            border-left: none;
            border-right: none;
            text-align: center;
            font-size: 14px;
            order: 2;
        }

        .ff-mi-qty button {
            width: 36px;
            height: 36px;
            margin: 0;
            border: 1px solid #2b78c8;
            background: #fff;
            color: #2b78c8;
            font-size: 16px;
        }

        #ffMiQtyMinus {
            order: 1;
        }

        #ffMiQtyPlus {
            order: 3;
        }

        .ff-mi-add-basket {
            background: #2b78c8;
            border: none;
            color: #fff;
            height: 36px;
            width: 180px;
            font-size: 14px;
            cursor: pointer;
            margin: 0;
        }

        .ff-mi-add-basket:hover {
            background: #2068b0;
        }

        .ff-mi-total {
            font-size: 18px;
            font-weight: bold;
            color: #000;
            text-align: right;
        }

        .ff-mi-total-vat {
            font-size: 12px;
            color: #888;
            font-weight: normal;
        }

        .ff-mi-body {
            flex: 1;
            overflow-y: auto;
            padding: 18px 20px;
        }

        .ff-mi-details-heading {
            font-weight: bold;
            color: #2b78c8;
            font-size: 15px;
            margin: 0 0 8px;
        }

        .ff-mi-details-blue {
            color: #2b78c8;
            font-size: 13px;
            line-height: 1.6;
            margin-bottom: 12px;
        }

        .ff-mi-specs {
            font-size: 13px;
            color: #333;
            line-height: 1.9;
            margin-bottom: 12px;
        }

        .ff-mi-links {
            display: flex;
            gap: 20px;
            margin: 12px 0 18px;
        }

        .ff-mi-link {
            display: flex;
            align-items: center;
            gap: 6px;
            color: #2b78c8;
            font-size: 13px;
            cursor: pointer;
        }

        .ff-mi-section-heading {
            font-size: 13px;
            color: #333;
            margin-bottom: 10px;
            font-weight: 400;
        }

        .ff-mi-variants-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            margin-bottom: 6px;
        }

        .ff-mi-variants-table th,
        .ff-mi-variants-table td {
            border: 1px solid #ddd;
            padding: 8px 14px;
            text-align: center;
            font-weight: normal;
            color: #333;
        }

        .ff-mi-variants-table input[type="radio"] {
            accent-color: #000;
            width: 16px;
            height: 16px;
        }

        .ff-mi-pricing-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            margin-bottom: 20px;
        }

        .ff-mi-pricing-table td {
            border: 1px solid #ddd;
            padding: 8px 14px;
            color: #333;
        }

        .ff-mi-pricing-table td:first-child {
            color: #666;
            font-weight: 500;
        }

        .ff-mi-related {
            background: #eaf3fc;
            border: 1px solid #c5d8ed;
            padding: 12px;
        }

        .ff-mi-related-heading {
            font-weight: bold;
            color: #333;
            font-size: 13px;
            text-align: right;
            margin-bottom: 10px;
        }

        .ff-mi-related-grid {
            display: flex;
            gap: 8px;
        }

        .ff-mi-related-card {
            flex: 1;
            background: #fff;
            border: 1px solid #ddd;
            padding: 8px;
            font-size: 12px;
            color: #444;
            text-align: center;
            cursor: pointer;
        }

        .ff-mi-related-card:hover {
            background: #f0f7ff;
        }

        .ff-mi-related-img {
            height: 55px;
            background: #f0f0f0;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: #bbb;
        }

        .ff-mi-related-price {
            color: #2b78c8;
            margin-top: 4px;
        }

        .ff-load-more-wrap {
            text-align: center;
            margin-top: 28px;
        }

        .ff-load-more {
            width: auto;
            padding: 0 30px;
            height: 38px;
            background: #fff;
            border: 1px solid #aaa;
            color: #2b78c8;
            font-size: 14px;
            cursor: pointer;
            margin: 0;
        }

        .ff-load-more:hover {
            border-color: #2b78c8;
        }

        .ff-load-more:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .ff-spinner {
            display: none;
            width: 20px;
            height: 20px;
            border: 2px solid #ddd;
            border-top-color: #2b78c8;
            border-radius: 50%;
            animation: ff-spin 0.7s linear infinite;
            margin: 0 auto;
        }

        .ff-spinner.visible {
            display: block;
        }

        @keyframes ff-spin {
            to {
                transform: rotate(360deg);
            }
        }

        .ff-no-more {
            display: none;
            color: #999;
            font-size: 13px;
            margin-top: 10px;
        }

        /* ===================== SLIDING DOORS TAB ===================== */
        .sd-sets-container {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        /* Accordion set */
        .sd-set {
            border: 1px solid #ddd;
            margin-bottom: 16px;
            background: #fff;
        }

        .sd-set-title {
            display: flex;
            align-items: center;
            padding: 14px 20px;
            cursor: pointer;
            background: #fff;
            user-select: none;
        }

        .sd-set-title h3 {
            margin: 0;
            font-size: 16px;
            font-weight: 600;
            color: #222;
            flex: 1;
        }

        .sd-set-collapse {
            font-size: 13px;
            color: #555;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .sd-set-arrow {
            width: 18px;
            height: 18px;
            border-left: 1px solid #555;
            border-top: 1px solid #555;
            transform: rotate(45deg);
            display: inline-block;
            transition: transform 0.2s;
        }

        .sd-set.collapsed .sd-set-arrow {
            transform: rotate(225deg);
        }

        .sd-set.collapsed .sd-set-content {
            display: none;
        }

        .sd-set.collapsed .sd-collapse-text::before {
            content: 'Expand';
        }

        .sd-collapse-text::before {
            content: 'Collapse';
        }

        /* Creator Steps */
        .sd-steps {
            display: flex;
            align-items: stretch;
            border-bottom: 1px solid #ddd;
        }

        .sd-step {
            flex: 1;
            padding: 11px 8px 11px 28px;
            position: relative;
            background: #eef0f2;
            color: #aaa;
            font-size: 13px;
            font-weight: 500;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: default;
            white-space: nowrap;
            clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
            margin-right: 2px;
        }

        .sd-step:first-child {
            clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
            padding-left: 16px;
        }

        .sd-step.sd-step-last {
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
            margin-right: 0;
        }

        .sd-step.current {
            background: #1a6bbf;
            color: #fff;
        }

        .sd-step.enabled:not(.current) {
            color: #444;
            cursor: pointer;
            background: #dde1e6;
        }

        .sd-step.enabled:not(.current):hover {
            background: #cdd2d8;
        }

        /* Step panels */
        .sd-step-panel {
            display: none;
        }

        .sd-step-panel.active {
            display: block;
        }

        /* Opening size form */
        .sd-opening-size {
            display: flex;
            align-items: flex-end;
            gap: 20px;
            flex-wrap: wrap;
            padding: 20px 20px 16px;
        }

        .sd-input-col {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .sd-input-col label {
            font-size: 12px;
            color: #5da344;
            font-weight: 600;
        }

        .sd-text-input {
            width: 120px;
            height: 36px;
            border: 1px solid #c8c8c8;
            text-align: center;
            font-size: 13px;
            padding: 0 8px;
            background: #fff;
        }

        .sd-text-input:focus {
            outline: none;
            border-color: #1a6bbf;
        }

        .sd-text-input:disabled {
            background: #f5f5f5;
        }

        .sd-text-input.sd-input-error {
            border-color: #d0021b;
        }

        .sd-input-wrap {
            position: relative;
            display: inline-block;
        }

        .sd-input-error-msg {
            display: none;
            position: absolute;
            bottom: calc(100% + 9px);
            left: 0;
            background: #fff;
            border: 1.5px solid #d0021b;
            border-radius: 4px;
            padding: 6px 10px;
            font-size: 10px;
            text-align: center;
            color: #333;
            z-index: 20;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
            width: 90%;
        }

        /* downward arrow — outer (red) */
        .sd-input-error-msg::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 14px;
            border: 7px solid transparent;
            border-top-color: #d0021b;
        }

        /* downward arrow — inner (white fill) */
        .sd-input-error-msg::before {
            content: '';
            position: absolute;
            top: calc(100% - 1.5px);
            left: 15px;
            border: 6px solid transparent;
            border-top-color: #fff;
            z-index: 1;
        }

        .sd-input-error-msg.visible {
            display: block;
        }

        /* Door number select (reuses Select2) */
        .sd-door-select {
            width: 120px;
        }

        .sd-door-select.isDisabled {
            pointer-events: none;
            opacity: 0.55;
        }

        .sd-door-select.isDisabled .Select2__input-wrapper {
            background: #f5f5f5;
        }

        /* Document buttons */
        .sd-doc-btns {
            margin-left: auto;
            display: flex;
            gap: 10px;
            align-items: flex-end;
        }

        .sd-doc-btn {
            height: 36px;
            padding: 0 18px;
            background: #fff;
            border: 1px solid #1a6bbf;
            color: #1a6bbf;
            font-size: 13px;
            cursor: pointer;
            white-space: nowrap;
            font-weight: 500;
            width: auto;
        }

        .sd-doc-btn:hover {
            background: #f0f6ff;
        }

        /* Canvas render area */
        .sd-render-wrap {
            background: #fff;
        }

        .sd-warning-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 9px 16px;
            background: #fff3e0;
            border-bottom: 1px solid #ffe0b2;
            font-size: 13px;
            color: #e07000;
            text-align: center;
        }

        .sd-reset-btn {
            display: block;
            margin: 10px auto 0;
            background: #fff;
            border: 1.5px solid #b0bac4;
            border-radius: 4px;
            padding: 5px 18px;
            font-size: 13px;
            color: #334;
            cursor: pointer;
        }

        .sd-reset-btn:hover {
            background: #f5f7fa;
            border-color: #8898a8;
        }

        .sd-render {
            position: relative;
            overflow: hidden;
            height: 700px;
            background: #f0fdf4;
        }

        .sd-canvas {
            display: block;
            width: 100%;
            height: 100%;
        }

        /* Placeholder step content */
        .sd-step-placeholder {
            padding: 32px 20px;
            text-align: center;
            color: #aaa;
            font-size: 14px;
        }

        /* Bottom action buttons */
        .sd-actions {
            display: flex;
            justify-content: center;
            gap: 16px;
            padding: 20px;
            border-top: 1px solid #eee;
        }

        .sd-btn-delete {
            height: 40px;
            padding: 0 22px;
            background: #fff;
            border: 1px solid #cc3333;
            color: #cc3333;
            font-size: 13px;
            cursor: pointer;
            width: auto;
        }

        .sd-btn-delete:hover {
            background: #fff5f5;
        }

        .sd-btn-add-set {
            height: 40px;
            padding: 0 22px;
            background: #fff;
            border: 1px solid #1a6bbf;
            color: #1a6bbf;
            font-size: 13px;
            cursor: pointer;
            width: auto;
        }

        .sd-btn-add-set:hover {
            background: #f0f6ff;
        }

        /* SVG arrow for Select2 in this context */
        .sd-door-select .Select2__arrow svg {
            width: 16px;
            height: 16px;
            fill: #555;
        }

        /* Frame style grid */
        .sd-frame-grid {
            display: flex;
            gap: 0;
            padding: 10px 10px 8px;
            background: #fff;
            border-bottom: 1px solid #eee;
            overflow-x: auto;
        }

        .sd-frame-card {
            flex: 1;
            min-width: 90px;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px 6px 10px;
            cursor: pointer;
            border: 2px solid #e0e0e0;
            background: #fff;
            text-align: center;
            margin: 4px;
            transition: border-color 0.15s;
        }

        .sd-frame-card:hover {
            border-color: #aabbcc;
        }

        .sd-frame-card.selected {
            border-color: #1a6bbf;
        }

        .sd-frame-img {
            width: 100%;
            height: 72px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .sd-frame-img svg {
            max-width: 100%;
            max-height: 100%;
        }

        .sd-frame-name {
            font-size: 12px;
            color: #555;
            margin-top: 6px;
        }

        /* Door design grid */
        .sd-door-grid {
            display: flex;
            gap: 10px;
            padding: 16px;
            background: #fff;
            border-bottom: 1px solid #eee;
            overflow-x: auto;
        }

        .sd-door-card {
            flex: 1;
            min-width: 110px;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            border: 2px solid #e0e0e0;
            background: #fff;
            transition: border-color 0.15s;
            position: relative;
            overflow: hidden;
        }

        .sd-door-card:hover {
            border-color: #aabbcc;
        }

        .sd-door-card.selected {
            border-color: #1a6bbf;
        }

        /* Hover overlay */
        .sd-dc-hover {
            position: absolute;
            inset: 0;
            background: rgba(48, 48, 48, 0.78);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            opacity: 0;
            transition: opacity 0.15s;
            pointer-events: none;
        }

        .sd-door-card:hover .sd-dc-hover {
            opacity: 1;
            pointer-events: all;
        }

        .sd-dc-hover-name {
            color: #fff;
            font-size: 14px;
            font-weight: 500;
        }

        .sd-dc-select-btn {
            background: #fff;
            color: #1a6bbf;
            border: none;
            padding: 8px 24px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
        }

        .sd-door-card-img {
            flex: 1;
            padding: 20px 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #fff;
            min-height: 180px;
        }

        .sd-door-card-img svg {
            width: 66px;
            height: 130px;
            display: block;
        }

        .sd-door-card-footer {
            background: #f3f3f3;
            border-top: 1px solid #e0e0e0;
            padding: 10px 6px 10px;
            text-align: center;
        }

        .sd-door-card-name {
            font-size: 13px;
            color: #333;
        }

        .sd-door-card-sub {
            font-size: 11px;
            color: #999;
            margin-top: 2px;
        }

        /* Door design modal */
        .sd-dd-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .sd-dd-overlay.is-open {
            display: flex;
        }

        .sd-dd-dialog {
            background: #fff;
            display: flex;
            position: relative;
            width: 820px;
            max-width: 95vw;
            max-height: 90vh;
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .sd-dd-close-btn {
            position: absolute;
            top: 12px;
            right: 14px;
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #1a6bbf;
            line-height: 1;
            padding: 4px 6px;
            z-index: 10;
        }

        .sd-dd-left {
            width: 340px;
            flex-shrink: 0;
            background: #f0f0f0;
            border-right: 1px solid #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .sd-dd-canvas-outer {
            display: flex;
            align-items: flex-start;
            gap: 10px;
        }

        .sd-dd-canvas-outer.vertical {
            flex-direction: column;
            align-items: flex-start;
        }

        .sd-dd-canvas-wrap {
            position: relative;
            display: inline-block;
            flex-shrink: 0;
        }

        .sd-dd-canvas {
            display: block;
        }

        .sd-dd-adj-btn {
            position: absolute;
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 14px;
            padding: 5px 14px;
            font-size: 12px;
            color: #333;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
            white-space: nowrap;
            z-index: 2;
        }

        .sd-dd-dim-inputs {
            position: relative;
        }

        .sd-dd-dim-h {
            min-width: 50px;
        }

        .sd-dd-dim-wrap {
            position: absolute;
        }

        .sd-dd-panel-input {
            border: 1px solid #ccc;
            padding: 3px 6px;
            font-size: 12px;
            text-align: center;
            width: 44px;
            background: #fff;
            display: block;
        }

        .sd-dd-right {
            flex: 1;
            padding: 26px 30px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .sd-dd-section-title {
            font-size: 16px;
            font-weight: 700;
            color: #222;
            margin: 0 0 12px;
        }

        .sd-dd-size-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            font-size: 13px;
            color: #555;
            margin-bottom: 8px;
        }

        .sd-dd-size-row span:last-child {
            font-weight: 600;
            color: #222;
        }

        .sd-dd-divider {
            border: none;
            border-top: 1px solid #eee;
            margin: 16px 0;
        }

        .sd-dd-desc {
            font-size: 13px;
            color: #999;
            margin: 0 0 8px;
            line-height: 1.5;
        }

        .sd-dd-constraint {
            font-size: 13px;
            color: #1a6bbf;
            margin: 0 0 3px;
        }

        .sd-dd-orient-grid {
            display: flex;
            gap: 10px;
            margin-top: 14px;
        }

        .sd-dd-orient-card {
            width: 80px;
            border: 2px solid #ddd;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px 8px 8px;
            transition: border-color 0.12s;
        }

        .sd-dd-orient-card.selected {
            border-color: #1a6bbf;
        }

        .sd-dd-orient-label {
            font-size: 12px;
            color: #555;
            margin-top: 8px;
        }

        .sd-dd-foot {
            display: flex;
            justify-content: flex-end;
            margin-top: auto;
            padding-top: 20px;
        }

        .sd-dd-save-btn {
            background: #1a6bbf;
            color: #fff;
            border: none;
            font-size: 14px;
            font-weight: 500;
            padding: 10px 40px;
            cursor: pointer;
        }

        .sd-dd-save-btn:hover {
            background: #155a9e;
        }

        /* Frame colour modal */
        .sd-fc-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .sd-fc-overlay.is-open {
            display: flex;
        }

        .sd-fc-dialog {
            background: #fff;
            display: flex;
            position: relative;
            width: 820px;
            max-width: 95vw;
            max-height: 92vh;
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .sd-fc-close-btn {
            position: absolute;
            top: 12px;
            right: 14px;
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #1a6bbf;
            line-height: 1;
            padding: 4px 6px;
            z-index: 10;
        }

        .sd-fc-left {
            width: 290px;
            flex-shrink: 0;
            padding: 24px 20px;
            background: #f6f6f6;
            border-right: 1px solid #e8e8e8;
            display: flex;
            flex-direction: column;
        }

        .sd-fc-main-img {
            width: 100%;
            background: #fff;
            border: 1px solid #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            box-sizing: border-box;
            margin-bottom: 12px;
            min-height: 170px;
        }

        .sd-fc-main-img svg {
            width: 100%;
            height: auto;
            max-height: 170px;
            display: block;
        }

        .sd-fc-thumbs {
            display: flex;
            gap: 8px;
            margin-bottom: 18px;
        }

        .sd-fc-thumb {
            width: 72px;
            height: 72px;
            flex-shrink: 0;
            cursor: pointer;
            border: 2px solid #ddd;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f0f0f0;
            box-sizing: border-box;
        }

        .sd-fc-thumb svg {
            width: 100%;
            height: 100%;
        }

        .sd-fc-thumb.active {
            border-color: #1a6bbf;
        }

        .sd-fc-fname {
            font-size: 20px;
            font-weight: 700;
            color: #222;
            margin-top: auto;
        }

        .sd-fc-cname {
            font-size: 14px;
            color: #888;
            margin-top: 2px;
        }

        .sd-fc-right {
            flex: 1;
            padding: 24px 28px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            min-width: 0;
        }

        .sd-fc-title {
            font-size: 16px;
            font-weight: 700;
            color: #222;
            margin: 0 0 8px;
        }

        .sd-fc-desc {
            font-size: 13px;
            color: #555;
            margin: 0 0 16px;
            line-height: 1.55;
        }

        .sd-fc-avail-label {
            font-size: 13px;
            font-weight: 600;
            color: #222;
            margin: 0 0 10px;
        }

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

        .sd-fc-swatch {
            cursor: pointer;
            border: 2px solid #e0e0e0;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: border-color 0.12s;
        }

        .sd-fc-swatch.selected {
            border-color: #1a6bbf;
        }

        .sd-fc-swatch:hover:not(.selected) {
            border-color: #aabbcc;
        }

        .sd-fc-swatch-img {
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6px;
            aspect-ratio: 1;
        }

        .sd-fc-swatch-img svg {
            width: 100%;
            height: auto;
            display: block;
        }

        .sd-fc-swatch-name {
            font-size: 10px;
            text-align: center;
            padding: 3px 2px;
            color: #555;
            line-height: 1.2;
            background: #fafafa;
        }

        .sd-fc-foot {
            display: flex;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .sd-fc-save-btn {
            background: #1a6bbf;
            color: #fff;
            border: none;
            font-size: 14px;
            font-weight: 500;
            padding: 10px 40px;
            cursor: pointer;
        }

        .sd-fc-save-btn:hover {
            background: #155a9e;
        }

        /* Panel design step */
        .sd-panel-design {
            display: flex;
            gap: 12px;
            padding: 14px 16px 14px;
            background: #fff;
            border-bottom: 1px solid #eee;
        }

        /* Glass panel-cat hover effect */
        .sd-panel-cat[data-cat="glass"] {
            position: relative;
            cursor: pointer;
            transition: background 0.18s;
        }

        .sd-panel-cat[data-cat="glass"]:hover {
            background: #3a3a3a;
        }

        .sd-panel-cat[data-cat="glass"]:hover .sd-swatch {
            opacity: 0.55;
        }

        .sd-panel-cat[data-cat="glass"]:hover .sd-panel-cat-label {
            background: #3a3a3a;
            border-color: #555;
            color: #e8a030;
        }

        .sd-glass-hover-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.18s;
            gap: 12px;
        }

        .sd-panel-cat[data-cat="glass"]:hover .sd-glass-hover-overlay,
        .sd-panel-cat[data-cat="boards"]:hover .sd-glass-hover-overlay {
            opacity: 1;
        }

        .sd-glass-hover-label {
            color: #fff;
            font-size: 15px;
            font-weight: 500;
        }

        .sd-glass-explore-btn {
            background: #fff;
            color: #1a6bbf;
            border: 1.5px solid #ccc;
            padding: 7px 18px;
            font-size: 13px;
            cursor: pointer;
            pointer-events: all;
        }

        .sd-glass-explore-btn:hover {
            border-color: #1a6bbf;
        }

        /* Glass selection modal */
        .sd-glass-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .sd-glass-overlay.is-open {
            display: flex;
        }

        .sd-glass-dialog {
            background: #fff;
            display: flex;
            flex-direction: column;
            position: relative;
            width: 860px;
            max-width: 96vw;
            max-height: 92vh;
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .sd-glass-close-btn {
            position: absolute;
            top: 12px;
            right: 14px;
            background: none;
            border: none;
            font-size: 22px;
            cursor: pointer;
            color: #1a6bbf;
            line-height: 1;
            padding: 4px 6px;
            z-index: 10;
        }

        .sd-glass-body {
            display: flex;
            flex: 1;
            min-height: 0;
            overflow: hidden;
        }

        .sd-glass-left {
            width: 280px;
            flex-shrink: 0;
            padding: 24px 20px;
            background: #f6f6f6;
            border-right: 1px solid #e8e8e8;
            display: flex;
            flex-direction: column;
        }

        .sd-glass-preview-img {
            width: 100%;
            aspect-ratio: 1;
            border: 1px solid #e0e0e0;
            background: #f0f0f0;
            margin-bottom: 16px;
            box-sizing: border-box;
        }

        .sd-glass-preview-name {
            font-size: 20px;
            font-weight: 700;
            color: #222;
            margin-bottom: 5px;
        }

        .sd-glass-preview-price {
            font-size: 13px;
            color: #555;
        }

        .sd-glass-right {
            flex: 1;
            padding: 24px 28px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .sd-glass-right h3 {
            font-size: 17px;
            font-weight: 700;
            color: #222;
            margin: 0 0 8px;
        }

        .sd-glass-right p {
            font-size: 13px;
            color: #555;
            margin: 0 0 8px;
            line-height: 1.55;
        }

        .sd-glass-right h4 {
            font-size: 14px;
            font-weight: 700;
            color: #222;
            margin: 14px 0 5px;
        }

        .sd-glass-tabs {
            display: flex;
            margin: 12px 0 14px;
        }

        .sd-glass-tab {
            padding: 8px 18px;
            font-size: 13px;
            border: 1.5px solid #c0ccda;
            background: #fff;
            cursor: pointer;
            color: #334;
            margin-right: -1px;
            position: relative;
        }

        .sd-glass-tab.active {
            background: #1a6bbf;
            color: #fff;
            border-color: #1a6bbf;
            z-index: 1;
        }

        .sd-glass-tab:hover:not(.active) {
            background: #f0f5fb;
        }

        .sd-glass-tab-panel {
            display: none;
        }

        .sd-glass-tab-panel.active {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .sd-glass-swatch-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            width: 84px;
        }

        .sd-glass-swatch-thumb {
            width: 84px;
            height: 84px;
            border: 2px solid #ddd;
            box-sizing: border-box;
            transition: border-color 0.12s;
        }

        .sd-glass-swatch-item.selected .sd-glass-swatch-thumb,
        .sd-glass-swatch-item:hover .sd-glass-swatch-thumb {
            border-color: #1a6bbf;
        }

        .sd-glass-swatch-label {
            font-size: 11px;
            color: #555;
            text-align: center;
            margin-top: 5px;
        }

        .sd-glass-foot {
            display: flex;
            justify-content: flex-end;
            padding: 12px 28px;
            border-top: 1px solid #eee;
            background: #fff;
            flex-shrink: 0;
        }

        .sd-glass-save-btn {
            background: #1a6bbf;
            color: #fff;
            border: none;
            font-size: 14px;
            font-weight: 500;
            padding: 10px 50px;
            cursor: pointer;
        }

        .sd-glass-save-btn:hover {
            background: #155a9e;
        }

        /* Board panel-cat hover effect */
        .sd-panel-cat[data-cat="boards"] {
            position: relative;
            cursor: pointer;
            transition: background 0.18s;
        }

        .sd-panel-cat[data-cat="boards"]:hover {
            background: #3a3a3a;
        }

        .sd-panel-cat[data-cat="boards"]:hover .sd-swatch {
            opacity: 0.55;
        }

        .sd-panel-cat[data-cat="boards"]:hover .sd-panel-cat-label {
            background: #3a3a3a;
            border-color: #555;
            color: #bbb;
        }

        /* Board selection modal */
        .sd-board-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .sd-board-overlay.is-open {
            display: flex;
        }

        .sd-board-dialog {
            background: #fff;
            display: flex;
            position: relative;
            width: 940px;
            max-width: 97vw;
            height: 88vh;
            max-height: 88vh;
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.32);
            overflow: hidden;
        }

        .sd-board-close-btn {
            position: absolute;
            top: 10px;
            right: 14px;
            background: none;
            border: none;
            font-size: 22px;
            cursor: pointer;
            color: #444;
            line-height: 1;
            padding: 4px 8px;
            z-index: 10;
        }

        /* Left column */
        .sd-board-left {
            width: 260px;
            flex-shrink: 0;
            padding: 20px 18px;
            background: #f7f7f7;
            border-right: 1px solid #e0e0e0;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .sd-board-preview {
            width: 100%;
            aspect-ratio: 1;
            border: 1px solid #ddd;
            background: #e0e0e0;
            margin-bottom: 14px;
            box-sizing: border-box;
            flex-shrink: 0;
        }

        .sd-board-prod-name {
            font-size: 17px;
            font-weight: 700;
            color: #222;
            margin-bottom: 3px;
        }

        .sd-board-prod-sub {
            font-size: 13px;
            color: #555;
            margin-bottom: 2px;
        }

        .sd-board-prod-size {
            font-size: 13px;
            color: #555;
            margin-bottom: 6px;
        }

        .sd-board-thick-row {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 10px;
        }

        .sd-board-thick-opt {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
        }

        .sd-board-prod-price {
            font-size: 13px;
            color: #333;
            margin-bottom: 14px;
        }

        .sd-board-grain-label {
            font-size: 13px;
            font-weight: 600;
            color: #333;
            margin-bottom: 8px;
        }

        .sd-board-grain-row {
            display: flex;
            gap: 10px;
        }

        .sd-board-grain-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            border: 2px solid #ddd;
            background: #fff;
            cursor: pointer;
            padding: 8px 14px;
            font-size: 12px;
            color: #444;
            transition: border-color 0.12s;
        }

        .sd-board-grain-btn.selected {
            border-color: #1a6bbf;
        }

        .sd-board-grain-btn svg {
            display: block;
        }

        /* Right column */
        .sd-board-right {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
            overflow: hidden;
        }

        .sd-board-right-body {
            flex: 1;
            padding: 18px 22px 0;
            overflow-y: auto;
            min-height: 0;
        }

        .sd-board-right h3 {
            font-size: 16px;
            font-weight: 700;
            color: #222;
            margin: 0 0 5px;
        }

        .sd-board-right p {
            font-size: 13px;
            color: #555;
            margin: 0 0 10px;
            line-height: 1.5;
        }

        .sd-board-search-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .sd-board-search-label {
            font-size: 13px;
            color: #555;
            white-space: nowrap;
        }

        .sd-board-search-input {
            flex: 1;
            border: 1px solid #ccc;
            padding: 6px 10px;
            font-size: 13px;
            outline: none;
        }

        .sd-board-search-input:focus {
            border-color: #1a6bbf;
        }

        .sd-board-brands {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 12px;
        }

        .sd-board-brand-btn {
            padding: 6px 14px;
            font-size: 13px;
            border: 1.5px solid #c0ccda;
            background: #fff;
            cursor: pointer;
            color: #334;
            transition: border-color 0.1s, background 0.1s;
        }

        .sd-board-brand-btn.active {
            background: #1a6bbf;
            color: #fff;
            border-color: #1a6bbf;
        }

        .sd-board-brand-btn:hover:not(.active) {
            background: #f0f5fb;
            border-color: #9ab0c8;
        }

        .sd-board-subcat-wrap {
            margin-bottom: 10px;
        }

        .sd-board-subcat-select {
            width: 240px;
            border: 1.5px solid #c0ccda;
            padding: 7px 10px;
            font-size: 13px;
            appearance: none;
            background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1l6 7 6-7' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
            cursor: pointer;
            outline: none;
        }

        .sd-board-subcat-select:focus {
            border-color: #1a6bbf;
        }

        .sd-board-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
            padding-bottom: 16px;
        }

        .sd-board-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
        }

        .sd-board-thumb {
            width: 100%;
            aspect-ratio: 1;
            border: 2px solid #ddd;
            box-sizing: border-box;
            transition: border-color 0.12s;
        }

        .sd-board-item.selected .sd-board-thumb,
        .sd-board-item:hover .sd-board-thumb {
            border-color: #1a6bbf;
        }

        .sd-board-item-code {
            font-size: 10px;
            color: #555;
            text-align: center;
            margin-top: 3px;
            line-height: 1.3;
        }

        .sd-board-foot {
            display: flex;
            justify-content: flex-end;
            padding: 12px 22px;
            border-top: 1px solid #eee;
            flex-shrink: 0;
        }

        .sd-board-save-btn {
            background: #1a6bbf;
            color: #fff;
            border: none;
            font-size: 14px;
            font-weight: 500;
            padding: 10px 50px;
            cursor: pointer;
        }

        .sd-board-save-btn:hover {
            background: #155a9e;
        }

        /* Door-select warning dialog */
        .sd-warn-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(80, 90, 100, 0.45);
            z-index: 3000;
            align-items: center;
            justify-content: center;
        }

        .sd-warn-overlay.is-open {
            display: flex;
        }

        .sd-warn-dialog {
            background: #fff;
            border-radius: 4px;
            width: 360px;
            max-width: 94vw;
            padding: 36px 32px 28px;
            display: flex;
            flex-direction: column;
            align-items: center;
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
            text-align: center;
        }

        .sd-warn-icon {
            width: 58px;
            height: 58px;
            border-radius: 50%;
            border: 2.5px solid #e8a030;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 18px;
        }

        .sd-warn-icon span {
            font-size: 28px;
            font-weight: 700;
            color: #e8a030;
            line-height: 1;
        }

        .sd-warn-title {
            font-size: 22px;
            font-weight: 700;
            color: #222;
            margin-bottom: 10px;
        }

        .sd-warn-body {
            font-size: 14px;
            color: #666;
            line-height: 1.55;
            margin-bottom: 24px;
        }

        .sd-warn-ok-btn {
            border: 1.5px solid #1a6bbf;
            background: #fff;
            color: #1a6bbf;
            padding: 8px 50px;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.12s, color 0.12s;
        }

        .sd-warn-ok-btn:hover {
            background: #1a6bbf;
            color: #fff;
        }

        .sd-panel-cat {
            flex: 1;
            border: 1px solid #ddd;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .sd-swatch-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 4px;
            padding: 10px;
            flex: 1;
        }

        .sd-swatch {
            aspect-ratio: 1;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            border: 2px solid transparent;
            box-sizing: border-box;
            transition: border-color 0.12s;
        }

        .sd-swatch:hover {
            opacity: 0.85;
        }

        .sd-swatch.selected {
            border-color: #1a6bbf;
        }

        .sd-panel-cat-label {
            padding: 9px 6px;
            text-align: center;
            font-size: 13px;
            font-weight: 500;
            border-top: 1px solid #eee;
            background: #fff;
        }

        .sd-panel-cat[data-cat="glass"] .sd-panel-cat-label {
            color: #c87800;
        }

        .sd-panel-cat[data-cat="boards"] .sd-panel-cat-label {
            color: #444;
        }

        /* Summary step */
        .sd-summary {
            display: flex;
            gap: 0;
            min-height: 220px;
            background: #fff;
            border-bottom: 1px solid #eee;
        }

        .sd-sum-left {
            width: 260px;
            flex-shrink: 0;
            padding: 16px 18px;
            border-right: 1px solid #eee;
        }

        .sd-sum-mid {
            flex: 1;
            padding: 16px 24px;
            border-right: 1px solid #eee;
        }

        .sd-sum-right {
            width: 290px;
            flex-shrink: 0;
            padding: 16px 18px;
        }

        .sd-sum-door-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 14px;
        }

        .sd-sum-door-tab {
            padding: 6px 16px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            border: 1.5px solid #1a6bbf;
            background: #fff;
            color: #1a6bbf;
            margin-right: -1px;
            outline: none;
        }

        .sd-sum-door-tab.active {
            background: #1a6bbf;
            color: #fff;
            z-index: 1;
            position: relative;
        }

        .sd-sum-door-detail p {
            margin: 0 0 8px;
            font-size: 13px;
            color: #333;
        }

        .sd-sum-door-detail strong {
            font-weight: 600;
        }

        .sd-sum-closer {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .sd-sum-closer label {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 13px;
            color: #c87800;
            cursor: pointer;
        }

        .sd-sum-closer input[type="checkbox"] {
            accent-color: #c87800;
        }

        .sd-sum-section-title {
            font-size: 15px;
            font-weight: 700;
            color: #222;
            margin: 0 0 4px;
        }

        .sd-sum-section-title+.sd-sum-section-title {
            margin-top: 14px;
        }

        .sd-sum-val {
            font-size: 13px;
            color: #333;
            margin: 0 0 12px;
        }

        .sd-sum-val.blue {
            color: #1a6bbf;
        }

        .sd-sum-val.track {
            color: #1a6bbf;
            margin: 0 0 4px;
        }

        .sd-sum-price-title {
            font-size: 15px;
            font-weight: 700;
            color: #222;
            margin: 0 0 10px;
        }

        .sd-sum-price-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            font-size: 13px;
            color: #555;
            margin: 0 0 4px;
        }

        .sd-sum-board-note {
            font-size: 12px;
            color: #c87800;
            margin: 2px 0 6px;
        }

        .sd-sum-total-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            font-size: 17px;
            font-weight: 700;
            color: #111;
            margin: 10px 0 4px;
            padding-top: 8px;
            border-top: 1px solid #ddd;
        }

        .sd-sum-price-row.vat {
            font-size: 12px;
            color: #888;
            margin-bottom: 12px;
        }

        .sd-sum-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 10px;
        }

        .sd-sum-qty {
            display: flex;
            align-items: center;
            border: 1.5px solid #ccc;
            height: 40px;
            flex-shrink: 0;
        }

        .sd-sum-qty span {
            min-width: 36px;
            text-align: center;
            font-size: 14px;
        }

        .sd-qty-btn {
            width: 36px;
            height: 100%;
            border: none;
            cursor: pointer;
            font-size: 18px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .sd-qty-btn.dec {
            background: #555;
            color: #fff;
        }

        .sd-qty-btn.inc {
            background: #1a6bbf;
            color: #fff;
        }

        .sd-add-basket {
            flex: 1;
            height: 40px;
            background: #1a6bbf;
            color: #fff;
            border: none;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
        }

        .sd-add-basket:hover {
            background: #155a9e;
        }

        /* Frame selection info banner */
        .sd-frame-info {
            background: #fff9f0;
            border-bottom: 1px solid #f5ddb8;
            padding: 9px 16px;
            font-size: 13px;
            color: #c87800;
            text-align: center;
            display: none;
        }

        .sd-frame-info.visible {
            display: block;
        }

        /* Vertical Seam Floating Switch Buttons */
        .sd-switch-container {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 10;
        }

        .sd-switch-wrap {
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }

        .sd-switch-btn {
            pointer-events: all;
            width: auto;
            height: auto;
            background: #ffffff;
            border: 1.5px solid #94a3b8;
            border-radius: 9999px;
            padding: 7px 22px;
            font-size: 13.5px;
            font-weight: 500;
            color: #1e293b;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.18s ease;
            user-select: none;
            line-height: 1.2;
            outline: none;
        }

        .sd-switch-btn:hover {
            background: #ffffff;
            border-color: #64748b;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
            transform: scale(1.05);
        }

        .sd-switch-btn:active {
            transform: scale(0.98);
        }

        .sd-switch-btn.active {
            background: #ffffff;
            border-color: #0284c7;
            color: #0284c7;
            box-shadow: 0 2px 10px rgba(2, 132, 199, 0.18);
        }

        .sd-switch-btn:disabled,
        .sd-switch-btn.disabled {
            opacity: 1 !important;
            background: #f1f5f9;
            border: 1.5px solid #cbd5e1;
            color: #64748b;
            cursor: not-allowed !important;
            pointer-events: none !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
            transform: none !important;
        }

        .header .tabs a.tab {
            text-decoration: none;
            cursor: pointer;
        }

        .is-layout-constrained> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
            max-width: 100% !important;
        }
        
        /* Max length/width warning tooltip (cutting-margin cap on the selected
   board's own sheet size) */
        .cutlist-max-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-bottom: 8px;
            background: #fef2f2;
            border: 1px solid #f87171;
            color: #991b1b;
            font-size: 11.5px;
            font-weight: 500;
            line-height: 1.4;
            padding: 5px 10px;
            border-radius: 6px;
            white-space: nowrap;
            z-index: 100;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
            pointer-events: none;
        }

        .cutlist-max-tooltip::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 5px solid transparent;
            border-top-color: #f87171;
        }

        /* SPRAY FINISHING MINIMUM ORDER SIZE MODAL */
        .spray-min-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 999999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            box-sizing: border-box;
            backdrop-filter: blur(3px);
        }

        .spray-min-modal {
            background: #ffffff;
            width: min(500px, 100%);
            border-radius: 12px;
            padding: 40px 36px;
            box-sizing: border-box;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
            animation: sprayModalScaleIn 0.2s ease-out;
        }

        @keyframes sprayModalScaleIn {
            from {
                transform: scale(0.94);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .spray-min-icon {
            display: flex;
            justify-content: center;
            margin-bottom: 22px;
        }

        .spray-min-title {
            font-size: 26px;
            font-weight: 600;
            color: #111827;
            margin: 0 0 16px 0;
            line-height: 1.2;
        }

        .spray-min-desc {
            font-size: 15px;
            color: #4b5563;
            line-height: 1.55;
            margin: 0 0 22px 0;
        }

        .spray-min-desc span {
            font-weight: 600;
            color: #111827;
        }

        .spray-min-charge {
            font-size: 36px;
            font-weight: 700;
            color: #111827;
            margin: 0 0 32px 0;
            letter-spacing: -0.01em;
        }

        .spray-min-actions {
            display: flex;
            gap: 16px;
            justify-content: center;
        }

        .spray-min-actions button {
            padding: 10px 24px;
            border-radius: 4px;
            font-size: 14.5px;
            font-weight: 500;
            cursor: pointer;
            background: #ffffff;
            color: #0088cc;
            border: 1px solid #0088cc;
            transition: all 0.15s ease;
        }

        .spray-min-actions button:hover {
            background: #0088cc;
            color: #ffffff;
        }

        /* Summary Cart Action Buttons */
        .summary-cart-actions {
            margin-top: 18px;
            display: flex;
            gap: 14px;
            justify-content: flex-end;
            align-items: center;
            flex-wrap: wrap;
        }

        .summary-cart-actions .btn-wc-cart {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            background: #ffffff !important;
            color: #2563eb !important;
            border: 1.5px solid #2563eb !important;
            padding: 11px 22px !important;
            border-radius: 10px !important;
            font-size: 15px !important;
            font-weight: 600 !important;
            text-decoration: none !important;
            cursor: pointer !important;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
        }

        .summary-cart-actions .btn-wc-cart:hover {
            background: #eff6ff !important;
            color: #1d4ed8 !important;
            border-color: #1d4ed8 !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15) !important;
        }

        .summary-cart-actions .btn-wc-cart:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
        }

        .summary-cart-actions .btn-wc-checkout {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            background: #16a34a !important;
            color: #ffffff !important;
            border: 1.5px solid #16a34a !important;
            padding: 11px 22px !important;
            border-radius: 10px !important;
            font-size: 15px !important;
            font-weight: 600 !important;
            text-decoration: none !important;
            cursor: pointer !important;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
        }

        .summary-cart-actions .btn-wc-checkout:hover {
            background: #15803d !important;
            border-color: #15803d !important;
            color: #ffffff !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2) !important;
        }

        .summary-cart-actions .btn-wc-checkout:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
        }

        .summary-cart-actions .btn-wc-cart svg {
            margin-right: 8px;
            flex-shrink: 0;
        }

        .summary-cart-actions .btn-wc-checkout svg {
            margin-left: 8px;
            flex-shrink: 0;
        }

        /* ── CUTLIST DRAFT RESTORED TOAST ───────────────────────────── */
        .cutlist-draft-toast {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 999999;
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            background: #0f172a;
            color: #ffffff;
            border-radius: 12px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
            border-left: 4px solid #10b981;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            font-size: 13px;
            line-height: 1.4;
            animation: cutlistToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .cutlist-draft-toast.fade-out {
            opacity: 0;
            transform: translateY(12px);
        }

        @keyframes cutlistToastSlideIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .cutlist-draft-toast__icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(16, 185, 129, 0.15);
            color: #10b981;
            flex-shrink: 0;
        }

        .cutlist-draft-toast__content {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .cutlist-draft-toast__content strong {
            font-size: 13px;
            font-weight: 600;
            color: #f8fafc;
        }

        .cutlist-draft-toast__content span {
            font-size: 12px;
            color: #94a3b8;
        }

        .cutlist-draft-toast__close {
            background: transparent;
            border: none;
            color: #94a3b8;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            padding: 0 0 0 8px;
            margin-left: 4px;
            display: flex;
            align-items: center;
            transition: color 0.15s;
        }

        .cutlist-draft-toast__close:hover {
            color: #ffffff;
        }

        @media (max-width: 640px) {
            .cutlist-draft-toast {
                left: 16px;
                right: 16px;
                bottom: 16px;
            }
        }

        /* ==========================================================================
           CNC MACHINING JOB SECTION
           ========================================================================== */
        .cnc-job-card {
            background: #ffffff;
            border: 1px solid #e5e7eb;
            border-radius: 16px;
            padding: 28px 32px;
            margin-top: 35px;
            margin-bottom: 40px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            box-sizing: border-box;
        }

        .cnc-job-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .cnc-job-title-wrap {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .cnc-job-title-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #e8f7ee;
            color: var(--primary-color, #15803d);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .cnc-job-title {
            margin: 0;
            font-size: 24px;
            font-weight: 600;
            color: #111827;
            letter-spacing: -0.2px;
            line-height: 1.25;
        }

        .cnc-job-collapse-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: transparent;
            border: none;
            color: var(--primary-color, #15803d);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            transition: opacity 0.15s ease, background 0.15s ease;
        }

        .cnc-job-collapse-btn:hover {
            opacity: 0.85;
            background: #f0fdf4;
        }

        .cnc-job-collapse-icon {
            transition: transform 0.25s ease;
        }

        .cnc-job-card.is-collapsed .cnc-job-collapse-icon {
            transform: rotate(180deg);
        }

        .cnc-job-body {
            transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.3s ease;
            max-height: 2000px;
            opacity: 1;
            overflow: visible;
        }

        .cnc-job-card.is-collapsed .cnc-job-body {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            margin: 0;
            padding: 0;
        }

        .cnc-job-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 36px;
            align-items: start;
        }

        .cnc-col-header {
            margin-bottom: 14px;
        }

        .cnc-col-title {
            margin: 0 0 4px;
            font-size: 18px;
            font-weight: 600;
            color: #111827;
            line-height: 1.3;
        }

        .cnc-col-subtitle {
            margin: 0;
            font-size: 14px;
            font-weight: 400;
            color: #6b7280;
            line-height: 1.4;
        }

        /* Dropzone */
        .cnc-dropzone-box {
            border: 1.5px dashed #86efac;
            background: #fbfdfb;
            border-radius: 12px;
            padding: 28px 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: border-color 0.2s ease, background 0.2s ease;
            box-sizing: border-box;
        }

        .cnc-dropzone-box:hover,
        .cnc-dropzone-box.is-dragover {
            border-color: var(--primary-color, #15803d);
            background: #f2faf4;
        }

        .cnc-upload-cloud-badge {
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: #dcfce7;
            color: var(--primary-color, #15803d);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 12px;
        }

        .cnc-dropzone-title {
            font-size: 15px;
            font-weight: 600;
            color: #111827;
            margin: 0 0 4px;
        }

        .cnc-dropzone-or {
            font-size: 13px;
            color: #9ca3af;
            margin: 0 0 10px;
        }

        .cnc-choose-files-btn {
            background: #ffffff;
            border: 1.5px solid #22c55e;
            color: var(--primary-color, #15803d);
            font-size: 14px;
            font-weight: 600;
            padding: 6px 20px;
            border-radius: 8px;
            cursor: pointer;
            display: inline-block;
            transition: all 0.15s ease;
        }

        .cnc-choose-files-btn:hover {
            background: #f0fdf4;
            border-color: #16a34a;
        }

        /* File List */
        .cnc-uploaded-files-list {
            margin-top: 12px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            width: 100%;
        }

        .cnc-file-chip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 13px;
            color: #166534;
        }

        .cnc-file-chip-name {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 80%;
            font-weight: 500;
        }

        .cnc-file-chip-remove {
            background: transparent;
            border: none;
            color: #ef4444;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            padding: 0 4px;
        }

        /* Metadata Badges below Dropzone */
        .cnc-file-meta-row {
            display: flex;
            flex-wrap: wrap;
            gap: 18px;
            margin-top: 14px;
            padding-top: 4px;
        }

        .cnc-meta-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            font-size: 12.5px;
            color: #6b7280;
            line-height: 1.35;
        }

        .cnc-meta-item svg {
            flex-shrink: 0;
            color: #6b7280;
            margin-top: 1px;
        }

        .cnc-meta-text {
            display: flex;
            flex-direction: column;
        }

        .cnc-meta-label {
            color: #6b7280;
        }

        .cnc-meta-val {
            font-weight: 700;
            color: #111827;
        }

        /* Right Column - Textarea */
        .cnc-textarea-wrap {
            position: relative;
            width: 100%;
        }

        .cnc-details-textarea {
            width: 100%;
            height: 186px;
            min-height: 186px;
            border: 1px solid #d1d5db;
            border-radius: 10px;
            padding: 14px 16px;
            font-size: 14px;
            color: #374151;
            font-family: inherit;
            resize: vertical;
            box-sizing: border-box;
            outline: none;
            transition: border-color 0.18s ease, box-shadow 0.18s ease;
            background: #ffffff;
            line-height: 1.5;
        }

        .cnc-details-textarea::placeholder {
            color: #9ca3af;
        }

        .cnc-details-textarea:focus {
            border-color: #16a34a;
            box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
        }

        .cnc-char-count {
            text-align: right;
            color: #6b7280;
            font-size: 12.5px;
            margin-top: 6px;
        }

        /* Submit Button */
        .cnc-submit-wrap {
            display: flex;
            justify-content: center;
            margin-top: 32px;
            width: 100%;
        }

        .cnc-submit-btn {
            background: var(--primary-color, #1e874b);
            color: #ffffff;
            border: none;
            padding: 12px 42px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
            box-shadow: 0 2px 4px rgba(21, 128, 61, 0.2);
            text-decoration: none;
        }

        .cnc-submit-btn:hover {
            background: #146c36;
            box-shadow: 0 4px 6px rgba(21, 128, 61, 0.25);
        }

        .cnc-submit-btn:active {
            transform: scale(0.98);
        }

        .cnc-feedback-toast {
            margin-top: 14px;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            display: none;
            text-align: center;
        }

        .cnc-feedback-toast.is-success {
            display: block;
            background: #dcfce7;
            color: #166534;
            border: 1px solid #bbf7d0;
        }

        .cnc-feedback-toast.is-error {
            display: block;
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }

        @media (max-width: 860px) {
            .cnc-job-grid {
                grid-template-columns: 1fr;
                gap: 24px;
            }

            .cnc-job-card {
                padding: 20px 16px;
            }
        }