/* Corpo da página */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 20px;
    color: #333;
}

/* Títulos */
h2 {
    color: #4CAF50;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

h3 {
    color: #4CAF50;
    font-size: 1.5em;
    text-transform: uppercase;
    margin-bottom: 15px;
    text-align: center;
}

/* Seção de upload de planilhas */
.upload-section {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid #ddd;
}

.upload-section h3 {
    margin-bottom: 20px;
}

.file-upload-group {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.file-upload {
    flex: 1;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.file-upload h3 {
    margin: 0;
}

.selection-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    align-items: center;
}

.select-city,
.multiplier-value,
.min-acceptance,
.filter-mode,
.filter-motorista {
    flex: 1;
    min-width: 200px;
}

.select-city select,
.multiplier-value input,
.min-acceptance input,
.filter-mode select {
    width: 85%;
    padding: 12px;
    border-radius: 15px;
    border: 1px solid #ccc;
    font-size: 1em;
    transition: border-color 0.3s ease;
    text-align: center;
}

.filter-motorista input {
    width: 105%;
    padding: 12px;
    border-radius: 15px;
    border: 1px solid #ccc;
    font-size: 1em;
    text-align: center;
}

.abatimento-km input {
    width: 50%;
    padding: 12px;
    border-radius: 15px;
    border: 1px solid #ccc;
    font-size: 1em;
    text-align: center;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 150px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s ease;
    margin-top: 15px;
}

button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

/* Opções de filtro */
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Tabela */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tbody tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

/* Rodapé da tabela */
#totalValorTop {
    margin-top: 25px;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border-radius: 8px;
    text-align: center;
    font-size: 1.5em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Indicador de carregamento */
#loading {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

/* Indicador de Carregamento em Onda */
.loading-wave {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 45%;
    left: 48%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.loading-wave .dot {
    width: 20px;
    height: 20px;
    margin: 0 5px;
    background-color: #1e00c9;
    border-radius: 50%;
    animation: wave 0.8s linear infinite;
}

.loading-wave .dot:nth-child(2) {
    animation-delay: 0.1s;
}

.loading-wave .dot:nth-child(3) {
    animation-delay: 0.2s;
}

.loading-wave .dot:nth-child(4) {
    animation-delay: 0.3s;
}

.loading-wave .dot:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.lds-ellipsis {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-ellipsis div {
    position: absolute;
    top: 33px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #4CAF50;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) {
    left: 8px;
    animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
    left: 8px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
    left: 32px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
    left: 56px;
    animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes lds-ellipsis2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

@keyframes lds-ellipsis3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

/* Responsividade */
@media (max-width: 768px) {

    .file-upload-group,
    .selection-group,
    .filter-options {
        flex-direction: column;
    }

    .file-upload,
    .select-city,
    .multiplier-value,
    .filter-mode,
    .filter-motorista {
        margin-right: 0;
        margin-bottom: 5px;
    }

    table th,
    table td {
        padding: 10px;
        font-size: 0.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.2em;
    }

    button {
        padding: 10px 15px;
        font-size: 1em;
    }

    #totalValorTop {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .upload-section {
        padding: 15px;
    }

    table th,
    table td {
        padding: 8px;
        font-size: 0.75em;
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        font-size: 1em;
    }

    button {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    #totalValorTop {
        font-size: 1em;
    }
}