    /* Container */
    #gpae-wrapper {
        max-width: 960px;
        margin: 30px auto;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    }
    
    /* Formulário */
    .gpae-form-container {
        background: #ffffff;
        padding: 40px;
        border-radius: 16px;
        box-shadow: 0 5px 30px rgba(0,0,0,0.08);
        border: 1px solid #e8e8e8;
    }
    
    /* Dicas */
    .gpae-dicas-box {
        background: linear-gradient(135deg, #4CAF50 0%, #2e7d32 100%);
        color: white;
        padding: 25px 30px;
        border-radius: 12px;
        margin-bottom: 35px;
        box-shadow: 0 5px 20px rgba(76,175,80,0.25);
    }
    .gpae-dicas-box h3 { margin: 0 0 15px; font-size: 20px; font-weight: 700; }
    .gpae-dicas-box ul { margin: 0; padding-left: 5px; list-style: none; line-height: 2; }
    .gpae-dicas-box li { margin-bottom: 4px; font-size: 15px; }
    
    /* Form Groups */
    .gpae-form-group { margin-bottom: 22px; }
    .gpae-form-group label { display: block; margin-bottom: 10px; font-weight: 600; color: #2c3e50; font-size: 16px; }
    .label-icon { font-size: 18px; margin-right: 6px; }
    .required { color: #e74c3c; font-weight: 700; }
    
    .gpae-form-group input[type="text"],
    .gpae-form-group select,
    .gpae-form-group textarea {
        width: 100%; padding: 14px 16px; border: 2px solid #e0e0e0; border-radius: 10px;
        font-size: 15px; transition: all 0.3s ease; font-family: inherit; background: #fafafa; box-sizing: border-box;
    }
    .gpae-form-group input:focus, .gpae-form-group select:focus, .gpae-form-group textarea:focus {
        outline: none; border-color: #4CAF50; box-shadow: 0 0 0 4px rgba(76,175,80,0.12); background: #fff;
    }
    .gpae-form-group small { display: block; margin-top: 8px; color: #7f8c8d; font-size: 13px; }
    
    .gpae-form-group select:disabled {
        background: #f0f0f0; color: #999; cursor: not-allowed; opacity: 0.7;
    }
    
    /* VALIDAÇÃO VISUAL */
    .gpae-form-group.has-error input,
    .gpae-form-group.has-error select,
    .gpae-form-group.has-error textarea {
        border-color: #e74c3c !important;
        box-shadow: 0 0 0 4px rgba(231,76,60,0.12) !important;
        background: #fff5f5 !important;
    }
    .gpae-form-group.has-error label { color: #e74c3c; }
    .gpae-field-error {
        display: block; margin-top: 6px; font-size: 13px; font-weight: 600;
        color: #e74c3c; min-height: 0; transition: all 0.3s ease;
    }
    
    /* Erro de geração */
    .gpae-erro-notice {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        color: white; padding: 18px 25px; border-radius: 12px;
        margin-bottom: 25px; font-size: 15px;
        box-shadow: 0 5px 20px rgba(231,76,60,0.3);
        animation: gpae-slideDown 0.5s ease-out;
    }
    .gpae-erro-notice strong { color: #fff; }
    .gpae-erro-notice small { color: rgba(255,255,255,0.8); }
    
    /* Row */
    .gpae-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    
    /* ======= TAGS CLICÁVEIS ======= */
    .gpae-tags-container {
        display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
    }
    .gpae-tag {
        display: inline-block; padding: 8px 16px;
        background: #f0f0f0; border: 2px solid #e0e0e0; border-radius: 25px;
        font-size: 13px; font-weight: 500; color: #555;
        cursor: pointer; transition: all 0.25s ease; user-select: none;
    }
    .gpae-tag:hover {
        background: #e8f5e9; border-color: #4CAF50; color: #2e7d32; transform: translateY(-2px);
        box-shadow: 0 3px 10px rgba(76,175,80,0.15);
    }
    .gpae-tag.active {
        background: linear-gradient(135deg, #4CAF50, #2e7d32); border-color: #2e7d32;
        color: white; box-shadow: 0 3px 12px rgba(76,175,80,0.3);
    }
    .gpae-tag.shake { animation: gpae-shake 0.5s ease; }
    @keyframes gpae-shake {
        0%,100% { transform: translateX(0); }
        20%,60% { transform: translateX(-5px); }
        40%,80% { transform: translateX(5px); }
    }
    
    /* Botão Principal */
    .gpae-submit-container { margin-top: 30px; }
    .gpae-btn-primary {
        width: 100%; padding: 18px 30px;
        background: linear-gradient(135deg, #4CAF50 0%, #2e7d32 100%);
        color: white; border: none; border-radius: 12px; font-size: 19px; font-weight: 700;
        cursor: pointer; transition: all 0.3s ease;
        box-shadow: 0 6px 25px rgba(76,175,80,0.35); letter-spacing: 0.3px;
    }
    .gpae-btn-primary:hover {
        transform: translateY(-3px); box-shadow: 0 10px 35px rgba(76,175,80,0.45);
        background: linear-gradient(135deg, #43a047 0%, #1b5e20 100%);
    }
    .btn-icon { font-size: 22px; margin-right: 10px; }
    
    /* Loading */
    .gpae-loading {
        text-align: center; padding: 80px 40px; background: #fff;
        border-radius: 16px; box-shadow: 0 5px 30px rgba(0,0,0,0.08);
        min-height: 420px; display: flex; align-items: center; justify-content: center;
    }
    .loading-content { width: 100%; }
    .loading-content h3 { color: #2e7d32; font-size: 26px; margin: 25px 0 15px; font-weight: 700; }
    .loading-content p { color: #7f8c8d; font-size: 16px; margin-bottom: 30px; }
    .gpae-spinner {
        width: 70px; height: 70px; margin: 0 auto;
        border: 6px solid #e8f5e9; border-top: 6px solid #4CAF50;
        border-radius: 50%; animation: gpae-spin 1s linear infinite;
    }
    @keyframes gpae-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
    
    .loading-steps { max-width: 400px; margin: 30px auto; text-align: left; }
    .loading-steps .step {
        padding: 14px 20px; margin-bottom: 10px; border-radius: 10px; background: #f5f5f5;
        display: flex; align-items: center; gap: 14px; transition: all 0.4s ease; font-size: 15px; color: #999;
    }
    .loading-steps .step.active {
        background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32;
        font-weight: 600; box-shadow: 0 3px 12px rgba(76,175,80,0.15); animation: gpae-pulse 1.5s ease-in-out infinite;
    }
    .loading-steps .step.complete { background: #4CAF50; color: white; font-weight: 600; }
    @keyframes gpae-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
    .step-icon { font-size: 22px; }
    
    .loading-bar { width: 100%; height: 8px; background: #e8f5e9; border-radius: 10px; overflow: hidden; margin: 25px auto 0; max-width: 400px; }
    .loading-progress {
        height: 100%; background: linear-gradient(90deg, #4CAF50, #2e7d32, #4CAF50);
        border-radius: 10px; animation: gpae-progress 2.5s ease-in-out infinite;
    }
    @keyframes gpae-progress { 0% { width: 0%; } 50% { width: 75%; } 100% { width: 100%; } }
    
    /* Resultado */
    .gpae-resultado {
        position: relative;
        background: #fff; padding: 45px; border-radius: 16px;
        box-shadow: 0 5px 30px rgba(0,0,0,0.08); margin-bottom: 30px; border: 1px solid #e8e8e8;
    }
    .plano-header { border-bottom: 4px solid #4CAF50; padding-bottom: 25px; margin-bottom: 35px; }
    .plano-header-badge { color: #4CAF50; font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px; }
    .plano-header h1 { color: #1a1a1a; font-size: 28px; margin: 0 0 20px; font-weight: 800; line-height: 1.3; }
    .plano-meta { display: flex; flex-wrap: wrap; gap: 12px; }
    .meta-item {
        background: linear-gradient(135deg, #f8f9fa, #e8f5e9); padding: 10px 18px;
        border-radius: 8px; font-size: 13px; color: #555; border: 1px solid #e0e0e0;
    }
    .meta-item strong { color: #2e7d32; }
    
    /* Corpo */
    .plano-body { line-height: 1.85; color: #34495e; font-size: 16px; }
    .plano-body h1 {
        font-size: 26px; font-weight: 700; color: #1a5276; text-align: center; margin: 30px 0 20px; padding: 18px;
        background: linear-gradient(135deg, #eaf2f8, #d4e6f1); border-bottom: 4px solid #2e86c1; border-radius: 10px;
    }
    .plano-body h2 {
        font-size: 22px; font-weight: 700; color: #fff; margin: 40px 0 20px; padding: 14px 22px;
        background: linear-gradient(135deg, #2e7d32 0%, #4CAF50 100%); border-radius: 10px;
        border-left: 6px solid #1b5e20; box-shadow: 0 4px 15px rgba(76,175,80,0.25);
    }
    .plano-body h3 {
        font-size: 18px; font-weight: 600; color: #fff; margin: 28px 0 15px; padding: 11px 18px;
        background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%); border-radius: 8px;
        border-left: 5px solid #0d47a1; box-shadow: 0 3px 12px rgba(21,101,192,0.2);
    }
    .plano-body hr { border: none; height: 3px; background: linear-gradient(90deg, transparent, #4CAF50, transparent); margin: 35px 0; }
    .plano-body p { margin-bottom: 16px; text-align: justify; }
    .plano-body strong { color: #1a5276; font-weight: 700; }
    .plano-body em { font-style: italic; color: #616161; }
    .plano-body ul, .plano-body ol {
        margin: 18px 0 18px 30px; padding: 15px 20px; background: #f8f9fa;
        border-radius: 8px; border-left: 4px solid #4CAF50;
    }
    .plano-body li { margin-bottom: 10px; line-height: 1.7; }
    
    /* LaTeX */
    .gpae-latex-block {
        text-align: center; margin: 20px 0; padding: 15px; background: #fafafa;
        border: 1px dashed #ccc; border-radius: 8px; font-size: 17px; overflow-x: auto;
    }
    .gpae-latex-inline { font-size: inherit; }
    
    /* Rodapé */
    .plano-footer { margin-top: 45px; padding-top: 25px; border-top: 2px dashed #e0e0e0; text-align: center; }
    .plano-footer p { font-size: 16px; color: #7f8c8d; margin: 0; }
    .plano-footer strong { color: #4CAF50; font-size: 18px; font-weight: 700; }
    
    /* Export Buttons */
    #gpae-export-buttons {
        text-align: center; padding: 35px; background: #f8f9fa;
        border-radius: 14px; margin-bottom: 20px; border: 1px solid #e8e8e8;
    }
    #gpae-export-buttons h3 { margin-bottom: 25px; color: #2c3e50; font-size: 24px; font-weight: 700; }
    .export-buttons-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 25px; }
    .export-btn {
        background: #27ae60; color: white; padding: 14px 32px; border: none; border-radius: 10px;
        cursor: pointer; font-size: 16px; font-weight: 600; transition: all 0.3s ease; min-width: 170px;
    }
    .export-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
    .btn-copiar { background: linear-gradient(135deg, #9b59b6, #8e44ad) !important; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
    .btn-copiar:hover { background: linear-gradient(135deg, #8e44ad, #7d3c98) !important; }
    .btn-pdf { background: #c0392b !important; }
    .btn-pdf:hover { background: #a93226 !important; }
    #gpae-btn-print { background: #e67e22; }
    #gpae-btn-print:hover { background: #d35400; }
    #gpae-btn-docx { background: #3498db; }
    #gpae-btn-docx:hover { background: #2980b9; }
    
    .gpae-btn-novo {
        background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; padding: 16px 40px;
        border: none; border-radius: 10px; cursor: pointer; font-size: 17px; font-weight: 600;
        transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(231,76,60,0.3);
    }
    .gpae-btn-novo:hover { background: linear-gradient(135deg, #c0392b, #a93226); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(231,76,60,0.4); }
    .gpae-btn-compartilhar {
        background: linear-gradient(135deg, #7c4dff, #651fff); color: white; padding: 16px 40px;
        border: none; border-radius: 10px; cursor: pointer; font-size: 17px; font-weight: 600;
        transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(124,77,255,0.3);
    }
    .gpae-btn-compartilhar:hover { background: linear-gradient(135deg, #651fff, #5c16e6); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(124,77,255,0.4); }
    
    /* Ajuste do Plano */
    .gpae-ajuste-container {
        background: linear-gradient(135deg, #fff8e1, #fff3c4); padding: 30px; border-radius: 14px;
        margin-bottom: 20px; border: 2px solid #f9a825; border-left: 6px solid #f9a825;
    }
    .gpae-ajuste-container h3 { margin: 0 0 18px; color: #e65100; font-size: 20px; font-weight: 700; }
    .gpae-ajuste-container textarea {
        width: 100%; padding: 14px 16px; border: 2px solid #e0e0e0; border-radius: 10px;
        font-size: 15px; font-family: inherit; background: #fff; box-sizing: border-box;
        transition: border-color 0.3s ease; resize: vertical; min-height: 80px;
    }
    .gpae-ajuste-container textarea:focus {
        outline: none; border-color: #f9a825; box-shadow: 0 0 0 4px rgba(249,168,37,0.15);
    }
    .gpae-ajuste-container small { display: block; margin-top: 8px; color: #7f8c8d; font-size: 13px; }
    .gpae-ajuste-buttons { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
    .gpae-btn-ajustar {
        background: linear-gradient(135deg, #f9a825, #f57f17); color: white; padding: 14px 30px;
        border: none; border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 600;
        transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(249,168,37,0.3); flex: 1; min-width: 200px;
    }
    .gpae-btn-ajustar:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(249,168,37,0.4); }
    .gpae-btn-refazer {
        background: linear-gradient(135deg, #7b1fa2, #6a1b9a); color: white; padding: 14px 30px;
        border: none; border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 600;
        transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(123,31,162,0.3); flex: 1; min-width: 200px;
    }
    .gpae-btn-refazer:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(123,31,162,0.4); }
    
    .gpae-ajuste-overlay {
        position: absolute; top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(255,255,255,0.92); display: flex; align-items: center; justify-content: center;
        z-index: 10; border-radius: 16px; animation: gpae-fadeInOverlay 0.3s ease;
    }
    .gpae-ajuste-loading { text-align: center; padding: 30px; }
    @keyframes gpae-fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
    
    .gpae-footer-note { text-align: center; font-size: 15px; color: #7f8c8d; margin-top: 20px; padding: 20px; background: #f0faf0; border-radius: 10px; }
    .gpae-footer-note strong { color: #4CAF50; font-size: 17px; }
    
    @keyframes gpae-slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
    
    /* Print */
    @media print {
        body * { visibility: hidden; }
        #gpae-resultado-container, #gpae-resultado-container * { visibility: visible; }
        #gpae-resultado-container { position: absolute; left: 0; top: 0; width: 100%; }
        #gpae-export-buttons, .gpae-footer-note, .gpae-ajuste-container, .gpae-btn-novo, .gpae-btn-compartilhar, .gpae-btn-refazer, .gpae-debug-panel { display: none !important; }
        .gpae-resultado { box-shadow: none; border: none; padding: 20px; }
        .plano-body h2 { color: #1a5276 !important; background: #eaf2f8 !important; box-shadow: none !important; border-left: 5px solid #1a5276 !important; }
        .plano-body h3 { color: #34495e !important; background: #f5f5f5 !important; box-shadow: none !important; border-left: 4px solid #34495e !important; }
    }
    
    /* Responsivo */
    @media (max-width: 768px) {
        .gpae-form-container { padding: 25px; }
        .gpae-row { grid-template-columns: 1fr; }
        .export-buttons-grid { flex-direction: column; }
        .export-btn { width: 100%; }
        .plano-meta { flex-direction: column; }
        .meta-item { width: 100%; }
        .gpae-resultado { padding: 25px; }
        .plano-header h1 { font-size: 22px; }
        .gpae-tags-container { gap: 8px; }
        .gpae-tag { font-size: 12px; padding: 6px 12px; }
        .gpae-ajuste-buttons { flex-direction: column; }
        .gpae-btn-ajustar, .gpae-btn-refazer { width: 100%; min-width: auto; }
    }
    
    /* Scrollbar */
    #gpae-wrapper ::-webkit-scrollbar { width: 8px; }
    #gpae-wrapper ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
    #gpae-wrapper ::-webkit-scrollbar-thumb { background: #4CAF50; border-radius: 10px; }
    #gpae-wrapper ::-webkit-scrollbar-thumb:hover { background: #2e7d32; }
