* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding-top: 80px;
    padding-bottom: 56px; /* espaço para o footer fixo */
    overflow-x: hidden; /* impede scroll lateral */
}

header {
    display: block;
}

nav.navbar {
    background-color: #2d89ef;
    padding: 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.navbar .logo {
    font-weight: bold;
    font-size: 1.2rem;
    white-space: nowrap;
}

.navbar .menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    transform: rotate(90deg);
    user-select: none;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.navbar ul li a:hover {
    opacity: 0.8;
}

@media (max-width: 600px) {
    .navbar {
        padding: 1rem 0.5rem;
    }

    .navbar .menu-toggle {
        display: block;
    }

    .navbar ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #2d89ef;
        flex-direction: column;
        display: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .navbar ul.open {
        display: flex;
    }

    .navbar ul li {
        padding: 1rem;
        text-align: center;
    }
}

.container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 91%;
    max-width: 400px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 60;
    margin-bottom: 1.5rem;
    color: #333;
}

label {
    display: block;
    margin-top: 1rem;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.switch-group {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.entrada {
    border-radius: 6px 0 0 6px;
    width: 100px;
}

.saida {
    border-radius: 0 6px 6px 0;
    width: 100px;
}

.switch-label {
    flex: 1;
    text-align: center;
    padding: 0.7rem 0;
    cursor: pointer;
    user-select: none;
    background-color: #e0e0e0;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.switch-label.entrada {
    border-color: #2d89ef;
}

.switch-label.saida {
    border-color: #e53935;
}

input[type="radio"] {
    display: none;
}

input[type="radio"]:checked+.switch-label.entrada {
    background-color: #2d89ef;
    color: white;
}

input[type="radio"]:checked+.switch-label.saida {
    background-color: #e53935;
    color: white;
}

button {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.8rem;
    background-color: #2d89ef;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #1b5fcc;
}

@media (max-width: 500px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

.resumo-mes {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 91%;
    max-width: 400px;
    margin: 1.5rem auto 0 auto;
    font-weight: bold;
    text-align: center;
    font-size: 0.9rem;
}

.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #f4f6f8;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    padding: 0.5rem 1.5rem;
    z-index: 20;
}

.footer-dark-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    outline: none;
    margin-left: 0.5rem;
}