:root {
    --primary-color: #01605D;
    --secondary-color: #D3BF89;
    --light-color: #EAE5E0;
    --dark-color: #242424;
    --accent-color: #DA431B;
    --text-color: #242424;
    --light-gray: #EAE5E0;
    --border-color: #D3BF89;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

.ac-upload-form {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

#ac-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#ac-form label {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

#ac-form input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed var(--border-color);
    border-radius: 5px;
    transition: var(--transition);
    cursor: pointer;
}

#ac-form input[type="file"]:hover {
    border-color: var(--secondary-color);
}

.ac-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#ac-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#ac-form button {
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ac-form button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

#ac-mensagem {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 5px;
    font-weight: 500;
}

#ac-mensagem.error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

#ac-mensagem.success {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

#ac-resultados {
    margin-top: 2rem;
}

#ac-resultados .ac-section {
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 10px;
    background-color: white;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

#ac-resultados .ac-section h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

#ac-resultados .ac-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

#ac-resultados .ac-section h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
}

#ac-resultados .ac-section p {
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1rem;
}

#ac-resultados .ac-section ul,
#ac-resultados .ac-section ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

#ac-resultados .ac-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-color);
}

#ac-resultados .ac-section strong {
    color: var(--primary-color);
    font-weight: 600;
}

#ac-resultados .ac-section canvas {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

#ac-download-pdf {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

#ac-download-pdf:hover {
    background-color: #219a52;
    transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 768px) {
    .ac-upload-form {
        margin: 1rem;
        padding: 1.5rem;
    }

    #ac-form button,
    #ac-download-pdf {
        width: 100%;
    }

    #ac-resultados .ac-section {
        padding: 1.5rem;
    }

    .disc-values {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* Otimizações específicas para smartphones */
@media (max-width: 480px) {
    .ac-upload-form {
        margin: 0.5rem;
        padding: 1rem;
    }

    #ac-form {
        gap: 1rem;
    }

    #ac-resultados .ac-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    #ac-resultados .ac-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    #ac-resultados .ac-section h3 {
        font-size: 1.25rem;
        margin: 1rem 0 0.75rem;
    }

    #ac-resultados .ac-section h4 {
        font-size: 1.1rem;
    }

    #ac-resultados .ac-section p,
    #ac-resultados .ac-section li {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .disc-values {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .disc-values p {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .disc-comment {
        padding: 1rem;
        margin-top: 1rem;
    }

    .disc-comment h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .disc-comment p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .ac-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    #ac-download-pdf {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    input[type="file"]::file-selector-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Otimizações para telas muito pequenas */
@media (max-width: 320px) {
    .ac-upload-form {
        margin: 0.25rem;
        padding: 0.75rem;
    }

    #ac-resultados .ac-section {
        padding: 0.75rem;
    }

    #ac-resultados .ac-section h2 {
        font-size: 1.25rem;
    }

    #ac-resultados .ac-section h3 {
        font-size: 1.1rem;
    }

    #ac-resultados .ac-section h4 {
        font-size: 1rem;
    }

    #ac-resultados .ac-section p,
    #ac-resultados .ac-section li {
        font-size: 0.9rem;
    }
}

/* Loading spinner */
.ac-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.ac-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Adicionar após os estilos existentes */
.text-center {
    text-align: center;
}

.file-name {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.disc-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.disc-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.disc-values p {
    margin: 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.disc-values p:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.disc-values strong {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.disc-values .percentage {
    font-size: 2em;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
    text-align: center;
    margin-top: 0.5rem;
}

.disc-comment {
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.disc-comment h4 {
    color: var(--primary-color);
    font-size: 1.4em;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
}

.disc-comment p {
    color: var(--dark-color);
    line-height: 1.8;
    font-size: 1.1em;
    margin: 0;
}

@media (max-width: 768px) {
    .disc-values {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .disc-values p {
        padding: 1.25rem;
    }
    
    .disc-values strong {
        font-size: 1em;
    }
    
    .disc-values .percentage {
        font-size: 1.75em;
    }
    
    .disc-comment {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .disc-values {
        grid-template-columns: 1fr;
    }
    
    .disc-values p {
        padding: 1rem;
    }
    
    .disc-values .percentage {
        font-size: 1.5em;
    }
    
    .disc-comment {
        padding: 1.25rem;
    }
    
    .disc-comment h4 {
        font-size: 1.2em;
        margin-bottom: 1rem;
    }
    
    .disc-comment p {
        font-size: 1em;
        line-height: 1.6;
    }
}

.disc-value-item {
    margin-bottom: 15px;
}

.disc-label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.disc-progress {
    position: relative;
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.disc-progress-bar {
    height: 100%;
    background-color: #3498db;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.disc-percentage {
    position: absolute;
    right: 0;
    top: -20px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.disc-chart {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.ac-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Mensagens de status */
#ac-mensagem p {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
}

#ac-mensagem p.error {
    background-color: #fee2e2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

#ac-mensagem p.success {
    background-color: #dcfce7;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

/* Melhorias no formulário */
#ac-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.ac-checkbox-container {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Estilo do botão desabilitado */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Melhorias no input de arquivo */
input[type="file"] {
    position: relative;
    z-index: 2;
}

input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--primary-color);
}

/* Adicionar após os estilos existentes */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.form-help {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.ac-submit-button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.ac-submit-button .button-text {
    position: relative;
    z-index: 1;
}

.ac-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.5s;
}

.ac-submit-button:hover::before {
    transform: translateX(100%) rotate(45deg);
}

/* Estilização do checkbox personalizado */
.ac-checkbox-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--light-gray);
    border-radius: 8px;
    transition: var(--transition);
}

.ac-checkbox-container:hover {
    background: #edf2f7;
}

.ac-checkbox-container input[type="checkbox"] {
    min-width: 20px;
    height: 20px;
    margin-top: 0.2rem;
}

.ac-checkbox-container label {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
    cursor: pointer;
}

/* Melhorias na seção de resultados */
.ac-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ac-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 600;
}

.ac-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
}

.ac-section p {
    color: #34495e;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ac-section strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Botão de download */
.ac-actions {
    text-align: center;
    margin: 30px 0;
}

#ac-download-pdf {
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#ac-download-pdf:hover {
    background-color: #2980b9;
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
