/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Estilos Gerais */
body, html {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f4f8fb;
    color: #333333;
}

/* Tela de Login */
.login-page {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

.login-image {
    flex: 1;
    overflow: hidden;
}

.login-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 350px;
    text-align: left;
}

.login-card h2 {
    font-size: 24px;
    color: #0072ce;
    margin-bottom: 10px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    font-size: 14px;
    color: #666666;
}

.input-group input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #cccccc;
    margin-top: 5px;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: #0072ce;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    background-color: #005bb5;
}

.error {
    color: #ff4d4d;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: left;
}

/* Menu Lateral */
.menu-lateral {
    background-color: #0072ce;
    padding: 20px;
    color: #ffffff;
    width: 200px;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    overflow-y: auto;
}

.menu-lateral h2 {
    margin: 0 0 20px;
    font-size: 24px;
    text-align: center;
}

.navigation-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.navigation-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.navigation-menu a:hover {
    background-color: #005bb5;
}

.content {
    margin-left: 220px;
    padding: 20px;
}

/* Botão de Sair */
.logout-button-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.logout-button {
    padding: 10px 20px;
    background-color: #ff7f50;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.logout-button:hover {
    background-color: #e76b3d;
}

/* Título da Página */
.page-title {
    font-size: 24px;
    color: #0072ce;
    margin-bottom: 20px;
}

/* Botões de Adição */
.add-client-button,
.add-user-button {
    padding: 10px 20px;
    background-color: #0072ce;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-client-button:hover,
.add-user-button:hover {
    background-color: #005bb5;
}

/* Tabelas */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    overflow-x: auto; /* Permite rolagem horizontal */
}

.styled-table th, .styled-table td {
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap; /* Impede quebra de linha para que as colunas fiquem em uma linha */
}

.styled-table th {
    background-color: #0072ce;
    color: #ffffff;
    font-weight: bold;
}

.styled-table td {
    background-color: #f4f8fb;
    border-bottom: 1px solid #dddddd;
}

.styled-table tr:hover td {
    background-color: #e0f3ff;
}

.action-link {
    color: #0072ce;
    text-decoration: none;
    font-weight: bold;
}

.action-link:hover {
    color: #005bb5;
}

.delete-link {
    color: #ff4d4d;
}

.delete-link:hover {
    color: #cc0000;
}

/* Feedback de Mensagens */
.feedback-message {
    font-size: 14px;
    color: #333333;
    background-color: #e8f4ff;
    padding: 10px;
    border-left: 4px solid #0072ce;
    margin-bottom: 10px;
}

/* Formulários */
.client-form,
.user-form {
    display: flex;
    flex-direction: column;
}

.client-form label,
.user-form label {
    font-weight: bold;
    margin-top: 10px;
    color: #333333;
}

.client-form input[type="text"],
.client-form select,
.user-form input[type="text"],
.user-form input[type="password"],
.user-form select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #cccccc;
    font-size: 16px;
}

.save-button {
    padding: 12px 20px;
    background-color: #ff7f50;
    color: #ffffff;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.save-button:hover {
    background-color: #e76b3d;
}

/* Diálogo (Pop-up) */
#addClientDialog,
#addUserDialog {
    font-size: 14px;
}

.ui-dialog-titlebar {
    background-color: #0072ce !important;
    color: #ffffff !important;
}

.ui-dialog-titlebar-close {
    color: #ffffff !important;
}

.ui-widget-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Media Queries para Responsividade */

/* Telas menores que 768px (Tablets e Dispositivos Móveis) */
@media (max-width: 768px) {
    .menu-lateral {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px;
        margin-bottom: 20px;
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .menu-lateral h2 {
        font-size: 20px;
    }

    .navigation-menu {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .content {
        margin-left: 0;
        padding: 10px;
    }

    .logout-button-container {
        position: relative;
        margin: 0;
        top: 10px;
        right: 10px;
        text-align: right;
        padding: 0;
    }

    .logout-button {
        font-size: 12px;
        padding: 8px 16px;
    }

    .styled-table th, .styled-table td {
        padding: 6px 8px;
        font-size: 14px;
    }
    
    /* Tabela rolável horizontalmente */
    .styled-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }

    .page-title {
        font-size: 20px;
        text-align: center;
    }
    
    .add-client-button,
    .add-user-button {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }
}

/* Telas menores que 480px (Smartphones) */
@media (max-width: 480px) {
    .menu-lateral {
        flex-direction: column;
        gap: 5px;
    }

    .page-title {
        font-size: 18px;
    }

    .add-client-button,
    .add-user-button {
        font-size: 14px;
        padding: 8px;
    }

    .styled-table th, .styled-table td {
        font-size: 12px;
        padding: 4px 6px;
    }

    .content {
        padding: 5px;
    }
}

