/* ---------------------- */
/* COMPONENTES VISUAIS    */
/* ---------------------- */

.botao-login {
    background-color: var(--cor-realce);
    color: var(--cor-texto);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: var(--fonte-tamanho);
    transition: background-color 0.3s ease;
    text-align: center;
    cursor: pointer;
    min-width: 120px;
    flex: 0 0 auto;
}

.botao-login:hover {
    background-color: var(--cor-primaria);
}

.botoes-crud,
.login-botoes {
    display: flex;
    gap: 10px;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .botoes-crud,
    .login-botoes {
        flex-direction: column;
    }

    .botao-login {
        width: 100%;
        font-size: calc(var(--fonte-tamanho) * 0.95);
        padding: 0.65rem;
    }
}

/* Inputs e selects */
.input-sistema,
.select-sistema {
    background-color: var(--cor-dark);
    color: var(--cor-texto);
    font-size: var(--fonte-tamanho);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #444;
    width: 100%;
    transition: border 0.3s ease;
    box-sizing: border-box;
}

.input-sistema::placeholder {
    color: #bbb;
}

.input-sistema:focus,
.select-sistema:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.15);
}

/* Labels para formulários */
.form-cadastro label {
    font-weight: 600;
    font-size: calc(var(--fonte-tamanho) * 0.95);
    display: block;
    margin-bottom: 0.25rem;
}

/* Campo de senha com ícone embutido */
.position-relative {
    position: relative;
}

.icone-senha {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 10;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* ---------------------- */
/* TABELA PADRÃO          */
/* ---------------------- */

.table-cadastro {
    text-align: left;
    width: 100%;
    border-spacing: 0;
    background-color: var(--cor-dark);
    color: var(--cor-texto);
    border: 1px solid var(--cor-primaria);
    border-radius: 8px;
}

.table-cadastro td {
    padding: 0.75rem;
    font-size: calc(var(--fonte-tamanho) * 0.95);
    border-bottom: 1px solid var(--cor-texto-secundario, #444);
}

.table-cadastro tr:last-child td {
    border-bottom: none;
}

.table-cadastro tr:hover {
    background-color: var(--cor-primaria-claro, #2a2a2a);
    cursor: pointer;
}

.table-cadastro tr.selected {
    background-color: var(--cor-primaria);
    color: var(--cor-realce);
}

/* ---------------------- */
/* PAGINAÇÃO              */
/* ---------------------- */

.paginacao {
    display: flex;
    gap: 6px;
    margin-top: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.paginacao a,
.paginacao .pagina-atual {
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: calc(var(--fonte-tamanho) * 0.9);
    border: 1px solid var(--cor-texto-secundario);
    transition: background-color 0.3s ease;
}

.paginacao a:hover {
    background-color: var(--cor-primaria);
    color: var(--cor-realce);
}

.paginacao .pagina-atual {
    background-color: var(--cor-primaria);
    color: var(--cor-realce);
    pointer-events: none;
}

/* ---------------------- */
/* ALERTAS                */
/* ---------------------- */

.alert-sucesso {
    color: var(--cor-realce);
    background-color: var(--cor-primaria);
    border-left: 4px solid var(--cor-realce);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: var(--fonte-tamanho);
}

.alert-erro {
    background-color: #8b0000;
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-weight: 500;
}

.alert-warning {
    background-color: #e6a700;
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-weight: 500;
}

.alert-info {
    background-color: #357edd;
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-weight: 500;
}


/* ---------------------- */
/* GRAFICOS               */
/* ---------------------- */

.grafico-box {
    background-color: transparent;  /* fundo transparente */
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 0 0 transparent;  /* sem sombra */
}

/* ---------------------- */
/* Scrol box              */
/* ---------------------- */

.scroll-box {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--cor-realce);
    border-radius: 6px;
    padding: 10px;
    background-color: var(--cor-fundo);
}

/* Remove bordas da tabela interna */
.scroll-box .table-cadastro {
    border: none;
    border-collapse: collapse;
}

.scroll-box .table-cadastro th,
.scroll-box .table-cadastro td {
    border: none !important;
}

.scroll-box .table-cadastro thead {
    background-color: var(--cor-realce);
    color: var(--cor-texto);
    font-weight: bold;
    border-bottom: 1px solid #444;
}

.scroll-box .table-cadastro thead th {
    padding: 10px;
    text-align: left;
}

/* ---------------------- */
/* Lista de Status        */
/* ---------------------- */
.linha-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 1rem;
}


.lista-status li {
    padding: 8px 0;
    border-bottom: 1px solid var(--cor-realce);
    color: var(--cor-texto-sidebar); /* texto padrão escuro */
}

/* ---------------------- */
/* Pré-formatado Status   */
/* ---------------------- */
.pre-status {
    background-color: var(--cor-realce); /* fundo destacado */
    border: 1px solid var(--cor-dark);
    padding: 12px;
    border-radius: 6px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--cor-texto); /* texto branco sobre fundo escuro */
}

/* ---------------------- */
/* Componentes UI Custom */
/* ---------------------- */

.status-ok {
    color: green;
    font-weight: bold;
}

.status-error {
    color: red;
    font-weight: bold;
}

.badge-status {
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    display: inline-block;
}

.badge-ok {
    background-color: #28a745;
    color: white;
}

.badge-error {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: var(--cor-primaria);
    color: black;
}

.badge-amarelo {
    background-color: var(--cor-primaria);
    color: var(--cor-texto);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    display: inline-block;
}

.linha-status-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.linha-status {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-cadastro th,
.table-cadastro td {
    vertical-align: middle;
    padding: 10px;
}


/* ---------------------- */
/* Estilo exclusivo: Monitoramento */
/* ---------------------- */

.container-status {
    display: grid;
    gap: 24px;
}

.container-status .table-cadastro th:nth-child(1),
.container-status .table-cadastro td:nth-child(1) {
    width: 60%;
    text-align: left;
}

.container-status .table-cadastro th:nth-child(2),
.container-status .table-cadastro td:nth-child(2) {
    width: 30%;
    text-align: right;
}

.container-status .table-cadastro th:nth-child(3),
.container-status .table-cadastro td:nth-child(3) {
    width: 20%;
    text-align: right;
}

/* COMPONENTES VISUAIS CUSTOMIZADOS */

.filtro-periodo {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}
.filtro-metodo {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.botao-expander {
    background-color: var(--cor-dark);
    color: var(--cor-texto);
    border: 1px solid var(--cor-destaque, #f8c51c);
    padding: 0.5rem 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background-color 0.3s ease;
}
.botao-expander:hover {
    background-color: var(--cor-realce);
}

.expander-conteudo {
    padding: 1rem;
    border: 1px solid var(--cor-destaque, #f8c51c);
    border-radius: 6px;
    background-color: var(--cor-fundo, #1e1e1e);
    margin-top: 0.5rem;
    display: none;
}

.expander-conteudo select {
    background-color: var(--cor-dark);
    color: var(--cor-texto);
}

/* ---------------------- */
/* OUTROS                 */
/* ---------------------- */

.separador-bloco {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.progress-bar {
    background-color: #ddd;
    border-radius: 8px;
    height: 28px;
    width: 100%;
    overflow: hidden;
}

.progress-fill {
    background-color: var(--cor-primaria);
    height: 100%;
    text-align: center;
    line-height: 28px;
    color: var(--cor-texto-sidebar);
    font-weight: bold;
    transition: width 0.5s ease;
}

/* Modal de confirmação reutilizável */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--cor-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  background: var(--cor-dark);
  padding: 20px;
  max-width: 500px;
  width: 90%;
  border: 1px solid var(--cor-primaria);
  text-align: center;
}
.modal-botoes {
  display: flex;
  justify-content: center;
  gap: 10px;
}

