/* ==========================================================================
   ResuMake Core Stylesheet
   ========================================================================== */

/* Design System Tokens */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-dark: #0f172a;
    --bg-editor: #1e293b;
    --bg-input: #334155;
    --border-editor: #475569;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.15);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Photo editor defaults */
    --photo-size: 90px;
    --photo-zoom: 100;
    --photo-x: 50;
    --photo-y: 50;
}

/* Typography Classes mapping to Google Fonts */
.font-inter { font-family: 'Inter', sans-serif; }
.font-poppins { font-family: 'Poppins', sans-serif; }
.font-montserrat { font-family: 'Montserrat', sans-serif; }
.font-lora { font-family: 'Lora', serif; }

/* Reset & Base Elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ==========================================================================
   Header Bar UI
   ========================================================================== */
.app-header {
    background-color: #0b0f19;
    border-bottom: 1px solid #1e293b;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo h1 span {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.control-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-group select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-editor);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.control-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Color Picker Styling */
.color-group {
    min-width: 140px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-editor);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    height: 32px;
}

.color-picker-wrapper input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

#color-hex {
    font-size: 0.8rem;
    font-family: 'Roboto Mono', monospace;
    color: var(--text-light);
    text-transform: uppercase;
}

/* Buttons Styles */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-input);
    border: 1px solid var(--border-editor);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: #475569;
    border-color: #64748b;
}

.btn-danger {
    background-color: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background-color: var(--accent-red-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px dashed var(--border-editor);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-full {
    width: 100%;
    padding: 10px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* ==========================================================================
   Main Workspace Layout
   ========================================================================== */
.app-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: calc(100vh - 100px);
}

/* ==========================================================================
   Editor Panel UI (Left Pane)
   ========================================================================== */
.editor-panel {
    width: 480px;
    background-color: var(--bg-editor);
    border-right: 1px solid #1e293b;
    overflow-y: auto;
    padding: 24px;
}

.panel-section-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.editor-section {
    background-color: #151f32;
    border: 1px solid #2d3b55;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
}

.editor-section[open] {
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.4);
}

.editor-section summary {
    list-style: none;
    padding: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    outline: none;
    transition: var(--transition-fast);
}

.editor-section summary:hover {
    background-color: #1b263b;
}

.icon-heading {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 1.1rem;
}

.chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.editor-section[open] .chevron {
    transform: rotate(180deg);
}

.section-content {
    padding: 16px;
    border-top: 1px solid #2d3b55;
    background-color: #0f172a;
}

/* Grid Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.col-span-2 {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input, 
.form-group textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-editor);
    color: var(--text-light);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-fast);
    width: 100%;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
    background-color: #3d4f68;
}

/* Profile Photo Uploader */
.photo-uploader-container {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 4px;
}

.photo-uploader {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.avatar-preview {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background-color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--border-editor);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview .default-avatar {
    font-size: 2.2rem;
    color: var(--text-muted);
}

.upload-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Interactive Photo Editor Panel */
.photo-editor-controls {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-editor);
}

.editor-slider-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slider-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.slider-field select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-editor);
    color: var(--text-light);
    padding: 6px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

.slider-field input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border-editor);
    outline: none;
}

.slider-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.slider-field input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.hide {
    display: none !important;
}

/* Dynamic Addable Lists */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}

.list-item-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-sm);
    padding: 14px;
    position: relative;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.btn-remove-item:hover {
    color: var(--accent-red);
}

/* Skills Editor Grid */
.skills-grid-editor {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.skill-row-item {
    display: contents; /* Allows children to be grid cells directly */
}

/* ==========================================================================
   Preview Panel UI (Right Pane)
   ========================================================================== */
.preview-panel {
    flex: 1;
    background-color: #0b0f19;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    align-items: center;
}

.preview-toolbar {
    width: 100%;
    max-width: 820px;
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.preview-status i {
    color: #10b981;
    margin-right: 4px;
}

.paper-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 40px;
}

/* A4 Sheet Representation */
.resume-document {
    background-color: #ffffff;
    color: #1f2937;
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    box-shadow: var(--shadow-xl);
    position: relative;
    transition: var(--transition-normal);
    box-sizing: border-box;
}

/* Photo shape/size/zoom utilities */
.resume-photo-frame {
    display: inline-block;
    width: var(--photo-size);
    height: var(--photo-size);
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.resume-photo-frame.shape-circle { border-radius: 50%; }
.resume-photo-frame.shape-rounded { border-radius: 12px; }
.resume-photo-frame.shape-square { border-radius: 0; }

.resume-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(calc(var(--photo-zoom) / 100));
    object-position: calc(var(--photo-x) * 1%) calc(var(--photo-y) * 1%);
    display: block;
}

/* ==========================================================================
   CV Template 1: Modern Minimalist Layout
   ========================================================================== */
.template-modern {
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: 9.5pt;
    line-height: 1.5;
}

.template-modern .cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 16px;
    margin-bottom: 4px;
}

.template-modern .header-main {
    flex: 1;
}

.template-modern .resume-photo-frame {
    margin-left: 20px;
    flex-shrink: 0;
}

.template-modern .cv-name {
    font-size: 24pt;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.template-modern .cv-title {
    font-size: 12pt;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.template-modern .cv-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 12px;
    font-size: 8.5pt;
    color: #4b5563;
}

.template-modern .contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.template-modern .contact-item i {
    color: var(--primary-color);
    width: 12px;
    text-align: center;
}

.template-modern .cv-summary-box {
    margin-bottom: 4px;
}

.template-modern .cv-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-modern .cv-section-title {
    font-size: 12pt;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.template-modern .cv-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e5e7eb;
}

.template-modern .cv-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-modern .cv-item {
    display: flex;
    flex-direction: column;
}

.template-modern .cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    color: #111827;
}

.template-modern .cv-item-title {
    font-size: 10pt;
}

.template-modern .cv-item-subtitle {
    font-size: 9.5pt;
    color: var(--primary-color);
    font-weight: 500;
}

.template-modern .cv-item-meta {
    font-size: 8.5pt;
    color: #6b7280;
    font-weight: 400;
}

.template-modern .cv-item-desc {
    margin-top: 4px;
    color: #374151;
    text-align: justify;
    white-space: pre-line;
}

/* Skills list style */
.template-modern .cv-skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.template-modern .cv-skill-tag {
    background-color: #f3f4f6;
    border-left: 3px solid var(--primary-color);
    color: #1f2937;
    padding: 4px 10px;
    font-size: 8.5pt;
    font-weight: 500;
    border-radius: 2px;
}

/* Custom list certifications, languages */
.template-modern .cv-meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #374151;
}

/* ==========================================================================
   CV Template 2: Classic Executive Layout (Serif elements)
   ========================================================================== */
.template-professional {
    font-size: 10pt;
    line-height: 1.6;
    color: #2c3e50;
}

.template-professional .cv-header {
    text-align: center;
    border-bottom: 3px double #bdc3c7;
    padding-bottom: 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.template-professional .resume-photo-frame {
    margin-bottom: 10px;
}

.template-professional .cv-name {
    font-family: 'Lora', serif;
    font-size: 26pt;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.template-professional .cv-title {
    font-size: 11pt;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 600;
}

.template-professional .cv-contact-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
    font-size: 8.5pt;
    border-top: 1px solid #ecf0f1;
    padding-top: 8px;
    width: 100%;
}

.template-professional .contact-item {
    color: #7f8c8d;
}

.template-professional .contact-item i {
    color: #34495e;
}

.template-professional .cv-section {
    margin-bottom: 14px;
}

.template-professional .cv-section-title {
    font-family: 'Lora', serif;
    font-size: 13pt;
    color: #2c3e50;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 3px;
    margin-bottom: 8px;
    font-weight: 600;
}

.template-professional .cv-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-professional .cv-item {
    margin-bottom: 4px;
}

.template-professional .cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.template-professional .cv-item-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 10.5pt;
}

.template-professional .cv-item-subtitle {
    font-style: italic;
    color: #34495e;
    font-weight: 500;
}

.template-professional .cv-item-meta {
    font-size: 9pt;
    color: #7f8c8d;
}

.template-professional .cv-item-desc {
    margin-top: 3px;
    text-align: justify;
    font-size: 9.5pt;
    white-space: pre-line;
}

.template-professional .cv-skills-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 12px;
}

.template-professional .cv-skill-tag {
    font-size: 9pt;
}

.template-professional .cv-skill-tag::before {
    content: "• ";
    color: var(--primary-color);
}

/* ==========================================================================
   CV Template 3: Tech Sidebar Layout
   ========================================================================== */
.template-tech {
    display: grid;
    grid-template-columns: 2.2fr 5fr;
    column-gap: 22px;
    padding: 0 !important; /* Managed custom layout inside template */
    min-height: 297mm;
    font-size: 9pt;
    line-height: 1.45;
}

/* Left Sidebar styling */
.template-tech .cv-sidebar {
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 20mm 15px 20mm 20mm;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Right content area */
.template-tech .cv-main-body {
    padding: 20mm 20mm 20mm 15px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.template-tech .resume-photo-frame {
    margin-bottom: 8px;
    border-color: #cbd5e1;
}

.template-tech .cv-name {
    font-size: 20pt;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.template-tech .cv-title {
    font-size: 10.5pt;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 2px;
}

.template-tech .cv-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.template-tech .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 8pt;
    color: #475569;
}

.template-tech .contact-item i {
    color: var(--primary-color);
    width: 14px;
}

.template-tech .cv-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-tech .cv-sidebar-title {
    font-size: 9.5pt;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-tech .cv-skills-vertical {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-tech .cv-skill-progress-bar {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.template-tech .skill-name-row {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    font-size: 8pt;
}

.template-tech .progress-bg {
    height: 4px;
    background-color: #cbd5e1;
    border-radius: 2px;
    overflow: hidden;
}

.template-tech .progress-fill {
    height: 100%;
    background-color: var(--primary-color);
}

.template-tech .cv-section-title {
    font-size: 12pt;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1.5px solid var(--primary-color);
    padding-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-tech .cv-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-tech .cv-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #0f172a;
}

.template-tech .cv-item-subtitle {
    color: var(--primary-color);
}

.template-tech .cv-item-meta {
    font-size: 8pt;
    color: #64748b;
}

.template-tech .cv-item-desc {
    margin-top: 4px;
    color: #334155;
    text-align: justify;
    white-space: pre-line;
}

/* ==========================================================================
   CV Template 4: Creative Bold
   ========================================================================== */
.template-creative {
    font-size: 9.5pt;
    line-height: 1.5;
    padding: 0 !important;
    min-height: 297mm;
    display: flex;
    flex-direction: column;
}

.template-creative .creative-top-banner {
    background-color: var(--primary-color);
    color: white;
    padding: 24mm 20mm 14mm 20mm;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.template-creative .resume-photo-frame {
    border-color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.template-creative .cv-name {
    font-size: 26pt;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.template-creative .cv-title {
    font-size: 12pt;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.template-creative .creative-body {
    padding: 16mm 20mm 20mm 20mm;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 24px;
    flex: 1;
}

.template-creative .creative-left {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.template-creative .creative-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.template-creative .cv-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 14px;
}

.template-creative .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 8.5pt;
    color: #475569;
}

.template-creative .contact-item i {
    color: var(--primary-color);
}

.template-creative .cv-section-title {
    font-size: 11.5pt;
    font-weight: 700;
    color: #0f172a;
    border-left: 4px solid var(--primary-color);
    padding-left: 8px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.template-creative .cv-item {
    background-color: #fafbfc;
    border: 1px solid #f1f5f9;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
}

.template-creative .cv-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.template-creative .cv-item-subtitle {
    color: var(--primary-color);
}

.template-creative .cv-item-meta {
    font-size: 8pt;
    color: #64748b;
}

.template-creative .cv-item-desc {
    margin-top: 4px;
    font-size: 9pt;
    white-space: pre-line;
}

.template-creative .cv-skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.template-creative .cv-skill-tag {
    background-color: #f1f5f9;
    color: #334155;
    padding: 4px 8px;
    font-size: 8pt;
    border-radius: 4px;
    font-weight: 500;
}


/* ==========================================================================
   CV Template 5: Classic Simple (Traditional Black & White)
   ========================================================================== */
.template-simple {
    font-size: 9.5pt;
    line-height: 1.45;
    color: #111111;
}

.template-simple .cv-header {
    text-align: center;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 12px;
}

.template-simple .resume-photo-frame {
    margin-bottom: 8px;
    border-color: #000000;
}

.template-simple .cv-name {
    font-size: 22pt;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000000;
    text-transform: uppercase;
}

.template-simple .cv-title {
    font-size: 11pt;
    font-weight: 600;
    color: #333333;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-simple .cv-contact-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 8.5pt;
    color: #444444;
}

.template-simple .contact-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.template-simple .contact-item::after {
    content: " |";
    color: #cccccc;
    margin-left: 12px;
}

.template-simple .contact-item:last-child::after {
    content: "";
}

.template-simple .cv-section {
    margin-bottom: 16px;
}

.template-simple .cv-section-title {
    font-size: 11pt;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    border-bottom: 1px solid #111111;
    padding-bottom: 2px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.template-simple .cv-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.template-simple .cv-item {
    display: flex;
    flex-direction: column;
}

.template-simple .cv-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: #000000;
}

.template-simple .cv-item-subtitle-row {
    display: flex;
    justify-content: space-between;
    font-size: 9pt;
    font-weight: 500;
    color: #444444;
    margin-top: 1px;
}

.template-simple .cv-item-desc {
    margin-top: 3px;
    color: #222222;
    text-align: justify;
    white-space: pre-line;
}

.template-simple .cv-skills-container {
    font-size: 9pt;
    line-height: 1.5;
}


/* ==========================================================================
   CV Template 6: Academic Serif (LaTeX Style)
   ========================================================================== */
.template-academic {
    font-family: 'Lora', serif;
    font-size: 9.5pt;
    line-height: 1.45;
    color: #111111;
}

.template-academic .cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #333333;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.template-academic .header-text-block {
    flex: 1;
}

.template-academic .resume-photo-frame {
    margin-left: 20px;
    border-color: #333333;
}

.template-academic .cv-name {
    font-size: 22pt;
    font-weight: 600;
    color: #000000;
    font-family: 'Lora', serif;
}

.template-academic .cv-title {
    font-size: 11pt;
    font-style: italic;
    color: #555555;
    margin-top: 2px;
}

.template-academic .cv-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 8px;
    font-size: 8.5pt;
    font-family: sans-serif; /* Contact is cleaner in sans-serif */
    color: #444444;
}

.template-academic .contact-item i {
    color: #555555;
}

.template-academic .cv-section {
    margin-bottom: 14px;
}

.template-academic .cv-section-title {
    font-size: 11pt;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    border-bottom: 0.75px solid #555555;
    padding-bottom: 2px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.template-academic .cv-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.template-academic .cv-item {
    display: flex;
    flex-direction: column;
}

.template-academic .cv-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.template-academic .cv-item-subtitle {
    font-weight: 500;
    color: #333333;
}

.template-academic .cv-item-meta {
    font-size: 8.5pt;
    color: #555555;
    font-family: sans-serif;
}

.template-academic .cv-item-desc {
    margin-top: 2px;
    color: #222222;
    text-align: justify;
    white-space: pre-line;
}

.template-academic .cv-skills-text {
    font-size: 9pt;
    color: #222222;
}


/* ==========================================================================
   CV Template 7: Two-Column Split (Symmetrical Clean Layout)
   ========================================================================== */
.template-split {
    display: grid;
    grid-template-columns: 1fr 2.3fr;
    gap: 24px;
    font-size: 9pt;
    line-height: 1.45;
}

.template-split .split-left {
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid #e5e7eb;
    padding-right: 18px;
}

.template-split .split-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.template-split .resume-photo-frame {
    margin-bottom: 6px;
}

.template-split .cv-name {
    font-size: 20pt;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.template-split .cv-title {
    font-size: 11pt;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.template-split .cv-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.template-split .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 8pt;
    color: #4b5563;
}

.template-split .contact-item i {
    color: var(--primary-color);
    width: 14px;
}

.template-split .cv-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-split .cv-section-title {
    font-size: 11pt;
    font-weight: 700;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-split .split-left .cv-section-title {
    border-bottom-color: var(--primary-color);
}

.template-split .cv-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.template-split .cv-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #111827;
}

.template-split .cv-item-subtitle {
    color: var(--primary-color);
}

.template-split .cv-item-meta {
    font-size: 8pt;
    color: #6b7280;
}

.template-split .cv-item-desc {
    margin-top: 3px;
    color: #374151;
    white-space: pre-line;
}

.template-split .cv-skills-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-split .cv-skill-item {
    display: flex;
    justify-content: space-between;
    font-size: 8.5pt;
    font-weight: 500;
}

.template-split .cv-meta-block {
    font-size: 8.5pt;
    color: #4b5563;
}


/* ==========================================================================
   CV Template 8: Traditional Bio-Data (Regional Indian Layout)
   ========================================================================== */
.template-traditional {
    font-size: 9.5pt;
    line-height: 1.4;
    color: #111111;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.template-traditional .cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #000000;
    padding-bottom: 12px;
    margin-bottom: 4px;
}

.template-traditional .header-main {
    flex: 1;
}

.template-traditional .resume-photo-frame {
    margin-left: 20px;
    border-color: #000000;
    box-shadow: none;
    flex-shrink: 0;
}

.template-traditional .cv-doc-title {
    font-size: 16pt;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    color: #000000;
    width: 100%;
}

.template-traditional .cv-name {
    font-size: 18pt;
    font-weight: 700;
    color: #000000;
    line-height: 1.1;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.template-traditional .cv-contact-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 9.5pt;
    color: #111111;
}

.template-traditional .contact-line-item {
    display: flex;
    font-weight: 500;
}

.template-traditional .contact-label {
    font-weight: 700;
    width: 80px;
    flex-shrink: 0;
}

.template-traditional .cv-section {
    display: flex;
    flex-direction: column;
}

.template-traditional .traditional-section-title {
    background-color: #b9d1ea;
    color: #000000;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 10pt;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    border: 1px solid #7f8c8d;
    box-sizing: border-box;
}

.template-traditional .cv-item-desc {
    color: #111111;
    text-align: justify;
    line-height: 1.45;
    white-space: pre-line;
}

/* Table layout for education */
.template-traditional .traditional-edu-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    border: 1px solid #000000;
}

.template-traditional .traditional-edu-table th,
.template-traditional .traditional-edu-table td {
    border: 1px solid #000000;
    padding: 6px 8px;
    font-size: 8.5pt;
    text-align: center;
    vertical-align: middle;
}

.template-traditional .traditional-edu-table th {
    background-color: #f1f5f9;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 8pt;
}

.template-traditional .traditional-edu-table td {
    color: #111111;
}

/* Aligned list for experiences */
.template-traditional .cv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-traditional .cv-item {
    font-size: 9.5pt;
    margin-bottom: 4px;
}

/* Extended Personal details format */
.template-traditional .traditional-personal-table {
    display: grid;
    grid-template-columns: 180px auto;
    row-gap: 6px;
    font-size: 9.5pt;
    margin-bottom: 8px;
}

.template-traditional .personal-label {
    font-weight: 700;
    color: #000000;
}

.template-traditional .personal-value {
    color: #111111;
}

/* Strengths numbered list */
.template-traditional .traditional-strengths-list {
    padding-left: 20px;
    margin-bottom: 8px;
}

.template-traditional .traditional-strengths-list li {
    margin-bottom: 4px;
    font-size: 9.5pt;
}

/* Declaration and signature footers */
.template-traditional .traditional-declaration-box {
    margin-top: 4px;
}

.template-traditional .traditional-signature-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 40px;
    font-size: 10pt;
}

.template-traditional .sig-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-weight: 700;
}

.template-traditional .sig-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 700;
}

.template-traditional .sig-line {
    border-top: 1px solid #000000;
    width: 180px;
    margin-bottom: 4px;
    text-align: center;
}


/* ==========================================================================
   Print Style Settings (@media print)
   ========================================================================== */
@media print {
    /* Set page dimension rules */
    @page {
        size: A4 portrait;
        margin: 0;
    }
    
    /* Hide dashboard, panel layouts, header and footer */
    body {
        background: #ffffff !important;
        color: #000000 !important;
        overflow: visible !important;
        height: auto !important;
    }

    .app-header, 
    .editor-panel, 
    .preview-toolbar,
    .app-footer {
        display: none !important;
    }
    
    .app-workspace {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .preview-panel {
        background: none !important;
        padding: 0 !important;
        overflow: visible !important;
        display: block !important;
        width: 100% !important;
    }

    .paper-container {
        padding: 0 !important;
        display: block !important;
        width: 100% !important;
    }

    /* Target resume body specifically for printing */
    .resume-document {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 20mm !important;
        width: 210mm !important;
        height: 297mm !important;
        position: relative !important;
        page-break-after: always !important;
        border: none !important;
        
        /* Force browser to print backgrounds */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Print styles overrides to retain layouts */
    .template-tech {
        height: 297mm !important;
        min-height: 297mm !important;
        background-color: #ffffff !important;
    }

    .template-tech .cv-sidebar {
        background-color: #f8fafc !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .template-creative .creative-top-banner {
        background-color: var(--primary-color) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .template-traditional .traditional-section-title {
        background-color: #b9d1ea !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Avoid breaking items across pages */
    .cv-item, 
    .cv-section,
    .cv-summary-box {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}
