/* style.css */

/* General Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5; /* Light gray background */
    display: flex;
    flex-direction: column; /* Stack children vertically: header, main, footer */
    min-height: 100vh; /* Ensure full viewport height */
    margin: 0;
    color: #333;
}

/* Login Container (for index.php) */
.login-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px; /* Limit width for better appearance */
    margin: auto; /* Center the login box horizontally and vertically on its own page */
    position: absolute; /* Allows for centering with top/left/transform */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Logo */
.logo {
    font-size: 2.5em;
    font-weight: bold;
    color: #007bff; /* Primary blue color */
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Login Title */
.login-title {
    font-size: 1.5em;
    color: #555;
    margin-bottom: 30px;
}

/* Form Labels */
.form-label {
    text-align: left;
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

/* Form Inputs */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-size: 1em;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Login Button */
.btn-login {
    background-color: #007bff; /* Primary blue */
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%; /* Full width button */
}

.btn-login:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* Alert Messages (Bootstrap default styles are good, but some minor adjustments) */
.alert {
    margin-bottom: 20px;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 0.95em;
}

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


/* --- Styles for Header (Navbar) --- */
.navbar {
    margin-bottom: 20px; /* Provides space below the navbar */
}

/* --- Styles for Main Content Area --- */
main.container {
    flex-grow: 1; /* This makes the main content area expand to fill available space */
    padding-bottom: 30px; /* Add some padding at the bottom for content above footer */
    /* Add padding-top if your navbar is fixed-top and covering content */
}

/* Card styling within main content (e.g., for painel.php content) */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 2em;
}

.card-text {
    font-size: 1.1em;
    color: #555;
}

/* --- Styles for Footer --- */
.footer {
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    /* With flex-direction: column on body and flex-grow: 1 on main,
       the footer will naturally sit at the bottom. No need for position: fixed here. */
}

/* --- NEW STYLES FOR TABLE METRIC CELLS --- */
.metric-cell-value {
    display: inline-block; /* Permite aplicar padding e background */
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.05em; /* Ligeiramente maior que o texto normal da célula */
    text-align: center; /* Garante que o texto fique centralizado dentro do span */
    min-width: 80px; /* Garante uma largura mínima para alinhamento */
}

/* Cor específica para Total Vendas Dia */
.day-sales {
    background-color: #e6ffed; /* Verde claro */
    color: #008000; /* Verde escuro */
    border: 1px solid #cce5d4;
}

/* Cor específica para Total Vendas Mês Acumulado */
.month-sales {
    background-color: #e0f2ff; /* Azul claro */
    color: #0056b3; /* Azul escuro */
    border: 1px solid #b3d7ff;
}

/* --- END NEW STYLES --- */


/* Responsive adjustments */
@media (max-width: 576px) {
    .login-container {
        padding: 25px;
        width: 90%; /* Make it slightly narrower on small screens */
    }
    .logo {
        font-size: 2em;
    }
    .login-title {
        font-size: 1.3em;
    }
    .btn-login {
        padding: 10px 15px;
        font-size: 1em;
    }

    /* Adjust main content padding for smaller screens if needed */
    main.container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Metric card responsiveness */
    /* Remove these if you no longer have .metrics-grid and .metric-value from the previous request */
    /* .metrics-grid {
        grid-template-columns: 1fr;
    }
    .metric-value {
        font-size: 2.2em;
    } */

    /* Table responsiveness for synchronization data */
    table th:nth-child(7), /* Observação */
    table td:nth-child(7) {
        display: none;
    }
    table th:nth-child(5), /* Origem */
    table td:nth-child(5) {
        display: none;
    }
}