/* style.css */

/* --- Variáveis e Base --- */
:root {
    --color-primary: #800020;
    /* Bordô/Vinho Escuro */
    --color-secondary: #f4f4f4;
    /* Fundo Secundário Claro */
    --color-text: #333;
    --color-link: #a52a2a;
    /* Marrom avermelhado */
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-error: #dc3545;
    --color-stock: #007bff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-secondary);
    color: var(--color-text);
}

.container {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Cabeçalhos e Navegação --- */
h1 {
    color: var(--color-primary);
    text-align: center;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.nav {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    padding: 5px 10px;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.nav a:hover {
    background-color: #f0f0f0;
}

/* --- Formulários e Inputs --- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
}

input[readonly] {
    background-color: #e9ecef;
    color: #6c757d;
}

.input-box {
    font-size: 1.8em !important;
    font-weight: bold;
    text-align: center;
    padding: 15px !important;
}

.btn-submit {
    background-color: var(--color-primary);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #6a001a;
}

/* --- Mensagens de Feedback --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* --- Estilos do Relatório (Relatorio.php) --- */
h2 {
    background-color: var(--color-primary);
    color: white;
    padding: 12px;
    margin-top: 30px;
    border-radius: 4px;
    font-size: 1.5em;
    text-transform: uppercase;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-size: 0.95em;
}

th {
    background-color: #f8f8f8;
    color: var(--color-text);
    font-weight: 600;
    text-transform: uppercase;
}

.estoque-count {
    font-weight: bold;
    color: var(--color-stock);
    text-align: center;
    font-size: 1.1em;
}

.btn-print {
    background-color: var(--color-stock);
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 15px;
    transition: background-color 0.3s;
}

.btn-print:hover {
    background-color: #0056b3;
}

/* Esconder elementos de navegação ao imprimir */
@media print {

    .nav,
    .no-print,
    h1 {
        display: none !important;
    }

    body {
        background-color: white;
        margin: 0;
    }

    .container {
        margin: 0;
        padding: 0;
        box-shadow: none;
        max-width: 100%;
    }

    h2 {
        page-break-before: auto;
    }
}