.ccg-app {
    --ccg-ink: #1e293b;
    --ccg-muted: #64748b;
    --ccg-line: #dbe3ef;
    --ccg-soft: #f6f8fb;
    --ccg-brand: #0f766e;
    --ccg-brand-dark: #115e59;
    --ccg-panel: #ffffff;
    color: var(--ccg-ink);
    font-family: Arial, Helvetica, sans-serif;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.ccg-app-compact {
    padding-top: 8px;
}

.ccg-app * {
    box-sizing: border-box;
}

.ccg-layout {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
}

.ccg-layout-single {
    grid-template-columns: minmax(0, 880px);
    justify-content: center;
}

.ccg-form {
    display: grid;
    gap: 16px;
}


.ccg-autosave-note {
    align-items: center;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    color: var(--ccg-ink);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 14px;
}

.ccg-autosave-note strong,
.ccg-autosave-note span {
    display: block;
}

.ccg-autosave-note strong {
    font-size: 14px;
    margin-bottom: 3px;
}

.ccg-autosave-note span {
    color: var(--ccg-muted);
    font-size: 13px;
    line-height: 1.45;
}

.ccg-clear-save-btn {
    background: #ffffff;
    border: 1px solid var(--ccg-brand);
    border-radius: 8px;
    color: var(--ccg-brand-dark);
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    min-height: 36px;
    padding: 7px 10px;
}

.ccg-clear-save-btn:hover {
    background: #e7f8f5;
}

.ccg-panel {
    background: var(--ccg-panel);
    border: 1px solid var(--ccg-line);
    border-radius: 8px;
    padding: 18px;
}

.ccg-section-title {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.ccg-section-title span {
    align-items: center;
    background: var(--ccg-brand);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 28px;
    font-size: 14px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.ccg-section-title h2 {
    color: var(--ccg-ink);
    font-size: 19px;
    line-height: 1.25;
    margin: 0;
}

.ccg-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ccg-grid-wide {
    grid-column: 1 / -1;
}

.ccg-app label {
    color: var(--ccg-ink);
    display: grid !important;
    font-size: 14px;
    font-weight: 700;
    gap: 7px;
    line-height: 1.35;
    margin: 0;
}

.ccg-app input[type="text"],
.ccg-app input[type="tel"],
.ccg-app input[type="email"],
.ccg-app select,
.ccg-app textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--ccg-ink);
    display: block;
    font: inherit;
    font-size: 15px;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

.ccg-app select {
    appearance: auto;
}

.ccg-app textarea {
    line-height: 1.45;
    min-height: 98px;
    resize: vertical;
    width: 100% !important;
}

.ccg-app textarea.ccg-large-textarea {
    min-height: 150px;
}

.ccg-app input:focus,
.ccg-app textarea:focus {
    border-color: var(--ccg-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.ccg-app label.ccg-check {
    align-items: center;
    display: inline-flex !important;
    flex-direction: row;
    font-weight: 700;
    gap: 9px;
    grid-template-columns: none !important;
    justify-content: flex-start;
    line-height: 1.3;
    margin-bottom: 12px;
    width: auto;
}

.ccg-app label.ccg-check input[type="checkbox"] {
    appearance: auto;
    background: initial !important;
    border-radius: 2px !important;
    box-shadow: none !important;
    display: inline-block !important;
    flex: 0 0 auto;
    height: 16px !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    width: 16px !important;
}

.ccg-helper-buttons,
.ccg-template-picker,
.ccg-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ccg-helper-buttons button,
.ccg-template-picker button,
.ccg-color-picker button,
.ccg-repeat-head button,
.ccg-add-btn,
.ccg-secondary-btn,
.ccg-download-btn {
    border: 1px solid var(--ccg-line);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.ccg-download-btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

.ccg-download-wide {
    width: 100%;
}

.ccg-guide {
    color: var(--ccg-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: -2px 0 14px;
}

.ccg-subsection-head {
    border-top: 1px solid var(--ccg-line);
    display: grid;
    gap: 3px;
    margin-top: 16px;
    padding-top: 16px;
}

.ccg-main-study {
    margin-top: 16px;
}

.ccg-optional-head {
    margin-top: 18px;
}

.ccg-subsection-head strong {
    font-size: 15px;
}

.ccg-subsection-head span {
    color: var(--ccg-muted);
    font-size: 13px;
}

.ccg-final-panel {
    border-color: #9adbcf;
}

.ccg-helper-buttons button,
.ccg-template-picker button,
.ccg-color-picker button,
.ccg-repeat-head button {
    background: #ffffff;
    color: var(--ccg-ink);
    min-height: 35px;
    padding: 6px 9px;
}

.ccg-helper-buttons button:hover,
.ccg-template-picker button:hover,
.ccg-template-picker button.is-active,
.ccg-color-picker button:hover,
.ccg-color-picker button.is-active {
    background: #e7f8f5;
    border-color: #8ed8cf;
    color: var(--ccg-brand-dark);
}

.ccg-color-picker button {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.ccg-color-picker span {
    border-radius: 999px;
    display: inline-block;
    height: 16px;
    width: 16px;
}

.ccg-add-btn,
.ccg-secondary-btn,
.ccg-download-btn {
    background: var(--ccg-brand);
    border-color: var(--ccg-brand);
    color: #ffffff;
    min-height: 39px;
    padding: 8px 12px;
}

.ccg-add-btn:hover,
.ccg-secondary-btn:hover,
.ccg-download-btn:hover {
    background: var(--ccg-brand-dark);
}

.ccg-secondary-btn {
    background: #ffffff;
    border-color: var(--ccg-brand);
    color: var(--ccg-brand-dark);
}

.ccg-secondary-btn:hover {
    background: #e7f8f5;
    color: var(--ccg-brand-dark);
}

.ccg-final-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ccg-toast {
    background: #111827;
    border-radius: 8px;
    bottom: 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    max-width: min(360px, calc(100vw - 32px));
    opacity: 0;
    padding: 12px 14px;
    position: fixed;
    right: 18px;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 99999;
}

.ccg-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ccg-repeat-item {
    background: var(--ccg-soft);
    border: 1px solid var(--ccg-line);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 14px;
}

.ccg-repeat-item textarea {
    min-height: 112px;
}

.ccg-repeat-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ccg-repeat-head strong {
    font-size: 15px;
}

.ccg-repeat-head button {
    color: #b42318;
}

.ccg-muted,
.ccg-print-note {
    color: var(--ccg-muted);
    font-size: 14px;
    line-height: 1.45;
    margin: 8px 0 0;
}

.ccg-print-area {
    background: #e9eef5;
    border: 1px solid var(--ccg-line);
    border-radius: 8px;
    padding: 14px;
}

.ccg-cv {
    background: #ffffff;
    color: #162033;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
    margin: 0 auto;
    max-width: 794px;
    min-height: 720px;
    padding: 34px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.ccg-template-sidebar {
    align-items: stretch;
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    max-width: 794px;
    min-height: 900px;
    padding: 0;
}

.ccg-cv-sidebar {
    background: #19999b;
    color: #ffffff;
    padding: 34px 24px;
}

.ccg-cv-badge {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 30px;
    text-transform: uppercase;
}

.ccg-side-section {
    margin-top: 24px;
}

.ccg-side-section h3 {
    border-bottom: 3px solid rgba(255, 255, 255, 0.9);
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0 0 16px;
    padding-bottom: 8px;
    text-transform: uppercase;
}

.ccg-side-section p,
.ccg-side-item span {
    color: #ffffff;
    display: block;
    font-size: 12px;
    line-height: 1.45;
}

.ccg-side-item {
    margin-bottom: 15px;
}

.ccg-side-item strong {
    color: #ffffff;
    display: block;
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 3px;
}

.ccg-cv-main {
    padding: 40px 34px 36px;
}

.ccg-template-sidebar .ccg-cv-header {
    border-bottom: 0;
    margin-bottom: 34px;
    padding-bottom: 0;
}

.ccg-template-sidebar .ccg-cv-header h2 {
    color: #6d6d6d;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1.16;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.ccg-template-sidebar .ccg-cv-headline {
    color: #8a8a8a;
    font-size: 14px;
    font-weight: 400;
}

.ccg-template-sidebar .ccg-cv-section {
    margin-top: 24px;
}

.ccg-template-sidebar .ccg-cv-section h3 {
    border-bottom: 3px solid var(--ccg-cv-accent, #19999b);
    color: var(--ccg-cv-accent, #19999b);
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 1.15;
    margin-bottom: 14px;
    padding-bottom: 6px;
}

.ccg-template-sidebar .ccg-cv-item {
    display: grid;
    gap: 8px;
    grid-template-columns: 100px minmax(0, 1fr);
    margin-bottom: 14px;
}

.ccg-template-sidebar .ccg-cv-item strong {
    color: #616161;
    font-size: 13px;
    grid-column: 2;
}

.ccg-template-sidebar .ccg-cv-item span,
.ccg-template-sidebar .ccg-cv-item small {
    color: #777777;
    font-size: 12px;
}

.ccg-template-sidebar .ccg-cv-item span {
    grid-column: 1;
    grid-row: 1;
}

.ccg-template-sidebar .ccg-cv-item small {
    grid-column: 1;
    grid-row: 2;
}

.ccg-template-sidebar .ccg-cv-item p {
    color: #777777;
    font-size: 12px;
    grid-column: 2;
}

.ccg-template-sidebar .ccg-cv-tags {
    columns: 2;
    display: block;
    list-style: disc;
    padding-left: 18px;
}

.ccg-template-sidebar .ccg-cv-tags li {
    background: transparent;
    border-radius: 0;
    color: #777777;
    font-size: 12px;
    padding: 0 0 4px;
}

.ccg-cv-header {
    border-bottom: 1px solid #cfd8e3;
    margin-bottom: 22px;
    padding-bottom: 18px;
}

.ccg-cv h2 {
    color: inherit;
    font-size: 30px;
    line-height: 1.1;
    margin: 0 0 7px;
}

.ccg-cv-headline {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 7px;
}

.ccg-cv-contact {
    color: #475569;
    font-size: 13px;
    margin: 0;
}

.ccg-cv-section {
    margin-top: 18px;
}

.ccg-cv-section h3 {
    color: inherit;
    font-size: 14px;
    letter-spacing: 0;
    margin: 0 0 9px;
    text-transform: uppercase;
}

.ccg-cv-section p {
    font-size: 13px;
    margin: 0;
}

.ccg-cv-item {
    margin-bottom: 12px;
}

.ccg-cv-item strong,
.ccg-cv-line strong {
    display: block;
    font-size: 14px;
}

.ccg-cv-item span,
.ccg-cv-line span,
.ccg-cv-item small {
    color: #475569;
    display: block;
    font-size: 12px;
}

.ccg-cv-item p {
    margin-top: 5px;
}

.ccg-cv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ccg-cv-tags li {
    background: #eef2f7;
    border-radius: 999px;
    font-size: 12px;
    padding: 5px 9px;
}

.ccg-cv-line {
    align-items: baseline;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
    margin-bottom: 7px;
}

.ccg-cv-empty {
    color: #64748b;
}

.ccg-template-simple {
    border-top: 8px solid #0f766e;
}

.ccg-template-simple .ccg-cv-header {
    border-bottom-color: #99d7ce;
}

.ccg-template-simple .ccg-cv-section h3 {
    color: #0f766e;
}

.ccg-template-formal {
    border: 1px solid #cbd5e1;
    border-top: 10px solid #1f2937;
    font-family: Georgia, "Times New Roman", serif;
}

.ccg-template-formal .ccg-cv-header {
    border-bottom: 2px solid #1f2937;
    text-align: center;
}

.ccg-template-formal h2 {
    letter-spacing: 0;
}

.ccg-template-formal .ccg-cv-section h3 {
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 5px;
}

.ccg-template-moderno {
    border-left: 16px solid #0f766e;
}

.ccg-template-moderno .ccg-cv-header {
    background: linear-gradient(135deg, #f0fdfa 0%, #eef2ff 100%);
    border-bottom: 0;
    margin: -34px -34px 22px;
    padding: 30px 34px 20px;
}

.ccg-template-moderno .ccg-cv-section h3 {
    color: #0f766e;
}

.ccg-template-moderno .ccg-cv-tags li {
    background: #dff7f2;
    color: #115e59;
}

.ccg-template-limpio {
    border-top: 6px solid #64748b;
    box-shadow: none;
}

.ccg-template-limpio .ccg-cv-header {
    border-bottom: 1px solid #e2e8f0;
}

.ccg-template-limpio .ccg-cv-section h3 {
    color: #334155;
    text-transform: none;
}

.ccg-template-ejecutivo {
    border-top: 12px solid #243b53;
}

.ccg-template-ejecutivo .ccg-cv-header {
    background: #f8fafc;
    border-bottom: 2px solid #243b53;
    margin: -34px -34px 22px;
    padding: 28px 34px 18px;
}

.ccg-template-ejecutivo .ccg-cv-section h3 {
    color: #243b53;
}

.ccg-template-tecnico {
    border-left: 10px solid #2563eb;
}

.ccg-template-tecnico .ccg-cv-section {
    border-left: 3px solid #dbeafe;
    padding-left: 12px;
}

.ccg-template-tecnico .ccg-cv-section h3 {
    color: #1d4ed8;
}

.ccg-template-elegante {
    border: 1px solid #d6d3d1;
    font-family: Georgia, "Times New Roman", serif;
}

.ccg-template-elegante .ccg-cv-header {
    border-bottom: 1px solid #a8a29e;
}

.ccg-template-elegante .ccg-cv-section h3 {
    color: #57534e;
    font-style: italic;
    text-transform: none;
}

.ccg-template-compacto {
    padding: 26px;
}

.ccg-template-compacto .ccg-cv-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
}

.ccg-template-compacto .ccg-cv-section {
    margin-top: 12px;
}

.ccg-template-compacto .ccg-cv-item {
    margin-bottom: 8px;
}

.ccg-template-creativo {
    border-top: 10px solid #be123c;
}

.ccg-template-creativo .ccg-cv-header {
    background: #fff1f2;
    border-bottom: 0;
    margin: -34px -34px 22px;
    padding: 30px 34px 20px;
}

.ccg-template-creativo .ccg-cv-section h3 {
    color: #be123c;
}

.ccg-template-creativo .ccg-cv-tags li {
    background: #ffe4e6;
    color: #9f1239;
}

.ccg-template-profesional {
    border-top: 8px solid #374151;
}

.ccg-template-profesional .ccg-cv-header {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
}

.ccg-template-profesional .ccg-cv-section h3 {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 8px;
}

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

}

@media (max-width: 640px) {
    .ccg-autosave-note {
        align-items: stretch;
        flex-direction: column;
    }

    .ccg-clear-save-btn {
        width: 100%;
    }

    .ccg-app {
        padding: 18px 12px 32px;
    }

    .ccg-grid {
        grid-template-columns: 1fr;
    }

    .ccg-panel,
    .ccg-cv {
        padding: 16px;
    }

    .ccg-template-sidebar {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .ccg-template-sidebar .ccg-cv-sidebar {
        padding: 24px 18px;
    }

    .ccg-template-sidebar .ccg-cv-main {
        padding: 26px 18px;
    }

    .ccg-template-sidebar .ccg-cv-header h2 {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .ccg-template-sidebar .ccg-cv-item {
        grid-template-columns: 1fr;
    }

    .ccg-template-sidebar .ccg-cv-item strong,
    .ccg-template-sidebar .ccg-cv-item span,
    .ccg-template-sidebar .ccg-cv-item small,
    .ccg-template-sidebar .ccg-cv-item p {
        grid-column: auto;
        grid-row: auto;
    }

    .ccg-download-btn {
        width: 100%;
    }

    .ccg-cv h2 {
        font-size: 24px;
    }

    .ccg-template-moderno .ccg-cv-header {
        margin: -16px -16px 18px;
        padding: 22px 16px 16px;
    }

    .ccg-template-ejecutivo .ccg-cv-header,
    .ccg-template-creativo .ccg-cv-header {
        margin: -16px -16px 18px;
        padding: 22px 16px 16px;
    }

    .ccg-final-actions {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        margin: 12mm;
        size: A4;
    }

    body * {
        visibility: hidden !important;
    }

    .ccg-print-area,
    .ccg-print-area * {
        visibility: visible !important;
    }

    .ccg-print-note {
        display: none !important;
    }

    .ccg-print-area {
        background: #ffffff !important;
        border: 0 !important;
        border-radius: 0 !important;
        left: 0;
        padding: 0 !important;
        position: absolute;
        top: 0;
        width: 100%;
    }

    .ccg-cv {
        box-shadow: none !important;
        max-width: none !important;
        min-height: auto !important;
        padding: 0 !important;
        width: 100% !important;
    }
}


.ccg-suggestion-box {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.ccg-suggestion-preview {
    background: #f8fafc;
    border: 1px solid var(--ccg-line);
    border-radius: 8px;
    color: var(--ccg-muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    padding: 10px 12px;
}

.ccg-suggestion-preview strong {
    color: var(--ccg-ink);
}

.ccg-color-select-box {
    margin-top: 12px;
    max-width: 520px;
}

.ccg-color-select-row {
    align-items: center;
    display: flex;
    gap: 10px;
}

.ccg-color-preview {
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 22px;
    width: 22px;
}
