:root {
    --primary-color: #0066cc;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
}

.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Preview Sidebar */
.preview-sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.step-indicator {
    display: flex;
    gap: 0.5rem;
}

.step {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--primary-color);
    color: white;
}

.step.completed {
    background: var(--success-color);
    color: white;
}

.preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0;
}

.preview-btn:hover {
    background: var(--primary-color);
    color: white;
}

.preview-btn img {
    width: 20px;
    height: 20px;
}

.clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 500;
    font-size: 20px;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #dc3545;
    color: white;
}

.preview-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 300px;
    background: #fafafa;
}

/* Form Section */
.form-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-group-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-group-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.section-header img {
    width: 24px;
    height: 24px;
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.import-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #0077b5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.import-btn:hover {
    background: #006097;
    transform: translateY(-2px);
}

.import-btn img {
    width: 20px;
    height: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

/* Redes sociais com label inline */
[data-section="4"] .form-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

[data-section="4"] .form-group label {
    margin-bottom: 0;
    min-width: 80px;
    flex-shrink: 0;
}

[data-section="4"] .form-group input {
    flex: 1;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group select {
    cursor: pointer;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.terms-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.privacy-notice {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.privacy-notice a {
    color: var(--primary-color);
    text-decoration: underline;
}

.disclaimer {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
}

.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Template Selector */
.template-selector {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.template-selector h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.template-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.template-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.2);
}

.template-card.active {
    border-color: var(--primary-color);
    background: #e7f3ff;
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
}

.template-card .template-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.template-card .template-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.template-card .template-desc {
    font-size: 0.85rem;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

/* Signature Preview Styles */
.signature-preview {
    font-family: Arial, sans-serif;
    padding: 20px;
    background: white;
}

.signature-preview table {
    border-collapse: collapse;
    font-size: 14px;
}

.signature-preview td {
    padding: 5px;
    vertical-align: middle;
}

.signature-preview .name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.signature-preview .title {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.signature-preview .company {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-color);
}

.signature-preview .contact-info {
    font-size: 13px;
    color: #666;
}

.signature-preview .social-icons {
    margin-top: 10px;
}

.signature-preview .social-icons a {
    margin-right: 8px;
    text-decoration: none;
}

.signature-preview .social-icons img {
    width: 24px;
    height: 24px;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content p {
    margin: 0;
}

/* Responsive */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .preview-sidebar {
        position: static;
    }

    header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1rem;
    }

    .form-section,
    .preview-sidebar {
        padding: 1rem;
    }

    .form-navigation {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Visual Options (Botões de seleção com imagens) */
.visual-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.visual-option {
    flex: 1;
    min-width: 120px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.visual-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
    transform: translateY(-2px);
}

.visual-option.active {
    border-color: var(--primary-color);
    background: #e6f2ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.visual-option img {
    width: 80px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.visual-option span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
}

.visual-option.active span {
    color: var(--primary-color);
    font-weight: 600;
}

input[type="color"] {
    width: 100%;
    height: 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 5px;
}

input[type="color"]:hover {
    border-color: var(--primary-color);
}
