/* CV Studio — Standalone Stylesheet */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
body{font-family:'Inter',sans-serif;background:#f0f2f5;color:#1e293b;overflow:hidden;height:100vh;}

/* Top Bar */
.cvs-topbar{height:56px;background:#fff;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;padding:0 20px;z-index:100;position:relative;}
.cvs-logo{display:flex;align-items:center;gap:8px;font-family:'Poppins',sans-serif;font-weight:700;font-size:1.1rem;color:#0B3C5D;text-decoration:none;}
.cvs-logo i{color:#F59E0B;font-size:1.2rem;}
.cvs-logo span{font-size:.65rem;font-weight:600;color:#94a3b8;letter-spacing:1.5px;margin-left:4px;}
.cvs-topbar-actions{display:flex;gap:8px;align-items:center;}
.cvs-btn-ghost{background:none;border:1px solid #e2e8f0;padding:8px 14px;border-radius:8px;font-size:.82rem;font-weight:500;color:#475569;cursor:pointer;transition:all .2s;text-decoration:none;display:inline-flex;align-items:center;gap:6px;font-family:'Inter',sans-serif;}
.cvs-btn-ghost:hover{border-color:#0B3C5D;color:#0B3C5D;background:#f8fafc;}
.cvs-btn-accent{background:#F59E0B;border:none;padding:8px 16px;border-radius:8px;font-size:.82rem;font-weight:600;color:#fff;cursor:pointer;transition:all .2s;display:inline-flex;align-items:center;gap:6px;font-family:'Inter',sans-serif;}
.cvs-btn-accent:hover{background:#d97706;transform:translateY(-1px);box-shadow:0 4px 12px rgba(245,158,11,.3);}

/* Layout */
.cvs-layout{display:flex;height:calc(100vh - 56px);overflow:hidden;}

/* Sidebar */
.cvs-sidebar{width:240px;background:#fff;border-right:1px solid #e2e8f0;overflow-y:auto;flex-shrink:0;padding:16px;display:flex;flex-direction:column;gap:20px;}
.cvs-sidebar-label{font-size:.68rem;font-weight:700;letter-spacing:1.5px;color:#94a3b8;margin-bottom:10px;font-family:'Poppins',sans-serif;}
.cvs-sidebar-section{padding-bottom:16px;border-bottom:1px solid #f1f5f9;}
.cvs-sidebar-section:last-child{border:none;}

/* Template Grid */
.cvs-tpl-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.cvs-tpl-thumb{border:2px solid #e2e8f0;border-radius:8px;padding:6px;cursor:pointer;transition:all .2s;text-align:center;background:#fff;}
.cvs-tpl-thumb:hover{border-color:#F59E0B;}
.cvs-tpl-thumb.active{border-color:#F59E0B;box-shadow:0 0 0 2px rgba(245,158,11,.2);}
.cvs-tpl-thumb .tpl-preview{height:70px;border-radius:4px;margin-bottom:6px;overflow:hidden;}
.cvs-tpl-thumb .tpl-name{font-size:.7rem;font-weight:600;color:#334155;line-height:1.2;}
.cvs-tpl-thumb .tpl-cat{font-size:.6rem;color:#94a3b8;font-style:italic;}

.tpl-preview-executive{background:linear-gradient(135deg,#1e3a5f 40%,#f8fafc 40%);}
.tpl-preview-aurora{background:linear-gradient(135deg,#0f172a 45%,#f59e0b 45%);}
.tpl-preview-maxwell{background:linear-gradient(180deg,#334155 35%,#f1f5f9 35%);}
.tpl-preview-luna{background:linear-gradient(135deg,#fef3c7 50%,#F59E0B 50%);}
.tpl-preview-vertex{background:linear-gradient(135deg,#1e293b 50%,#e2e8f0 50%);}
.tpl-preview-herald{background:linear-gradient(180deg,#f8fafc 60%,#0B3C5D 60%);}
.tpl-preview-nordic{background:linear-gradient(180deg,#fff 50%,#e2e8f0 50%);}
.tpl-preview-metro{background:linear-gradient(135deg,#7C3AED 45%,#f8fafc 45%);}
.tpl-preview-cascade{background:linear-gradient(180deg,#059669 30%,#f8fafc 30%);}
.tpl-preview-zenith{background:linear-gradient(135deg,#2563EB 40%,#dbeafe 40%,#f8fafc 70%);}
.tpl-preview-ivory{background:linear-gradient(180deg,#fef3c7 40%,#fff 40%);}
.tpl-preview-cobalt{background:linear-gradient(135deg,#0891B2 45%,#f0fdfa 45%);}

/* Style Controls */
.cvs-style-row{margin-bottom:12px;}
.cvs-mini-label{font-size:.72rem;font-weight:600;color:#64748b;margin-bottom:6px;display:block;}
.cvs-swatches{display:flex;flex-wrap:wrap;gap:6px;}
.cvs-swatch{width:24px;height:24px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:all .2s;}
.cvs-swatch:hover{transform:scale(1.2);}
.cvs-swatch.active{border-color:#1e293b;box-shadow:0 0 0 2px #fff,0 0 0 4px #1e293b;}
.cvs-hex-row{display:flex;align-items:center;gap:6px;margin-top:8px;}
.cvs-color-picker{width:32px;height:32px;border:none;padding:0;cursor:pointer;border-radius:6px;background:none;}
.cvs-color-picker::-webkit-color-swatch-wrapper{padding:0;}
.cvs-color-picker::-webkit-color-swatch{border:2px solid #e2e8f0;border-radius:6px;}
.cvs-hex-input{flex:1;border:1px solid #e2e8f0;border-radius:6px;padding:5px 8px;font-size:.75rem;color:#334155;font-family:'Inter',sans-serif;outline:none;text-transform:uppercase;}
.cvs-hex-input:focus{border-color:#F59E0B;}
.cvs-select{width:100%;padding:6px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:.8rem;color:#334155;background:#fff;outline:none;cursor:pointer;}
.cvs-select:focus{border-color:#F59E0B;}

/* Resume List */
.cvs-resume-actions{display:flex;gap:6px;margin-bottom:10px;}
.cvs-btn-new{background:#0B3C5D;color:#fff;border:none;padding:6px 12px;border-radius:6px;font-size:.75rem;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all .2s;}
.cvs-btn-new:hover{background:#0a3350;}
.cvs-btn-sample{background:#f1f5f9;color:#475569;border:none;padding:6px 12px;border-radius:6px;font-size:.75rem;font-weight:500;cursor:pointer;transition:all .2s;}
.cvs-btn-sample:hover{background:#e2e8f0;}
.cvs-resume-list{display:flex;flex-direction:column;gap:4px;}
.cvs-resume-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:6px;cursor:pointer;transition:all .2s;font-size:.8rem;background:#f8fafc;}
.cvs-resume-item:hover,.cvs-resume-item.active{background:#fef3c7;}
.cvs-resume-item .ri-dot{width:8px;height:8px;border-radius:50%;background:#F59E0B;flex-shrink:0;}
.cvs-resume-item .ri-info{flex:1;min-width:0;}
.cvs-resume-item .ri-name{font-weight:600;color:#334155;font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cvs-resume-item .ri-sub{font-size:.65rem;color:#94a3b8;}
.cvs-resume-item .ri-del{background:none;border:none;color:#cbd5e1;cursor:pointer;font-size:.85rem;padding:0;transition:color .2s;}
.cvs-resume-item .ri-del:hover{color:#ef4444;}

/* Main Area */
.cvs-main{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0;}
.cvs-view-toggle{display:flex;gap:0;padding:12px 20px 0;background:#f0f2f5;}
.cvs-view-btn{padding:8px 20px;border:none;background:#e2e8f0;font-size:.82rem;font-weight:500;cursor:pointer;color:#64748b;transition:all .2s;border-radius:8px 8px 0 0;font-family:'Inter',sans-serif;display:flex;align-items:center;gap:6px;}
.cvs-view-btn.active{background:#fff;color:#0B3C5D;font-weight:600;box-shadow:0 -2px 8px rgba(0,0,0,.04);}
.cvs-view{display:none;flex:1;overflow:auto;}
.cvs-view.active{display:flex;flex-direction:column;overflow:auto;}

/* Edit View */
.cvs-editor-scroll{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:16px;background:#fff;border-radius:0 12px 0 0;min-height:0;}
.cvs-section-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:20px;transition:box-shadow .2s;}
.cvs-section-card:hover{box-shadow:0 2px 12px rgba(0,0,0,.04);}
.cvs-sec-title{font-family:'Poppins',sans-serif;font-size:.92rem;font-weight:600;color:#0B3C5D;display:flex;align-items:center;gap:8px;margin:0 0 16px;padding-bottom:10px;border-bottom:1px solid #f1f5f9;}
.cvs-sec-title i{color:#F59E0B;font-size:.88rem;}
.cvs-add-section-btn{width:100%;padding:14px;border:2px dashed #cbd5e1;border-radius:12px;background:none;color:#64748b;font-size:.88rem;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s;margin-bottom:20px;}
.cvs-add-section-btn:hover{border-color:#F59E0B;color:#F59E0B;background:rgba(245,158,11,.02);}
.cvs-custom-sec-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.cvs-custom-sec-head input{border:none;border-bottom:2px solid #F59E0B;font-family:'Poppins',sans-serif;font-size:.92rem;font-weight:600;color:#0B3C5D;padding:4px 0;outline:none;flex:1;background:transparent;}



.cvs-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.cvs-field{display:flex;flex-direction:column;gap:4px;}
.cvs-field-full{margin-top:10px;}
.cvs-field label{font-size:.72rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px;}
.cvs-field input,.cvs-field textarea,.cvs-field select{border:1px solid #e2e8f0;border-radius:6px;padding:8px 12px;font-size:.85rem;color:#334155;outline:none;transition:border .2s;font-family:'Inter',sans-serif;width:100%;resize:vertical;}
.cvs-field input:focus,.cvs-field textarea:focus{border-color:#F59E0B;box-shadow:0 0 0 3px rgba(245,158,11,.08);}

/* Entry items (exp, edu) */
.cvs-entry{background:#f8fafc;border:1px solid #f1f5f9;border-radius:8px;padding:12px;margin-bottom:8px;position:relative;}
.cvs-entry-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.cvs-entry-num{font-size:.7rem;font-weight:700;color:#F59E0B;background:rgba(245,158,11,.1);padding:2px 8px;border-radius:4px;}
.cvs-entry-del{background:none;border:none;color:#cbd5e1;cursor:pointer;font-size:.85rem;transition:color .2s;}
.cvs-entry-del:hover{color:#ef4444;}
.cvs-entry .cvs-form-grid{gap:8px;}

/* Add buttons */
.cvs-add-btn{width:100%;padding:10px;border:2px dashed #e2e8f0;border-radius:8px;background:none;color:#94a3b8;font-size:.82rem;font-weight:500;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:6px;margin-top:6px;}
.cvs-add-btn:hover{border-color:#F59E0B;color:#F59E0B;background:rgba(245,158,11,.03);}

/* Skill Tags */
.cvs-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
.cvs-tag{display:inline-flex;align-items:center;gap:4px;background:#f1f5f9;border:1px solid #e2e8f0;padding:4px 10px;border-radius:50px;font-size:.78rem;font-weight:500;color:#334155;}
.cvs-tag button{background:none;border:none;color:#94a3b8;cursor:pointer;font-size:.9rem;padding:0 0 0 2px;line-height:1;}
.cvs-tag button:hover{color:#ef4444;}
.cvs-inline-add{display:flex;gap:6px;}
.cvs-inline-add input{flex:1;border:1px solid #e2e8f0;border-radius:6px;padding:6px 10px;font-size:.82rem;outline:none;}
.cvs-inline-add input:focus{border-color:#F59E0B;}
.cvs-inline-add button{background:#0B3C5D;color:#fff;border:none;padding:6px 14px;border-radius:6px;font-size:.78rem;font-weight:600;cursor:pointer;}

/* Preview Area */
.cvs-preview-container{flex:1;overflow:auto;padding:24px;display:flex;justify-content:center;background:#e2e8f0;}
.cvs-preview-page{width:210mm;min-height:297mm;background:#fff;box-shadow:0 4px 30px rgba(0,0,0,.1);font-family:'Inter',sans-serif;color:#1e293b;line-height:1.55;overflow:hidden;}
.cvs-mini{transform-origin:top left;pointer-events:none;}

/* Live Preview Panel */
.cvs-live-preview{width:380px;background:#e2e8f0;overflow-y:auto;padding:20px;flex-shrink:0;border-left:1px solid #cbd5e1;}

/* Modal */
.cvs-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:1000;display:none;align-items:center;justify-content:center;}
.cvs-modal-overlay.open{display:flex;}
.cvs-modal{background:#fff;border-radius:12px;width:400px;max-width:90vw;box-shadow:0 20px 60px rgba(0,0,0,.2);overflow:hidden;}
.cvs-modal-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #f1f5f9;}
.cvs-modal-head h4{margin:0;font-family:'Poppins',sans-serif;color:#0B3C5D;font-size:1rem;}
.cvs-modal-head button{background:none;border:none;font-size:1.4rem;color:#94a3b8;cursor:pointer;}
.cvs-modal-body{padding:20px;}
.cvs-modal-body p{font-size:.85rem;color:#64748b;margin-bottom:16px;}
.cvs-modal-actions{display:flex;gap:8px;margin-top:16px;}

/* Mobile sidebar toggle */
.cvs-sidebar-toggle{display:none;position:fixed;bottom:20px;left:20px;z-index:200;background:#0B3C5D;color:#fff;border:none;width:44px;height:44px;border-radius:50%;font-size:1.1rem;cursor:pointer;box-shadow:0 4px 15px rgba(0,0,0,.2);}

/* ===== CV TEMPLATE STYLES ===== */

/* Executive Slate */
.cv-executive .cv-header{padding:28px 32px;color:#fff;}
.cv-executive .cv-header h1{font-family:'Poppins',sans-serif;font-size:1.7em;font-weight:700;margin:0 0 2px;color:#fff;}
.cv-executive .cv-header h2{font-size:.95em;font-weight:400;margin:0 0 14px;opacity:.85;color:rgba(255,255,255,.85);}
.cv-executive .cv-contact{font-size:.75em;display:flex;flex-wrap:wrap;gap:12px;opacity:.9;}
.cv-executive .cv-contact span{display:flex;align-items:center;gap:4px;}
.cv-executive .cv-body{padding:28px 32px;}
.cv-executive .cv-section{margin-bottom:20px;}
.cv-executive .cv-section-title{font-family:'Poppins',sans-serif;font-size:.85em;font-weight:700;text-transform:uppercase;letter-spacing:1px;padding-bottom:6px;margin-bottom:12px;border-bottom:2px solid #e2e8f0;}
.cv-executive .cv-item{margin-bottom:12px;}
.cv-executive .cv-item-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;}
.cv-executive .cv-item-head strong{font-size:.88em;}
.cv-executive .cv-item-head .cv-date{font-size:.75em;color:#64748b;}
.cv-executive .cv-item-sub{font-size:.78em;color:#64748b;margin:2px 0 4px;}
.cv-executive .cv-item p{font-size:.82em;color:#475569;margin:0;}
.cv-executive .cv-skills{display:flex;flex-wrap:wrap;gap:5px;}
.cv-executive .cv-skill-chip{padding:3px 10px;border-radius:4px;font-size:.72em;font-weight:500;}
.cv-executive .cv-lang-item{display:flex;justify-content:space-between;font-size:.82em;padding:3px 0;border-bottom:1px solid #f1f5f9;}

/* Modern Sidebar */
.cv-modern{display:flex;min-height:297mm;}
.cv-modern .cv-sidebar{width:35%;padding:28px 20px;color:#fff;}
.cv-modern .cv-sidebar h1{font-family:'Poppins',sans-serif;font-size:1.4em;font-weight:700;margin:0 0 2px;color:#fff;}
.cv-modern .cv-sidebar h2{font-size:.85em;font-weight:400;margin:0 0 20px;opacity:.8;color:rgba(255,255,255,.8);}
.cv-modern .cv-sidebar .cv-contact{margin-bottom:24px;}
.cv-modern .cv-sidebar .cv-contact div{font-size:.75em;margin-bottom:6px;opacity:.9;display:flex;align-items:center;gap:6px;}
.cv-modern .cv-sidebar .cv-section-title{font-size:.75em;text-transform:uppercase;letter-spacing:1px;font-weight:700;padding-bottom:4px;margin-bottom:10px;border-bottom:1px solid rgba(255,255,255,.2);color:#fff;}
.cv-modern .cv-sidebar .cv-skill-chip{display:inline-block;padding:3px 8px;border:1px solid rgba(255,255,255,.3);border-radius:4px;font-size:.7em;margin:2px;color:#fff;}
.cv-modern .cv-sidebar .cv-lang-item{display:flex;justify-content:space-between;font-size:.78em;padding:3px 0;border-bottom:1px solid rgba(255,255,255,.1);color:#fff;}
.cv-modern .cv-main{flex:1;padding:28px 28px;}
.cv-modern .cv-main .cv-section-title{font-family:'Poppins',sans-serif;font-size:.85em;font-weight:700;text-transform:uppercase;letter-spacing:1px;padding-bottom:6px;margin-bottom:12px;border-bottom:2px solid #e2e8f0;}
.cv-modern .cv-item{margin-bottom:12px;}
.cv-modern .cv-item-head{display:flex;justify-content:space-between;flex-wrap:wrap;}
.cv-modern .cv-item-head strong{font-size:.88em;}
.cv-modern .cv-item-head .cv-date{font-size:.72em;color:#64748b;}
.cv-modern .cv-item-sub{font-size:.78em;color:#64748b;margin:2px 0 4px;}
.cv-modern .cv-item p{font-size:.82em;color:#475569;margin:0;}

/* Minimal Clean */
.cv-minimal{padding:36px 40px;}
.cv-minimal .cv-header{text-align:center;margin-bottom:24px;padding-bottom:20px;border-bottom:3px solid;}
.cv-minimal .cv-header h1{font-family:'Poppins',sans-serif;font-size:1.8em;font-weight:700;margin:0;letter-spacing:1px;}
.cv-minimal .cv-header h2{font-size:.95em;font-weight:400;margin:4px 0 12px;color:#64748b;}
.cv-minimal .cv-contact{font-size:.78em;color:#64748b;display:flex;justify-content:center;flex-wrap:wrap;gap:14px;}
.cv-minimal .cv-contact span{display:flex;align-items:center;gap:4px;}
.cv-minimal .cv-section-title{font-family:'Poppins',sans-serif;font-size:.85em;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:10px;padding-bottom:4px;border-bottom:1px solid #e2e8f0;}
.cv-minimal .cv-section{margin-bottom:18px;}
.cv-minimal .cv-item{margin-bottom:10px;}
.cv-minimal .cv-item-head{display:flex;justify-content:space-between;flex-wrap:wrap;}
.cv-minimal .cv-item-head strong{font-size:.88em;}
.cv-minimal .cv-item-head .cv-date{font-size:.72em;color:#94a3b8;}
.cv-minimal .cv-item-sub{font-size:.78em;color:#64748b;margin:1px 0 3px;}
.cv-minimal .cv-item p{font-size:.82em;color:#475569;margin:0;}
.cv-minimal .cv-two-col{display:flex;gap:30px;}
.cv-minimal .cv-two-col>div{flex:1;}
.cv-minimal .cv-skills{display:flex;flex-wrap:wrap;gap:5px;}
.cv-minimal .cv-skill-chip{padding:3px 10px;border:1px solid;border-radius:4px;font-size:.72em;font-weight:500;}
.cv-minimal .cv-lang-item{display:flex;justify-content:space-between;font-size:.82em;padding:3px 0;}

/* Responsive */
@media(max-width:1200px){
    .cvs-live-preview{width:300px;}
}
@media(max-width:992px){
    .cvs-live-preview{display:none;}
}
@media(max-width:768px){
    .cvs-sidebar{position:fixed;left:-260px;top:56px;bottom:0;z-index:150;transition:left .3s;box-shadow:4px 0 20px rgba(0,0,0,.1);}
    .cvs-sidebar.open{left:0;}
    .cvs-sidebar-toggle{display:flex;align-items:center;justify-content:center;}
    .cvs-topbar-actions{gap:4px;}
    .cvs-topbar-actions .cvs-btn-ghost span,.cvs-topbar-actions .cvs-btn-accent span{display:none;}
    .cvs-form-grid{grid-template-columns:1fr;}
    .cvs-preview-page{width:100%;min-height:auto;}
    .cvs-view-toggle{padding:8px 12px 0;}
}
