body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Desfaz a centralização para as páginas de administração */
body.admin-page {
    display: block;
    height: auto;
}

.container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #d9534f;
}

h1 {
    color: #d9534f;
    display: flex;
    flex-direction: column; /* Coloca o preço abaixo do texto principal */
    align-items: center;
    gap: 0.25rem; /* Pequeno espaço entre as linhas */
}

h1 .price {
    white-space: nowrap; /* Garante que o "R$ 0,25" nunca quebre a linha */
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

label {
    text-align: left;
    font-weight: bold;
}

input {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background-color: #5cb85c; /* Verde sucesso */
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #4cae4c;
}

.btn-danger {
    background-color: #d9534f; /* Vermelho perigo */
    margin-left: 5px;
    margin-bottom: 10px;
}

.btn-danger:hover {
    margin-bottom: 10px;
    background-color: #c9302c;
    margin-left: 5px;
}

.admin-buttons {
    display: flex;
    flex-wrap: wrap; /* Permite que os botões quebrem para a próxima linha em telas pequenas */
    gap: 1rem; /* Espaçamento entre os botões */
}

.hidden {
    display: none;
}

#qrcode-container {
    margin-top: 2rem;
}

#qrcode-img {
    max-width: 200px;
    margin: 1rem auto;
    display: block;
}

#status-msg {
    font-weight: bold;
    color: #337ab7; /* Azul informativo */
}

#error-msg {
    color: #d9534f;
    margin-top: 1rem;
    font-weight: bold;
}

/* Media Query para Dispositivos Móveis */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        margin: 1rem;
        box-shadow: none;
    }

    h1 {
        font-size: 1.5rem;
    }

    .logo {
        width: 120px;
        height: 120px;
    }
}

/* Estilos do menu lateral retrátil */
.admin-layout {
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: #333;
    color: white;
    padding: 1rem;
    height: 100vh;
    position: fixed;
    z-index: 1000;
    transition: width 0.3s ease-in-out;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s;
    white-space: nowrap; /* Impede que o texto quebre linha */
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: #555;
}

.admin-layout .main-content {
    margin-left: 265px;
    padding: 2rem;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-text {
    display: none;
}

.main-content.expanded {
    margin-left: 80px;
    width: calc(100% - 80px);
}

.hamburger-btn {
    display: none; /* Escondido por padrão */
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1002;
}

/* Responsividade da tabela de clientes */
@media (max-width: 768px) {
    .sidebar {
        display: none; /* Escondida por padrão em mobile */
        position: fixed;
        width: 100%;
        height: 100vh;
    }

    .sidebar.open {
        display: block;
    }

    .main-content,
    .admin-layout .main-content {
        margin-left: 0;
        margin-top: 50px;
        width: 100%;
    }
    
    .hamburger-btn {
        display: block; /* Visível em mobile */
    }
}

.pagination{
    margin-top: 10px;
}

/* Estilos do Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
/* Estilos da Tabela de Clientes */
#client-table-container {
    overflow-x: auto; /* Permite rolagem horizontal em telas pequenas */
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#client-table {
    width: 100%;
    border-collapse: collapse; /* Remove o espaçamento entre as bordas */
    min-width: 600px; /* Largura mínima para evitar que a tabela fique muito espremida */
}

#client-table th,
#client-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* Impede a quebra de linha do conteúdo */
}

#client-table th {
    background-color: #333;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#client-table tbody tr:hover {
    background-color: #f5f5f5; /* Efeito de hover para melhor usabilidade */
    cursor: pointer;
}

#client-table td:first-child,
#client-table th:first-child {
    min-width: 200px; /* Garante um espaço mínimo para o nome */
    width: auto; /* Permite que a coluna cresça conforme o conteúdo */
}