:root { --brand: #ff6600; --dark: #2d3436; }

#scv-wizard-app {
    font-family: 'Inter', sans-serif; max-width: 900px; margin: 0 auto;
    background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    position: relative; padding-bottom: 20px;
}

/* WIZARD & FORMS */
.wizard-progress-bar { display: flex; background: #f8f9fa; border-bottom: 1px solid #eee; }
.step-item { flex: 1; text-align: center; padding: 15px; font-weight: 600; color: #aaa; border-bottom: 3px solid transparent; cursor: default; }
.step-item.active { color: var(--brand); border-bottom-color: var(--brand); background: #fff; }
.wizard-step { display: none; padding: 30px; }
.wizard-step.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from{opacity:0}to{opacity:1} }

/* Selektory (Krok 1 i 2) */
.template-selector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl-option { border: 2px solid #eee; padding: 10px; text-align: center; cursor: pointer; border-radius: 8px; }
.tpl-option.active { border-color: var(--brand); background: #fff5eb; }
.mini-preview { height: 60px; background: #ddd; margin-bottom: 5px; border-radius: 4px; }
.tpl-modern-bg { background: linear-gradient(90deg, #333 30%, #fff 30%); }
.tpl-classic-bg { background: #fff; border-top: 5px solid #333; }
.tpl-tech-bg { background: #eee; border-left: 10px solid #333; }

.color-dots-wrapper { display: flex; gap: 10px; margin-top: 10px; justify-content: center; }
.c-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px #ccc; }
.c-dot.active { box-shadow: 0 0 0 2px var(--brand); transform: scale(1.1); }

.jobs-big-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.job-tile { padding: 15px; border: 2px solid #eee; border-radius: 8px; text-align: center; cursor: pointer; font-weight: bold; color: #555; }
.job-tile.active { border-color: var(--brand); background: var(--brand); color: white; }
#skills-cloud-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; justify-content: center; }
.skill-pill-btn { padding: 8px 15px; border-radius: 20px; border: 1px solid #ddd; cursor: pointer; font-size: 13px; color: #555; }
.skill-pill-btn.active { background: var(--brand); color: white; border-color: var(--brand); }

/* Formularze */
.form-grid input, .form-grid textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 10px; box-sizing: border-box; }
.inp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-upload-section { text-align: center; margin-bottom: 15px; }
.upload-btn-styled { display: inline-block; padding: 8px 15px; background: var(--dark); color: white; border-radius: 4px; cursor: pointer; font-size: 13px; }

/* Krok Finalny */
.final-step-content { text-align: center; padding: 20px; }
.lang-selector-box { margin: 20px 0; }
.l-btn { padding: 8px 15px; border: 1px solid #ddd; background: white; cursor: pointer; margin: 0 5px; border-radius: 4px; }
.l-btn.active { background: var(--brand); color: white; border-color: var(--brand); }
.btn-download-hero { background: #27ae60; color: white; padding: 15px 30px; border-radius: 50px; border: none; font-size: 18px; font-weight: bold; cursor: pointer; box-shadow: 0 5px 15px rgba(39,174,96,0.3); }

/* Nawigacja */
.step-footer { display: flex; justify-content: space-between; margin-top: 20px; border-top: 1px solid #eee; padding-top: 15px; }
.btn-next { background: var(--brand); color: white; padding: 10px 25px; border-radius: 20px; border: none; cursor: pointer; font-weight: bold; }
.btn-prev { background: #eee; color: #333; padding: 10px 25px; border-radius: 20px; border: none; cursor: pointer; font-weight: bold; }

/* MODAL */
.floating-preview-trigger { position: fixed; bottom: 20px; right: 20px; background: var(--dark); color: white; padding: 12px 20px; border-radius: 30px; cursor: pointer; z-index: 99; font-weight: bold; display: flex; align-items: center; gap: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
#preview-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 9999; display: none; justify-content: center; align-items: center; }
.preview-modal-content { background: #ccc; width: 95%; height: 90%; display: flex; flex-direction: column; border-radius: 8px; }
.modal-top-bar { background: white; padding: 10px; display: flex; justify-content: space-between; font-weight: bold; }
.modal-scroll-area { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 20px; }

/* =========================================
   SZABLON PDF - ISOLATION MODE
   ========================================= */

/* To jest klasa kontenera tymczasowego, który powstaje tylko na moment generowania PDF */
.pdf-isolation-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 794px !important;
    box-sizing: border-box !important;
}

#clean-pdf-template {
    /* Sztywne wymiary A4 (96 DPI) */
    width: 794px !important;
    min-height: 1123px !important; 
    
    background: white !important;
    color: #333 !important;
    
    /* Reset absolutny, aby motyw nie przesuwał */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    
    display: flex !important;
    flex-direction: row !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.3 !important;
    box-sizing: border-box !important;
}

/* Reset wszystkich elementów wewnątrz */
#clean-pdf-template * { box-sizing: border-box !important; }

/* Layouty */
.cv-layout-modern .pdf-sidebar { 
    width: 270px !important; 
    background: var(--dark); color: white; padding: 25px; text-align: center; 
    flex-shrink: 0 !important; margin: 0 !important;
}
.cv-layout-modern .pdf-main { 
    width: 524px !important; 
    padding: 35px; background: white; 
    flex-grow: 1 !important; margin: 0 !important;
}

.cv-layout-classic { flex-direction: column !important; }
.cv-layout-classic .pdf-sidebar { width: 100% !important; order: -1; background: white; color: #333; border-bottom: 2px solid #333; display: flex; padding: 20px 40px; text-align: left; justify-content: space-between; flex-shrink: 0 !important; }

.cv-layout-technical { flex-direction: column !important; }

/* Elementy PDF */
.pdf-photo-frame { width: 120px; height: 120px; margin: 0 auto 20px; border-radius: 50%; border: 4px solid var(--brand); overflow: hidden; background: #555; }
.pdf-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.pdf-skill-badge { display: inline-block; background: rgba(255,255,255,0.15); padding: 4px 8px; margin: 3px; border-radius: 4px; font-size: 11px; }

.pdf-lbl { font-size: 11px; font-weight: bold; opacity: 0.7; border-bottom: 1px solid rgba(255,255,255,0.2); margin-bottom: 8px; padding-bottom: 2px; }
.pdf-row { display: flex; gap: 8px; font-size: 12px; margin-bottom: 6px; align-items: center; justify-content: center; } 
.cv-layout-modern .pdf-row { justify-content: flex-start; text-align: left; }

.pdf-header { border-bottom: 3px solid var(--brand); padding-bottom: 15px; margin-bottom: 20px; }
#pdf-name-full { font-size: 32px; font-weight: 800; line-height: 1; text-transform: uppercase; margin: 0; white-space: nowrap; }
#pdf-job { color: var(--brand); font-size: 18px; letter-spacing: 2px; font-family: 'Oswald', sans-serif; margin-top: 5px; text-transform: uppercase; }
.pdf-lbl-big { font-size: 15px; font-weight: bold; border-bottom: 2px solid #eee; padding-bottom: 5px; margin-bottom: 15px; text-transform: uppercase; }
#pdf-exp-txt { font-size: 13px; line-height: 1.5; white-space: pre-wrap; color: #444; }
.pdf-footer { position: absolute; bottom: 20px; left: 30px; right: 30px; font-size: 8px; color: #aaa; text-align: center; }