
      /* Aplica a cor de fundo nas linhas pares para o efeito zebrado */
        tbody tr:nth-child(even) {
            background-color: #f3f4f6; /* Cor de fundo mais escura para linhas pares */
        }
    /* Variáveis CSS para Cores */
    :root {
        --cor-primaria: #007BFF;
        --cor-secundaria: #34495e;
        --cor-fundo: #f0f2f5;
        --cor-card: #ffffff;
        --cor-borda: #dcdfe6;
        --cor-desabilitado: #f8f9fa;
        --cor-sucesso: #2ecc71; 
        --cor-cancelar: #e74c4c; 
        --margem-vertical: 20px; 
    }

    /* ESTILO DO OVERLAY */
    #overlay-backdrop {
        position: fixed; 
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); 
        z-index: 2000; 
        pointer-events: auto; 
        transition: opacity 0.4s ease-out;
    }
    #overlay-backdrop.hide-form {
        opacity: 0;
        pointer-events: none;
    }

    /* MENSAGEM DE SUCESSO */
    #notification {
        position: fixed;
        top: -100px; 
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--cor-sucesso);
        color: white;
        padding: 15px 30px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.35); 
        z-index: 99999; 
    }

    #notification.show {
        top: 20px;
        opacity: 1;
    }
/* Adicione esta regra ao seu CSS */
#notification.error {
    background-color: var(--cor-cancelar); /* Usando a cor vermelha que você já definiu */
}
    /* ESTILO PARA O NOVO WRAPPER */
    #main-form-wrapper {
        width: 100%;
        max-width: 650px; 
        max-height: calc(100vh - (2 * var(--margem-vertical))); 
        overflow-y: visible; /* Revertido para visible */
        background-color: var(--cor-card);
        padding: 15px 30px; 
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 2001; 
        position: fixed; 
        top: 50%; 
        left: 50%; 
        transform: translate(-50%, -50%); 
        transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    }
    
    /* CLASSE PARA OCULTAÇÃO (Posição de partida da direita) */
    #main-form-wrapper.hide-form {
        opacity: 0;
        transform: translate(100vw, -50%); 
        pointer-events: none; 
    }
    
  /* ESTILO DO BOTÃO DE FECHAR (X BRANCO EM BOLA VERMELHA) */
        .close-button {
            position: absolute;
            top: 10px; 
            right: 10px; 
            width: 30px;
            height: 30px;
            background-color: var(--cor-cancelar); 
            color: white;
            border-radius: 50%; 
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.1em;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            transition: background-color 0.2s, transform 0.2s;
            z-index: 1002; 
        }
        
        .close-button:hover {
            background-color: #a53636; 
            transform: scale(1.05);
        }

        /* ESTILOS INTERNOS (COM ESCOPO) */
        .container h2 {
            color: var(--cor-secundaria);
            font-weight: 600;
            font-size: 1.8em;
            margin-bottom: 15px; 
            border-bottom: 2px solid var(--cor-primaria);
            padding-bottom: 5px; 
            cursor: default; 
        }
        
        /* Título de lista menor e com menos borda */
        .container #dados-container h2 {
            font-size: 1.5em;
            margin-top: 0;
            margin-bottom: 15px;
            border-bottom: 1px solid var(--cor-primaria); 
            cursor: default; 
        }

        .container .form-field {
            margin-bottom: 15px; 
            position: relative; 
        }
        
        .container #search-field-container {
            position: relative;
        }

        /* .container label {
            margin-bottom: 5px; 
            font-weight: 400;
            color: var(--cor-secundaria);
            display: block;
            font-size: 0.9em;
        } */

        #descricao, #visualizacao {
            width: 100%;
            padding: 10px 15px; 
            border: 1px solid var(--cor-borda);
            border-radius: 8px;
            font-size: 1em;
            transition: border-color 0.3s, box-shadow 0.3s;
            box-sizing: border-box;
            text-transform: uppercase; 
            cursor: text; 
        }

       input[type="text"]:focus {
            border-color: var(--cor-primaria);
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
            outline: none; 
        }
        
        .container input:disabled {
            background-color: #e6f7ff; 
            color: var(--cor-primaria); 
            cursor: default; 
            border: 1px solid #b3d9ff; 
            box-shadow: none;
            font-weight: 600; 
            font-size: 1.1em; 
            padding: 8px 15px; 
            transition: all 0.3s ease; 
        }
        
        .container #visualizacao.instruction {
            background-color: var(--cor-desabilitado); 
            color: #888; 
            font-weight: 400; 
            font-size: 1em; 
            border: 1px solid #ccc;
        }

        .container #cadastro-condicional {
            display: none;
            flex-direction: row;
            align-items: center; 
            gap: 10px;
            position: absolute; 
            top: 100%;          
            left: 0;            
            width: 100%;
            padding: 15px;
            border-radius: 0 0 8px 8px; 
            background-color: var(--cor-card);
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); 
            z-index: 10; 
        }

        .container #cadastro-condicional .form-field {
            flex-grow: 1;
            margin-bottom: 0;
        }
        
        .container #cadastro-condicional input[type="text"] {
             width: 100%; 
        }
        
        .container #cadastro-condicional label {
            display: none;
        }

        .container .btn-principal {
            padding: 10px 15px; 
            color: var(--cor-card);
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9em; 
            font-weight: 600;
            transition: background-color 0.3s, transform 0.1s;
            height: 38px; 
            box-sizing: border-box;
            background-color: var(--cor-primaria);
        }
        
        .container .btn-principal:hover {
            background-color: #0056b3;
            transform: translateY(-1px);
        }

        .container .btn-lista {
            background: none;
            border: none;
            color: var(--cor-primaria);
            font-weight: 600;
            cursor: pointer;
            margin-left: 10px;
            padding: 5px 8px;
            border-radius: 4px;
            transition: background-color 0.2s;
            font-size: 0.95em; 
        }

        .container .btn-lista.editar:hover {
            background-color: #e8f5e9;
            color: var(--cor-sucesso);
        }
        
        .container .btn-cancelar {
            background-color: var(--cor-cancelar);
            margin-left: 10px;
            color: white;
        }
        .container .btn-cancelar:hover {
            background-color: #c0392b;
        }
        
        .container #dados-container {
            margin-top: 15px; 
        }

        .list-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: var(--cor-primaria); 
            color: white;
            padding: 8px 15px; 
            border: 1px solid var(--cor-primaria);
            border-radius: 8px 8px 0 0; 
            font-weight: 600;
            font-size: 0.9em; 
            margin-top: 10px; 
            margin-bottom: 0; 
        }

        .list-header span {
            flex-grow: 1;
        }

        .container #lista-dados {
            list-style: none;
            padding: 0;
            max-height: 250px; 
            height: 250px; 
            overflow-y: scroll; 
            border-left: 1px solid var(--cor-borda); 
            border-right: 1px solid var(--cor-borda); 
            border-bottom: 1px solid var(--cor-borda);
            border-radius: 0 0 8px 8px;
            margin-top: 0; 
        }
        
        .container #lista-dados li {
            display: flex;
            justify-content: space-between; 
            align-items: center;
            padding: 8px 15px; 
            border-bottom: 1px solid #eeeeee;
            color: var(--cor-secundaria);
            font-size: 0.9em;
            transition: background-color 0.3s;
        }
        
        .container #lista-dados li:nth-child(odd) {
            background-color: #f9f9f9; 
        }
        .container #lista-dados li:nth-child(even) {
            background-color: var(--cor-card); 
        }
        .container #lista-dados li:hover {
            background-color: #e8e8e8 !important; 
        }
        
        .container #lista-dados li:last-child {
            border-bottom: none;
        }
        .container .item-text {
            flex-grow: 1;
        }


