:root {
    --primary-color: #1d1d1f;
    --accent-color: #2563eb;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --border-color: #d2d2d7;
    --text-main: #1d1d1f;
    --text-sub: #86868b;
    --font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Segoe UI', sans-serif;
    --nav-bg: #ffffff;
    --ring: #0071e3;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

.wizard-app {
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.wd-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.wd-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 24px 8px;
}

.wd-brand p {
    margin: 0;
    font-size: 13px;
    color: #86868b;
}

.wd-brand strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.wd-cart {
    position: relative;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #6e6e73;
    cursor: pointer;
    padding: 8px 10px;
}

.wd-cart:hover {
    color: #1d1d1f;
}

.wd-cart-badge {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: #1d1d1f;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.wizard-steps {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 24px 16px;
}

.wizard-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #86868b;
    cursor: pointer;
    background: none;
    padding: 6px 0;
}

.wizard-steps li.is-current,
.wizard-steps li.is-done {
    color: #1d1d1f;
}

.wizard-steps li:not(:last-child)::after {
    content: '';
    height: 1px;
    width: 36px;
    margin: 0 14px;
    background: #d1d5db;
    flex-shrink: 0;
    pointer-events: none;
}

.wizard-steps li.is-done:not(:last-child)::after {
    background: rgba(0, 122, 255, 0.3);
}

.wizard-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    position: relative;
}

.wizard-steps li.is-current .wizard-num {
    background: #007aff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.28);
    outline: 4px solid rgba(0, 122, 255, 0.12);
}

.wizard-steps li.is-done .wizard-num {
    background: #007aff;
    color: transparent;
}

.wizard-steps li.is-done .wizard-num::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    top: 6px;
    left: 10px;
}

.wizard-label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.wizard-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.wizard-top {
    padding: 28px 24px 8px;
}

.wizard-top h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #1d1d1f;
}

.wizard-top p {
    margin-top: 4px;
    color: #6e6e73;
    font-size: 14px;
    font-weight: 400;
}

.wizard-stage {
    flex: 1;
    padding: 8px 24px 8px;
    min-height: 0;
    width: 100%;
}

.wizard-panel {
    display: none;
    min-height: 360px;
}

.wizard-panel.is-on {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: wizard-in 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wizard-in {
    from {
        opacity: 0;
        transform: translateX(var(--wizard-slide, 28px));
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.wizard-bar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px 28px;
    width: 100%;
}

.wizard-btn {
    min-width: 120px;
    height: 52px;
    border-radius: 12px;
    border: 0;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.wizard-btn.ghost {
    background: #fff;
    color: #1d1d1f;
    border: 1px solid #d1d5db;
}

.wizard-btn.ghost:hover:not(:disabled) {
    background: #f5f5f7;
}

.wizard-btn.ghost:disabled {
    opacity: 0.3;
    cursor: default;
}

.wizard-btn.primary {
    background: #2563eb;
    color: #fff;
    margin-left: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.wizard-btn.primary:hover {
    background: #1d4ed8;
}

.wizard-panel[data-step="1"] .modal-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    justify-content: stretch;
}

.wizard-panel[data-step="1"] .mat-item {
    width: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f7f5f2;
}

.wizard-panel[data-step="1"] .mat-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f3f0eb;
}

.wizard-panel[data-step="1"] .mat-item p {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
}

.wizard-panel[data-step="1"] .mat-item.active {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.wizard-panel[data-step="4"] .visual-blueprint-area {
    flex: 1;
    min-height: 280px;
    aspect-ratio: unset;
    background: #f5f5f7;
    border-radius: 16px;
}

.size-sheet {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
}

.order-sheet-head {
    display: flex;
    justify-content: flex-end;
}

/* LAYOUT (legacy, unused in wizard) */
.main-layout {
    max-width: 1800px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 1fr 1fr 340px;
    gap: 24px;
    padding: 0 20px;
    height: calc(100vh - 40px);
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.left-panel .mat-setup {
    flex-shrink: 0;
}

.left-panel .draw-setup {
    flex: 1;
    min-height: 0;
}

.left-panel .draw-setup .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.left-panel .draw-setup .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.left-panel .visual-blueprint-area {
    flex: 1;
    min-height: 0;
    aspect-ratio: unset;
}

.left-panel .cart-action-area-compact {
    flex-shrink: 0;
}



.right-panel {
    height: 100%;
    min-height: 0;
}

.right-panel .col-section {
    height: 100%;
}

.right-panel .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.right-panel .card-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.h-full {
    height: 100%;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

/* CARD SYSTEM */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(90, 62, 40, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.card-header {
    padding: 18px 22px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: #f3e8dc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 16px;
}

.card-title-group h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.card-title-group p {
    font-size: 12px;
    color: var(--text-sub);
}

.card-body {
    padding: 20px;
    flex: 1;
}

.scroll-y {
    overflow-y: auto;
    padding-right: 10px;
}

/* SECTION 1: WOOD SELECTION */
.material-selection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.zoom-trigger {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
    cursor: zoom-in;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #cbd5e1;
    transition: 0.2s;
}

.zoom-trigger:hover {
    color: var(--accent-color);
    text-decoration-color: var(--accent-color);
}

.small-select-btn {
    padding: 8px 16px;
    background: var(--text-main);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-field.full {
    grid-column: span 2;
}

.input-field label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 6px;
}

.limit-hint {
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
}

.select-box {
    position: relative;
}

.select-box select,
.input-field input {
    width: 100%;
    height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 700;
    background: #fcfdfe;
    transition: 0.2s;
}

.select-box select {
    appearance: none;
}

.select-box i {
    position: absolute;
    right: 12px;
    top: 16px;
    color: #cbd5e0;
    pointer-events: none;
}

/* SECTION 2: PROCESSING */
.options-grid-3col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}



.shape-option {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100px;
    justify-content: center;
}

.shape-option.active {
    border: 2.5px solid var(--text-main);
    background: #f0f7ff;
}

.shape-option img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 10px;
}

.shape-option span {
    font-size: 13px;
    font-weight: 800;
}

.active-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: var(--text-main);
    color: white;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.shape-option.active .active-check {
    opacity: 1;
}

.processing-details-area {
    margin-top: 10px;
}

.process-detail-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #edf2f7;
}

.process-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.process-detail-header img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.process-detail-header h4 {
    font-size: 14px;
    font-weight: 800;
}

.detail-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-input-grid .input-field.full {
    grid-column: span 2;
}

.detail-input-grid input {
    height: 40px;
    font-size: 14px;
}

.process-info-text {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.4;
}

/* SECTION 3: BLUEPRINT & PAYMENT */
.visual-blueprint-area {
    width: 100%;
    aspect-ratio: 1;
    background: #fff;
    border-radius: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(226, 232, 240, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
    background-size: 15px 15px;
}

#blueprint-svg {
    width: 100%;
    height: 100%;
    z-index: 2;
}

.applied-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option-row {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #edf2f7;
}

.option-row h5 {
    font-size: 13px;
    font-weight: 700;
}

.option-row p {
    font-size: 11px;
    color: #94a3b8;
}

.opt-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
}

.cart-action-area-compact {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #edf2f7;
}

.price-display-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.price-display-compact .label {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
}

.price-display-compact .price-val {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-main);
}

.cart-btn {
    width: 100%;
    height: 48px;
    background: var(--text-main);
    color: white;
    border: none;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.15s;
}

.cart-btn:hover {
    background: #333;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 95%;
    max-width: 1050px;
    max-height: 90vh;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.modal-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, 450px);
    gap: 24px;
    justify-content: center;
}

.mat-item {
    width: 450px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    background: #fff;
    overflow: hidden;
    transition: 0.2s;
}

.mat-item:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.mat-item.active {
    border-color: var(--accent-color);
    border-width: 3px;
    box-shadow: 0 0 0 2px #1d1d1f;
}

.mat-item img {
    width: 450px;
    height: 450px;
    object-fit: cover;
    display: block;
}

.mat-item p {
    padding: 16px 12px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--text-main);
    background: #fff;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e2e8f0;
}

@media (max-width: 430px) {
    .modal-grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mat-item {
        width: 100%;
    }

    .mat-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
}

/* IMAGE POPUP */
.image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.image-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#popup-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
}

.image-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* MOBILE */
@media (max-width: 1400px) {
    .main-layout {
        grid-template-columns: 1fr 1fr;
    }

    .order-panel {
        grid-column: span 2;
    }

    .order-panel .card-body {
        max-height: 300px;
    }
}

@media (max-width: 900px) {
    .wizard-label {
        display: none;
    }
    .wizard-steps li:not(:last-child)::after {
        width: 16px;
        margin: 0 6px;
    }
    .wd-brand strong {
        font-size: 18px;
    }
    .wizard-top,
    .wizard-stage,
    .wizard-bar {
        padding-left: 16px;
        padding-right: 16px;
    }
    .wizard-panel {
        min-height: 360px;
    }
}

@media (max-width: 1100px) {
    .main-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .side-panel {
        display: contents;
    }

    .mat-setup {
        order: 1;
    }

    .proc-setup {
        order: 2;
    }

    .draw-setup {
        order: 3;
    }

    .order-panel>section {
        order: 4;
    }

    .options-grid-3col {
        grid-template-columns: 1fr 1fr;
    }

    .order-panel {
        grid-column: unset;
    }
}

.empty-processing-msg {
    padding: 40px;
    text-align: center;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.selected-info-box ul {
    list-style: none;
}

.info-box-compact {
    margin-top: 20px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
}

.info-box-compact p {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box-compact i {
    color: var(--accent-color);
}

/* Hinge Grid Styles */
.hinge-grid-unified {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hinge-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    transition: all 0.2s;
    opacity: 0.6;
}

.hinge-card.active {
    background: white;
    border-color: var(--accent-color);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
}

.hinge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.hinge-num {
    font-size: 13px;
    font-weight: 900;
    color: var(--text-main);
}

.hinge-card.active .hinge-num {
    color: var(--accent-color);
}

/* Toggle Switch */
.hinge-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.hinge-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hinge-toggle input:checked+.toggle-slider {
    background: var(--accent-color);
}

.hinge-toggle input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.hinge-card .detail-input-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}

.hinge-card .input-field input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Diameter Badge */
.diameter-badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--accent-color) 0%, #7a4329 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.diameter-badge i {
    font-size: 10px;
}

/* Modal Header Left */
.modal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Quick Select Dropdown (모달 내부) */
.quick-select-container {
    position: relative;
}

.quick-select-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--text-main);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.quick-select-btn:hover {
    background: #000;
}

.quick-select-arrow {
    transition: transform 0.2s;
    font-size: 11px;
}

.quick-select-container.open .quick-select-arrow {
    transform: rotate(180deg);
}

.quick-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.2s;
    z-index: 10;
}

.quick-select-container.open .quick-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: 0.15s;
    border-bottom: 1px solid #f1f5f9;
}

.quick-select-item:last-child {
    border-bottom: none;
}

.quick-select-item:hover {
    background: #f8fafc;
}

.quick-select-item.active {
    background: #f0f7ff;
}

.quick-select-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.quick-select-item-info {
    flex: 1;
}

.quick-select-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.quick-select-item-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.quick-select-item .active-check {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.quick-select-item.active .active-check {
    opacity: 1;
}

@media (max-width: 768px) {
    .quick-select-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .quick-select-btn span {
        display: none;
    }

    .quick-select-dropdown {
        width: 260px;
        right: -40px;
    }
}

/* ============================
   ORDER LIST PANEL
   ============================ */

.order-panel {
    height: 100%;
    min-height: 0;
}

.order-panel .card-header {
    position: relative;
}

.order-count-badge {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #7a4329 100%);
    color: white;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-count-badge.pulse {
    animation: badgePulse 0.4s ease;
}

@keyframes badgePulse {
    0% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-50%) scale(1.3);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}

.order-empty-msg {
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 20px;
    color: #94a3b8;
}

.order-empty-msg .empty-icon-wrapper {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #eef2f7;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #94a3b8;
}

.order-empty-msg h4 {
    font-size: 14px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 6px;
}

.order-empty-msg p {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Order Item Cards */
.order-item-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 10px;
    position: relative;
    transition: all 0.2s;
    animation: orderSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes orderSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.order-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.order-item-num {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-color);
    background: #eef4ff;
    padding: 3px 10px;
    border-radius: 8px;
}

.order-item-delete {
    width: 26px;
    height: 26px;
    border: none;
    background: #f8fafc;
    color: #94a3b8;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.order-item-delete:hover {
    background: #fef2f2;
    color: #ef4444;
}

.order-item-material {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.order-item-size {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.order-item-processes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.order-process-tag {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
}

.order-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.order-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    line-height: 1;
}

.qty-btn:hover {
    background: #eef4ff;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.qty-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    min-width: 20px;
    text-align: center;
}

.order-item-price {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-main);
    text-align: right;
}

.order-item-price small {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
}

/* Order Footer */
.order-footer {
    padding: 16px 20px;
    border-top: 1px solid #edf2f7;
    background: #f8fafc;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-total-label {
    font-size: 15px;
    font-weight: 800;
    color: #64748b;
}

.order-total-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-main);
}

.order-footer-actions {
    display: flex;
    gap: 8px;
}

.order-submit-btn {
    flex: 1;
    height: 40px;
    background: var(--accent-color);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
}

.order-submit-btn:hover {
    background: #333;
}

.order-clear-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: 0.2s;
}

.order-clear-btn:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.quote-modal-box {
    max-width: 480px;
    padding-bottom: 20px;
}
.quote-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px 8px;
}
.quote-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-sub);
}
.quote-form input,
.quote-form select,
.quote-form textarea {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
}
.quote-sum-line {
    font-size: 15px;
    margin-bottom: 4px;
}
.quote-error {
    color: #dc2626;
    font-size: 13px;
}
.quote-done {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.quote-done-amount {
    font-size: 22px;
    font-weight: 700;
}