*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --primary: #F63F0D;
    --preto: #1E1E1E;
    --cinza: #5c5c5c;
    --branco: rgba(255,255,255,0.90);
    --radius: 16px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body{
   font-family: Arial, Helvetica, sans-serif;
    background: rgb(250, 250, 250);
    color: var(--preto);
    min-height: 100vh;
}

a{
    text-decoration: none;
    color: white;
}

html{
    scroll-behavior: smooth;
}

/* ========== HEADER ========== */

#header{
    inset: 0 0 auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 99;
    position: fixed;
    padding: 14px 5%;
    background: rgba(246, 63, 13, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#h1Rotax{
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

#navegacao{
    display: flex;
    gap: 8px;
}

#navegacao a{
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    transition: 0.2s;
}

#navegacao a:hover{
    color: #fff;
    transform: translateY(-2px);
    text-shadow: 0 0 8px rgba(255,255,255,0.6);
}

#bemvindo{
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    
}

#btn-sair{
    padding: 8px 20px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

#btn-sair:hover{
    background: var(--preto);
    color: white;
    transform: translateY(-2px);
}

#bemvindo{
    font-weight: 700;
}

/* ========== CONTEÚDO PRINCIPAL ========== */

body > div,
body > hr{
    margin-top: 20px;
}

body > div:first-of-type{
    margin-top: 90px;
}

body{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 70px;
}

/* ========== CARDS / SEÇÕES ========== */

#gerenciar-motoristas,
#gerenciar-rotas,
#lancar-rotas,
#dados-salvos,
#balancoTotais{
    width: 100%;
    max-width: 900px;
    background: var(--branco);
    backdrop-filter: blur(6px);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 30px 35px;
    animation: aparecer 0.6s ease;
}

.secao{
    display: none !important;
    margin-top: 90px;
}

.secao.ativa{
    display: flex !important;
}

#balancoTotais.ativa{
    display: flex !important;
}

@keyframes aparecer{
    from{
        opacity: 0;
        transform: translateY(20px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== TÍTULOS ========== */

#gerenciar-motoristas h3,
#gerenciar-rotas h3,
#lancar-rotas h3,
#dados-salvos h3{
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* ========== INPUTS ========== */

input[type="text"],
select{
    padding: 12px 14px;
    font-size: 14px;
    border-radius: var(--radius);
    background: #fafafa;
    border: 1px solid #e5e5e5;
    color: var(--cinza);
    transition: 0.2s;
    outline: none;
}

#filtroMotorista,
#filtroRota,
#filtroMes,
#filtroAno,
#motorista,
#rota{
    cursor: pointer;
}

input[type="text"]:focus,
select:focus{
    border: 1px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(246,63,13,0.15);
}

input::placeholder{
    color: var(--cinza);
}

/* ========== BOTÕES ========== */

button,
input[type="submit"]{
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

button:hover,
input[type="submit"]:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(246, 63, 13, 0.3);
}

.btn-editar{
    background: #28a745;
}

.btn-editar:hover{
    background: #1e7e34;
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

/* ========== GERENCIAR MOTORISTAS / ROTAS ========== */

#gerenciar-motoristas,
#gerenciar-rotas{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

#gerenciar-motoristas h3,
#gerenciar-rotas h3{
    width: 100%;
}

#gerenciar-motoristas input,
#gerenciar-rotas input{
    flex: 1;
}

#listaMotoristas,
#listaRotas{
    width: 100%;
    list-style: none;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#listaMotoristas li,
#listaRotas li{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f5f5f5;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--preto);
    border: 1px solid #e0e0e0;
}

.nome-item{
    flex: 1;
}

#listaMotoristas li button,
#listaRotas li button{
    padding: 6px 14px;
    font-size: 12px;
    background: #dc3545;
    min-width: 80px;
    text-align: center;
}

#listaMotoristas li button:hover,
#listaRotas li button:hover{
    background: #a71d2a;
}

#listaMotoristas li .btn-editar,
#listaRotas li .btn-editar{
    background: #28a745;
}

#listaMotoristas li .btn-editar:hover,
#listaRotas li .btn-editar:hover{
    background: #1e7e34;
}

/* ========== LANÇAR ROTAS ========== */

#lancar-rotas{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

#lancar-rotas h3{
    width: 100%;
}

#lancar-rotas select,
#lancar-rotas input[type="text"]{
    flex: 1;
    min-width: 160px;
}

#btn-lancar{
    padding: 12px 32px;
}


/* ========== DADOS SALVOS ========== */

#dados-salvos{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

#dados-salvos h3{
    width: 100%;
}

.filtros-container{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.filtro-grupo{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filtro-grupo label{
    font-size: 13px;
    font-weight: 600;
    color: var(--cinza);
}

.filtro-grupo select{
    width: 100%;
}

/* ========== QUINZENAS ========== */

.quinzena-titulo{
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    color: var(--cinza);
    margin-top: 20px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary);
}

/* ========== TABELA ========== */

table{
    background: white;
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
    border-radius: var(--radius);
    overflow: hidden;
    border: none;
}

thead{
    background: var(--primary);
}

thead th{
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    border: none;
}

tbody td{
    padding: 12px 16px;
    font-size: 14px;
    color: var(--preto);
    border-bottom: 1px solid #e0e0e0;
}

tbody tr{
    transition: 0.15s;
}

tbody tr:hover{
    background: #f5f5f5;
}

tbody tr:last-child td{
    border-bottom: none;
}

tbody td button{
    padding: 6px 14px;
    font-size: 12px;
    background: #dc3545;
}

tbody td button:hover{
    background: #a71d2a;
}

/* ========== BALANÇO / TOTAIS ========== */

#balancoTotais{
    display: flex;
    justify-content: center;
    gap: 40px;
    text-align: center;
}

#balancoTotais p{
    font-size: 16px;
    color: var(--preto);
}

#balancoTotais strong{
    color: var(--primary);
}

#balancoTotais span{
    font-weight: 700;
    font-size: 18px;
}

.footer{
    margin-top: auto;
    width: 100%;
    padding: 14px 20px;
    text-align: center;
    animation: aparecer 0.6s ease;
}

.footer-text{
    font-weight: 600;
    color: rgb(186, 186, 186);
}
