/* Corpo da página - sem centralização global */
body {
    margin: 10px;
    padding: 20px;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;

    /* Centralização global */
    display: flex;
    flex-direction: column;
    align-items: left;
    text-align: left;
}


/* Modo escuro */
body.dark-mode {
    background-color: #333;
    color: #fff;
}

/* Container principal do conteúdo */
main {
    padding: 20px;
    max-width: 900px;
    width: 90%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);

    /* Centralizar */
    margin: 5px auto;
}


/* Títulos */
h1, h2, h3 {
    text-align: center;
    color: #333;
}

/* Modo escuro para títulos */

.central {
    display: flex;
    flex-direction: column;
    align-items: left;
    text-align: left;
    width: 900px;
}

table {
    margin: 10px auto 0 auto;
    width: 60%;
    border-collapse: collapse;
}



th, td {
    border: 1px solid #ccc;
    padding: 8px 10px;
    text-align: center;
}

th {
    background-color: #eaeaea;
}

/* Valores negativos */
.negativo {
    color: red;
}

/* Botões padrão */
button, input[type="submit"] {
    padding: 8px 16px;
    margin: 10px 5px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover, input[type="submit"]:hover {
    background-color: #3367d6;
}

/* Inputs e selects */
input, select {
    padding: 6px 12px;
    margin: 5px 0;
    width: 300px;               /* <<< Deixa os inputs no tamanho natural */
    max-width: 500px;          /* <<< Impede que fiquem gigantes */
    box-sizing: border-box;
    text-align: left;        /* <<< Opcional: centraliza texto dentro */
    display: block;
    margin-left: 10px;
    margin-right: auto;
}


/* ===== MENU FIXO ===== */
.menu {
    position: fixed;
    top: 80px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 200px;
    z-index: 1000;
}

/* Tooltip wrapper */
.tooltip {
    position: relative;
    display: block;
}

/* Botões do menu */
.tooltip button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.tooltip button:hover {
    background-color: #0056b3;
}

/* Tooltip visual */
.tooltip .tooltiptext {
    visibility: hidden;
    width: max-content;
    max-width: 300px;
    background-color: #000;
    color: #fff;
    text-align: left;
    padding: 8px 12px;
    border-radius: 5px;
    position: absolute;
    top: 50%;
    left: 105%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    font-size: 14px;
    line-height: 1.3;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Impressão */
@media print {
    body {
        background-color: transparent;
        color: #000;
        display: block;
        min-height: auto;
        margin: 20px;
        padding: 5px;
        font-size: 10pt;
        line-height: 1.2;
    }

    body.dark-mode {
        color: #000;
    }

    main {
        max-width: 78mm;
        width: 100%;
        padding: 5px;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
        margin-left: 0;
    }

    h1, h2, h3 {
        text-align: left;
        color: #000;
        font-size: 12pt;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    table {
        width: 80%;
        margin-top: 10px;
        font-size: 9pt;
    }

    th, td {
        border: 1px solid #ccc;
        padding: 5px;
        text-align: left;
    }

    th {
        background-color: #f0f0f0;
    }

    .negativo {
        color: #000;
        font-weight: bold;
    }

    button,
    input[type="submit"],
    input,
    select,
    .tooltip,
    .menu {
        display: none;
    }

    a {
        text-decoration: none;
        color: #000;
    }
}
