/* css/dashboard_admin.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #1a1a1a; /* Fundo escuro */
    color: #ffffff; /* Texto branco como base */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #2c2c2c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around; /* Espaçamento igual entre os itens */
    align-items: center;
    width: 100%;
    gap: 1rem; /* Espaçamento entre os elementos */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Espaçamento interno */
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fd7200;
    object-fit: cover;
}

#admin-name {
    font-weight: 600;
    font-size: 1.2rem;
    white-space: nowrap; /* Impede quebra de linha */
}

.company-logo .logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #fd7200;
    object-fit: cover;
}

.nav-buttons {
    background-color: #121212;
    padding: 0.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    max-width: 900px;
    margin: 0 auto;
}

.header-btn {
    padding: 0.7rem 1rem;
    background-color: #fd7200;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.header-btn:hover {
    background-color: #ce5e03;
}

.logout-btn {
    padding: 0; /* Remove padding para centralizar o conteúdo */
    background-color: #ff4444; /* Cor de fundo vermelha */
    color: #ffffff; /* Texto branco */
    border: none;
    border-radius: 50%; /* Volta a ser redondo */
    cursor: pointer;
    width: 50px; /* Mesmo tamanho do profile-pic */
    height: 50px; /* Mesmo tamanho do profile-pic */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem; /* Tamanho do ícone/emoji */
    transition: background-color 0.3s; /* Transição suave */
}

.logout-btn:hover {
    background-color: #cc0000; /* Escurece no hover */
}

main {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

table {
    width: 100%;
    max-width: 800px;
    background-color: #2c2c2c;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.responsive-table {
    overflow-x: auto; /* Permite rolagem horizontal em telas pequenas */
}

th, td {
    padding: 1rem;
    text-align: center;
    color: #ffffff; /* Garante texto branco nas tabelas */
}

th {
    background-color: #fd7200;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #333333;
}

tr:hover {
    background-color: #404040;
    cursor: default;
}

.payment-form {
    background-color: #333333; /* Fundo mais claro para contraste */
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    margin: 0 auto;
    position: fixed; /* Comportamento sobreposto */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    border: 2px solid #fd7200; /* Borda para destacar */
}

.payment-form h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #ffffff;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #ffffff;
}

.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #555555;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #2c2c2c; /* Fundo dos inputs mais escuro */
    color: #ffffff;
}

#total-amount {
    font-weight: 600;
    color: #ffffff;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

button {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.5rem;
    width: 48%; /* Divide o espaço igualmente */
}

.btn-primary {
    background-color: #fd7200;
    color: #ffffff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #e65c00;
}

.btn-secondary {
    background-color: #dc3545;
    color: #ffffff;
    width: 100%;
}

.btn-secondary:hover {
    background-color: #c82333;
}

.message.error {
    background-color: #fee2e2;
    color: #dc3545;
    border: 1px solid #dc3545;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 1rem;
    width: 100%;
}

.message.success {
    background-color: #d4edda;
    color: #28a745;
    border: 1px solid #28a745;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 1rem;
    width: 100%;
}

/* Media Queries para Responsividade */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .header-container {
        justify-content: space-around; /* Mantém em linha com espaçamento */
        gap: 0.5rem; /* Reduz o espaçamento em telas menores */
    }

    .user-info img,
    .company-logo .logo,
    .logout-btn {
        width: 40px; /* Reduz o tamanho das imagens e botão */
        height: 40px;
    }

    #admin-name {
        font-size: 1rem; /* Reduz o tamanho do texto */
    }

    .nav-buttons {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .header-btn, .logout-btn {
        width: 100%;
        text-align: center;
    }

    table {
        font-size: 0.9rem;
    }

    .payment-form {
        max-width: 85%; /* Ajuste para telas menores */
        padding: 1rem;
    }

    button {
        width: 100%; /* Botões ocupam toda a largura */
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    table {
        font-size: 0.8rem;
    }

    .header-container {
        gap: 0.3rem; /* Espaçamento ainda menor */
    }

    .user-info img,
    .company-logo .logo,
    .logout-btn {
        width: 35px; /* Reduz ainda mais em telas pequenas */
        height: 35px;
    }

    #admin-name {
        font-size: 0.9rem; /* Ajuste fino do texto */
    }

    .payment-form h2 {
        font-size: 1.2rem;
    }

    .form-input {
        font-size: 0.9rem;
    }

    .payment-form {
        max-width: 90%; /* Ajuste para telas muito pequenas */
    }
}

canvas {
    max-width: 800px;
    margin: 0 auto;
    display: block;
}