* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(220, 20, 60, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 0, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

header {
    background: linear-gradient(135deg, #dc143c 0%, #a00f2e 50%, #8b0000 100%);
    color: white;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.logo-icon {
    font-size: 56px;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05) rotate(5deg);
}

h1, h2 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    opacity: 0.95;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

.dmaisp-logo {
    font-weight: 700;
    color: #fff;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    text-decoration: none;
}

.status-message {
    margin: 20px;
    padding: 18px 24px;
    border-radius: 12px;
    display: none;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.status-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.instrucoes {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    padding: 30px;
    margin: 30px;
    border-radius: 12px;
    border-left: 6px solid #dc143c;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.08);
    position: relative;
    overflow: hidden;
}

.instrucoes::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.instrucoes h3 {
    color: #dc143c;
    margin-bottom: 14px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.instrucoes p {
    color: #333;
    line-height: 1.7;
    font-size: 15px;
}

form {
    padding: 40px;
}

.section, .info-box, .filtros-container, .resposta-item {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 2px solid #f0f0f0;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.section:hover, .info-box:hover, .filtros-container:hover, .resposta-item:hover {
    border-color: #dc143c;
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.12);
    transform: translateY(-2px);
}

.section-header, .info-box h3, .filtros-container h3, .resposta-item h3 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header i, .info-box h3 i, .filtros-container h3 i, .resposta-item h3 i {
    color: #dc143c;
    font-size: 26px;
    background: rgba(220, 20, 60, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.section-header h3, .info-box h3, .filtros-container h3, .resposta-item h3 {
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 600;
    border: none;
    padding: 0;
}

.section-description, .filtros-container > p {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
    padding-left: 50px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    letter-spacing: 0.2px;
}

select, input[type="text"], input[type="number"], textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

select:hover, input:hover, textarea:hover {
    border-color: #c0c0c0;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.12);
    background: #fffafa;
}

textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.afirmacao-ref {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    padding: 24px;
    border-radius: 10px;
    margin-top: 18px;
    border-left: 5px solid #dc143c;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.08);
}

.afirmacao-ref strong {
    color: #dc143c;
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
}

.afirmacao-ref p {
    color: #333;
    line-height: 1.7;
    font-size: 14px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.checkbox-item:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-color: #ffcccc;
}

.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #dc143c;
}

.inline-label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: #333;
    transition: color 0.2s;
}

.checkbox-item:hover .inline-label {
    color: #dc143c;
}

.pontuacao-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.pontuacao-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

.pontuacao-option:hover {
    border-color: #ffcccc;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.pontuacao-option:has(input:checked) {
    border-color: #dc143c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.15);
}

.pontuacao-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #dc143c;
}

.pontuacao-option label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.pontuacao-option input[type="number"] {
    width: 90px;
    padding: 10px 14px;
}

small {
    display: block;
    color: #666;
    font-size: 13px;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.5;
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 0.3px;
}

.btn-enviar {
    background: linear-gradient(135deg, #dc143c 0%, #a00f2e 50%, #8b0000 100%);
    color: white;
    width: 100%;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.3);
}

.btn-enviar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.4);
}

.btn-enviar:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.btn-secundario {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    width: 100%;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-secundario:hover {
    background: linear-gradient(135deg, #3c3c3c 0%, #2a2a2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.resultado-box {
    margin: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-radius: 12px;
    border-left: 6px solid #dc143c;
    display: none;
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.12);
}

.resultado-box h3 {
    color: #dc143c;
    margin-bottom: 24px;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.texto-gerado {
    background: white;
    padding: 24px;
    border-radius: 10px;
    border: 2px solid #f0f0f0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 18px;
    color: #1a1a1a;
    line-height: 1.6;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

.texto-gerado::-webkit-scrollbar {
    width: 8px;
}

.texto-gerado::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.texto-gerado::-webkit-scrollbar-thumb {
    background: #dc143c;
    border-radius: 4px;
}

.texto-gerado::-webkit-scrollbar-thumb:hover {
    background: #a00f2e;
}

.btn-copiar {
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.3);
}

.btn-copiar:hover {
    background: linear-gradient(135deg, #c01238 0%, #7a0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

.btn-copiar.copiado {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
}

/* Seção de inserção RAG */
.form-rag-section, form#ragForm.form-group {
    margin: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

form#ragForm.form-group {
    position: relative;
    overflow: hidden;
}

form#ragForm.form-group::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

form#ragForm.form-group:hover {
    border-color: #dc143c;
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.12);
    transform: translateY(-2px);
}

.form-rag-section h2 {
    color: #dc143c;
    margin-bottom: 24px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
}

/* Textarea de inserção */
#content {
    width: 100%;
    padding: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin-bottom: 0;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: white;
    color: #1a1a1a;
    min-height: 200px;
    resize: vertical;
}

#content:hover {
    border-color: #c0c0c0;
}

#content:focus {
    border-color: #dc143c;
    outline: none;
    box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.12);
    background: #fffafa;
}

#content::placeholder {
    color: #999;
    font-style: italic;
}

/* Espaçamento entre textarea e botão */
form#ragForm.form-group br {
    display: none;
}

form#ragForm.form-group #content {
    margin-bottom: 20px;
}

/* Botão de envio da seção RAG */
form#ragForm.form-group button[type="submit"] {
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #dc143c 0%, #a00f2e 50%, #8b0000 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.3);
    margin-bottom: 20px;
}

form#ragForm.form-group button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.4);
}

form#ragForm.form-group button[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

form#ragForm.form-group button[type="submit"]::before {
    content: '\f0ee';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Status de envio */
#status {
    background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
    padding: 18px 24px;
    border-radius: 10px;
    border-left: 5px solid #1a1a1a;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: 'Inter', sans-serif;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

#status:empty {
    display: none;
}

#status:not(:empty) {
    animation: slideIn 0.3s ease;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    h1, h2 {
        font-size: 24px;
    }

    .logo-icon {
        font-size: 42px;
        padding: 16px;
    }

    form {
        padding: 20px;
    }

    .section, .info-box, .filtros-container, .resposta-item {
        padding: 20px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .instrucoes {
        margin: 20px;
        padding: 20px;
    }

    .resultado-box, .form-rag-section {
        margin: 20px;
        padding: 20px;
    }
}