/* ================================================================
   Care Box System — Frontend Styles v3.1
   SCOPED: All rules inside .cb-builder-page or .cb-account-page
   Global styles ONLY for popup (fixed position, needs body scope)
   Design reference: box.pflegebox.de
================================================================ */

/* ---- Popup body lock (must be global) ---- */
body.cb-popup-open { overflow: hidden; }

/* ---- Popup overlay (fixed, must be global) ---- */
.cb-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}
.cb-popup {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: cb-popup-in .2s ease;
}
@keyframes cb-popup-in {
    from { transform: scale(.92); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.cb-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    z-index: 2;
    padding: 0;
    transition: background .2s;
}
.cb-popup-close:hover { background: #e2e8f0; color: #1a2744; }
.cb-popup-body { padding: 28px 28px 32px; }
.cb-popup-img-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.cb-popup-img-wrap img {
    max-height: 120px;
    max-width: 200px;
    object-fit: contain;
}
.cb-popup-brand {
    font-size: 13px;
    font-weight: 700;
    color: #1a6b6b;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cb-popup-product-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a2744;
    margin: 0 0 16px;
}
.cb-popup-details {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cb-popup-details li {
    font-size: 14px;
    color: #374151;
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}
.cb-popup-details li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: #1a6b6b;
    font-weight: 700;
}

/* ================================================================
   BUILDER PAGE WRAPPER — all scoped here
================================================================ */
.cb-builder-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    color: #1a2744;
    line-height: 1.5;
    background: #EBF4F4;
    padding: 0 0 60px;
}
.cb-builder-page *,
.cb-builder-page *::before,
.cb-builder-page *::after { box-sizing: border-box; }

.cb-builder-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================================
   PROGRESS BAR — 4 steps
================================================================ */
.cb-builder-page .cb-progress-bar {
    padding: 20px 0 16px;
    background: transparent;
}
.cb-builder-page .cb-progress-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
}
.cb-builder-page .cb-step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #94a3b8;
    font-weight: 500;
    font-size: 14px;
    transition: all .25s;
    white-space: nowrap;
}
.cb-builder-page .cb-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    transition: all .25s;
}
.cb-builder-page .cb-step-indicator.active {
    border-color: #1a6b6b;
    background: #1a6b6b;
    color: #fff;
}
.cb-builder-page .cb-step-indicator.active .cb-step-num {
    background: rgba(255,255,255,.25);
    color: #fff;
}
.cb-builder-page .cb-step-indicator.done {
    border-color: #1a6b6b;
    background: #fff;
    color: #1a6b6b;
}
.cb-builder-page .cb-step-indicator.done .cb-step-num {
    background: #1a6b6b;
    color: #fff;
    font-size: 0;
}
.cb-builder-page .cb-step-indicator.done .cb-step-num::after {
    content: '✓';
    font-size: 13px;
}
.cb-builder-page .cb-step-connector {
    width: 48px;
    height: 2px;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background .25s;
}
.cb-builder-page .cb-step-connector.done { background: #1a6b6b; }

/* ================================================================
   STEP SHOW/HIDE
================================================================ */
.cb-builder-page .cb-step { display: none; }
.cb-builder-page .cb-step.active { display: block; }

/* ================================================================
   STEP 1 — Two-column layout (pflegebox.de reference)
================================================================ */
.cb-builder-page .cb-page-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2744;
    margin: 0 0 16px;
}
.cb-builder-page .cb-step1-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.cb-builder-page .cb-col-heading {
    font-size: 16px;
    font-weight: 700;
    color: #1a2744;
    margin: 0 0 14px;
}

/* ---- Category tabs ---- */
.cb-builder-page .cb-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.cb-builder-page .cb-cat-tab {
    padding: 6px 14px;
    border-radius: 50px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cb-builder-page .cb-cat-tab:hover { border-color: #1a6b6b; color: #1a6b6b; }
.cb-builder-page .cb-cat-tab.active { background: #1a6b6b; border-color: #1a6b6b; color: #fff; }
.cb-builder-page .cb-cat-count {
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50px;
    padding: 1px 6px;
    font-size: 11px;
}
.cb-builder-page .cb-cat-tab.active .cb-cat-count {
    background: rgba(255,255,255,.25);
    color: #fff;
}

/* ---- Product grid — 2 columns ---- */
.cb-builder-page .cb-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ---- Product card ---- */
.cb-builder-page .cb-product-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}
.cb-builder-page .cb-product-card:hover {
    border-color: #1a6b6b;
    box-shadow: 0 2px 12px rgba(26,107,107,.1);
}
.cb-builder-page .cb-product-card.selected {
    border-color: #1a6b6b;
    background: #f0fafa;
}
.cb-builder-page .cb-product-card.box-full {
    opacity: .6;
    cursor: default;
}
/* info button */
.cb-builder-page .cb-info-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    color: #64748b;
    transition: border-color .2s, background .2s;
}
.cb-builder-page .cb-info-btn:hover {
    border-color: #1a6b6b;
    background: #f0fafa;
    color: #1a6b6b;
}
/* box full overlay */
.cb-builder-page .cb-card-full-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.82);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    z-index: 3;
    text-align: center;
    padding: 8px;
}
.cb-builder-page .cb-product-img-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}
.cb-builder-page .cb-product-img {
    max-height: 76px;
    max-width: 100%;
    object-fit: contain;
}
.cb-builder-page .cb-product-body { flex: 1; }
.cb-builder-page .cb-product-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a6b6b;
    margin: 0;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
}
.cb-builder-page .cb-product-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-top: 4px;
}
.cb-builder-page .cb-qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}
.cb-builder-page .cb-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #1a6b6b;
    background: #fff;
    color: #1a6b6b;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .2s, color .2s;
}
.cb-builder-page .cb-qty-btn:hover { background: #1a6b6b; color: #fff; }
.cb-builder-page .cb-qty-val { font-weight: 700; font-size: 15px; min-width: 20px; text-align: center; }
.cb-builder-page .cb-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #1a6b6b;
    background: #fff;
    color: #1a6b6b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 auto;
    transition: background .2s, color .2s;
}
.cb-builder-page .cb-add-btn:hover { background: #1a6b6b; color: #fff; }
.cb-builder-page .cb-add-btn.disabled { opacity:.4; cursor:not-allowed; border-color:#cbd5e1; color:#94a3b8; }

/* Loading */
.cb-builder-page .cb-products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    color: #64748b;
    gap: 12px;
}
.cb-builder-page .cb-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #1a6b6b;
    border-radius: 50%;
    animation: cb-spin .7s linear infinite;
}
@keyframes cb-spin { to { transform: rotate(360deg); } }
.cb-builder-page .cb-empty-state {
    text-align: center; padding: 60px 20px; color: #64748b;
}
.cb-builder-page .cb-empty-icon { font-size: 40px; margin-bottom: 12px; }

/* ---- RIGHT: Meine Pflegebox Sidebar ---- */
.cb-builder-page .cb-sidebar-inner {
    background: #fff;
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: 0 2px 12px rgba(26,107,107,.08);
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
/* Budget bar */
.cb-builder-page .cb-budget-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 4px;
}
.cb-builder-page .cb-budget-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 50px;
    transition: width .4s ease;
}
.cb-builder-page .cb-budget-fill.flash { animation: cb-flash .3s ease 2; }
@keyframes cb-flash {
    0%,100% { background: #22c55e; }
    50%      { background: #ef4444; }
}
.cb-builder-page .cb-budget-status {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}
.cb-builder-page.is-full .cb-budget-status { color: #16a34a; font-weight: 700; }

/* Sidebar items */
.cb-builder-page .cb-sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
}
.cb-builder-page .cb-sidebar-empty-hint {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 16px 0;
    margin: 0;
    border: 1.5px dashed #e2e8f0;
    border-radius: 8px;
}
.cb-builder-page .cb-sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}
.cb-builder-page .cb-sidebar-item:last-child { border-bottom: none; }
.cb-builder-page .cb-sidebar-item-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    padding: 2px;
    background: #f8fafc;
}
.cb-builder-page .cb-sidebar-item-info {
    flex: 1;
    min-width: 0;
}
.cb-builder-page .cb-sidebar-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a2744;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cb-builder-page .cb-sidebar-item-ctrl {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.cb-builder-page .cb-sidebar-icon-btn {
    width: 24px; height: 24px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    padding: 0;
    transition: background .2s;
}
.cb-builder-page .cb-sidebar-icon-btn:hover { background: #fee2e2; color: #dc2626; }
.cb-builder-page .cb-sidebar-qty-btn {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: #1a6b6b;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background .2s;
}
.cb-builder-page .cb-sidebar-qty-btn:hover { background: #1a6b6b; color: #fff; border-color: #1a6b6b; }
.cb-builder-page .cb-sidebar-qty {
    font-size: 12px; font-weight: 700; min-width: 16px; text-align: center;
}
/* Free items */
.cb-builder-page .cb-free-items-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}
.cb-builder-page .cb-free-items-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 6px;
}
.cb-builder-page .cb-free-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #475569;
    padding: 3px 0;
}

/* ================================================================
   BUTTONS (scoped)
================================================================ */
.cb-builder-page .cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    line-height: 1;
    width: 100%;
}
.cb-builder-page .cb-btn:disabled { opacity: .45; cursor: not-allowed; }
.cb-builder-page .cb-btn-primary { background: #1a6b6b; color: #fff; border-color: #1a6b6b; }
.cb-builder-page .cb-btn-primary:hover:not(:disabled) { background: #0d5252; border-color: #0d5252; }
.cb-builder-page .cb-btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.cb-builder-page .cb-btn-success:hover:not(:disabled) { background: #15803d; border-color: #15803d; }
.cb-builder-page .cb-btn-ghost { background: transparent; color: #475569; border-color: #cbd5e1; width: auto; }
.cb-builder-page .cb-btn-ghost:hover { background: #f1f5f9; }
.cb-builder-page .cb-btn-outline { background: transparent; color: #1a6b6b; border-color: #1a6b6b; }
.cb-builder-page .cb-btn-outline:hover { background: #1a6b6b; color: #fff; }
.cb-builder-page .cb-btn-large { padding: 14px 28px; font-size: 15px; }
.cb-builder-page .cb-btn.loading { opacity: .7; pointer-events: none; }

/* ================================================================
   STEP 2 — Forms (scoped)
================================================================ */
.cb-builder-page .cb-step-header { margin-bottom: 24px; }
.cb-builder-page .cb-step-title { font-size: 20px; font-weight: 700; color: #1a2744; margin: 0 0 4px; }
.cb-builder-page .cb-step-subtitle { font-size: 13px; color: #64748b; margin: 0; }

.cb-builder-page .cb-returning-user {
    background: #f0fafa;
    border: 1.5px solid #b2dede;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.cb-builder-page .cb-returning-avatar { font-size: 24px; }
.cb-builder-page .cb-returning-info { flex: 1; font-size: 13px; }
.cb-builder-page .cb-returning-info strong { display: block; color: #1a2744; margin-bottom: 2px; }
.cb-builder-page .cb-returning-info span { color: #64748b; }
.cb-builder-page .cb-link-btn {
    background: none; border: none; color: #1a6b6b; font-size: 13px;
    font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; white-space: nowrap;
}
.cb-builder-page .cb-auth-toggle {
    display: flex;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}
.cb-builder-page .cb-toggle-btn {
    flex: 1; padding: 11px; border: none; background: #fff;
    color: #64748b; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.cb-builder-page .cb-toggle-btn.active { background: #1a6b6b; color: #fff; }
.cb-builder-page .cb-auth-panel { display: none; }
.cb-builder-page .cb-auth-panel.active { display: block; }
.cb-builder-page .cb-form-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.cb-builder-page .cb-section-title {
    font-size: 14px; font-weight: 700; color: #1a2744;
    display: flex; align-items: center; gap: 8px; margin: 0 0 16px;
}
.cb-builder-page .cb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-builder-page .cb-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.cb-builder-page .cb-field label { font-size: 12px; font-weight: 600; color: #374151; }
.cb-builder-page .cb-field input,
.cb-builder-page .cb-field select {
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a2744;
    background: #fff;
    transition: border-color .2s;
    outline: none;
    width: 100%;
}
.cb-builder-page .cb-field input:focus,
.cb-builder-page .cb-field select:focus { border-color: #1a6b6b; box-shadow: 0 0 0 3px rgba(26,107,107,.1); }
.cb-builder-page .cb-field input.error,
.cb-builder-page .cb-field select.error { border-color: #ef4444; }
.cb-builder-page .cb-field-hint { font-size: 11px; color: #94a3b8; }
.cb-builder-page .cb-field-hint.error { color: #ef4444; }
.cb-builder-page .required { color: #ef4444; }
.cb-builder-page .cb-password-wrap { position: relative; }
.cb-builder-page .cb-password-wrap input { padding-right: 40px; }
.cb-builder-page .cb-pw-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #94a3b8; padding: 0; display: flex;
}
.cb-builder-page .cb-insurance-info-box {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px;
    padding: 10px 12px; display: flex; gap: 8px; align-items: flex-start;
    margin-bottom: 14px; font-size: 13px; color: #0369a1;
}
.cb-builder-page .cb-insurance-info-box svg { flex-shrink: 0; margin-top: 2px; }
.cb-builder-page .cb-pflegegrad-group { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cb-builder-page .cb-radio-card { cursor: pointer; }
.cb-builder-page .cb-radio-card input { display: none; }
.cb-builder-page .cb-radio-face {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 40px; border: 2px solid #e2e8f0; border-radius: 8px;
    font-size: 12px; color: #475569; transition: all .2s;
}
.cb-builder-page .cb-radio-card input:checked + .cb-radio-face {
    border-color: #1a6b6b; background: #1a6b6b; color: #fff;
}
/* Signature */
.cb-builder-page .cb-signature-wrap { display: flex; flex-direction: column; gap: 8px; }
.cb-builder-page #cb-signature-canvas {
    border: 1.5px solid #e2e8f0; border-radius: 10px; background: #fff;
    cursor: crosshair; width: 100%; max-width: 480px; touch-action: none;
}
.cb-builder-page .cb-checkbox-label {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 10px; cursor: pointer; font-size: 13px; line-height: 1.5;
}
.cb-builder-page .cb-checkbox-label input { margin-top: 3px; flex-shrink: 0; accent-color: #1a6b6b; }
.cb-builder-page .cb-step-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 16px; margin-top: 8px; gap: 12px;
}

/* ================================================================
   STEP 3 — Summary (scoped)
================================================================ */
.cb-builder-page .cb-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.cb-builder-page .cb-summary-card {
    background: #fff; border-radius: 12px; padding: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.cb-builder-page .cb-summary-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; border-bottom: 1px solid #f1f5f9; padding-bottom: 8px;
}
.cb-builder-page .cb-summary-card-header h3 { font-size: 13px; font-weight: 700; margin: 0; }
.cb-builder-page .cb-edit-link {
    background: none; border: none; color: #1a6b6b; font-size: 12px;
    cursor: pointer; font-weight: 600; text-decoration: underline; padding: 0;
}
.cb-builder-page .cb-summary-item-row {
    display: flex; justify-content: space-between; font-size: 12px;
    padding: 3px 0; border-bottom: 1px dotted #f1f5f9;
}
.cb-builder-page .cb-item-qty { color: #94a3b8; }
.cb-builder-page .cb-item-pts { color: #1a6b6b; font-weight: 600; }
.cb-builder-page .cb-summary-footer {
    display: flex; justify-content: space-between; margin-top: 8px;
    font-size: 12px; color: #475569; padding-top: 6px; border-top: 1px solid #e2e8f0;
}
.cb-builder-page .cb-summary-detail-row {
    display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; gap: 10px;
}
.cb-builder-page .cb-summary-detail-row span { color: #64748b; }
.cb-builder-page .cb-summary-detail-row strong { color: #1a2744; text-align: right; }
.cb-builder-page .cb-signature-summary-preview img {
    max-width: 100%; border: 1px solid #e2e8f0; border-radius: 6px;
}
.cb-builder-page .cb-notice {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px;
    border-radius: 10px; font-size: 13px; margin-bottom: 18px;
}
.cb-builder-page .cb-notice-info {
    background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
}
.cb-builder-page .cb-alert {
    padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px;
}
.cb-builder-page .cb-alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.cb-builder-page .cb-alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ================================================================
   STEP 4 — Fertig / Done
================================================================ */
.cb-builder-page .cb-success-wrap {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(26,107,107,.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 800px;
    margin: 0 auto;
    min-height: 320px;
}
.cb-builder-page .cb-success-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cb-builder-page .cb-success-content h2 {
    font-size: 22px; font-weight: 700; color: #1a2744; margin: 0 0 12px;
}
.cb-builder-page .cb-success-content p {
    color: #475569; font-size: 14px; margin: 0 0 8px; line-height: 1.6;
}
.cb-builder-page .cb-success-order-id {
    font-size: 13px; color: #94a3b8; margin-bottom: 24px; font-weight: 600;
}
.cb-builder-page .cb-success-img-col {
    background: linear-gradient(135deg, #f0fafa 0%, #dff0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.cb-builder-page .cb-success-checkmark {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #1a6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cb-pop .4s cubic-bezier(.68,-.55,.27,1.55) forwards;
}
.cb-builder-page .cb-success-checkmark svg {
    width: 36px; height: 36px; stroke: #fff; stroke-width: 2.5;
}
@keyframes cb-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.cb-builder-page .cb-success-wrap .cb-btn {
    width: auto;
    align-self: flex-start;
}

/* ================================================================
   ACCOUNT PAGE (separate scope, no interference with builder)
================================================================ */
.cb-account-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    color: #1a2744;
    line-height: 1.5;
}
.cb-account-page *,
.cb-account-page *::before,
.cb-account-page *::after { box-sizing: border-box; }

/* Existing account dashboard CSS is already scoped to .cb-account-wrap — preserve it */

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 840px) {
    .cb-builder-page .cb-step1-layout {
        grid-template-columns: 1fr;
    }
    .cb-builder-page .cb-right-col { order: -1; }
    .cb-builder-page .cb-sidebar-inner { position: static; }
    .cb-builder-page .cb-sidebar-items { max-height: 180px; }
    .cb-builder-page .cb-success-wrap { grid-template-columns: 1fr; }
    .cb-builder-page .cb-success-img-col { padding: 20px; min-height: 100px; }
}
@media (max-width: 600px) {
    .cb-builder-page .cb-products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .cb-builder-page .cb-step-indicator { padding: 7px 10px; font-size: 12px; }
    .cb-builder-page .cb-step-label { display: none; }
    .cb-builder-page .cb-step-connector { width: 20px; }
    .cb-builder-page .cb-field-row { grid-template-columns: 1fr; }
    .cb-builder-page .cb-step-nav { flex-direction: column; }
    .cb-builder-page .cb-btn-ghost { width: 100%; }
    .cb-builder-page .cb-success-content { padding: 24px 20px; }
}
@media (max-width: 400px) {
    .cb-builder-page .cb-products-grid { grid-template-columns: 1fr; }
}


/* ================================================================
   ACCOUNT DASHBOARD — preserved from original
================================================================ */
.cb-account-wrap { max-width: 1000px; margin: 0 auto; }

.cb-account-header {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--cb-primary-gradient);
  border-radius: var(--cb-radius);
  padding: 28px 32px;
  margin-bottom: 28px;
  color: #fff;
  flex-wrap: wrap;
}
.cb-account-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
  font-family: 'Raleway', sans-serif;
}
.cb-account-meta { flex: 1; }
.cb-account-meta h1 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.cb-account-meta p  { font-size: 14px; color: rgba(255,255,255,.75); margin: 0; }
.cb-logout-btn { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: var(--cb-transition); font-family: inherit; }
.cb-logout-btn:hover { background: rgba(255,255,255,.25); text-decoration: none; color: #fff; }

/* Current Order Panel */
.cb-current-order {
  background: var(--cb-surface);
  border: 1.5px solid var(--cb-border);
  border-radius: var(--cb-radius);
  padding: 28px;
  margin-bottom: 24px;
}
.cb-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.cb-section-head h2 { font-size: 20px; font-weight: 800; }

/* Status badge */
.cb-status-badge { display: inline-block; padding: 5px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; }

/* Timeline */
.cb-timeline {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.cb-timeline-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.cb-timeline-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--cb-border);
  background: var(--cb-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: var(--cb-transition);
}
.cb-timeline-step.done .cb-timeline-dot   { background: var(--cb-mint); border-color: var(--cb-mint); color: #fff; font-size: 14px; font-weight: 700; }
.cb-timeline-step.active .cb-timeline-dot { background: var(--cb-navy); border-color: var(--cb-navy); box-shadow: 0 0 0 5px rgba(var(--cb-primary-rgb),.15); }
.cb-timeline-label { font-size: 11px; font-weight: 600; color: var(--cb-text-3); text-align: center; white-space: nowrap; }
.cb-timeline-step.done .cb-timeline-label, .cb-timeline-step.active .cb-timeline-label { color: var(--cb-text-2); }

.cb-timeline-line { flex: 1; height: 2.5px; background: var(--cb-border); border-radius: 2px; min-width: 24px; transition: var(--cb-transition); }
.cb-tl-done { background: var(--cb-mint); }

/* Tracking box */
.cb-tracking-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--cb-navy-l);
  border: 1.5px solid rgba(var(--cb-primary-rgb),.2);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.cb-tracking-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cb-text-3); flex-shrink: 0; }
.cb-tracking-number { font-family: monospace; font-size: 18px; font-weight: 700; color: var(--cb-navy); letter-spacing: 2px; }

/* Order items in account */
.cb-order-items-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cb-order-item-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cb-navy-xl); border: 1px solid var(--cb-border);
  border-radius: 8px; padding: 6px 12px; font-size: 13px;
}
.cb-item-name { color: var(--cb-text); font-weight: 600; }
.cb-item-qty  { color: var(--cb-text-3); }
.cb-order-meta-row { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--cb-text-3); flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--cb-border); }
.cb-order-meta-row strong { color: var(--cb-text-2); }

/* Next Box CTA */
.cb-next-box-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, var(--cb-mint-l), #ECFDF5);
  border: 1.5px solid var(--cb-mint);
  border-radius: var(--cb-radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cb-cta-icon { font-size: 36px; }
.cb-cta-text { flex: 1; }
.cb-cta-text strong { display: block; font-size: 16px; font-weight: 700; color: var(--cb-text); margin-bottom: 4px; }
.cb-cta-text span   { display: block; font-size: 14px; color: var(--cb-text-2); }

.cb-next-box-locked {
  display: flex; align-items: center; gap: 10px;
  background: var(--cb-bg); border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius); padding: 16px 20px;
  font-size: 14px; color: var(--cb-text-2); margin-bottom: 24px;
}

/* Order History */
.cb-order-history { margin-bottom: 24px; }
.cb-history-list { background: var(--cb-surface); border: 1.5px solid var(--cb-border); border-radius: var(--cb-radius); overflow: hidden; }
.cb-history-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--cb-border);
  font-size: 14px; transition: var(--cb-transition);
}
.cb-history-item:last-child { border-bottom: none; }
.cb-history-item:hover { background: var(--cb-bg); }
.cb-history-date { font-weight: 700; color: var(--cb-text); min-width: 100px; }
.cb-history-products { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.cb-history-products span { font-size: 12px; background: var(--cb-bg); border: 1px solid var(--cb-border); border-radius: 6px; padding: 2px 8px; color: var(--cb-text-2); }
.cb-history-status { flex-shrink: 0; }
.cb-history-points { font-size: 13px; color: var(--cb-text-3); font-weight: 600; flex-shrink: 0; }

/* Empty account */
.cb-empty-account { text-align: center; padding: 80px 20px; }
.cb-empty-account .cb-empty-icon { font-size: 64px; margin-bottom: 20px; }
.cb-empty-account h3 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.cb-empty-account p  { color: var(--cb-text-2); font-size: 16px; max-width: 400px; margin: 0 auto 28px; }

/* Premium account layout */
.cb-account-wrap--premium { max-width: 1040px; }
.cb-account-hero {
  background: var(--cb-primary-gradient);
  border-radius: calc(var(--cb-radius) + 4px);
  padding: 4px;
  margin-bottom: 28px;
  box-shadow: 0 18px 40px rgba(var(--cb-primary-rgb),0.12);
}
.cb-account-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 50%);
  border-radius: var(--cb-radius);
  padding: 26px 30px;
  color: #fff;
  flex-wrap: wrap;
}
.cb-account-hero .cb-account-avatar {
  width: 64px; height: 64px;
  font-size: 24px;
  border: 2px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.12);
}
.cb-account-hero .cb-account-meta h1 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 6px; }
.cb-account-email { font-size: 14px; color: rgba(255,255,255,.82); margin: 0; line-height: 1.5; }
.cb-account-meta-sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.45); margin: 0 10px; vertical-align: middle; }

.cb-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 8px;
}
.cb-account-card--elevated {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: calc(var(--cb-radius) + 2px);
  padding: 26px 28px;
  box-shadow: 0 4px 24px rgba(26, 39, 68, 0.06);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.cb-account-card--elevated:hover {
  box-shadow: 0 12px 36px rgba(26, 39, 68, 0.09);
}
.cb-section-head--fancy { margin-bottom: 20px; }
.cb-section-head--fancy h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }

.cb-next-month-notice {
  background: var(--cb-navy-xl);
  border-radius: var(--cb-radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(var(--cb-primary-rgb),0.12);
}
.cb-nm-title { margin: 0 0 8px; font-weight: 800; font-size: 16px; color: var(--cb-text); }
.cb-nm-sub { margin: 0; color: var(--cb-text-2); font-size: 14px; line-height: 1.55; }

.cb-timeline--modern .cb-timeline-dot {
  font-size: 13px;
  font-weight: 700;
  color: var(--cb-text-3);
}
.cb-timeline--modern .cb-timeline-step.active .cb-timeline-dot { color: #fff; font-size: 12px; }

.cb-cta-glass {
  background: rgba(255,255,255,.65) !important;
  backdrop-filter: blur(8px);
  border: 1px solid var(--cb-border) !important;
  box-shadow: 0 8px 32px rgba(26, 39, 68, 0.06) !important;
}
.cb-next-box-cta.cb-cta-secondary.cb-cta-glass {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(255,255,255, 0.85)) !important;
}

/* Signature pad */
.cb-signature-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
#cb-signature-canvas {
  width: 100%;
  max-width: 440px;
  height: 140px;
  border: 2px dashed var(--cb-border);
  border-radius: var(--cb-radius);
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}
.cb-signature-clear { align-self: flex-end; }

.cb-signature-summary-preview {
  padding: 12px 0 4px;
}
.cb-signature-summary-preview img {
  max-width: 100%;
  max-height: 120px;
  border: 1.5px dashed var(--cb-border);
  border-radius: var(--cb-radius);
  background: #fff;
  display: block;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 700px) {
  .cb-field-row { grid-template-columns: 1fr; }
  .cb-progress-inner { padding: 8px 14px; }
  .cb-step-label { display: none; }
  .cb-points-bar-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cb-summary-grid { grid-template-columns: 1fr; }
  .cb-products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .cb-step-nav { flex-direction: column-reverse; gap: 12px; }
  .cb-step-nav .cb-btn { width: 100%; justify-content: center; }
  .cb-account-header { flex-direction: column; align-items: flex-start; }
  .cb-next-box-cta { flex-direction: column; }
  .cb-timeline { gap: 0; }
}

@media (max-width: 480px) {
  .cb-wrap, .cb-account-wrap { padding: 20px 14px 40px; }
  .cb-pflegegrad-group { gap: 6px; }
  .cb-radio-face { padding: 8px 12px; font-size: 13px; min-width: 48px; }
}

/* Fallback CSS vars (supplement inject_custom_css) */
:root {
    --cb-max-w: 1040px;
    --cb-radius-sm: 8px;
    --cb-text-2: #475569;
    --cb-text-3: #94a3b8;
    --cb-mint: #22c55e;
    --cb-mint-l: #dcfce7;
    --cb-orange: #f97316;
    --cb-red: #ef4444;
    --cb-red-l: #fef2f2;
    --cb-shadow: 0 2px 12px rgba(0,0,0,.08);
    --cb-transition: all .2s ease;
}
