    /* Layout — matches the Brand Kit builder look */
    .resume-container {
        padding: 2rem;
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
        color: #e2e8f0;
        overflow-x: hidden;
    }

    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        gap: 16px;
    }
    .page-title {
        font-size: 2rem;
        font-weight: 700;
        margin: 0;
        background: linear-gradient(to right, #fff, #94a3b8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    .page-subtitle { color: #94a3b8; font-size: 0.9rem; margin-top: 5px; }

    .btn-primary {
        background: var(--pintor-btn-gradient);
        color: white; border: none;
        padding: 11px 22px; border-radius: 10px;
        font-weight: 600; cursor: pointer; transition: opacity 0.2s, transform 0.15s;
        display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    }
    .btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
    .btn-secondary {
        background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.12);
        padding: 9px 16px; border-radius: 10px; font-weight: 600; cursor: pointer;
        display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; white-space: nowrap;
        transition: all 0.2s;
    }
    .btn-secondary:hover { background: rgba(255,255,255,0.12); }

    /* Content / Preview segmented toggle */
    .rb-tabs {
        display: inline-flex; background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 4px; gap: 4px;
        margin-bottom: 24px;
    }
    .rb-tab {
        border: none; background: transparent; color: #94a3b8; font-weight: 600; font-size: 0.9rem;
        padding: 9px 26px; border-radius: 9px; cursor: pointer; transition: all 0.2s;
    }
    .rb-tab:hover { color: #fff; }
    .rb-tab.active { background: #fff; color: #18181b; }

    /* Preview view — the iframe stays 794px (A4 width) and is scaled to fit by JS; the
       container clips the overflow so narrow screens never get a horizontal scrollbar. */
    .rb-preview-view { display: flex; justify-content: center; padding-bottom: 30px; overflow: hidden; }
    #rbPreview { width: 794px; flex-shrink: 0; border: none; background: #fff; box-shadow: 0 14px 50px rgba(0,0,0,0.55); transform-origin: top center; }

    /* Photo upload (Pro/Business) */
    .rb-photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; position: relative; }
    .rb-photo-thumb {
        width: 84px; height: 84px; border-radius: 16px; flex-shrink: 0; overflow: hidden;
        background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
        display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 1.9rem; cursor: pointer;
    }
    .rb-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .rb-photo-meta { display: flex; flex-direction: column; gap: 3px; }
    .rb-photo-btn { background: none; border: none; color: #3b82f6; font-weight: 600; font-size: 1rem; cursor: pointer; padding: 0; text-align: left; }
    .rb-photo-btn:hover { text-decoration: underline; }
    .rb-photo-remove { background: none; border: none; color: #94a3b8; font-size: 0.82rem; cursor: pointer; padding: 0; text-align: left; }
    .rb-photo-remove:hover { color: #ef4444; }
    .rb-photo-hint { color: #64748b; font-size: 0.78rem; }
    .rb-photo-pro {
        position: absolute; top: 0; right: 0; background: linear-gradient(135deg,#f59e0b,#ef4444);
        color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 6px;
    }
    .rb-photo-row.locked { opacity: 0.5; }
    .rb-photo-row.locked .rb-photo-thumb, .rb-photo-row.locked .rb-photo-btn { cursor: pointer; }

    /* Required-field marker + invalid highlight */
    .rb-req { color: #ef4444; font-weight: 700; margin-left: 3px; }
    .rb-input.rb-invalid { border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.18); }

    /* Skills tag input */
    .rb-chip-input { display: flex; gap: 8px; }
    .rb-chip-input .rb-input { flex: 1; }
    .rb-chip-add {
        flex-shrink: 0; width: 46px; border: none; border-radius: 10px;
        background: #3b82f6; color: #fff; font-size: 1rem; cursor: pointer; transition: background 0.15s;
    }
    .rb-chip-add:hover { background: #2563eb; }
    .rb-chips-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .rb-chips-edit:empty { margin-top: 0; }
    .rb-chip-tag {
        display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px;
        background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #e2e8f0; font-size: 0.85rem;
    }
    .rb-chip-tag button { background: none; border: none; color: #94a3b8; cursor: pointer; padding: 0; font-size: 0.78rem; display: flex; }
    .rb-chip-tag button:hover { color: #ef4444; }
    /* Skill proficiency meter (click a segment to set level 1-5; click the last filled to clear) */
    .rb-chip-level { display: inline-flex; gap: 3px; align-items: center; margin-left: 2px; }
    .rb-chip-level i { width: 13px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.28); border: 1px solid rgba(255,255,255,0.35); cursor: pointer; transition: all 0.15s; }
    .rb-chip-level i:hover { background: #60a5fa; border-color: #60a5fa; }
    .rb-chip-level i.on { background: #3b82f6; border-color: #3b82f6; }
    .rb-chip-hint { color: #94a3b8; font-size: 0.78rem; margin-top: 10px; }
    .rb-chip-hint b { color: #cbd5e1; font-weight: 600; }

    /* Font pickers + live preview */
    .rb-fontpick { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; text-align: left; }
    .rb-fontpick .rb-fontpick-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rb-fontpick i { color: #94a3b8; font-size: 0.72rem; flex-shrink: 0; }
    .rb-fontpop {
        position: fixed; z-index: 13000; width: 280px; max-height: 340px; display: none; flex-direction: column;
        background: #1e2230; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px;
        box-shadow: 0 18px 55px rgba(0,0,0,0.55); overflow: hidden;
    }
    .rb-fontpop.show { display: flex; }
    .rb-fontpop-search {
        margin: 10px; padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
        background: rgba(0,0,0,0.28); color: #fff; font-size: 0.9rem; outline: none;
    }
    .rb-fontpop-list { overflow-y: auto; padding: 0 6px 8px; }
    .rb-fontpop-row { padding: 9px 12px; border-radius: 8px; color: #e2e8f0; font-size: 1.02rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rb-fontpop-row:hover { background: rgba(255,255,255,0.08); }
    .rb-fontpop-row.active { background: rgba(59,130,246,0.28); }
    .rb-font-preview { margin-top: 16px; padding: 16px 18px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
    .rb-font-preview-name { font-size: 1.7rem; font-weight: 800; color: #f1f5f9; line-height: 1.1; }
    .rb-font-preview-sub { font-size: 0.85rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #94a3b8; margin-top: 5px; }
    .rb-font-preview-body { font-size: 0.9rem; color: #cbd5e1; margin-top: 12px; line-height: 1.5; }

    /* Cards */
    .section-card {
        background: rgba(30, 30, 35, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 16px;
        padding: 26px;
        margin-bottom: 24px;
        backdrop-filter: blur(10px);
    }
    .section-title {
        font-size: 1.2rem; font-weight: 600; margin-bottom: 20px; color: #f1f5f9;
        display: flex; align-items: center; gap: 10px;
    }
    .section-title i { color: #00AEFF; }

    /* Fields (shared with JS-rendered rows: rb-field/rb-label/rb-input) */
    .rb-field { margin-bottom: 16px; }
    .rb-label { display: block; margin-bottom: 8px; color: #94a3b8; font-size: 0.9rem; }
    .rb-input, .rb-textarea {
        width: 100%; background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
        padding: 12px 15px; color: white; font-size: 0.95rem; transition: border-color 0.2s; box-sizing: border-box;
    }
    .rb-input:focus, .rb-textarea:focus { outline: none; border-color: rgba(255,255,255,0.22); }
    .rb-textarea { min-height: 100px; resize: vertical; }
    .rb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    @media (max-width: 600px){ .rb-grid2 { grid-template-columns: 1fr; } }

    /* Repeatable item rows (created by JS) */
    .rb-item {
        background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px; padding: 18px; margin-bottom: 14px; position: relative;
    }
    .rb-item-remove {
        position: absolute; top: 12px; right: 12px; background: transparent; border: none;
        color: #64748b; cursor: pointer; width: 28px; height: 28px; border-radius: 6px;
        display: flex; align-items: center; justify-content: center; transition: all 0.2s;
    }
    .rb-item-remove:hover { background: rgba(239,68,68,0.1); color: #ef4444; }
    .rb-add {
        width: 100%; background: transparent; border: 1px dashed rgba(255,255,255,0.18);
        color: #94a3b8; border-radius: 10px; padding: 12px; cursor: pointer; font-size: 0.9rem; font-weight: 600;
        display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s;
    }
    .rb-add:hover { border-color: #00AEFF; color: #fff; }
    .action-btn {
        width: 100%; padding: 12px; border-radius: 10px; border: 1px dashed rgba(0,174,255,0.35);
        background: rgba(0,174,255,0.06); font-weight: 600; cursor: pointer; color: #7dd3fc;
        display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s;
    }
    .action-btn:hover { background: rgba(0,174,255,0.12); color: #fff; }

    /* Template current row */
    .rb-tpl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .rb-tpl-current-name { color: #fff; font-weight: 600; margin-top: 2px; }

    /* Visibility toggle row */
    .rb-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
    .rb-toggle-row-title { display: block; color: #fff; font-size: 0.95rem; font-weight: 600; }
    .rb-toggle-row-desc { display: block; color: #94a3b8; font-size: 0.82rem; margin-top: 4px; }
    .rb-toggle-row input { accent-color: #00AEFF; width: 20px; height: 20px; flex-shrink: 0; cursor: pointer; }

    /* Bottom action bar */
    .bk-bottom-actions {
        display: flex; justify-content: flex-end; gap: 12px;
        margin: 30px 0 20px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.06);
    }
    .bk-btn-cancel-bottom {
        background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: #94a3b8;
        padding: 0.8rem 1.6rem; border-radius: 12px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
        text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s;
    }
    .bk-btn-cancel-bottom:hover { background: rgba(239,68,68,0.1); color: #f87171; border-color: rgba(239,68,68,0.2); }
    .bk-btn-save-bottom {
        background: var(--pintor-btn-gradient); color: #fff; border: none;
        padding: 0.8rem 1.9rem; border-radius: 12px; font-size: 0.9rem; font-weight: 700; cursor: pointer;
        display: inline-flex; align-items: center; gap: 8px; transition: filter 0.2s, transform 0.15s;
    }
    .bk-btn-save-bottom:hover { filter: brightness(1.1); transform: translateY(-1px); }

    /* Template picker modal */
    .rb-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 1200; padding: 16px; }
    .rb-modal.show { display: flex; }
    .rb-modal-box { background: #18181b; border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; width: 100%; max-width: 780px; max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7); }
    .rb-modal-head { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; color: #fff; font-weight: 700; font-size: 1.15rem; }
    .rb-tpl-grid { padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; overflow-y: auto; }
    @media (max-width: 600px){ .rb-tpl-grid { grid-template-columns: repeat(2, 1fr); } }
    .rb-tpl-card { border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; overflow: hidden; cursor: pointer; background: #1e1e24; position: relative; display: flex; flex-direction: column; transition: border-color 0.2s, transform 0.15s; }
    .rb-tpl-card:hover { transform: translateY(-2px); }
    .rb-tpl-card.selected { border-color: #00AEFF; }
    .rb-tpl-card.locked { opacity: 0.6; cursor: not-allowed; }
    .rb-tpl-thumb { width: 100%; height: 300px; background: #fff; object-fit: cover; object-position: top center; display: block; flex-shrink: 0; }
    .rb-tpl-name { flex-shrink: 0; padding: 11px; font-size: 0.92rem; font-weight: 600; color: #fff; text-align: center; background: #1e1e24; border-top: 1px solid rgba(255,255,255,0.08); }
    .rb-tpl-lock { font-size: 0.65rem; background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); padding: 2px 7px; border-radius: 99px; }
    /* Premium (Pro/Business) marker — yellow crown, top-right corner of the card */
    .rb-tpl-crown { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; background: #1e1e24; border: 1px solid rgba(251,191,36,0.55); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.45); }
    .rb-tpl-crown i { color: #fbbf24; font-size: 0.82rem; }
    .btn-close-modal { background: rgba(255,255,255,0.05); border: none; width: 32px; height: 32px; border-radius: 50%; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; }

    /* Success modal */
    .rb-success-box { background: #18181b; border: 1px solid rgba(0,174,255,0.25); border-radius: 20px; width: 100%; max-width: 430px; padding: 32px 28px; text-align: center; }
    .rb-success-ic { width: 64px; height: 64px; border-radius: 50%; background: rgba(16,185,129,0.12); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
    .rb-success-ic i { color: #10b981; font-size: 1.8rem; }
    .rb-success-actions { display: flex; gap: 10px; margin-top: 24px; }
    .rb-success-actions a, .rb-success-actions button { flex: 1; padding: 13px; border-radius: 12px; font-weight: 600; cursor: pointer; font-size: 0.9rem; border: none; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
    .rb-btn-view { background: var(--pintor-btn-gradient); color: #fff; }
    .rb-btn-designs { background: rgba(255,255,255,0.06); color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1); }

    .rb-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: rgba(16,185,129,0.95); color: #fff; padding: 12px 22px; border-radius: 99px; font-weight: 600; opacity: 0; transition: all 0.3s; z-index: 2000; }
    .rb-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
    .rb-toast.error { background: rgba(239,68,68,0.95); }

    @media (max-width: 768px) {
        /* The dashboard layout already clears the fixed top bar (.main-content has
           padding-top:56px on mobile) and .content-area adds 20px — so the page needs NO extra
           top offset. The old padding-top:140px double-counted that and caused the big gap. */
        .resume-container { padding: 1rem; padding-bottom: 40px; }
        .page-header { flex-direction: column; align-items: stretch; gap: 12px; }
        .page-title { font-size: 1.5rem; }
        .page-header .btn-primary { width: 100%; justify-content: center; }
        .section-card { padding: 16px; }
        .section-title { font-size: 1.1rem; }
        .rb-input, .rb-textarea { font-size: 16px; /* prevent iOS zoom */ }
        .bk-bottom-actions { flex-direction: column-reverse; }
        .bk-btn-cancel-bottom, .bk-btn-save-bottom { width: 100%; justify-content: center; }
        /* Content / Preview tabs: full-width, equal halves */
        .rb-tabs { display: flex; width: 100%; }
        .rb-tab { flex: 1; padding: 11px 8px; }
        /* Template row stacks */
        .rb-tpl-row { flex-direction: column; align-items: stretch; }
        .rb-tpl-row .btn-secondary { width: 100%; justify-content: center; }
        /* Font picker popup never wider than the screen */
        .rb-fontpop { max-width: calc(100vw - 20px); }
        /* Photo row stacks on very small screens */
        .rb-photo-row { flex-wrap: wrap; }
        /* Preview uses the full screen width on mobile (break out of the container's 1rem padding
           so the A4 preview isn't squeezed into a narrow column). */
        .rb-preview-view { margin: 0 -1rem; padding: 0 6px 16px; }
    }
