/* ── Cart (step 5) ───────────────────────────────────────────── */
#cart-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4) var(--sp-5);
    margin-bottom: var(--sp-4);
}

.cart-title {
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-3);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--color-border);
}
.cart-item:last-of-type { border-bottom: none; }

.cart-item-num {
    font-size: .8125rem;
    color: var(--color-text-muted);
    min-width: 18px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    display: block;
    font-size: .9375rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-meta {
    font-size: .8125rem;
    color: var(--color-text-muted);
}

.cart-item-price {
    font-weight: 700;
    font-size: .9375rem;
    white-space: nowrap;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--color-text-dim);
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1;
    padding: 2px 6px;
    border-radius: var(--radius);
    transition: color var(--t-fast), background var(--t-fast);
}
.cart-item-remove:hover { color: #ef4444; background: rgba(239,68,68,.1); }

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--sp-3);
    font-size: .875rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    margin-top: var(--sp-3);
}
.cart-total-row strong { color: var(--color-text); font-size: 1rem; }

.cart-divider {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-5);
    color: var(--color-text-muted);
    font-size: .8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.cart-divider::before, .cart-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.step-nav-right {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.summary-item-block {
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--sp-2);
}
.summary-item-block:last-of-type { border-bottom: none; }

/* ── Step Indicator ──────────────────────────────────────────── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 0;
    padding: var(--sp-4) 0 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.step-indicator::-webkit-scrollbar { display: none; }

.si-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    cursor: default;
    min-width: 70px;
}

.si-item.done { cursor: pointer; }

.si-bubble {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-text-muted);
    transition: all var(--t);
    position: relative;
    z-index: 1;
}

.si-item.done .si-bubble {
    background: rgba(62,207,142,.15);
    border-color: var(--color-success);
    color: var(--color-success);
}

.si-item.active .si-bubble {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(79,142,247,.2);
}

.si-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: color var(--t);
}

.si-item.active .si-label { color: var(--color-accent); }
.si-item.done .si-label   { color: var(--color-text-muted); }

/* Connector line between steps */
.si-connector {
    flex: 1;
    height: 2px;
    background: var(--color-border);
    min-width: 20px;
    max-width: 60px;
    margin-bottom: 18px; /* align with bubbles */
    transition: background var(--t);
}

.si-connector.done { background: var(--color-success); }

/* ── Step panels ─────────────────────────────────────────────── */
.step-panel {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-header {
    margin-bottom: var(--sp-8);
}

.step-header h2 { margin-bottom: var(--sp-2); }

/* ── Navigation buttons ──────────────────────────────────────── */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--sp-10);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--color-border);
}

/* ── Upload zone ─────────────────────────────────────────────── */
.upload-zone {
    position: relative;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-16) var(--sp-8);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
    background: var(--color-surface);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover,
.upload-zone.dragging {
    border-color: var(--color-accent);
    background: rgba(79,142,247,.04);
}

.upload-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    pointer-events: none;
}

.upload-default svg {
    color: var(--color-text-dim);
    transition: color var(--t);
}

.upload-zone:hover .upload-default svg { color: var(--color-accent); }

.upload-default h3 {
    font-size: 1.125rem;
    color: var(--color-text);
}

.upload-default .upload-hint {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.upload-default .btn { pointer-events: all; }

.upload-formats {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--sp-2);
}

.format-badge {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

/* Upload states */
.upload-analyzing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    color: var(--color-text-muted);
}

.upload-result, .upload-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
    text-align: center;
    padding: var(--sp-4);
    width: 100%;
}

.upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-icon.success {
    background: rgba(62,207,142,.12);
    color: var(--color-success);
    border: 2px solid rgba(62,207,142,.3);
}

.upload-icon.error {
    background: rgba(229,62,62,.12);
    color: var(--color-danger);
    border: 2px solid rgba(229,62,62,.3);
}

.upload-info { width: 100%; min-width: 0; }

.filename {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: var(--sp-2);
    word-break: break-all;
}

.file-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-1);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.file-stats span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-stats strong { color: var(--color-text); }

.mesh-warning {
    margin-top: var(--sp-2);
    font-size: 0.8125rem;
    color: var(--color-warning);
    background: rgba(245,166,35,.08);
    border: 1px solid rgba(245,166,35,.25);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-sm);
}

.btn-change {
    display: inline-block;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all var(--t-fast);
}

.btn-change:hover { color: var(--color-text); border-color: var(--color-border-2); }

/* ── Upload + Preview layout ─────────────────────────────────── */
.upload-preview-layout {
    display: block;  /* single column by default */
}

/* 2 columns only when preview is actually visible */
.upload-preview-layout.preview-visible {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
    align-items: stretch;
}

.upload-preview-layout .upload-zone {
    min-height: 340px;
    height: 100%;
}

/* 3D Preview panel */
#preview-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 340px;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-5);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-2);
}

.preview-title {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
}

.preview-title svg { color: var(--color-accent); }

.preview-hint {
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

.preview-header-right {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.preview-fs-btn {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: all var(--t-fast);
}
.preview-fs-btn:hover {
    color: var(--color-text);
    border-color: var(--color-border-2);
    background: var(--color-surface-2);
}

/* Fullscreen mode */
#preview-wrap:fullscreen,
#preview-wrap:-webkit-full-screen,
#preview-wrap:-moz-full-screen {
    background: #0d0f14;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}
#preview-wrap:fullscreen .preview-canvas-wrap,
#preview-wrap:-webkit-full-screen .preview-canvas-wrap,
#preview-wrap:-moz-full-screen .preview-canvas-wrap {
    flex: 1;
    min-height: 0;
}
#preview-wrap:fullscreen #preview-canvas,
#preview-wrap:-webkit-full-screen #preview-canvas,
#preview-wrap:-moz-full-screen #preview-canvas {
    min-height: 0;
    height: 100%;
}

.preview-canvas-wrap {
    position: relative;
    flex: 1;
    min-height: 290px;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    background: var(--color-surface);
    z-index: 2;
}

#preview-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 290px;
    touch-action: none;
}

@media (max-width: 768px) {
    .upload-preview-layout {
        grid-template-columns: 1fr;
    }
    #preview-canvas { min-height: 260px; }
}

/* ── Technology cards ────────────────────────────────────────── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-4);
}

.tech-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    cursor: pointer;
    text-align: left;
    transition: all var(--t);
    width: 100%;
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent);
    opacity: 0;
    transition: opacity var(--t);
}

.tech-card:hover { border-color: var(--color-border-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.tech-card.selected {
    border-color: var(--color-accent);
    background: rgba(79,142,247,.05);
    box-shadow: 0 0 0 3px rgba(79,142,247,.15);
}

.tech-icon {
    width: 52px;
    height: 52px;
    background: rgba(79,142,247,.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-4);
    color: var(--color-accent);
}

.tech-card h3 { color: var(--color-text); margin-bottom: var(--sp-2); font-size: 1.0625rem; }

.tech-bbox {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
    padding: 4px 10px;
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}
.tech-bbox-label { color: var(--color-text-muted); }
.tech-bbox-val   { font-weight: 600; color: var(--color-text); font-family: monospace; font-size: 0.8rem; }
.tech-card.selected .tech-bbox { background: rgba(79,142,247,.1); }
.tech-card.selected .tech-bbox-val { color: #f97316; }
.tech-card.selected h3      { color: #f97316; }
.material-card.selected h3  { color: #f97316; }
.finish-card.selected h3    { color: #f97316; }

.finish-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-2);
}

.finish-card-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text);
}

.finish-card.selected .finish-card-header h3 { color: #f97316; }

.finish-price-badge {
    flex-shrink: 0;
    padding: 4px 12px;
    background: #f97316;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
}

.finish-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 0;
}
.tech-card p  { font-size: 0.875rem; line-height: 1.5; }

.tech-check {
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-4);
    width: 24px;
    height: 24px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity var(--t);
}

.tech-card.selected .tech-check { opacity: 1; }

/* ── Material cards ──────────────────────────────────────────── */
.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-4);
}

.material-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    cursor: pointer;
    text-align: left;
    transition: all var(--t);
    width: 100%;
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.material-card:hover  { border-color: var(--color-border-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.material-card.selected {
    border-color: var(--color-accent);
    background: rgba(79,142,247,.05);
    box-shadow: 0 0 0 3px rgba(79,142,247,.15);
}

.mat-swatch {
    width: 100%;
    height: 80px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.06);
}

.mat-info h3   { color: var(--color-text); margin-bottom: var(--sp-2); font-size: 1rem; }
.mat-info p    { font-size: 0.8125rem; line-height: 1.5; margin-bottom: var(--sp-3); }
.mat-price     { font-size: 0.8125rem; font-weight: 700; color: var(--color-accent); }

/* ── Finish cards ────────────────────────────────────────────── */
.finish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-4);
}

.finish-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    cursor: pointer;
    text-align: left;
    transition: all var(--t);
    width: 100%;
    font-family: var(--font-sans);
}

.finish-card:hover  { border-color: var(--color-border-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.finish-card.selected {
    border-color: var(--color-accent);
    background: rgba(79,142,247,.05);
    box-shadow: 0 0 0 3px rgba(79,142,247,.15);
}

.finish-info h3  { color: var(--color-text); margin-bottom: var(--sp-2); font-size: 1rem; }
.finish-info p   { font-size: 0.8125rem; line-height: 1.5; margin-bottom: 0; }

.finish-meta {
    display: flex;
    gap: var(--sp-4);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}
.finish-meta strong { color: var(--color-accent); }

/* ── Quantity step ───────────────────────────────────────────── */
.quantity-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--sp-8);
    align-items: start;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-4);
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: var(--radius);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
    font-family: var(--font-sans);
}

.qty-btn:hover { background: var(--color-border); border-color: var(--color-border-2); }

#qty-input {
    width: 90px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
}

.qty-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Price card */
.price-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
}

.price-card h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-5);
}

#price-breakdown { display: flex; flex-direction: column; gap: var(--sp-2); }

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding: var(--sp-1) 0;
}

.price-row--min-order {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.8125rem;
}

.min-order-warning {
    margin-top: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    color: #856404;
    font-size: 0.8125rem;
    font-weight: 500;
}

.price-adjustment-notice {
    margin-bottom: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    background: #fff7ed;
    border: 1px solid #f97316;
    border-radius: var(--radius-sm);
    color: #c2410c;
    font-size: 0.8125rem;
    font-weight: 500;
}

#step5-submit-label { pointer-events: none; }

.manual-quote-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    color: #1e40af;
    margin-bottom: var(--sp-5);
}

.manual-quote-notice svg { flex-shrink: 0; margin-top: 2px; }

.manual-quote-notice strong { display: block; font-size: 1rem; margin-bottom: 4px; }

.manual-quote-notice p { margin: 0; font-size: 0.875rem; line-height: 1.5; opacity: 0.85; }

.sla-size-warning {
    margin-bottom: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    color: #991b1b;
    font-size: 0.875rem;
    font-weight: 500;
}

.coupon-field {
    margin-top: var(--sp-6);
}

.coupon-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--sp-2);
    color: var(--color-text);
}

.coupon-row {
    display: flex;
    gap: var(--sp-2);
}

.coupon-row input {
    flex: 1;
    padding: var(--sp-2) var(--sp-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    background: var(--color-surface);
}

.coupon-row input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

#coupon-feedback {
    margin-top: var(--sp-2);
    font-size: 0.875rem;
    font-weight: 500;
}

#coupon-feedback.coupon-success {
    color: #166534;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

#coupon-feedback.coupon-success button {
    background: none;
    border: none;
    color: #166534;
    cursor: pointer;
    font-size: 0.8125rem;
    text-decoration: underline;
    padding: 0;
}

#coupon-feedback.coupon-error {
    color: #991b1b;
}

.notes-field {
    margin-top: var(--sp-6);
}

.notes-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--sp-2);
    color: var(--color-text);
}

.notes-field textarea {
    width: 100%;
    padding: var(--sp-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    min-height: 90px;
    box-sizing: border-box;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.15s;
}

.notes-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.price-row.subtotal {
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-3);
    margin-top: var(--sp-2);
    color: var(--color-text);
    font-weight: 600;
}

.price-total-box {
    background: rgba(79,142,247,.07);
    border: 1px solid rgba(79,142,247,.2);
    border-radius: var(--radius);
    padding: var(--sp-4);
    margin-top: var(--sp-4);
    text-align: center;
}

.price-total-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-2);
}

#price-total {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-accent);
    transition: opacity var(--t-fast);
}

#price-total.loading { opacity: 0.4; }

#price-vat {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    margin-top: var(--sp-1);
}

/* Chosen summary */
.config-summary {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--sp-4);
    margin-bottom: var(--sp-6);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.config-tag {
    background: rgba(79,142,247,.1);
    border: 1px solid rgba(79,142,247,.2);
    color: var(--color-accent);
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ── Quote step ──────────────────────────────────────────────── */
.quote-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--sp-8);
    align-items: start;
}

.quote-form-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
}

.quote-sidebar h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-4);
}

.summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    font-size: 0.875rem;
}

.summary-row {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.summary-row:last-child { border-bottom: none; }

.summary-row.total-row {
    font-size: 1rem;
    color: var(--color-text);
    padding-top: var(--sp-4);
}

.summary-row.total-row strong { color: var(--color-accent); font-size: 1.25rem; }

.gdpr-note {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    margin-top: var(--sp-4);
    line-height: 1.5;
}

/* ── Success screen ──────────────────────────────────────────── */
.success-screen {
    text-align: center;
    padding: var(--sp-16) 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(62,207,142,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp-6);
    color: var(--color-success);
    border: 2px solid rgba(62,207,142,.3);
}

.success-screen h2 { margin-bottom: var(--sp-4); font-size: 1.75rem; }
.success-screen p  { font-size: 1.0625rem; max-width: 500px; margin: 0 auto var(--sp-4); }

.success-ref {
    display: inline-flex;
    flex-direction: column;
    gap: var(--sp-1);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--sp-3) var(--sp-6);
    margin: var(--sp-6) auto;
    text-align: center;
}

.success-ref-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.success-ref-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.1em;
}

/* ── Auth modal ──────────────────────────────────────────────── */
.am-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    backdrop-filter: blur(4px);
}

.am-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-8) var(--sp-8);
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.2s ease;
}

.am-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--sp-2);
    color: var(--color-text);
}

.am-sub {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.am-back {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.8125rem;
    padding: 0;
    margin-bottom: var(--sp-4);
    font-family: var(--font-sans);
    transition: color var(--t-fast);
}
.am-back:hover { color: var(--color-text); }

.am-text-btn {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.am-text-btn:hover { opacity: 0.8; }

.am-step .field { margin-bottom: var(--sp-4); }

.am-verify-icon {
    width: 64px;
    height: 64px;
    background: rgba(79,142,247,.1);
    border: 2px solid rgba(79,142,247,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    margin: 0 auto var(--sp-5);
}

/* Success toast after email verification redirect */
.verified-toast {
    position: fixed;
    bottom: var(--sp-6);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-success);
    color: #fff;
    padding: var(--sp-3) var(--sp-6);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    z-index: 2000;
    animation: fadeIn .3s ease;
    white-space: nowrap;
}

/* ── Step 1 inline auth ──────────────────────────────────────── */

.am-divider, .s1-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--sp-5) 0;
}

.s1-verified-banner {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .3);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: .9375rem;
    margin-bottom: var(--sp-5);
}
.s1-verified-banner strong { color: var(--color-success); margin-right: var(--sp-1); }

#step1-auth {
    margin-top: var(--sp-8);
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-6);
}

.s1-auth-logged {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    background: rgba(34, 197, 94, .08);
    border: 1px solid rgba(34, 197, 94, .25);
    border-radius: var(--radius-lg);
    color: var(--color-success);
    font-weight: 600;
}

.s1-auth-logged svg { flex-shrink: 0; }
.s1-auth-logged span { flex: 1; color: var(--color-text); }
.s1-auth-logged strong { color: var(--color-text); }

.s1-logout-link {
    font-size: .8125rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.s1-logout-link:hover { color: var(--color-text); }

.s1-auth-prompt {
    font-size: .9375rem;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-5);
}

.s1-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--sp-5);
}

.s1-tab {
    flex: none;
    padding: var(--sp-2) var(--sp-5);
    font-size: .9375rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: color var(--t-fast), border-color var(--t-fast);
}

.s1-tab.s1-tab--active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.s1-tab:hover:not(.s1-tab--active) { color: var(--color-text); }

.s1-login-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
}

.s1-reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
}

.s1-reg-pw-field { grid-column: 1 / -1; }

@media (max-width: 560px) {
    .s1-login-grid,
    .s1-reg-grid { grid-template-columns: 1fr; }
    .s1-reg-pw-field { grid-column: auto; }
}

.s1-form-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    margin-top: var(--sp-3);
}

.s1-center-panel {
    text-align: center;
    padding: var(--sp-2) 0;
}

.s1-panel-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin: var(--sp-3) 0 var(--sp-2);
}

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: var(--sp-16) var(--sp-4);
}

.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-10) var(--sp-8);
    width: 100%;
    max-width: 440px;
}

.auth-card h2 {
    font-size: 1.5rem;
    margin-bottom: var(--sp-2);
}

.auth-sub {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin-bottom: var(--sp-8);
}

.auth-error {
    background: rgba(229,62,62,.1);
    border: 1px solid rgba(229,62,62,.3);
    color: var(--color-danger);
    border-radius: var(--radius);
    padding: var(--sp-3) var(--sp-4);
    font-size: 0.875rem;
    margin-bottom: var(--sp-5);
}

.auth-switch {
    text-align: center;
    margin-top: var(--sp-6);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.auth-switch a {
    color: var(--color-accent);
    font-weight: 600;
}

/* ── Account page ────────────────────────────────────────────── */
.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.account-header h1 { font-size: 1.75rem; }

.account-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-16) 0;
    text-align: center;
    color: var(--color-text-muted);
}

.account-table-wrap {
    overflow-x: auto;
}

.account-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.account-table th {
    text-align: left;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 2px solid var(--color-border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.account-table td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    vertical-align: middle;
}

.account-table tbody tr:last-child td { border-bottom: none; }
.account-table tbody tr:hover td { background: var(--color-surface); }

.account-table .ref-cell {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-accent);
    font-weight: 600;
}

.account-table .file-cell { max-width: 160px; }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-new      { background: rgba(79,142,247,.15);  color: var(--color-accent); }
.status-reviewed { background: rgba(245,166,35,.15);  color: var(--color-warning); }
.status-quoted   { background: rgba(130,80,255,.15);  color: #a78bfa; }
.status-accepted { background: rgba(62,207,142,.15);  color: var(--color-success); }
.status-rejected { background: rgba(229,62,62,.15);   color: var(--color-danger); }
.status-archived { background: rgba(120,120,140,.15); color: var(--color-text-dim); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .quantity-layout { grid-template-columns: 1fr; }
    .quote-layout    { grid-template-columns: 1fr; }
    .form-row        { grid-template-columns: 1fr; }
    .tech-grid       { grid-template-columns: 1fr; }
    .material-grid   { grid-template-columns: 1fr 1fr; }
    .finish-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .material-grid { grid-template-columns: 1fr; }
    .step-indicator { gap: 0; }
    .si-label { display: none; }
    .si-connector { min-width: 12px; }
}
