/* Variáveis globais inspiradas no Microsoft Power Platform */
:root {
    --primary-color: #742774;
    --primary-dark: #5e215e;
    --primary-light: #b280b2;
    --text-color: #ffffff;
    --background-light: #f3f4f6;
}

/* Tipografia */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background-color: white;
    font-family: Arial, sans-serif;
}

/* Container */
.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    margin: 20px; /* Adicionado espaço para evitar que os elementos fiquem colados */
}

/* Layout principal */
.layout-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    max-width: 100%;
    height: 100vh; /* Make the container take full screen height */
}

/* Coluna esquerda (Formulário) */
.col-left {
    flex: 1;
    min-width: 300px;
    max-width: 25%;
    background: white;
    padding: 20px;
    border-radius: 10px 0 0 10px; /* Bordas arredondadas apenas nas extremidades externas */
}

/* Coluna direita (Filtros + Tabela) */
.col-right {
    flex: 1;
    min-width: 300px;
    max-width: 75%;
    background: white;
    padding: 20px;
    border-radius: 0 10px 10px 0; /* Bordas arredondadas apenas nas extremidades externas */
    border-left: 0px solid rgba(0, 0, 0, 0.1); /* Linha APENAS entre as colunas */
    min-height: 100vh; /* Ensures it stretches full height */
}

/* Responsividade */
@media (max-width: 992px) {
    .layout-container {
        flex-direction: column;
        height: auto; /* Remove fixed height to allow flexibility */
    }

    .col-left, .col-right {
        max-width: 100%;
        border-left: none; /* Remove a linha entre colunas quando empilhado */
        border-radius: 0px; /* Garante que ambas tenham bordas arredondadas */
        min-height: auto; /* Adjust height for smaller screens */
    }

    .col-right {
        border-top: 0px solid rgba(0, 0, 0, 0.1); /* Linha entre seções no modo mobile */
    }
}

.btn-danger, .btn-secondary {
    margin-top: 10px;
}
/* Botões */
.btn-primary, .btn-edit, .btn-delete, .bt {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-right: 10px;
    margin-top: 10px;
}

    .btn-primary:hover,
    .btn-edit:hover,
    .btn-delete:hover {
        background-color: var(--primary-dark);
    }

/* Tabelas */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 0.5px solid #dcdcdc;
}

    .table th, .table td {
        padding: 12px 15px;
        text-align: left;
        vertical-align: middle;
        border-bottom: 1px solid #dcdcdc;
    }

    .table th {
        background-color: #f3f4f6;
        color: #333333;
        font-weight: bold;
        border: none;
    }

.table-striped tbody tr {
    background-color: #ffffff;
}

    .table-striped tbody tr:nth-of-type(odd) {
        background-color: #f9f9f9;
    }

    .table-striped tbody tr:hover {
        background-color: #e3e3e3;
    }

/* Modais */
.modal-content {
    background-color: var(--text-color);
    border-radius: 10px;
}

.modal-header {
    background-color: var(--primary-dark);
    color: var(--text-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-footer {
    border-top: none;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.navbar-nav .nav-link {
    color: var(--text-color);
    transition: color 0.3s ease;
}

    .navbar-nav .nav-link:hover {
        color: var(--primary-light);
    }

/* Links de botão */
.btn-link {
    color: var(--text-color);
    transition: color 0.3s ease;
}

    .btn-link:hover {
        color: var(--primary-light);
    }

/* Títulos */
h1, h4 {
    color: var(--primary-dark);
}

/* Formulários */
.form-control, select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

/* Rodapé */
footer {
    padding: 10px;
    background-color: var(--primary-dark);
    color: var(--text-color);
    text-align: center;
    font-size: 0.875rem;
}

/* Ajuste dos alertas para que fiquem sobrepostos */
.alert-dismissible {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: auto;
    max-width: 90%;
    min-width: 300px;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease-in-out, top 0.5s ease-in-out;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.alert.fade {
    opacity: 0;
    top: 0px;
    transition: opacity 0.5s ease-in-out, top 0.5s ease-in-out;
}

#remainingHoursDisplay {
    font-size: 14px;
    text-align: right;
    right: 20px;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    z-index: 1000; /* Ensures it's above other elements */
}