        body {
            font-family: var(--font-ui);
            background: #f0f2f5;
            padding-bottom: 50px;
        }

        .cv-container {
            width: 794px;
            /* A4 Width PX */
            min-height: 1123px;
            /* A4 Height PX */
            margin: 0 auto;
            background: white;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
            font-family: var(--font-cv);
        }

        .cv-body {
            padding: 40px;
        }

        .job-item {
            margin-bottom: 25px;
        }

        .job-title {
            font-weight: 700;
            font-size: 1.05rem;
        }

        .company-name {
            font-style: italic;
            color: #555;
            font-size: 0.95rem;
        }

        .job-date {
            float: right;
            font-weight: 600;
            font-size: 0.85rem;
        }

        ul {
            padding-left: 1.1rem;
            margin-bottom: 0;
        }

        li {
            margin-bottom: 3px;
            font-size: 0.92rem;
            line-height: 1.5;
            color: #444;
        }

        /* General Layout Helpers */
        .header-section {
            padding: 40px;
        }

        .contact-info span {
            margin: 0 10px;
        }

        .section-title {
            padding-bottom: 5px;
            margin: 20px 0 15px;
            text-transform: uppercase;
            font-weight: 700;
        }

        .editor-container {
            max-width: 800px;
            margin: 40px auto;
            background: #fff;
            padding: 30px;
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        }

        html {
            overflow-y: scroll;
        }

        /* Modern Card UI */
        .section-card {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
            border: none;
            overflow: hidden;
            margin-bottom: 20px;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .section-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 50px -10px rgba(0, 0, 0, 0.15);
        }

        /* Premium Section Header & Buttons - Optimized for Mobile */
        .section-header {
            padding: 12px 20px !important;
            color: white !important;
            display: flex;
            flex-wrap: wrap;
            /* Allow wrapping on small screens */
            gap: 10px;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            user-select: none;
            border-bottom: none !important;
            border-radius: 16px 16px 0 0 !important;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        }

        .section-header h5 {
            margin: 0;
            font-size: 1rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 60%;
        }

        .section-header .chevron {
            transition: transform 0.3s ease;
        }

        .section-header.collapsed .chevron {
            transform: rotate(-90deg);
        }

        .btn-add-header {
            background: rgba(255, 255, 255, 0.25) !important;
            color: white !important;
            border: 1px solid rgba(255, 255, 255, 0.5) !important;
            border-radius: 50px !important;
            padding: 6px 15px !important;
            font-size: 0.8rem !important;
            font-weight: 600 !important;
            transition: all 0.3s ease !important;
            backdrop-filter: blur(5px) !important;
            display: inline-flex !important;
            align-items: center !important;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
            white-space: nowrap;
        }

        .btn-add-header:hover {
            background: rgba(255, 255, 255, 0.4) !important;
            color: white !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
        }

        /* Dynamic Grid Layout for Rows */
        .dynamic-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 10px;
            align-items: center;
            margin-bottom: 15px;
            background: #fff;
            padding: 10px;
            border-radius: 12px;
            border: 1px solid #edf2f7;
        }

        .dynamic-row-inputs {
            display: grid;
            gap: 8px;
            flex-grow: 1;
        }

        /* Professional Mobile Nav */
        .mobile-bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(15px);
            display: none !important;
            /* Hide by default on all screens */
            justify-content: space-around;
            padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
            box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
            z-index: 1050;
            border-top: 1px solid #edf2f7;
        }

        .nav-item-mobile {
            text-align: center;
            color: #a0aec0;
            text-decoration: none;
            font-size: 0.7rem;
            flex: 1;
            transition: all 0.2s;
            font-weight: 500;
        }

        .nav-item-mobile i {
            display: block;
            font-size: 1.4rem;
            margin-bottom: 4px;
        }

        .nav-item-mobile.active {
            color: #667eea;
        }

        @media (max-width: 991px) {
            .mobile-bottom-nav {
                display: flex !important;
            }

            .navbar-custom {
                display: none !important;
            }

            body {
                padding-bottom: 100px !important;
            }
        }

        @media (min-width: 992px) {
            .mobile-bottom-nav {
                display: none !important;
            }
        }

        /* Improved Mobile Layout & CV Preview */
        @media (max-width: 850px) {

            /* Force Global Margins on Body to ensure nothing touches edges */
            body {
                padding-left: 20px !important;
                padding-right: 20px !important;
                overflow-x: hidden !important;
            }

            /* Reset container paddings since body handles edge spacing now */
            .container,
            .container-fluid {
                padding-left: 0 !important;
                padding-right: 0 !important;
                width: 100% !important;
            }

            .container.my-5 {
                margin-top: 15px !important;
                padding: 0 !important;
            }

            /* Stable CV Scaling */
            .preview-wrapper {
                margin-top: 10px;
                padding: 0 !important;
                background: transparent !important;
                overflow: visible !important;
                display: block !important;
                width: 100% !important;
                box-shadow: none !important;
            }

            .cv-container {
                width: 794px !important;
                margin: 0 !important;
                display: block !important;
                border: 1px solid #ddd !important;
                box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
                min-height: 1123px;
                /* JS handles scaling */
            }

            /* Container for the scaled CV - JS handles height */
            #preview-area {
                width: 100% !important;
                overflow: hidden !important;
                display: block !important;
            }

            .sidebar {
                width: 35% !important;
                display: block !important;
                padding: 25px 15px !important;
            }

            .main-content {
                width: 65% !important;
                display: block !important;
                padding: 25px !important;
            }

            .header-section {
                padding: 25px !important;
            }

            .profile-pic {
                width: 100px !important;
                height: 100px !important;
            }
        }



        .form-control:focus,
        .form-select:focus {
            background-color: #fff;
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }

        .btn-add-header {
            background: rgba(255, 255, 255, 0.25);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 50px;
            padding: 6px 20px;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
            display: inline-flex;
            align-items: center;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .btn-add-header:hover {
            background: rgba(255, 255, 255, 0.4);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

        /* Shine Animation */
        @keyframes shine {
            0% {
                background-position: 200% center;
            }

            100% {
                background-position: -200% center;
            }
        }

        .btn-shine {
            background-size: 200% auto;
            background-image: linear-gradient(to right,
                    var(--primary) 0%,
                    #a8c0ff 50%,
                    var(--primary) 100%);
            animation: shine 4s linear infinite;
            border: none;
            position: relative;
            overflow: hidden;
            transition: all 0.3s;
        }

        .btn-shine:hover {
            box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
            transform: scale(1.02);
            opacity: 1;
            /* Override potential disabled opacity during animation loop if needed */
        }

        .fake-disabled {
            background-color: #e9ecef;
            pointer-events: none;
            opacity: 0.6;
        }

        .color-preset-btn {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            border: 3px solid #fff;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            cursor: pointer;
            display: inline-block;
            margin-right: 8px;
            transition: transform 0.2s;
        }

        .color-preset-btn:hover {
            transform: scale(1.1);
        }

        /* These classes help update the UI instantly via JS */
        .preview-bg-primary {
            background-color: var(--primary);
        }

        .preview-bg-gradient {
            background: var(--gradient);
        }

        .preview-text-primary {
            color: var(--primary);
        }

        .preview-text-accent {
            color: var(--accent);
        }

        .preview-border-primary {
            border-color: var(--primary);
        }

        .preview-border-accent {
            border-color: var(--accent);
        }

        @media print {

            .no-print,
            .editor-container,
            .nav-tabs {
                display: none !important;
            }

            .cv-container {
                box-shadow: none;
                margin: 0;
            }

            body {
                background: white;
                -webkit-print-color-adjust: exact;
            }
        }

        .profile-pic {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            border: 4px solid #fff;
            object-fit: cover;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
            margin-bottom: 15px;
            margin-bottom: 15px;
            background-color: #fff;
        }

        /* Loading Overlay */
        #loadingOverlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.8);
            z-index: 9999;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .spinner-border {
            width: 3rem;
            height: 3rem;
        }

        /* Sticky Save Bar Removed */

        /* ========================================
           EDIT PAGE - MODERN UI IMPROVEMENTS
           ======================================== */

        /* Section Body (Inside Cards) */
        .section-body {
            background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
            padding: 25px !important;
        }

        /* Individual Experience/Education/Course Item Cards */
        .dynamic-row {
            background: #ffffff !important;
            border: 1px solid #e2e8f0 !important;
            border-radius: 12px !important;
            padding: 20px !important;
            margin-bottom: 20px !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
            transition: all 0.2s ease !important;
            position: relative;
        }

        .dynamic-row:hover {
            border-color: #cbd5e1 !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        }

        /* Item Number Badge (Optional Visual Enhancement) */
        .dynamic-row::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px 0 0 12px;
        }

        /* Experience items specific color */
        #exp-list .dynamic-row::before {
            background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
        }

        /* Skills items specific color */
        #skills-list .dynamic-row::before {
            background: linear-gradient(180deg, #43e97b 0%, #38f9d7 100%);
        }

        /* Education items specific color */
        #edu-list .dynamic-row::before {
            background: linear-gradient(180deg, #fa709a 0%, #fee140 100%);
        }

        /* Courses items specific color */
        #courses-list .dynamic-row::before {
            background: linear-gradient(180deg, #a18cd1 0%, #fbc2eb 100%);
        }

        /* Form Labels */
        .section-body label,
        .dynamic-row label {
            color: #64748b;
            font-weight: 500;
            font-size: 0.82rem;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-bottom: 6px !important;
        }

        /* Form Inputs & Controls */
        .section-body .form-control,
        .section-body .form-select,
        .dynamic-row .form-control,
        .dynamic-row .form-select {
            background-color: #f8fafc !important;
            border: 1px solid #e2e8f0 !important;
            border-radius: 8px !important;
            padding: 10px 14px !important;
            font-size: 0.95rem !important;
            transition: all 0.2s ease !important;
        }

        .section-body .form-control:focus,
        .section-body .form-select:focus,
        .dynamic-row .form-control:focus,
        .dynamic-row .form-select:focus {
            background-color: #ffffff !important;
            border-color: #667eea !important;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
        }

        /* Textarea styling */
        .section-body textarea,
        .dynamic-row textarea {
            min-height: 80px;
            resize: vertical;
        }

        /* Date Inputs Container */
        .date-inputs {
            background: #f1f5f9;
            padding: 12px 16px;
            border-radius: 10px;
            border: 1px dashed #cbd5e1;
        }

        .date-inputs label {
            color: #475569 !important;
            font-size: 0.75rem !important;
            margin-bottom: 0 !important;
        }

        .date-inputs .form-control {
            background-color: #ffffff !important;
            border: 1px solid #cbd5e1 !important;
            font-size: 0.85rem !important;
            padding: 6px 10px !important;
        }

        /* Delete Button Styling */
        .dynamic-row .fa-trash {
            color: #94a3b8 !important;
            font-size: 1.1rem !important;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .dynamic-row .fa-trash:hover {
            color: #ef4444 !important;
            background: #fee2e2;
        }

        /* Save Button Styling */
        .btn-primary.btn-shine {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            border: none !important;
            border-radius: 10px !important;
            font-weight: 600 !important;
            letter-spacing: 0.3px;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35) !important;
            transition: all 0.3s ease !important;
        }

        .btn-primary.btn-shine:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45) !important;
        }

        /* Row Spacing inside dynamic row */
        .dynamic-row .row {
            margin-bottom: 12px;
        }

        .dynamic-row .row:last-child {
            margin-bottom: 0;
        }

        /* Checkbox Styling */
        .form-check-input:checked {
            background-color: #667eea;
            border-color: #667eea;
        }

        /* Personal Info Section Specific */
        #personalCollapse .section-body {
            background: linear-gradient(180deg, #fef7ff 0%, #ffffff 100%);
        }

        /* Profile Picture Area */
        .profile-pic-container {
            background: #f8fafc;
            border: 2px dashed #e2e8f0;
            border-radius: 16px;
            padding: 20px;
            text-align: center;
            transition: all 0.2s ease;
        }

        .profile-pic-container:hover {
            border-color: #667eea;
            background: #f0f4ff;
        }

        /* Empty State Message */
        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: #94a3b8;
        }

        .empty-state i {
            font-size: 3rem;
            margin-bottom: 15px;
            opacity: 0.5;
        }

        /* ========================================
           MOBILE RESPONSIVENESS - EDIT PAGE FIELDS
           ======================================== */
        @media (max-width: 768px) {

            /* Section Body */
            .section-body {
                padding: 15px !important;
            }

            /* Dynamic Row Cards */
            .dynamic-row {
                padding: 15px !important;
                padding-left: 20px !important;
                /* Space for left border */
                margin-bottom: 15px !important;
            }

            /* Grid Layout Override for Mobile */
            .dynamic-row {
                display: block !important;
            }

            .dynamic-row-inputs {
                display: block !important;
                width: 100% !important;
            }

            /* Date Inputs - Compact Layout */
            .date-inputs {
                display: flex !important;
                flex-wrap: wrap !important;
                gap: 10px !important;
                padding: 12px !important;
                margin-bottom: 12px !important;
            }

            .date-inputs>label {
                flex: 0 0 auto;
                font-size: 0.7rem !important;
                display: flex;
                align-items: center;
            }

            .date-inputs>input[type="month"] {
                flex: 1 1 100px !important;
                min-width: 100px !important;
                max-width: 140px !important;
                font-size: 0.8rem !important;
                padding: 8px 10px !important;
            }

            .date-inputs .form-check {
                flex: 0 0 auto;
                display: flex;
                align-items: center;
                gap: 5px;
            }

            .date-inputs .form-check-label {
                font-size: 0.75rem !important;
                margin: 0 !important;
            }

            /* Job Title & Company - Stack on Mobile */
            .dynamic-row .row.g-2 .col-md-6 {
                width: 100% !important;
                margin-bottom: 10px !important;
            }

            /* Form Controls Sizing */
            .dynamic-row .form-control,
            .dynamic-row .form-select {
                font-size: 0.9rem !important;
                padding: 10px 12px !important;
            }

            .dynamic-row .form-control-sm {
                font-size: 0.85rem !important;
                padding: 8px 10px !important;
            }

            /* Textarea */
            .dynamic-row textarea {
                min-height: 70px !important;
                font-size: 0.85rem !important;
            }

            /* Delete Button - Fixed Position */
            .dynamic-row>.text-end {
                position: absolute !important;
                top: 12px !important;
                right: 12px !important;
                padding: 0 !important;
            }

            .dynamic-row .fa-trash {
                font-size: 1rem !important;
                padding: 8px !important;
                background: #fff !important;
                border-radius: 8px !important;
                box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
            }

            /* Labels */
            .dynamic-row label {
                font-size: 0.7rem !important;
                margin-bottom: 4px !important;
            }

            /* Section Header */
            .section-header {
                padding: 10px 15px !important;
            }

            .section-header h5 {
                font-size: 0.9rem !important;
            }

            .btn-add-header {
                padding: 5px 12px !important;
                font-size: 0.75rem !important;
            }

            /* Save Button */
            .btn-primary.btn-shine {
                width: 100% !important;
                padding: 12px !important;
                font-size: 0.9rem !important;
            }

            /* Skills/Education Compact Layout */
            #skills-list .dynamic-row,
            #edu-list .dynamic-row,
            #courses-list .dynamic-row {
                padding: 12px 15px !important;
                padding-left: 18px !important;
            }

            /* Personal Info Fields */
            #personalCollapse .row.g-3 .col-md-6,
            #personalCollapse .row.g-3 .col-md-4 {
                width: 100% !important;
            }

            #personalCollapse .form-control,
            #personalCollapse .form-select {
                margin-bottom: 10px;
            }

            /* Profile Picture */
            .profile-pic-container {
                padding: 15px !important;
            }

            .profile-pic-container .profile-pic {
                width: 80px !important;
                height: 80px !important;
            }
        }

        /* Extra Small Screens (< 400px) */
        @media (max-width: 400px) {
            .date-inputs {
                flex-direction: column !important;
                align-items: stretch !important;
            }

            .date-inputs>input[type="month"] {
                max-width: 100% !important;
                width: 100% !important;
            }

            .date-inputs .form-check {
                justify-content: flex-start;
                margin-top: 5px;
            }

            .dynamic-row .row.g-2 {
                gap: 8px !important;
            }
        }