/* ============================================================
   Nilon Tools — CV & Resume Builder Styles
   Scoped and adapted to Nilon Tools design system
   ============================================================ */

#cv-app {
    margin: 0.5rem 0 1.5rem;
}

.cv-layout {
    display: grid;
    grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .cv-layout {
        grid-template-columns: minmax(350px, 420px) minmax(0, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 960px) {
    .cv-layout {
        grid-template-columns: 1fr;
    }
}

/* Mobile Tabs */
.cv-mobile-tabs {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--bg-alt);
    padding: 5px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.cv-mobile-tab {
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cv-mobile-tab.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 960px) {
    .cv-mobile-tabs { display: grid; }
    .cv-layout[data-mobile-view="form"] .cv-preview-wrap { display: none !important; }
    .cv-layout[data-mobile-view="preview"] .cv-form { display: none !important; }
    .cv-layout[data-mobile-view="preview"] .cv-preview-wrap { position: static; max-height: none; }
}

/* Form container */
.cv-form {
    display: grid;
    gap: 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.3rem;
    color: var(--text);
    box-shadow: var(--shadow);
}

.cv-form h3 {
    margin: 0.6rem 0 0.2rem;
    font-size: 1rem;
    color: var(--primary);
}

.cv-form h4.cv-group {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin: 1.1rem 0 0.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cv-form input,
.cv-form textarea,
.cv-form select {
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    width: 100%;
    background: #ffffff;
    color: #0f172a;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.cv-form textarea {
    min-height: 80px;
    resize: vertical;
}

.cv-form input::placeholder,
.cv-form textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
    font-weight: 400;
}

.cv-form input:hover,
.cv-form textarea:hover,
.cv-form select:hover {
    border-color: #94a3b8;
}

.cv-form input:focus,
.cv-form textarea:focus,
.cv-form select:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(91, 91, 240, 0.18), 0 1px 2px rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

[data-theme="dark"] .cv-form input,
[data-theme="dark"] .cv-form textarea,
[data-theme="dark"] .cv-form select {
    background: #13172c;
    border-color: #333c64;
    color: #f1f5f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .cv-form input::placeholder,
[data-theme="dark"] .cv-form textarea::placeholder {
    color: #6b779a;
}

[data-theme="dark"] .cv-form input:hover,
[data-theme="dark"] .cv-form textarea:hover,
[data-theme="dark"] .cv-form select:hover {
    border-color: #4b588a;
}

[data-theme="dark"] .cv-form input:focus,
[data-theme="dark"] .cv-form textarea:focus,
[data-theme="dark"] .cv-form select:focus {
    background: #171c36;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(124, 124, 247, 0.25), 0 1px 2px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.cv-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.cv-form .row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
}

@media (max-width: 540px) {
    .cv-form .row,
    .cv-form .row-3 {
        grid-template-columns: 1fr;
    }
}

/* Cards & Sections */
.cv-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    display: grid;
    gap: 0.65rem;
    background: #f8fafc;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cv-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .cv-card {
    background: rgba(23, 27, 48, 0.65);
    border-color: #2a3050;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .cv-card:hover {
    border-color: #3d4670;
}

.cv-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .cv-card-top {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.cv-card-tools {
    display: inline-flex;
    gap: 0.3rem;
    margin-left: auto;
}

.cv-card-tools button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    width: 28px;
    height: 26px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cv-card-tools button:hover:not([disabled]) {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(91, 91, 240, 0.25);
}

[data-theme="dark"] .cv-card-tools button {
    border-color: #333c64;
    background: #171c36;
    color: #94a3b8;
}

[data-theme="dark"] .cv-card-tools button:hover:not([disabled]) {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.cv-card-tools button[disabled] {
    opacity: 0.35;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

.cv-switch {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}

.cv-switch .hint,
.cv-form .hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.cv-tpls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.cv-tpl {
    border: 1px solid var(--border);
    background: var(--bg-alt);
    border-radius: 999px;
    padding: 0.4em 0.95em;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.cv-tpl:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cv-tpl:active {
    transform: translateY(0) scale(0.97);
}

.cv-tpl.on {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    animation: cvTplPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cvTplPop {
    0% { transform: scale(0.92); }
    50% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.cv-accents {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.cv-accent {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--card);
    box-shadow: 0 0 0 1px var(--border);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}

.cv-accent:hover {
    transform: scale(1.22);
    box-shadow: 0 0 0 2px var(--card), 0 4px 10px rgba(0, 0, 0, 0.25);
}

.cv-accent.on {
    box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--primary);
    transform: scale(1.18);
    animation: cvAccentPulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cvAccentPulse {
    0% { transform: scale(0.85); }
    50% { transform: scale(1.28); }
    100% { transform: scale(1.18); }
}

.cv-sugg {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.sugg {
    border: 1.5px dashed #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    padding: 0.3em 0.65em;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    color: #334155;
    text-align: left;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.sugg:hover {
    border-color: var(--primary);
    border-style: solid;
    color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-1px);
}

[data-theme="dark"] .sugg {
    background: #171c36;
    border-color: #333c64;
    color: #94a3b8;
}

[data-theme="dark"] .sugg:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: #ffffff;
}

.cv-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.skill-chip {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.3em 0.8em;
    font-size: 0.84rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .skill-chip {
    background: #171c36;
    border-color: #333c64;
    color: #f1f5f9;
}

.skill-chip .skill-del,
.skill-chip .tag-del {
    border: 0;
    background: none;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1;
    transition: color 0.12s;
}

.skill-chip .skill-del:hover,
.skill-chip .tag-del:hover {
    color: var(--danger);
}

.cv-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.cv-actions .btn {
    font-size: 0.88rem;
    padding: 9px 16px;
}

.cv-actions .btn-ghost {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.cv-actions .btn-ghost:hover {
    background: var(--border);
}

/* Sections accordion */
.cv-sec {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.85rem;
    background: #ffffff;
    color: var(--text);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.cv-sec:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .cv-sec {
    background: var(--card);
    border-color: #2a3050;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .cv-sec:hover {
    border-color: #3d4670;
}

.cv-sec > summary {
    cursor: pointer;
    padding: 0.85em 1.15em;
    font-weight: 700;
    font-size: 0.94rem;
    color: #0f172a;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    user-select: none;
    transition: background-color 0.18s ease;
}

[data-theme="dark"] .cv-sec > summary {
    color: #f1f5f9;
}

.cv-sec > summary:hover {
    background: #f8fafc;
}

[data-theme="dark"] .cv-sec > summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cv-sec > summary::before {
    content: '▸';
    color: var(--primary);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
}

.cv-sec[open] > summary::before {
    transform: rotate(90deg);
}

.cv-sec > summary::-webkit-details-marker {
    display: none;
}

.cv-sec > *:not(summary):not(.cv-card):not(.cv-add) {
    padding: 0 1.1em;
}

.cv-sec > *:not(summary):not(.cv-card):not(.cv-add):last-child {
    padding-bottom: 1.1em;
}

.cv-sec > .cv-card {
    margin: 0 1.1em 0.75rem;
}

.cv-sec > .cv-add {
    margin: 0.3rem 1.1em 1.1em;
}

.cvf {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.cvf > span,
.cvf > div > span {
    font-size: 0.84rem;
    font-weight: 650;
    color: #1e293b;
}

[data-theme="dark"] .cvf > span,
[data-theme="dark"] .cvf > div > span {
    color: #e2e8f0;
}

.cv-toggle {
    font-size: 0.82rem;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-weight: 600;
}

[data-theme="dark"] .cv-toggle {
    color: #94a3b8;
}

.cv-toggle input[type="checkbox"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.cv-add {
    margin-top: 0.4rem;
}

.cv-tag-input {
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    width: 100%;
    background: #ffffff;
    color: #0f172a;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.cv-tag-input:hover {
    border-color: #94a3b8;
}

.cv-tag-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(91, 91, 240, 0.18), 0 1px 2px rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

[data-theme="dark"] .cv-tag-input {
    background: #13172c;
    border-color: #333c64;
    color: #f1f5f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .cv-tag-input:hover {
    border-color: #4b588a;
}

[data-theme="dark"] .cv-tag-input:focus {
    background: #171c36;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(124, 124, 247, 0.25), 0 1px 2px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.opt-inline {
    font-size: 0.84rem;
    font-weight: 550;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    margin: 0.2rem 0 0.5rem;
    user-select: none;
}

.opt-inline input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

[data-theme="dark"] .opt-inline {
    color: #cbd5e1;
}

/* Drag to reorder */
.cv-drag {
    position: relative;
    transition: transform 0.15s;
}

.cv-drag-handle {
    position: absolute;
    right: 12px;
    top: 10px;
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.5;
    z-index: 2;
    padding: 2px 4px;
}

.cv-drag-handle:hover {
    opacity: 1;
    color: var(--primary);
}

.cv-drag.dragging {
    opacity: 0.4;
}

.cv-drag.drop-above {
    border-top: 2px solid var(--primary);
}

.cv-drag.drop-below {
    border-bottom: 2px solid var(--primary);
}

/* Photo Upload and Cropper */
.cv-photo-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.cv-photo-thumb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #555, #777);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--border);
}

.cv-photo-btn {
    cursor: pointer;
    margin: 0;
    padding: 6px 12px;
    font-size: 0.82rem;
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-alt);
    color: var(--text);
}

.cv-photo-btn:hover {
    background: var(--border);
}

.cv-photo-hint {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.cv-photo-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.35rem;
}

.linklike {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Quill rich text inside CV Builder */
.cv-sec .ql-toolbar {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1 !important;
    border-bottom: none !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.cv-sec .ql-container {
    background: #ffffff;
    border: 1.5px solid #cbd5e1 !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.92rem;
    min-height: 85px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .cv-sec .ql-toolbar {
    background: #171c36;
    border-color: #333c64 !important;
}

[data-theme="dark"] .cv-sec .ql-container {
    background: #13172c;
    border-color: #333c64 !important;
    color: #f1f5f9;
}

.cv-sec .ql-editor {
    color: #0f172a;
    min-height: 85px;
}

[data-theme="dark"] .cv-sec .ql-editor {
    color: #f1f5f9;
}

.cv-sec .ql-editor.ql-blank::before {
    color: #94a3b8;
    font-style: normal;
}

[data-theme="dark"] .cv-sec .ql-editor.ql-blank::before {
    color: #6b779a;
}

.cv-sec .ql-toolbar button,
.cv-sec .ql-toolbar .ql-stroke {
    color: #64748b;
    stroke: #64748b;
}

.cv-sec .ql-toolbar button:hover,
.cv-sec .ql-toolbar button.ql-active {
    color: var(--primary);
}

.cv-sec .ql-toolbar .ql-active .ql-stroke,
.cv-sec .ql-toolbar button:hover .ql-stroke {
    stroke: var(--primary);
}

/* ---------------- Live Preview ---------------- */
.cv-preview-wrap {
    position: sticky;
    top: 80px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: auto;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.cv-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.cv-preview-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text);
}

.cv-preview-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cv-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--card);
    padding: 3px 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.cv-zoom button {
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
    line-height: 1.2;
}

.cv-zoom button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--card);
}

.cv-fullscreen-btn {
    padding: 3px 7px !important;
    font-size: 0.9rem !important;
}

#cvZoomVal,
#cvModalZoomVal {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    min-width: 44px;
    text-align: center;
}

.cv-preview-inner {
    --pv-scale: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-width: 100%;
    overflow: visible;
    margin: 0 auto;
    transition: height 0.15s ease;
}

/* The A4 preview sheet */
.cv-preview-inner .pv {
    width: 794px;
    min-height: 1123px;
    flex: none;
    align-self: flex-start;
    transform: scale(var(--pv-scale));
    transform-origin: top center;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22), 0 0 1px rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    padding: 48px 56px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #222;
    box-sizing: border-box;
}

/* Fullscreen Modal View */
.cv-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cv-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.cv-modal-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cv-modal-bar strong {
    font-size: 1.05rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cv-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cv-modal-body {
    flex: 1;
    overflow: auto;
    padding: 32px 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.cv-modal-body .pv {
    width: 794px;
    min-height: 1123px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 48px 56px;
    box-sizing: border-box;
    transform-origin: top center;
}

.cv-modal-close {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.cv-modal-close:hover {
    background: rgba(239, 68, 68, 0.85);
    border-color: rgba(239, 68, 68, 1);
}

.pv-head {
    border-bottom: 2px solid;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.pv-head h1 {
    font-size: 24px;
    margin: 0;
    color: #1a1a2e;
}

.pv-title {
    font-size: 14px;
    color: #444;
}

.pv-contact {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.pv section {
    margin: 12px 0;
}

.pv h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
}

.pv-item {
    margin-bottom: 8px;
}

.pv-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.pv-sub {
    color: #666;
    font-size: 11.5px;
}

.pv ul {
    margin: 4px 0 0 16px;
    padding: 0;
}

.pv-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pv-skill {
    border: 1px solid;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
}

.pv-tech {
    font-size: 11px;
    color: #777;
    font-style: italic;
    margin-top: 2px;
}

.pv-refgrid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
}

/* Academic CV template */
.pv-academic {
    font-family: Georgia, 'Times New Roman', serif;
}

.pv-academic h1,
.pv-academic h2 {
    font-family: Georgia, 'Times New Roman', serif;
}

.pv-academic .pv-head {
    text-align: center;
    border-bottom-width: 1px;
}

.pv-academic .pv-contact {
    margin-top: 6px;
}

.pv-reflist {
    margin: 4px 0 0 18px;
    padding: 0;
}

.pv-reflist li {
    margin-bottom: 5px;
}

.pv-academic ol.pv-reflist {
    list-style: decimal;
}

.pv-academic ul.pv-reflist {
    list-style: disc;
}

.pv-academic h2 {
    border-bottom: 1.5px solid currentColor;
    padding-bottom: 3px;
    margin-bottom: 8px;
}

/* Serif theme */
.pv-serif {
    font-family: Georgia, 'Times New Roman', serif;
}

.pv-serif h1,
.pv-serif h2 {
    font-family: Georgia, 'Times New Roman', serif;
}

/* Banner theme (Modern Header) */
.pv-banner {
    padding: 28px 32px;
    border-radius: 8px;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-bottom: 22px;
    border: none;
}

.pv-banner h1 {
    color: #fff !important;
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}

.pv-banner .pv-title {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pv-banner .pv-contact {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.pv-banner-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.pv-banner-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

/* Sidebar preview (Modern Sidebar & Professional) */
.cv-preview-inner .pv.pv-sidebar2,
.cv-preview-inner .pv.pv-split-modern,
.cv-modal-body .pv.pv-sidebar2,
.cv-modal-body .pv.pv-split-modern,
.pv.pv-sidebar2,
.pv.pv-split-modern {
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    min-height: 1123px !important;
    height: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.pv-sidebar2 .pv-side {
    padding: 38px 24px;
    box-sizing: border-box;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.pv-sidebar2 .pv-main {
    padding: 38px 32px;
    background: #ffffff;
    box-sizing: border-box;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.pv-avatar {
    text-align: center;
    margin-bottom: 22px;
}

.pv-avatar img {
    display: block;
    margin: 0 auto;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.pv-sh {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}

.pv-sh span {
    width: 14px;
    height: 2.5px;
    border-radius: 2px;
    display: inline-block;
    flex: none;
}

.pv-sh h4 {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
}

.pv-gap {
    height: 18px;
}

.pv-prof {
    font-size: 10.5px;
    line-height: 1.65;
    margin: 0;
}

.pv-dark .pv-prof,
.pv-dark .pv-side .pv-sub,
.pv-dark .pv-side p {
    color: #cbd5e1;
}

.pv-dark .pv-side .pv-row span {
    color: #f1f5f9;
}

.pv-cline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    font-size: 10.5px;
    min-width: 0;
}

.pv-cline > span:first-child {
    font-size: 12px;
    flex: none;
}

.pv-cline > span:last-child {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pv-dark .pv-cline {
    color: #e2e8f0;
}

.pv-light .pv-cline {
    color: #334155;
}

.pv-side .pv-skills {
    gap: 6px;
}

.pv-dark .pv-side .pv-skill {
    border-color: rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

.pv-namebar {
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #f1f5f9;
}

.pv-namebar h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.pv-namebar p {
    margin: 4px 0 0;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.pv-mblock {
    margin-bottom: 18px;
}

.pv-mh {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 4px;
}

.pv-mh h3 {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #0f172a;
    font-weight: 800;
}

.pv-mh span {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.pv-sidebar2 .pv-item {
    margin-bottom: 10px;
}

.pv-sidebar2 .pv-item strong {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
}

.pv-sidebar2 .pv-main .pv-sub {
    font-size: 9.5px;
    color: #64748b;
    margin-top: 1px;
}

.pv-sidebar2 .pv-main p {
    margin: 3px 0 0;
    font-size: 10.5px;
    line-height: 1.55;
    color: #334155;
}

.pv-sidebar2 .pv-main ul {
    margin: 3px 0 0 16px;
    padding: 0;
    font-size: 10.5px;
    color: #334155;
}

.pv-sidebar2 .pv-main li {
    margin-bottom: 2px;
}

.pv-sidebar2 .pv-main .pv-tech {
    font-size: 9px;
    color: #475569;
    margin-top: 3px;
    font-style: italic;
}

.pv-side .pv-sub,
.pv-side .pv-item strong {
    overflow-wrap: anywhere;
}

.pv-side .pv-item {
    margin-bottom: 12px;
}

.pv-side .pv-item strong {
    display: block;
    font-size: 12px;
    color: inherit;
}

.pv-dark .pv-side .pv-item strong {
    color: #fff;
}

.pv-side .pv-item .pv-sub {
    font-size: 10.5px;
    margin-top: 1px;
}

/* ============================================================
   Bold Split: Modern Executive Dual-Column Layout
   ============================================================ */
.pv.pv-split,
.pv.pv-split-modern {
    display: grid;
    grid-template-columns: 285px 1fr;
    padding: 0;
    min-height: 1123px;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

/* Sidebar Column (Left) */
.pv-sp-sidebar {
    background: var(--sp-navy, #0f172a);
    color: #f8fafc;
    padding: 38px 24px 38px 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pv-sp-avatar {
    text-align: center;
    margin-bottom: 6px;
}

.pv-sp-avatar img {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    display: inline-block;
}

.pv-sp-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pv-sp-sidehead {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 6px;
}

.pv-sp-sidehead h4 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f1f5f9;
}

.pv-sp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: none;
}

.pv-sp-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pv-sp-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 10px;
    line-height: 1.4;
    color: #cbd5e1;
    word-break: break-word;
}

.pv-sp-c-icon {
    font-size: 10px;
    flex: none;
    line-height: 1.4;
}

.pv-sp-skills-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.pv-sp-skill {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pv-sp-skill-lbl {
    display: flex;
    justify-content: space-between;
    font-size: 9.5px;
    font-weight: 600;
    color: #e2e8f0;
}

.pv-sp-skill-lbl span:last-child {
    color: #94a3b8;
    font-weight: 400;
}

.pv-sp-skill-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.pv-sp-skill-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.pv-sp-side-content {
    font-size: 10px;
    color: #cbd5e1;
    line-height: 1.5;
}

.pv-sp-side-content .pv-skill {
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

/* Main Narrative Column (Right) */
.pv-sp-main {
    background: #ffffff;
    color: #1e293b;
    padding: 38px 36px 38px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pv-sp-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
}

.pv-sp-name {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.pv-sp-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
}

.pv-sp-header-line {
    width: 48px;
    height: 3px;
    border-radius: 2px;
    margin-top: 4px;
}

.pv-sp-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pv-sp-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pv-sp-mainhead {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 4px;
}

.pv-sp-mainhead h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0f172a;
    border: none;
    padding: 0;
}

.pv-sp-bar {
    width: 3px;
    height: 12px;
    border-radius: 2px;
    flex: none;
}

.pv-sp-sec-body {
    font-size: 10.5px;
    line-height: 1.55;
    color: #334155;
}

.pv-sp-sec-body .pv-item {
    margin-bottom: 10px;
}

.pv-sp-sec-body .pv-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.pv-sp-sec-body strong {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
}

.pv-sp-sec-body .pv-sub {
    font-size: 9.5px;
    color: #64748b;
    margin-top: 1px;
}

.pv-sp-sec-body p {
    margin: 3px 0 0;
}

.pv-sp-sec-body ul {
    margin: 3px 0 0 16px;
    padding: 0;
}

.pv-sp-sec-body li {
    margin-bottom: 2px;
}

.pv-sp-sec-body .pv-tech {
    font-size: 9px;
    color: #475569;
    margin-top: 3px;
    font-style: italic;
}

/* Header photo */
.pv-head-photo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.pv-head-text {
    min-width: 0;
    flex: 1;
}

.pv-head-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    border: 2px solid var(--border);
}

.pv-banner .pv-head-avatar {
    border-color: rgba(255, 255, 255, 0.5);
}

.cv-retention {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: center;
}
